diff --git a/code/__defines/flags.dm b/code/__defines/flags.dm index aa2db4bb1b4..8ac15ebc535 100644 --- a/code/__defines/flags.dm +++ b/code/__defines/flags.dm @@ -16,8 +16,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 /* Directions */ ///All the cardinal direction bitflags. #define ALL_CARDINALS (NORTH|SOUTH|EAST|WEST) -///All the dirs except UP and DOWN -#define ALL_FLAT_DIRS (NORTH|SOUTH|EAST|WEST|NORTHWEST|SOUTHWEST|NORTHEAST|SOUTHEAST) // datum_flags #define DF_VAR_EDITED (1<<0) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 2d82dc60711..728859eee76 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -46,6 +46,8 @@ if(opacity) AddElement(/datum/element/light_blocking) switch(light_system) + if(STATIC_LIGHT) + update_light() if(MOVABLE_LIGHT) AddComponent(/datum/component/overlay_lighting, starts_on = light_on) if(MOVABLE_LIGHT_DIRECTIONAL) @@ -53,9 +55,6 @@ /atom/movable/Destroy() . = ..() - if(reagents) - qdel(reagents) - reagents = null for(var/atom/movable/AM in contents) qdel(AM) diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm index 954361fb9f7..aea5270f959 100644 --- a/code/game/gamemodes/cult/construct_spells.dm +++ b/code/game/gamemodes/cult/construct_spells.dm @@ -629,6 +629,7 @@ proc/findNullRod(var/atom/target) light_range = 4 light_power = 5 light_color = "#FF0000" + light_on = TRUE pulses_remaining = 10 pulse_delay = 1 SECOND @@ -650,6 +651,7 @@ proc/findNullRod(var/atom/target) aspect = ASPECT_UNHOLY light_color = "#FF5C5C" light_power = -2 + light_on = TRUE /obj/item/weapon/spell/construct/mend_occult/on_melee_cast(atom/hit_atom, mob/living/user, def_zone) if(isliving(hit_atom)) @@ -666,6 +668,7 @@ proc/findNullRod(var/atom/target) aspect = ASPECT_UNHOLY light_color = "#FF5C5C" light_power = -2 + light_on = TRUE cooldown = 15 /obj/item/weapon/spell/construct/slam/on_melee_cast(atom/hit_atom, mob/living/user, def_zone) diff --git a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm index d83602aa68b..f54f9b75025 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/darkness.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/darkness.dm @@ -27,4 +27,5 @@ time_to_die = 2 MINUTES invisibility = 101 light_range = 6 - light_power = -20 \ No newline at end of file + light_power = -20 + light_on = TRUE \ No newline at end of file diff --git a/code/game/gamemodes/technomancer/spells/spawner/destablize.dm b/code/game/gamemodes/technomancer/spells/spawner/destablize.dm index aee8d2557b9..9bf6b072812 100644 --- a/code/game/gamemodes/technomancer/spells/spawner/destablize.dm +++ b/code/game/gamemodes/technomancer/spells/spawner/destablize.dm @@ -31,6 +31,7 @@ light_range = 6 light_power = 20 light_color = "#C26DDE" + light_on = TRUE var/pulses_remaining = 40 // Lasts 20 seconds. var/instability_power = 5 var/instability_range = 6 diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm index 18322bf3085..2d399b81aa5 100644 --- a/code/game/machinery/doors/blast_door.dm +++ b/code/game/machinery/doors/blast_door.dm @@ -397,10 +397,6 @@ obj/machinery/door/blast/gate/open T.set_opacity(new_opacity) update_nearby_tiles() -/obj/machinery/door/blast/multi_tile/Destroy() - UnregisterSignal(src, COMSIG_MOVABLE_MOVED) - return ..() - /obj/machinery/door/blast/multi_tile icon_state_open = "open" icon_state_opening = "opening" diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm index 836e277872f..91aea937fff 100644 --- a/code/game/objects/effects/alien/aliens.dm +++ b/code/game/objects/effects/alien/aliens.dm @@ -203,6 +203,7 @@ desc = "Weird glowing organic growth." layer = ABOVE_TURF_LAYER+0.01 light_range = NODERANGE + light_on = TRUE var/node_range = NODERANGE var/set_color = "#321D37" diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 151cf5b47c6..f18eb727ebf 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -4,7 +4,8 @@ defined, then set up when it is created with New(). Then this same system can ju it needs to create more trails.A beaker could have a steam_trail_follow system set up, then the steam would spawn and follow the beaker, even if it is carried or thrown. */ - +/obj/effect + light_on = TRUE /obj/effect/effect name = "effect" @@ -13,6 +14,7 @@ would spawn and follow the beaker, even if it is carried or thrown. unacidable = 1//So effect are not targeted by alien acid. pass_flags = PASSTABLE | PASSGRILLE blocks_emissive = EMISSIVE_BLOCK_GENERIC + light_on = TRUE /datum/effect/effect/system var/number = 3 diff --git a/code/game/objects/effects/map_effects/perma_light.dm b/code/game/objects/effects/map_effects/perma_light.dm index bf23f5b17a4..35eef6d6b0b 100644 --- a/code/game/objects/effects/map_effects/perma_light.dm +++ b/code/game/objects/effects/map_effects/perma_light.dm @@ -7,6 +7,7 @@ light_range = 3 light_power = 1 light_color = "#FFFFFF" + light_on = TRUE /obj/effect/map_effect/perma_light/brighter name = "permanent light (bright)" diff --git a/code/game/objects/structures/flora/flora.dm b/code/game/objects/structures/flora/flora.dm index 9195de1767f..e73e2a17580 100644 --- a/code/game/objects/structures/flora/flora.dm +++ b/code/game/objects/structures/flora/flora.dm @@ -313,6 +313,7 @@ light_range = 2 light_power = 0.6 light_color = "#33CCFF" + light_on = TRUE catalogue_data = list(/datum/category_item/catalogue/flora/sif_tree) /obj/structure/flora/pottedplant/orientaltree @@ -372,6 +373,7 @@ light_range = 2 light_power = 0.6 light_color = "#FF6633" + light_on = TRUE /obj/structure/flora/pottedplant/minitree name = "potted tree" @@ -439,6 +441,7 @@ light_range = 2 light_power = 0.6 light_color = "#FF6633" + light_on = TRUE catalogue_data = list(/datum/category_item/catalogue/flora/subterranean_bulbs) /obj/structure/flora/sif/subterranean/Initialize() diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 2e6099aec25..1d37f4b47ab 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -30,7 +30,6 @@ thermal_conductivity = 0.040 heat_capacity = 10000 - var/lava = 0 /turf/simulated/floor/is_plating() return (!flooring || flooring.is_plating) diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index e82edc294de..d975f81090d 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -11,10 +11,6 @@ var/image/no_ceiling_image = null no_ceiling_image.plane = PLANE_MESONS /turf/simulated/floor/update_icon(var/update_neighbors) - - if(lava) - return - cut_overlays() if(flooring) diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index 437912b4d26..e5c4391e642 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -214,11 +214,13 @@ light_range = 3 light_power = 0.6 light_color = "#66ffff" // Bright cyan. + light_on = TRUE block_tele = TRUE /turf/simulated/shuttle/floor/alien/Initialize() . = ..() icon_state = "alienpod[rand(1, 9)]" + update_light() /turf/simulated/shuttle/floor/alienplating icon_state = "alienplating" diff --git a/code/game/turfs/simulated/lava.dm b/code/game/turfs/simulated/lava.dm index 22b79272b87..67524c05ef0 100644 --- a/code/game/turfs/simulated/lava.dm +++ b/code/game/turfs/simulated/lava.dm @@ -10,6 +10,7 @@ light_range = 2 light_power = 0.75 light_color = LIGHT_COLOR_LAVA + light_on = TRUE movement_cost = 2 can_build_into_floor = TRUE can_dirty = FALSE @@ -23,6 +24,7 @@ if(!outdoors) name = "magma" update_icon() + update_light() return ..() /turf/simulated/floor/lava/make_outdoors() diff --git a/code/game/turfs/simulated/wall_types.dm b/code/game/turfs/simulated/wall_types.dm index 4ead21508b7..0f7b4bb60cd 100644 --- a/code/game/turfs/simulated/wall_types.dm +++ b/code/game/turfs/simulated/wall_types.dm @@ -156,8 +156,13 @@ light_range = 3 light_power = 0.75 light_color = "#ff0066" // Pink-ish + light_on = TRUE block_tele = TRUE // Will be used for dungeons so this is needed to stop cheesing with handteles. +/turf/simulated/shuttle/wall/alien/Initialize() + . = ..() + update_light() + /turf/simulated/shuttle/wall/alien/hard_corner name = "hardcorner wall" icon_state = "alien-hc" diff --git a/code/modules/clothing/head/hood.dm b/code/modules/clothing/head/hood.dm index 1fb1394bce6..28bc8a8a54a 100644 --- a/code/modules/clothing/head/hood.dm +++ b/code/modules/clothing/head/hood.dm @@ -152,6 +152,7 @@ light_range = 3 light_power = 1 light_color = "#B18B25" //clockwork slab background top color + light_on = TRUE /obj/item/clothing/head/hood/winter/narsie name = "runed winter hood" diff --git a/code/modules/clothing/suits/hooded.dm b/code/modules/clothing/suits/hooded.dm index 550dfea0d07..cff2cb9ac68 100644 --- a/code/modules/clothing/suits/hooded.dm +++ b/code/modules/clothing/suits/hooded.dm @@ -322,6 +322,7 @@ light_range = 3 light_power = 1 light_color = "#B18B25" //clockwork slab background top color + light_on = TRUE /obj/item/clothing/suit/storage/hooded/wintercoat/narsie name = "runed winter coat" @@ -336,6 +337,7 @@ hoodtype = /obj/item/clothing/head/hood/winter/cosmic light_power = 1.8 light_range = 1.2 + light_on = TRUE // winter coats end here diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm index 0d91198f440..ec33bc962ac 100644 --- a/code/modules/lighting/lighting_atom.dm +++ b/code/modules/lighting/lighting_atom.dm @@ -78,7 +78,7 @@ if(light_system != STATIC_LIGHT) CRASH("update_light() for [src] with following light_system value: [light_system]") - if (!light_power || !light_range || !light_on) // We won't emit light anyways, destroy the light source. + if (!light_on || !light_power || !light_range) // We won't emit light anyways, destroy the light source. QDEL_NULL(light) else if (!ismovable(loc)) // We choose what atom should be the top atom of the light here. diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index f7350a3daa7..752757762b0 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -888,7 +888,7 @@ var/global/list/light_type_cache = list() matter = list(DEFAULT_WALL_MATERIAL = 60) ///LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN - var/status = 0 + var/status = LIGHT_OK ///Base icon_state name to append suffixes for status var/base_state ///Number of times switched on/off diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 4a1be60a5eb..17dae5c90ea 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -52,6 +52,7 @@ var/datum/beam_components_cache/beam_components //Fancy hitscan lighting effects! + light_on = TRUE var/hitscan_light_intensity = 1.5 var/hitscan_light_range = 0.75 var/hitscan_light_color_override diff --git a/code/modules/shieldgen/directional_shield.dm b/code/modules/shieldgen/directional_shield.dm index d3d943297a0..828db3f6cbc 100644 --- a/code/modules/shieldgen/directional_shield.dm +++ b/code/modules/shieldgen/directional_shield.dm @@ -86,6 +86,7 @@ icon_state = "signmaker_sec" light_range = 4 light_power = 4 + light_on = TRUE var/active = FALSE // If it's on. var/shield_health = 400 // How much damage the shield blocks before breaking. This is a shared health pool for all shields attached to this projector. var/max_shield_health = 400 // Ditto. This is fairly high, but shields are really big, you can't miss them, and laser carbines pump out so much hurt.