Sandbox options and more tests for body locations
This commit is contained in:
@@ -27,9 +27,15 @@
|
||||
-- None 20
|
||||
|
||||
local function addBodyLocationBefore(newLocation, movetoLocation)
|
||||
|
||||
-- TODO pretty sure this function is borked
|
||||
|
||||
|
||||
local group = BodyLocations.getGroup("Human")
|
||||
local list = getClassFieldVal(group, getClassField(group, 1))
|
||||
group:getOrCreateLocation(newLocation)
|
||||
|
||||
|
||||
local newItem = list:get(list:size()-1)
|
||||
list:remove(list:size()-1)
|
||||
local i = group:indexOf(movetoLocation)
|
||||
@@ -37,24 +43,43 @@ local function addBodyLocationBefore(newLocation, movetoLocation)
|
||||
end
|
||||
|
||||
|
||||
function TocSetSleeves(check)
|
||||
-- TODO this is stuck to true for now, it's just too broken to change it mid game
|
||||
local function TocSetSleeves(check)
|
||||
|
||||
-- FIXME This can't work, we need to fix masks before changing the order. There is nothing I can do for now with only this
|
||||
|
||||
|
||||
|
||||
|
||||
local group = BodyLocations.getGroup("Human")
|
||||
if check then
|
||||
print("TOC: Rolling up sleeves")
|
||||
group:getOrCreateLocation("ArmRight_Prot")
|
||||
group:getOrCreateLocation("ArmLeft_Prot")
|
||||
group:getOrCreateLocation("ArmRight")
|
||||
group:getOrCreateLocation("ArmLeft")
|
||||
group:getOrCreateLocation("ArmRight_Prot")
|
||||
group:getOrCreateLocation("ArmLeft_Prot")
|
||||
group:getOrCreateLocation("ArmRight")
|
||||
group:getOrCreateLocation("ArmLeft")
|
||||
|
||||
-- -- Check if we already set stuff before
|
||||
-- -- Readd them
|
||||
-- print("TOC: Running TocSetSleeves")
|
||||
|
||||
-- if group:getLocation("RightArm") or group:getLocation("LeftArm") then
|
||||
-- BodyLocations:Reset() -- maybe it's too much
|
||||
-- end
|
||||
|
||||
-- if check then
|
||||
-- print("TOC: Rolling up sleeves")
|
||||
-- group:getOrCreateLocation("ArmRight_Prot")
|
||||
-- group:getOrCreateLocation("ArmLeft_Prot")
|
||||
-- group:getOrCreateLocation("ArmRight")
|
||||
-- group:getOrCreateLocation("ArmLeft")
|
||||
-- else
|
||||
-- print("TOC: Won't roll up sleeve")
|
||||
-- addBodyLocationBefore("ArmRight_Prot", "TorsoExtra")
|
||||
-- addBodyLocationBefore("ArmLeft_Prot", "TorsoExtra")
|
||||
-- addBodyLocationBefore("ArmRight", "Jacket")
|
||||
-- addBodyLocationBefore("ArmLeft", "Jacket")
|
||||
|
||||
-- end
|
||||
|
||||
else
|
||||
print("TOC: Won't roll up sleeve")
|
||||
addBodyLocationBefore("ArmRight_Prot", "Jacket")
|
||||
addBodyLocationBefore("ArmLeft_Prot", "Jacket")
|
||||
addBodyLocationBefore("ArmRight", "ArmLeft_Prot")
|
||||
addBodyLocationBefore("ArmLeft", "ArmRight")
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
TocSetSleeves(true)
|
||||
8
media/lua/shared/translate/EN/Sandbox_EN.txt
Normal file
8
media/lua/shared/translate/EN/Sandbox_EN.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Sandbox_EN = {
|
||||
Sandbox_TOC = "The Only Cure but better",
|
||||
|
||||
Sandbox_TOC_RollUpSleeves = "Roll up sleeves",
|
||||
Sandbox_TOC_RollUpSleeves_tooltip = "Currently broken, will not do anything",
|
||||
|
||||
|
||||
}
|
||||
12
media/sandbox-options.txt
Normal file
12
media/sandbox-options.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
VERSION = 1,
|
||||
|
||||
|
||||
option TOC.RollUpSleeves
|
||||
{
|
||||
type = boolean,
|
||||
default = true,
|
||||
|
||||
page = TOC,
|
||||
translation = TOC_RollUpSleeves,
|
||||
|
||||
}
|
||||
6
mod.info
6
mod.info
@@ -1,9 +1,9 @@
|
||||
name=The only cure but better
|
||||
poster=generic.png
|
||||
require=UIAPI
|
||||
description=Cut your arm and survive. TEST PAO
|
||||
description=Bitten? Not a problem!
|
||||
id=Amputation2
|
||||
icon=icon.png
|
||||
url=xx
|
||||
modversion=0.4.1
|
||||
url=https://github.com/ZioPao/The-Only-Cure-But-Better
|
||||
modversion=0.9.2
|
||||
pzversion=41.65
|
||||
|
||||
Reference in New Issue
Block a user