stupid workaround to prevent cutting when... fuck me

This commit is contained in:
Pao
2023-01-15 04:17:08 +01:00
parent 33d46be4b9
commit b5741cc059
2 changed files with 9 additions and 6 deletions

View File

@@ -182,6 +182,8 @@ local function OnClickTocDescUI(button, args)
elseif args.option == "Unequip" then elseif args.option == "Unequip" then
TryTocAction(_, desc_ui.part_name, "Unequip", surgeon, patient) TryTocAction(_, desc_ui.part_name, "Unequip", surgeon, patient)
elseif args.option == "Nothing" then
print("Just do nothing") -- TODO workaround
end end
main_ui:close() main_ui:close()
@@ -201,11 +203,11 @@ function OnClickTocConfirmUIMP(button, args)
player:Say("I need a kit") player:Say("I need a kit")
end end
elseif confirm_ui.actionAct == "Equip" and args.option == "yes" then elseif confirm_ui_mp.actionAct == "Equip" and args.option == "yes" then
print("Equip mp comp") print("Equip mp comp")
elseif confirm_ui.actionAct == "Unequip" and args.option == "yes" then elseif confirm_ui_mp.actionAct == "Unequip" and args.option == "yes" then
print("Unequip mp comp") print("Unequip mp comp")
end end
@@ -453,8 +455,9 @@ function SetupTocDescUI(surgeon, patient, toc_data, part_name)
desc_ui["b1"]:addArg("option", "Cut") desc_ui["b1"]:addArg("option", "Cut")
elseif GetSawInInventory(surgeon) and not CanLimbBeAmputated(toc_data, part_name) then elseif GetSawInInventory(surgeon) and not CanLimbBeAmputated(toc_data, part_name) then
desc_ui["b1"]:setVisible(true) desc_ui["b1"]:setVisible(true)
desc_ui["b1"]:setText("Cut") desc_ui["b1"]:setText("Remove prosthesis before")
desc_ui["b1"]:addArg("option", "Unequip") desc_ui["b1"]:addArg("option", "Nothing")
else else
desc_ui["b1"]:setVisible(false) desc_ui["b1"]:setVisible(false)
end end

View File

@@ -23,7 +23,7 @@ end
function ISCutLimb:start() function ISCutLimb:start()
self:setActionAnim("SawLog") self:setActionAnim("SawLog")
local saw_item = GetSawInInventory(self.surgeon) local saw_item = GetSawInInventory(self.surgeon)
if saw_item then if saw_item then
@@ -33,7 +33,7 @@ function ISCutLimb:start()
-- TODO this doesn't work when doing it online -- TODO this doesn't work when doing it on another player
local body_part_type = TocGetBodyPartTypeFromBodyPart(self.part_name) local body_part_type = TocGetBodyPartTypeFromBodyPart(self.part_name)
local body_damage = self.patient:getBodyDamage() local body_damage = self.patient:getBodyDamage()
local body_damage_part = body_damage:getBodyPart(body_part_type) local body_damage_part = body_damage:getBodyPart(body_part_type)