Add other mods

This commit is contained in:
2025-03-31 13:19:47 +02:00
parent bdc5488720
commit be593696b2
2266 changed files with 109313 additions and 512 deletions

View File

@@ -0,0 +1,222 @@
-- if not CLIENT then return end
prettyjson = require "pretty.json"
function tableMerge(t1, t2)
for k,v in pairs(t2) do
if type(v) == "table" then
if type(t1[k] or false) == "table" then
tableMerge(t1[k] or {}, t2[k] or {})
else
t1[k] = v
end
else
t1[k] = v
end
end
return t1
end
function dump(o)
if type(o) == 'table' then
local s = '{ '
for k,v in pairs(o) do
if type(k) ~= 'number' then k = '"'..k..'"' end
s = s .. '['..k..'] = ' .. dump(v) .. ','
end
return s .. '} '
else
return tostring(o)
end
end
local settings = {
ModEnabled = true,
version = "1.5.1",
SaveSettings = true,
RedLuminosityMultiplier=1,
GreenLuminosityMultiplier=1,
BlueLuminosityMultiplier=1,
GlobalLuminosityMultiplier=900, -- random constant
LuminosityOfItems = {
lamp=1,
lightfluorescentm01=1,
lightfluorescentm02=1,
lightfluorescentm03=1,
lightfluorescentm04=1,
lightfluorescentl01=2,
lightfluorescentl02=2,
lighthalogenmm01=1,
lighthalogenmm02=1,
lighthalogenmm03=1,
lighthalogenm04=1,
lightleds01=1,
op_workbenchlamp= 1,
emergencylight= 0.2,
lightcomponent= 0.05,
lightcomponent90= 0.05,
lightcomponentround= 0.05
},
cursed={
makeOutsideLightsShadowCasting = false,
makeOutsideLightsDrawnBehindSub = false,
makeInsideLightsShadowCasting = false,
makeInsideLightsDrawnInFrontOfSub = false,
turnAllOutsideLightsOn=false,
turnAllOutsideLightsOff=false,
}
}
local modFolder = ...
function saveSettings()
if settings.SaveSettings then
File.Write(modFolder .. "/settings.json", prettyjson.stringify(settings, nil, 4)) -- yay
end
end
function loadSettings()
if File.Exists(modFolder .. "/settings.json") then
return json.parse(File.Read(modFolder .. "/settings.json"))
end
end
function migrateSettings(oldSettings)
local version = settings.version
tableMerge(settings,oldSettings)
settings.version = version
end
function recalculateRange(light)
if not settings.ModEnabled then return end
local luminosityMult = settings.LuminosityOfItems[light.Item.Prefab.Identifier.Value]
if luminosityMult == nil then return end
if settings.cursed.makeOutsideLightsShadowCasting then
if light.Item.CurrentHull == nil then
if not light.DrawBehindSubs and not light.CastShadows then
light.CastShadows = true
end
end
end
if settings.cursed.makeOutsideLightsDrawnBehindSub then
if light.Item.CurrentHull == nil then
if not light.DrawBehindSubs and not light.CastShadows then
light.DrawBehindSubs = true
end
end
end
if settings.cursed.makeInsideLightsShadowCasting then
if light.Item.CurrentHull ~= nil then
if not light.DrawBehindSubs and not light.CastShadows then
light.CastShadows = true
end
end
end
if settings.cursed.makeInsideLightsDrawnInFrontOfSub then
if light.Item.CurrentHull ~= nil then
light.DrawBehindSubs = false
end
end
if settings.cursed.turnAllOutsideLightsOn then
if light.Item.CurrentHull == nil then
light.IsOn = true
end
end
if settings.cursed.turnAllOutsideLightsOff then
if light.Item.CurrentHull == nil then
light.IsOn = false
end
end
local l = light.LightColor.R*settings.RedLuminosityMultiplier + light.LightColor.G *settings.GreenLuminosityMultiplier + light.LightColor.B *settings.BlueLuminosityMultiplier
l = l / 255 / 3
l = l * light.LightColor.A / 255
l = l * luminosityMult
light.Range = math.sqrt(l) * settings.GlobalLuminosityMultiplier
end
function globalRecalc()
for k, v in pairs(Item.ItemList) do
local light -- omg lua
if settings.LuminosityOfItems[v.Prefab.Identifier.Value] == nil then goto continue end
light = v.GetComponentString("LightComponent")
if light == nil then goto continue end
recalculateRange(light)
::continue:: -- omg lua
end
end
Game.AddCommand('lightrange', 'toggles recalculation of light ranges', function()
settings.ModEnabled = not settings.ModEnabled
if settings.ModEnabled then print('----------------------- On -----------------------' ) end
if not settings.ModEnabled then print('----------------------- Off -----------------------' ) end
saveSettings()
end, nil, false)
Hook.Patch("Barotrauma.Items.Components.LightComponent", "set_LightColor", function(instance, ptable)
if instance.Item.Submarine ~= nil and not instance.Item.Submarine.Loading then
recalculateRange(instance)
end
end, Hook.HookMethodType.After)
Game.AddCommand('recalclightranges', 'forces recalculation of light ranges', function()
local newSettings = loadSettings()
if newSettings ~= nil then settings = newSettings end
globalRecalc()
end, nil, false)
-- Hook.Add("roundStart", "recalculate light ranges", function()
-- globalRecalc()
-- end)
-- round start, sub/shuttle spawn, switch in sub editor
Hook.Patch("Barotrauma.Submarine", ".ctor", function(instance, ptable)
globalRecalc()
end, Hook.HookMethodType.After)
if not File.Exists(modFolder .. "/settings.json") then
saveSettings()
else
local newSettings = loadSettings()
if newSettings.version == nil or newSettings.version ~= settings.version then
migrateSettings(newSettings)
saveSettings()
else
settings = newSettings
end
end
-- after cl_reloadlua
-- first call before round start has no effect because item list doesn't exist yet
globalRecalc()

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 xiedacon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1,54 @@
# lua-pretty-json
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/xiedacon/lua-pretty-json/blob/master/LICENSE)
## Usage
```lua
local json = require "pretty.json"
local str = json.stringify({
"aa\"\a\v", "ccc", true, false,
{
a = "a",
b = "a",
"aaa", "ccc", "ddd",
}
}, nil, 4)
print(str)
-- [
-- "aa\"\u0007\u000b",
-- "ccc",
-- true,
-- false,
-- {
-- "1": "aaa",
-- "2": "ccc",
-- "3": "ddd",
-- "a": "a",
-- "b": "a"
-- }
-- ]
json.parse(str)
```
## API
* json.stringify(obj, replacer, space, print_address)
* ``obj`` ``<any>`` 需要序列化的值
* ``replacer`` ``<function>`` 同 [js JSON.stringify](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)
* ``space`` ``<number>`` 空格数
* ``print_address`` ``<boolean>`` 输出内存地址
* json.parse(str, without_null)
* ``str`` ``<string>`` 需要反序列化的值
* ``without_null`` ``<boolean>`` 是否输出 null 值,默认使用 ``json.null``
* json.null
## License
[MIT License](https://github.com/xiedacon/lua-pretty-json/blob/master/LICENSE)
Copyright (c) 2018 xiedacon

View File

@@ -0,0 +1,35 @@
-- Copyright (c) 2018, Souche Inc.
local Constant = require "pretty.json.constant"
local Serializer = require "pretty.json.serializer"
local Parser = require "pretty.json.parser"
local json = {
_VERSION = "0.1",
null = Constant.NULL
}
function json.stringify(obj, replacer, space, print_address)
if type(space) ~= "number" then space = 0 end
return Serializer({
print_address = print_address,
stream = {
fragments = {},
write = function(self, ...)
for i = 1, #{...} do
self.fragments[#self.fragments + 1] = ({...})[i]
end
end,
toString = function(self)
return table.concat(self.fragments)
end
}
}):json(obj, replacer, space, space):toString()
end
function json.parse(str, without_null)
return Parser({ without_null = without_null }):json(str, 1)
end
return json

View File

@@ -0,0 +1,32 @@
-- Copyright (c) 2019, Souche Inc.
local Constant = {
ESC_MAP = {
["\\"] = [[\]],
["\""] = [[\"]],
["/"] = [[\/]],
["\b"] = [[\b]],
["\f"] = [[\f]],
["\n"] = [[\n]],
["\r"] = [[\r]],
["\t"] = [[\t]],
["\a"] = [[\u0007]],
["\v"] = [[\u000b]]
},
UN_ESC_MAP = {
b = "\b",
f = "\f",
n = "\n",
r = "\r",
t = "\t",
u0007 = "\a",
u000b = "\v"
},
NULL = setmetatable({}, {
__tostring = function() return "null" end
})
}
return Constant

View File

@@ -0,0 +1,168 @@
-- Copyright (c) 2019, Souche Inc.
local Constant = require "pretty.json.constant"
local NULL = Constant.NULL
local UN_ESC_MAP = Constant.UN_ESC_MAP
local function next_char(str, pos)
pos = pos + #str:match("^%s*", pos)
return str:sub(pos, pos), pos
end
local function syntax_error(str, pos)
return error("Invalid json syntax starting at position " .. pos .. ": " .. str:sub(pos, pos + 10))
end
local Parser = {}
setmetatable(Parser, {
__call = function(self, opts)
local parser = {
without_null = opts.without_null
}
setmetatable(parser, { __index = Parser })
return parser
end
})
function Parser:number(str, pos)
local num = str:match("^-?%d+%.?%d*[eE]?[+-]?%d*", pos)
local val = tonumber(num)
if not val then
syntax_error(str, pos)
else
return val, pos + #num
end
end
function Parser:string(str, pos)
pos = pos + 1
local i = 1
local chars = table.new(#str - pos - 1, 0)
while(pos <= #str) do
local c = str:sub(pos, pos)
if c == "\"" then
return table.concat(chars, ""), pos + 1
elseif c == "\\" then
local j = pos + 1
local next_c = str:sub(j, j)
for k, v in pairs(UN_ESC_MAP) do
if str:sub(j, j + #k - 1) == k then
next_c = v
j = j + #k - 1
end
end
c = next_c
pos = j
end
chars[i] = c
i = i + 1
pos = pos + 1
end
syntax_error(str, pos)
end
function Parser:array(str, pos)
local arr = table.new(10, 0)
local val
local i = 1
local c
pos = pos + 1
while true do
val, pos = self:json(str, pos)
arr[i] = val
i = i + 1
c, pos = next_char(str, pos)
if (c == ",") then
pos = pos + 1
elseif (c == "]") then
return arr, pos + 1
else
syntax_error(str, pos)
end
end
return arr
end
function Parser:table(str, pos)
local obj = table.new(0, 10)
local key
local val
local c
pos = pos + 1
while true do
c, pos = next_char(str, pos)
if c == "}" then return obj, pos + 1
elseif c == "\"" then key, pos = self:string(str, pos)
else syntax_error(str, pos) end
c, pos = next_char(str, pos)
if c ~= ":" then syntax_error(str, pos) end
val, pos = self:json(str, pos + 1)
obj[key] = val
c, pos = next_char(str, pos)
if c == "}" then
return obj, pos + 1
elseif c == "," then
pos = pos + 1
else
syntax_error(str, pos)
end
end
end
function Parser:json(str, pos)
local first = false
local val
local c
if not pos or pos == 1 then first = true end
pos = pos or 1
if type(str) ~= "string" then error("str should be a string")
elseif pos > #str then error("Reached unexpected end of input") end
c, pos = next_char(str, pos)
if c == "{" then
val, pos = self:table(str, pos)
elseif c == "[" then
val, pos = self:array(str, pos)
elseif c == "\"" then
val, pos = self:string(str, pos)
elseif c == "-" or c:match("%d") then
val, pos = self:number(str, pos)
else
for k, v in pairs({ ["true"] = true, ["false"] = false, ["null"] = NULL }) do
if (str:sub(pos, pos + #k - 1) == k) then
val, pos = v, pos + #k
break
end
end
if val == nil then syntax_error(str, pos) end
end
if first and pos <= #str then syntax_error(str, pos) end
if self.without_null and val == NULL then val = nil end
return val, pos
end
return Parser

View File

@@ -0,0 +1,162 @@
-- Copyright (c) 2018, Souche Inc.
local Constant = require "pretty.json.constant"
local NULL = Constant.NULL
local ESC_MAP = Constant.ESC_MAP
local function kind_of(obj)
if type(obj) ~= "table" then return type(obj) end
if obj == NULL then return "nil" end
local i = 1
for _ in pairs(obj) do
if obj[i] ~= nil then i = i + 1 else return "table" end
end
if i == 1 then
return "table"
else
return "array"
end
end
local function escape_str(s)
for k, v in pairs(ESC_MAP) do
s = s:gsub(k, v)
end
return s
end
local Serializer = {
print_address = false,
max_depth = 100
}
setmetatable(Serializer, {
__call = function(self, opts)
local serializer = {
depth = 0,
max_depth = opts.max_depth,
print_address = opts.print_address,
stream = opts.stream
}
setmetatable(serializer, { __index = Serializer })
return serializer
end
})
function Serializer:space(n)
local stream = self.stream
for i = 1, n or 0 do
stream:write(" ")
end
return self
end
function Serializer:key(key)
local stream = self.stream
local kind = kind_of(key)
if kind == "array" then
error("Can't encode array as key.")
elseif kind == "table" then
error("Can't encode table as key.")
elseif kind == "string" then
stream:write("\"", escape_str(key), "\"")
elseif kind == "number" then
stream:write("\"", tostring(key), "\"")
elseif self.print_address then
stream:write(tostring(key))
else
error("Unjsonifiable type: " .. kind .. ".")
end
return self
end
function Serializer:array(arr, replacer, indent, space)
local stream = self.stream
stream:write("[")
for i, v in ipairs(arr) do
if replacer then v = replacer(k, v) end
stream:write(i == 1 and "" or ",")
stream:write(space > 0 and "\n" or "")
self:space(indent)
self:json(v, replacer, indent + space, space)
end
if #arr > 0 then
stream:write(space > 0 and "\n" or "")
self:space(indent - space)
end
stream:write("]")
return self
end
function Serializer:table(obj, replacer, indent, space)
local stream = self.stream
stream:write("{")
local len = 0
for k, v in pairs(obj) do
if replacer then v = replacer(k, v) end
if v ~= nil then
stream:write(len == 0 and "" or ",")
stream:write(space > 0 and "\n" or "")
self:space(indent)
self:key(k)
stream:write(space > 0 and ": " or ":")
self:json(v, replacer, indent + space, space)
len = len + 1
end
end
if len > 0 then
stream:write(space > 0 and "\n" or "")
self:space(indent - space)
end
stream:write("}")
return self
end
function Serializer:json(obj, replacer, indent, space)
local stream = self.stream
local kind = kind_of(obj)
self.depth = self.depth + 1
if self.depth > self.max_depth then error("Reach max depth: " .. tostring(self.max_depth)) end
if kind == "array" then
self:array(obj, replacer, indent, space)
elseif kind == "table" then
self:table(obj, replacer, indent, space)
elseif kind == "string" then
stream:write("\"", escape_str(obj), "\"")
elseif kind == "number" then
stream:write(tostring(obj))
elseif kind == "boolean" then
stream:write(tostring(obj))
elseif kind == "nil" then
stream:write("null")
elseif self.print_address then
stream:write(tostring(obj))
else
error("Unjsonifiable type: " .. kind)
end
return self
end
function Serializer:toString()
return self.stream:toString()
end
return Serializer

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<contentpackage name="Realistic Light Ranges" modversion="1.5.3" corepackage="False" steamworkshopid="3224047474" gameversion="1.4.4.1" expectedhash="BA8D96E463AA49CEB9927D429599439B">
<Item file="%ModDir%/lights.xml" />
</contentpackage>

View File

@@ -0,0 +1,340 @@
<?xml version="1.0" encoding="utf-8"?>
<Items>
<Override>
<Item name="" identifier="lamp" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="304,528,64,96" depth="0.8" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="784,528,64,96" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<!-- TODO: add names for fluorescent lights -->
<Item name="" nameidentifier="lamp" identifier="lightfluorescentm01" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="0,528,80,112" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="480,528,80,112" origin="0.5,0.5" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lightfluorescentm02" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="80,528,80,112" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="560,528,80,112" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lightfluorescentm03" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="160,528,64,112" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="640,528,64,112" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lightfluorescentm04" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="224,528,80,112" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="704,528,80,112" origin="0.5,0.5" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lightfluorescentl01" category="Electrical" Tags="largeitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="0,816,240,64" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="480,816,240,64" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lightfluorescentl02" category="Electrical" Tags="largeitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="0,896,288,48" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/light_fluorescent_L2.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="480,896,288,48" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lighthalogenmm01" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="0,672,80,128" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="480,672,80,128" origin="0.5,0.5" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lighthalogenmm02" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="80,672,128,80" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="560,672,128,80" origin="0.5,0.5" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lighthalogenmm03" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="208,672,112,128" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="688,672,112,128" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lighthalogenm04" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="320,672,128,96" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="800,672,128,96" origin="0.5,0.5" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" nameidentifier="lamp" identifier="lightleds01" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="352,784,80,80" depth="0.8" origin="0.5,0.5" />
<LightComponent lightcolor="1.0,1.0,1.0,0.5" range="800.0" powerconsumption="5">
<LightTexture texture="Content/Lights/pointlight_bright.png" origin="0.5,0.5" />
<!-- additive "top light" -->
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="842,794,59,59" origin="0.5,0.5" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="power" displayname="connection.power" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" identifier="emergencylight" category="Electrical" Tags="smallitem,light" scale="0.5">
<Upgrade gameversion="0.10.0.0" scale="*0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="0,960,96,16" depth="0.8" />
<!-- base texture -->
<LightComponent lightcolor="255,0,0,25" range="250.0" IsOn="true" castshadows="false" alphablend="true">
<LightTexture texture="Content/Lights/light_fluorescent_L2.png" origin="0.5,0.5" />
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="480,960,96,16" />
</LightComponent>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" identifier="lightcomponent" category="Electrical" Tags="smallitem,lightcomponent" maxstacksize="32" maxstacksizecharacterinventory="8" cargocontaineridentifier="metalcrate" scale="0.5" impactsoundtag="impact_metal_light" isshootable="true" GrabWhenSelected="true">
<Price baseprice="110" minleveldifficulty="5">
<Price storeidentifier="merchantoutpost" />
<Price storeidentifier="merchantcity" sold="false" />
<Price storeidentifier="merchantresearch" multiplier="1.25" />
<Price storeidentifier="merchantmilitary" />
<Price storeidentifier="merchantmine" />
<Price storeidentifier="merchantengineering" multiplier="0.9" />
</Price>
<PreferredContainer primary="engcab" />
<PreferredContainer secondary="wreckengcab,abandonedengcab,outpostengcab,beaconengcab" amount="1" spawnprobability="0.05" />
<Deconstruct time="10">
<Item identifier="fpgacircuit" />
<Item identifier="phosphorus" />
</Deconstruct>
<Fabricate suitablefabricators="fabricator" requiredtime="10">
<RequiredSkill identifier="electrical" level="20" />
<RequiredItem identifier="fpgacircuit" />
<RequiredItem identifier="phosphorus" amount="2" />
</Fabricate>
<InventoryIcon texture="Content/Items/InventoryIconAtlas.png" sourcerect="640,388,59,57" origin="0.5,0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" depth="0.8" sourcerect="195,4,28,24" origin="0.5,0.5" />
<LightComponent canbeselected="true" color="255,0.0,0.0,127" alphablend="true" castshadows="false">
<LightTexture texture="Content/Lights/pointlight_bounce.png" origin="0.5,0.5" />
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="228,3,23,24" origin="0.38,0.5" />
</LightComponent>
<Body width="28" height="23" density="15" />
<Holdable selectkey="Select" pickkey="Use" slots="Any,RightHand,LeftHand" msg="ItemMsgDetachWrench" PickingTime="5.0" aimpos="65,-10" handle1="0,0" attachable="true" aimable="true">
<RequiredItem items="wrench" type="Equipped" />
</Holdable>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" identifier="lightcomponent90" nameidentifier="lightcomponent" maxstacksize="32" maxstacksizecharacterinventory="8" Aliases="Light Component 90Deg" category="Electrical" Tags="smallitem,lightcomponent" cargocontaineridentifier="metalcrate" scale="0.5" impactsoundtag="impact_metal_light" isshootable="true" GrabWhenSelected="true">
<Price baseprice="110" minleveldifficulty="5">
<Price storeidentifier="merchantoutpost" />
<Price storeidentifier="merchantcity" sold="false" />
<Price storeidentifier="merchantresearch" multiplier="1.25" />
<Price storeidentifier="merchantmilitary" />
<Price storeidentifier="merchantmine" />
<Price storeidentifier="merchantengineering" multiplier="0.9" />
</Price>
<PreferredContainer primary="engcab" />
<PreferredContainer secondary="wreckengcab,abandonedengcab,outpostengcab,beaconengcab" amount="1" spawnprobability="0.05" />
<Deconstruct time="10">
<Item identifier="fpgacircuit" />
<Item identifier="phosphorus" />
</Deconstruct>
<Fabricate suitablefabricators="fabricator" requiredtime="10">
<RequiredSkill identifier="electrical" level="20" />
<RequiredItem identifier="fpgacircuit" />
<RequiredItem identifier="phosphorus" amount="2" />
</Fabricate>
<InventoryIcon texture="Content/Items/InventoryIconAtlas.png" sourcerect="896,384,64,64" origin="0.5,0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" depth="0.8" sourcerect="195,33,27,31" origin="0.5,0.5" />
<LightComponent canbeselected="true" color="255,0.0,0.0,127" alphablend="true" castshadows="false">
<LightTexture texture="Content/Lights/pointlight_bounce.png" origin="0.5,0.5" />
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="228,3,23,24" origin="0.5,0.55" />
</LightComponent>
<Body width="28" height="23" density="15" />
<Holdable selectkey="Select" pickkey="Use" slots="Any,RightHand,LeftHand" msg="ItemMsgDetachWrench" PickingTime="5.0" aimpos="65,-10" handle1="0,0" attachable="true" aimable="true">
<RequiredItem items="wrench" type="Equipped" />
</Holdable>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
<Item name="" identifier="lightcomponentround" nameidentifier="lightcomponent" maxstacksize="32" maxstacksizecharacterinventory="8" category="Electrical" Tags="smallitem,lightcomponent" cargocontaineridentifier="metalcrate" scale="0.5" impactsoundtag="impact_metal_light" isshootable="true" GrabWhenSelected="true">
<Price baseprice="110" minleveldifficulty="5">
<Price storeidentifier="merchantoutpost" />
<Price storeidentifier="merchantcity" sold="false" />
<Price storeidentifier="merchantresearch" multiplier="1.25" />
<Price storeidentifier="merchantmilitary" />
<Price storeidentifier="merchantmine" />
<Price storeidentifier="merchantengineering" multiplier="0.9" />
</Price>
<PreferredContainer primary="engcab" />
<PreferredContainer secondary="wreckengcab,abandonedengcab,outpostengcab,beaconengcab" amount="1" spawnprobability="0.05" />
<Deconstruct time="10">
<Item identifier="fpgacircuit" />
<Item identifier="phosphorus" />
</Deconstruct>
<Fabricate suitablefabricators="fabricator" requiredtime="10">
<RequiredSkill identifier="electrical" level="20" />
<RequiredItem identifier="fpgacircuit" />
<RequiredItem identifier="phosphorus" amount="2" />
</Fabricate>
<InventoryIcon texture="Content/Items/InventoryIconAtlas2.png" sourcerect="64,448,64,64" origin="0.5,0.5" />
<Sprite texture="Content/Items/Electricity/signalcomp.png" depth="0.8" sourcerect="194,103,25,26" origin="0.5,0.5" />
<LightComponent canbeselected="true" color="1.0,0.0,0.0,0.5" castshadows="false">
<LightTexture texture="Content/Lights/pointlight_bounce.png" origin="0.5,0.5" />
<sprite texture="Content/Items/Electricity/signalcomp.png" sourcerect="228,3,23,24" origin="0.5,0.5" />
</LightComponent>
<Body width="28" height="23" density="15" />
<Holdable selectkey="Select" pickkey="Use" slots="Any,RightHand,LeftHand" msg="ItemMsgDetachWrench" PickingTime="5.0" aimpos="65,-10" handle1="0,0" attachable="true" aimable="true">
<RequiredItem items="wrench" type="Equipped" />
</Holdable>
<ConnectionPanel selectkey="Action" canbeselected="true" msg="ItemMsgRewireScrewdriver" hudpriority="10">
<GuiFrame relativesize="0.2,0.32" minsize="400,350" maxsize="480,420" anchor="Center" style="ConnectionPanel" />
<RequiredItem items="screwdriver" type="Equipped" />
<input name="toggle" displayname="connection.togglestate" />
<input name="set_state" displayname="connection.setstate" />
<input name="set_color" displayname="connection.setcolor" />
</ConnectionPanel>
</Item>
</Override>
</Items>

View File

@@ -0,0 +1,36 @@
{
"ModEnabled": true,
"version": "1.5.1",
"SaveSettings": true,
"RedLuminosityMultiplier": 1,
"GreenLuminosityMultiplier": 1,
"BlueLuminosityMultiplier": 1,
"GlobalLuminosityMultiplier": 900,
"LuminosityOfItems": {
"lamp": 1,
"lightfluorescentm01": 1,
"lightfluorescentm02": 1,
"lightfluorescentm03": 1,
"lightfluorescentm04": 1,
"lightfluorescentl01": 2,
"lightfluorescentl02": 2,
"lighthalogenmm01": 1,
"lighthalogenmm02": 1,
"lighthalogenmm03": 1,
"lighthalogenm04": 1,
"lightleds01": 1,
"op_workbenchlamp": 1,
"emergencylight": 0.2,
"lightcomponent": 0.05,
"lightcomponent90": 0.05,
"lightcomponentround": 0.05
},
"cursed": {
"makeOutsideLightsShadowCasting": false,
"makeOutsideLightsDrawnBehindSub": false,
"makeInsideLightsShadowCasting": false,
"makeInsideLightsDrawnInFrontOfSub": false,
"turnAllOutsideLightsOn": false,
"turnAllOutsideLightsOff": false
}
}