From 43d855c41339c7e16072f5abc41dcdd493b85ff4 Mon Sep 17 00:00:00 2001 From: Blue Wildrose Date: Sun, 4 Apr 2021 17:05:18 -0700 Subject: [PATCH] Killable space pirate sleepers --- .../objects/structures/ghost_role_spawners.dm | 41 ++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 306868daba..a14c1208cd 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -590,7 +590,7 @@ /obj/effect/mob_spawn/human/pirate name = "space pirate sleeper" - desc = "A cryo sleeper smelling faintly of rum." + desc = "A cryo sleeper smelling faintly of rum. The sleeper looks unstable. Perhaps the pirate within can be killed with the right tools..." job_description = "Space Pirate" random = TRUE icon = 'icons/obj/machines/sleeper.dmi' @@ -608,6 +608,45 @@ assignedrole = "Space Pirate" var/rank = "Mate" +/obj/effect/mob_spawn/human/pirate/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) + . = ..() + if(.) + return + if(user.mind.has_antag_datum(/datum/antagonist/pirate)) + to_chat(user, "Your shipmate sails within their dreams for now. Perhaps they may wake up eventually.") + else + to_chat(user, "If you want to kill the pirate off, something to pry open the sleeper might be the best way to do it.") + + +/obj/effect/mob_spawn/human/pirate/attackby(obj/item/W, mob/user, params) + if(W.tool_behaviour == TOOL_CROWBAR && user.a_intent != INTENT_HARM) + if(user.mind.has_antag_datum(/datum/antagonist/pirate)) + to_chat(user,"Why would you want to do that to your shipmate? That'd kill them.") + return + user.visible_message("[usr.name] pries open the [src], disrupting the sleep of the pirate within and killing them.", + "You pry open the [src], disrupting the sleep of the pirate within and killing them.", + "You hear prying, followed by the death rattling of bones.") + W.play_tool_sound(src) + playsound(src.loc, 'modular_citadel/sound/voice/scream_skeleton.ogg', 50, 1, 4, 1.2) + if(rank == "Captain") new /obj/effect/mob_spawn/human/pirate/corpse/captain(get_turf(src)) + else new /obj/effect/mob_spawn/human/pirate/corpse(get_turf(src)) + qdel(src) + else + ..() + +/obj/effect/mob_spawn/human/pirate/corpse //occurs when someone pries a pirate out of their sleeper. + mob_name = "Dead Space Pirate" + death = TRUE + instant = TRUE + random = FALSE + +/obj/effect/mob_spawn/human/pirate/corpse/Destroy() + return ..() +/obj/effect/mob_spawn/human/pirate/corpse/captain + rank = "Captain" + mob_name = "Dead Space Pirate Captain" + outfit = /datum/outfit/pirate/space/captain + /obj/effect/mob_spawn/human/pirate/special(mob/living/new_spawn) new_spawn.fully_replace_character_name(new_spawn.real_name,generate_pirate_name()) new_spawn.mind.add_antag_datum(/datum/antagonist/pirate)