mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
04e41a4d5a
* add variable full repair time * enable compile cache * Fix stupid * whoops * incremental full repair * cleanup function header * ignore hitpoints inFullRepairProgress * fix getHitPointsToIgnore * final cleanup * don't show repair hint while doing full repair * make this all work * fix stupid put this back in place * Add setting for speedup when near repair facility/vehicle enable compile cache * refactor near repair facility/vehicle checks * remove skipping hint from do_repair better for feedback this way * git diff stuff * use functions directly in ACE_Repair.hpp * add check for vehicle proximity * add a new line * switch to multiply by setting instead * speed boost settings, remove exit addRepairActions * stringtable * remove speed boost settings * fix things, add forceDisplayName * name in function header * fix TRACE * add animation looping * remove systemChat Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com> * add time coefficient setting * move to repair category * time coefficient max and default values --------- Co-authored-by: Salluci <69561145+Salluci@users.noreply.github.com> Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
98 lines
4.1 KiB
C++
98 lines
4.1 KiB
C++
class ACE_Repair {
|
|
class Actions {
|
|
class ReplaceWheel {
|
|
displayName = CSTRING(ReplaceWheel);
|
|
displayNameProgress = CSTRING(ReplacingWheel);
|
|
forceDisplayName = 0;
|
|
|
|
repairLocations[] = {"All"};
|
|
requiredEngineer = QGVAR(engineerSetting_Wheel);
|
|
repairingTime = QGVAR(wheelChangeTime);
|
|
repairingTimeSelfCoef = 1;
|
|
items = QGVAR(wheelRepairRequiredItems);
|
|
condition = QFUNC(canReplaceWheel);
|
|
itemConsumed = 0;
|
|
claimObjects[] = {{"ACE_Wheel"}};
|
|
|
|
callbackSuccess = QFUNC(doReplaceWheel);
|
|
callbackFailure = "";
|
|
callbackProgress = "";
|
|
|
|
animationCaller = "Acts_carFixingWheel";
|
|
animationCallerProne = "Acts_carFixingWheel";
|
|
animationCallerSelf = "Acts_carFixingWheel";
|
|
animationCallerSelfProne = "Acts_carFixingWheel";
|
|
loopAnimation = 0;
|
|
litter[] = {};
|
|
};
|
|
class RemoveWheel: ReplaceWheel {
|
|
displayName = CSTRING(RemoveWheel);
|
|
displayNameProgress = CSTRING(RemovingWheel);
|
|
condition = QFUNC(canRemove);
|
|
callbackSuccess = QFUNC(doRemoveWheel);
|
|
claimObjects[] = {};
|
|
};
|
|
class PatchWheel: ReplaceWheel {
|
|
displayName = CSTRING(PatchWheel);
|
|
displayNameProgress = CSTRING(PatchingWheel);
|
|
condition = QFUNC(canPatchWheel);
|
|
repairingTime = QFUNC(getPatchWheelTime);
|
|
callbackProgress = QFUNC(doPatchWheelProgress);
|
|
items = QGVAR(patchWheelRequiredItems);
|
|
requiredEngineer = QGVAR(engineerSetting_Wheel);
|
|
callbackSuccess = "";
|
|
claimObjects[] = {};
|
|
};
|
|
class MiscRepair: ReplaceWheel {
|
|
displayName = CSTRING(Repairing); // let's make empty string an auto generated string
|
|
displayNameProgress = CSTRING(RepairingHitPoint);
|
|
condition = QFUNC(canMiscRepair);
|
|
requiredEngineer = QGVAR(engineerSetting_Repair);
|
|
repairingTime = QGVAR(miscRepairTime);
|
|
callbackSuccess = QFUNC(doRepair);
|
|
items = QGVAR(miscRepairRequiredItems);
|
|
itemConsumed = QGVAR(consumeItem_ToolKit);
|
|
claimObjects[] = {};
|
|
};
|
|
class RepairTrack: MiscRepair {
|
|
displayName = CSTRING(Repairing);
|
|
displayNameProgress = CSTRING(RepairingHitPoint);
|
|
condition = QFUNC(canRepairTrack);
|
|
callbackSuccess = QFUNC(doRepairTrack);
|
|
requiredEngineer = QGVAR(engineerSetting_Wheel);
|
|
claimObjects[] = {{"ACE_Track"}};
|
|
itemConsumed = 0;
|
|
};
|
|
class RemoveTrack: MiscRepair {
|
|
displayName = CSTRING(RemoveTrack);
|
|
displayNameProgress = CSTRING(RemovingTrack);
|
|
condition = QFUNC(canRemove);
|
|
callbackSuccess = QFUNC(doRemoveTrack);
|
|
requiredEngineer = QGVAR(engineerSetting_Wheel);
|
|
itemConsumed = 0;
|
|
};
|
|
class ReplaceTrack: RemoveTrack {
|
|
displayName = CSTRING(ReplaceTrack);
|
|
displayNameProgress = CSTRING(ReplacingTrack);
|
|
condition = QFUNC(canReplaceTrack);
|
|
callbackSuccess = QFUNC(doReplaceTrack);
|
|
requiredEngineer = QGVAR(engineerSetting_Wheel);
|
|
claimObjects[] = {{"ACE_Track"}};
|
|
};
|
|
class FullRepair: MiscRepair {
|
|
displayName = CSTRING(fullRepair);
|
|
displayNameProgress = CSTRING(fullyRepairing);
|
|
forceDisplayName = 1;
|
|
loopAnimation = 1;
|
|
requiredEngineer = QGVAR(engineerSetting_fullRepair);
|
|
repairLocations[] = {QGVAR(fullRepairLocation)};
|
|
repairingTime = QFUNC(getFullRepairTime);
|
|
condition = "((getAllHitPointsDamage _target) select 2) findIf {_x > 0} != -1";
|
|
callbackSuccess = QFUNC(doFullRepair);
|
|
callbackProgress = QFUNC(fullRepairProgress);
|
|
items = QGVAR(fullRepairRequiredItems);
|
|
itemConsumed = QGVAR(consumeItem_ToolKit);
|
|
};
|
|
};
|
|
};
|