From d9885cf2784777def7d1623243d0e3ec471c8fc4 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 13 Feb 2020 08:16:37 +0100 Subject: [PATCH 1/4] oh damn, forgot those are numbers --- modular_citadel/code/modules/arousal/genitals.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 13d4a6d44e..b07a75277d 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -250,8 +250,8 @@ var/static/list/relevant_layers if(!relevant_layers) relevant_layers = list() - relevant_layers[GENITALS_BEHIND_LAYER] = "BEHIND" - relevant_layers[GENITALS_FRONT_LAYER] = "FRONT" + relevant_layers["[GENITALS_BEHIND_LAYER]"] = "BEHIND" + relevant_layers["[GENITALS_FRONT_LAYER]"] = "FRONT" for(var/L in relevant_layers) //Less hardcode remove_overlay(L) remove_overlay(GENITALS_EXPOSED_LAYER) @@ -320,7 +320,7 @@ standing += genital_overlay if(LAZYLEN(standing)) - overlays_standing[layer] = standing + overlays_standing[text2num(layer)] = standing if(LAZYLEN(fully_exposed)) overlays_standing[GENITALS_EXPOSED_LAYER] = fully_exposed From 1ef3f45f89792e262fa968d761db97eb3ff81853 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 13 Feb 2020 08:22:08 +0100 Subject: [PATCH 2/4] Update genitals.dm --- modular_citadel/code/modules/arousal/genitals.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index b07a75277d..8088d1b16d 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -253,7 +253,7 @@ relevant_layers["[GENITALS_BEHIND_LAYER]"] = "BEHIND" relevant_layers["[GENITALS_FRONT_LAYER]"] = "FRONT" for(var/L in relevant_layers) //Less hardcode - remove_overlay(L) + remove_overlay(tex2num(L)) remove_overlay(GENITALS_EXPOSED_LAYER) if(!LAZYLEN(internal_organs) || ((NOGENITALS in dna.species.species_traits) && !genital_override) || HAS_TRAIT(src, TRAIT_HUSK)) return From e4a20a16a445d546e29fa98d486aff3d0e68b024 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 13 Feb 2020 08:25:44 +0100 Subject: [PATCH 3/4] Update genitals.dm --- modular_citadel/code/modules/arousal/genitals.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 8088d1b16d..2332fcdd45 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -248,12 +248,15 @@ if(QDELETED(src)) return var/static/list/relevant_layers + var/static/list/layers_num if(!relevant_layers) relevant_layers = list() relevant_layers["[GENITALS_BEHIND_LAYER]"] = "BEHIND" relevant_layers["[GENITALS_FRONT_LAYER]"] = "FRONT" + for(var/L in relevant_layers) + LAZYSET(layers_num, L, text2num(L)) for(var/L in relevant_layers) //Less hardcode - remove_overlay(tex2num(L)) + remove_overlay(layers_num[L]) remove_overlay(GENITALS_EXPOSED_LAYER) if(!LAZYLEN(internal_organs) || ((NOGENITALS in dna.species.species_traits) && !genital_override) || HAS_TRAIT(src, TRAIT_HUSK)) return @@ -320,14 +323,14 @@ standing += genital_overlay if(LAZYLEN(standing)) - overlays_standing[text2num(layer)] = standing + overlays_standing[layers_num[layer]] = standing if(LAZYLEN(fully_exposed)) overlays_standing[GENITALS_EXPOSED_LAYER] = fully_exposed apply_overlay(GENITALS_EXPOSED_LAYER) for(var/L in relevant_layers) - apply_overlay(L) + apply_overlay(layers_num[L]) //Checks to see if organs are new on the mob, and changes their colours so that they don't get crazy colours. From 1fd8ebc2dc1582a86b200223bfb5a03576b3e1f8 Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 13 Feb 2020 08:28:52 +0100 Subject: [PATCH 4/4] Update genitals.dm --- modular_citadel/code/modules/arousal/genitals.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modular_citadel/code/modules/arousal/genitals.dm b/modular_citadel/code/modules/arousal/genitals.dm index 2332fcdd45..b7f178bca5 100644 --- a/modular_citadel/code/modules/arousal/genitals.dm +++ b/modular_citadel/code/modules/arousal/genitals.dm @@ -247,12 +247,9 @@ /mob/living/carbon/human/proc/update_genitals() if(QDELETED(src)) return - var/static/list/relevant_layers + var/static/list/relevant_layers = list("[GENITALS_BEHIND_LAYER]" = "BEHIND", "[GENITALS_FRONT_LAYER]" = "FRONT") var/static/list/layers_num - if(!relevant_layers) - relevant_layers = list() - relevant_layers["[GENITALS_BEHIND_LAYER]"] = "BEHIND" - relevant_layers["[GENITALS_FRONT_LAYER]"] = "FRONT" + if(!layers_num) for(var/L in relevant_layers) LAZYSET(layers_num, L, text2num(L)) for(var/L in relevant_layers) //Less hardcode