diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index 5312cba6e14..3121f35b13c 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -171,3 +171,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.dm b/code/modules/mob/living/carbon/carbon.dm index bdb9a359a09..0a1244094db 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -727,23 +727,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 67a8fb7fa20..4de6b16a687 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -27,8 +27,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 - 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 ee58248b03e..97b9dcaa21f 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -92,7 +92,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() @@ -821,10 +821,42 @@ continue M.reagents.add_reagent("jenkem", 1) + if("hem") + message = "[src] hems." + + if("highfive") + if(restrained()) + return + if(EFFECT_HIGHFIVE in active_effect) + to_chat(src, "You give up on the high-five.") + active_effect -= EFFECT_HIGHFIVE + return + active_effect |= EFFECT_HIGHFIVE + for(var/mob/living/carbon/C in orange(1)) + 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!") + 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 + active_effect -= EFFECT_HIGHFIVE + playsound('sound/effects/snap.ogg', 50) + break + 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!") + 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," \ + " 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)," \ + + " 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, 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)" diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index ed08eed113e..6ef96d07447 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -466,10 +466,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" @@ -554,10 +551,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 3eea5d36372..aa4fb41ca08 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1264,4 +1264,21 @@ var/list/slot_equipment_priority = list( \ .["Add Verb"] = "?_src_=vars;addverb=[UID()]" .["Remove Verb"] = "?_src_=vars;remverb=[UID()]" - .["Gib"] = "?_src_=vars;gib=[UID()]" \ No newline at end of file + .["Gib"] = "?_src_=vars;gib=[UID()]" + +/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