Skip to content

Commit

Permalink
Wall becomes stronger (discordia-space#8414)
Browse files Browse the repository at this point in the history
* rebalanced walls
made thermite and wall code slightly better
added heat resistance var to materials

* reduced unreinforced wall deconstruct time
necessary because otherwise triple it would be too long
increased reinforced wall weld time to par

* reinforced walls now more difficult to damage by hand

* adds new wall presets
buffs osmium integrity
  • Loading branch information
vode-code authored Feb 2, 2024
1 parent 99f33dd commit 6c47e03
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 13 deletions.
2 changes: 1 addition & 1 deletion code/game/turfs/simulated.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
var/list/resources
var/seismic_activity = 1 // SEISMIC_MIN

var/thermite = 0
var/thermite = FALSE
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
Expand Down
6 changes: 3 additions & 3 deletions code/game/turfs/simulated/wall_attacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@
return
if(isnull(construction_stage) || !reinf_material)
to_chat(user, SPAN_NOTICE("You begin removing the outer plating..."))
if(I.use_tool(user, src, WORKTIME_LONG, tool_type, FAILCHANCE_NORMAL, required_stat = STAT_MEC))
if(I.use_tool(user, src, WORKTIME_SLOW * material.heat_resistance, tool_type, FAILCHANCE_NORMAL, required_stat = STAT_MEC))
to_chat(user, SPAN_NOTICE("You remove the outer plating."))
dismantle_wall()
user.visible_message(SPAN_WARNING("The wall was torn open by [user]!"))
return
if(construction_stage == 4)
to_chat(user, SPAN_NOTICE("You begin removing the outer plating..."))
if(I.use_tool(user, src, WORKTIME_NORMAL, tool_type, FAILCHANCE_NORMAL, required_stat = STAT_MEC))
if(I.use_tool(user, src, WORKTIME_SLOW * material.heat_resistance, tool_type, FAILCHANCE_NORMAL, required_stat = STAT_MEC))
construction_stage = 3
update_icon()
to_chat(user, SPAN_NOTICE("You press firmly on the cover, dislodging it."))
Expand Down Expand Up @@ -235,7 +235,7 @@
var/attackforce = I.force*I.structure_damage_factor
var/dam_threshhold = material.integrity
if(reinf_material)
dam_threshhold = CEILING(max(dam_threshhold,reinf_material.integrity) * 0.5, 1)
dam_threshhold += reinf_material.integrity * 0.5
var/dam_prob = material.hardness * 1.4
if (locate(/obj/effect/overlay/wallrot) in src)
dam_prob *= 0.5 //Rot makes reinforced walls breakable
Expand Down
15 changes: 15 additions & 0 deletions code/game/turfs/simulated/wall_types.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/turf/simulated/wall/steelr_wall
icon_state = "rgeneric"
description_info = "Can be deconstructed by following these steps \n Use a cutting tool on the wall \n Use a screw-driving tool on the wall \n Use a welder \n Use a wrench \n Use a welder \n Pry off the outer shell"

/turf/simulated/wall/steelr_wall/New(var/newloc)
..(newloc, MATERIAL_STEEL, MATERIAL_STEEL) //2strong
/turf/simulated/wall/r_wall
icon_state = "rgeneric"
description_info = "Can be deconstructed by following these steps \n Use a cutting tool on the wall \n Use a screw-driving tool on the wall \n Use a welder \n Use a wrench \n Use a welder \n Pry off the outer shell"

/turf/simulated/wall/r_wall/New(var/newloc)
..(newloc, MATERIAL_PLASTEEL, MATERIAL_PLASTEEL) //3strong

/turf/simulated/wall/v_wall
icon_state = "rgeneric"
description_info = "Can be deconstructed by following these steps \n Use a cutting tool on the wall \n Use a screw-driving tool on the wall \n Use a welder for some minutes \n Use a wrench \n Use a welder \n Pry off the outer shell"

/turf/simulated/wall/v_wall/New(var/newloc)
..(newloc, MATERIAL_OSMIUM, MATERIAL_OSMIUM) //4strong

/turf/simulated/wall/cult
icon_state = "cult"

Expand Down Expand Up @@ -87,6 +100,8 @@

/turf/simulated/wall/iron/New(var/newloc)
..(newloc,MATERIAL_IRON)
/turf/simulated/wall/plasteel/New(var/newloc)
..(newloc, MATERIAL_PLASTEEL)
/turf/simulated/wall/uranium/New(var/newloc)
..(newloc,MATERIAL_URANIUM)
/turf/simulated/wall/diamond/New(var/newloc)
Expand Down
21 changes: 13 additions & 8 deletions code/game/turfs/simulated/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
/turf/simulated/wall/take_damage(damage)
if(locate(/obj/effect/overlay/wallrot) in src)
damage *= 10
. = health - damage < 0 ? damage - (damage - health) : damage
. = min(health, damage)
health -= damage
if(health <= 0)
var/leftover = abs(health)
Expand Down Expand Up @@ -398,15 +398,20 @@
O.anchored = TRUE
O.density = TRUE
O.layer = 5

thermite = FALSE
take_damage((material.integrity*2.5) / material.heat_resistance) // thermite overkills steel immediately but not plasteel

if(istype(src, /turf/simulated/floor))
var/turf/simulated/floor/F = src
F.burn_tile()
F.icon_state = "wall_thermite"
to_chat(user, SPAN_WARNING("The thermite starts melting the wall away."))
else
to_chat(user, SPAN_WARNING("The thermite starts melting through the wall."))

src.ChangeTurf(/turf/simulated/floor/plating)

var/turf/simulated/floor/F = src
F.burn_tile()
F.icon_state = "wall_thermite"
to_chat(user, SPAN_WARNING("The thermite starts melting through the wall."))

spawn(100)
spawn(10 SECONDS)
if(O)
qdel(O)
// F.sd_LumReset() //TODO: ~Carn
Expand Down
10 changes: 10 additions & 0 deletions code/modules/materials/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ var/list/name_to_material
var/radioactivity // Radiation var. Used in wall and object processing to irradiate surroundings.
var/ignition_point // K, point at which the material catches on fire.
var/melting_point = 1800 // K, walls will take damage if they're next to a fire hotter than this
var/heat_resistance = 1 // divisor, walls resist thermite and welding based on this
var/integrity = 150 // General-use HP value for products.
var/opacity = 1 // Is the material transparent? 0.5< makes transparent walls/doors.
var/explosion_resistance = 5 // Only used by walls currently.
Expand Down Expand Up @@ -399,6 +400,7 @@ var/list/name_to_material
shard_type = SHARD_STONE_PIECE
weight = 22
hardness = 55
heat_resistance = 8
door_icon_base = "stone"
sheet_singular_name = "brick"
sheet_plural_name = "bricks"
Expand Down Expand Up @@ -464,6 +466,7 @@ var/list/name_to_material
icon_reinf = "reinf_over"
icon_colour = PLASTEEL_COLOUR//"#777777"
explosion_resistance = 25
heat_resistance = 3
hardness = 80
weight = 23
stack_origin_tech = list(TECH_MATERIAL = 2)
Expand All @@ -483,6 +486,7 @@ var/list/name_to_material
stack_type = null
icon_base = "metal"
weight = 20
heat_resistance = 4
hardness = 90
door_icon_base = "metal"
icon_colour = "#D1E6E3"
Expand Down Expand Up @@ -736,8 +740,11 @@ var/list/name_to_material
/material/osmium
name = MATERIAL_OSMIUM
stack_type = /obj/item/stack/material/osmium
integrity = 480 // might as well.
icon_colour = "#9999FF"
stack_origin_tech = list(TECH_MATERIAL = 5)
heat_resistance = 10 // osmium is REALLY dense and high melting point.
melting_point = T0C+3025
weight = 90
hardness = 90
sheet_singular_name = "ingot"
Expand Down Expand Up @@ -854,6 +861,7 @@ var/list/name_to_material
shard_type = SHARD_SPLINTER
shard_can_repair = 0 // you can't weld splinters back into planks
hardness = 15
heat_resistance = 0.5 // not good
weight = 18
melting_point = T0C+300 //okay, not melting in this case, but hot enough to destroy wood
ignition_point = T0C+288
Expand Down Expand Up @@ -897,6 +905,7 @@ var/list/name_to_material
icon_base = "solid"
icon_reinf = "reinf_over"
icon_colour = "#AAAAAA"
heat_resistance = 0.25 // very bad
hardness = 1
weight = 1
ignition_point = T0C+232 //"the temperature at which book-paper catches fire, and burns." close enough
Expand All @@ -918,6 +927,7 @@ var/list/name_to_material
name = MATERIAL_CLOTH
stack_origin_tech = list(TECH_MATERIAL = 2)
door_icon_base = "wood"
heat_resistance = 0.25 // very bad
ignition_point = T0C+232
melting_point = T0C+300
flags = MATERIAL_PADDING
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/reagents/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
if(volume >= 5)
if(istype(T, /turf/simulated/wall))
var/turf/simulated/wall/W = T
W.thermite = 1
W.thermite = TRUE
W.overlays += image('icons/effects/effects.dmi',icon_state = "#673910")
remove_self(5)
return TRUE
Expand Down

0 comments on commit 6c47e03

Please sign in to comment.