From 8499d3bb7c3dcae42145ea80c2520c5252db2def Mon Sep 17 00:00:00 2001 From: Nlaysi Date: Thu, 22 Aug 2024 23:17:31 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BC=D1=83=D1=82=D0=B0=D1=86=D0=B8=D0=BE?= =?UTF-8?q?=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=82=D0=BE=D0=BA=D1=81=D0=B8?= =?UTF-8?q?=D0=BD=D0=B0,=20=D0=B8=20=D0=BC=D0=B5=D1=80=D0=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modular_bandastation/species/_species.dme | 1 + .../species/code/human/species/species.dm | 42 ------------------- .../species/code/reagents/mutation.dm | 12 ++++++ 3 files changed, 13 insertions(+), 42 deletions(-) create mode 100644 modular_bandastation/species/code/reagents/mutation.dm diff --git a/modular_bandastation/species/_species.dme b/modular_bandastation/species/_species.dme index c3dfe0e8471bf15..446ae664c6ccdc3 100644 --- a/modular_bandastation/species/_species.dme +++ b/modular_bandastation/species/_species.dme @@ -17,6 +17,7 @@ #include "code/human/species_type/vulpkanin.dm" #include "code/human/sprite_accessories/hair.dm" #include "code/human/species/species.dm" +#include "code/reagents/mutation.dm" #include "code/clothing/human_update_icons.dm" #include "code/clothing/items.dm" diff --git a/modular_bandastation/species/code/human/species/species.dm b/modular_bandastation/species/code/human/species/species.dm index 565d13a70f7f89c..f5862bdb3b3d712 100644 --- a/modular_bandastation/species/code/human/species/species.dm +++ b/modular_bandastation/species/code/human/species/species.dm @@ -1,11 +1,6 @@ #define GET_ATOM_SHIFF_FINGERPRINTS(atom) atom.forensics?.fingerprints #define GET_ATOM_SHIFF_BLOOD_DNA(atom) atom.forensics?.blood_DNA -#define CM_COLOR_SAT_MIN 0.6 -#define CM_COLOR_SAT_MAX 0.7 -#define CM_COLOR_LUM_MIN 0.65 -#define CM_COLOR_LUM_MAX 0.75 - /datum/action/cooldown/sniff name = "Вынюхать" desc = "Вы обнюхиваете предмет и определяете, кто с ним взаимодействовал. Также, вы можете запомнить запах определённого человека, обнюхав его." @@ -62,38 +57,6 @@ return ..() -/datum/action/cooldown/sniff/proc/colorize_string(name, sat_shift = 1, lum_shift = 1) - var/static/rseed = rand(1,26) - - var/hash = copytext(md5(name + GLOB.round_id), rseed, rseed + 6) - var/h = hex2num(copytext(hash, 1, 3)) * (360 / 255) - var/s = (hex2num(copytext(hash, 3, 5)) >> 2) * ((CM_COLOR_SAT_MAX - CM_COLOR_SAT_MIN) / 63) + CM_COLOR_SAT_MIN - var/l = (hex2num(copytext(hash, 5, 7)) >> 2) * ((CM_COLOR_LUM_MAX - CM_COLOR_LUM_MIN) / 63) + CM_COLOR_LUM_MIN - - s *= clamp(sat_shift, 0, 1) - l *= clamp(lum_shift, 0, 1) - - var/h_int = round(h/60) - var/c = (1 - abs(2 * l - 1)) * s - var/x = c * (1 - abs((h / 60) % 2 - 1)) - var/m = l - c * 0.5 - x = (x + m) * 255 - c = (c + m) * 255 - m *= 255 - switch(h_int) - if(0) - return "#[num2hex(c, 2)][num2hex(x, 2)][num2hex(m, 2)]" - if(1) - return "#[num2hex(x, 2)][num2hex(c, 2)][num2hex(m, 2)]" - if(2) - return "#[num2hex(m, 2)][num2hex(c, 2)][num2hex(x, 2)]" - if(3) - return "#[num2hex(m, 2)][num2hex(x, 2)][num2hex(c, 2)]" - if(4) - return "#[num2hex(x, 2)][num2hex(m, 2)][num2hex(c, 2)]" - if(5) - return "#[num2hex(c, 2)][num2hex(m, 2)][num2hex(x, 2)]" - /obj/item/cigarette/handle_reagents(seconds_per_tick) ..() var/mob/living/carbon/smoker = loc @@ -171,10 +134,5 @@ StartCooldown() return TRUE -#undef CM_COLOR_LUM_MAX -#undef CM_COLOR_LUM_MIN -#undef CM_COLOR_SAT_MAX -#undef CM_COLOR_SAT_MIN - #undef GET_ATOM_SHIFF_FINGERPRINTS #undef GET_ATOM_SHIFF_BLOOD_DNA diff --git a/modular_bandastation/species/code/reagents/mutation.dm b/modular_bandastation/species/code/reagents/mutation.dm new file mode 100644 index 000000000000000..c54f52b6f86ac69 --- /dev/null +++ b/modular_bandastation/species/code/reagents/mutation.dm @@ -0,0 +1,12 @@ +/datum/reagent/mutationtoxin/vulpkanin + name = "Мутационный токсин вульпканина" + description = "Мутационный токсин для превращения в вульпканина" + color = "#949494" + race = /datum/species/vulpkanin + taste_description = "шерсти" + chemical_flags = REAGENT_CAN_BE_SYNTHESIZED + +/datum/chemical_reaction/slime/slimevulpkanin + results = list(/datum/reagent/mutationtoxin/vulpkanin = 1) + required_reagents = list(/datum/reagent/love = 5) + required_container = /obj/item/slime_extract/green