Incidencia #47827

Lua: Counter module

Abrir Fecha: 2023-04-10 10:26 Última actualización: 2023-10-15 00:20

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Fixed
Fichero:
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 History (3/18 Histories)

2023-04-10 10:26 Updated by: cazfi
  • New Ticket "Lua: Counter module" created
2023-06-21 00:55 Updated by: lachu
Comentario

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 Updated by: lachu
Comentario

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 Updated by: cazfi
Comentario

- 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 Updated by: lachu
2023-08-25 03:26 Updated by: lachu
  • File 0001-Add-comments-Move-routines-Add-checks.patch (File ID: 13058) is deleted
2023-08-25 03:33 Updated by: lachu
Comentario

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 Updated by: lachu
Comentario
(This comment has been deleted)
2023-08-25 03:36 Updated by: lachu
Comentario

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

2023-10-04 07:00 Updated by: cazfi
Comentario

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 Updated by: lachu
Comentario

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 Updated by: cazfi
  • Propietario Update from (Ninguno) to cazfi
  • Resolución Update from Ninguno to Accepted
2023-10-15 00:20 Updated by: cazfi
  • Estado Update from Open to Cerrado
  • Resolución Update from Accepted to Fixed

Attachment File List

Editar

Please login to add comment to this ticket » Entrar