Project Zomboid

Project Zomboid

Lantern
Slooth  [pengembang] 28 Des 2022 @ 1:18am
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
< >
Menampilkan 1-2 dari 2 komentar
Slooth  [pengembang] 28 Des 2022 @ 1:22am 
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.
Hi, after such long period.. still no mod options for changing light color yet ?
< >
Menampilkan 1-2 dari 2 komentar
Per halaman: 1530 50