From 43d855c41339c7e16072f5abc41dcdd493b85ff4 Mon Sep 17 00:00:00 2001 From: Blue Wildrose Date: Sun, 4 Apr 2021 17:05:18 -0700 Subject: [PATCH 1/6] 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) From 414d9d43e3802928d2af93c6cbfd4ccd512c7a26 Mon Sep 17 00:00:00 2001 From: Blue Wildrose Date: Sun, 4 Apr 2021 18:50:11 -0700 Subject: [PATCH 2/6] adding a gap here --- code/game/objects/structures/ghost_role_spawners.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index a14c1208cd..9a85a700e2 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -642,6 +642,7 @@ /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" From fb79a2033d68c201e2f2b4b4430defcab894f3e0 Mon Sep 17 00:00:00 2001 From: Blue Wildrose Date: Sun, 4 Apr 2021 21:34:27 -0700 Subject: [PATCH 3/6] usr.name into user, also adding in do_after. --- .../objects/structures/ghost_role_spawners.dm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 9a85a700e2..2e1f76cefe 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -623,14 +623,19 @@ 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.") + user.visible_message("[user] start to pry open the [src]...", + "You start to pry open the [src]...", + "You hear prying...") 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) + if(do_after(user, 100*W.toolspeed, target = src)) + user.visible_message("[user] 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 ..() From 80e94373903f9a2ee0c2a687f8bfa1052f579a33 Mon Sep 17 00:00:00 2001 From: Blue Wildrose Date: Mon, 5 Apr 2021 21:47:15 -0700 Subject: [PATCH 4/6] add some game logging for good measure --- code/game/objects/structures/ghost_role_spawners.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 2e1f76cefe..6044912028 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -631,6 +631,7 @@ user.visible_message("[user] 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.") + log_game("[key_name(user)] has successfully pried open a [src] and disabled a space pirate spawner.") 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)) From de6b3552d5980d3b351b0c6ade1d9b1aaee70e86 Mon Sep 17 00:00:00 2001 From: BlueWildrose <57083662+BlueWildrose@users.noreply.github.com> Date: Mon, 5 Apr 2021 22:59:24 -0700 Subject: [PATCH 5/6] that grammar would make me mad if I left it there why did I do that --- code/game/objects/structures/ghost_role_spawners.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 6044912028..ffe2b8a492 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -631,7 +631,7 @@ user.visible_message("[user] 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.") - log_game("[key_name(user)] has successfully pried open a [src] and disabled a space pirate spawner.") + log_game("[key_name(user)] has successfully pried open [src] and disabled a space pirate spawner.") 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)) From 911d8ffc12832ae08ae3409b24af94aeec5585c2 Mon Sep 17 00:00:00 2001 From: BlueWildrose <57083662+BlueWildrose@users.noreply.github.com> Date: Sun, 18 Apr 2021 18:02:04 -0700 Subject: [PATCH 6/6] requested changes --- .../game/objects/structures/ghost_role_spawners.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index ffe2b8a492..f5746d6ae7 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -623,19 +623,21 @@ 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("[user] start to pry open the [src]...", - "You start to pry open the [src]...", + user.visible_message("[user] start to pry open [src]...", + "You start to pry open [src]...", "You hear prying...") W.play_tool_sound(src) if(do_after(user, 100*W.toolspeed, target = src)) - user.visible_message("[user] 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.", + user.visible_message("[user] pries open [src], disrupting the sleep of the pirate within and killing them.", + "You pry open [src], disrupting the sleep of the pirate within and killing them.", "You hear prying, followed by the death rattling of bones.") log_game("[key_name(user)] has successfully pried open [src] and disabled a space pirate spawner.") 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)) + 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 ..()