Skip to content

Commit

Permalink
Fixes wooden door assemblies being invincible (#11787)
Browse files Browse the repository at this point in the history
* Fixes wooden door assemblies being invincible

there was a /obj/item/stack/sheet/mineral /wood vs /obj/item/stack/sheet/wood  mishap

* i suppose the text2path was unnecessary here
  • Loading branch information
BarteG44 authored Oct 30, 2024
1 parent c1fa142 commit 48d98d8
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions code/game/objects/structures/door_assembly.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@
return

if(mineral)
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
var/mineral_path
if(mineral == "wood")
mineral_path = /obj/item/stack/sheet/wood
else
mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
user.visible_message("[user] welds the [mineral] plating off the airlock assembly.", "You start to weld the [mineral] plating off the airlock assembly...")
if(W.use_tool(src, user, 40, volume=50))
to_chat(user, "<span class='notice'>You weld the [mineral] plating off.</span>")
Expand Down Expand Up @@ -229,7 +233,7 @@
G.use(1)
glass = TRUE
if(!mineral)
if(istype(G, /obj/item/stack/sheet/mineral) && G.sheettype)
if((istype(G, /obj/item/stack/sheet/mineral) || istype(G, /obj/item/stack/sheet/wood)) && G.sheettype)
var/M = G.sheettype
if(G.get_amount() >= 2)
playsound(src, 'sound/items/crowbar.ogg', 100, 1)
Expand Down Expand Up @@ -341,7 +345,11 @@
else
new /obj/item/shard(T)
if(mineral)
var/obj/item/stack/sheet/mineral/mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
var/mineral_path
if(mineral == "wood")
mineral_path = /obj/item/stack/sheet/wood
else
mineral_path = text2path("/obj/item/stack/sheet/mineral/[mineral]")
new mineral_path(T, 2)
qdel(src)

Expand Down

0 comments on commit 48d98d8

Please sign in to comment.