diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index c0853068..e1f82e4a 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -208,6 +208,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \ new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\ new/datum/stack_recipe("tiki mask", /obj/item/clothing/mask/gas/tiki_mask, 2), \ new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\ + new/datum/stack_recipe("cross", /obj/structure/kitchenspike/cross, 10, time = 10),\ new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = TRUE, on_floor = TRUE),\ new/datum/stack_recipe("wooden crate", /obj/structure/closet/crate/wooden, 6, time = 50, one_per_turf = TRUE, on_floor = TRUE),\ new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\ diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 21622519..a717f7f1 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -153,4 +153,91 @@ new /obj/item/stack/rods(loc, 4) qdel(src) -#undef VIABLE_MOB_CHECK +/obj/structure/kitchenspike/cross + name = "cross" + icon = 'icons/obj/cross.dmi' + icon_state = "cross" + desc = "Degenerates like you belong on one of these." + anchored = TRUE + bound_height = 64 + +/obj/structure/kitchenspike/cross/crowbar_act(mob/living/user, obj/item/I) + if(has_buckled_mobs()) + to_chat(user, "You can't do that while something's on the cross!") + return FALSE + if(I.use_tool(src, user, 20, volume=100)) + deconstruct() + return TRUE + +/obj/structure/kitchenspike/cross/deconstruct() + new /obj/item/stack/sheet/mineral/wood(src.loc, 10) + qdel(src) + +/obj/structure/kitchenspike/cross/attack_hand(mob/user) + if(VIABLE_MOB_CHECK(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs()) + var/mob/living/L = user.pulling + if(do_mob(user, src, 120)) + if(has_buckled_mobs()) //to prevent spam/queing up attacks + return + if(L.buckled) + return + if(user.pulling != L) + return + playsound(src.loc, "sound/effects/crossed.ogg", 20, 1) // thanks hippie + L.visible_message("[user] ties [L] to the cross!", "[user] ties you to the cross!") + L.forceMove(drop_location()) + L.setDir(2) + buckle_mob(L, force=1) + L.pixel_y = 26 + L.overlays += image('icons/obj/cross.dmi', "lashing") + to_chat(user, "You can't use that on the cross!") + else if (has_buckled_mobs()) + for(var/mob/living/L in buckled_mobs) + user_unbuckle_mob(L, user) + else + ..() + +/obj/structure/kitchenspike/cross/user_unbuckle_mob(mob/living/buckled_mob, mob/living/carbon/human/user) + if(buckled_mob && buckled_mob.buckled == src) + var/mob/living/M = buckled_mob + if(M != user) + M.visible_message(\ + "[user] tries to pull [M] free of the [src]!",\ + "[user.name] is trying to pull you off the [src], opening up fresh wounds!",\ + "You hear rope being unraveled.") + if(!do_after(user, 300, target = src)) + if(M && M.buckled) + M.visible_message(\ + "[user] fails to free [M]!",\ + "[user] fails to pull you off of the [src].") + return + + else + M.visible_message(\ + "[M] struggles to break free from the [src]!",\ + "You struggle to break free from the [src], exacerbating your wounds! (Stay still for two minutes.)",\ + "You hear violent scraping and struggling.") + M.adjustBruteLoss(20) + if(!do_after(M, 1200, target = src)) + if(M && M.buckled) + to_chat(M, "You fail to free yourself!") + return + if(!M.buckled) + return + untie_mob(M) + +/obj/structure/kitchenspike/cross/proc/untie_mob(mob/living/M) + M.pixel_y = M.get_standard_pixel_y_offset() + M.adjustBruteLoss(15) + src.visible_message(text("[M] falls free of [src]!")) + unbuckle_mob(M,force=1) + M.emote("collapse") + M.overlays -= image('icons/obj/cross.dmi', "lashing") + +/obj/structure/kitchenspike/cross/Destroy() + if(has_buckled_mobs()) + for(var/mob/living/L in buckled_mobs) + untie_mob(L) + return ..() + +#undef VIABLE_MOB_CHECK \ No newline at end of file diff --git a/icons/obj/cross.dmi b/icons/obj/cross.dmi new file mode 100644 index 00000000..de147177 Binary files /dev/null and b/icons/obj/cross.dmi differ diff --git a/sound/effects/crossed.ogg b/sound/effects/crossed.ogg new file mode 100644 index 00000000..276d7f25 Binary files /dev/null and b/sound/effects/crossed.ogg differ