mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 23:48:28 +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:
+12
-10
@@ -14,9 +14,9 @@
|
||||
uid = ++global_uid
|
||||
spawn(1)
|
||||
//world.log << "New: [src] [tag]"
|
||||
var/sd_created = findtext(tag,"sd_L")
|
||||
sd_New(sd_created)
|
||||
if(sd_created)
|
||||
var/ul_created = findtext(tag,":UL")
|
||||
ul_Prep()
|
||||
if(ul_created)
|
||||
related += src
|
||||
return
|
||||
related = list(src)
|
||||
@@ -27,22 +27,24 @@
|
||||
if(name == "Space") // override defaults for space
|
||||
requires_power = 1
|
||||
always_unpowered = 1
|
||||
sd_SetLuminosity(1)
|
||||
LightLevels = list("Red" = 2, "Green" = 2, "Blue" = 3)
|
||||
power_light = 0
|
||||
power_equip = 0
|
||||
power_environ = 0
|
||||
//has_gravity = 0 // Space has gravity. Because.. because.
|
||||
|
||||
if(!requires_power)
|
||||
else if(!requires_power)
|
||||
power_light = 0//rastaf0
|
||||
power_equip = 0//rastaf0
|
||||
power_environ = 0//rastaf0
|
||||
luminosity = 1
|
||||
sd_lighting = 0 // *DAL*
|
||||
if(!ul_Lighting)
|
||||
luminosity = 1
|
||||
else
|
||||
luminosity = 0
|
||||
area_lights_luminosity = rand(6,9)
|
||||
//sd_SetLuminosity(0) // *DAL*
|
||||
area_lights_luminosity = rand(5,7)
|
||||
if(LightLevels)
|
||||
ul_Light()
|
||||
//ul_SetLuminosity(0) // *DAL*
|
||||
|
||||
|
||||
|
||||
@@ -401,7 +403,7 @@
|
||||
other_related -= other_master
|
||||
var/list/total_contents = list()
|
||||
for(var/area/RA in other_related)
|
||||
RA.sd_lighting = 0
|
||||
// RA.ul_lighting = 0
|
||||
total_contents |= RA.contents
|
||||
del RA.contents
|
||||
del RA.related
|
||||
|
||||
@@ -477,7 +477,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
update_icon()
|
||||
|
||||
if (!istype(src, /obj/machinery/door/airlock/glass))
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
src.operating = 0
|
||||
return
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
@@ -494,7 +494,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
update_icon()
|
||||
|
||||
if (!istype(src, /obj/machinery/door/airlock/glass))
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
src.operating = 0
|
||||
return
|
||||
|
||||
@@ -513,7 +513,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
update_icon()
|
||||
|
||||
if ((src.visible) && (!istype(src, /obj/machinery/door/airlock/glass)))
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
src.operating = 0
|
||||
else
|
||||
user << "\red You need to be wielding the Fire axe to do that."
|
||||
@@ -527,7 +527,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }.
|
||||
update_icon()
|
||||
|
||||
if ((src.visible) && (!istype(src, /obj/machinery/door/airlock/glass)))
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
src.operating = 0
|
||||
|
||||
else
|
||||
|
||||
@@ -249,12 +249,12 @@
|
||||
if(!src.operating) //in case of emag
|
||||
src.operating = 1
|
||||
animate("opening")
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
sleep(10)
|
||||
src.layer = 2.7
|
||||
src.density = 0
|
||||
update_icon()
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
@@ -332,7 +332,7 @@
|
||||
update_icon()
|
||||
|
||||
if(src.visible && (!src.glass))
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
if(operating == 1)
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
src.icon_state = "pdoor0"
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
src.operating = 0
|
||||
return
|
||||
return
|
||||
@@ -38,7 +38,7 @@
|
||||
src.icon_state = "pdoor0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
@@ -56,7 +56,7 @@
|
||||
src.icon_state = "pdoor1"
|
||||
src.density = 1
|
||||
if (src.visible)
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
@@ -74,12 +74,12 @@
|
||||
src.icon_state = "pdoor0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
|
||||
f1.density = 0
|
||||
f1.sd_SetOpacity(0)
|
||||
f1.ul_SetOpacity(0)
|
||||
f2.density = 0
|
||||
f2.sd_SetOpacity(0)
|
||||
f2.ul_SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
|
||||
@@ -99,12 +99,12 @@
|
||||
src.density = 1
|
||||
|
||||
f1.density = 1
|
||||
f1.sd_SetOpacity(1)
|
||||
f1.ul_SetOpacity(1)
|
||||
f2.density = 1
|
||||
f2.sd_SetOpacity(1)
|
||||
f2.ul_SetOpacity(1)
|
||||
|
||||
if (src.visible)
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
@@ -122,16 +122,16 @@
|
||||
src.icon_state = "pdoor0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
|
||||
f1.density = 0
|
||||
f1.sd_SetOpacity(0)
|
||||
f1.ul_SetOpacity(0)
|
||||
f2.density = 0
|
||||
f2.sd_SetOpacity(0)
|
||||
f2.ul_SetOpacity(0)
|
||||
f3.density = 0
|
||||
f3.sd_SetOpacity(0)
|
||||
f3.ul_SetOpacity(0)
|
||||
f4.density = 0
|
||||
f4.sd_SetOpacity(0)
|
||||
f4.ul_SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
|
||||
@@ -151,16 +151,16 @@
|
||||
src.density = 1
|
||||
|
||||
f1.density = 1
|
||||
f1.sd_SetOpacity(1)
|
||||
f1.ul_SetOpacity(1)
|
||||
f2.density = 1
|
||||
f2.sd_SetOpacity(1)
|
||||
f2.ul_SetOpacity(1)
|
||||
f3.density = 1
|
||||
f3.sd_SetOpacity(1)
|
||||
f3.ul_SetOpacity(1)
|
||||
f4.density = 1
|
||||
f4.sd_SetOpacity(1)
|
||||
f4.ul_SetOpacity(1)
|
||||
|
||||
if (src.visible)
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
@@ -178,12 +178,12 @@
|
||||
src.icon_state = "pdoor0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
|
||||
f1.density = 0
|
||||
f1.sd_SetOpacity(0)
|
||||
f1.ul_SetOpacity(0)
|
||||
f2.density = 0
|
||||
f2.sd_SetOpacity(0)
|
||||
f2.ul_SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
|
||||
@@ -203,12 +203,12 @@
|
||||
src.density = 1
|
||||
|
||||
f1.density = 1
|
||||
f1.sd_SetOpacity(1)
|
||||
f1.ul_SetOpacity(1)
|
||||
f2.density = 1
|
||||
f2.sd_SetOpacity(1)
|
||||
f2.ul_SetOpacity(1)
|
||||
|
||||
if (src.visible)
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
@@ -226,16 +226,16 @@
|
||||
src.icon_state = "pdoor0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
|
||||
f1.density = 0
|
||||
f1.sd_SetOpacity(0)
|
||||
f1.ul_SetOpacity(0)
|
||||
f2.density = 0
|
||||
f2.sd_SetOpacity(0)
|
||||
f2.ul_SetOpacity(0)
|
||||
f3.density = 0
|
||||
f3.sd_SetOpacity(0)
|
||||
f3.ul_SetOpacity(0)
|
||||
f4.density = 0
|
||||
f4.sd_SetOpacity(0)
|
||||
f4.ul_SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
|
||||
@@ -255,16 +255,16 @@
|
||||
src.density = 1
|
||||
|
||||
f1.density = 1
|
||||
f1.sd_SetOpacity(1)
|
||||
f1.ul_SetOpacity(1)
|
||||
f2.density = 1
|
||||
f2.sd_SetOpacity(1)
|
||||
f2.ul_SetOpacity(1)
|
||||
f3.density = 1
|
||||
f3.sd_SetOpacity(1)
|
||||
f3.ul_SetOpacity(1)
|
||||
f4.density = 1
|
||||
f4.sd_SetOpacity(1)
|
||||
f4.ul_SetOpacity(1)
|
||||
|
||||
if (src.visible)
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
@@ -285,8 +285,8 @@
|
||||
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,EAST))
|
||||
f1.density = density
|
||||
f2.density = density
|
||||
f1.sd_SetOpacity(opacity)
|
||||
f2.sd_SetOpacity(opacity)
|
||||
f1.ul_SetOpacity(opacity)
|
||||
f2.ul_SetOpacity(opacity)
|
||||
|
||||
Del()
|
||||
del f1
|
||||
@@ -304,8 +304,8 @@
|
||||
f2 = new/obj/machinery/door/poddoor/filler_object (get_step(src,NORTH))
|
||||
f1.density = density
|
||||
f2.density = density
|
||||
f1.sd_SetOpacity(opacity)
|
||||
f2.sd_SetOpacity(opacity)
|
||||
f1.ul_SetOpacity(opacity)
|
||||
f2.ul_SetOpacity(opacity)
|
||||
|
||||
Del()
|
||||
del f1
|
||||
@@ -329,10 +329,10 @@
|
||||
f2.density = density
|
||||
f3.density = density
|
||||
f4.density = density
|
||||
f1.sd_SetOpacity(opacity)
|
||||
f2.sd_SetOpacity(opacity)
|
||||
f4.sd_SetOpacity(opacity)
|
||||
f3.sd_SetOpacity(opacity)
|
||||
f1.ul_SetOpacity(opacity)
|
||||
f2.ul_SetOpacity(opacity)
|
||||
f4.ul_SetOpacity(opacity)
|
||||
f3.ul_SetOpacity(opacity)
|
||||
|
||||
Del()
|
||||
del f1
|
||||
@@ -358,10 +358,10 @@
|
||||
f2.density = density
|
||||
f3.density = density
|
||||
f4.density = density
|
||||
f1.sd_SetOpacity(opacity)
|
||||
f2.sd_SetOpacity(opacity)
|
||||
f4.sd_SetOpacity(opacity)
|
||||
f3.sd_SetOpacity(opacity)
|
||||
f1.ul_SetOpacity(opacity)
|
||||
f2.ul_SetOpacity(opacity)
|
||||
f4.ul_SetOpacity(opacity)
|
||||
f3.ul_SetOpacity(opacity)
|
||||
|
||||
Del()
|
||||
del f1
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
src.icon_state = "shutter0"
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
src.operating = 0
|
||||
return
|
||||
return
|
||||
@@ -34,7 +34,7 @@
|
||||
src.icon_state = "shutter0"
|
||||
sleep(10)
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
@@ -52,7 +52,7 @@
|
||||
src.icon_state = "shutter1"
|
||||
src.density = 1
|
||||
if (src.visible)
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
sleep(10)
|
||||
|
||||
src.density = 0
|
||||
src.sd_SetOpacity(0)
|
||||
src.ul_SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
src.density = 1
|
||||
if (src.visible)
|
||||
src.sd_SetOpacity(1)
|
||||
src.ul_SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
|
||||
@@ -24,17 +24,17 @@
|
||||
|
||||
/obj/machinery/flasher/New()
|
||||
sleep(4)
|
||||
src.sd_SetLuminosity(2)
|
||||
src.ul_SetLuminosity(2)
|
||||
|
||||
/obj/machinery/flasher/power_change()
|
||||
if ( powered() )
|
||||
stat &= ~NOPOWER
|
||||
icon_state = "[base_state]1"
|
||||
src.sd_SetLuminosity(2)
|
||||
src.ul_SetLuminosity(2)
|
||||
else
|
||||
stat |= ~NOPOWER
|
||||
icon_state = "[base_state]1-p"
|
||||
src.sd_SetLuminosity(0)
|
||||
src.ul_SetLuminosity(0)
|
||||
|
||||
//Don't want to render prison breaks impossible
|
||||
/obj/machinery/flasher/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
@@ -16,17 +16,17 @@
|
||||
if (!on)
|
||||
if (luminosity)
|
||||
updateicon()
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
return
|
||||
|
||||
if(!luminosity && cell && cell.charge > 0)
|
||||
sd_SetLuminosity(10)
|
||||
ul_SetLuminosity(10)
|
||||
updateicon()
|
||||
|
||||
if(!cell && luminosity)
|
||||
on = 0
|
||||
updateicon()
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
return
|
||||
|
||||
cell.charge -= use
|
||||
@@ -34,7 +34,7 @@
|
||||
if(cell.charge <= 0 && luminosity)
|
||||
on = 0
|
||||
updateicon()
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
return
|
||||
|
||||
/obj/machinery/floodlight/attack_hand(mob/user as mob)
|
||||
|
||||
@@ -72,20 +72,20 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
hologram.icon = A.holo_icon
|
||||
hologram.mouse_opacity = 0//So you can't click on it.
|
||||
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
hologram.sd_SetLuminosity(1)//To make it glowy.
|
||||
hologram.ul_SetLuminosity(1)//To make it glowy.
|
||||
hologram.anchored = 1//So space wind cannot drag it.
|
||||
hologram.name = "AI hologram"//If someone decides to right click.
|
||||
sd_SetLuminosity(1)//To make the pad glowy.
|
||||
ul_SetLuminosity(0,0,1)//To make the pad glowy.
|
||||
icon_state = "holopad1"
|
||||
master = A//AI is the master.
|
||||
use_power = 2//Active power usage.
|
||||
return 1
|
||||
|
||||
/obj/machinery/hologram/holopad/proc/clear_holo()
|
||||
hologram.sd_SetLuminosity(0)//Clear lighting.
|
||||
hologram.ul_SetLuminosity(0)//Clear lighting.
|
||||
del(hologram)//Get rid of hologram.
|
||||
master = null//Null the master, since no-one is using it now.
|
||||
sd_SetLuminosity(0)//Clear lighting for the parent.
|
||||
ul_SetLuminosity(0)//Clear lighting for the parent.
|
||||
icon_state = "holopad0"
|
||||
use_power = 1//Passive power usage.
|
||||
return 1
|
||||
|
||||
@@ -179,12 +179,12 @@ obj/machinery/hydroponics/proc/updateicon()
|
||||
|
||||
if(myseed)
|
||||
if(luminosity && !istype(myseed,/obj/item/seeds/glowshroom)) //revert luminosity to 0
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
else if(!luminosity && istype(myseed,/obj/item/seeds/glowshroom)) //update luminosity
|
||||
sd_SetLuminosity(myseed.potency/10)
|
||||
ul_SetLuminosity(myseed.potency/10)
|
||||
else
|
||||
if(luminosity)
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
return
|
||||
|
||||
|
||||
@@ -1014,10 +1014,10 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
|
||||
if(myseed)
|
||||
if(luminosity && !istype(myseed,/obj/item/seeds/glowshroom))
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
else if(!luminosity && istype(myseed,/obj/item/seeds/glowshroom))
|
||||
sd_SetLuminosity(myseed.potency/10)
|
||||
ul_SetLuminosity(myseed.potency/10)
|
||||
else
|
||||
if(luminosity)
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
return
|
||||
@@ -53,11 +53,11 @@
|
||||
if ( powered() && disable == 0 )
|
||||
stat &= ~NOPOWER
|
||||
icon_state = "[base_state]"
|
||||
src.sd_SetLuminosity(2)
|
||||
src.ul_SetLuminosity(2)
|
||||
else
|
||||
stat |= ~NOPOWER
|
||||
icon_state = "[base_state]-p"
|
||||
src.sd_SetLuminosity(0)
|
||||
src.ul_SetLuminosity(0)
|
||||
|
||||
/obj/machinery/sparker/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
|
||||
@@ -427,7 +427,7 @@
|
||||
if(A && B)
|
||||
needs_power = 1
|
||||
spawn(1)
|
||||
src.sd_SetLuminosity(3)
|
||||
src.ul_SetLuminosity(3)
|
||||
|
||||
/* for(var/mob/M as mob in src.loc) //does not work for some reason.
|
||||
if(istype(M,/mob/living/carbon))
|
||||
|
||||
@@ -59,8 +59,6 @@ datum/controller/game_controller
|
||||
|
||||
setupgenetics()
|
||||
|
||||
setupdooralarms()
|
||||
|
||||
// for(var/i = 0, i < max_secret_rooms, i++)
|
||||
// make_mining_asteroid_secret()
|
||||
// Because energy cutlasses, facehuggers, and empty rooms are silly. FOR NOW. - Erthilo
|
||||
@@ -104,6 +102,8 @@ datum/controller/game_controller
|
||||
new /obj/structure/closet/emcloset(loc)
|
||||
emclosetcount--
|
||||
|
||||
setupdooralarms()
|
||||
|
||||
world << "\red \b Initializations complete."
|
||||
|
||||
|
||||
|
||||
@@ -942,9 +942,9 @@
|
||||
return
|
||||
lights = !lights
|
||||
if(lights)
|
||||
src.sd_SetLuminosity(src.luminosity + src.lights_power)
|
||||
src.ul_SetLuminosity(src.luminosity + src.lights_power)
|
||||
else
|
||||
src.sd_SetLuminosity(src.luminosity - src.lights_power)
|
||||
src.ul_SetLuminosity(src.luminosity - src.lights_power)
|
||||
src.log_message("Toggled lights.")
|
||||
return
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -20,18 +20,18 @@ var/supply_shuttle_points = 50
|
||||
var/ordernum=0
|
||||
var/list/supply_groups = new()
|
||||
|
||||
/area/supply/station //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
/area/supply/station //DO NOT TURN THE ul_Lighting STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
name = "supply shuttle"
|
||||
icon_state = "shuttle3"
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
ul_Lighting = 0
|
||||
requires_power = 0
|
||||
|
||||
/area/supply/dock //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
/area/supply/dock //DO NOT TURN THE ul_Lighting STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
name = "supply shuttle"
|
||||
icon_state = "shuttle3"
|
||||
luminosity = 1
|
||||
sd_lighting = 0
|
||||
ul_Lighting = 0
|
||||
requires_power = 0
|
||||
|
||||
//SUPPLY PACKS MOVED TO /code/defines/obj/supplypacks.dm
|
||||
|
||||
+12
-14
@@ -162,7 +162,7 @@
|
||||
|
||||
if (!explode)
|
||||
W.opacity = 1
|
||||
W.sd_SetOpacity(0)
|
||||
W.ul_SetOpacity(0)
|
||||
//This is probably gonna make lighting go a bit wonky in bombed areas, but sd_SetOpacity was the primary reason bombs have been so laggy. --NEO
|
||||
W.levelupdate()
|
||||
air_master.tiles_to_update |= W
|
||||
@@ -191,7 +191,7 @@
|
||||
if(prior_icon) W.icon_state = prior_icon
|
||||
else W.icon_state = "plating"
|
||||
W.opacity = 1
|
||||
W.sd_SetOpacity(0)
|
||||
W.ul_SetOpacity(0)
|
||||
W.levelupdate()
|
||||
air_master.tiles_to_update |= W
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
var/turf/simulated/wall/S = new /turf/simulated/wall( locate(src.x, src.y, src.z) )
|
||||
S.icon_old = old_icon
|
||||
S.opacity = 0
|
||||
S.sd_NewOpacity(1)
|
||||
S.ul_SetOpacity(1)
|
||||
levelupdate()
|
||||
air_master.tiles_to_update |= S
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
var/turf/simulated/wall/r_wall/S = new /turf/simulated/wall/r_wall( locate(src.x, src.y, src.z) )
|
||||
S.icon_old = old_icon
|
||||
S.opacity = 0
|
||||
S.sd_NewOpacity(1)
|
||||
S.ul_SetOpacity(1)
|
||||
levelupdate()
|
||||
air_master.tiles_to_update |= S
|
||||
|
||||
@@ -851,7 +851,7 @@
|
||||
|
||||
spawn(100)
|
||||
if(O) del(O)
|
||||
F.sd_LumReset()
|
||||
F.ul_Recalculate()
|
||||
return
|
||||
|
||||
/turf/simulated/wall/meteorhit(obj/M as obj)
|
||||
@@ -895,8 +895,6 @@ var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3
|
||||
airless
|
||||
icon_state = "floor"
|
||||
name = "airless floor"
|
||||
oxygen = 0.01
|
||||
nitrogen = 0.01
|
||||
temperature = TCMB
|
||||
|
||||
New()
|
||||
@@ -1055,19 +1053,19 @@ turf/simulated/floor/proc/update_icon()
|
||||
switch(T.state)
|
||||
if(0)
|
||||
icon_state = "light_on"
|
||||
sd_SetLuminosity(5)
|
||||
ul_SetLuminosity(5)
|
||||
if(1)
|
||||
var/num = pick("1","2","3","4")
|
||||
icon_state = "light_on_flicker[num]"
|
||||
sd_SetLuminosity(5)
|
||||
ul_SetLuminosity(5)
|
||||
if(2)
|
||||
icon_state = "light_on_broken"
|
||||
sd_SetLuminosity(5)
|
||||
ul_SetLuminosity(5)
|
||||
if(3)
|
||||
icon_state = "light_off"
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
else
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
icon_state = "light_off"
|
||||
if(is_grass_floor())
|
||||
if(!broken && !burnt)
|
||||
@@ -1215,7 +1213,7 @@ turf/simulated/floor/return_siding_icon_state()
|
||||
if(!floor_tile) return
|
||||
del(floor_tile)
|
||||
icon_plating = "plating"
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
floor_tile = null
|
||||
intact = 0
|
||||
broken = 0
|
||||
@@ -1231,7 +1229,7 @@ turf/simulated/floor/return_siding_icon_state()
|
||||
broken = 0
|
||||
burnt = 0
|
||||
intact = 1
|
||||
sd_SetLuminosity(0)
|
||||
ul_SetLuminosity(0)
|
||||
if(T)
|
||||
if(istype(T,/obj/item/stack/tile/plasteel))
|
||||
floor_tile = T
|
||||
|
||||
Reference in New Issue
Block a user