diff --git a/code/modules/mapfluff/ruins/lavaland_ruin_code.dm b/code/modules/mapfluff/ruins/lavaland_ruin_code.dm index 1e5d10beb0f..3fc0c89f566 100644 --- a/code/modules/mapfluff/ruins/lavaland_ruin_code.dm +++ b/code/modules/mapfluff/ruins/lavaland_ruin_code.dm @@ -62,6 +62,21 @@ new shell_type(get_turf(src), /* creator = */ user, /* made_of = */ stack_type) qdel(src) +/obj/item/golem_shell/crowbar_act(mob/living/user, obj/item/tool) + . = ..() + + to_chat(user, span_notice("You begin dislodging structurally integral chunks.")) + playsound(src, 'sound/items/tools/crowbar.ogg', 70) + if(!do_after(user, delay = 1 SECONDS, target = src)) + return + if(QDELETED(src)) + return + new /obj/item/stack/sheet/mineral/adamantine(get_turf(src), 1) //Return less than was used to construct the shell + to_chat(user, span_notice("The shell collapses in on itself!")) + playsound(src, 'sound/effects/rock/rock_break.ogg', 40) + qdel(src) + return + ///made with xenobiology, the golem obeys its creator /obj/item/golem_shell/servant name = "incomplete servant golem shell" diff --git a/code/modules/mob_spawn/ghost_roles/golem_roles.dm b/code/modules/mob_spawn/ghost_roles/golem_roles.dm index f1a25d1e151..aca538fc0c9 100644 --- a/code/modules/mob_spawn/ghost_roles/golem_roles.dm +++ b/code/modules/mob_spawn/ghost_roles/golem_roles.dm @@ -18,6 +18,12 @@ /// Typepath to a material to feed to the golem as soon as it is built var/initial_type + //Deconstruction var's + var/list/obj/item/stack/drop_on_deconstruct + //Time it takes to deconstruct a completed shell. Note : You can dissssemble multiple at once + var/deconstruct_time = 4 SECONDS + + /obj/effect/mob_spawn/ghost_role/human/golem/Initialize(mapload, mob/living/creator, made_of) initial_type = made_of . = ..() @@ -106,3 +112,27 @@ if(owner_ref?.resolve()) forced_name = "Golem ([rand(1,999)])" return ..() + + +/obj/effect/mob_spawn/ghost_role/human/golem/crowbar_act(mob/living/user, obj/item/tool) + + if(DOING_INTERACTION_WITH_TARGET(user, src)) + return ITEM_INTERACT_SUCCESS + + if(user.combat_mode) + return + to_chat(user, span_notice("You begin prying load-bearing chunks from the completed shell.")) + playsound(user, 'sound/items/tools/crowbar.ogg', 70) + + if(do_after(user, delay = deconstruct_time, target = src)) + new /obj/item/stack/sheet/mineral/adamantine(get_turf(src)) + if(initial_type) + new initial_type(get_turf(src), 5) + else + new /obj/item/stack/sheet/iron/five(get_turf(src)) + + to_chat(user, span_notice("The Golem crumbles in on itself!")) + playsound(src, 'sound/effects/rock/rock_break.ogg', 60) + qdel(src) + + return ITEM_INTERACT_SUCCESS