Ticket #47827

Lua: Counter module

Eröffnet am: 2023-04-10 10:26 Letztes Update: 2023-10-15 00:20

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
6

Details

Add Counter module to Lua.

Methods needed internally (minimum API to not break, e.g., savegames):
- Counter:rule_name()
- Counter:name_translation()
- find.counter(name)
- find.counter(id)

Ticket-Verlauf (3/18 Historien)

2023-04-10 10:26 Aktualisiert von: cazfi
  • New Ticket "Lua: Counter module" created
2023-06-21 00:55 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Add Counter module to Lua. Methods needed internally (minimum API to not break, e.g., savegames):
- Counter:rule_name()
- Counter:name_translation()
- find.counter(name)
- find.counter(id)

0001-OSDN-47827-Implementation.patch(5KB)
Implementation - 1

0001-OSDN-47827-Test.patch(1KB)

Test in lua - 1

Sorry it took too long. I have many different things to do.

2023-06-23 01:33 Aktualisiert von: lachu
Kommentar

2023-06-23 01:32 Updated by: lachu

File 0001-OSDN-47827-TEST-2.patch (File ID: 12686) is attached

Sorry for previous mistake

2023-06-24 14:41 Aktualisiert von: cazfi
Kommentar

- Place "find" functions to api_game_find.[ch], name functionality to api_game_methods.[ch]
- Add function headers
- Add LUASCRIPT_CHECK_...() to each function
- Add space between comma and the second parameter type:

+  const char *api_counter_rule_name @ rule_name (lua_State *L,Counter *c);
+  const char *api_counter_name_translation @ name_translation (lua_State *L,Counter *c);

2023-08-25 03:25 Aktualisiert von: lachu
2023-08-25 03:26 Aktualisiert von: lachu
  • File 0001-Add-comments-Move-routines-Add-checks.patch (File ID: 13058) is deleted
2023-08-25 03:33 Aktualisiert von: lachu
Kommentar

Reply To cazfi

- Place "find" functions to api_game_find.[ch], name functionality to api_game_methods.[ch]
- Add function headers
- Add LUASCRIPT_CHECK_...() to each function
- Add space between comma and the second parameter type: {{{ + const char *api_counter_rule_name @ rule_name (lua_State *L,Counter *c); + const char *api_counter_name_translation @ name_translation (lua_State *L,Counter *c); }}}

0001-Add-comments-Move-routines-Add-checks.patch(8KB)
Implementation 2.1 - Fix typo
2023-08-25 03:34 Aktualisiert von: lachu
Kommentar
(This comment has been deleted)
2023-08-25 03:36 Aktualisiert von: lachu
Kommentar

It looks I must only add spaces between comma and parameter type in some places.

2023-10-04 07:00 Aktualisiert von: cazfi
Kommentar

Reply To lachu

Reply To cazfi

- Place "find" functions to api_game_find.[ch], name functionality to api_game_methods.[ch]

You're still adding a new file for name functionality instead of adding it to api_game_methods.

- Add space between comma and the second parameter type: {{{ + const char *api_counter_rule_name @ rule_name (lua_State *L,Counter *c); + const char *api_counter_name_translation @ name_translation (lua_State *L,Counter *c); }}}

Still missing

0001-Add-comments-Move-routines-Add-checks.patch(8KB) Implementation 2.1 - Fix typo

2023-10-10 17:03 Aktualisiert von: lachu
Kommentar

Reply To cazfi

Reply To lachu

Reply To cazfi

- Place "find" functions to api_game_find.[ch], name functionality to api_game_methods.[ch]

You're still adding a new file for name functionality instead of adding it to api_game_methods.

- Add space between comma and the second parameter type: {{{ + const char *api_counter_rule_name @ rule_name (lua_State *L,Counter *c); + const char *api_counter_name_translation @ name_translation (lua_State *L,Counter *c); }}}

Still missing

0001-Add-comments-Move-routines-Add-checks.patch(8KB) Implementation 2.1 - Fix typo

0001-Move-routines-renmae-routines-add-spaces.patch(5KB)
Move/renames routines and style changes

There is also patch for test.

2023-10-13 07:00 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
2023-10-15 00:20 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Dateianhangliste

Bearbeiten

Please login to add comment to this ticket » Anmelden