Skip to content

Commit 84158d9

Browse files
authored
adds roguetown medieval walls (#7248)
1 parent 2a9c1c8 commit 84158d9

File tree

15 files changed

+114
-7
lines changed

15 files changed

+114
-7
lines changed

citadel.dme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,6 +2234,7 @@
22342234
#include "code\game\turfs\simulated\wall\wall.dm"
22352235
#include "code\game\turfs\simulated\wall\wall_attacks.dm"
22362236
#include "code\game\turfs\simulated\wall\wall_icon.dm"
2237+
#include "code\game\turfs\simulated\wall\subtypes\rt_medieval.dm"
22372238
#include "code\game\turfs\simulated\wall_types\dungeon.dm"
22382239
#include "code\game\turfs\simulated\wall_types\fancy_shuttle.dm"
22392240
#include "code\game\turfs\simulated\wall_types\material.dm"

code/game/turfs/simulated/floor/floor_acts.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/turf/simulated/floor/legacy_ex_act(severity)
2+
if(integrity_flags & INTEGRITY_INDESTRUCTIBLE)
3+
return
24
//set src in oview(1)
35
switch(severity)
46
if(1)

code/game/turfs/simulated/floor/floor_types.dm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
desc = "This slick flesh ripples and squishes under your touch"
1111
icon_state = "flesh-floor"
1212
icon = 'icons/turf/stomach_vr.dmi'
13+
integrity_flags = INTEGRITY_INDESTRUCTIBLE
1314

1415
/turf/simulated/floor/flesh/colour
1516
name = "flesh"
@@ -19,6 +20,3 @@
1920

2021
/turf/simulated/floor/flesh/attackby()
2122
return
22-
23-
/turf/simulated/floor/flesh/legacy_ex_act(severity)
24-
return

code/game/turfs/simulated/floor_types/outdoors.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ CREATE_STANDARD_TURFS(/turf/simulated/floor/outdoors/rocks)
3333
PlaceOnTop(/turf/simulated/floor/outdoors/snow, flags = CHANGETURF_PRESERVE_OUTDOORS|CHANGETURF_INHERIT_AIR)
3434

3535
/turf/simulated/floor/outdoors/legacy_ex_act(severity)
36+
if(integrity_flags & INTEGRITY_INDESTRUCTIBLE)
37+
return
3638
switch(severity)
3739
// Outdoor turfs are less explosion resistant
3840
if(1)

code/game/turfs/simulated/wall/materials.dm

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/turf/simulated/wall/proc/init_materials(datum/prototype/material/outer = material_outer, datum/prototype/material/reinforcing = material_reinf, datum/prototype/material/girder = material_girder)
2+
if(!material_system)
3+
return FALSE
24
outer = RSmaterials.fetch_local_or_throw(outer)
35
reinforcing = RSmaterials.fetch_local_or_throw(reinforcing)
46
girder = RSmaterials.fetch_local_or_throw(girder)
@@ -14,42 +16,64 @@
1416
register_material(material_girder, FALSE)
1517

1618
update_materials()
19+
return TRUE
1720

1821
/turf/simulated/wall/proc/set_materials(datum/prototype/material/outer, datum/prototype/material/reinforcing, datum/prototype/material/girder)
22+
if(!material_system)
23+
return FALSE
24+
1925
unregister_material(material_outer, TRUE)
20-
material_outer = outer
21-
register_material(material_outer, TRUE)
2226
unregister_material(material_reinf, FALSE)
23-
material_reinf = reinforcing
24-
register_material(material_reinf, FALSE)
2527
unregister_material(material_girder, FALSE)
28+
29+
material_outer = outer
30+
material_reinf = reinforcing
2631
material_girder = girder
32+
33+
register_material(material_outer, TRUE)
34+
register_material(material_reinf, FALSE)
2735
register_material(material_girder, FALSE)
2836

2937
update_materials()
38+
return TRUE
3039

3140
/turf/simulated/wall/proc/set_outer_material(datum/prototype/material/material)
41+
if(!material_system)
42+
return FALSE
43+
3244
unregister_material(material_outer, TRUE)
3345
material_outer = material
3446
register_material(material_outer, TRUE)
3547

3648
update_materials()
49+
return TRUE
3750

3851
/turf/simulated/wall/proc/set_reinforcing_material(datum/prototype/material/material)
52+
if(!material_system)
53+
return FALSE
54+
3955
unregister_material(material_reinf, FALSE)
4056
material_reinf = material
4157
register_material(material_reinf, FALSE)
4258

4359
update_materials()
60+
return TRUE
4461

4562
/turf/simulated/wall/proc/set_girder_material(datum/prototype/material/material)
63+
if(!material_system)
64+
return FALSE
65+
4666
unregister_material(material_girder, FALSE)
4767
material_girder = material
4868
register_material(material_girder, FALSE)
4969

5070
update_materials()
71+
return TRUE
5172

5273
/turf/simulated/wall/proc/update_materials()
74+
if(!material_system)
75+
return FALSE
76+
5377
if(material_reinf)
5478
construction_stage = 6
5579
else
@@ -83,3 +107,4 @@
83107
rad_insulation = 1 / ((material_girder?.density * 0.1 + material_outer?.density * 1.2 + material_reinf?.density * 0.5) / 8 * 1.7)
84108

85109
update_appearance()
110+
return TRUE
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
//* This file is explicitly licensed under the MIT license. *//
2+
//* Copyright (c) 2025 Citadel Station Developers *//
3+
4+
/**
5+
* Roguetown Medieval.
6+
*
7+
* Sprite credits to where they're due. I don't know who made these, only where I
8+
* found them. If it's actually from Lifeweb or something, please understand I don't
9+
* have this history data.
10+
*/
11+
/turf/simulated/wall/rt_medieval
12+
abstract_type = /turf/simulated/wall/rt_medieval
13+
integrity_flags = INTEGRITY_INDESTRUCTIBLE
14+
material_system = FALSE
15+
16+
// TODO: destructible sprites, consturction, shift these slowly into
17+
// materials system. wall themes/styles?
18+
// TODO: proper icon smoothing
19+
20+
/turf/simulated/wall/rt_medieval/boss
21+
name = "archaic terrain wall"
22+
desc = "You don't how this was made, but it doesn't look very welcoming."
23+
icon = 'icons/turf/walls/rt_medieval/boss.dmi'
24+
icon_state = "boss"
25+
26+
/turf/simulated/wall/rt_medieval/brick
27+
name = "archaic brick wall"
28+
desc = "An archaic wall made from brick. It looks sturdy."
29+
icon = 'icons/turf/walls/rt_medieval/brick.dmi'
30+
icon_state = "brick"
31+
32+
/turf/simulated/wall/rt_medieval/stone
33+
name = "archaic stone wall"
34+
desc = "An archaic wall made from stone. It looks sturdy."
35+
icon = 'icons/turf/walls/rt_medieval/stone.dmi'
36+
icon_state = "stone"
37+
38+
/turf/simulated/wall/rt_medieval/stone/brick
39+
name = "archaic stone brick wall"
40+
desc = "An archaic wall made from stone brick. It looks sturdy."
41+
icon = 'icons/turf/walls/rt_medieval/stone/brick.dmi'
42+
icon_state = "stone_brick"
43+
44+
/turf/simulated/wall/rt_medieval/stone/craft
45+
name = "archaic craft stone wall"
46+
desc = "An archaic wall made from textured stone. It looks sturdy."
47+
icon = 'icons/turf/walls/rt_medieval/stone/craft.dmi'
48+
icon_state = "stone_craft"
49+
50+
/turf/simulated/wall/rt_medieval/stone/moss_red
51+
name = "archaic mossy stone wall"
52+
desc = "An archaic wall made from stone. It looks sturdy."
53+
icon = 'icons/turf/walls/rt_medieval/stone/moss_red.dmi'
54+
icon_state = "stone_moss_red"
55+
56+
/turf/simulated/wall/rt_medieval/stone/moss_blue
57+
name = "archaic mossy stone wall"
58+
desc = "An archaic wall made from stone. It looks sturdy."
59+
icon = 'icons/turf/walls/rt_medieval/stone/moss_blue.dmi'
60+
icon_state = "stone_moss_blue"
61+
62+
/turf/simulated/wall/rt_medieval/wood
63+
name = "archaic wooden wall"
64+
desc = "An archaic wall made from wood. It looks sturdy."
65+
icon = 'icons/turf/walls/rt_medieval/wood.dmi'
66+
icon_state = "wood"

code/game/turfs/simulated/wall/wall.dm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22
* **Wall.** Our powerful, generic, material wall system.
33
* Surely, *surely*, such a nice, amazing thing wouldn't be entirely shitcode.
44
* Right?
5+
*
6+
* ## Material System
7+
*
8+
* By default, walls are made out of /datum/material's.
9+
*
10+
* Sometimes, however, it's necessary to opt out of it. Walls have many generic behaviors;
11+
* it would suck if they needed to be duplicated just to not have to use materials.
12+
*
13+
* If `material_system` is switched off, materials won't do anything, nor will they be applied or updated.
514
*/
615
/turf/simulated/wall
716
name = "wall"
@@ -49,6 +58,8 @@
4958
var/active
5059
var/can_open = FALSE
5160

61+
/// Do we use materials system?
62+
var/material_system = TRUE
5263
/// The material of the girders that are produced when the wall is dismantled.
5364
var/datum/prototype/material/material_girder = /datum/prototype/material/steel
5465
/// The base material of the wall.
@@ -175,6 +186,8 @@
175186
ScrapeAway()
176187

177188
/turf/simulated/wall/legacy_ex_act(severity)
189+
if(integrity_flags & INTEGRITY_INDESTRUCTIBLE)
190+
return
178191
switch(severity)
179192
if(1.0)
180193
if(material_girder.explosion_resistance >= 25 && prob(material_girder.explosion_resistance))
1.51 KB
Binary file not shown.
577 Bytes
Binary file not shown.
1.61 KB
Binary file not shown.

0 commit comments

Comments
 (0)