Project

General

Profile

Actions

Bug #1457

open

redundant Action methods

Added by Alexandr Ignatiev 6 months ago. Updated 7 days ago.

Status:
In Review
Priority:
Normal
Category:
Scripting API
Target version:
Start date:
05/26/2025
Due date:
% Done:

0%

Estimated time:

Description

api_find_action_by_name() and api_find_action() are unused duplicates of api_find_action_type_by_name() and api_find_action_type_by_id(). Actually, the first pair is older introduced in https://github.com/freeciv/freeciv/commit/0afafc7e5761d24e918e9e22934654cdb4d9d719 while the second somehow appeared in S3_1 with https://github.com/freeciv/freeciv/commit/f3a41d753ab5c8d9ef9d4b168395d933e7a184cd


Files


Related issues 1 (1 open0 closed)

Blocks Tasks #1751: S3_3-alpha2New11/22/2025

Actions
Actions #1

Updated by Marko Lindqvist 2 months ago

  • Target version changed from 3.1.6 to 3.3.0-d3f
Actions #2

Updated by Marko Lindqvist 7 days ago

Both pairs are used in the tolua_game.pkg as if overloading functions. Since their fingerprints are identical, user cannot really select one over another (nor even to really see that there's two copies). Not sure which pair lua ends using, though the comments hint that it uses first one (as listed) methods that matches, i.e., the api_find_action_by_name() / api_find_action(). But that doesn't really matter. We can still remove either, and the remaining pair will provide functionality identical to old one even if the removed pair was in use.

Actions #4

Updated by Marko Lindqvist 5 days ago

Actions

Also available in: Atom PDF