Merge pull request #11357 from Markolie/lighting

Lighting system update
This commit is contained in:
Fox McCloud
2019-05-08 00:27:16 -04:00
committed by GitHub
223 changed files with 5497 additions and 5442 deletions
+12 -18
View File
@@ -174,14 +174,10 @@
var/list/SPECIALS = list(
/area/shuttle,
/area/admin,
/area/arrival,
/area/centcom,
/area/asteroid,
/area/tdome,
/area/syndicate_station,
/area/wizard_station,
/area/prison
// /area/derelict //commented out, all hail derelict-rebuilders!
/area/wizard_station
)
for(var/type in SPECIALS)
if( istype(A,type) )
@@ -211,23 +207,21 @@
return
var/area/A = new
A.name = str
//var/ma
//ma = A.master ? "[A.master]" : "(null)"
// to_chat(world, "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]")
A.power_equip = 0
A.power_light = 0
A.power_environ = 0
A.always_unpowered = 0
move_turfs_to_area(turfs, A)
A.power_equip = FALSE
A.power_light = FALSE
A.power_environ = FALSE
A.always_unpowered = FALSE
A.set_dynamic_lighting()
for(var/i in 1 to turfs.len)
var/turf/thing = turfs[i]
var/area/old_area = thing.loc
A.contents += thing
thing.change_area(old_area, A)
interact()
return
/obj/item/areaeditor/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A)
A.contents.Add(turfs)
/obj/item/areaeditor/proc/edit_area()
var/area/A = get_area()
var/prevname = "[sanitize(A.name)]"
@@ -76,7 +76,7 @@
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind
to_chat(user, "<span class='notice'>[M]'s pupils are unresponsive to the light!</span>")
else if((XRAY in M.mutations) || eyes.get_dark_view() >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
else if((XRAY in M.mutations) || eyes.see_in_dark >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
to_chat(user, "<span class='notice'>[M]'s pupils glow eerily!</span>")
else //they're okay!
if(M.flash_eyes(visual = 1))
@@ -3,7 +3,7 @@
desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
var/mobname = "Will Robinson"
activated = 0
var/static/list/stealth_areas = typecacheof(list(/area/syndicate_station, /area/syndicate_mothership, /area/shuttle/syndicate_elite))
var/static/list/stealth_areas = typecacheof(list(/area/syndicate_mothership, /area/shuttle/syndicate_elite))
/obj/item/implant/death_alarm/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
@@ -151,8 +151,8 @@
src.boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in src.contents)
O.screen_loc = "[cx],[cy]"
O.layer = 20
O.plane = HUD_PLANE
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
cx++
if(cx > mx)
cx = tx
@@ -171,8 +171,8 @@
ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.layer = 20
ND.sample_object.plane = HUD_PLANE
ND.sample_object.layer = ABOVE_HUD_LAYER
ND.sample_object.plane = ABOVE_HUD_PLANE
cx++
if(cx > (4+cols))
cx = 4
@@ -182,8 +182,8 @@
O.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = ""
O.layer = 20
O.plane = HUD_PLANE
O.layer = ABOVE_HUD_LAYER
O.plane = ABOVE_HUD_PLANE
cx++
if(cx > (4+cols))
cx = 4
@@ -333,8 +333,8 @@
if(ismob(loc))
W.dropped(usr)
if(ismob(new_location))
W.layer = 20
W.plane = HUD_PLANE
W.layer = ABOVE_HUD_LAYER
W.plane = ABOVE_HUD_PLANE
else
W.layer = initial(W.layer)
W.plane = initial(W.plane)
@@ -448,17 +448,18 @@
else
verbs -= /obj/item/storage/verb/toggle_gathering_mode
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "x"
src.closer.layer = 20
src.closer.plane = HUD_PLANE
boxes = new /obj/screen/storage( )
boxes.name = "storage"
boxes.master = src
boxes.icon_state = "block"
boxes.screen_loc = "7,7 to 10,8"
boxes.layer = HUD_LAYER
boxes.plane = HUD_PLANE
closer = new /obj/screen/close( )
closer.master = src
closer.icon_state = "x"
closer.layer = ABOVE_HUD_LAYER
closer.plane = ABOVE_HUD_PLANE
orient2hud()
/obj/item/storage/Destroy()
@@ -470,7 +471,7 @@
return ..()
/obj/item/storage/emp_act(severity)
if(!istype(src.loc, /mob/living))
if(!istype(loc, /mob/living))
for(var/obj/O in contents)
O.emp_act(severity)
..()