#44216: Lua: missing destructors Open Date: 2022-03-27 22:11 Last Update: 2022-04-15 21:45 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/44216 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44216 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-04-15 21:45 Updated by: ihnatus Comment: Probably we can postpone removing method to 3.2. While it's fine to have a destructor for what is destroyable, removing players is not what we do too often. I think some campaign-like scenario may need things like this but actually even there it's not a 100% necessity comparing to other present problems. (Side note: what's there with reviving a player? A dead (is_alive == FALSE) player is revived in editor if you create a unit or a city of that nation, but doesn't a script create a zombie nation now?..) --------------------------------------------------------------------- Ticket Status: Reporter: ihnatus Owner: (None) Type: Feature Requests Status: Open Priority: 5 - Medium MileStone: S3_1 d3f Component: Scripting API Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: Since #42501 is going to be postponed to 3.2, I request separately a thing that should for better go to S3_1: ways to destroy/inactivate game objects. Player:lose(Player winner?, LuaValue loot?) - does mostly the same as killing a king, optionally gives loot (if not ruleset standard one, specified like in game.ruleset:civstyle.gameloss_style) to winner. Player:remove() - works as /remove command City:destroy() - destroys a city. Maybe needs some parameters like what to do with upkept units. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/44216 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=44216