Added bleeding, stuff, fixes, dunno
This commit is contained in:
@@ -18,20 +18,27 @@ This is the beta of my first mod, it means that the main features are there, but
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
[h1]The Only Cure but better[\h1]
|
[h1]The Only Cure but better[/h1]
|
||||||
A working version for SP and MP.
|
A working version for SP and MP.
|
||||||
I'm not gonna bother "adding" stuff, for now.
|
I'm not gonna bother "adding" stuff, for now.
|
||||||
If Mr Bounty returns, I'm probably not gonna continue this.
|
If Mr Bounty returns, I'm probably not gonna continue this.
|
||||||
|
|
||||||
|
[b][u]DO NOT LOAD THIS WITH THE ONLY CURE BETA!!! CHOOSE ONE![/u][/b]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[h1]FIXED[/h1]
|
[h1]FIXED[/h1]
|
||||||
- The Only Cure UI not showing in MP
|
[list]
|
||||||
- Operating with oven completely broken
|
[*]The Only Cure UI in the Medical Check menu not working when checking other players
|
||||||
- Invisible prosthesis on female models (still WIP, forearms especially)
|
[*]The Only Cure context menu on right click
|
||||||
|
[*]Operating with oven completely broken
|
||||||
|
[*]Invisible prosthesis on female models (still WIP, forearms especially)
|
||||||
|
[*]More stuff
|
||||||
|
[/list]
|
||||||
[h1]ADDED[/h1]
|
[h1]ADDED[/h1]
|
||||||
- Debug cheats (MP Compatible) to reset amputations
|
[list]
|
||||||
- More stuff
|
[*]Debug cheats (MP Compatible) to reset amputations
|
||||||
|
[/list]
|
||||||
|
|
||||||
Workshop ID: 2915572347
|
Workshop ID: 2915572347
|
||||||
Mod ID: Amputation2
|
Mod ID: Amputation2
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
-- TODO rewrite this mess
|
-- TODO rewrite this mess
|
||||||
|
|
||||||
local function CutLocal(_, patient, surgeon, part_name)
|
local function CutLocal(_, patient, surgeon, part_name)
|
||||||
if IsSawInInventory(surgeon) ~= nil then
|
if GetSawInInventory(surgeon) ~= nil then
|
||||||
ISTimedActionQueue.add(ISCutLimb:new(patient, surgeon, part_name));
|
ISTimedActionQueue.add(ISCutLimb:new(patient, surgeon, part_name));
|
||||||
else
|
else
|
||||||
surgeon:Say("I don't have a saw on me")
|
surgeon:Say("I don't have a saw on me")
|
||||||
@@ -229,7 +229,7 @@ end
|
|||||||
|
|
||||||
TocContextMenus.DoCut = function(_, patient, surgeon, part_name)
|
TocContextMenus.DoCut = function(_, patient, surgeon, part_name)
|
||||||
|
|
||||||
if IsSawInInventory(surgeon) then
|
if GetSawInInventory(surgeon) then
|
||||||
ISTimedActionQueue.add(ISCutLimb:new(patient, surgeon, part_name));
|
ISTimedActionQueue.add(ISCutLimb:new(patient, surgeon, part_name));
|
||||||
else
|
else
|
||||||
surgeon:Say("I don't have a saw on me")
|
surgeon:Say("I don't have a saw on me")
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ function GetKitInInventory(surgeon)
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function IsSawInInventory(surgeon)
|
|
||||||
local playerInv = surgeon:getInventory()
|
function GetSawInInventory(surgeon)
|
||||||
local item = playerInv:getItemFromType('Saw') or playerInv:getItemFromType('GardenSaw') or playerInv:getItemFromType('Chainsaw')
|
|
||||||
|
local player_inv = surgeon:getInventory()
|
||||||
|
local item = player_inv:getItemFromType("Saw") or player_inv:getItemFromType("GardenSaw") or player_inv:getItemFromType("Chainsaw")
|
||||||
return item
|
return item
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,14 +22,23 @@ function ISCutLimb:update()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ISCutLimb:start()
|
function ISCutLimb:start()
|
||||||
if self.patient == self.surgeon then
|
|
||||||
self:setActionAnim("SawLog") -- TODO Change it to a better animation
|
self:setActionAnim("SawLog")
|
||||||
--self:setAnimVariable("WearClothingLocation", "Jacket")
|
local saw_item = GetSawInInventory(self.surgeon)
|
||||||
else
|
|
||||||
self:setActionAnim("SawLog")
|
if saw_item then
|
||||||
-- TODO Point at patient
|
self:setOverrideHandModels(saw_item:getStaticModel(), nil)
|
||||||
--self.patient:SetVariable("LootPosition", "Mid")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local body_part_type = TheOnlyCure.GetBodyPartTypeFromBodyPart(self.part_name)
|
||||||
|
local body_damage = self.patient:getBodyDamage()
|
||||||
|
local body_damage_part = body_damage:getBodyPart(body_part_type)
|
||||||
|
|
||||||
|
body_damage_part:setBleeding(true)
|
||||||
|
body_damage_part:setBleedingTime(ZombRand(10,20))
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -92,9 +101,12 @@ function ISCutLimb:perform()
|
|||||||
else
|
else
|
||||||
TheOnlyCure.CutLimb(self.part_name, surgeon_factor, bandage_table, painkiller_table)
|
TheOnlyCure.CutLimb(self.part_name, surgeon_factor, bandage_table, painkiller_table)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
self.surgeon:getXp():AddXP(Perks.Doctor, 400);
|
self.surgeon:getXp():AddXP(Perks.Doctor, 400);
|
||||||
|
|
||||||
ISBaseTimedAction.perform(self);
|
ISBaseTimedAction.perform(self);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -103,7 +115,6 @@ function ISCutLimb:new(patient, surgeon, part_name)
|
|||||||
setmetatable(o, self)
|
setmetatable(o, self)
|
||||||
self.__index = self
|
self.__index = self
|
||||||
o.part_name = part_name
|
o.part_name = part_name
|
||||||
o.bodyPart = TheOnlyCure.GetBodyPartTypeFromBodyPart(part_name) -- TODO I don't think I need this
|
|
||||||
o.character = surgeon -- For anim
|
o.character = surgeon -- For anim
|
||||||
|
|
||||||
o.surgeon = surgeon; -- Surgeon or player that make the operation
|
o.surgeon = surgeon; -- Surgeon or player that make the operation
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ imports
|
|||||||
|
|
||||||
/************************ Prothese cloth ************************/
|
/************************ Prothese cloth ************************/
|
||||||
|
|
||||||
/* TODO make these not clothing so we cant equip them but only install them via the menu or context menu
|
/* TODO make these not clothing so we cant equip them but only install them via the menu or context menu*/
|
||||||
item WoodenHook_right_noHand
|
item WoodenHook_right_noHand
|
||||||
{
|
{
|
||||||
Weight = 1,
|
Weight = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user