Project Zomboid

Project Zomboid

Lantern
Slooth  [utvecklare] 28 dec, 2022 @ 1:18
Adjusting Attached Lighting Color
local lightByPlayer = {}

local workingGlowSticksData = {}
workingGlowSticksData["AuthenticGlowstick_Blue_On"] = { 0.0, 0.0, 1.0 }
workingGlowSticksData["AuthenticGlowstick_Red_On"] = { 1.0, 0.0, 0.0 }
workingGlowSticksData["AuthenticGlowstick_Green_On"] = { 0.0, 1.0, 0.0 }
workingGlowSticksData["AuthenticGlowstick_Purple_On"] = { 1.0, 0.0, 1.0 }
workingGlowSticksData["AuthenticGlowstick_Yellow_On"] = { 1.0, 1.0, 0.0 }
workingGlowSticksData["AuthenticGlowstick_Orange_On"] = { 1.0, 0.50, 0.0 }
workingGlowSticksData["AuthenticGlowstick_Pink_On"] = { 1.0, 0.0, 0.25 }


local function updateLight(player, item, position)
local color = workingGlowSticksData[item:getType()]

lightByPlayer[player][position] = IsoLightSource.new(player:getX(), player:getY(), player:getZ(), color[1], color[2], color[3], 4)
getCell():addLamppost(lightByPlayer[player][position])
end
< >
Visar 1-2 av 2 kommentarer
Slooth  [utvecklare] 28 dec, 2022 @ 1:22 
Looks like its actually creating a new lightsource on the cell the player is occupying. Which is probably what the vanilla game does but as is does not seem to be modifying the base lighting values for the attached flashlights, etc on the player. This would work but it would be kinda of a worse case scenario I think.
BlackWater821 6 maj, 2024 @ 19:17 
Hi, after such long period.. still no mod options for changing light color yet ?
< >
Visar 1-2 av 2 kommentarer
Per sida: 1530 50