Codefix: broken links and syntax issues in script API documentation

This commit is contained in:
frosch
2024-03-24 19:00:06 +01:00
committed by Peter Nelson
parent 64e1f1d4d9
commit e436e2ef40
12 changed files with 54 additions and 34 deletions

View File

@@ -25,20 +25,23 @@ public:
/**
* Apply a filter when building the list.
* @param filter_function The function which will be doing the filtering.
* @param params The params to give to the filters (minus the first param,
* @param ... The params to give to the filters (minus the first param,
* which is always the index-value).
* @note You can write your own filters and use them. Just remember that
* the first parameter should be the index-value, and it should return
* a bool.
* @note Example:
* ScriptTownList(ScriptTown.IsActionAvailable, ScriptTown.TOWN_ACTION_BRIBE);
* @code
* local bribeable_towns = ScriptTownList(ScriptTown.IsActionAvailable, ScriptTown.TOWN_ACTION_BRIBE);
*
* function MinPopulation(town_id, pop)
* {
* return ScriptTown.GetPopulation(town_id) >= pop;
* }
* ScriptTownList(MinPopulation, 1000);
* local proper_towns = ScriptTownList(MinPopulation, 1000);
* @endcode
*/
ScriptTownList(void *filter_function, int params, ...);
ScriptTownList(function filter_function, ...);
#else
ScriptTownList(HSQUIRRELVM vm);
#endif /* DOXYGEN_API */