mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 06:28:01 +01:00
Port tg lighting system
Also converts planet lighting to a new system Too hard to separate out from this PR
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
density = 1
|
||||
w_class = ITEMSIZE_HUGE
|
||||
layer = UNDER_JUNK_LAYER
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
|
||||
var/opened = 0
|
||||
var/sealed = 0
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
density = 1
|
||||
anchored = 1
|
||||
health = 0 //destroying the statue kills the mob within
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
var/intialTox = 0 //these are here to keep the mob from taking damage from things that logically wouldn't affect a rock
|
||||
var/intialFire = 0 //it's a little sloppy I know but it was this or the GODMODE flag. Lesser of two evils.
|
||||
var/intialBrute = 0
|
||||
@@ -43,7 +44,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
..()
|
||||
|
||||
/obj/structure/closet/statue/process()
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
name = "weightlifting machine"
|
||||
desc = "A machine used to lift weights."
|
||||
icon_state = "weightlifter"
|
||||
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
|
||||
var/weight = 1
|
||||
var/list/qualifiers = list("with ease", "without any trouble", "with great effort")
|
||||
|
||||
|
||||
@@ -265,6 +265,7 @@
|
||||
icon = 'icons/obj/flora/deadtrees.dmi'
|
||||
icon_state = "tree_sif"
|
||||
base_state = "tree_sif"
|
||||
blocks_emissive = FALSE
|
||||
product = /obj/item/stack/material/log/sif
|
||||
catalogue_data = list(/datum/category_item/catalogue/flora/sif_tree)
|
||||
randomize_size = TRUE
|
||||
@@ -289,7 +290,10 @@
|
||||
update_icon()
|
||||
|
||||
/obj/structure/flora/tree/sif/update_icon()
|
||||
set_light(5 - light_shift, 1, "#33ccff") // 5 variants, missing bulbs. 5th has no bulbs, so no glow.
|
||||
var/image/glow = image(icon = icon, icon_state = "[base_state][light_shift]_glow")
|
||||
glow.plane = PLANE_LIGHTING_ABOVE
|
||||
overlays = list(glow)
|
||||
cut_overlays()
|
||||
var/bulbs = (5 - light_shift)
|
||||
if(bulbs > 0)
|
||||
set_light(bulbs, 1, "#33ccff") // 5 variants, missing bulbs. 5th has no bulbs, so no glow.
|
||||
add_overlay(mutable_appearance(icon, "[base_state][bulbs]_glow"))
|
||||
add_overlay(emissive_appearance(icon, "[base_state][bulbs]_glow"))
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/isSwitchingStates = 0
|
||||
var/hardness = 1
|
||||
var/oreAmount = 7
|
||||
|
||||
|
||||
/obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
@@ -20,13 +20,22 @@
|
||||
hardness -= material.combustion_effect(get_turf(src),temperature, 0.3)
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/simple_door/New(var/newloc, var/material_name)
|
||||
..()
|
||||
/obj/structure/simple_door/Initialize(mapload, var/material_name)
|
||||
. = ..()
|
||||
set_material(material_name)
|
||||
if(!material)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/structure/simple_door/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_nearby_tiles()
|
||||
return ..()
|
||||
|
||||
/obj/structure/simple_door/proc/set_material(var/material_name)
|
||||
if(!material_name)
|
||||
material_name = DEFAULT_WALL_MATERIAL
|
||||
material = get_material_by_name(material_name)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
hardness = max(1,round(material.integrity/10))
|
||||
icon_state = material.door_icon_base
|
||||
@@ -40,11 +49,6 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
/obj/structure/simple_door/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_nearby_tiles()
|
||||
return ..()
|
||||
|
||||
/obj/structure/simple_door/get_material()
|
||||
return material
|
||||
|
||||
@@ -198,38 +202,38 @@
|
||||
return
|
||||
SSradiation.radiate(src, round(material.radioactivity/3))
|
||||
|
||||
/obj/structure/simple_door/iron/New(var/newloc,var/material_name)
|
||||
..(newloc, "iron")
|
||||
/obj/structure/simple_door/iron/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "iron")
|
||||
|
||||
/obj/structure/simple_door/silver/New(var/newloc,var/material_name)
|
||||
..(newloc, "silver")
|
||||
/obj/structure/simple_door/silver/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "silver")
|
||||
|
||||
/obj/structure/simple_door/gold/New(var/newloc,var/material_name)
|
||||
..(newloc, "gold")
|
||||
/obj/structure/simple_door/gold/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "gold")
|
||||
|
||||
/obj/structure/simple_door/uranium/New(var/newloc,var/material_name)
|
||||
..(newloc, "uranium")
|
||||
/obj/structure/simple_door/uranium/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "uranium")
|
||||
|
||||
/obj/structure/simple_door/sandstone/New(var/newloc,var/material_name)
|
||||
..(newloc, "sandstone")
|
||||
/obj/structure/simple_door/sandstone/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "sandstone")
|
||||
|
||||
/obj/structure/simple_door/phoron/New(var/newloc,var/material_name)
|
||||
..(newloc, "phoron")
|
||||
/obj/structure/simple_door/phoron/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "phoron")
|
||||
|
||||
/obj/structure/simple_door/diamond/New(var/newloc,var/material_name)
|
||||
..(newloc, "diamond")
|
||||
/obj/structure/simple_door/diamond/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "diamond")
|
||||
|
||||
/obj/structure/simple_door/wood/New(var/newloc,var/material_name)
|
||||
..(newloc, MAT_WOOD)
|
||||
/obj/structure/simple_door/wood/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || MAT_WOOD)
|
||||
|
||||
/obj/structure/simple_door/sifwood/New(var/newloc,var/material_name)
|
||||
..(newloc, MAT_SIFWOOD)
|
||||
/obj/structure/simple_door/sifwood/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || MAT_SIFWOOD)
|
||||
|
||||
/obj/structure/simple_door/resin/New(var/newloc,var/material_name)
|
||||
..(newloc, "resin")
|
||||
/obj/structure/simple_door/resin/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "resin")
|
||||
|
||||
/obj/structure/simple_door/cult/New(var/newloc,var/material_name)
|
||||
..(newloc, "cult")
|
||||
/obj/structure/simple_door/cult/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "cult")
|
||||
|
||||
/obj/structure/simple_door/cult/TryToSwitchState(atom/user)
|
||||
if(isliving(user))
|
||||
|
||||
@@ -424,7 +424,7 @@
|
||||
return fulltile
|
||||
|
||||
/obj/structure/window/is_between_turfs(var/turf/origin, var/turf/target)
|
||||
if(fulltile)
|
||||
if(is_fulltile())
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
@@ -458,6 +458,8 @@
|
||||
|
||||
icon_state = "[basestate]"
|
||||
return
|
||||
else
|
||||
flags = 0 // Removes ON_BORDER and OPPOSITE_OPACITY
|
||||
var/list/dirs = list()
|
||||
if(anchored)
|
||||
for(var/obj/structure/window/W in orange(src,1))
|
||||
@@ -503,6 +505,7 @@
|
||||
icon_state = "window-full"
|
||||
maxhealth = 24
|
||||
fulltile = TRUE
|
||||
flags = 0
|
||||
|
||||
/obj/structure/window/phoronbasic
|
||||
name = "phoron window"
|
||||
@@ -520,6 +523,7 @@
|
||||
icon_state = "phoronwindow-full"
|
||||
maxhealth = 80
|
||||
fulltile = TRUE
|
||||
flags = 0
|
||||
|
||||
/obj/structure/window/phoronreinforced
|
||||
name = "reinforced borosilicate window"
|
||||
@@ -538,6 +542,7 @@
|
||||
icon_state = "phoronrwindow-full"
|
||||
maxhealth = 160
|
||||
fulltile = TRUE
|
||||
flags = 0
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
name = "reinforced window"
|
||||
@@ -555,6 +560,7 @@
|
||||
icon_state = "rwindow-full"
|
||||
maxhealth = 80
|
||||
fulltile = TRUE
|
||||
flags = 0
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
name = "tinted window"
|
||||
@@ -592,6 +598,7 @@
|
||||
icon_state = "rwindow-full"
|
||||
maxhealth = 80
|
||||
fulltile = TRUE
|
||||
flags = 0
|
||||
|
||||
/obj/structure/window/reinforced/polarized/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/device/multitool) && !anchored) // Only allow programming if unanchored!
|
||||
@@ -617,8 +624,8 @@
|
||||
else
|
||||
animate(src, color="#222222", time=5)
|
||||
set_opacity(1)
|
||||
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
T.recalculate_directional_opacity()
|
||||
|
||||
/obj/machinery/button/windowtint
|
||||
name = "window tint control"
|
||||
|
||||
Reference in New Issue
Block a user