[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-18 Thread Marko Lindqvist
Update of patch #4051 (project freeciv):

  Status:  Ready For Test => Done   
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-16 Thread Marko Lindqvist
Update of patch #4051 (project freeciv):

  Status:None => Ready For Test 

___

Follow-up Comment #9:

I played with this a bit. First I meant to make new version of the patch for
comment typofix only ("dimplomatic" -> "diplomatic"), but ended then changing
diplrel_asym so that its values are distinct from diplstate_type - no need to
add and subtract DS_LAST in the code to distinguish values.

(file #18692)
___

Additional Item Attachment:

File name: DiplrelReq.patch   Size:17 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-16 Thread Sveinung Kvilhaugsvik
Follow-up Comment #8, patch #4051 (project freeciv):

>  In our naming conventions, "is" for boolean functions is usually placed in
the beginning. is_diplrel_between() and is_diplrel_to_other().
Changed.

(file #18687)
___

Additional Item Attachment:

File name: diplrel.patch  Size:17 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-16 Thread Marko Lindqvist
Update of patch #4051 (project freeciv):

 Assigned to:None => cazfi  

___

Follow-up Comment #7:

> Do you mean eliminating diplstate_text() and change its users
> to use the specenum's functions in stead or make
> diplstate_text() wrap?

At this point you are probably more qualified to answer that yourself. Does it
seem likely that diplstate_text() will at some point return strings other than
those directly from specenum? If it does, it's worth keeping the function.
Otherwise change callers to access specenum directly.

> also renames diplrel_between() to diplrel_between_is() and
> diplrel_to_other() to diplrel_to_other_is().

In our naming conventions, "is" for boolean functions is usually placed in the
beginning. is_diplrel_between() and is_diplrel_to_other().

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-16 Thread Sveinung Kvilhaugsvik
Follow-up Comment #6, patch #4051 (project freeciv):

> Assuming this one goes in, I will be requesting follow-up patch to make
diplstate_text() to use names of the states from the diplstate_type specenum
instead of defining (identical) strings itself.
Just to be clear before I start writing it: Do you mean eliminating
diplstate_text() and change its users to use the specenum's functions in stead
or make diplstate_text() wrap?

> I would use something like "Hosts embassy" and "Has embassy"
Thank you for the suggestion. Changed in the new version.

The new version also renames diplrel_between() to diplrel_between_is() and
diplrel_to_other() to diplrel_to_other_is().

(file #18682)
___

Additional Item Attachment:

File name: diplrel.patch  Size:17 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-15 Thread Marko Lindqvist
Follow-up Comment #5, patch #4051 (project freeciv):

Assuming this one goes in, I will be requesting follow-up patch to make
diplstate_text() to use names of the states from the diplstate_type specenum
instead of defining (identical) strings itself.

And while I'm not native speaker either, "Gives Embassy to" sounds weird to me
when there's nobody specific to whom it's given. I would use something like
"Hosts embassy" and "Has embassy"


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-13 Thread Sveinung Kvilhaugsvik
Follow-up Comment #4, patch #4051 (project freeciv):

Forgot to change the name in README.effects

(file #18677)
___

Additional Item Attachment:

File name: diplrel.patch  Size:17 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-13 Thread Sveinung Kvilhaugsvik
Follow-up Comment #3, patch #4051 (project freeciv):

> DRA_RECIEVES_SHARED_VISION -> recEIves
Thank you. Fixed.

> Can diplstate_type_by_name() return DS_LAST?
No. It is pure paranoia about what someone may change in the future. Changed
to an assert for now. The code that follow it is also pure paranoia. Making
sure that diplrel_asym's invalid is returned is pointless as it has the same
value as diplstate_type's invalid. I don't mind removing them.

> diplrel_name_translation() function header is just a copy of
diplrel_rule_name() header, claiming that the returned name is untranslated.
Thank you. Fixed. Also fixed for other functions.

(file #18676)
___

Additional Item Attachment:

File name: diplrel.patch  Size:17 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-13 Thread Marko Lindqvist
Update of patch #4051 (project freeciv):

Category:None => general
 Planned Release: => 2.6.0  

___

Follow-up Comment #2:

- DRA_RECIEVES_SHARED_VISION -> recEIves
- In diplrel_by_rule_name(), is
if (diplrel == DS_LAST) {
  return diplrel_asym_invalid();
}
correct/needed? Can diplstate_type_by_name() return DS_LAST?
- diplrel_name_translation() function header is just a copy of
diplrel_rule_name() header, claiming that the returned name is untranslated.


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-08-12 Thread Sveinung Kvilhaugsvik
Follow-up Comment #1, patch #4051 (project freeciv):

No longer just a request for comments. Applies on top of trunk SVN revision
23201. Among the changes are the addition of the relation real embassy
(to/from) and renaming of the requirement type from DiplRelation to DiplRel.

(file #18674)
___

Additional Item Attachment:

File name: diplrel.patch  Size:16 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #4051] Diplomatic relation requirement type

2013-07-30 Thread Sveinung Kvilhaugsvik
URL:
  

 Summary: Diplomatic relation requirement type
 Project: Freeciv
Submitted by: sveinung
Submitted on: Tue 30 Jul 2013 06:43:22 PM GMT
Category: None
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

The diplomatic relation requirement type is about diplomatic relations. The
diplomatic relations are "Armistice", "War", "Cease-fire", "Peace",
"Alliance", "Never met", "Team", "Gives shared vision", "Receives shared
vision", "Embassy from" and "Embassy to". In this patch the ranges "world" and
"player" are supported. The world range test if at least two currently living
players have the diplomatic relation. The player range test if the player has
the diplomatic relation with at least one other currently living player.

A local range (or something similar) that test the relationship between two
players is not included. It would require lager changes. A solution to corner
cases like a tile owned by player1 that has a unit belonging to player2 and
another unit belonging to player3 and evaluated for player0 would have to be
found. (Test for all? Test for one? Let each requirement vector decide what to
do?) Besides: A local range wouldn't be all that useful yet. (I hope to add
one in a later patch and use it to generalize the spy actions)

The player and world ranges are still useful. Opposition to standing armies in
peace time* can be simulated by making war a requirement for building military
improvements / extras. People that get happiness from the state of war** can
be simulated by a happiness effect. Extra trade when there is (world) peace is
also possible. An Intelligence Central could depend on the player having at
least one embassy to another player. Another example can be found in
broadcaster.patch. This adds a small wonder that give you more gold when you
are at war*** and make one citizen content when someone else is at war but you
have peace.

This is a request for comments. I need feed back on some issues. The first is
the names and other strings it adds. Any better suggestions than
"DiplRelation", "Gives shared vision", "Receives shared vision", "Embassy
from" and "Embassy to"? Could the strings I introduce be better? (I'm not a
native English speaker) The next is the code it self. A new enum for
asymmetric diplomatic relations that is "after" diplstate_type was added. As
the two enums may get a different value for invalid in the future the code is
paranoid and only use the asymmetric diplomatic relation enum's invalid. (This
is marked in the code) Is being that paranoid correct?

* Example: The Anti-Federalists (Anti Federalist papers, Brutus 10)
** Example: The Nazis viewed war as something good
*** Example: the people of the USA accepted extra war taxes and bought war
bounds during WWII



___

File Attachments:


---
Date: Tue 30 Jul 2013 06:43:22 PM GMT  Name: diplrel.patch  Size: 16kB   By:
sveinung


---
Date: Tue 30 Jul 2013 06:43:22 PM GMT  Name: broadcaster.patch  Size: 2kB  
By: sveinung



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev