From 856950caa82eda38e06b9fbda6b65503b35d8b59 Mon Sep 17 00:00:00 2001 From: "Robert (Hopek)" Date: Mon, 14 Oct 2019 19:39:23 -0500 Subject: [PATCH 01/10] Revert "Restoring my main branch" This reverts commit 39cb2325420652af5edf2ccda8ebcd306a611d16. --- .../chemistry/reagents/medicine_reagents.dm | 147 ++++++++++++++++++ .../reagents/chemistry/recipes/medicine.dm | 24 +++ 2 files changed, 171 insertions(+) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index eb5303bf8dbe..a5a978b8d624 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -1335,5 +1335,152 @@ ..() . = 1 +/datum/reagent/medicine/burnmix + name = "BurnMix" + description = "Take in moderation. Heals damage at a snail's pace. Effects increase when used with Epinephrine or Perfluorodecalin. You don't want this in your body for longer than needed." + reagent_state = LIQUID + color = "#BD328A" // R 189 G 50 B 138 , Medium Red Violet , Hue of Violet + overdose_threshold = 12 + taste_description = "dixel" + glass_name = "glass of ...red?" + glass_desc = "Looks like some chunky dark red mix." + reagent_weight = 4 + addiction_threshold = 40 + // Max healing non OD with best rolls + buffs: 0.2 + 0.15 + 0.2 = 0.55 + // Max healing with OD + best rolls and all buffs: 0.4 + 0.35 + 0.4 = 1.15 + +/datum/reagent/medicine/burnmix/on_mob_life(mob/living/carbon/M) + var/heal_roll = pick(-0.1,-0.2) // Base heal, Non OD + var/slur = 10 // Slur 10 sets up for future slur gains as real effects seem to start at 30 + var/jitter = 0 + if(M.health <= M.crit_threshold) + heal_roll = 0 // Burnmix will not heal anyone inside of crit without epipen or morhpine + if(prob(10)) + heal_roll = 0 // Burnmix has a chance not to basic heal at all + if(holder.has_reagent(/datum/reagent/medicine/epinephrine)) // start IF has Epinephrine in body + jitter = jitter + 5 + slur = slur + 25 + heal_roll = heal_roll - 0.15 + if(prob(15)) + M.losebreath++ + if(prob(80)) + M.adjustStaminaLoss(1.25*REM, 0) // end IF has Epinephrine in body + + if(holder.has_reagent(/datum/reagent/medicine/perfluorodecalin)) // start IF has Perfluorodecalin in body + jitter = jitter + 5 + slur = slur + 25 + M.drowsyness += 0.5 + heal_roll = heal_roll - 0.2 // start IF has Perfluorodecalin in body + + if(prob(10)) // Start of base probability effects + var/tox_roll = pick(1,-1) // Rolls for damage or healing + if(tox_roll == 1) + M.emote("moan") + if(tox_roll == -1) + M.emote("twitch") + if(prob(90)) + M.adjustToxLoss(tox_roll*REM, 0) + M.Jitter(jitter) + if(prob(1)) // Last set of non OD probability effects + M.Dizzy(jitter) + M.slurring = slur // End of base probability effects + if(heal_roll < 0) // Healing payload after calculations + if (M.stat == DEAD) // Non OD , if dead , 30% chance to discard healing payload + if(prob(70)) + M.adjustFireLoss(heal_roll*REM, FALSE, FALSE, BODYPART_ORGANIC) + M.adjustBruteLoss(heal_roll*REM, 0) + else + M.adjustFireLoss(heal_roll*REM, 0) + M.adjustBruteLoss(heal_roll*REM, 0) + ..() + . = 1 + +/datum/reagent/drug/burnmix/overdose_start(mob/living/M) + to_chat(M, "You feel the BurnMix increase in potency.") + + +/datum/reagent/medicine/burnmix/overdose_process(mob/living/M) + var/heal_roll = pick(-0.2,-0.4) + var/slur = 20 + var/jitter = 2 + if(M.health <= M.crit_threshold) + heal_roll = heal_roll + 0.2 // Burnmix in overdose will heal inside of crit without epipen or perfluorodecalin. Being in crit means a roll for either no base healing or half reduction to base heal. + if(heal_roll > 0 && prob(10)) + heal_roll = 0 // Burnmix has a chance not to basic heal at all + if(holder.has_reagent(/datum/reagent/medicine/epinephrine)) + heal_roll = heal_roll - 0.35 + jitter = jitter + 15 + slur = slur + 25 + if(prob(25)) + M.losebreath++ + M.adjustStaminaLoss(2.5*REM, 0) + if(prob(80)) + M.adjustToxLoss(0.5*REM, 0) + M.adjustToxLoss(pick(0,-0.25), 0) // gives a chance to negate half epinephrine tox damage + + if(holder.has_reagent(/datum/reagent/medicine/perfluorodecalin)) + heal_roll = heal_roll - 0.4 + jitter = jitter + 15 + slur = slur + 25 + if(prob(25)) + M.adjustToxLoss(0.5*REM, 0) + M.adjustToxLoss(pick(0,-0.25), 0) // gives a chance to negate half perfluorodecalin tox damage + + if(holder.has_reagent(holder.has_reagent(/datum/reagent/medicine/epinephrine) && /datum/reagent/medicine/perfluorodecalin)) // start IF both drugs present + if(prob(0.5)) // Should be 1 in 200 chance of a 1 in 3 chance to roll for faint if both epinephrine and perfluorodecalin are present + M.emote((pick("scream","faint","gasp"))) + if(prob(60)) // Original edit did too much brain damage. Moved to both drug effects. Was default OD effect + M.adjustOrganLoss(ORGAN_SLOT_BRAIN,pick(1,-1)) + if(prob(30)) + slur = slur + 25 + if(prob(30)) + jitter = 50 + if(prob(30)) + M.drowsyness += 0.5 + if(prob(2)) + to_chat(M, "Your fingers spasm!") + M.drop_all_held_items() // end IF both drugs present + + if(prob(40)) // start last set of OD probability effects + M.emote(pick("twitch","drool","moan","giggle","spin")) + if(prob(60)) + M.adjustOrganLoss(ORGAN_SLOT_BRAIN, pick(0,1,2,2.5,-1,-2)) + if(prob(15)) + M.set_drugginess(pick(2,4,6)) + M.Jitter(jitter) + if(prob(40)) + M.adjustToxLoss(pick(1,-1)*REM, 0) + if(prob(1)) + M.Dizzy(jitter) // end last set of OD probability effects + M.Jitter(jitter) // OD slur and jitter after calculations + M.slurring = slur + if(heal_roll < 0) // OD Healing payload after calculations + M.adjustFireLoss(heal_roll*REM, FALSE, FALSE, BODYPART_ORGANIC) + M.adjustBruteLoss(heal_roll*REM, 0) + ..() + . = 1 + +/datum/reagent/medicine/burnmix/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) + if(iscarbon(M)) + if (M.stat == DEAD) // If the mob is dead and you apply it via touch. You get to play an RNG healing game. + if(method in list(PATCH, TOUCH)) + var/RNG_ROLL = pick(-0.5,-0.25,-0.1,0,0.2) + var/RNG_TEXT = "no effect" + if(RNG_ROLL == -0.5) + RNG_TEXT = "had a great effect" + if(RNG_ROLL == -0.25) + RNG_TEXT = "had a good effect" + if(RNG_ROLL == -0.1) + RNG_TEXT = "had a somewhat good effect" + if(RNG_ROLL == 0.2) + RNG_TEXT = "made things worse!" + if(RNG_ROLL != 0) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) + M.adjustBruteLoss(RNG_ROLL*reac_volume) + M.adjustFireLoss(RNG_ROLL*reac_volume) + M.visible_message("[M]'s body reacts with the Burnmix. It seemed to have [RNG_TEXT]!") + ..() + + #undef PERF_BASE_DAMAGE diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 003e60804339..2fbaaf0eef75 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -264,3 +264,27 @@ id = /datum/reagent/medicine/psicodine results = list(/datum/reagent/medicine/psicodine = 5) required_reagents = list( /datum/reagent/medicine/mannitol = 2, /datum/reagent/water = 2, /datum/reagent/impedrezene = 1) + +/datum/chemical_reaction/burnmix // Chemistry recipe + name = "BurnMix" + required_temp = 700 + id = /datum/reagent/medicine/burnmix + mix_message = "The solution boils, binding the remaining ingredients." + results = list(/datum/reagent/medicine/burnmix = 2) + required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/carbon = 1, /datum/reagent/iron = 1) + +/datum/chemical_reaction/burnmix2 // Ghetto recipe + name = "BurnMix" + id = /datum/reagent/medicine/burnmix + required_temp = 500 + mix_message = "The solution bubbles, binding the ingredients." + results = list(/datum/reagent/medicine/burnmix = 3) // Fuel burns away to form BurnMix from Nutriment and ash + required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/consumable/nutriment = 1, /datum/reagent/ash = 2) // Some welding fluid, any food and ash (burn some paper) + +/datum/chemical_reaction/burnmix3 // Ghetto recipe 2; wasteful . Replaces nutriment with ethenol but most of the ethenol dissolves in the process + name = "BurnMix" + id = /datum/reagent/medicine/burnmix + required_temp = 500 + mix_message = "The solution partially dissolves, binding the remaining ingredients." + results = list(/datum/reagent/medicine/burnmix = 3) // fuel and most ethenol burns away to form BurnMix from remaining ethenol and ash + required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/consumable/ethanol/beer = 3, /datum/reagent/ash = 2) // Take a booze bottle, drink some , add welding fuel and ash. Heat up with lighter From 00b5eb044a905263ed61310cad6698f856a71ce1 Mon Sep 17 00:00:00 2001 From: "Robert (Hopek)" Date: Mon, 14 Oct 2019 19:39:39 -0500 Subject: [PATCH 02/10] Revert "Revert "Restoring my main branch"" This reverts commit 856950caa82eda38e06b9fbda6b65503b35d8b59. --- .../chemistry/reagents/medicine_reagents.dm | 147 ------------------ .../reagents/chemistry/recipes/medicine.dm | 24 --- 2 files changed, 171 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index a5a978b8d624..eb5303bf8dbe 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -1335,152 +1335,5 @@ ..() . = 1 -/datum/reagent/medicine/burnmix - name = "BurnMix" - description = "Take in moderation. Heals damage at a snail's pace. Effects increase when used with Epinephrine or Perfluorodecalin. You don't want this in your body for longer than needed." - reagent_state = LIQUID - color = "#BD328A" // R 189 G 50 B 138 , Medium Red Violet , Hue of Violet - overdose_threshold = 12 - taste_description = "dixel" - glass_name = "glass of ...red?" - glass_desc = "Looks like some chunky dark red mix." - reagent_weight = 4 - addiction_threshold = 40 - // Max healing non OD with best rolls + buffs: 0.2 + 0.15 + 0.2 = 0.55 - // Max healing with OD + best rolls and all buffs: 0.4 + 0.35 + 0.4 = 1.15 - -/datum/reagent/medicine/burnmix/on_mob_life(mob/living/carbon/M) - var/heal_roll = pick(-0.1,-0.2) // Base heal, Non OD - var/slur = 10 // Slur 10 sets up for future slur gains as real effects seem to start at 30 - var/jitter = 0 - if(M.health <= M.crit_threshold) - heal_roll = 0 // Burnmix will not heal anyone inside of crit without epipen or morhpine - if(prob(10)) - heal_roll = 0 // Burnmix has a chance not to basic heal at all - if(holder.has_reagent(/datum/reagent/medicine/epinephrine)) // start IF has Epinephrine in body - jitter = jitter + 5 - slur = slur + 25 - heal_roll = heal_roll - 0.15 - if(prob(15)) - M.losebreath++ - if(prob(80)) - M.adjustStaminaLoss(1.25*REM, 0) // end IF has Epinephrine in body - - if(holder.has_reagent(/datum/reagent/medicine/perfluorodecalin)) // start IF has Perfluorodecalin in body - jitter = jitter + 5 - slur = slur + 25 - M.drowsyness += 0.5 - heal_roll = heal_roll - 0.2 // start IF has Perfluorodecalin in body - - if(prob(10)) // Start of base probability effects - var/tox_roll = pick(1,-1) // Rolls for damage or healing - if(tox_roll == 1) - M.emote("moan") - if(tox_roll == -1) - M.emote("twitch") - if(prob(90)) - M.adjustToxLoss(tox_roll*REM, 0) - M.Jitter(jitter) - if(prob(1)) // Last set of non OD probability effects - M.Dizzy(jitter) - M.slurring = slur // End of base probability effects - if(heal_roll < 0) // Healing payload after calculations - if (M.stat == DEAD) // Non OD , if dead , 30% chance to discard healing payload - if(prob(70)) - M.adjustFireLoss(heal_roll*REM, FALSE, FALSE, BODYPART_ORGANIC) - M.adjustBruteLoss(heal_roll*REM, 0) - else - M.adjustFireLoss(heal_roll*REM, 0) - M.adjustBruteLoss(heal_roll*REM, 0) - ..() - . = 1 - -/datum/reagent/drug/burnmix/overdose_start(mob/living/M) - to_chat(M, "You feel the BurnMix increase in potency.") - - -/datum/reagent/medicine/burnmix/overdose_process(mob/living/M) - var/heal_roll = pick(-0.2,-0.4) - var/slur = 20 - var/jitter = 2 - if(M.health <= M.crit_threshold) - heal_roll = heal_roll + 0.2 // Burnmix in overdose will heal inside of crit without epipen or perfluorodecalin. Being in crit means a roll for either no base healing or half reduction to base heal. - if(heal_roll > 0 && prob(10)) - heal_roll = 0 // Burnmix has a chance not to basic heal at all - if(holder.has_reagent(/datum/reagent/medicine/epinephrine)) - heal_roll = heal_roll - 0.35 - jitter = jitter + 15 - slur = slur + 25 - if(prob(25)) - M.losebreath++ - M.adjustStaminaLoss(2.5*REM, 0) - if(prob(80)) - M.adjustToxLoss(0.5*REM, 0) - M.adjustToxLoss(pick(0,-0.25), 0) // gives a chance to negate half epinephrine tox damage - - if(holder.has_reagent(/datum/reagent/medicine/perfluorodecalin)) - heal_roll = heal_roll - 0.4 - jitter = jitter + 15 - slur = slur + 25 - if(prob(25)) - M.adjustToxLoss(0.5*REM, 0) - M.adjustToxLoss(pick(0,-0.25), 0) // gives a chance to negate half perfluorodecalin tox damage - - if(holder.has_reagent(holder.has_reagent(/datum/reagent/medicine/epinephrine) && /datum/reagent/medicine/perfluorodecalin)) // start IF both drugs present - if(prob(0.5)) // Should be 1 in 200 chance of a 1 in 3 chance to roll for faint if both epinephrine and perfluorodecalin are present - M.emote((pick("scream","faint","gasp"))) - if(prob(60)) // Original edit did too much brain damage. Moved to both drug effects. Was default OD effect - M.adjustOrganLoss(ORGAN_SLOT_BRAIN,pick(1,-1)) - if(prob(30)) - slur = slur + 25 - if(prob(30)) - jitter = 50 - if(prob(30)) - M.drowsyness += 0.5 - if(prob(2)) - to_chat(M, "Your fingers spasm!") - M.drop_all_held_items() // end IF both drugs present - - if(prob(40)) // start last set of OD probability effects - M.emote(pick("twitch","drool","moan","giggle","spin")) - if(prob(60)) - M.adjustOrganLoss(ORGAN_SLOT_BRAIN, pick(0,1,2,2.5,-1,-2)) - if(prob(15)) - M.set_drugginess(pick(2,4,6)) - M.Jitter(jitter) - if(prob(40)) - M.adjustToxLoss(pick(1,-1)*REM, 0) - if(prob(1)) - M.Dizzy(jitter) // end last set of OD probability effects - M.Jitter(jitter) // OD slur and jitter after calculations - M.slurring = slur - if(heal_roll < 0) // OD Healing payload after calculations - M.adjustFireLoss(heal_roll*REM, FALSE, FALSE, BODYPART_ORGANIC) - M.adjustBruteLoss(heal_roll*REM, 0) - ..() - . = 1 - -/datum/reagent/medicine/burnmix/reaction_mob(mob/living/M, method=TOUCH, reac_volume,show_message = 1) - if(iscarbon(M)) - if (M.stat == DEAD) // If the mob is dead and you apply it via touch. You get to play an RNG healing game. - if(method in list(PATCH, TOUCH)) - var/RNG_ROLL = pick(-0.5,-0.25,-0.1,0,0.2) - var/RNG_TEXT = "no effect" - if(RNG_ROLL == -0.5) - RNG_TEXT = "had a great effect" - if(RNG_ROLL == -0.25) - RNG_TEXT = "had a good effect" - if(RNG_ROLL == -0.1) - RNG_TEXT = "had a somewhat good effect" - if(RNG_ROLL == 0.2) - RNG_TEXT = "made things worse!" - if(RNG_ROLL != 0) - SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "painful_medicine", /datum/mood_event/painful_medicine) - M.adjustBruteLoss(RNG_ROLL*reac_volume) - M.adjustFireLoss(RNG_ROLL*reac_volume) - M.visible_message("[M]'s body reacts with the Burnmix. It seemed to have [RNG_TEXT]!") - ..() - - #undef PERF_BASE_DAMAGE diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 2fbaaf0eef75..003e60804339 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -264,27 +264,3 @@ id = /datum/reagent/medicine/psicodine results = list(/datum/reagent/medicine/psicodine = 5) required_reagents = list( /datum/reagent/medicine/mannitol = 2, /datum/reagent/water = 2, /datum/reagent/impedrezene = 1) - -/datum/chemical_reaction/burnmix // Chemistry recipe - name = "BurnMix" - required_temp = 700 - id = /datum/reagent/medicine/burnmix - mix_message = "The solution boils, binding the remaining ingredients." - results = list(/datum/reagent/medicine/burnmix = 2) - required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/carbon = 1, /datum/reagent/iron = 1) - -/datum/chemical_reaction/burnmix2 // Ghetto recipe - name = "BurnMix" - id = /datum/reagent/medicine/burnmix - required_temp = 500 - mix_message = "The solution bubbles, binding the ingredients." - results = list(/datum/reagent/medicine/burnmix = 3) // Fuel burns away to form BurnMix from Nutriment and ash - required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/consumable/nutriment = 1, /datum/reagent/ash = 2) // Some welding fluid, any food and ash (burn some paper) - -/datum/chemical_reaction/burnmix3 // Ghetto recipe 2; wasteful . Replaces nutriment with ethenol but most of the ethenol dissolves in the process - name = "BurnMix" - id = /datum/reagent/medicine/burnmix - required_temp = 500 - mix_message = "The solution partially dissolves, binding the remaining ingredients." - results = list(/datum/reagent/medicine/burnmix = 3) // fuel and most ethenol burns away to form BurnMix from remaining ethenol and ash - required_reagents = list(/datum/reagent/fuel = 1, /datum/reagent/consumable/ethanol/beer = 3, /datum/reagent/ash = 2) // Take a booze bottle, drink some , add welding fuel and ash. Heat up with lighter From 200ee6ebf083ef45663d57289cb8d15a93851464 Mon Sep 17 00:00:00 2001 From: Hopek Date: Fri, 20 Dec 2019 18:39:22 -0600 Subject: [PATCH 03/10] Timed emotes framework. Also deathgasp cooldown on Woo. It works. --- code/__DEFINES/components.dm | 1 + code/datums/emotes.dm | 12 ++++++++++++ code/modules/mob/emote.dm | 13 ++++++++++--- code/modules/mob/living/emote.dm | 1 + code/modules/mob/mob_defines.dm | 2 ++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 4d4d8b9479ef..12209ee98a27 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -166,6 +166,7 @@ #define SPEECH_LANGUAGE 5 #define SPEECH_IGNORE_SPAM 6 #define SPEECH_FORCED 7 */ +#define COMSIG_MOB_EMOTE "mob_emote" // from /mob/living/emote(): () // /mob/living signals #define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living) diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index 5bb5c0d4157b..a78c06feecd3 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -23,6 +23,7 @@ var/sound //Sound to play when emote is called var/vary = FALSE //used for the honk borg emote var/only_forced_audio = FALSE //can only code call this event instead of the player. + var/cooldown = 0.4 SECONDS /datum/emote/New() if (ispath(mob_type_allowed_typecache)) @@ -75,6 +76,17 @@ else user.visible_message(msg) +/// For handling emote cooldown, return true to allow the emote to happen +/datum/emote/proc/check_cooldown(mob/user, intentional) + if(!intentional) + return TRUE + if(user.emotes_used && user.emotes_used[src] + cooldown > world.time) + return FALSE + if(!user.emotes_used) + user.emotes_used = list() + user.emotes_used[src] = world.time + return TRUE + /datum/emote/proc/get_sound(mob/living/user) return sound //by default just return this var. diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index b3a4398f14f6..6388a41baa61 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -13,12 +13,19 @@ if(!length(key_emotes)) if(intentional) to_chat(src, "'[act]' emote does not exist. Say *help for a list.") - return + return FALSE + var/silenced = FALSE for(var/datum/emote/P in key_emotes) + if(!P.check_cooldown(src, intentional)) + silenced = TRUE + continue if(P.run_emote(src, param, m_type, intentional)) - return - if(intentional) + SEND_SIGNAL(src, COMSIG_MOB_EMOTE, P, act, m_type, message, intentional) + return TRUE + if(intentional && !silenced) to_chat(src, "Unusable emote '[act]'. Say *help for a list.") + return FALSE + /datum/emote/flip key = "flip" diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 74f33179be40..481813ad5cbf 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -80,6 +80,7 @@ message_monkey = "lets out a faint chimper as it collapses and stops moving..." message_simple = "stops moving..." stat_allowed = UNCONSCIOUS + cooldown = (3.4 SECONDS) /datum/emote/living/deathgasp/run_emote(mob/user, params, type_override, intentional) var/mob/living/simple_animal/S = user diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 9c1bf784ccbd..5726f2484178 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -106,3 +106,5 @@ var/registered_z var/memory_amt = 0 + + var/list/emotes_used /// Used for tracking last uses of emotes for cooldown purposes From 4bc1c40b65827ce8073fb988dd3bcdf6630b53d6 Mon Sep 17 00:00:00 2001 From: Hopek Date: Fri, 20 Dec 2019 18:57:18 -0600 Subject: [PATCH 04/10] Update emote.dm --- code/modules/mob/emote.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 6388a41baa61..bf7f03959642 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -33,6 +33,7 @@ restraint_check = TRUE mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer) mob_type_ignore_stat_typecache = list(/mob/dead/observer) + cooldown = (0 SECONDS) /datum/emote/flip/run_emote(mob/user, params , type_override, intentional) . = ..() From 7812e13afa83100cf25c71e7f6c47717caa8c210 Mon Sep 17 00:00:00 2001 From: Hopek Date: Fri, 20 Dec 2019 18:57:56 -0600 Subject: [PATCH 05/10] Actually commits what was advertised. Whoops --- code/modules/mob/emote.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index bf7f03959642..13a09f2d2ccf 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -46,6 +46,7 @@ restraint_check = TRUE mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer) mob_type_ignore_stat_typecache = list(/mob/dead/observer) + cooldown = (0 SECONDS) /datum/emote/spin/run_emote(mob/user, params , type_override, intentional) . = ..() From 447587b11374e15252420a84ad5caad0ba40ecff Mon Sep 17 00:00:00 2001 From: Hopekz Date: Sat, 28 Dec 2019 14:00:55 -0600 Subject: [PATCH 06/10] Update code/datums/emotes.dm Co-Authored-By: alexkar598 <25136265+alexkar598@users.noreply.github.com> --- code/datums/emotes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index a78c06feecd3..e526905dfa6a 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -77,7 +77,7 @@ user.visible_message(msg) /// For handling emote cooldown, return true to allow the emote to happen -/datum/emote/proc/check_cooldown(mob/user, intentional) +/datum/emote/proc/check_cooldown(mob/user, intentional, update=TRUE) if(!intentional) return TRUE if(user.emotes_used && user.emotes_used[src] + cooldown > world.time) From 22a5ec9ad358ccedf8d7d36bcc76a2867d4e9daf Mon Sep 17 00:00:00 2001 From: Hopekz Date: Sat, 28 Dec 2019 14:01:01 -0600 Subject: [PATCH 07/10] Update code/datums/emotes.dm Co-Authored-By: alexkar598 <25136265+alexkar598@users.noreply.github.com> --- code/datums/emotes.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/datums/emotes.dm b/code/datums/emotes.dm index e526905dfa6a..b5625e060064 100644 --- a/code/datums/emotes.dm +++ b/code/datums/emotes.dm @@ -82,6 +82,8 @@ return TRUE if(user.emotes_used && user.emotes_used[src] + cooldown > world.time) return FALSE + if(!update) + return TRUE if(!user.emotes_used) user.emotes_used = list() user.emotes_used[src] = world.time From 1564b4db3cdb72c46ce4c081d2aa77c8616f1006 Mon Sep 17 00:00:00 2001 From: Hopek Date: Sat, 28 Dec 2019 14:03:41 -0600 Subject: [PATCH 08/10] Removed colons because it matters to Alex. I think its more ugly now but whatever Alex you're the maintainer. --- code/modules/mob/emote.dm | 4 ++-- code/modules/mob/living/emote.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 13a09f2d2ccf..217efd1a82b5 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -33,7 +33,7 @@ restraint_check = TRUE mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer) mob_type_ignore_stat_typecache = list(/mob/dead/observer) - cooldown = (0 SECONDS) + cooldown = 0 SECONDS /datum/emote/flip/run_emote(mob/user, params , type_override, intentional) . = ..() @@ -46,7 +46,7 @@ restraint_check = TRUE mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer) mob_type_ignore_stat_typecache = list(/mob/dead/observer) - cooldown = (0 SECONDS) + cooldown = 0 SECONDS /datum/emote/spin/run_emote(mob/user, params , type_override, intentional) . = ..() diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 481813ad5cbf..b51505450d31 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -80,7 +80,7 @@ message_monkey = "lets out a faint chimper as it collapses and stops moving..." message_simple = "stops moving..." stat_allowed = UNCONSCIOUS - cooldown = (3.4 SECONDS) + cooldown = 3.4 SECONDS /datum/emote/living/deathgasp/run_emote(mob/user, params, type_override, intentional) var/mob/living/simple_animal/S = user From 3c70b44afa670c753e2c30b27c55893daf5b37d0 Mon Sep 17 00:00:00 2001 From: Hopek Date: Sat, 4 Jan 2020 00:48:17 -0600 Subject: [PATCH 09/10] Okay Alex. --- code/__DEFINES/components.dm | 1 - code/modules/mob/emote.dm | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 12209ee98a27..4d4d8b9479ef 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -166,7 +166,6 @@ #define SPEECH_LANGUAGE 5 #define SPEECH_IGNORE_SPAM 6 #define SPEECH_FORCED 7 */ -#define COMSIG_MOB_EMOTE "mob_emote" // from /mob/living/emote(): () // /mob/living signals #define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index 217efd1a82b5..bcd646255831 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -20,7 +20,7 @@ silenced = TRUE continue if(P.run_emote(src, param, m_type, intentional)) - SEND_SIGNAL(src, COMSIG_MOB_EMOTE, P, act, m_type, message, intentional) + SEND_SIGNAL(src, P, act, m_type, message, intentional) return TRUE if(intentional && !silenced) to_chat(src, "Unusable emote '[act]'. Say *help for a list.") From b9826a8b844406596fa12848bb0e0e7a4d59165f Mon Sep 17 00:00:00 2001 From: alexkar598 <25136265+alexkar598@users.noreply.github.com> Date: Mon, 6 Jan 2020 11:00:47 -0500 Subject: [PATCH 10/10] Update emote.dm --- code/modules/mob/emote.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index bcd646255831..dd0535ed6fb5 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -20,7 +20,6 @@ silenced = TRUE continue if(P.run_emote(src, param, m_type, intentional)) - SEND_SIGNAL(src, P, act, m_type, message, intentional) return TRUE if(intentional && !silenced) to_chat(src, "Unusable emote '[act]'. Say *help for a list.")