Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destructible Walls (And Mineral Walls) #3145

Merged
merged 66 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
00e295b
moves damage behaviors to parent wall
Gristlebee Jun 17, 2024
bb61ca8
damage handling
Gristlebee Jun 18, 2024
5634b73
kaboom
Gristlebee Jun 18, 2024
538a106
more dmg handling
Gristlebee Jun 18, 2024
e01a832
force devastate
Gristlebee Jun 18, 2024
dee06d9
variables
Gristlebee Jun 18, 2024
0f0f5be
oops, wrong value
Gristlebee Jun 18, 2024
fd59f2e
mods
Gristlebee Jun 18, 2024
e7364c8
wall stats
Gristlebee Jun 18, 2024
ad0a9bd
stats
Gristlebee Jun 18, 2024
e8988e0
r-walls and update stats
Gristlebee Jun 19, 2024
e25e400
variable
Gristlebee Jun 19, 2024
58c560f
redundant code
Gristlebee Jun 19, 2024
1094813
clean up and mods
Gristlebee Jun 19, 2024
dd69a3c
r_wall damage handling
Gristlebee Jun 19, 2024
f484b1c
Update reinf_walls.dm
Gristlebee Jun 22, 2024
46d4119
Update reinf_walls.dm
Gristlebee Jun 23, 2024
79b9f0e
sounds and damage
Gristlebee Jun 23, 2024
2346e21
Update conc_walls.dm
Gristlebee Jun 23, 2024
2be0616
slag em
Gristlebee Jun 23, 2024
75056b5
broken stuff
Gristlebee Jun 23, 2024
0559508
bad if statement
Gristlebee Jun 23, 2024
e299b72
slicing is faster, some bug fixes
Gristlebee Jun 24, 2024
894d135
mechcutter stuff
Gristlebee Jun 25, 2024
1a1bb20
Merge branch 'master' into drywall
Gristlebee Jun 25, 2024
ffe5bc8
Update weapons.dm
Gristlebee Jun 26, 2024
f16e1e6
Update mining_tools.dm
Gristlebee Jun 26, 2024
e9411e1
Update weapons.dm
Gristlebee Jun 26, 2024
27f8568
Update weapons.dm
Gristlebee Jun 26, 2024
cdb664d
Update weapons.dm
Gristlebee Jun 26, 2024
bd49bf2
Update all_nodes.dm
Gristlebee Jun 26, 2024
580e5cb
adds plasmacutters to some ships
Gristlebee Jun 26, 2024
5cbae5d
Update reinf_walls.dm
Gristlebee Jun 26, 2024
7876bdd
removes uneeded comments
Gristlebee Jun 26, 2024
6868a57
r-wall cleaning and plasmacutters
Gristlebee Jun 26, 2024
1915ed2
oops bad proc
Gristlebee Jun 26, 2024
45da9d8
Update walls.dm
Gristlebee Jun 26, 2024
52c99d0
Update walls.dm
Gristlebee Jun 26, 2024
df06f86
welder fixing
Gristlebee Jun 26, 2024
f9992c4
holy shit was I on crack why are these so strong
Gristlebee Jul 5, 2024
f4142c1
plasmacutter to cargo, fits in toolbelt
Gristlebee Jul 5, 2024
eac5eb5
oops comma
Gristlebee Jul 5, 2024
318ff24
moves the plasmacutters to salvage tech lockers
Gristlebee Jul 5, 2024
8b136a1
c4 is not totally impotent
Gristlebee Jul 5, 2024
d8a953f
slicing speeds
Gristlebee Jul 5, 2024
f9013fa
safe decon, makes cutters less loud
Gristlebee Jul 7, 2024
5ad2429
values
Gristlebee Jul 7, 2024
3d44883
Merge branch 'master' into drywall
Gristlebee Jul 8, 2024
6bf7ff0
marg conflicts, cutter to shetand
Gristlebee Jul 8, 2024
9e73722
crate/closet deconstruction
Gristlebee Jul 12, 2024
ad9dd5a
whoops, makes jackhammers buyable again
Gristlebee Jul 21, 2024
2738c7e
damage overlays
Gristlebee Aug 2, 2024
b9cdc83
Merge branch 'master' into drywall
Gristlebee Aug 2, 2024
7cfdc2e
sanity
Gristlebee Aug 2, 2024
0ddda67
sound stuff, quashes a bug
Gristlebee Aug 7, 2024
a1e67a7
indestructable walls
Gristlebee Aug 7, 2024
c918fa1
drills
Gristlebee Aug 26, 2024
0618d7e
Merge branch 'master' into drywall
Gristlebee Aug 26, 2024
8f7c43a
Merge branch 'master' into drywall
Gristlebee Aug 27, 2024
98f1400
Merge branch 'master' into drywall
Gristlebee Aug 28, 2024
90ef1fa
start moving stuff up
Gristlebee Aug 30, 2024
08015f6
mining stuff
Gristlebee Sep 1, 2024
51f220b
dented
Gristlebee Sep 1, 2024
e430237
Merge pull request #2 from Gristlebee/even-dryer-wall
Gristlebee Sep 1, 2024
1358d48
Merge branch 'master' into drywall
Gristlebee Sep 1, 2024
b3a4b41
Merge branch 'master' into drywall
Gristlebee Sep 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -4716,6 +4716,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 @@ -929,6 +929,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 @@ -1349,6 +1350,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 @@ -1646,6 +1648,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 @@ -6272,6 +6275,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
10 changes: 6 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,15 @@
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, 30 / drill.drill_level))
drill.log_message("Drilled through [src]", LOG_MECHA)
dismantle_wall(devastated = TRUE)
alter_integrity(-drill.wall_decon_damage)

/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))
if(drill.do_after_mecha(src, 45 / drill.drill_level))
drill.log_message("Drilled through [src]", LOG_MECHA)
dismantle_wall(devastated = TRUE)
alter_integrity(-drill.wall_decon_damage)
else
drill.occupant_message("<span class='danger'>[src] is too durable to drill through.</span>")

Expand Down Expand Up @@ -150,6 +151,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
Loading