From a8403cb072d664572bbf2d679bc907c5519e14ee Mon Sep 17 00:00:00 2001 From: r4d6 Date: Sat, 8 Feb 2020 22:40:17 -0500 Subject: [PATCH 1/4] Make Dwarves heal from Plump Helmet --- .../reagents/chemistry/reagents/alcohol_reagents.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 810124b2ba..1da676c0f6 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -727,9 +727,12 @@ All effects don't start immediately, but rather get worse over time; the rate is /datum/reagent/consumable/ethanol/manly_dorf/on_mob_metabolize(mob/living/M) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE)) + if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE || is_species(H, /datum/species/dwarf))) to_chat(H, "Now THAT is MANLY!") - boozepwr = 5 //We've had worse in the mines + if(is_species(H, /datum/species/dwarf)) + boozepwr = 100 // Don't want dwarves to die because of a low booze power + else + boozepwr = 5 //We've had worse in the mines dorf_mode = TRUE /datum/reagent/consumable/ethanol/manly_dorf/on_mob_life(mob/living/carbon/M) From 5316cc36652544a4093d1f6e92b2de4acb4de4bd Mon Sep 17 00:00:00 2001 From: r4d6 Date: Sat, 8 Feb 2020 23:02:32 -0500 Subject: [PATCH 2/4] Make dwarves not have an accent when speaking dwarvish --- code/__DEFINES/components.dm | 6 ++--- .../carbon/human/species_types/dwarves.dm | 25 ++++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 0efd5a1f79..c4c9d815a0 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -187,10 +187,10 @@ #define SPEECH_MESSAGE 1 // #define SPEECH_BUBBLE_TYPE 2 #define SPEECH_SPANS 3 - /* #define SPEECH_SANITIZE 4 +// #define SPEECH_SANITIZE 4 #define SPEECH_LANGUAGE 5 - #define SPEECH_IGNORE_SPAM 6 - #define SPEECH_FORCED 7 */ +// #define SPEECH_IGNORE_SPAM 6 +// #define SPEECH_FORCED 7 // /mob/living signals #define COMSIG_LIVING_FULLY_HEAL "living_fully_healed" //from base of /mob/living/fully_heal(): (admin_revive) 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 f5f238908c..0d3bbc0c74 100644 --- a/code/modules/mob/living/carbon/human/species_types/dwarves.dm +++ b/code/modules/mob/living/carbon/human/species_types/dwarves.dm @@ -54,21 +54,22 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) // //Dwarf Speech handling - Basically a filter/forces them to say things. The IC helper /datum/species/dwarf/proc/handle_speech(datum/source, list/speech_args) var/message = speech_args[SPEECH_MESSAGE] - if(message[1] != "*") - message = " [message]" //Credits to goonstation for the strings list. - var/list/dwarf_words = strings("dwarf_replacement.json", "dwarf") //thanks to regex too. + if(speech_args[SPEECH_LANGUAGE] != /datum/language/dwarf) // No accent if they speak their language + if(message[1] != "*") + message = " [message]" //Credits to goonstation for the strings list. + var/list/dwarf_words = strings("dwarf_replacement.json", "dwarf") //thanks to regex too. - for(var/key in dwarf_words) //Theres like 1459 words or something man. - var/value = dwarf_words[key] //Thus they will always be in character. - if(islist(value)) //Whether they like it or not. - value = pick(value) //This could be drastically reduced if needed though. + for(var/key in dwarf_words) //Theres like 1459 words or something man. + var/value = dwarf_words[key] //Thus they will always be in character. + if(islist(value)) //Whether they like it or not. + value = pick(value) //This could be drastically reduced if needed though. - message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]") - message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]") - message = replacetextEx(message, " [key]", " [value]") //Also its scottish. + message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]") + message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]") + message = replacetextEx(message, " [key]", " [value]") //Also its scottish. - if(prob(3)) - message += pick(" By Armok!") + if(prob(3)) + message += pick(" By Armok!") speech_args[SPEECH_MESSAGE] = trim(message) //This mostly exists because my testdwarf's liver died while trying to also not die due to no alcohol. From 9ba0a1b470e167a065afb4e8c9c83feddf0384dd Mon Sep 17 00:00:00 2001 From: r4d6 Date: Sun, 9 Feb 2020 07:21:47 -0500 Subject: [PATCH 3/4] Code update --- .../modules/mob/living/carbon/human/species_types/dwarves.dm | 4 +--- code/modules/reagents/chemistry/reagents/alcohol_reagents.dm | 5 +++-- 2 files changed, 4 insertions(+), 5 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 0d3bbc0c74..15422b2cdd 100644 --- a/code/modules/mob/living/carbon/human/species_types/dwarves.dm +++ b/code/modules/mob/living/carbon/human/species_types/dwarves.dm @@ -58,18 +58,16 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) // if(message[1] != "*") message = " [message]" //Credits to goonstation for the strings list. var/list/dwarf_words = strings("dwarf_replacement.json", "dwarf") //thanks to regex too. - for(var/key in dwarf_words) //Theres like 1459 words or something man. var/value = dwarf_words[key] //Thus they will always be in character. if(islist(value)) //Whether they like it or not. value = pick(value) //This could be drastically reduced if needed though. - message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]") message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]") message = replacetextEx(message, " [key]", " [value]") //Also its scottish. if(prob(3)) - message += pick(" By Armok!") + message += " By Armok!" speech_args[SPEECH_MESSAGE] = trim(message) //This mostly exists because my testdwarf's liver died while trying to also not die due to no alcohol. diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index 1da676c0f6..ef15ae7e1b 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -725,11 +725,12 @@ All effects don't start immediately, but rather get worse over time; the rate is var/dorf_mode /datum/reagent/consumable/ethanol/manly_dorf/on_mob_metabolize(mob/living/M) + var/real_dorf = is_species(H, /datum/species/dwarf) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE || is_species(H, /datum/species/dwarf))) + if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE || real_dorf) to_chat(H, "Now THAT is MANLY!") - if(is_species(H, /datum/species/dwarf)) + if(real_dorf) boozepwr = 100 // Don't want dwarves to die because of a low booze power else boozepwr = 5 //We've had worse in the mines From e4f2af2d77a150d99588aad73ee946dc245a8994 Mon Sep 17 00:00:00 2001 From: r4d6 Date: Sun, 9 Feb 2020 07:34:21 -0500 Subject: [PATCH 4/4] compile --- code/modules/reagents/chemistry/reagents/alcohol_reagents.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index ef15ae7e1b..7a3a7eeec2 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -725,10 +725,10 @@ All effects don't start immediately, but rather get worse over time; the rate is var/dorf_mode /datum/reagent/consumable/ethanol/manly_dorf/on_mob_metabolize(mob/living/M) - var/real_dorf = is_species(H, /datum/species/dwarf) + var/real_dorf = isdwarf(M) //_species(H, /datum/species/dwarf) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE || real_dorf) + if(H.dna.check_mutation(DWARFISM) || HAS_TRAIT(H, TRAIT_ALCOHOL_TOLERANCE) || real_dorf) to_chat(H, "Now THAT is MANLY!") if(real_dorf) boozepwr = 100 // Don't want dwarves to die because of a low booze power