forked from ss220club/BandaStation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfull_tile_windows.dm
167 lines (135 loc) · 6.41 KB
/
full_tile_windows.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#define WINDOW_COLOR "#99BBFF"
#define PLASMA_WINDOW_COLOR "#C800FF"
#define TINTED_WINDOW_COLOR "#5A6E82"
#define EDGE_OVERLAY_COLOR "#4f4f4f"
// MARK: Windows
/obj/structure/window
layer = ABOVE_WINDOW_LAYER + 0.05
/// Used to define what file the edging sprite is contained within
var/edge_overlay_file
/// Used to define the color of the edging
var/edge_overlay_color = EDGE_OVERLAY_COLOR
/// Tracks the edging appearence sprite
var/mutable_appearance/edge_overlay
/obj/structure/window/update_overlays(updates=ALL)
. = ..()
if(!edge_overlay_file)
return
edge_overlay = mutable_appearance(edge_overlay_file, "edge-[smoothing_junction]", layer + 0.01, appearance_flags = RESET_COLOR|KEEP_APART)
edge_overlay.color = edge_overlay_color
. += edge_overlay
/**
* Рамки окон но как отдельный объект.
* НЕ ИСПОЛЬЗОВАТЬ!!!
*
* Только для рендера карт.
*/
/obj/structure/window/fulltile/frame
name = "DONT USE THIS"
icon = 'icons/bandastation/windows/window_edges.dmi'
icon_state = "edge-0"
base_icon_state = "edge"
color = EDGE_OVERLAY_COLOR
/obj/structure/window/reinforced/fulltile/frame
name = "DONT USE THIS"
icon = 'icons/bandastation/windows/reinforced_window_edges.dmi'
icon_state = "edge-0"
base_icon_state = "edge"
color = EDGE_OVERLAY_COLOR
/obj/structure/window/fulltile
icon = 'icons/bandastation/windows/window.dmi'
edge_overlay_file = 'icons/bandastation/windows/window_edges.dmi'
icon_state = "window-0"
base_icon_state = "window"
color = WINDOW_COLOR
/obj/structure/window/reinforced/fulltile
icon = 'icons/bandastation/windows/reinforced_window.dmi'
edge_overlay_file = 'icons/bandastation/windows/reinforced_window_edges.dmi'
icon_state = "reinforced_window-0"
base_icon_state = "reinforced_window"
color = WINDOW_COLOR
/obj/structure/window/reinforced/tinted/fulltile
icon = 'icons/bandastation/windows/reinforced_window.dmi'
edge_overlay_file = 'icons/bandastation/windows/reinforced_window_edges.dmi'
icon_state = "reinforced_window-0"
base_icon_state = "reinforced_window"
flags_1 = UNPAINTABLE_1
color = TINTED_WINDOW_COLOR
/obj/structure/window/plasma/fulltile
icon = 'icons/bandastation/windows/window.dmi'
edge_overlay_file = 'icons/bandastation/windows/window_edges.dmi'
icon_state = "window-0"
base_icon_state = "window"
flags_1 = UNPAINTABLE_1
color = PLASMA_WINDOW_COLOR
/obj/structure/window/reinforced/plasma/fulltile
icon = 'icons/bandastation/windows/reinforced_window.dmi'
edge_overlay_file = 'icons/bandastation/windows/reinforced_window_edges.dmi'
icon_state = "reinforced_window-0"
base_icon_state = "reinforced_window"
flags_1 = UNPAINTABLE_1
color = PLASMA_WINDOW_COLOR
/obj/structure/window/reinforced/fulltile/ice
edge_overlay_file = null
// MARK: Spawners
/obj/effect/spawner/structure/window
icon = 'modular_bandastation/aesthetics/windows/icons/spawners.dmi'
/obj/effect/spawner/structure/window
spawn_list = MAP_SWITCH(list(/obj/structure/grille, /obj/structure/window/fulltile), list(/obj/structure/grille, /obj/structure/window/fulltile, /obj/structure/window/fulltile/frame))
/obj/effect/spawner/structure/window/reinforced
spawn_list = MAP_SWITCH(list(/obj/structure/grille, /obj/structure/window/reinforced/fulltile), list(/obj/structure/grille, /obj/structure/window/reinforced/fulltile, /obj/structure/window/reinforced/fulltile/frame))
/obj/effect/spawner/structure/window/reinforced/tinted
spawn_list = MAP_SWITCH(list(/obj/structure/grille, /obj/structure/window/reinforced/tinted/fulltile), list(/obj/structure/grille, /obj/structure/window/reinforced/tinted/fulltile, /obj/structure/window/reinforced/fulltile/frame))
/obj/effect/spawner/structure/window/plasma
spawn_list = MAP_SWITCH(list(/obj/structure/grille, /obj/structure/window/plasma/fulltile), list(/obj/structure/grille, /obj/structure/window/plasma/fulltile, /obj/structure/window/fulltile/frame))
/obj/effect/spawner/structure/window/reinforced/plasma
spawn_list = MAP_SWITCH(list(/obj/structure/grille, /obj/structure/window/reinforced/plasma/fulltile), list(/obj/structure/grille, /obj/structure/window/reinforced/plasma/fulltile, /obj/structure/window/reinforced/fulltile/frame))
/obj/effect/spawner/structure/window/reinforced/indestructible
spawn_list = MAP_SWITCH(list(/obj/structure/grille/indestructible, /obj/structure/window/reinforced/fulltile/indestructible), list(/obj/structure/grille/indestructible, /obj/structure/window/reinforced/fulltile/indestructible, /obj/structure/window/reinforced/fulltile/frame))
// Override to original
/obj/effect/spawner/structure/window/bronze
icon = 'icons/obj/structures_spawners.dmi'
/obj/effect/spawner/structure/window/hollow
icon = 'icons/obj/structures_spawners.dmi'
/obj/effect/spawner/structure/window/ice
icon = 'icons/obj/structures_spawners.dmi'
/obj/effect/spawner/structure/window/survival_pod
icon = 'icons/obj/structures_spawners.dmi'
/obj/effect/spawner/structure/window/reinforced/shuttle
icon = 'icons/obj/structures_spawners.dmi'
/obj/effect/spawner/structure/window/reinforced/plasma/plastitanium
icon = 'icons/obj/structures_spawners.dmi'
// MARK: Indestructible windows
/turf/closed/indestructible/fakeglass
icon = 'icons/bandastation/windows/reinforced_window.dmi'
icon_state = "reinforced_window-0"
base_icon_state = "reinforced_window"
color = WINDOW_COLOR
/// Used to define what file the edging sprite is contained within
var/edge_overlay_file = 'icons/bandastation/windows/reinforced_window_edges.dmi'
/// Tracks the edging appearence sprite
var/mutable_appearance/edge_overlay
/turf/closed/indestructible/fakeglass/smooth_icon()
..()
update_icon(UPDATE_OVERLAYS)
/turf/closed/indestructible/fakeglass/update_icon_state()
. = ..()
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
QUEUE_SMOOTH(src)
/turf/closed/indestructible/fakeglass/update_overlays()
. = ..()
if(!edge_overlay_file)
return
edge_overlay = mutable_appearance(edge_overlay_file, "edge-[smoothing_junction]", layer + 0.1, appearance_flags = RESET_COLOR|KEEP_APART)
. += edge_overlay
/turf/closed/indestructible/fakeglass/plasma
flags_1 = UNPAINTABLE_1
color = PLASMA_WINDOW_COLOR
/turf/closed/indestructible/fakeglass/unreinforced
icon = 'icons/bandastation/windows/window.dmi'
edge_overlay_file = 'icons/bandastation/windows/window_edges.dmi'
icon_state = "window-0"
base_icon_state = "window"
/turf/closed/indestructible/fakeglass/unreinforced/plasma
flags_1 = UNPAINTABLE_1
color = PLASMA_WINDOW_COLOR