Rename [xyz]CategoryActionTimers to [xyz]GroupActionTimers in action timer API

develop
Tachytaenius 2022-12-01 23:24:04 +00:00
parent ae532e1452
commit 0836962007
4 changed files with 10 additions and 10 deletions

@ -1780,11 +1780,11 @@ static const LuaWrapper::FunctionReg dfhack_units_module[] = {
WRAPM(Units, getStressCategory), WRAPM(Units, getStressCategory),
WRAPM(Units, getStressCategoryRaw), WRAPM(Units, getStressCategoryRaw),
WRAPM(Units, subtractActionTimers), WRAPM(Units, subtractActionTimers),
WRAPM(Units, subtractCategoryActionTimers), WRAPM(Units, subtractGroupActionTimers),
WRAPM(Units, multiplyActionTimers), WRAPM(Units, multiplyActionTimers),
WRAPM(Units, multiplyCategoryActionTimers), WRAPM(Units, multiplyGroupActionTimers),
WRAPM(Units, setActionTimers), WRAPM(Units, setActionTimers),
WRAPM(Units, setCategoryActionTimers), WRAPM(Units, setGroupActionTimers),
{ NULL, NULL } { NULL, NULL }
}; };

@ -227,11 +227,11 @@ DFHACK_EXPORT int getStressCategory(df::unit *unit);
DFHACK_EXPORT int getStressCategoryRaw(int32_t stress_level); DFHACK_EXPORT int getStressCategoryRaw(int32_t stress_level);
DFHACK_EXPORT void subtractActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type affectedActionType); DFHACK_EXPORT void subtractActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type affectedActionType);
DFHACK_EXPORT void subtractCategoryActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type_group affectedActionTypeGroup); DFHACK_EXPORT void subtractGroupActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type_group affectedActionTypeGroup);
DFHACK_EXPORT void multiplyActionTimers(color_ostream &out, df::unit *unit, float amount, df::unit_action_type affectedActionType); DFHACK_EXPORT void multiplyActionTimers(color_ostream &out, df::unit *unit, float amount, df::unit_action_type affectedActionType);
DFHACK_EXPORT void multiplyCategoryActionTimers(color_ostream &out, df::unit *unit, float amount, df::unit_action_type_group affectedActionTypeGroup); DFHACK_EXPORT void multiplyGroupActionTimers(color_ostream &out, df::unit *unit, float amount, df::unit_action_type_group affectedActionTypeGroup);
DFHACK_EXPORT void setActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type affectedActionType); DFHACK_EXPORT void setActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type affectedActionType);
DFHACK_EXPORT void setCategoryActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type_group affectedActionTypeGroup); DFHACK_EXPORT void setGroupActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type_group affectedActionTypeGroup);
} }
} }

@ -2032,7 +2032,7 @@ void Units::subtractActionTimers(color_ostream &out, df::unit *unit, int32_t amo
} }
} }
void Units::subtractCategoryActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type_group affectedActionTypeGroup) void Units::subtractGroupActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type_group affectedActionTypeGroup)
{ {
CHECK_NULL_POINTER(unit); CHECK_NULL_POINTER(unit);
for (auto action : unit->actions) { for (auto action : unit->actions) {
@ -2065,7 +2065,7 @@ void Units::multiplyActionTimers(color_ostream &out, df::unit *unit, float amoun
} }
} }
void Units::multiplyCategoryActionTimers(color_ostream &out, df::unit *unit, float amount, df::unit_action_type_group affectedActionTypeGroup) void Units::multiplyGroupActionTimers(color_ostream &out, df::unit *unit, float amount, df::unit_action_type_group affectedActionTypeGroup)
{ {
CHECK_NULL_POINTER(unit); CHECK_NULL_POINTER(unit);
if (!validateMultiplyActionTimerAmount(out, amount)) if (!validateMultiplyActionTimerAmount(out, amount))
@ -2100,7 +2100,7 @@ void Units::setActionTimers(color_ostream &out, df::unit *unit, int32_t amount,
} }
} }
void Units::setCategoryActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type_group affectedActionTypeGroup) void Units::setGroupActionTimers(color_ostream &out, df::unit *unit, int32_t amount, df::unit_action_type_group affectedActionTypeGroup)
{ {
CHECK_NULL_POINTER(unit); CHECK_NULL_POINTER(unit);
if (!validateSetActionTimerAmount(out, amount)) if (!validateSetActionTimerAmount(out, amount))

@ -83,7 +83,7 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out )
if (enable_fastdwarf) if (enable_fastdwarf)
{ {
Units::setCategoryActionTimers(out, unit, 1, df::unit_action_type_group::All); Units::setGroupActionTimers(out, unit, 1, df::unit_action_type_group::All);
} }
} }
return CR_OK; return CR_OK;