From 03ea432bf71396c91cf744f493a65648b99ea1d6 Mon Sep 17 00:00:00 2001 From: Darkstick <55104120+Darkstick@users.noreply.github.com> Date: Fri, 1 Nov 2019 18:10:18 -0400 Subject: [PATCH 1/9] Add files via upload --- yogstation/code/modules/mob/living/emote.dm | 144 ++++++++++---------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/yogstation/code/modules/mob/living/emote.dm b/yogstation/code/modules/mob/living/emote.dm index 4f3b4db9f8f0..0885df6cc05c 100644 --- a/yogstation/code/modules/mob/living/emote.dm +++ b/yogstation/code/modules/mob/living/emote.dm @@ -1,73 +1,73 @@ -/datum/emote/living/raisehand - key = "highfive" - key_third_person = "highfives" - restraint_check = TRUE - -/datum/emote/living/raisehand/run_emote(mob/user, params) - . = ..() - var/obj/item/highfive/N = new(user) - if(user.put_in_hands(N)) - to_chat(user, "You raise your hand for a high-five.") - else - qdel(N) - to_chat(user, "You don't have any free hands to high-five with.") - -/datum/emote/living/pose - key = "pose" - key_third_person = "poses" - message = "strikes a pose!" - restraint_check = TRUE - -/datum/emote/living/mpose - key = "mpose" - key_third_person = "mposes" - message = "strikes a menacing pose!" - restraint_check = TRUE - -/datum/emote/living/tpose - key = "tpose" - key_third_person = "tposes" - message = "strikes a T-pose!" - restraint_check = TRUE - -/datum/emote/living/vpose - key = "vpose" - key_third_person = "vposes" - message = "strikes a valiant pose!" - restraint_check = TRUE - -/datum/emote/living/wpose - key = "wpose" - key_third_person = "wposes" - message = "strikes a triumphant pose!" - restraint_check = TRUE - -/datum/emote/living/whistle - key = "whistle" - key_third_person = "whistles" - message = "whistles." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/iwhistle - key = "iwhistle" - key_third_person = "iwhistles" - message = "innocently whistles." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/smirk - key = "smirk" - key_third_person = "smirks" - message = "smirks." - -/datum/emote/living/dab - key = "dab" - key_third_person = "dabs" - message = "dabs." - message_param = "dabs on %t." - restraint_check = TRUE - -/datum/emote/living/dab/run_emote(mob/user, params) - . = ..() - if(ishuman(user)) - var/mob/living/carbon/human/H = user +/datum/emote/living/raisehand + key = "highfive" + key_third_person = "highfives" + restraint_check = TRUE + +/datum/emote/living/raisehand/run_emote(mob/user, params) + . = ..() + var/obj/item/highfive/N = new(user) + if(user.put_in_hands(N)) + to_chat(user, "You raise your hand for a high-five.") + else + qdel(N) + to_chat(user, "You don't have any free hands to high-five with.") + +/datum/emote/living/pose + key = "pose" + key_third_person = "poses" + message = "strikes a pose!" + restraint_check = TRUE + +/datum/emote/living/mpose + key = "mpose" + key_third_person = "mposes" + message = "strikes a menacing pose!" + restraint_check = TRUE + +/datum/emote/living/tpose + key = "tpose" + key_third_person = "tposes" + message = "strikes a T-pose!" + restraint_check = TRUE + +/datum/emote/living/vpose + key = "vpose" + key_third_person = "vposes" + message = "strikes a valiant pose!" + restraint_check = TRUE + +/datum/emote/living/wpose + key = "wpose" + key_third_person = "wposes" + message = "strikes a triumphant pose!" + restraint_check = TRUE + +/datum/emote/living/whistle + key = "whistle" + key_third_person = "whistles" + message = "whistles." + emote_type = EMOTE_AUDIBLE + +/datum/emote/living/iwhistle + key = "iwhistle" + key_third_person = "iwhistles" + message = "innocently whistles." + emote_type = EMOTE_AUDIBLE + +/datum/emote/living/smirk + key = "smirk" + key_third_person = "smirks" + message = "smirks." + +/datum/emote/living/dab + key = "dab" + key_third_person = "dabs" + message = "dabs." + message_param = "dabs on %t." + restraint_check = TRUE + +/datum/emote/living/dab/run_emote(mob/user, params) + . = ..() + if(ishuman(user)) + var/mob/living/carbon/human/H = user H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) \ No newline at end of file From 9cce335fbb2ab164c6c45c1762e03e92d26c7a5b Mon Sep 17 00:00:00 2001 From: Darkstick Date: Fri, 29 Nov 2019 00:40:35 -0500 Subject: [PATCH 2/9] ninja man explodes --- code/__DEFINES/traits.dm | 2 ++ code/modules/antagonists/ninja/ninja.dm | 22 +++++++++++++++++++ .../suit/n_suit_verbs/energy_net_nets.dm | 7 +++--- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index c0105d5e0163..d1397ccc6b61 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -138,6 +138,7 @@ #define TRAIT_UNINTELLIGIBLE_SPEECH "unintelligible-speech" #define TRAIT_UNSTABLE "unstable" #define TRAIT_OIL_FRIED "oil_fried" +#define TRAIT_CAPTURED "captured" //non-mob traits #define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it @@ -226,3 +227,4 @@ #define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant" #define HIVEMIND_ONE_MIND_TRAIT "one_mind" #define VR_ZONE_TRAIT "vr_zone_trait" +#define NINJA_NET "ninja_net" diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm index 9352e918779b..3bc38cd1624b 100644 --- a/code/modules/antagonists/ninja/ninja.dm +++ b/code/modules/antagonists/ninja/ninja.dm @@ -15,10 +15,16 @@ /datum/antagonist/ninja/apply_innate_effects(mob/living/mob_override) var/mob/living/M = mob_override || owner.current + for(var/obj/item/implant/explosive/E in M.implants) + if(E) + RegisterSignal(E, COMSIG_IMPLANT_ACTIVATED, .proc/on_death) update_ninja_icons_added(M) /datum/antagonist/ninja/remove_innate_effects(mob/living/mob_override) var/mob/living/M = mob_override || owner.current + for(var/obj/item/implant/explosive/E in M.implants) + if(E) + UnregisterSignal(M, COMSIG_IMPLANT_ACTIVATED, .proc/on_death) update_ninja_icons_removed(M) /datum/antagonist/ninja/proc/equip_space_ninja(mob/living/carbon/human/H = owner.current) @@ -125,6 +131,22 @@ equip_space_ninja(owner.current) . = ..() +/datum/antagonist/ninja/proc/on_death() + for(var/mob/L in GLOB.player_list) + if(HAS_TRAIT_FROM(L, TRAIT_CAPTURED, NINJA_NET)) + var/atom/movable/target = L + if(isobj(L.loc)) + target = L.loc + target.forceMove(get_turf(pick(GLOB.generic_event_spawns))) + if(isliving(L)) + var/mob/living/LI = L + LI.Knockdown(60) + LI.blind_eyes(30) + to_chat(L, "You lose your footing as the dojo suddenly disappears. You're free!") + playsound(L, 'sound/effects/phasein.ogg', 25, 1) + playsound(L, 'sound/effects/sparks2.ogg', 50, 1) + REMOVE_TRAIT(L, TRAIT_CAPTURED, NINJA_NET) + /datum/antagonist/ninja/admin_add(datum/mind/new_owner,mob/admin) var/adj switch(input("What kind of ninja?", "Ninja") as null|anything in list("Random","Syndicate","Nanotrasen","No objectives")) diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm index 270e1f106f61..e281ee212f43 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -36,7 +36,7 @@ It is possible to destroy the net by the occupant or someone else. if(!QDELETED(affecting)) affecting.visible_message("[affecting.name] was recovered from the energy net!", "You were recovered from the energy net!", "You hear a grunt.") if(!QDELETED(master))//As long as they still exist. - to_chat(master, "ERROR: unable to initiate transport protocol. Procedure terminated.") + to_chat(master, "ERROR: unable to initiate capture protocol. Procedure terminated.") return ..() /obj/structure/energy_net/process() @@ -64,10 +64,11 @@ It is possible to destroy the net by the occupant or someone else. visible_message("[affecting] suddenly vanishes!") affecting.forceMove(pick(GLOB.holdingfacility)) //Throw mob in to the holding facility. - to_chat(affecting, "You appear in a strange place!") + ADD_TRAIT(affecting, TRAIT_CAPTURED, NINJA_NET) + to_chat(affecting, "You appear in a strange place. You feel very trapped.") if(!QDELETED(master))//As long as they still exist. - to_chat(master, "SUCCESS: transport procedure of [affecting] complete.") + to_chat(master, "SUCCESS: capture procedure of [affecting] complete.") do_sparks(5, FALSE, affecting) playsound(affecting, 'sound/effects/phasein.ogg', 25, 1) playsound(affecting, 'sound/effects/sparks2.ogg', 50, 1) From 2b692c5affe255ccf2d5201e92371544e15d9e93 Mon Sep 17 00:00:00 2001 From: Darkstick <55104120+Darkstick@users.noreply.github.com> Date: Fri, 29 Nov 2019 00:57:33 -0500 Subject: [PATCH 3/9] Ignore that. --- yogstation/code/modules/mob/living/emote.dm | 146 ++++++++++---------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/yogstation/code/modules/mob/living/emote.dm b/yogstation/code/modules/mob/living/emote.dm index 0885df6cc05c..4057a8c9d662 100644 --- a/yogstation/code/modules/mob/living/emote.dm +++ b/yogstation/code/modules/mob/living/emote.dm @@ -1,73 +1,73 @@ -/datum/emote/living/raisehand - key = "highfive" - key_third_person = "highfives" - restraint_check = TRUE - -/datum/emote/living/raisehand/run_emote(mob/user, params) - . = ..() - var/obj/item/highfive/N = new(user) - if(user.put_in_hands(N)) - to_chat(user, "You raise your hand for a high-five.") - else - qdel(N) - to_chat(user, "You don't have any free hands to high-five with.") - -/datum/emote/living/pose - key = "pose" - key_third_person = "poses" - message = "strikes a pose!" - restraint_check = TRUE - -/datum/emote/living/mpose - key = "mpose" - key_third_person = "mposes" - message = "strikes a menacing pose!" - restraint_check = TRUE - -/datum/emote/living/tpose - key = "tpose" - key_third_person = "tposes" - message = "strikes a T-pose!" - restraint_check = TRUE - -/datum/emote/living/vpose - key = "vpose" - key_third_person = "vposes" - message = "strikes a valiant pose!" - restraint_check = TRUE - -/datum/emote/living/wpose - key = "wpose" - key_third_person = "wposes" - message = "strikes a triumphant pose!" - restraint_check = TRUE - -/datum/emote/living/whistle - key = "whistle" - key_third_person = "whistles" - message = "whistles." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/iwhistle - key = "iwhistle" - key_third_person = "iwhistles" - message = "innocently whistles." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/smirk - key = "smirk" - key_third_person = "smirks" - message = "smirks." - -/datum/emote/living/dab - key = "dab" - key_third_person = "dabs" - message = "dabs." - message_param = "dabs on %t." - restraint_check = TRUE - -/datum/emote/living/dab/run_emote(mob/user, params) - . = ..() - if(ishuman(user)) - var/mob/living/carbon/human/H = user - H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) \ No newline at end of file +/datum/emote/living/raisehand + key = "highfive" + key_third_person = "highfives" + restraint_check = TRUE + +/datum/emote/living/raisehand/run_emote(mob/user, params) + . = ..() + var/obj/item/highfive/N = new(user) + if(user.put_in_hands(N)) + to_chat(user, "You raise your hand for a high-five.") + else + qdel(N) + to_chat(user, "You don't have any free hands to high-five with.") + +/datum/emote/living/pose + key = "pose" + key_third_person = "poses" + message = "strikes a pose!" + restraint_check = TRUE + +/datum/emote/living/mpose + key = "mpose" + key_third_person = "mposes" + message = "strikes a menacing pose!" + restraint_check = TRUE + +/datum/emote/living/tpose + key = "tpose" + key_third_person = "tposes" + message = "strikes a T-pose!" + restraint_check = TRUE + +/datum/emote/living/vpose + key = "vpose" + key_third_person = "vposes" + message = "strikes a valiant pose!" + restraint_check = TRUE + +/datum/emote/living/wpose + key = "wpose" + key_third_person = "wposes" + message = "strikes a triumphant pose!" + restraint_check = TRUE + +/datum/emote/living/whistle + key = "whistle" + key_third_person = "whistles" + message = "whistles." + emote_type = EMOTE_AUDIBLE + +/datum/emote/living/iwhistle + key = "iwhistle" + key_third_person = "iwhistles" + message = "innocently whistles." + emote_type = EMOTE_AUDIBLE + +/datum/emote/living/smirk + key = "smirk" + key_third_person = "smirks" + message = "smirks." + +/datum/emote/living/dab + key = "dab" + key_third_person = "dabs" + message = "dabs." + message_param = "dabs on %t." + restraint_check = TRUE + +/datum/emote/living/dab/run_emote(mob/user, params) + . = ..() + if(. && ishuman(user)) + var/mob/living/carbon/human/H = user + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) From 17db9125df125472c8efb349412ee69b5eddd113 Mon Sep 17 00:00:00 2001 From: Darkstick Date: Mon, 2 Dec 2019 15:07:21 -0500 Subject: [PATCH 4/9] Use list instead of trait and makes the proc go off after the implant activation rather than as soon as you click the icon --- code/__DEFINES/traits.dm | 4 +-- .../items/implants/implant_explosive.dm | 2 +- code/modules/antagonists/ninja/ninja.dm | 35 +++++++++++-------- .../suit/n_suit_verbs/energy_net_nets.dm | 2 +- 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index d1397ccc6b61..51426205fe37 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -138,7 +138,6 @@ #define TRAIT_UNINTELLIGIBLE_SPEECH "unintelligible-speech" #define TRAIT_UNSTABLE "unstable" #define TRAIT_OIL_FRIED "oil_fried" -#define TRAIT_CAPTURED "captured" //non-mob traits #define TRAIT_PARALYSIS "paralysis" //Used for limb-based paralysis, where replacing the limb will fix it @@ -226,5 +225,4 @@ #define NINJA_SUIT_TRAIT "ninja-suit" #define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant" #define HIVEMIND_ONE_MIND_TRAIT "one_mind" -#define VR_ZONE_TRAIT "vr_zone_trait" -#define NINJA_NET "ninja_net" +#define VR_ZONE_TRAIT "vr_zone_trait" \ No newline at end of file diff --git a/code/game/objects/items/implants/implant_explosive.dm b/code/game/objects/items/implants/implant_explosive.dm index d2748567979e..97912e4d1e72 100644 --- a/code/game/objects/items/implants/implant_explosive.dm +++ b/code/game/objects/items/implants/implant_explosive.dm @@ -27,7 +27,6 @@ return dat /obj/item/implant/explosive/activate(cause) - . = ..() if(!cause || !imp_in || active) return 0 if(cause == "action_button" && !popup) @@ -41,6 +40,7 @@ weak = round(weak) to_chat(imp_in, "You activate your [name].") active = TRUE + . = ..() var/turf/boomturf = get_turf(imp_in) message_admins("[ADMIN_LOOKUPFLW(imp_in)] has activated their [name] at [ADMIN_VERBOSEJMP(boomturf)], with cause of [cause].") //If the delay is short, just blow up already jeez diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm index 3bc38cd1624b..f45762734eea 100644 --- a/code/modules/antagonists/ninja/ninja.dm +++ b/code/modules/antagonists/ninja/ninja.dm @@ -1,3 +1,5 @@ +GLOBAL_LIST_EMPTY(ninja_capture) + /datum/antagonist/ninja name = "Ninja" antagpanel_category = "Ninja" @@ -131,21 +133,24 @@ equip_space_ninja(owner.current) . = ..() + + /datum/antagonist/ninja/proc/on_death() - for(var/mob/L in GLOB.player_list) - if(HAS_TRAIT_FROM(L, TRAIT_CAPTURED, NINJA_NET)) - var/atom/movable/target = L - if(isobj(L.loc)) - target = L.loc - target.forceMove(get_turf(pick(GLOB.generic_event_spawns))) - if(isliving(L)) - var/mob/living/LI = L - LI.Knockdown(60) - LI.blind_eyes(30) - to_chat(L, "You lose your footing as the dojo suddenly disappears. You're free!") - playsound(L, 'sound/effects/phasein.ogg', 25, 1) - playsound(L, 'sound/effects/sparks2.ogg', 50, 1) - REMOVE_TRAIT(L, TRAIT_CAPTURED, NINJA_NET) + for(var/mob/L in GLOB.ninja_capture) + if(!L) + continue + var/atom/movable/target = L + if(isobj(L.loc)) + target = L.loc + target.forceMove(get_turf(pick(GLOB.generic_event_spawns))) + if(isliving(L)) + var/mob/living/LI = L + LI.Knockdown(120) + LI.blind_eyes(10) + to_chat(L, "You lose your footing as the dojo suddenly disappears. You're free!") + playsound(L, 'sound/effects/phasein.ogg', 25, 1) + playsound(L, 'sound/effects/sparks2.ogg', 50, 1) + GLOB.ninja_capture -= L /datum/antagonist/ninja/admin_add(datum/mind/new_owner,mob/admin) var/adj @@ -180,4 +185,4 @@ /datum/antagonist/ninja/proc/update_ninja_icons_removed(var/mob/living/carbon/human/ninja) var/datum/atom_hud/antag/ninjahud = GLOB.huds[ANTAG_HUD_NINJA] ninjahud.leave_hud(ninja) - set_antag_hud(ninja, null) + set_antag_hud(ninja, null) \ No newline at end of file diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm index e281ee212f43..146d110ce0e9 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -64,7 +64,7 @@ It is possible to destroy the net by the occupant or someone else. visible_message("[affecting] suddenly vanishes!") affecting.forceMove(pick(GLOB.holdingfacility)) //Throw mob in to the holding facility. - ADD_TRAIT(affecting, TRAIT_CAPTURED, NINJA_NET) + GLOB.ninja_capture += affecting to_chat(affecting, "You appear in a strange place. You feel very trapped.") if(!QDELETED(master))//As long as they still exist. From 03bba89ac2cd1008d74796e3a84748baab189b7a Mon Sep 17 00:00:00 2001 From: Darkstick <55104120+Darkstick@users.noreply.github.com> Date: Mon, 2 Dec 2019 15:22:07 -0500 Subject: [PATCH 5/9] fuck --- yogstation/code/modules/mob/living/emote.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/yogstation/code/modules/mob/living/emote.dm b/yogstation/code/modules/mob/living/emote.dm index 4057a8c9d662..ee5956304676 100644 --- a/yogstation/code/modules/mob/living/emote.dm +++ b/yogstation/code/modules/mob/living/emote.dm @@ -71,3 +71,4 @@ if(. && ishuman(user)) var/mob/living/carbon/human/H = user H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) + From b2c87ddcab312766ef1386e0fd92ba57001f7a40 Mon Sep 17 00:00:00 2001 From: Darkstick <55104120+Darkstick@users.noreply.github.com> Date: Mon, 2 Dec 2019 15:25:43 -0500 Subject: [PATCH 6/9] the hell is a newline --- code/__DEFINES/traits.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index e9da0cd36627..0ffee9b7bc5c 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -226,4 +226,4 @@ #define NINJA_SUIT_TRAIT "ninja-suit" #define ANTI_DROP_IMPLANT_TRAIT "anti-drop-implant" #define HIVEMIND_ONE_MIND_TRAIT "one_mind" -#define VR_ZONE_TRAIT "vr_zone_trait" \ No newline at end of file +#define VR_ZONE_TRAIT "vr_zone_trait" From 55429268f04d2c8a5dc2d208f026683e254c8d2f Mon Sep 17 00:00:00 2001 From: Darkstick <55104120+Darkstick@users.noreply.github.com> Date: Mon, 2 Dec 2019 15:26:18 -0500 Subject: [PATCH 7/9] Update ninja.dm --- code/modules/antagonists/ninja/ninja.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm index f45762734eea..d6e47063612b 100644 --- a/code/modules/antagonists/ninja/ninja.dm +++ b/code/modules/antagonists/ninja/ninja.dm @@ -185,4 +185,5 @@ GLOBAL_LIST_EMPTY(ninja_capture) /datum/antagonist/ninja/proc/update_ninja_icons_removed(var/mob/living/carbon/human/ninja) var/datum/atom_hud/antag/ninjahud = GLOB.huds[ANTAG_HUD_NINJA] ninjahud.leave_hud(ninja) - set_antag_hud(ninja, null) \ No newline at end of file + set_antag_hud(ninja, null) + From c957216599c813c76b0fa0ebb1827bda958805ed Mon Sep 17 00:00:00 2001 From: Darkstick Date: Mon, 2 Dec 2019 15:32:54 -0500 Subject: [PATCH 8/9] goddamnit --- code/modules/antagonists/ninja/ninja.dm | 2 - code/modules/mob/living/emote.dm | 551 +++--------------------- 2 files changed, 51 insertions(+), 502 deletions(-) diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm index f45762734eea..64e14c63e0a6 100644 --- a/code/modules/antagonists/ninja/ninja.dm +++ b/code/modules/antagonists/ninja/ninja.dm @@ -133,8 +133,6 @@ GLOBAL_LIST_EMPTY(ninja_capture) equip_space_ninja(owner.current) . = ..() - - /datum/antagonist/ninja/proc/on_death() for(var/mob/L in GLOB.ninja_capture) if(!L) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 74f33179be40..4057a8c9d662 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -1,522 +1,73 @@ - -/* EMOTE DATUMS */ -/datum/emote/living - mob_type_allowed_typecache = /mob/living - mob_type_blacklist_typecache = list(/mob/living/simple_animal/slime, /mob/living/brain) - -/datum/emote/living/blush - key = "blush" - key_third_person = "blushes" - message = "blushes." - -/datum/emote/living/bow - key = "bow" - key_third_person = "bows" - message = "bows." - message_param = "bows to %t." +/datum/emote/living/raisehand + key = "highfive" + key_third_person = "highfives" restraint_check = TRUE -/datum/emote/living/burp - key = "burp" - key_third_person = "burps" - message = "burps." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/choke - key = "choke" - key_third_person = "chokes" - message = "chokes!" - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/cross - key = "cross" - key_third_person = "crosses" - message = "crosses their arms." - restraint_check = TRUE - -/datum/emote/living/chuckle - key = "chuckle" - key_third_person = "chuckles" - message = "chuckles." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/collapse - key = "collapse" - key_third_person = "collapses" - message = "collapses!" - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/collapse/run_emote(mob/user, params, type_override, intentional) - . = ..() - if(. && isliving(user)) - var/mob/living/L = user - L.Unconscious(40) - -/datum/emote/living/cough - key = "cough" - key_third_person = "coughs" - message = "coughs!" - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/cough/can_run_emote(mob/user, status_check = TRUE , intentional) +/datum/emote/living/raisehand/run_emote(mob/user, params) . = ..() - if(HAS_TRAIT(user, TRAIT_SOOTHED_THROAT)) - return FALSE + var/obj/item/highfive/N = new(user) + if(user.put_in_hands(N)) + to_chat(user, "You raise your hand for a high-five.") + else + qdel(N) + to_chat(user, "You don't have any free hands to high-five with.") -/datum/emote/living/dance - key = "dance" - key_third_person = "dances" - message = "dances around happily." +/datum/emote/living/pose + key = "pose" + key_third_person = "poses" + message = "strikes a pose!" restraint_check = TRUE -/datum/emote/living/deathgasp - key = "deathgasp" - key_third_person = "deathgasps" - message = "seizes up and falls limp, their eyes dead and lifeless..." - message_robot = "shudders violently for a moment before falling still, its eyes slowly darkening." - message_AI = "lets out a flurry of sparks, its screen flickering as its systems slowly halt." - message_alien = "lets out a waning guttural screech, green blood bubbling from its maw..." - message_larva = "lets out a sickly hiss of air and falls limply to the floor..." - message_monkey = "lets out a faint chimper as it collapses and stops moving..." - message_simple = "stops moving..." - stat_allowed = UNCONSCIOUS - -/datum/emote/living/deathgasp/run_emote(mob/user, params, type_override, intentional) - var/mob/living/simple_animal/S = user - if(istype(S) && S.deathmessage) - message_simple = S.deathmessage - . = ..() - message_simple = initial(message_simple) - if(. && user.deathsound) - if(isliving(user)) - var/mob/living/L = user - if(!L.can_speak_vocal() || L.oxyloss >= 50) - return //stop the sound if oxyloss too high/cant speak - playsound(user, user.deathsound, 200, TRUE, TRUE) - -/datum/emote/living/drool - key = "drool" - key_third_person = "drools" - message = "drools." - -/datum/emote/living/faint - key = "faint" - key_third_person = "faints" - message = "faints." - -/datum/emote/living/faint/run_emote(mob/user, params, type_override, intentional) - . = ..() - if(. && isliving(user)) - var/mob/living/L = user - L.SetSleeping(200) - -/datum/emote/living/flap - key = "flap" - key_third_person = "flaps" - message = "flaps their wings." +/datum/emote/living/mpose + key = "mpose" + key_third_person = "mposes" + message = "strikes a menacing pose!" restraint_check = TRUE - var/wing_time = 20 -/datum/emote/living/flap/run_emote(mob/user, params, type_override, intentional) - . = ..() - if(. && ishuman(user)) - var/mob/living/carbon/human/H = user - var/open = FALSE - if(H.dna.features["wings"] != "None") - if("wingsopen" in H.dna.species.mutant_bodyparts) - open = TRUE - H.CloseWings() - else - H.OpenWings() - addtimer(CALLBACK(H, open ? /mob/living/carbon/human.proc/OpenWings : /mob/living/carbon/human.proc/CloseWings), wing_time) - -/datum/emote/living/flap/aflap - key = "aflap" - key_third_person = "aflaps" - message = "flaps their wings ANGRILY!" +/datum/emote/living/tpose + key = "tpose" + key_third_person = "tposes" + message = "strikes a T-pose!" restraint_check = TRUE - wing_time = 10 - -/datum/emote/living/frown - key = "frown" - key_third_person = "frowns" - message = "frowns." - -/datum/emote/living/gag - key = "gag" - key_third_person = "gags" - message = "gags." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/gasp - key = "gasp" - key_third_person = "gasps" - message = "gasps!" - emote_type = EMOTE_AUDIBLE - stat_allowed = UNCONSCIOUS - -/datum/emote/living/giggle - key = "giggle" - key_third_person = "giggles" - message = "giggles." - message_mime = "giggles silently!" - emote_type = EMOTE_AUDIBLE -/datum/emote/living/glare - key = "glare" - key_third_person = "glares" - message = "glares." - message_param = "glares at %t." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/grin - key = "grin" - key_third_person = "grins" - message = "grins." - -/datum/emote/living/groan - key = "groan" - key_third_person = "groans" - message = "groans!" - message_mime = "appears to groan!" - -/datum/emote/living/grimace - key = "grimace" - key_third_person = "grimaces" - message = "grimaces." - -/datum/emote/living/jump - key = "jump" - key_third_person = "jumps" - message = "jumps!" +/datum/emote/living/vpose + key = "vpose" + key_third_person = "vposes" + message = "strikes a valiant pose!" restraint_check = TRUE -/datum/emote/living/kiss - key = "kiss" - key_third_person = "kisses" - message = "blows a kiss." - message_param = "blows a kiss to %t." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/laugh - key = "laugh" - key_third_person = "laughs" - message = "laughs." - message_mime = "laughs silently!" - emote_type = EMOTE_AUDIBLE - vary = TRUE - -/datum/emote/living/laugh/can_run_emote(mob/living/user, status_check = TRUE , intentional) - . = ..() - if(. && iscarbon(user)) - var/mob/living/carbon/C = user - return !C.silent - -/datum/emote/living/laugh/get_sound(mob/living/user) - if(ishuman(user)) - var/mob/living/carbon/human/H = user - if(H.dna.species.id == "human" && (!H.mind || !H.mind.miming)) - if(user.gender == FEMALE) - return 'sound/voice/human/womanlaugh.ogg' - else - return pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg') - -/datum/emote/living/look - key = "look" - key_third_person = "looks" - message = "looks." - message_param = "looks at %t." - -/datum/emote/living/nod - key = "nod" - key_third_person = "nods" - message = "nods." - message_param = "nods at %t." - -/datum/emote/living/point - key = "point" - key_third_person = "points" - message = "points." - message_param = "points at %t." +/datum/emote/living/wpose + key = "wpose" + key_third_person = "wposes" + message = "strikes a triumphant pose!" restraint_check = TRUE -/datum/emote/living/point/run_emote(mob/user, params, type_override, intentional) - message_param = initial(message_param) // reset - if(ishuman(user)) - var/mob/living/carbon/human/H = user - if(H.get_num_arms() == 0) - if(H.get_num_legs() != 0) - message_param = "tries to point at %t with a leg, falling down in the process!" - H.Paralyze(20) - else - message_param = "bumps [user.p_their()] head on the ground trying to motion towards %t." - H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) - ..() - -/datum/emote/living/pout - key = "pout" - key_third_person = "pouts" - message = "pouts." +/datum/emote/living/whistle + key = "whistle" + key_third_person = "whistles" + message = "whistles." emote_type = EMOTE_AUDIBLE -/datum/emote/living/scream - key = "scream" - key_third_person = "screams" - message = "screams." - message_mime = "acts out a scream!" +/datum/emote/living/iwhistle + key = "iwhistle" + key_third_person = "iwhistles" + message = "innocently whistles." emote_type = EMOTE_AUDIBLE - mob_type_blacklist_typecache = list(/mob/living/carbon/human) //Humans get specialized scream. -/datum/emote/living/scream/select_message_type(mob/user, intentional) - . = ..() - if(!intentional && isanimal(user)) - return "makes a loud and pained whimper." +/datum/emote/living/smirk + key = "smirk" + key_third_person = "smirks" + message = "smirks." -/datum/emote/living/scowl - key = "scowl" - key_third_person = "scowls" - message = "scowls." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/shake - key = "shake" - key_third_person = "shakes" - message = "shakes their head." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/shiver - key = "shiver" - key_third_person = "shiver" - message = "shivers." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/sigh - key = "sigh" - key_third_person = "sighs" - message = "sighs." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/sit - key = "sit" - key_third_person = "sits" - message = "sits down." - -/datum/emote/living/smile - key = "smile" - key_third_person = "smiles" - message = "smiles." - -/datum/emote/living/sneeze - key = "sneeze" - key_third_person = "sneezes" - message = "sneezes." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/smug - key = "smug" - key_third_person = "smugs" - message = "grins smugly." - -/datum/emote/living/sniff - key = "sniff" - key_third_person = "sniffs" - message = "sniffs." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/snore - key = "snore" - key_third_person = "snores" - message = "snores." - message_mime = "sleeps soundly." - emote_type = EMOTE_AUDIBLE - stat_allowed = UNCONSCIOUS - -/datum/emote/living/stare - key = "stare" - key_third_person = "stares" - message = "stares." - message_param = "stares at %t." - -/datum/emote/living/strech - key = "stretch" - key_third_person = "stretches" - message = "stretches their arms." - -/datum/emote/living/sulk - key = "sulk" - key_third_person = "sulks" - message = "sulks down sadly." - -/datum/emote/living/surrender - key = "surrender" - key_third_person = "surrenders" - message = "puts their hands on their head and falls to the ground, they surrender!" - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/surrender/run_emote(mob/user, params, type_override, intentional) - . = ..() - if(. && isliving(user)) - var/mob/living/L = user - L.Paralyze(200) - -/datum/emote/living/sway - key = "sway" - key_third_person = "sways" - message = "sways around dizzily." - -/datum/emote/living/tremble - key = "tremble" - key_third_person = "trembles" - message = "trembles in fear!" - -/datum/emote/living/twitch - key = "twitch" - key_third_person = "twitches" - message = "twitches violently." - -/datum/emote/living/twitch_s - key = "twitch_s" - message = "twitches." - -/datum/emote/living/wave - key = "wave" - key_third_person = "waves" - message = "waves." - -/datum/emote/living/whimper - key = "whimper" - key_third_person = "whimpers" - message = "whimpers." - message_mime = "appears hurt." - -/datum/emote/living/wsmile - key = "wsmile" - key_third_person = "wsmiles" - message = "smiles weakly." - -/datum/emote/living/yawn - key = "yawn" - key_third_person = "yawns" - message = "yawns." - emote_type = EMOTE_AUDIBLE - -/datum/emote/living/custom - key = "me" - key_third_person = "custom" - message = null - -/datum/emote/living/custom/can_run_emote(mob/user, status_check, intentional) - . = ..() && intentional - -/datum/emote/living/custom/proc/check_invalid(mob/user, input) - . = TRUE - if(copytext(input,1,5) == "says") - to_chat(user, "Invalid emote.") - else if(copytext(input,1,9) == "exclaims") - to_chat(user, "Invalid emote.") - else if(copytext(input,1,6) == "yells") - to_chat(user, "Invalid emote.") - else if(copytext(input,1,5) == "asks") - to_chat(user, "Invalid emote.") - else - . = FALSE - -/datum/emote/living/custom/run_emote(mob/user, params, type_override = null, intentional = FALSE) - if(!can_run_emote(user, TRUE, intentional)) - return FALSE - if(is_banned_from(user.ckey, "Emote")) - to_chat(user, "You cannot send custom emotes (banned).") - return FALSE - else if(QDELETED(user)) - return FALSE - else if(user.client && user.client.prefs.muted & MUTE_IC) - to_chat(user, "You cannot send IC messages (muted).") - return FALSE - else if(!params) - var/custom_emote = copytext(sanitize(input("Choose an emote to display.") as text|null), 1, MAX_MESSAGE_LEN) - if(custom_emote && !check_invalid(user, custom_emote)) - var/type = input("Is this a visible or hearable emote?") as null|anything in list("Visible", "Hearable") - switch(type) - if("Visible") - emote_type = EMOTE_VISIBLE - if("Hearable") - emote_type = EMOTE_AUDIBLE - else - alert("Unable to use this emote, must be either hearable or visible.") - return - message = custom_emote - else - message = params - if(type_override) - emote_type = type_override - . = ..() - message = null - emote_type = EMOTE_VISIBLE - -/datum/emote/living/custom/replace_pronoun(mob/user, message) - return message - -/datum/emote/living/help - key = "help" - -/datum/emote/living/help/run_emote(mob/user, params, type_override, intentional) - var/list/keys = list() - var/list/message = list("Available emotes, you can use them with say \"*emote\": ") - - for(var/key in GLOB.emote_list) - for(var/datum/emote/P in GLOB.emote_list[key]) - if(P.key in keys) - continue - if(P.can_run_emote(user, status_check = FALSE , intentional = TRUE)) - keys += P.key - - keys = sortList(keys) - - for(var/emote in keys) - if(LAZYLEN(message) > 1) - message += ", [emote]" - else - message += "[emote]" - - message += "." - - message = jointext(message, "") - - to_chat(user, message) - -/datum/emote/beep - key = "beep" - key_third_person = "beeps" - message = "beeps." - message_param = "beeps at %t." - sound = 'sound/machines/twobeep.ogg' - mob_type_allowed_typecache = list(/mob/living/brain, /mob/living/silicon) - -/datum/emote/living/circle - key = "circle" - key_third_person = "circles" - restraint_check = TRUE - -/datum/emote/living/circle/run_emote(mob/user, params, type_override, intentional) - . = ..() - var/obj/item/circlegame/N = new(user) - if(user.put_in_hands(N)) - to_chat(user, "You make a circle with your hand.") - else - qdel(N) - to_chat(user, "You don't have any free hands to make a circle with.") - -/datum/emote/living/slap - key = "slap" - key_third_person = "slaps" +/datum/emote/living/dab + key = "dab" + key_third_person = "dabs" + message = "dabs." + message_param = "dabs on %t." restraint_check = TRUE -/datum/emote/living/slap/run_emote(mob/user, params, type_override, intentional) +/datum/emote/living/dab/run_emote(mob/user, params) . = ..() - if(!.) - return - var/obj/item/slapper/N = new(user) - if(user.put_in_hands(N)) - to_chat(user, "You ready your slapping hand.") - else - to_chat(user, "You're incapable of slapping in your current state.") + if(. && ishuman(user)) + var/mob/living/carbon/human/H = user + H.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5) From 790da6110f83c4bcf0dd18d03467e7014690a4d2 Mon Sep 17 00:00:00 2001 From: Darkstick Date: Mon, 2 Dec 2019 18:16:56 -0500 Subject: [PATCH 9/9] Checks if the player is actually still in the dojo --- code/modules/antagonists/ninja/ninja.dm | 29 +++++++++++++------------ 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm index 64e14c63e0a6..9dbfe2d6c7bf 100644 --- a/code/modules/antagonists/ninja/ninja.dm +++ b/code/modules/antagonists/ninja/ninja.dm @@ -135,20 +135,21 @@ GLOBAL_LIST_EMPTY(ninja_capture) /datum/antagonist/ninja/proc/on_death() for(var/mob/L in GLOB.ninja_capture) - if(!L) - continue - var/atom/movable/target = L - if(isobj(L.loc)) - target = L.loc - target.forceMove(get_turf(pick(GLOB.generic_event_spawns))) - if(isliving(L)) - var/mob/living/LI = L - LI.Knockdown(120) - LI.blind_eyes(10) - to_chat(L, "You lose your footing as the dojo suddenly disappears. You're free!") - playsound(L, 'sound/effects/phasein.ogg', 25, 1) - playsound(L, 'sound/effects/sparks2.ogg', 50, 1) - GLOB.ninja_capture -= L + if(get_area(L) == GLOB.areas_by_type[/area/centcom/holding]) + if(!L) + continue + var/atom/movable/target = L + if(isobj(L.loc)) + target = L.loc + target.forceMove(get_turf(pick(GLOB.generic_event_spawns))) + if(isliving(L)) + var/mob/living/LI = L + LI.Knockdown(120) + LI.blind_eyes(10) + to_chat(L, "You lose your footing as the dojo suddenly disappears. You're free!") + playsound(L, 'sound/effects/phasein.ogg', 25, 1) + playsound(L, 'sound/effects/sparks2.ogg', 50, 1) + GLOB.ninja_capture -= L /datum/antagonist/ninja/admin_add(datum/mind/new_owner,mob/admin) var/adj