mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge pull request #11357 from Markolie/lighting
Lighting system update
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
return FALSE
|
||||
|
||||
/obj/effect/decal
|
||||
plane = FLOOR_PLANE
|
||||
var/no_scoop = FALSE //if it has this, don't let it be scooped up
|
||||
var/no_clear = FALSE //if it has this, don't delete it when its' scooped up
|
||||
var/list/scoop_reagents = null
|
||||
|
||||
@@ -92,4 +92,36 @@
|
||||
name = "horrific experiment"
|
||||
desc = "Some sort of pod filled with blood and vicerea. You swear you can see it moving..."
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "pod_g"
|
||||
icon_state = "pod_g"
|
||||
|
||||
|
||||
//Makes a tile fully lit no matter what
|
||||
/obj/effect/fullbright
|
||||
icon = 'icons/effects/alphacolors.dmi'
|
||||
icon_state = "white"
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTING_LAYER
|
||||
blend_mode = BLEND_ADD
|
||||
|
||||
|
||||
/obj/effect/dummy/lighting_obj
|
||||
name = "lighting fx obj"
|
||||
desc = "Tell a coder if you're seeing this."
|
||||
icon_state = "nothing"
|
||||
light_color = "#FFFFFF"
|
||||
light_range = MINIMUM_USEFUL_LIGHT_RANGE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/dummy/lighting_obj/Initialize(mapload, _color, _range, _power, _duration)
|
||||
. = ..()
|
||||
set_light(_range ? _range : light_range, _power ? _power : light_power, _color ? _color : light_color)
|
||||
if(_duration)
|
||||
QDEL_IN(src, _duration)
|
||||
|
||||
/obj/effect/dummy/lighting_obj/moblight
|
||||
name = "mob lighting fx"
|
||||
|
||||
/obj/effect/dummy/lighting_obj/moblight/Initialize(mapload, _color, _range, _power, _duration)
|
||||
. = ..()
|
||||
if(!ismob(loc))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
@@ -37,4 +37,5 @@
|
||||
|
||||
/obj/effect/temp_visual/cult/turf/open/floor
|
||||
icon_state = "floorglow"
|
||||
duration = 5
|
||||
duration = 5
|
||||
plane = FLOOR_PLANE
|
||||
@@ -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)
|
||||
..()
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = TURF_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
icon_state = "weeds"
|
||||
max_integrity = 15
|
||||
var/obj/structure/alien/weeds/node/linked_node = null
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
anchored = 1.0
|
||||
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
layer = 2.3 //under pipes
|
||||
plane = FLOOR_PLANE
|
||||
// flags = CONDUCT
|
||||
|
||||
/obj/structure/lattice/New()
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/obj/structure/chair/proc/handle_layer()
|
||||
if(buckled_mob && dir == NORTH)
|
||||
layer = FLY_LAYER
|
||||
layer = ABOVE_MOB_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
|
||||
/obj/proc/color_windows(obj/W)
|
||||
var/list/wcBarAreas = list(/area/crew_quarters/bar)
|
||||
var/list/wcBrigAreas = list(/area/security,/area/prison,/area/shuttle/gamma)
|
||||
var/list/wcBrigAreas = list(/area/security, /area/shuttle/gamma)
|
||||
|
||||
var/newcolor
|
||||
var/turf/T = get_turf(W)
|
||||
|
||||
Reference in New Issue
Block a user