[Freeciv-Dev] [bug #15594] Activate Partisans from Lua script

2010-03-13 Thread pepeto

Update of bug #15594 (project freeciv):

  Status:None => Duplicate  
 Open/Closed:Open => Closed 

___

Follow-up Comment #4:

Using patch #1519 instead.


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #15594] Activate Partisans from Lua script

2010-03-13 Thread pepeto

Follow-up Comment #3, bug #15594 (project freeciv):

> This series of 5 patches allows us to "activate" placements of
> partisans from a Lua script. The last patch includes a change to
> default.lua to do this.

The general way to get this is to create a metaticket in the patch thread:
https://gna.org/patch/?group=freeciv and make on item for every patch. This
not a bug...


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #15594] Activate Partisans from Lua script

2010-03-13 Thread Ulrik Sverdrup

Follow-up Comment #2, bug #15594 (project freeciv):

Export place_partisans to Scripting API. The exported function is more
general, and can inspire partisans around any tile for any player.

Remove make_partisans and activate partisans in default/default.lua.

New partisan activation code includes a message (E_CITY_LOST)  (previously
there was none), "The loss of %cityname has inspired partisans!"

(file #8491, file #8492)
___

Additional Item Attachment:

File name: 0004-Add-action-place_partisans-tile-owner-count-to-API.patch
Size:5 KB
File name: 0005-Activate-inspired-partisans-on-city-conquest-from-Lu.patch
Size:5 KB


___

Reply to this item at:

  

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #15594] Activate Partisans from Lua script

2010-03-13 Thread Ulrik Sverdrup

Follow-up Comment #1, bug #15594 (project freeciv):

Add an effects module to Scripting API.

Only export city_bonus, player_bonus and world_bonus right now. effect names
should be passed as strings (the ruleset names).

Add fields size and original (original owner) to City.

(file #8488, file #8489, file #8490)
___

Additional Item Attachment:

File name: 0001-Add-effects-module-with-get_city_bonus-as-city_bonus.patch
Size:4 KB
File name: 0003-Export-more-fields-of-City-to-the-Scripting-API.patch Size:0
KB
File name: 0002-Add-effect-module-world_bonus-and-player_bonus-to-AP.patch
Size:2 KB


___

Reply to this item at:

  

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #15594] Activate Partisans from Lua script

2010-03-13 Thread Ulrik Sverdrup

URL:
  

 Summary: Activate Partisans from Lua script
 Project: Freeciv
Submitted by: englabenny
Submitted on: lördag 2010-03-13 den 13:19
Category: None
Severity: 3 - Normal
Priority: 1 - Later
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

This series of 5 patches allows us to "activate" placements of partisans from
a Lua script. The last patch includes a change to default.lua to do this.

The exact partisan placement code in place_partisans is kept in C
implementation and this function is exported to the Scripting API with a
modified signature: place_partisans(tile, owner, count).

This change comes with a couple of caveats, the semantics change since we
move the partisan creation from a very specific time inside the process of a
city being taken over, to be carried out after that in the 'city_lost'
callback. Please help me understand if this can have any bad consequences.

Since the city is already lost we can't use get_city_bonus for the inspire
partisans effect, and with this change we will use get_player_bonus. This
makes no difference in the default ruleset but it ignores local effects.

The patches themselves have explanations, first come 4 patches to expand the
Scripting API.




___

Reply to this item at:

  

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


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