From 4ef42ba6b1c167748aac36393c919492508f8b33 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 3 Apr 2020 05:16:17 +0200 Subject: [PATCH 1/3] Dwarfy message spam QoL. --- .../carbon/human/species_types/dwarves.dm | 62 +++++++++++-------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species_types/dwarves.dm b/code/modules/mob/living/carbon/human/species_types/dwarves.dm index 5a9b830bc8..55f3c9a002 100644 --- a/code/modules/mob/living/carbon/human/species_types/dwarves.dm +++ b/code/modules/mob/living/carbon/human/species_types/dwarves.dm @@ -92,6 +92,8 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) // //These count in on_life ticks which should be 2 seconds per every increment of 1 in a perfect world. var/dwarf_filth_ticker = 0 //Currently set =< 4, that means this will fire the proc around every 4-8 seconds. var/dwarf_eth_ticker = 0 //Currently set =< 1, that means this will fire the proc around every 2 seconds + var/last_filth_spam + var/last_alcohol_spam /obj/item/organ/dwarfgland/prepare_eat() var/obj/S = ..() @@ -136,40 +138,39 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) // filth_counter += 10 //Dwarves could technically chainstun each other in a vomit tantrum spiral. switch(filth_counter) if(11 to 25) - if(prob(25)) - to_chat(owner, "Someone should really clean up in here!") + if(last_filth_spam + 40 SECONDS < world.time) + to_chat(owner, "Someone should really clean up in here!") + last_filth_spam = world.time if(26 to 50) - if(prob(30)) //Probability the message appears + if(prob(7)) //And then the probability they vomit along with it. to_chat(owner, "The stench makes you queasy.") - if(prob(20)) //And then the probability they vomit along with it. - owner.vomit(20) //I think vomit should stay over a disgust adjustment. + owner.vomit(10) //I think vomit should stay over a disgust adjustment. if(51 to 75) - if(prob(35)) + if(prob(9)) to_chat(owner, "By Armok! You won't be able to keep alcohol down at all!") - if(prob(25)) - owner.vomit(20) //Its more funny + owner.vomit(20) //Its more funny if(76 to 100) - if(prob(40)) + if(prob(11)) to_chat(owner, "You can't live in such FILTH!") - if(prob(25)) - owner.adjustToxLoss(10) //Now they start dying. - owner.vomit(20) + owner.adjustToxLoss(10) //Now they start dying. + owner.vomit(20) if(101 to INFINITY) //Now they will really start dying - if(prob(40)) + if(last_filth_spam + 12 SECONDS < world.time) to_chat(owner, " THERES TOO MUCH FILTH, OH GODS THE FILTH!") + last_filth_spam = world.time + if(prob(40)) owner.adjustToxLoss(15) - owner.vomit(40) + owner.vomit(30) CHECK_TICK //Check_tick right here, its motherfuckin magic. (To me at least) //Handles the dwarf alcohol cycle tied to on_life, it ticks in dwarf_cycle_ticker. /obj/item/organ/dwarfgland/proc/dwarf_eth_cycle() //BOOZE POWER + var/init_stored_alcohol = stored_alcohol for(var/datum/reagent/R in owner.reagents.reagent_list) if(istype(R, /datum/reagent/consumable/ethanol)) var/datum/reagent/consumable/ethanol/E = R - stored_alcohol += (E.boozepwr / 50) - if(stored_alcohol > max_alcohol) //Dwarves technically start at 250 alcohol stored. - stored_alcohol = max_alcohol + stored_alcohol = CLAMP(stored_alcohol + store_pwr, 0, max_alcohol) var/heal_amt = heal_rate stored_alcohol -= alcohol_rate //Subtracts alcohol_Rate from stored alcohol so EX: 250 - 0.25 per each loop that occurs. if(stored_alcohol > 400) //If they are over 400 they start regenerating @@ -177,16 +178,27 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) // owner.adjustFireLoss(-heal_amt) //Unless they drink casually all the time. owner.adjustOxyLoss(-heal_amt) owner.adjustCloneLoss(-heal_amt) //Also they will probably get brain damage if thats a thing here. - if(prob(25)) - switch(stored_alcohol) - if(0 to 24) + if(init_stored_alcohol + 0.5 < stored_alcohol) //recovering stored alcohol at a steady rate of +0.75, no spam. + return + switch(stored_alcohol) + if(0 to 24) + if(last_alcohol_spam + 8 SECONDS < world.time) to_chat(owner, "DAMNATION INCARNATE, WHY AM I CURSED WITH THIS DRY-SPELL? I MUST DRINK.") - owner.adjustToxLoss(35) - if(25 to 50) + last_alcohol_spam = world.time + owner.adjustToxLoss(10) + if(25 to 50) + if(last_alcohol_spam + 20 SECONDS < world.time) to_chat(owner, "Oh DAMN, I need some brew!") - if(51 to 75) + last_alcohol_spam = world.time + if(51 to 75) + if(last_alcohol_spam + 35 SECONDS < world.time) to_chat(owner, "Your body aches, you need to get ahold of some booze...") - if(76 to 100) + last_alcohol_spam = world.time + if(76 to 100) + if(last_alcohol_spam + 40 SECONDS < world.time) to_chat(owner, "A pint of anything would really hit the spot right now.") - if(101 to 150) + last_alcohol_spam = world.time + if(101 to 150) + if(last_alcohol_spam + 50 SECONDS < world.time) to_chat(owner, "You feel like you could use a good brew.") + last_alcohol_spam = world.time From 37b6aa9897c487fdc4e36ed50e2dfd9b4fb79591 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Fri, 3 Apr 2020 05:31:37 +0200 Subject: [PATCH 2/3] Update dwarves.dm --- code/modules/mob/living/carbon/human/species_types/dwarves.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species_types/dwarves.dm b/code/modules/mob/living/carbon/human/species_types/dwarves.dm index 55f3c9a002..ae308ee1ef 100644 --- a/code/modules/mob/living/carbon/human/species_types/dwarves.dm +++ b/code/modules/mob/living/carbon/human/species_types/dwarves.dm @@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) // for(var/datum/reagent/R in owner.reagents.reagent_list) if(istype(R, /datum/reagent/consumable/ethanol)) var/datum/reagent/consumable/ethanol/E = R - stored_alcohol = CLAMP(stored_alcohol + store_pwr, 0, max_alcohol) + stored_alcohol = CLAMP(stored_alcohol + E.boozepwr / 50, 0, max_alcohol) var/heal_amt = heal_rate stored_alcohol -= alcohol_rate //Subtracts alcohol_Rate from stored alcohol so EX: 250 - 0.25 per each loop that occurs. if(stored_alcohol > 400) //If they are over 400 they start regenerating From a9ea7be699c595d8eaf170ba675aec58024e78ee Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Fri, 3 Apr 2020 18:21:38 +0200 Subject: [PATCH 3/3] Update dwarves.dm --- code/modules/mob/living/carbon/human/species_types/dwarves.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species_types/dwarves.dm b/code/modules/mob/living/carbon/human/species_types/dwarves.dm index ae308ee1ef..bb2c08aa9b 100644 --- a/code/modules/mob/living/carbon/human/species_types/dwarves.dm +++ b/code/modules/mob/living/carbon/human/species_types/dwarves.dm @@ -142,7 +142,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) // to_chat(owner, "Someone should really clean up in here!") last_filth_spam = world.time if(26 to 50) - if(prob(7)) //And then the probability they vomit along with it. + if(prob(6)) //And then the probability they vomit along with it. to_chat(owner, "The stench makes you queasy.") owner.vomit(10) //I think vomit should stay over a disgust adjustment. if(51 to 75)