Adds a method to call for every taskTypeData that gets registered.
Adds a method to call for every taskTypeData that gets registered.
1 string taskID
the ID of the task to check for when registering a new task type.
2 function method
the method to call.
-- call the following method every time a taskTypeData is registered with "engine_task" as its taskID variable value local function standardQualityMultiplierApply(data) data.standardQualityMultiplier = data.standardQualityMultiplier or taskTypes.DEFAULT_QUALITY_FOR_STANDARD_MULTIPLIER -- we multiply all the desired quality to gain from this task by this much (default to 1) if data.optionalForStandard == nil then data.optionalForStandard = taskTypes.DEFAULT_OPTIONAL_FOR_STANDARD end if data.implementation then taskTypes.implementationLink[data.implementation] = data end if data.taskID == "engine_task" then data.ENGINE_TASK = true end end taskTypes:addTaskTypeRegisterCallback("engine_task", standardQualityMultiplierApply)