Files
The-Only-Cure/media/lua/client/TOC_Debug.lua
2023-01-13 16:36:03 +01:00

25 lines
624 B
Lua

function ResetEverything()
local player = getPlayer()
local mod_data = player:getModData() -- TODO we need to send data...
mod_data.TOC = nil
TheOnlyCure.InitTheOnlyCure(_, player)
-- Destroy the amputation model
for _,v in ipairs(GetBodyParts()) do
local cloth = player:getInventory():FindAndReturn(find_clothName2_TOC(v))
if cloth ~= nil then
print("Resetting " .. cloth:getName())
player:removeWornItem(cloth)
player:getInventory():Remove(cloth)
end
cloth = nil -- reset it
end
player:transmitModData()
end