From 9ecd0321909c16c77b552e6904b4136db4401293 Mon Sep 17 00:00:00 2001 From: Chompstation Bot Date: Mon, 8 Feb 2021 19:21:07 +0000 Subject: [PATCH 1/5] Improved Trait Exclusion Logic --- .../client/preference_setup/vore/07_traits.dm | 29 +++++++++++++++++++ .../species/station/traits_vr/negative.dm | 7 +++-- .../species/station/traits_vr/neutral.dm | 3 ++ .../species/station/traits_vr/positive.dm | 3 ++ .../human/species/station/traits_vr/trait.dm | 5 +++- 5 files changed, 44 insertions(+), 3 deletions(-) diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 782111c161..6b276b82c9 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -2,6 +2,9 @@ #define NEUTRAL_MODE 2 #define NEGATIVE_MODE 3 +#define ORGANICS 1 +#define SYNTHETICS 2 + /datum/preferences var/custom_species // Custom species name, can't be changed due to it having been used in savefiles already. var/custom_base // What to base the custom species on @@ -15,6 +18,7 @@ var/starting_trait_points = STARTING_SPECIES_POINTS var/max_traits = MAX_SPECIES_TRAITS var/dirty_synth = 0 //Are you a synth + var/gross_meatbag = 0 //Where'd I leave my Voight-Kampff test kit? // Definition of the stuff for Ears /datum/category_item/player_setup_item/vore/traits @@ -85,8 +89,16 @@ if(character.isSynthetic()) //Checking if we have a synth on our hands, boys. pref.dirty_synth = 1 +<<<<<<< HEAD else //CHOMPEdit pref.dirty_synth = 0 //CHOMPEdit +||||||| parent of 8b0c23c122... Merge pull request #9659 from KillianKirilenko/kk-misc4 +======= + pref.gross_meatbag = 0 + else + pref.gross_meatbag = 1 + pref.dirty_synth = 0 +>>>>>>> 8b0c23c122... Merge pull request #9659 from KillianKirilenko/kk-misc4 var/datum/species/S = character.species var/SB @@ -276,11 +288,28 @@ var/conflict = FALSE +<<<<<<< HEAD user.isSynthetic() //Recheck just to be sure if(pref.dirty_synth && instance.not_for_synths)//if you are a synth you can't take this trait. alert("You cannot take this trait as a SYNTH.\ Please remove that trait, or pick another trait to add.","Error") //pref.dirty_synth = 0 //Just to be sure // Commented out because it allow for someone to take a synth-blacklisted trait CHOMP Edit +||||||| parent of 8b0c23c122... Merge pull request #9659 from KillianKirilenko/kk-misc4 + user.isSynthetic() //Recheck just to be sure + if(pref.dirty_synth && instance.not_for_synths)//if you are a synth you can't take this trait. + alert("You cannot take this trait as a SYNTH.\ + Please remove that trait, or pick another trait to add.","Error") + pref.dirty_synth = 0 //Just to be sure +======= + if(pref.dirty_synth && !(instance.can_take & SYNTHETICS)) + alert("The trait you've selected can only be taken by organic characters!","Error") + pref.dirty_synth = 0 //Just to be sure +>>>>>>> 8b0c23c122... Merge pull request #9659 from KillianKirilenko/kk-misc4 + return TOPIC_REFRESH + + if(pref.gross_meatbag && !(instance.can_take & ORGANICS)) + alert("The trait you've selected can only be taken by synthetic characters!","Error") + pref.gross_meatbag = 0 //Just to be sure return TOPIC_REFRESH diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm index 1fa2796d0b..6fc26b12a9 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative.dm @@ -1,3 +1,6 @@ +#define ORGANICS 1 +#define SYNTHETICS 2 + /datum/trait/speed_slow name = "Slowdown" desc = "Allows you to move slower on average than baseline." @@ -142,10 +145,10 @@ */ /datum/trait/haemophilia name = "Haemophilia - Organics only" - desc = "When you bleed, you bleed a LOT. This trait is only for organics, buggy with synths!" + desc = "When you bleed, you bleed a LOT." cost = -2 var_changes = list("bloodloss_rate" = 2) - not_for_synths = 1 + can_take = ORGANICS /datum/trait/hollow name = "Hollow Bones/Aluminum Alloy" diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index 709e5f53e3..53b0d5829d 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -1,3 +1,6 @@ +#define ORGANICS 1 +#define SYNTHETICS 2 + /datum/trait/metabolism_up name = "Fast Metabolism" desc = "You process ingested and injected reagents faster, but get hungry faster (Teshari speed)." diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index 9c22f2f60c..75f7090bc6 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -1,3 +1,6 @@ +#define ORGANICS 1 +#define SYNTHETICS 2 + /datum/trait/speed_fast name = "Haste" desc = "Allows you to move faster on average than baseline." diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm index 605da7e569..a17883884b 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/trait.dm @@ -1,3 +1,6 @@ +#define ORGANICS 1 +#define SYNTHETICS 2 + /datum/trait var/name var/desc = "Contact a developer if you see this trait." @@ -5,7 +8,7 @@ var/cost = 0 // 0 is neutral, negative cost means negative, positive cost means positive. var/list/var_changes // A list to apply to the custom species vars. var/list/excludes // Store a list of paths of traits to exclude, but done automatically if they change the same vars. - var/not_for_synths = FALSE // Can freaking synths use those. + var/can_take = ORGANICS|SYNTHETICS // Can freaking synths use those. var/custom_only = TRUE // Trait only available for custom species //Proc can be overridden lower to include special changes, make sure to call up though for the vars changes From 6ccc54e3a1e9cbb590b50fc336f0de06ab433db0 Mon Sep 17 00:00:00 2001 From: cadyn <35672377+cadyn@users.noreply.github.com> Date: Sat, 27 Feb 2021 14:58:55 -0800 Subject: [PATCH 2/5] Update 07_traits.dm --- code/modules/client/preference_setup/vore/07_traits.dm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 6b276b82c9..2de4413216 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -89,16 +89,10 @@ if(character.isSynthetic()) //Checking if we have a synth on our hands, boys. pref.dirty_synth = 1 -<<<<<<< HEAD - else //CHOMPEdit - pref.dirty_synth = 0 //CHOMPEdit -||||||| parent of 8b0c23c122... Merge pull request #9659 from KillianKirilenko/kk-misc4 -======= pref.gross_meatbag = 0 else pref.gross_meatbag = 1 pref.dirty_synth = 0 ->>>>>>> 8b0c23c122... Merge pull request #9659 from KillianKirilenko/kk-misc4 var/datum/species/S = character.species var/SB From e9dbe2b58536de6e7f2627234df074c546f11c1d Mon Sep 17 00:00:00 2001 From: cadyn <35672377+cadyn@users.noreply.github.com> Date: Sat, 27 Feb 2021 15:00:16 -0800 Subject: [PATCH 3/5] Update 07_traits.dm --- .../client/preference_setup/vore/07_traits.dm | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/code/modules/client/preference_setup/vore/07_traits.dm b/code/modules/client/preference_setup/vore/07_traits.dm index 2de4413216..8af6e9f74b 100644 --- a/code/modules/client/preference_setup/vore/07_traits.dm +++ b/code/modules/client/preference_setup/vore/07_traits.dm @@ -282,23 +282,9 @@ var/conflict = FALSE -<<<<<<< HEAD - user.isSynthetic() //Recheck just to be sure - if(pref.dirty_synth && instance.not_for_synths)//if you are a synth you can't take this trait. - alert("You cannot take this trait as a SYNTH.\ - Please remove that trait, or pick another trait to add.","Error") - //pref.dirty_synth = 0 //Just to be sure // Commented out because it allow for someone to take a synth-blacklisted trait CHOMP Edit -||||||| parent of 8b0c23c122... Merge pull request #9659 from KillianKirilenko/kk-misc4 - user.isSynthetic() //Recheck just to be sure - if(pref.dirty_synth && instance.not_for_synths)//if you are a synth you can't take this trait. - alert("You cannot take this trait as a SYNTH.\ - Please remove that trait, or pick another trait to add.","Error") - pref.dirty_synth = 0 //Just to be sure -======= if(pref.dirty_synth && !(instance.can_take & SYNTHETICS)) alert("The trait you've selected can only be taken by organic characters!","Error") - pref.dirty_synth = 0 //Just to be sure ->>>>>>> 8b0c23c122... Merge pull request #9659 from KillianKirilenko/kk-misc4 + //pref.dirty_synth = 0 //Just to be sure //CHOMPEdit this shit broke, stop. return TOPIC_REFRESH if(pref.gross_meatbag && !(instance.can_take & ORGANICS)) From 4123b02bcb4b7f167e21c2a70cce49f9d0ff809a Mon Sep 17 00:00:00 2001 From: cadyn Date: Sat, 27 Feb 2021 15:10:50 -0800 Subject: [PATCH 4/5] Updated our traits --- .../carbon/human/species/station/traits_vr/negative_ch.dm | 6 +++--- .../carbon/human/species/station/traits_vr/positive_ch.dm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative_ch.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative_ch.dm index e2d9fa355a..2b1d0e1db0 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative_ch.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative_ch.dm @@ -18,7 +18,7 @@ cost = -3 var_changes = list("blood_volume" = 375) excludes = list(/datum/trait/less_blood_extreme,/datum/trait/more_blood,/datum/trait/more_blood_extreme) - not_for_synths = TRUE + can_take = ORGANICS /datum/trait/less_blood_extreme name = "Extremely low blood volume" @@ -26,7 +26,7 @@ cost = -5 var_changes = list("blood_volume" = 224) excludes = list(/datum/trait/less_blood,/datum/trait/more_blood,/datum/trait/more_blood_extreme) - not_for_synths = TRUE + can_take = ORGANICS /datum/trait/scrawny name = "Scrawny" @@ -85,7 +85,7 @@ desc = "You have a condition which causes you to spontaneously have hallucinations! Luckily for you, in the modern space age, our doctors have solutions for you, just make sure you don't forget to take your pills." cost = -3 special_env = TRUE - not_for_synths = TRUE + can_take = ORGANICS var/hallucination_max = 60 var/hallucination_increase = 3 var/episode_length_nomeds_avg = 4000 diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive_ch.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive_ch.dm index 09117b09be..4f1896da61 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive_ch.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive_ch.dm @@ -54,7 +54,7 @@ cost = 3 var_changes = list("blood_volume" = 840) excludes = list(/datum/trait/more_blood_extreme,/datum/trait/less_blood,/datum/trait/less_blood_extreme) - not_for_synths = TRUE + can_take = ORGANICS /datum/trait/more_blood_extreme name = "Very high blood volume" @@ -62,7 +62,7 @@ cost = 6 var_changes = list("blood_volume" = 1400) excludes = list(/datum/trait/more_blood,/datum/trait/less_blood,/datum/trait/less_blood_extreme) - not_for_synths = TRUE + can_take = ORGANICS /datum/trait/heavyweight name = "Heavyweight" @@ -164,7 +164,7 @@ desc = "When you get critically damaged, you'll have an adrenaline rush before going down, giving you another chance to finish the fight, or get to safety." cost = 6 special_env = TRUE - not_for_synths = TRUE + can_take = ORGANICS var/last_adrenaline_rush /datum/trait/adrenaline_rush/handle_environment_special(var/mob/living/carbon/human/H) From 7d295d8c4822f7e8ff1100e4f614c63b66c1cb1a Mon Sep 17 00:00:00 2001 From: cadyn Date: Sat, 27 Feb 2021 15:28:12 -0800 Subject: [PATCH 5/5] Fixing all the buggers that I missed --- .../living/carbon/human/species/station/traits_vr/positive.dm | 4 ++-- .../carbon/human/species/station/traits_vr/positive_ch.dm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm index 75f7090bc6..94cdd132b7 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive.dm @@ -256,7 +256,7 @@ cost = 2 var_changes = list("cold_level_1" = 200, "cold_level_2" = 150, "cold_level_3" = 90, "breath_cold_level_1" = 180, "breath_cold_level_2" = 100, "breath_cold_level_3" = 60, "cold_discomfort_level" = 210, "heat_level_1" = 305, "heat_level_2" = 360, "heat_level_3" = 700, "breath_heat_level_1" = 345, "breath_heat_level_2" = 380, "breath_heat_level_3" = 780, "heat_discomfort_level" = 295) excludes = list(/datum/trait/hotadapt) - not_for_synths = 1 // CHOMP edit + can_take = ORGANICS // CHOMP edit /datum/trait/hotadapt name = "Heat-Adapted" @@ -264,7 +264,7 @@ cost = 2 var_changes = list("heat_level_1" = 420, "heat_level_2" = 460, "heat_level_3" = 1100, "breath_heat_level_1" = 440, "breath_heat_level_2" = 510, "breath_heat_level_3" = 1500, "heat_discomfort_level" = 390, "cold_level_1" = 280, "cold_level_2" = 220, "cold_level_3" = 140, "breath_cold_level_1" = 260, "breath_cold_level_2" = 240, "breath_cold_level_3" = 120, "cold_discomfort_level" = 280) excludes = list(/datum/trait/coldadapt) - not_for_synths = 1 // CHOMP edit + can_take = ORGANICS // CHOMP edit // YW Addition end /datum/trait/snowwalker diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive_ch.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive_ch.dm index 4f1896da61..92ebc6af27 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/positive_ch.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/positive_ch.dm @@ -34,7 +34,7 @@ desc = "Your body is able to produce nutrition from being in light." cost = 3 var_changes = list("photosynthesizing" = TRUE) - not_for_synths = 0 //Synths actually use nutrition, just with a fancy covering. + can_take = ORGANICS|SYNTHETICS //Synths actually use nutrition, just with a fancy covering. /datum/trait/rad_resistance name = "Radiation Resistance"