Moving buttons away from windows.

This commit is contained in:
Ghommie
2020-05-14 00:23:47 +02:00
parent 44bb989ff9
commit fc5d5fb087
15 changed files with 174 additions and 193 deletions

View File

@@ -103,4 +103,9 @@
#define RCD_COMPUTER 16
#define RCD_UPGRADE_FRAMES 1
#define RCD_UPGRADE_SIMPLE_CIRCUITS 2
#define RCD_UPGRADE_SIMPLE_CIRCUITS 2
//Electrochromatic window defines.
#define NOT_ELECTROCHROMATIC 0
#define ELECTROCHROMATIC_OFF 1
#define ELECTROCHROMATIC_DIMMED 2

View File

@@ -17,7 +17,7 @@
/obj/machinery/button/Initialize(mapload, ndir = 0, built = 0)
if(istext(id) && mapload)
if(copytext(id, 1, 2) == "!")
if(id[1] == "!")
id = SSmapping.get_obfuscated_id(id)
. = ..()
if(built)

View File

@@ -24,6 +24,23 @@ again.
name = "window spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/fulltile)
dir = SOUTH
var/electrochromatic
var/electrochromatic_id
/obj/effect/spawner/structure/window/Initialize()
. = ..()
if(!electrochromatic)
return
if(!electrochromatic_id)
stack_trace("Electrochromatic window spawner set without electromatic id.")
return
if(electrochromatic_id[1] == "!")
electrochromatic_id = SSmapping.get_obfuscated_id(electrochromatic_id)
for(var/obj/structure/window/W in get_turf(src))
W.electrochromatic_id = electrochromatic_id
W.make_electrochromatic()
if(electrochromatic == ELECTROCHROMATIC_DIMMED)
W.electrochromatic_dim()
/obj/effect/spawner/structure/window/hollow
name = "hollow window spawner"
@@ -140,13 +157,16 @@ again.
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/spawner/north, /obj/structure/window/reinforced/spawner/west)
. = ..()
//tinted
//tinted and electrochromatic
/obj/effect/spawner/structure/window/reinforced/tinted
name = "tinted reinforced window spawner"
icon_state = "twindow_spawner"
spawn_list = list(/obj/structure/grille, /obj/structure/window/reinforced/tinted/fulltile)
/obj/effect/spawner/structure/window/reinforced/tinted/electrochromatic
name = "electrochromatic reinforced window spawner"
electrochromatic = ELECTROCHROMATIC_DIMMED
//shuttle window

View File

@@ -1,7 +1,3 @@
#define NOT_ELECTROCHROMATIC 0
#define ELECTROCHROMATIC_OFF 1
#define ELECTROCHROMATIC_DIMMED 2
GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
/proc/do_electrochromatic_toggle(new_status, id)
@@ -74,9 +70,8 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
if(reinf && anchored)
state = WINDOW_SCREWED_TO_FRAME
if(mapload && electrochromatic_id)
if(copytext(electrochromatic_id, 1, 2) == "!")
electrochromatic_id = SSmapping.get_obfuscated_id(electrochromatic_id)
if(mapload && electrochromatic_id && electrochromatic_id[1] == "!")
electrochromatic_id = SSmapping.get_obfuscated_id(electrochromatic_id)
ini_dir = dir
air_update_turf(1)
@@ -885,7 +880,3 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
return
..()
update_icon()
#undef NOT_ELECTROCHROMATIC
#undef ELECTROCHROMATIC_OFF
#undef ELECTROCHROMATIC_DIMMED