Skip to content

Commit

Permalink
Destructible Walls (#3145)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->
### Wall Stuff and Behavior
- Moves the damage behavior from concrete walls to base walls.
- Basic walls can be repaired with a welder.
- Basic walls are still deconstructed with a welder, but it now starts a
repeatable do after that reduces the wall's integrity more efficiently
than simply attacking.
- R-walls integrity is tied to their deconstruction state. Damaging one
enough will move it down a state, and can be repaired by following the
construction steps. They can still be deconstructed the same as before,
or with a plasmacutter.
### Plasmacutters
- Plasma cutters are now more of an engineering tool, and acts as an
"upgrade" to the welder and deconstructs walls faster, and can repair
prosthetic limbs. They can still mine, but lose the additional mining
range and has a chance to ruin ores.
- Plasmacutters now fit in toolbelts.
- Moves plasmacutters and advanced plasmacutters from mining to tech
plasma manipulation and adv plasma manipulation tech respectively.
- Adds plasmacutters to the Mudskipper, Riggs, Talos, Gecko, Heron,
Osprey, Ranger, Hyena, Komodo, Shetland and Twinkleshine
- Adds plasmacutters to cargo for 1250 credits

### Misc Code stuff
- Cleans up crate/closet deconstruction. It now checks for tool_behavior
rather than a specific tool and non-help intent.
- Renames concrete_damage.dmi to wall_damage.dmi


## Why It's Good For The Game

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->
Rylie asked me to make this.

Currently, it's much easier to go through a wall than a door if you want
to force entry as it's as simple as having a welder or a jackhammer to
take off the wall plating vs having to take the time hack an airlock,
which probably isnt great. Also gives some counterplay if you're on the
defending side since you have the opportunity to repair compromised
walls or go around and attack the breacher.

This would add more possible interactions and play around with walls
since you no longer need these two specific tools to get through a wall.
If you say, have enough ammo you could theoretically just shoot your way
in, and they're no longer indestructible pieces of cover.

## Changelog

:cl:
add: Welders/Plasmacutters now deal damage to wall integrity to decon
add: Plasmacutters are now engineering tools and fit in toolbelts. They
can damage ores into slag if used to mine. They are now researched with
plasma technology and advanced plasma technology.
add: Plasmacutters to cargo for 1250
add: Adds plasmacutters to the Mudskipper, Riggs, Talos, Gecko, Heron,
Osprey, Ranger, Hyena, Komodo, Shetland and Twinkleshine
del: Plasmacutters extra mining range
fix: Plasmacutters can repair prosthetic limbs like welders
code: Moves damage behavior of concrete walls to normal walls. Basic
walls are now repaired with a welder.
code: R-walls d-state tied to their integrity. R-walls can be
deconstructed with plasmacutters.
code: Crate decon checks for tool behavior rather than a istype check

/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
Gristlebee authored Sep 1, 2024
1 parent 7810e23 commit bbc1188
Show file tree
Hide file tree
Showing 32 changed files with 378 additions and 285 deletions.
4 changes: 2 additions & 2 deletions _maps/RandomRuins/RockRuins/rockplanet_harmfactory.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3367,7 +3367,7 @@ of
IA
ro
ro
hJ
bf
Ew
LT
hi
Expand Down Expand Up @@ -3446,7 +3446,7 @@ je
kC
nq
qm
hJ
bf
tw
tC
vK
Expand Down
1 change: 1 addition & 0 deletions _maps/shuttles/independent/independent_mudskipper.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@
/obj/item/circular_saw,
/obj/item/multitool,
/obj/item/stack/marker_beacon/thirty,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/tech,
/area/ship/cargo)
"gT" = (
Expand Down
1 change: 1 addition & 0 deletions _maps/shuttles/independent/independent_rigger.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4468,6 +4468,7 @@
/obj/item/storage/toolbox/mechanical,
/obj/item/storage/belt/utility,
/obj/item/clothing/glasses/welding,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plating,
/area/ship/engineering)

Expand Down
2 changes: 2 additions & 0 deletions _maps/shuttles/independent/independent_shetland.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4725,6 +4725,8 @@
/obj/item/multitool,
/obj/item/clothing/glasses/welding,
/obj/item/clothing/glasses/welding,
/obj/item/gun/energy/plasmacutter,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/dark,
/area/ship/engineering/electrical)
"OU" = (
Expand Down
4 changes: 4 additions & 0 deletions _maps/shuttles/inteq/inteq_talos.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@
req_access_txt = "11";
req_one_access = null
},
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/tech/grid,
/area/ship/engineering)
"gm" = (
Expand Down Expand Up @@ -1348,6 +1349,7 @@
req_access_txt = "11";
req_one_access = null
},
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/tech/grid,
/area/ship/engineering)
"iM" = (
Expand Down Expand Up @@ -1645,6 +1647,7 @@
pixel_x = 20;
pixel_y = 11
},
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/tech/grid,
/area/ship/engineering)
"jZ" = (
Expand Down Expand Up @@ -6273,6 +6276,7 @@
name = "honorable artificer's toolbelt"
},
/obj/machinery/airalarm/directional/west,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/tech/grid,
/area/ship/engineering/communications)
"Oq" = (
Expand Down
2 changes: 2 additions & 0 deletions _maps/shuttles/nanotrasen/nanotrasen_gecko.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@
/obj/item/clothing/under/rank/cargo/miner,
/obj/item/clothing/gloves/color/black,
/obj/item/clothing/glasses/meson,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/patterned/grid,
/area/ship/cargo/port)
"dC" = (
Expand Down Expand Up @@ -4112,6 +4113,7 @@
/obj/item/clothing/under/rank/cargo/miner,
/obj/item/clothing/gloves/color/black,
/obj/item/clothing/glasses/meson,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/patterned/grid,
/area/ship/cargo/starboard)
"Qc" = (
Expand Down
2 changes: 2 additions & 0 deletions _maps/shuttles/nanotrasen/nanotrasen_heron.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1474,6 +1474,7 @@
pixel_y = -11;
pixel_x = 9
},
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/dark,
/area/ship/engineering)
"gd" = (
Expand Down Expand Up @@ -10650,6 +10651,7 @@
pixel_y = -10;
pixel_x = 5
},
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/dark,
/area/ship/engineering)
"NC" = (
Expand Down
1 change: 1 addition & 0 deletions _maps/shuttles/nanotrasen/nanotrasen_osprey.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -5899,6 +5899,7 @@
},
/obj/item/holosign_creator/engineering,
/obj/item/storage/box/metalfoam,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/patterned/grid,
/area/ship/engineering)
"My" = (
Expand Down
1 change: 1 addition & 0 deletions _maps/shuttles/nanotrasen/nanotrasen_ranger.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,7 @@
/obj/item/clothing/glasses/meson/gar{
pixel_y = 8
},
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/mono/dark,
/area/ship/engineering)
"pA" = (
Expand Down
6 changes: 4 additions & 2 deletions _maps/shuttles/syndicate/syndicate_gorlex_hyena.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@
/obj/item/clothing/under/syndicate/ngr/jumpsuit,
/obj/item/clothing/suit/hazardvest/ngr,
/obj/item/clothing/head/hardhat/ngr,
/obj/item/pickaxe/drill,
/turf/open/floor/plasteel/tech/grid,
/area/ship/storage)
"pu" = (
Expand Down Expand Up @@ -1152,6 +1153,7 @@
/obj/item/clothing/under/syndicate/ngr/jumpsuit,
/obj/item/clothing/suit/hazardvest/ngr,
/obj/item/clothing/head/hardhat/ngr,
/obj/item/pickaxe/drill,
/turf/open/floor/plasteel/tech/grid,
/area/ship/storage)
"tI" = (
Expand Down Expand Up @@ -3159,10 +3161,10 @@
dir = 4
},
/obj/structure/rack,
/obj/item/pickaxe/drill/jackhammer/old{
/obj/item/gun/energy/plasmacutter{
pixel_y = 10
},
/obj/item/pickaxe/drill/jackhammer/old,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/tech/grid,
/area/ship/storage)
"Yv" = (
Expand Down
1 change: 1 addition & 0 deletions _maps/shuttles/syndicate/syndicate_gorlex_komodo.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1175,6 +1175,7 @@
},
/obj/item/clothing/under/syndicate/hardliners,
/obj/item/clothing/suit/hazardvest/hardliners,
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/tech,
/area/ship/engineering)
"ls" = (
Expand Down
2 changes: 2 additions & 0 deletions _maps/shuttles/syndicate/syndicate_twinkleshine.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4440,6 +4440,7 @@
/obj/item/clothing/head/hardhat/red{
name = "hard hat"
},
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/dark,
/area/ship/engineering)
"Af" = (
Expand Down Expand Up @@ -8917,6 +8918,7 @@
/obj/item/clothing/head/hardhat/red{
name = "hard hat"
},
/obj/item/gun/energy/plasmacutter,
/turf/open/floor/plasteel/dark,
/area/ship/engineering)
"Zg" = (
Expand Down
14 changes: 10 additions & 4 deletions code/game/mecha/equipment/tools/mining_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
toolspeed = 0.9
var/drill_delay = 7
var/drill_level = DRILL_BASIC
wall_decon_damage = 100

/obj/item/mecha_parts/mecha_equipment/drill/Initialize()
. = ..()
Expand Down Expand Up @@ -62,15 +63,19 @@
return

/turf/closed/wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
if(drill.do_after_mecha(src, 60 / drill.drill_level))
while(drill.do_after_mecha(src, 15 / drill.drill_level))
drill.log_message("Drilled through [src]", LOG_MECHA)
dismantle_wall(devastated = TRUE)
alter_integrity(-drill.wall_decon_damage)
drill.occupant_message("<span class='notice'>You drill through some of the outer plating...</span>")
playsound(src,'sound/weapons/drill.ogg',60,TRUE)

/turf/closed/wall/r_wall/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
if(drill.drill_level >= DRILL_HARDENED)
if(drill.do_after_mecha(src, 120 / drill.drill_level))
while(drill.do_after_mecha(src, 20 / drill.drill_level))
drill.log_message("Drilled through [src]", LOG_MECHA)
dismantle_wall(devastated = TRUE)
alter_integrity(-drill.wall_decon_damage)
drill.occupant_message("<span class='notice'>You drill through some of the outer plating...</span>")
playsound(src,'sound/weapons/drill.ogg',60,TRUE)
else
drill.occupant_message("<span class='danger'>[src] is too durable to drill through.</span>")

Expand Down Expand Up @@ -150,6 +155,7 @@
drill_level = DRILL_HARDENED
force = 15
toolspeed = 0.7
wall_decon_damage = 300


/obj/item/mecha_parts/mecha_equipment/mining_scanner
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
var/tool_behaviour = NONE
///How fast does the tool work
var/toolspeed = 1
/// how much damage does this item do when tearing down walls during deconstruction steps?
var/wall_decon_damage = 0

var/block_chance = 0
var/block_cooldown_time = 1 SECONDS
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/grenades/plastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
target.cut_overlay(plastic_overlay, TRUE)
if(!ismob(target) || full_damage_on_mobs)
target.ex_act(EXPLODE_HEAVY, target)
if(iswallturf(target))
var/turf/closed/wall/wall = target
wall.dismantle_wall(TRUE)
else
location = get_turf(src)
if(location)
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
/obj/item/chisel,
/obj/item/clothing/glasses/welding, //WS edit: ok mald sure I'll add the welding stuff to the. ok.
/obj/item/clothing/mask/gas/welding,
/obj/item/clothing/head/welding //WS end
/obj/item/clothing/head/welding, //WS end
/obj/item/gun/energy/plasmacutter
))

/obj/item/storage/belt/utility/chief
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/tools/weldingtool.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
var/acti_sound = 'sound/items/welderactivate.ogg'
var/deac_sound = 'sound/items/welderdeactivate.ogg'
var/start_full = TRUE
wall_decon_damage = 50

/obj/item/weldingtool/empty
start_full = FALSE
Expand Down Expand Up @@ -348,6 +349,7 @@
light_system = NO_LIGHT_SUPPORT
light_range = 0
change_icons = 0
wall_decon_damage = 500

/obj/item/weldingtool/abductor/process()
if(get_fuel() <= max_fuel)
Expand Down Expand Up @@ -378,6 +380,7 @@
can_off_process = 1
light_range = 1
toolspeed = 0.5
wall_decon_damage = 100
var/last_gen = 0
var/nextrefueltick = 0

Expand Down
32 changes: 14 additions & 18 deletions code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
var/max_mob_size = MOB_SIZE_HUMAN //Biggest mob_size accepted by the container
var/mob_storage_capacity = 3 // how many human sized mob/living can fit together inside a closet.
var/storage_capacity = 30 //This is so that someone can't pack hundreds of items in a locker/crate then open it in a populated area to crash clients.
var/cutting_tool = /obj/item/weldingtool
// defaults to welder if null
var/cutting_tool = TOOL_WELDER
var/open_sound = 'sound/machines/closet_open.ogg'
var/close_sound = 'sound/machines/closet_close.ogg'
var/open_sound_volume = 35
Expand Down Expand Up @@ -261,27 +262,22 @@
/obj/structure/closet/proc/tool_interact(obj/item/W, mob/user)//returns TRUE if attackBy call shouldnt be continued (because tool was used/closet was of wrong type), FALSE if otherwise
. = TRUE
if(opened)
if(istype(W, cutting_tool))
if(W.tool_behaviour == TOOL_WELDER)
if(!W.tool_start_check(user, amount=0))
return

to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
if(W.use_tool(src, user, 40, volume=50))
if(!opened)
return
user.visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [W].</span>",
"<span class='hear'>You hear welding.</span>")
deconstruct(TRUE)
if(W.tool_behaviour == cutting_tool && user.a_intent != INTENT_HELP)
if(!W.tool_start_check(user, amount=0))
return
else // for example cardboard box is cut with wirecutters
user.visible_message("<span class='notice'>[user] cut apart \the [src].</span>", \
"<span class='notice'>You cut \the [src] apart with \the [W].</span>")

to_chat(user, "<span class='notice'>You begin cutting \the [src] apart...</span>")
if(W.use_tool(src, user, 40, volume=50))
if(!opened)
return
user.visible_message("<span class='notice'>[user] slices apart \the [src].</span>",
"<span class='notice'>You cut \the [src] apart with \the [W].</span>",
"<span class='hear'>You hear cutting.</span>")
deconstruct(TRUE)
return
return
if(user.transferItemToLoc(W, drop_location())) // so we put in unlit welder too
return
return
else if(W.tool_behaviour == TOOL_WELDER && can_weld_shut)
if(!W.tool_start_check(user, amount=0))
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
max_integrity = 70
integrity_failure = 0
can_weld_shut = 0
cutting_tool = /obj/item/wirecutters
cutting_tool = TOOL_WIRECUTTER
material_drop = /obj/item/stack/sheet/cardboard
delivery_icon = "deliverybox"
anchorable = FALSE
Expand Down Expand Up @@ -70,7 +70,7 @@
mob_storage_capacity = 5
resistance_flags = NONE
move_speed_multiplier = 2
cutting_tool = /obj/item/weldingtool
cutting_tool = TOOL_WELDER
open_sound = 'sound/machines/crate_open.ogg'
close_sound = 'sound/machines/crate_close.ogg'
open_sound_volume = 35
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/girders.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

if(istype(W, /obj/item/gun/energy/plasmacutter))
to_chat(user, "<span class='notice'>You start slicing apart the girder...</span>")
if(W.use_tool(src, user, 40, volume=100))
if(W.use_tool(src, user, 10, volume=100))
to_chat(user, "<span class='notice'>You slice apart the girder.</span>")
var/obj/item/stack/sheet/metal/M = new (loc, 2)
M.add_fingerprint(user)
Expand Down
11 changes: 8 additions & 3 deletions code/game/turfs/closed/minerals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@
else
return attack_hand(user)

/turf/closed/mineral/proc/gets_drilled(user, give_exp = FALSE)
/turf/closed/mineral/proc/gets_drilled(user, give_exp = FALSE, slag_chance = 0)
if (mineralType && (mineralAmt > 0))
new mineralType(src, mineralAmt)
SSblackbox.record_feedback("tally", "ore_mined", mineralAmt, mineralType)
//oops, you ruined the ore
if(prob(slag_chance))
new /obj/item/stack/ore/slag(src,mineralAmt)
visible_message(span_warning("The ore was completely ruined!"))
else
new mineralType(src, mineralAmt)
SSblackbox.record_feedback("tally", "ore_mined", mineralAmt, mineralType)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(give_exp)
Expand Down
Loading

0 comments on commit bbc1188

Please sign in to comment.