Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #695007

"building_lost" signal

Added by Jacob Nevins over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Scripting API
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This forum thread bemoans the lack of a way for Lua scripts to know when a building has been lost for some reason.

Will need some sort of reason code -- "player_sold", "sold_obsolete", "sold_no_money", "razed", "sabotaged" etc.


Related issues

Blocks Freeciv - Task #656466: S3_0 datafile format freeze (d3f)Closed2019-10-05

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocked by Freeciv - Feature #765940: building.name to lua APIRejected

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Jacob Nevins over 3 years ago

I've no immediate plans to work on this.

#2 Updated by Marko Lindqvist over 3 years ago

  • Sprint/Milestone set to 3.0.0

Since we know real life use-case and need to exist, we should try to get it handled in S3_0 already.

#3 Updated by Marko Lindqvist over 3 years ago

  • Blocks Task #656466: S3_0 datafile format freeze (d3f) added

#4 Updated by Alina L. over 3 years ago

For reasons such as "sabotaged", there could be a "destroyer" Player (or maybe Unit).

#5 Updated by Marko Lindqvist over 2 years ago

#6 Updated by Marko Lindqvist over 2 years ago

Here's a patch, but it's useless without Feature #765940

#7 Updated by Marko Lindqvist over 2 years ago

  • Status changed from In Progress to Resolved

#8 Updated by Marko Lindqvist over 2 years ago

  • Status changed from Resolved to In Progress

Current patch emits signal on building_lost() only. Server has number of direct calls to city_remove_improvement() that are not handled.

#9 Updated by Marko Lindqvist over 2 years ago

- Handle all cases where building is lost, except if it happens via editor
- Fix some crashes if the lua script removes the city building was in

#10 Updated by Marko Lindqvist over 2 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF