diff --git a/_maps/map_files/Vampire/runtimetown.dmm b/_maps/map_files/Vampire/runtimetown.dmm index 8cb8bb00248a..d04707f46e4a 100644 --- a/_maps/map_files/Vampire/runtimetown.dmm +++ b/_maps/map_files/Vampire/runtimetown.dmm @@ -287,7 +287,7 @@ /obj/effect/turf_decal/bordur{ dir = 1 }, -/obj/structure/lamppost/one{ +/obj/machinery/light/floor/lamppost/one{ dir = 1 }, /turf/open/floor/plating/sidewalk/rich, @@ -307,7 +307,7 @@ /obj/effect/turf_decal/bordur{ dir = 8 }, -/obj/structure/lamppost/four, +/obj/machinery/light/floor/lamppost/four, /turf/open/floor/plating/sidewalk, /area/vtm/outside/pacificheights) "hi" = ( @@ -715,7 +715,7 @@ /turf/open/floor/plating/rough, /area/vtm/interior/anarch) "nq" = ( -/obj/structure/lamppost/three{ +/obj/machinery/light/floor/lamppost/three{ dir = 8 }, /turf/open/floor/plating/sidewalk, @@ -884,7 +884,7 @@ /turf/open/floor/plating/concrete, /area/vtm/interior/shop) "qz" = ( -/obj/structure/lamppost/one, +/obj/machinery/light/floor/lamppost/one, /turf/open/floor/plating/sidewalk, /area/vtm/outside/pacificheights) "qC" = ( @@ -1093,7 +1093,7 @@ /obj/effect/turf_decal/bordur{ dir = 10 }, -/obj/structure/lamppost/four, +/obj/machinery/light/floor/lamppost/four, /turf/open/floor/plating/sidewalk, /area/vtm/outside/pacificheights) "tg" = ( @@ -1190,7 +1190,7 @@ /obj/effect/turf_decal/bordur{ dir = 4 }, -/obj/structure/lamppost/one{ +/obj/machinery/light/floor/lamppost/one{ dir = 4 }, /turf/open/floor/plating/sidewalk/rich, @@ -1239,7 +1239,7 @@ /obj/effect/turf_decal/bordur{ dir = 8 }, -/obj/structure/lamppost/one{ +/obj/machinery/light/floor/lamppost/one{ dir = 8 }, /turf/open/floor/plating/sidewalk/rich, @@ -1527,7 +1527,7 @@ /obj/effect/turf_decal/bordur{ dir = 4 }, -/obj/structure/lamppost/three{ +/obj/machinery/light/floor/lamppost/three{ dir = 4 }, /turf/open/floor/plating/sidewalk, @@ -1551,7 +1551,7 @@ /area/vtm/interior/shop) "Bq" = ( /obj/effect/turf_decal/bordur, -/obj/structure/lamppost/one, +/obj/machinery/light/floor/lamppost/one, /turf/open/floor/plating/sidewalk/poor, /area/vtm/outside/pacificheights) "Bs" = ( @@ -1609,7 +1609,7 @@ /turf/open/floor/plating/asphalt, /area/vtm/outside/pacificheights) "Ct" = ( -/obj/structure/lamppost/one{ +/obj/machinery/light/floor/lamppost/one{ dir = 1 }, /turf/open/floor/plating/sidewalk, @@ -1761,7 +1761,7 @@ /turf/open/misc/grass, /area/vtm/outside/pacificheights) "DY" = ( -/obj/structure/lamppost/one, +/obj/machinery/light/floor/lamppost/one, /turf/open/floor/plating/sidewalk/rich, /area/vtm/outside/pacificheights) "Eb" = ( @@ -2545,7 +2545,7 @@ /area/vtm/interior/graveyard) "OA" = ( /obj/effect/turf_decal/bordur, -/obj/structure/lamppost/one, +/obj/machinery/light/floor/lamppost/one, /turf/open/floor/plating/sidewalk/poor, /area/vtm/outside/baywalk) "OB" = ( @@ -2730,7 +2730,7 @@ /area/vtm/outside/pacificheights) "QU" = ( /obj/effect/turf_decal/bordur, -/obj/structure/lamppost/one, +/obj/machinery/light/floor/lamppost/one, /turf/open/floor/plating/sidewalk/poor, /area/vtm/outside/financialdistrict) "QW" = ( @@ -3073,14 +3073,14 @@ /turf/open/floor/plating/elevatorshaft, /area/vtm/outside/pacificheights) "WR" = ( -/obj/structure/lamppost/one, +/obj/machinery/light/floor/lamppost/one, /turf/open/misc/beach/vamp, /area/vtm/outside/pacificheights) "WW" = ( /turf/open/floor/plating/canal, /area/vtm/interior/techshop) "WZ" = ( -/obj/structure/lamppost/one{ +/obj/machinery/light/floor/lamppost/one{ dir = 8 }, /turf/open/floor/plating/sidewalk, @@ -3173,7 +3173,7 @@ /turf/open/floor/plating/rough, /area/vtm/interior/graveyard) "XY" = ( -/obj/structure/lamppost/three, +/obj/machinery/light/floor/lamppost/three, /turf/open/floor/plating/sidewalk, /area/vtm/outside/pacificheights) "XZ" = ( diff --git a/_maps/map_files/Vampire/westfield_mall/westfield_mall.dmm b/_maps/map_files/Vampire/westfield_mall/westfield_mall.dmm index 14ff8d7383f5..c64f2973eb19 100644 --- a/_maps/map_files/Vampire/westfield_mall/westfield_mall.dmm +++ b/_maps/map_files/Vampire/westfield_mall/westfield_mall.dmm @@ -268,7 +268,7 @@ /turf/open/misc/dirt/rails, /area/vtm/westfield_mall/interior/supply) "aaW" = ( -/obj/structure/lamppost/four{ +/obj/machinery/light/floor/lamppost/four{ pixel_y = 8 }, /turf/open/floor/plating/sidewalk/old, @@ -1990,7 +1990,7 @@ /obj/effect/turf_decal/bordur{ dir = 1 }, -/obj/structure/lamppost/sidewalk, +/obj/machinery/light/floor/lamppost/sidewalk, /turf/open/floor/plating/sidewalk/old, /area/vtm/westfield_mall) "agU" = ( @@ -3253,7 +3253,7 @@ /obj/effect/turf_decal/bordur/corner{ dir = 4 }, -/obj/structure/lamppost/sidewalk, +/obj/machinery/light/floor/lamppost/sidewalk, /turf/open/floor/plating/sidewalk/old, /area/vtm/westfield_mall) "akV" = ( @@ -10115,7 +10115,7 @@ /turf/open/floor/city/plating, /area/vtm/interior/bianchiBank) "aHl" = ( -/obj/structure/lamppost/four{ +/obj/machinery/light/floor/lamppost/four{ pixel_y = 8 }, /obj/structure/platform/lowwall/brick_old, @@ -10518,7 +10518,7 @@ /obj/effect/turf_decal/bordur/corner{ dir = 8 }, -/obj/structure/lamppost/sidewalk, +/obj/machinery/light/floor/lamppost/sidewalk, /turf/open/floor/plating/sidewalk/old, /area/vtm/westfield_mall) "aID" = ( @@ -13829,7 +13829,7 @@ /obj/effect/turf_decal/bordur/corner{ dir = 1 }, -/obj/structure/lamppost/sidewalk, +/obj/machinery/light/floor/lamppost/sidewalk, /turf/open/floor/plating/sidewalk/old, /area/vtm/westfield_mall) "aTE" = ( @@ -14218,7 +14218,7 @@ /area/vtm/westfield_mall) "aUX" = ( /obj/effect/turf_decal/bordur/corner, -/obj/structure/lamppost/sidewalk, +/obj/machinery/light/floor/lamppost/sidewalk, /turf/open/floor/plating/sidewalk/old, /area/vtm/westfield_mall) "aUY" = ( diff --git a/_maps/map_files/Vampire/westfield_mall/westfield_umbra.dmm b/_maps/map_files/Vampire/westfield_mall/westfield_umbra.dmm index a710d8fd19f7..d292c9e59e79 100644 --- a/_maps/map_files/Vampire/westfield_mall/westfield_umbra.dmm +++ b/_maps/map_files/Vampire/westfield_mall/westfield_umbra.dmm @@ -176,7 +176,7 @@ /turf/open/misc/dirt, /area/vtm/outside/penumbra) "cm" = ( -/obj/structure/lamppost/sidewalk, +/obj/machinery/light/floor/lamppost/sidewalk, /turf/open/umbra, /area/vtm/outside/penumbra) "cr" = ( @@ -577,7 +577,7 @@ /turf/open/misc/grass, /area/vtm/outside/penumbra) "hO" = ( -/obj/structure/lamppost/sidewalk/chinese{ +/obj/machinery/light/floor/lamppost/sidewalk/chinese{ dir = 8 }, /turf/open/umbra, @@ -2611,7 +2611,7 @@ /turf/open/floor/plating/sidewalk/rich, /area/vtm/outside/penumbra) "KB" = ( -/obj/structure/lamppost/sidewalk/chinese{ +/obj/machinery/light/floor/lamppost/sidewalk/chinese{ dir = 4 }, /turf/open/floor/plating/sidewalkalt, diff --git a/modular_darkpack/modules/decor/code/decor.dm b/modular_darkpack/modules/decor/code/decor.dm index f4bb22e92b43..de57e682d360 100644 --- a/modular_darkpack/modules/decor/code/decor.dm +++ b/modular_darkpack/modules/decor/code/decor.dm @@ -33,101 +33,49 @@ layer = ABOVE_ALL_MOB_LAYER anchored = TRUE -/obj/structure/lamppost +/obj/machinery/light/floor/lamppost name = "lamppost" desc = "Gives some light to the streets." icon = 'modular_darkpack/modules/decor/icons/lamppost.dmi' - base_icon_state = "base" - layer = SPACEVINE_LAYER // Cant even with flav bro - Fallcon + icon_state = "base" + bulb_colour = "#ffde9b" + allow_break_on_init = FALSE + plane = GAME_PLANE pixel_w = -32 + layer = SPACEVINE_LAYER anchored = TRUE density = TRUE resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF - var/number_of_lamps - var/list/my_lights = list() -/obj/structure/lamppost/Initialize(mapload) +/obj/machinery/light/floor/lamppost/Initialize(mapload) . = ..() var/area/vtm/my_area = get_area(src) if(check_holidays(FESTIVE_SEASON)) if(istype(my_area) && my_area.outdoors) icon_state = "[initial(icon_state)]-snow" - RegisterSignal(my_area, COMSIG_AREA_POWER_CHANGE, PROC_REF(on_power_change)) - // DARKPACK TODO - fuseboxes and areas aren't meaningfully connected to each other, and thusly aren't meaningfully connected to lights/devices that may need poer. - // TLDR we need to basically re-evaluate how we approach power... the current system is flavcode spaghetti shit. - if(my_area.powered(AREA_USAGE_LIGHT)) - create_lights() - -/obj/structure/lamppost/proc/on_power_change(area/A) - SIGNAL_HANDLER + update_appearance() +// note - change this when we get more robust lamppost sprites - for now we only have one for each lamppost type +/obj/machinery/light/floor/lamppost/update_icon_state() + .=..() + icon_state = initial(icon_state) - if(A.power_light) - create_lights() - else - QDEL_LIST(my_lights) - -/obj/structure/lamppost/proc/create_lights() - QDEL_LIST(my_lights) - switch(number_of_lamps) - if(1) - new_light(get_step(loc, dir)) - if(2) - new_light(get_step(loc, dir)) - new_light(get_step(loc, turn(dir, 180))) - if(3) - new_light(get_step(loc, dir)) - new_light(get_step(loc, turn(dir, -90))) - new_light(get_step(loc, turn(dir, 90))) - if(4) - new_light(get_step(loc, NORTH)) - new_light(get_step(loc, SOUTH)) - new_light(get_step(loc, EAST)) - new_light(get_step(loc, WEST)) - else - new_light(loc) - -/obj/structure/lamppost/proc/new_light(location) - my_lights += new /obj/effect/decal/lamplight(location) - -/obj/structure/lamppost/Destroy(force) - UnregisterSignal(get_area(src), COMSIG_AREA_POWER_CHANGE) - QDEL_LIST(my_lights) - . = ..() - - -/obj/effect/decal/lamplight - alpha = 0 - -// DARKPACK TODO - Fix lol. -/obj/effect/decal/lamplight/NeverShouldHaveComeHere(turf/here_turf) - return FALSE - -/obj/effect/decal/lamplight/Initialize(mapload) - . = ..() - set_light(4, 3, "#ffde9b") - -/obj/structure/lamppost/one +/obj/machinery/light/floor/lamppost/one icon_state = "one" - number_of_lamps = 1 -/obj/structure/lamppost/two +/obj/machinery/light/floor/lamppost/two icon_state = "two" - number_of_lamps = 2 -/obj/structure/lamppost/three +/obj/machinery/light/floor/lamppost/three icon_state = "three" - number_of_lamps = 3 -/obj/structure/lamppost/four +/obj/machinery/light/floor/lamppost/four icon_state = "four" - number_of_lamps = 4 -/obj/structure/lamppost/sidewalk +/obj/machinery/light/floor/lamppost/sidewalk icon_state = "civ" - number_of_lamps = 5 -/obj/structure/lamppost/sidewalk/chinese +/obj/machinery/light/floor/lamppost/sidewalk/chinese icon_state = "chinese" /obj/structure/trafficlight diff --git a/tools/UpdatePaths/Scripts/DarkPack/1373_lamppost_refactor.txt b/tools/UpdatePaths/Scripts/DarkPack/1373_lamppost_refactor.txt new file mode 100644 index 000000000000..6348d5abf08b --- /dev/null +++ b/tools/UpdatePaths/Scripts/DarkPack/1373_lamppost_refactor.txt @@ -0,0 +1,2 @@ +/obj/structure/lamppost : /obj/machinery/light/floor/lamppost{@OLD} +/obj/structure/lamppost/@SUBTYPES : /obj/machinery/light/floor/lamppost/@SUBTYPES {@OLD}