Let's switch back to the OG name

This commit is contained in:
Pao
2023-03-04 00:35:21 +01:00
parent f55fe877f7
commit cf0c93fb4b
89 changed files with 651 additions and 651 deletions

View File

@@ -1,17 +1,17 @@
------------------------------------------
------------- JUST CUT IT OUT ------------
-------------- THE ONLY CURE -------------
------------------------------------------
require "TimedActions/ISBaseTimedAction"
JCIO_CutLimbAction = ISBaseTimedAction:derive("JCIO_CutLimbAction")
TOC_CutLimbAction = ISBaseTimedAction:derive("TOC_CutLimbAction")
function JCIO_CutLimbAction:isValid()
function TOC_CutLimbAction:isValid()
return self.patientX == self.patient:getX() and self.patientY == self.patient:getY()
end
function JCIO_CutLimbAction:waitToStart()
function TOC_CutLimbAction:waitToStart()
if self.patient == self.surgeon then
return false
end
@@ -19,7 +19,7 @@ function JCIO_CutLimbAction:waitToStart()
return self.surgeon:shouldBeTurning()
end
function JCIO_CutLimbAction:update()
function TOC_CutLimbAction:update()
if self.patient ~= self.surgeon then
self.surgeon:faceThisObject(self.patient)
end
@@ -29,7 +29,7 @@ function JCIO_CutLimbAction:update()
self.soundTime = getTimestamp()
if not self.character:getEmitter():isPlaying(self.sawSound) then
--print("JCIO: Running sound again")
--print("TOC: Running sound again")
self.sawSound = self.character:getEmitter():playSound("Amputation_Sound")
addSound(self.surgeon, self.surgeon:getX(), self.surgeon:getY(), self.surgeon:getZ(), 3, 3)
end
@@ -38,7 +38,7 @@ function JCIO_CutLimbAction:update()
end
function JCIO_CutLimbAction:stop()
function TOC_CutLimbAction:stop()
--print("Stopping ISCutLimb")
@@ -57,11 +57,11 @@ end
function JCIO_CutLimbAction:start()
function TOC_CutLimbAction:start()
-- TODO Add a check so you can't cut your arm if you don't have hands or if you only have one arm and want to cut that same arm.
self:setActionAnim("SawLog")
local sawItem = JCIO_Common.GetSawInInventory(self.surgeon)
local sawItem = TOC_Common.GetSawInInventory(self.surgeon)
self.soundTime = 0
self.worldSoundTime = 0
@@ -81,9 +81,9 @@ function JCIO_CutLimbAction:start()
end
if self.patient == self.surgeon then
JCIO.DamagePlayerDuringAmputation(self.patient, self.partName)
TOC.DamagePlayerDuringAmputation(self.patient, self.partName)
else
sendClientCommand(self.surgeon, "JCIO", "AskDamageOtherPlayer", {self.patient:getOnlineID(), self.partName})
sendClientCommand(self.surgeon, "TOC", "AskDamageOtherPlayer", {self.patient:getOnlineID(), self.partName})
end
@@ -92,7 +92,7 @@ function JCIO_CutLimbAction:start()
end
function JCIO_CutLimbAction:findArgs()
function TOC_CutLimbAction:findArgs()
local surgeonFactor = self.surgeon:getPerkLevel(Perks.Doctor)
if self.surgeon:getDescriptor():getProfession() == "surgeon" then surgeonFactor = surgeonFactor + 15 end
if self.surgeon:getDescriptor():getProfession() == "doctor" then surgeonFactor = surgeonFactor + 9 end
@@ -139,14 +139,14 @@ function JCIO_CutLimbAction:findArgs()
return surgeonFactor, bandageTable, painkiller_table
end
function JCIO_CutLimbAction:perform()
function TOC_CutLimbAction:perform()
local surgeonFactor, bandageTable, painkillerTable = self:findArgs()
if self.patient ~= self.surgeon and isClient() then
SendCutLimb(self.patient, self.partName, surgeonFactor, bandageTable, painkillerTable)
sendClientCommand(self.surgeon, "JCIO", "AskStopAmputationSound", {surgeonID = self.surgeon:getOnlineID()})
sendClientCommand(self.surgeon, "TOC", "AskStopAmputationSound", {surgeonID = self.surgeon:getOnlineID()})
else
JCIO.CutLimb(self.partName, surgeonFactor, bandageTable, painkillerTable)
TOC.CutLimb(self.partName, surgeonFactor, bandageTable, painkillerTable)
end
self.surgeon:getEmitter():stopSoundByName("Amputation_Sound")
@@ -155,7 +155,7 @@ function JCIO_CutLimbAction:perform()
end
function JCIO_CutLimbAction:new(patient, surgeon, partName)
function TOC_CutLimbAction:new(patient, surgeon, partName)
-- TODO align surgeon, patient not patient, surgeon

View File

@@ -1,19 +1,19 @@
require "TimedActions/ISBaseTimedAction"
JCIO_InstallProsthesisAction = ISBaseTimedAction:derive("JCIO_InstallProsthesisAction")
TOC_InstallProsthesisAction = ISBaseTimedAction:derive("TOC_InstallProsthesisAction")
function JCIO_InstallProsthesisAction:isValid()
function TOC_InstallProsthesisAction:isValid()
-- TODO add here conditions if the action can be performed or not, so if thing is in inventory
-- TODO 'not sure about multiplayer, maybe an overriding check?
return true
end
function JCIO_InstallProsthesisAction:update()
function TOC_InstallProsthesisAction:update()
self.item:setJobDelta(self:getJobDelta())
end
function JCIO_InstallProsthesisAction:start()
function TOC_InstallProsthesisAction:start()
self.item:setJobType("Install prosthesis")
self.item:setJobDelta(0.0)
@@ -22,12 +22,12 @@ function JCIO_InstallProsthesisAction:start()
end
function JCIO_InstallProsthesisAction:stop()
function TOC_InstallProsthesisAction:stop()
ISBaseTimedAction.stop(self)
self.item:setJobDelta(0.0)
end
function JCIO_InstallProsthesisAction:perform()
function TOC_InstallProsthesisAction:perform()
local prosthesisBaseName = self.item:getType()
@@ -35,7 +35,7 @@ function JCIO_InstallProsthesisAction:perform()
-- local toc_data = self.character:getModData().TOC
--local partName = TocGetPartNameFromBodyPartType(self.bodyPart:getType())
local bodyPartType = JCIO_Common.GetBodyPartFromPartName(self.partName)
local bodyPartType = TOC_Common.GetBodyPartFromPartName(self.partName)
-- Check if can be performed. This shouldn't be necessary, but just to be sure
if bodyPartType == BodyPartType.UpperArm_L or bodyPartType == BodyPartType.UpperArm_R then
@@ -49,7 +49,7 @@ function JCIO_InstallProsthesisAction:perform()
SendEquipProsthesis(self.patient, self.partName, self.item, prosthesisBaseName)
else
JCIO.EquipProsthesis(self.partName, self.item, prosthesisBaseName)
TOC.EquipProsthesis(self.partName, self.item, prosthesisBaseName)
end
@@ -60,7 +60,7 @@ function JCIO_InstallProsthesisAction:perform()
ISBaseTimedAction.perform(self)
end
function JCIO_InstallProsthesisAction:new(surgeon, patient, item, partName)
function TOC_InstallProsthesisAction:new(surgeon, patient, item, partName)
local o = ISBaseTimedAction.new(self, patient)

View File

@@ -1,12 +1,12 @@
require "TimedActions/ISBaseTimedAction"
JCIO_OperateLimbAction = ISBaseTimedAction:derive("JCIO_OperateLimbAction")
TOC_OperateLimbAction = ISBaseTimedAction:derive("TOC_OperateLimbAction")
function JCIO_OperateLimbAction:isValid()
function TOC_OperateLimbAction:isValid()
return self.patientX == self.patient:getX() and self.patientY == self.patient:getY()
end
function JCIO_OperateLimbAction:waitToStart()
function TOC_OperateLimbAction:waitToStart()
if self.patient == self.surgeon then
return false
end
@@ -14,13 +14,13 @@ function JCIO_OperateLimbAction:waitToStart()
return self.surgeon:shouldBeTurning()
end
function JCIO_OperateLimbAction:update()
function TOC_OperateLimbAction:update()
if self.patient ~= self.surgeon then
self.surgeon:faceThisObject(self.patient)
end
end
function JCIO_OperateLimbAction:start()
function TOC_OperateLimbAction:start()
self:setActionAnim("MedicalCheck")
if self.useOven then
self.sound = self.patient:getEmitter():playSound("Burn_sound")
@@ -28,7 +28,7 @@ function JCIO_OperateLimbAction:start()
end
end
function JCIO_OperateLimbAction:findArgs()
function TOC_OperateLimbAction:findArgs()
local surgeonFactor = self.surgeon:getPerkLevel(Perks.Doctor)
if self.useOven then
@@ -53,13 +53,13 @@ function JCIO_OperateLimbAction:findArgs()
return surgeonFactor, self.useOven;
end
function JCIO_OperateLimbAction:perform()
function TOC_OperateLimbAction:perform()
local surgeonFactor, useOven = self:findArgs()
if self.patient ~= self.surgeon and isClient() then
SendOperateLimb(self.patient, self.partName, surgeonFactor, useOven)
else
JCIO.OperateLimb(self.partName, surgeonFactor, useOven)
TOC.OperateLimb(self.partName, surgeonFactor, useOven)
end
self.surgeon:getXp():AddXP(Perks.Doctor, 400)
@@ -70,7 +70,7 @@ function JCIO_OperateLimbAction:perform()
ISBaseTimedAction.perform(self)
end
function JCIO_OperateLimbAction:new(patient, surgeon, kit, partName, useOven)
function TOC_OperateLimbAction:new(patient, surgeon, kit, partName, useOven)
local o = ISBaseTimedAction.new(self, patient)
o.partName = partName
o.patient = patient

View File

@@ -1,8 +1,8 @@
require "TimedActions/ISBaseTimedAction"
JCIO_UninstallProsthesisAction = ISBaseTimedAction:derive("JCIO_UninstallProsthesisAction")
TOC_UninstallProsthesisAction = ISBaseTimedAction:derive("TOC_UninstallProsthesisAction")
function JCIO_UninstallProsthesisAction:isValid()
function TOC_UninstallProsthesisAction:isValid()
if self.item ~= nil and self.isProsthesisEquipped then
return true
@@ -11,11 +11,11 @@ function JCIO_UninstallProsthesisAction:isValid()
end
end
function JCIO_UninstallProsthesisAction:update()
function TOC_UninstallProsthesisAction:update()
self.item:setJobDelta(self:getJobDelta())
end
function JCIO_UninstallProsthesisAction:start()
function TOC_UninstallProsthesisAction:start()
self.item:setJobType("Uninstall prothesis")
self.item:setJobDelta(0.0);
self:setActionAnim("WearClothing");
@@ -29,12 +29,12 @@ function JCIO_UninstallProsthesisAction:start()
self.character:setSecondaryHandItem(self.item)
end
function JCIO_UninstallProsthesisAction:stop()
function TOC_UninstallProsthesisAction:stop()
ISBaseTimedAction.stop(self);
self.item:setJobDelta(0.0);
end
function JCIO_UninstallProsthesisAction:perform()
function TOC_UninstallProsthesisAction:perform()
self.item:getContainer():setDrawDirty(true)
self.item:setJobDelta(0.0)
@@ -54,18 +54,18 @@ function JCIO_UninstallProsthesisAction:perform()
SendUnequipProsthesis(self.patient, self.partName, self.item)
else
JCIO.OperateLimb(self.patient, self.partName, self.item)
TOC.OperateLimb(self.patient, self.partName, self.item)
end
ISBaseTimedAction.perform(self)
end
function JCIO_UninstallProsthesisAction:new(surgeon, patient, partName)
function TOC_UninstallProsthesisAction:new(surgeon, patient, partName)
local o = ISBaseTimedAction.new(self, surgeon)
local limbsData = patient:getModData().JCIO.limbs
local limbsData = patient:getModData().TOC.limbs
o.item = JCIO_Common.FindItemInProstBodyLocation(partName, patient)
o.item = TOC_Common.FindItemInProstBodyLocation(partName, patient)
o.character = surgeon -- For animation purposes
o.patient = patient