Skip to content

Commit 8b21068

Browse files
committed
old_paint
1 parent a2e36f2 commit 8b21068

File tree

6 files changed

+208
-1
lines changed

6 files changed

+208
-1
lines changed

baystation12.dme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3414,10 +3414,10 @@
34143414
#include "mods\_master_files\code\game\antagonist\station\changeling.dm"
34153415
#include "mods\_master_files\code\game\gamemodes\antag_maps.dm"
34163416
#include "mods\_master_files\code\game\objects\effects\afterimages.dm"
3417-
#include "mods\_master_files\code\game\objects\effects\misc.dm"
34183417
#include "mods\_master_files\code\game\objects\effects\decals\contraband.dm"
34193418
#include "mods\_master_files\code\game\objects\items\stacks\stack.dm"
34203419
#include "mods\_master_files\code\game\objects\structures\mineral_bath.dm"
3420+
#include "mods\_master_files\code\game\objects\structures\oldwall_overrides.dm"
34213421
#include "mods\_master_files\code\game\objects\structures\reflective_mirrors.dm"
34223422
#include "mods\_master_files\code\game\objects\structures\signs.dm"
34233423
#include "mods\_master_files\code\game\objects\structures\crates_lockers\closets\_closet_appearance_definitions.dm"

icons/obj/structures/wall_frame.dmi

-518 Bytes
Binary file not shown.
3.61 KB
Binary file not shown.

icons/turf/wall_masks.dmi

-14.3 KB
Binary file not shown.

icons/turf/wall_masks_offbay.dmi

56.7 KB
Binary file not shown.
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
/obj/paint/LateInitialize(mapload)
2+
var/turf/simulated/wall/W = get_turf(src)
3+
if(istype(W))
4+
W.paint_color = color
5+
W.update_icon()
6+
var/obj/structure/wall_frame/WF = locate() in loc
7+
if(WF)
8+
WF.paint_color = color
9+
WF.update_icon()
10+
qdel(src)
11+
12+
/material/plasteel/titanium
13+
wall_flags = MATERIAL_PAINTABLE_MAIN|MATERIAL_PAINTABLE_STRIPE
14+
15+
/turf/simulated/wall
16+
var/list/blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall/wood, /turf/simulated/wall/walnut, /turf/simulated/wall/maple, /turf/simulated/wall/mahogany, /turf/simulated/wall/ebony)
17+
var/list/blend_objects = list(/obj/machinery/door, /obj/structure/wall_frame, /obj/structure/grille, /obj/structure/window/reinforced/full, /obj/structure/window/reinforced/polarized/full, /obj/structure/window/shuttle, ,/obj/structure/window/boron_basic/full, /obj/structure/window/boron_reinforced/full) // Objects which to blend with
18+
var/list/noblend_objects = list(/obj/machinery/door/window) //Objects to avoid blending with (such as children of listed blend objects.)
19+
20+
/turf/simulated/wall/wood
21+
blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall)
22+
23+
/turf/simulated/wall/mahogany
24+
blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall)
25+
26+
/turf/simulated/wall/maple
27+
blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall)
28+
29+
/turf/simulated/wall/ebony
30+
blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall)
31+
32+
/turf/simulated/wall/walnut
33+
blend_turfs = list(/turf/simulated/wall/cult, /turf/simulated/wall)
34+
35+
/turf/simulated/wall/alium
36+
blend_objects = newlist()
37+
38+
/turf/simulated/wall/cult
39+
blend_turfs = list(/turf/simulated/wall)
40+
41+
/obj/structure/wall_frame/standard
42+
stripe_color = null
43+
44+
/obj/structure/wall_frame/hull
45+
stripe_color = null
46+
47+
/obj/structure/wall_frame/hull/vox
48+
stripe_color = null
49+
50+
/obj/structure/wall_frame/hull/verne
51+
stripe_color = null
52+
53+
/turf/simulated/wall/r_wall/hull
54+
paint_color = null
55+
stripe_color = null
56+
57+
/turf/simulated/wall/prepainted
58+
color = null
59+
stripe_color = null
60+
61+
/turf/simulated/wall/r_wall/prepainted
62+
color = null
63+
stripe_color = null
64+
65+
/turf/simulated/wall/r_wall/hull/Initialize()
66+
paint_color = color
67+
stripe_color = color
68+
..()
69+
70+
/obj/structure/wall_frame/on_update_icon()
71+
ClearOverlays()
72+
var/image/I
73+
74+
var/new_color = (paint_color ? paint_color : material.icon_colour)
75+
color = new_color
76+
77+
for(var/i = 1 to 4)
78+
if(other_connections[i] != "0")
79+
I = image('icons/obj/structures/wall_frame.dmi', "frame_other[connections[i]]", dir = SHIFTL(1, i - 1))
80+
else
81+
I = image('icons/obj/structures/wall_frame.dmi', "frame[connections[i]]", dir = SHIFTL(1, i - 1))
82+
AddOverlays(I)
83+
84+
if(stripe_color)
85+
for(var/i = 1 to 4)
86+
if(other_connections[i] != "0")
87+
I = image('icons/obj/structures/wall_frame.dmi', "stripe_other[connections[i]]", dir = SHIFTL(1, i - 1))
88+
else
89+
I = image('icons/obj/structures/wall_frame.dmi', "stripe[connections[i]]", dir = SHIFTL(1, i - 1))
90+
I.color = stripe_color
91+
AddOverlays(I)
92+
93+
/turf/simulated/wall/on_update_icon()
94+
95+
..()
96+
97+
if(!material)
98+
return
99+
100+
if(!damage_overlays[1]) //list hasn't been populated; note that it is always of fixed length, so we must check for membership.
101+
generate_overlays()
102+
103+
ClearOverlays()
104+
105+
var/image/I
106+
var/base_color = paint_color ? paint_color : material.icon_colour
107+
if(!density)
108+
I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_base]fwall_open")
109+
I.color = base_color
110+
AddOverlays(I)
111+
return
112+
113+
for(var/i = 1 to 4)
114+
I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_base][wall_connections[i]]", dir = SHIFTL(1, i - 1))
115+
I.color = base_color
116+
AddOverlays(I)
117+
if(other_connections[i] != "0")
118+
I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_base]_other[wall_connections[i]]", dir = SHIFTL(1, i - 1))
119+
I.color = base_color
120+
AddOverlays(I)
121+
122+
if(reinf_material)
123+
var/reinf_color = paint_color ? paint_color : reinf_material.icon_colour
124+
if(construction_stage != null && construction_stage < 6)
125+
I = image('icons/turf/wall_masks.dmi', "reinf_construct-[construction_stage]")
126+
I.color = reinf_color
127+
AddOverlays(I)
128+
else
129+
if("[material.wall_icon_reinf]0" in icon_states('icons/turf/wall_masks.dmi'))
130+
// Directional icon
131+
for(var/i = 1 to 4)
132+
I = image('icons/turf/wall_masks.dmi', "[material.wall_icon_reinf][wall_connections[i]]", dir = SHIFTL(1, i - 1))
133+
I.color = reinf_color
134+
AddOverlays(I)
135+
else
136+
I = image('icons/turf/wall_masks.dmi', material.wall_icon_reinf)
137+
I.color = reinf_color
138+
AddOverlays(I)
139+
var/image/texture = material.get_wall_texture()
140+
if(texture)
141+
AddOverlays(texture)
142+
if(stripe_color)
143+
for(var/i = 1 to 4)
144+
if(other_connections[i] != "0")
145+
I = image('icons/turf/wall_masks.dmi', "stripe_other[wall_connections[i]]", dir = SHIFTL(1, i - 1))
146+
else
147+
I = image('icons/turf/wall_masks.dmi', "stripe[wall_connections[i]]", dir = SHIFTL(1, i - 1))
148+
I.color = stripe_color
149+
AddOverlays(I)
150+
151+
if(get_damage_value() != 0)
152+
var/overlay = round((get_damage_percentage() / 100) * length(damage_overlays)) + 1
153+
overlay = clamp(overlay, 1, length(damage_overlays))
154+
155+
AddOverlays(damage_overlays[overlay])
156+
return
157+
158+
/turf/simulated/wall/update_connections(propagate = 0)
159+
if(!material)
160+
return
161+
var/list/wall_dirs = list()
162+
var/list/other_dirs = list()
163+
164+
for(var/turf/simulated/wall/W in orange(src, 1))
165+
switch(can_join_with(W))
166+
if(0)
167+
continue
168+
if(1)
169+
wall_dirs += get_dir(src, W)
170+
if(2)
171+
wall_dirs += get_dir(src, W)
172+
other_dirs += get_dir(src, W)
173+
if(propagate)
174+
W.update_connections()
175+
W.update_icon()
176+
177+
for(var/turf/T in orange(src, 1))
178+
var/success = 0
179+
for(var/obj/O in T)
180+
for(var/b_type in blend_objects)
181+
if(istype(O, b_type))
182+
success = 1
183+
for(var/nb_type in noblend_objects)
184+
if(istype(O, nb_type))
185+
success = 0
186+
if(success)
187+
break
188+
if(success)
189+
break
190+
191+
if(success)
192+
wall_dirs += get_dir(src, T)
193+
if(get_dir(src, T) in GLOB.cardinal)
194+
other_dirs += get_dir(src, T)
195+
196+
wall_connections = dirs_to_corner_states(wall_dirs)
197+
other_connections = dirs_to_corner_states(other_dirs)
198+
199+
/turf/simulated/wall/can_join_with(turf/simulated/wall/W)
200+
if(material && W.material && material.wall_icon_base == W.material.wall_icon_base)
201+
if((reinf_material && W.reinf_material) || (!reinf_material && !W.reinf_material))
202+
return 1
203+
return 2
204+
for(var/wb_type in blend_turfs)
205+
if(istype(W, wb_type))
206+
return 2
207+
return 0

0 commit comments

Comments
 (0)