mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 10:33:30 +01:00
Merge pull request #1314 from SkyMarshal/Lighting
Ultralight, Sped up how fast fires burn and use fuel, Removed deletion logging (Speeds up world shudown), added icon for welder fuel.
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
..()
|
||||
sd_SetLuminosity(NODERANGE)
|
||||
ul_SetLuminosity(NODERANGE)
|
||||
return
|
||||
|
||||
/obj/effect/alien/weeds/proc/Life()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
sd_SetLuminosity(1)
|
||||
ul_SetLuminosity(1)
|
||||
|
||||
spawn(1200) // 2 minutes
|
||||
del(src)
|
||||
@@ -173,13 +173,13 @@
|
||||
*/
|
||||
/obj/item/device/pda/pickup(mob/user)
|
||||
if (fon)
|
||||
sd_SetLuminosity(0)
|
||||
user.total_luminosity += f_lum
|
||||
ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + (f_lum - 1), user.LuminosityGreen + (f_lum - 1), user.LuminosityBlue + (f_lum + 1))
|
||||
|
||||
/obj/item/device/pda/dropped(mob/user)
|
||||
if (fon)
|
||||
user.total_luminosity -= f_lum
|
||||
sd_SetLuminosity(f_lum)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - (f_lum - 1), user.LuminosityGreen - (f_lum - 1), user.LuminosityBlue - (f_lum + 1))
|
||||
ul_SetLuminosity(f_lum - 1, f_lum - 1, f_lum + 1)
|
||||
|
||||
/obj/item/device/pda/New()
|
||||
..()
|
||||
@@ -468,11 +468,11 @@
|
||||
fon = (!fon)
|
||||
if (src in U.contents)
|
||||
if (fon)
|
||||
U.total_luminosity += f_lum
|
||||
U.ul_SetLuminosity(U.LuminosityRed + (f_lum - 1), U.LuminosityGreen + (f_lum - 1), U.LuminosityBlue + (f_lum + 1))
|
||||
else
|
||||
U.total_luminosity -= f_lum
|
||||
U.ul_SetLuminosity(U.LuminosityRed - (f_lum - 1), U.LuminosityGreen - (f_lum - 1), U.LuminosityBlue - (f_lum + 1))
|
||||
else
|
||||
sd_SetLuminosity(fon * f_lum)
|
||||
ul_SetLuminosity(fon * f_lum)
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
scanmode = 0
|
||||
@@ -939,7 +939,7 @@
|
||||
if (src in M.contents)
|
||||
if(fon)
|
||||
fon = 0
|
||||
M.total_luminosity -= f_lum
|
||||
M.ul_SetLuminosity(M.LuminosityRed + (f_lum - 1), M.LuminosityGreen + (f_lum - 1), M.LuminosityBlue + (f_lum + 1))
|
||||
if(T)
|
||||
T.hotspot_expose(700,125)
|
||||
|
||||
|
||||
@@ -17,30 +17,30 @@
|
||||
..()
|
||||
if (on)
|
||||
icon_state = icon_on
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
src.ul_SetLuminosity(brightness_on, brightness_on, 0)
|
||||
else
|
||||
icon_state = icon_off
|
||||
src.sd_SetLuminosity(0)
|
||||
src.ul_SetLuminosity(0)
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
|
||||
if (on)
|
||||
icon_state = icon_on
|
||||
if(src.loc == user)
|
||||
user.total_luminosity += brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
|
||||
else if (isturf(src.loc))
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
src.ul_SetLuminosity(brightness_on, brightness_on, 0)
|
||||
|
||||
else
|
||||
icon_state = icon_off
|
||||
if(src.loc == user)
|
||||
user.total_luminosity -= brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
|
||||
else if (isturf(src.loc))
|
||||
src.sd_SetLuminosity(0)
|
||||
src.ul_SetLuminosity(0)
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
return
|
||||
// if(!isturf(user.loc))
|
||||
// user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
|
||||
// return
|
||||
on = !on
|
||||
update_brightness(user)
|
||||
return
|
||||
@@ -82,14 +82,14 @@
|
||||
|
||||
/obj/item/device/flashlight/pickup(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
src.sd_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
|
||||
src.ul_SetLuminosity(0)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity -= brightness_on
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
|
||||
src.ul_SetLuminosity(brightness_on)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
@@ -148,21 +148,19 @@
|
||||
item_state = "hardhat[on]_[color]"
|
||||
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
else
|
||||
user.total_luminosity -= brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - (brightness_on - 1), user.LuminosityBlue)
|
||||
|
||||
/obj/item/clothing/head/helmet/hardhat/pickup(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
ul_SetLuminosity(0)
|
||||
|
||||
/obj/item/clothing/head/helmet/hardhat/dropped(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity -= brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - (brightness_on - 1), user.LuminosityBlue)
|
||||
ul_SetLuminosity(brightness_on, brightness_on - 1, 0)
|
||||
|
||||
//RIG helmet light
|
||||
/obj/item/clothing/head/helmet/space/rig/attack_self(mob/user)
|
||||
@@ -174,21 +172,19 @@
|
||||
item_state = "rig[on]-[color]"
|
||||
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
else
|
||||
user.total_luminosity -= brightness_on
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/pickup(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity += brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
ul_SetLuminosity(0)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/dropped(mob/user)
|
||||
if(on)
|
||||
user.total_luminosity -= brightness_on
|
||||
user.UpdateLuminosity()
|
||||
src.sd_SetLuminosity(brightness_on)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
|
||||
ul_SetLuminosity(brightness_on, brightness_on-1, 0)
|
||||
|
||||
// the desk lamps are a bit special
|
||||
/obj/item/device/flashlight/lamp
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
for(var/mob/M in viewers(user))
|
||||
if(M == user) continue
|
||||
M << "[user] detaches the power sink from the cable."
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
icon_state = "powersink0"
|
||||
|
||||
return
|
||||
@@ -85,7 +85,7 @@
|
||||
if(M == user) continue
|
||||
M << "[user] deactivates the power sink!"
|
||||
mode = 1
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
icon_state = "powersink0"
|
||||
processing_objects.Remove(src)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
var/datum/powernet/PN = attached.get_powernet()
|
||||
if(PN)
|
||||
if(!luminosity)
|
||||
sd_SetLuminosity(12)
|
||||
ul_SetLuminosity(12)
|
||||
|
||||
|
||||
// found a powernet, so drain up to max power from it
|
||||
|
||||
@@ -975,10 +975,10 @@ steam.start() -- spawns the effect
|
||||
..()
|
||||
update_nearby_tiles(1)
|
||||
spawn(1)
|
||||
sd_NewOpacity(1)
|
||||
ul_SetOpacity(1)
|
||||
|
||||
Del()
|
||||
sd_NewOpacity(0)
|
||||
ul_SetOpacity(0)
|
||||
density = 0
|
||||
update_nearby_tiles(1)
|
||||
..()
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
icon_state = "glowshroomf"
|
||||
|
||||
spawn(2) //allows the luminosity and spread rate to be affected by potency at the moment of creation
|
||||
sd_SetLuminosity(potency/10)
|
||||
ul_SetLuminosity(potency/10)
|
||||
spawn(delay)
|
||||
if(src)
|
||||
Spread()
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
//src.damtype = "fire"
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(flavor_text, 1)
|
||||
sd_SetLuminosity(CANDLE_LUM)
|
||||
ul_SetLuminosity(CANDLE_LUM, CANDLE_LUM -2, 0)
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
@@ -74,20 +74,19 @@
|
||||
if(lit)
|
||||
lit = 0
|
||||
update_icon()
|
||||
sd_SetLuminosity(0)
|
||||
user.total_luminosity -= CANDLE_LUM
|
||||
ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - CANDLE_LUM, user.LuminosityGreen - (CANDLE_LUM - 2), user.LuminosityBlue)
|
||||
|
||||
|
||||
pickup(mob/user)
|
||||
if(lit)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.total_luminosity += CANDLE_LUM
|
||||
|
||||
ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + CANDLE_LUM, user.LuminosityGreen + (CANDLE_LUM - 2), user.LuminosityBlue)
|
||||
|
||||
dropped(mob/user)
|
||||
if(lit)
|
||||
user.total_luminosity -= CANDLE_LUM
|
||||
src.sd_SetLuminosity(CANDLE_LUM)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - CANDLE_LUM, user.LuminosityGreen - (CANDLE_LUM - 2), user.LuminosityBlue)
|
||||
src.ul_SetLuminosity(CANDLE_LUM, CANDLE_LUM, 0)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -441,7 +441,7 @@ ZIPPO
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message("\red After a few attempts, \the [user] manages to light \the [src], they however burn themself in the process.", 1)
|
||||
|
||||
user.total_luminosity += 2
|
||||
user.ul_SetLuminosity(user.LuminosityRed + 2, user.LuminosityGreen + 1, user.LuminosityBlue)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
src.lit = 0
|
||||
@@ -454,7 +454,7 @@ ZIPPO
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message("\red [user] quietly shuts off the [src].", 1)
|
||||
|
||||
user.total_luminosity -= 2
|
||||
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
|
||||
processing_objects.Remove(src)
|
||||
else
|
||||
return ..()
|
||||
@@ -483,13 +483,13 @@ ZIPPO
|
||||
|
||||
pickup(mob/user)
|
||||
if(lit)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.total_luminosity += 2
|
||||
ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + 2, user.LuminosityGreen + 1, user.LuminosityBlue)
|
||||
return
|
||||
|
||||
|
||||
dropped(mob/user)
|
||||
if(lit)
|
||||
user.total_luminosity -= 2
|
||||
src.sd_SetLuminosity(2)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
|
||||
ul_SetLuminosity(2)
|
||||
return
|
||||
|
||||
@@ -37,9 +37,9 @@ NOTEBOOK
|
||||
M << "\red \the [src] burns up."
|
||||
if(istype(src.loc,/mob))
|
||||
var/mob/M = src.loc
|
||||
M.total_luminosity -= 8
|
||||
M.ul_SetLuminosity(M.LuminosityRed - 8, M.LuminosityGreen - 6, M.LuminosityBlue)
|
||||
else
|
||||
src.sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
processing_objects.Remove(src)
|
||||
del(src)
|
||||
|
||||
@@ -53,13 +53,13 @@ NOTEBOOK
|
||||
|
||||
/obj/item/weapon/paper/pickup(mob/user)
|
||||
if(burning)
|
||||
src.sd_SetLuminosity(0)
|
||||
user.total_luminosity += 8
|
||||
src.ul_SetLuminosity(0)
|
||||
user.ul_SetLuminosity(user.LuminosityRed + 8, user.LuminosityGreen + 6, user.LuminosityBlue)
|
||||
|
||||
/obj/item/weapon/paper/dropped(mob/user)
|
||||
if(burning)
|
||||
user.total_luminosity -= 8
|
||||
src.sd_SetLuminosity(8)
|
||||
user.ul_SetLuminosity(user.LuminosityRed - 8, user.LuminosityGreen - 6, user.LuminosityBlue)
|
||||
src.ul_SetLuminosity(8,6,0)
|
||||
|
||||
/obj/item/weapon/paper/examine()
|
||||
set src in view()
|
||||
@@ -163,7 +163,7 @@ NOTEBOOK
|
||||
if(is_burn(P))
|
||||
for(var/mob/M in viewers(5, get_turf(src)))
|
||||
M << "\red [user] sets \the [src] on fire."
|
||||
user.total_luminosity += 8
|
||||
user.ul_SetLuminosity(user.LuminosityRed + 8, user.LuminosityGreen + 6, user.LuminosityBlue)
|
||||
burning = 1
|
||||
processing_objects.Add(src)
|
||||
update_icon()
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
sd_SetLuminosity(3)
|
||||
ul_SetLuminosity(3)
|
||||
|
||||
/obj/structure/mineral_door/sandstone
|
||||
mineralType = "sandstone"
|
||||
|
||||
@@ -191,20 +191,20 @@
|
||||
flick("fwall_opening", src)
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
var/turf/T = src.loc
|
||||
T.sd_LumReset()
|
||||
T.ul_Recalculate()
|
||||
|
||||
else
|
||||
icon_state = "wall"
|
||||
flick("fwall_closing", src)
|
||||
sleep(15)
|
||||
src.density = 1
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
var/turf/T = src.loc
|
||||
//T.sd_LumUpdate()
|
||||
src.relativewall()
|
||||
T.sd_LumReset()
|
||||
T.ul_Recalculate()
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -235,20 +235,20 @@
|
||||
flick("frwall_opening", src)
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
var/turf/T = src.loc
|
||||
T.sd_LumReset()
|
||||
T.ul_Recalculate()
|
||||
|
||||
else
|
||||
icon_state = "r_wall"
|
||||
flick("frwall_closing", src)
|
||||
sleep(15)
|
||||
src.density = 1
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
var/turf/T = src.loc
|
||||
//T.sd_LumUpdate()
|
||||
src.relativewall()
|
||||
T.sd_LumReset()
|
||||
T.ul_Recalculate()
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user