Skip to content

Commit

Permalink
Adjusting how walls handle dropping materials.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Mar 7, 2024
1 parent c459139 commit 810fe47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions code/game/turfs/simulated/wall_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@
material = /decl/material/solid/stone/sandstone
girder_material = null

/turf/simulated/wall/brick/get_dismantle_stack_type()
return /obj/item/stack/material/brick

/turf/simulated/wall/brick/get_wall_icon()
return 'icons/turf/walls/brick.dmi'

Expand All @@ -82,6 +85,9 @@
material = /decl/material/solid/organic/wood
girder_material = null

/turf/simulated/wall/log/get_dismantle_stack_type()
return /obj/item/stack/material/log

/turf/simulated/wall/log/get_wall_icon()
return 'icons/turf/walls/log.dmi'

Expand Down
5 changes: 4 additions & 1 deletion code/game/turfs/simulated/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ var/global/list/wall_fullblend_objects = list(
take_damage(log(RAND_F(0.9, 1.1) * (adj_temp - material.melting_point)))
return ..()

/turf/simulated/wall/proc/get_dismantle_stack_type()
return

/turf/simulated/wall/proc/dismantle_wall(var/devastated, var/explode, var/no_product)

playsound(src, 'sound/items/Welder.ogg', 100, 1)
Expand All @@ -217,7 +220,7 @@ var/global/list/wall_fullblend_objects = list(
placed_girder.prepped_for_fakewall = can_open
placed_girder.update_icon()
if(material)
material.place_dismantled_product(src, devastated)
material.place_dismantled_product(src, devastated, amount = rand(2, 3), drop_type = get_dismantle_stack_type())

for(var/obj/O in src.contents) //Eject contents!
if(istype(O,/obj/structure/sign/poster))
Expand Down

0 comments on commit 810fe47

Please sign in to comment.