diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index b9b5466018..35612480df 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -20,7 +20,7 @@ * None * * Example: - * No + * None * * Public: No */ diff --git a/addons/captives/functions/fnc_handlePlayerChanged.sqf b/addons/captives/functions/fnc_handlePlayerChanged.sqf index 1e4c729c0e..bafe93bef9 100644 --- a/addons/captives/functions/fnc_handlePlayerChanged.sqf +++ b/addons/captives/functions/fnc_handlePlayerChanged.sqf @@ -11,7 +11,7 @@ * The return value * * Example: - * [bob1, bob2] call ACE_captives_fnc_handlePlayerChange + * [bob1, bob2] call ACE_captives_fnc_handlePlayerChanged * * Public: No */ diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index a7c78dcc65..5bc757e295 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -10,6 +10,7 @@ * None * * Example: + * [] call ace_dagr_fnc_menuInit * * Public: No */ diff --git a/addons/explosives/functions/fnc_dialingPhone.sqf b/addons/explosives/functions/fnc_dialingPhone.sqf index 1ac0679959..40b7bb21c5 100644 --- a/addons/explosives/functions/fnc_dialingPhone.sqf +++ b/addons/explosives/functions/fnc_dialingPhone.sqf @@ -13,7 +13,7 @@ * None * * Example: - * [FUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler); + * [ace_explosives_fnc_dialingPhone, 0.25, [_unit,4,_arr,_code]] call CBA_fnc_addPerFrameHandler; * * Public: No */ diff --git a/addons/field_rations/functions/fnc_canDrinkFromSource.sqf b/addons/field_rations/functions/fnc_canDrinkFromSource.sqf index 78b08fb231..c970214aeb 100644 --- a/addons/field_rations/functions/fnc_canDrinkFromSource.sqf +++ b/addons/field_rations/functions/fnc_canDrinkFromSource.sqf @@ -11,7 +11,7 @@ * Can Drink From Source * * Example: - * [_player, _source] call ace_field_rations_canDrinkFromSource + * [_player, _source] call ace_field_rations_fnc_canDrinkFromSource * * Public: No */ diff --git a/addons/field_rations/functions/fnc_drinkFromSource.sqf b/addons/field_rations/functions/fnc_drinkFromSource.sqf index 3d76d4ff62..cf0d18018b 100644 --- a/addons/field_rations/functions/fnc_drinkFromSource.sqf +++ b/addons/field_rations/functions/fnc_drinkFromSource.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [_player, _source] call ace_field_rations_drinkFromSource + * [_player, _source] call ace_field_rations_fnc_drinkFromSource * * Public: No */ diff --git a/addons/field_rations/functions/fnc_getDrinkAnimation.sqf b/addons/field_rations/functions/fnc_getDrinkAnimation.sqf index 2b4ce41bd3..3d577ef7f9 100644 --- a/addons/field_rations/functions/fnc_getDrinkAnimation.sqf +++ b/addons/field_rations/functions/fnc_getDrinkAnimation.sqf @@ -11,7 +11,7 @@ * Animation * * Example: - * [_player, _source] call ace_field_rations_getDrinkAnimation + * [_player, _source] call ace_field_rations_fnc_getDrinkAnimation * * Public: No */ diff --git a/addons/field_rations/functions/fnc_scanFieldRations.sqf b/addons/field_rations/functions/fnc_scanFieldRations.sqf index f252071df4..c5f45d4d4c 100644 --- a/addons/field_rations/functions/fnc_scanFieldRations.sqf +++ b/addons/field_rations/functions/fnc_scanFieldRations.sqf @@ -10,7 +10,7 @@ * None * * Example: - * call acex_field_rations_fnc_scanFieldRations + * call ace_field_rations_fnc_scanFieldRations * * Public: No */ diff --git a/addons/fire/functions/fnc_fireManagerPFH.sqf b/addons/fire/functions/fnc_fireManagerPFH.sqf index 29de18d28c..fa8e7fb789 100644 --- a/addons/fire/functions/fnc_fireManagerPFH.sqf +++ b/addons/fire/functions/fnc_fireManagerPFH.sqf @@ -12,7 +12,7 @@ * None * * Example: - * [FUNC(fireManagerPFH), 0.25, [_unit]] call CBA_fnc_addPerFrameHandler + * [ace_fire_fnc_fireManagerPFH, 0.25, [_unit]] call CBA_fnc_addPerFrameHandler * * Public: No */ diff --git a/addons/frag/functions/fnc_dev_addTrack.sqf b/addons/frag/functions/fnc_dev_addTrack.sqf index db32be0d5f..0e75a9fb99 100644 --- a/addons/frag/functions/fnc_dev_addTrack.sqf +++ b/addons/frag/functions/fnc_dev_addTrack.sqf @@ -10,7 +10,7 @@ * None * * Example: - * call ace_frag_fnc_addTack + * call ace_frag_fnc_dev_addTrack * * Public: No */ diff --git a/addons/frag/functions/fnc_dev_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf index 42a4aa6314..ec52b4b39f 100644 --- a/addons/frag/functions/fnc_dev_debugAmmo.sqf +++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf @@ -11,7 +11,7 @@ * None * * Example: - * call ace_frag_fnc_debugAmmo + * call ace_frag_fnc_dev_debugAmmo * * Public: No */ diff --git a/addons/frag/functions/fnc_dev_drawTraces.sqf b/addons/frag/functions/fnc_dev_drawTraces.sqf index b05f8c2c9d..7fcca3c48f 100644 --- a/addons/frag/functions/fnc_dev_drawTraces.sqf +++ b/addons/frag/functions/fnc_dev_drawTraces.sqf @@ -10,7 +10,7 @@ * None * * Example: - * call ace_frag_fnc_drawTraces + * call ace_frag_fnc_dev_drawTraces * * Public: No */ diff --git a/addons/frag/functions/fnc_dev_stopTracing.sqf b/addons/frag/functions/fnc_dev_stopTracing.sqf index f9b29ab8a8..949d3cd55d 100644 --- a/addons/frag/functions/fnc_dev_stopTracing.sqf +++ b/addons/frag/functions/fnc_dev_stopTracing.sqf @@ -10,6 +10,7 @@ * None * * Example: + * None * * Public: No */ diff --git a/addons/gunbag/functions/fnc_swapGunbagCallback.sqf b/addons/gunbag/functions/fnc_swapGunbagCallback.sqf index fb5009577e..a7d319506b 100644 --- a/addons/gunbag/functions/fnc_swapGunbagCallback.sqf +++ b/addons/gunbag/functions/fnc_swapGunbagCallback.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [player, target] call ace_gunbag_fnc_swapGunbag + * [player, target] call ace_gunbag_fnc_swapGunbagCallback * * Public: No */ diff --git a/addons/interact_menu/functions/fnc_setupTextColors.sqf b/addons/interact_menu/functions/fnc_setupTextColors.sqf index 011c7d45ef..ff2107587f 100644 --- a/addons/interact_menu/functions/fnc_setupTextColors.sqf +++ b/addons/interact_menu/functions/fnc_setupTextColors.sqf @@ -10,7 +10,7 @@ * None * * Example: - * call ACE_interact_menu_fnc_setupTextColor + * call ace_interact_menu_fnc_setupTextColors * * Public: No */ diff --git a/addons/interaction/functions/fnc_doRemoteControl.sqf b/addons/interaction/functions/fnc_doRemoteControl.sqf index 125a1b5e89..a2ec19b180 100644 --- a/addons/interaction/functions/fnc_doRemoteControl.sqf +++ b/addons/interaction/functions/fnc_doRemoteControl.sqf @@ -9,7 +9,7 @@ * None * * Example: - * call ace_interaction_fnc_onRemoteControl + * call ace_interaction_fnc_doRemoteControl * * Public: No */ diff --git a/addons/kestrel4500/functions/fnc_updateDisplay.sqf b/addons/kestrel4500/functions/fnc_updateDisplay.sqf index 1f55d8c400..41acd52f94 100644 --- a/addons/kestrel4500/functions/fnc_updateDisplay.sqf +++ b/addons/kestrel4500/functions/fnc_updateDisplay.sqf @@ -10,6 +10,7 @@ * None * * Example: + * None * * Public: No */ diff --git a/addons/kestrel4500/functions/fnc_updateImpellerState.sqf b/addons/kestrel4500/functions/fnc_updateImpellerState.sqf index 36ffcd6599..b6e8191299 100644 --- a/addons/kestrel4500/functions/fnc_updateImpellerState.sqf +++ b/addons/kestrel4500/functions/fnc_updateImpellerState.sqf @@ -10,6 +10,7 @@ * None * * Example: + * call ace_kestrel4500_fnc_updateImpellerState * * Public: No */ diff --git a/addons/vehicle_damage/functions/fnc_addDamage.sqf b/addons/vehicle_damage/functions/fnc_addDamage.sqf index 83081309a2..75d72da340 100644 --- a/addons/vehicle_damage/functions/fnc_addDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_addDamage.sqf @@ -14,7 +14,7 @@ * None * * Example: - * [vehicle player, 234, "HitHull"] call ace_vehicle_damage_fnc_knockOut + * [vehicle player, 234, "HitHull"] call ace_vehicle_damage_fnc_addDamage * * Public: No */ diff --git a/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf b/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf index 7655a0f628..fdf6f9c6d3 100644 --- a/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf +++ b/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf @@ -11,7 +11,7 @@ * None * * Example: - * _this call ace_cookoff_fnc_handleDamageEjectIfDestroyed + * _this call ace_vehicle_damage_fnc_handleDamageEjectIfDestroyed * * Public: No */ diff --git a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf index 92d8d03ff4..01f098efb0 100644 --- a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf @@ -18,7 +18,7 @@ * Whether or not to continue handling last frame's damage * * Example: - * [ace_vehicle_damage_fnc_handleTankDamage, tank1, "Hit_Engine", 12]] call CBA_fnc_execNextFrame + * [ace_vehicle_damage_fnc_handleVehicleDamage, tank1, "Hit_Engine", 12]] call CBA_fnc_execNextFrame * * Public: No */ diff --git a/addons/vehiclelock/functions/fnc_moduleInit.sqf b/addons/vehiclelock/functions/fnc_moduleInit.sqf index 6a3448e89c..4f6fdf118c 100644 --- a/addons/vehiclelock/functions/fnc_moduleInit.sqf +++ b/addons/vehiclelock/functions/fnc_moduleInit.sqf @@ -12,7 +12,7 @@ * None * * Example: - * [fromModule] call ACE_VehicleLock_fnc_hasKeyForVehicle; + * [fromModule] call ace_vehiclelock_fnc_moduleInit; * * Public: No */ diff --git a/docs/tools/document_functions.py b/docs/tools/document_functions.py index 84f676deea..c3286cf6ef 100644 --- a/docs/tools/document_functions.py +++ b/docs/tools/document_functions.py @@ -111,7 +111,7 @@ class FunctionFile: # Process example if example_raw: - self.example = example_raw.strip() + self.example = self.process_example(example_raw) return self.errors @@ -221,6 +221,19 @@ class FunctionFile: return [return_name, return_types] + def process_example(self, raw): + return_value = raw.strip() + if return_value == "None": + return return_value + + path_match = re.match(r".*addons.(.*).functions.(.*).sqf", self.path) + expected_func = f"ace_{path_match.group(1)}_{path_match.group(2)}" + if (not expected_func.lower() in return_value.lower()) and ((not return_value.startswith("Handled by")) and (not return_value.startswith("Called By"))): + self.feedback(f"Malformed example {return_value} should contain func {expected_func}", 2) + + return return_value + + def document(self, component): str_list = []