From f8b922b9a51df95a87f46f538ac7f98d9f3ab5b7 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 23 Jul 2017 01:39:05 -0400 Subject: [PATCH 1/7] Emotesandshit --- code/modules/mob/living/carbon/carbon.dm | 17 -------- .../mob/living/carbon/carbon_defines.dm | 2 +- code/modules/mob/living/carbon/human/emote.dm | 41 +++++++++++++++++-- .../modules/mob/living/silicon/robot/emote.dm | 6 ++- .../living/simple_animal/friendly/corgi.dm | 10 +---- .../simple_animal/friendly/corgi_powers.dm | 4 +- code/modules/mob/mob.dm | 17 ++++++++ 7 files changed, 63 insertions(+), 34 deletions(-) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index a370e3f633b..e21e8588d1f 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -723,23 +723,6 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, /mob/living/carbon/is_muzzled() return(istype(src.wear_mask, /obj/item/clothing/mask/muzzle)) -/mob/living/carbon/proc/spin(spintime, speed) - spawn() - var/D = dir - while(spintime >= speed) - sleep(speed) - switch(D) - if(NORTH) - D = EAST - if(SOUTH) - D = WEST - if(EAST) - D = SOUTH - if(WEST) - D = NORTH - dir = D - spintime -= speed - /mob/living/carbon/resist_buckle() spawn(0) resist_muzzle() diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index c8171bcc47c..076ae3b7157 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -28,5 +28,5 @@ var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. var/co2overloadtime = null - + var/highfiving = FALSE blood_volume = BLOOD_VOLUME_NORMAL diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 89f8b9a5c9d..fcc73b3ef6b 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -86,7 +86,7 @@ on_CD = handle_emote_CD(50) //longer cooldown if("fart", "farts", "flip", "flips", "snap", "snaps") on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm - if("cough", "coughs", "slap", "slaps") + if("cough", "coughs", "slap", "slaps", "highfive") on_CD = handle_emote_CD() if("sneeze", "sneezes") on_CD = handle_emote_CD() @@ -802,11 +802,46 @@ continue M.reagents.add_reagent("jenkem", 1) + if("hem") + message = "[src] hems." + + if("spin") + spin(20, 1) + message = "[src] spins around dizzily!" + + if("highfive") + if(restrained()) + return + if(highfiving) + to_chat(src, "You give up on the high-five.") + highfiving = FALSE + return + highfiving = TRUE + for(var/mob/living/carbon/C in orange(1)) + if(C.highfiving) + if(C.mind.special_role == "Wizard" && mind.special_role == "Wizard") + visible_message("[name] and [C.name] high-five EPICALLY!") + for(var/atom/A in orange(5)) + if(A == C) + continue + A.ex_act(rand(1, 2)) + break + visible_message("[name] and [C.name] high-five!") + C.highfiving = FALSE + highfiving = FALSE + playsound('sound/effects/snap.ogg', 50) + break + if(highfiving) + visible_message("[name] requests a highfive.", "You request a highfive.") + if(do_after(src, 25, target = src)) + visible_message("[name] was left hanging. Embarrassing.", "You are left hanging. How embarrassing!") + highfiving = FALSE + if("help") var/emotelist = "aflap(s), airguitar, blink(s), blink(s)_r, blush(es), bow(s)-(none)/mob, burp(s), choke(s), chuckle(s), clap(s), collapse(s), cough(s),cry, cries, custom, dance, dap(s)(none)/mob," \ + " deathgasp(s), drool(s), eyebrow, fart(s), faint(s), flap(s), flip(s), frown(s), gasp(s), giggle(s), glare(s)-(none)/mob, grin(s), groan(s), grumble(s), grin(s)," \ - + " handshake-mob, hug(s)-(none)/mob, johnny, jump, laugh(s), look(s)-(none)/mob, moan(s), mumble(s), nod(s), pale(s), point(s)-atom, quiver(s), raise(s), salute(s)-(none)/mob, scream(s), shake(s)," \ - + " shiver(s), shrug(s), sigh(s), signal(s)-#1-10,slap(s)-(none)/mob, smile(s),snap(s), sneeze(s), sniff(s), snore(s), stare(s)-(none)/mob, swag(s), tremble(s), twitch(es), twitch(es)_s," \ + + " handshake-mob, hug(s)-(none)/mob, hem, highfive, johnny, jump, laugh(s), look(s)-(none)/mob, moan(s), mumble(s), nod(s), pale(s), point(s)-atom, quiver(s), raise(s), salute(s)-(none)/mob, scream(s), shake(s)," \ + + " shiver(s), shrug(s), sigh(s), signal(s)-#1-10,slap(s)-(none)/mob, spin, smile(s),snap(s), sneeze(s), sniff(s), snore(s), stare(s)-(none)/mob, swag(s), tremble(s), twitch(es), twitch(es)_s," \ + " wag(s), wave(s), whimper(s), wink(s), yawn(s)" switch(species.name) diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index bf7f413708f..a5006aa1bcf 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -156,9 +156,11 @@ m_type = 1 message = "[src] does a flip!" src.SpinAnimation(5,1) - + if("spin") + spin(20, 1) + message = "[src] spins around dizzily!" if("help") - to_chat(src, "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitches, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look,\n law, halt") + to_chat(src, "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitches, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, spin, look,\n law, halt") ..(act, m_type, message) diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index bf4ac4a1664..c80c66a6640 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -461,10 +461,7 @@ if(prob(1)) custom_emote(1, pick("dances around.","chases its tail!")) - spawn(0) - for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) - dir = i - sleep(1) + spin(20, 1) /obj/item/weapon/reagent_containers/food/snacks/meat/corgi name = "Corgi meat" @@ -549,10 +546,7 @@ if(!resting && !buckled) if(prob(1)) custom_emote(1, pick("dances around.","chases her tail.")) - spawn(0) - for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) - dir = i - sleep(1) + spin(20, 1) /mob/living/simple_animal/pet/corgi/attack_hand(mob/living/carbon/human/M) . = ..() diff --git a/code/modules/mob/living/simple_animal/friendly/corgi_powers.dm b/code/modules/mob/living/simple_animal/friendly/corgi_powers.dm index a20c7b73d5f..52769f9dba6 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi_powers.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi_powers.dm @@ -6,6 +6,4 @@ for(var/mob/O in oviewers(src, null)) if((O.client && !( O.blinded ))) to_chat(O, text("[] [pick("dances around","chases its tail")].", src)) - for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2)) - dir = i - sleep(1) + spin(20, 1) \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 03bc97c2d73..a4503fa6cce 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1237,3 +1237,20 @@ var/list/slot_equipment_priority = list( \ attack_log += new_log last_log = world.timeofday + +/mob/proc/spin(spintime, speed) + set waitfor = 0 + var/D = dir + while(spintime >= speed) + sleep(speed) + switch(D) + if(NORTH) + D = EAST + if(SOUTH) + D = WEST + if(EAST) + D = SOUTH + if(WEST) + D = NORTH + setDir(D) + spintime -= speed \ No newline at end of file From 8c429a567dbb2d768c6f33596d2214e562d88a71 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 23 Jul 2017 01:39:58 -0400 Subject: [PATCH 2/7] ...forgot to commit this --- code/modules/mob/living/carbon/human/emote.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index fcc73b3ef6b..c159b6b4765 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -820,19 +820,19 @@ for(var/mob/living/carbon/C in orange(1)) if(C.highfiving) if(C.mind.special_role == "Wizard" && mind.special_role == "Wizard") - visible_message("[name] and [C.name] high-five EPICALLY!") + visible_message("[name] and [C.name] high-five EPICALLY!") for(var/atom/A in orange(5)) if(A == C) continue A.ex_act(rand(1, 2)) break - visible_message("[name] and [C.name] high-five!") + visible_message("[name] and [C.name] high-five!") C.highfiving = FALSE highfiving = FALSE playsound('sound/effects/snap.ogg', 50) break if(highfiving) - visible_message("[name] requests a highfive.", "You request a highfive.") + visible_message("[name] requests a highfive.", "You request a highfive.") if(do_after(src, 25, target = src)) visible_message("[name] was left hanging. Embarrassing.", "You are left hanging. How embarrassing!") highfiving = FALSE From 92e8276b931774ebc5fd809e8895c76710858b53 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Mon, 24 Jul 2017 01:08:08 -0400 Subject: [PATCH 3/7] Some changes --- code/modules/mob/living/carbon/human/emote.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index c159b6b4765..cee52a0f4b0 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -819,8 +819,8 @@ highfiving = TRUE for(var/mob/living/carbon/C in orange(1)) if(C.highfiving) - if(C.mind.special_role == "Wizard" && mind.special_role == "Wizard") - visible_message("[name] and [C.name] high-five EPICALLY!") + if((C.mind.special_role == SPECIAL_ROLE_WIZARD || C.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE) && (mind.special_role == SPECIAL_ROLE_WIZARD || mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)) + visible_message("[name] and [C.name] high-five EPICALLY!") for(var/atom/A in orange(5)) if(A == C) continue From f6bff97ac370e80b3b5542f6baf82a8d7803464d Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Mon, 24 Jul 2017 22:13:50 -0400 Subject: [PATCH 4/7] highfive adjustment --- code/__DEFINES/mob.dm | 3 +++ .../mob/living/carbon/carbon_defines.dm | 2 +- code/modules/mob/living/carbon/human/emote.dm | 18 +++++++++--------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index 93e02102141..f053f9b8f7e 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -163,3 +163,6 @@ #define hasorgans(A) (ishuman(A)) #define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0) + +//effects +#define EFFECT_HIGHFIVE "highfiving" diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 076ae3b7157..a33c8d6b2f2 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -25,8 +25,8 @@ var/toxins_alert = 0 var/co2_alert = 0 var/fire_alert = 0 + var/list/active_effect = list() var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. var/co2overloadtime = null - var/highfiving = FALSE blood_volume = BLOOD_VOLUME_NORMAL diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index cee52a0f4b0..6db798bb131 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -812,14 +812,14 @@ if("highfive") if(restrained()) return - if(highfiving) + if(EFFECT_HIGHFIVE in active_effect) to_chat(src, "You give up on the high-five.") - highfiving = FALSE + active_effect -= EFFECT_HIGHFIVE return - highfiving = TRUE + active_effect |= EFFECT_HIGHFIVE for(var/mob/living/carbon/C in orange(1)) - if(C.highfiving) - if((C.mind.special_role == SPECIAL_ROLE_WIZARD || C.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE) && (mind.special_role == SPECIAL_ROLE_WIZARD || mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE)) + if(EFFECT_HIGHFIVE in C.active_effect) + if((C.mind.special_role == SPECIAL_ROLE_WIZARD) && (mind.special_role == SPECIAL_ROLE_WIZARD)) visible_message("[name] and [C.name] high-five EPICALLY!") for(var/atom/A in orange(5)) if(A == C) @@ -827,15 +827,15 @@ A.ex_act(rand(1, 2)) break visible_message("[name] and [C.name] high-five!") - C.highfiving = FALSE - highfiving = FALSE + C.active_effect -= EFFECT_HIGHFIVE + active_effect -= EFFECT_HIGHFIVE playsound('sound/effects/snap.ogg', 50) break - if(highfiving) + if(EFFECT_HIGHFIVE in active_effect) visible_message("[name] requests a highfive.", "You request a highfive.") if(do_after(src, 25, target = src)) visible_message("[name] was left hanging. Embarrassing.", "You are left hanging. How embarrassing!") - highfiving = FALSE + active_effect -= EFFECT_HIGHFIVE if("help") var/emotelist = "aflap(s), airguitar, blink(s), blink(s)_r, blush(es), bow(s)-(none)/mob, burp(s), choke(s), chuckle(s), clap(s), collapse(s), cough(s),cry, cries, custom, dance, dap(s)(none)/mob," \ From baa99a6b9484d811a460521692e3bf49e80a4bec Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sat, 29 Jul 2017 00:55:52 -0400 Subject: [PATCH 5/7] Wizard Five experiment... --- code/modules/mob/living/carbon/human/emote.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 6db798bb131..2d67e77ccca 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -821,10 +821,11 @@ if(EFFECT_HIGHFIVE in C.active_effect) if((C.mind.special_role == SPECIAL_ROLE_WIZARD) && (mind.special_role == SPECIAL_ROLE_WIZARD)) visible_message("[name] and [C.name] high-five EPICALLY!") - for(var/atom/A in orange(5)) - if(A == C) - continue - A.ex_act(rand(1, 2)) + status_flags |= GODMODE + C.status_flags |= GODMODE + explosion(loc,5,2,1,3) + status_flags &= ~GODMODE + C.status_flags &= ~GODMODE break visible_message("[name] and [C.name] high-five!") C.active_effect -= EFFECT_HIGHFIVE From 8df384e45fe13f38b1d290129be94b0173f8c948 Mon Sep 17 00:00:00 2001 From: Aurorablade Date: Sun, 15 Oct 2017 20:07:23 -0400 Subject: [PATCH 6/7] Spin emote removal.. ..But keeps the proc! CUASE ITS CLEAN! --- code/modules/mob/living/carbon/human/emote.dm | 6 +----- code/modules/mob/living/silicon/robot/emote.dm | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 2d67e77ccca..adf08ad1d22 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -805,10 +805,6 @@ if("hem") message = "[src] hems." - if("spin") - spin(20, 1) - message = "[src] spins around dizzily!" - if("highfive") if(restrained()) return @@ -842,7 +838,7 @@ var/emotelist = "aflap(s), airguitar, blink(s), blink(s)_r, blush(es), bow(s)-(none)/mob, burp(s), choke(s), chuckle(s), clap(s), collapse(s), cough(s),cry, cries, custom, dance, dap(s)(none)/mob," \ + " deathgasp(s), drool(s), eyebrow, fart(s), faint(s), flap(s), flip(s), frown(s), gasp(s), giggle(s), glare(s)-(none)/mob, grin(s), groan(s), grumble(s), grin(s)," \ + " handshake-mob, hug(s)-(none)/mob, hem, highfive, johnny, jump, laugh(s), look(s)-(none)/mob, moan(s), mumble(s), nod(s), pale(s), point(s)-atom, quiver(s), raise(s), salute(s)-(none)/mob, scream(s), shake(s)," \ - + " shiver(s), shrug(s), sigh(s), signal(s)-#1-10,slap(s)-(none)/mob, spin, smile(s),snap(s), sneeze(s), sniff(s), snore(s), stare(s)-(none)/mob, swag(s), tremble(s), twitch(es), twitch(es)_s," \ + + " shiver(s), shrug(s), sigh(s), signal(s)-#1-10,slap(s)-(none)/mob, smile(s),snap(s), sneeze(s), sniff(s), snore(s), stare(s)-(none)/mob, swag(s), tremble(s), twitch(es), twitch(es)_s," \ + " wag(s), wave(s), whimper(s), wink(s), yawn(s)" switch(species.name) diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm index a5006aa1bcf..bf7f413708f 100644 --- a/code/modules/mob/living/silicon/robot/emote.dm +++ b/code/modules/mob/living/silicon/robot/emote.dm @@ -156,11 +156,9 @@ m_type = 1 message = "[src] does a flip!" src.SpinAnimation(5,1) - if("spin") - spin(20, 1) - message = "[src] spins around dizzily!" + if("help") - to_chat(src, "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitches, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, spin, look,\n law, halt") + to_chat(src, "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitches, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look,\n law, halt") ..(act, m_type, message) From 77fb35c676edea5903ecdb16b757a02c335a16c9 Mon Sep 17 00:00:00 2001 From: tigercat2000 Date: Sun, 22 Oct 2017 11:04:43 -0700 Subject: [PATCH 7/7] Fix spacing in mob.dm --- code/modules/mob/mob.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 2edab723e25..aa4fb41ca08 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1265,6 +1265,7 @@ var/list/slot_equipment_priority = list( \ .["Remove Verb"] = "?_src_=vars;remverb=[UID()]" .["Gib"] = "?_src_=vars;gib=[UID()]" + /mob/proc/spin(spintime, speed) set waitfor = 0 var/D = dir