ACE3/addons/repair/ACE_Repair.hpp
PabstMirror 4e93b9c72d 2307 - Repair sub-turrets
Privates

Cleanup debug

Add repair actions for sub turrets

Cleanup

Fix Header

Error Handling

Cleanup setHitpointDamage

Fix common ACE_isEngineer to handle scalar or bool

Claim and release repair objects (wheel/track)

Repair sub-turrets
2015-11-20 21:11:05 -06:00

77 lines
3.2 KiB
C++

class ACE_Repair {
class Actions {
class ReplaceWheel {
displayName = CSTRING(ReplaceWheel);
displayNameProgress = CSTRING(ReplacingWheel);
repairLocations[] = {"All"};
requiredEngineer = QGVAR(engineerSetting_Wheel);
repairingTime = 10;
repairingTimeSelfCoef = 1;
items = QGVAR(wheelRepairRequiredItems);
condition = QUOTE(call FUNC(canReplaceWheel));
itemConsumed = 0;
claimObjects[] = {{"ACE_Wheel"}};
callbackSuccess = QUOTE(call FUNC(doReplaceWheel));
callbackFailure = "";
callbackProgress = "";
animationCaller = "Acts_carFixingWheel";
animationCallerProne = "Acts_carFixingWheel";
animationCallerSelf = "Acts_carFixingWheel";
animationCallerSelfProne = "Acts_carFixingWheel";
litter[] = {};
};
class RemoveWheel: ReplaceWheel {
displayName = CSTRING(RemoveWheel);
displayNameProgress = CSTRING(RemovingWheel);
condition = QUOTE(call FUNC(canRemove));
callbackSuccess = QUOTE(call FUNC(doRemoveWheel));
claimObjects[] = {};
};
class MiscRepair: ReplaceWheel {
displayName = CSTRING(Repairing); // let's make empty string an auto generated string
displayNameProgress = CSTRING(RepairingHitPoint);
condition = QUOTE(call FUNC(canMiscRepair));
requiredEngineer = 0;
repairingTime = 15;
callbackSuccess = QUOTE(call FUNC(doRepair));
items[] = {"ToolKit"};
claimObjects[] = {};
};
class RepairTrack: MiscRepair {
displayName = CSTRING(Repairing);
displayNameProgress = CSTRING(RepairingHitPoint);
condition = QUOTE(call FUNC(canRepairTrack));
callbackSuccess = QUOTE(call FUNC(doRepairTrack));
requiredEngineer = QGVAR(engineerSetting_Wheel);
claimObjects[] = {{"ACE_Track"}};
};
class RemoveTrack: MiscRepair {
displayName = CSTRING(RemoveTrack);
displayNameProgress = CSTRING(RemovingTrack);
condition = QUOTE(call FUNC(canRemove));
callbackSuccess = QUOTE(call FUNC(doRemoveTrack));
requiredEngineer = QGVAR(engineerSetting_Wheel);
};
class ReplaceTrack: RemoveTrack {
displayName = CSTRING(ReplaceTrack);
displayNameProgress = CSTRING(ReplacingTrack);
condition = QUOTE(call FUNC(canReplaceTrack));
callbackSuccess = QUOTE(call FUNC(doReplaceTrack));
requiredEngineer = QGVAR(engineerSetting_Wheel);
claimObjects[] = {{"ACE_Track"}};
};
class FullRepair: MiscRepair {
displayName = CSTRING(fullRepair);
displayNameProgress = CSTRING(fullyRepairing);
requiredEngineer = QGVAR(engineerSetting_fullRepair);
repairLocations[] = {QGVAR(fullRepairLocation)};
repairingTime = 30;
condition = "damage _target > 0";
callbackSuccess = QUOTE(call FUNC(doFullRepair));
};
};
};