Files
barotrauma-gamefiles/cookother.yml
2025-03-29 16:03:22 +01:00

167 lines
4.2 KiB
YAML

- name: containers
regex: '(?-s)capacity="(?<capacity>!num)"(?:!anyslotsperrow="(?<slotsperrow>!num))?'
lua: |
if capacity == 1 then return false end
-- file:find("fabricators.xml") then
-- apacity=round(capacity*1.5)
-- eturn true
--
capacity=round(capacity*3)
if capacity > 50 then capacity=50 end
if not slotsperrow then return true end
slotsperrow=1
while slotsperrow * slotsperrow < capacity do
slotsperrow = slotsperrow + 1
end
files:
- "Content/Items/**/*.xml"
- name: containerscontainable
# Just to be safe... Probably not needed though...
isolate: true
regex: capacity="(?<capacity>!num).{0,200}?Containable.{0,50}?items="([^"]+)"
lua: |
-- If we fuck with the diving gear the game fucking explodes
-- Thinking we don't have oxygen tanks and killing us
if file:find("divinggear.xml") then return false end
if file:find("weapons.xml") then return false end
if capacity == 1 then return false end
print(s1)
local gurantee = {"ammobox", "deepdiving", "smallitem", "mediumitem", "largeitem"}
local has = {}
local items = strsplit(s1, ",")
for i, item in pairs(items) do
for _, g in pairs(gurantee) do
if string.find(item, g) then
has[g] = true
end
end
end
for _, g in pairs(gurantee) do
if not has[g] then
s1 = s1 .. "," .. g
end
end
files:
- "Content/Items/**/*.xml"
- name: excludeditems
regex: <Containable!any(\s?excludeditems="[^"]+")
lua: |
s1 = ""
files:
- "Content/Items/**/*.xml"
- name: upgrade
regex: (?:maxforce|capacity|maxrechargespeed|overloadvoltage|healthmultiplier|maxhealth|fabricationspeed|deconstructionspeed|rotationspeedlowskill|offsetonselectedmultiplier|range|maxpoweroutput|meltdowndelay|maxflow|fixdurationlowskill|skillrequirementmultiplier)="\+?!num%?"
lua: |
*2
files:
- "**/UpgradeModules.xml"
- name: upgradetooltip
regex: 'increaseontooltip="(?<increaseontooltip>!num)"'
lua: |
increaseontooltip=increaseontooltip*2
files:
- "**/UpgradeModules.xml"
- name: missionreward
regex: 'reward="!num'
lua: |
*4
files:
- "**/Missions.xml"
- name: maxstacksize
regex: 'maxstacksize="!num'
lua: |
=60
files:
- "Content/Items/**/*.xml"
- name: maxstacksizecharacterinventory
regex: 'maxstacksizecharacterinventory="!num'
lua: |
=60
files:
- "Content/Items/**/*.xml"
- name: lightrange
regex: '(?-s)LightComponent!anyrange="(!num)"'
lua: |
*4
files:
- "Content/Items/**/*.xml"
- name: toolrange
regex: (?-s)RepairTool!anyrange="!num"
lua: |
*4
files:
- "Content/Items/**/*.xml"
- name: merchantstock
regex: (?-s)<Price(?:!anymultiplier="(?<multiplier>!num)")?(?:!anyminavailable="(?<minavailable>!num)")?
lua: |
--Price might actually be price multiplier and not a stock multiplier...
--if multiplier then
-- multiplier = round(multiplier * 3, 2)
--end
if minavailable then
minavailable = round(minavailable * 3, 2)
end
files:
- "Content/Items/**/*.xml"
- name: repairthroughwalls
regex: <RepairTool!anyrepairthroughwalls="(?<repairthroughwalls>!any)"
lua: |
repairthroughwalls = "true"
files:
- "Content/Items/**/*.xml"
- name: itembonanzaamount
regex: (?-s)(?i)<Preferredcontainer!anyamount="!num"
lua: |
v1 = round(v1 * 2, 2)
files:
- "Content/Items/**/*.xml"
- name: itembonanzaspawnprobability
regex: (?-s)(?i)<Preferredcontainer!anyspawnprobability="!num"
lua: |
v1 = round(v1 * 2, 2)
if v1 > 1 then
v1 = 1
end
files:
- "Content/Items/**/*.xml"
- name: itembonanzaminamount
regex: (?-s)(?i)<Preferredcontainer!anyminamount="!num"
lua: |
v1 = round(v1 * 2, 2)
files:
- "Content/Items/**/*.xml"
- name: itembonanzamaxamount
regex: (?-s)(?i)<Preferredcontainer!anymaxamount="!num"
lua: |
v1 = round(v1 * 2, 2)
files:
- "Content/Items/**/*.xml"
- name: morebetterquality
regex: (?-s)QualityStat!anyvalue="!num"
lua: |
round(v1 * 3, 2)
files:
- "Content/Items/**/*.xml"
- name: extinguishamount
regex: (?-s)(?i)<RepairTool!anyextinguishamount="!num"
lua: |
round(v1 * 4, 2)
files:
- "Content/Items/**/tools.xml"