Merge branch 'master' into food-quality
This commit is contained in:
@@ -972,7 +972,6 @@
|
||||
if(isnull(amount))
|
||||
amount = 0
|
||||
CRASH("null amount passed to reagent code")
|
||||
return FALSE
|
||||
|
||||
if(!isnum(amount))
|
||||
return FALSE
|
||||
|
||||
@@ -214,7 +214,7 @@ GLOBAL_LIST_INIT(name2reagent, build_name2reagent())
|
||||
|
||||
//For easy bloodsucker disgusting and blood removal
|
||||
/datum/reagent/proc/disgust_bloodsucker(mob/living/carbon/C, disgust, blood_change, blood_puke = TRUE, force)
|
||||
if(isvamp(C))
|
||||
if(AmBloodsucker(C))
|
||||
var/datum/antagonist/bloodsucker/bloodsuckerdatum = C.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER)
|
||||
if(disgust)
|
||||
bloodsuckerdatum.handle_eat_human_food(disgust, blood_puke, force)
|
||||
|
||||
@@ -43,8 +43,8 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
booze_power *= 0.7
|
||||
C.drunkenness = max((C.drunkenness + (sqrt(volume) * booze_power * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk
|
||||
var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER)
|
||||
if (istype(L))
|
||||
C.applyLiverDamage((max(sqrt(volume) * (boozepwr ** ALCOHOL_EXPONENT) * L.alcohol_tolerance, 0))/150)
|
||||
if(L)
|
||||
L.applyOrganDamage((max(sqrt(volume) * (boozepwr ** ALCOHOL_EXPONENT) * L.alcohol_tolerance, 0))/150)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/reaction_obj(obj/O, reac_volume)
|
||||
@@ -579,7 +579,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
value = 1.3
|
||||
|
||||
/datum/reagent/consumable/ethanol/bloody_mary/on_mob_life(mob/living/carbon/C)
|
||||
if(isvamp(C))
|
||||
if(AmBloodsucker(C))
|
||||
disgust_bloodsucker(FALSE, 1) //Bloodsuckers get SOME blood from it, for style reasons.
|
||||
if(C.blood_volume < (BLOOD_VOLUME_NORMAL*C.blood_ratio))
|
||||
C.blood_volume = min((BLOOD_VOLUME_NORMAL*C.blood_ratio), C.blood_volume + 3) //Bloody Mary quickly restores blood loss.
|
||||
@@ -1646,7 +1646,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
glass_icon_state = "pina_colada"
|
||||
glass_name = "Pina Colada"
|
||||
glass_desc = "If you like pina coladas, and getting caught in the rain... well, you'll like this drink."
|
||||
|
||||
|
||||
/datum/reagent/consumable/ethanol/grasshopper
|
||||
name = "Grasshopper"
|
||||
description = "A fresh and sweet dessert shooter. Difficult to look manly while drinking this."
|
||||
@@ -2354,7 +2354,220 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
/datum/reagent/consumable/ethanol/hotlime_miami/on_mob_life(mob/living/carbon/M)
|
||||
M.set_drugginess(50)
|
||||
M.adjustStaminaLoss(-2)
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
////////////////////
|
||||
//Race-Base-Drinks//
|
||||
////////////////////
|
||||
|
||||
/datum/reagent/consumable/ethanol/coldscales
|
||||
name = "Coldscales"
|
||||
color = "#5AEB52" //(90, 235, 82)
|
||||
description = "A cold looking drink made for people with scales."
|
||||
boozepwr = 50 //strong!
|
||||
taste_description = "dead flies"
|
||||
glass_icon_state = "coldscales"
|
||||
glass_name = "glass of Coldscales"
|
||||
glass_desc = "A soft green drink that looks inviting!"
|
||||
|
||||
/datum/reagent/consumable/ethanol/coldscales/on_mob_life(mob/living/carbon/M)
|
||||
if(islizard(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/oil_drum
|
||||
name = "Oil Drum"
|
||||
color = "#000000" //(0, 0, 0)
|
||||
description = "Industeral grade oil mixed with some ethanol to make it a drink. Somehow not known to be toxic."
|
||||
boozepwr = 45
|
||||
taste_description = "oil spill"
|
||||
glass_icon_state = "oil_drum"
|
||||
glass_name = "Drum of oil"
|
||||
glass_desc = "A gray can of booze and oil..."
|
||||
|
||||
/datum/reagent/consumable/ethanol/oil_drum/on_mob_life(mob/living/carbon/M)
|
||||
if(isipcperson(M) || issynthliz(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/nord_king
|
||||
name = "Nord King"
|
||||
color = "#EB1010" //(235, 16, 16)
|
||||
description = "Strong mead mixed with more honey and ethanol. Known to beloved by most palettes."
|
||||
boozepwr = 50 //strong!
|
||||
taste_description = "honey and red wine"
|
||||
glass_icon_state = "nord_king"
|
||||
glass_name = "Keg of Nord King"
|
||||
glass_desc = "A dripping keg of red mead."
|
||||
|
||||
/datum/reagent/consumable/ethanol/nord_king/on_mob_life(mob/living/carbon/M)
|
||||
if(ishumanbasic(M) || isdwarf(M) || isangel(M)) //Humans and angel races are rare
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/velvet_kiss
|
||||
name = "Velvet Kiss"
|
||||
color = "#EB1010" //(235, 16, 16)
|
||||
description = "A bloody drink mixed with wine."
|
||||
boozepwr = 10 //weak
|
||||
taste_description = "iron with grapejuice"
|
||||
glass_icon_state = "velvet_kiss"
|
||||
glass_name = "glass of Velvet Kiss"
|
||||
glass_desc = "Red and white drink for the upper classes or undead."
|
||||
|
||||
/datum/reagent/consumable/ethanol/velvet_kiss/on_mob_life(mob/living/carbon/M)
|
||||
if(iszombie(M) || isvampire(M) || isdullahan(M)) //Rare races!
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/abduction_fruit
|
||||
name = "Abduction Fruit"
|
||||
color = "#DEFACD" //(222, 250, 205)
|
||||
description = "Mixing of juices to make an alien taste."
|
||||
boozepwr = 80 //Strong
|
||||
taste_description = "grass and lime"
|
||||
glass_icon_state = "abduction_fruit"
|
||||
glass_name = "glass of Abduction Fruit"
|
||||
glass_desc = "Mixed fruits that were never ment to be mixed..."
|
||||
|
||||
/datum/reagent/consumable/ethanol/abduction_fruit/on_mob_life(mob/living/carbon/M)
|
||||
if(isabductor(M) || isxenoperson(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/bug_zapper
|
||||
name = "Bug Zapper"
|
||||
color = "#F5882A" //(222, 250, 205)
|
||||
description = "Metals and lemon juice. Hardly even a drink."
|
||||
boozepwr = 5 //No booze really
|
||||
taste_description = "copper and AC power"
|
||||
glass_icon_state = "bug_zapper"
|
||||
glass_name = "glass of Bug Zapper"
|
||||
glass_desc = "An odd mix of copper, lemon juice and power meant for non-human consumption."
|
||||
|
||||
/datum/reagent/consumable/ethanol/bug_zapper/on_mob_life(mob/living/carbon/M)
|
||||
if(isinsect(M) || isflyperson(M) || ismoth(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/mush_crush
|
||||
name = "Mush Crush"
|
||||
color = "#F5882A" //(222, 250, 205)
|
||||
description = "Soil in a glass."
|
||||
boozepwr = 5 //No booze really
|
||||
taste_description = "dirt and iron"
|
||||
glass_icon_state = "mush_crush"
|
||||
glass_name = "glass of Mush Crush"
|
||||
glass_desc = "Popular among people that want to grow their own food rather then drink the soil."
|
||||
|
||||
/datum/reagent/consumable/ethanol/mush_crush/on_mob_life(mob/living/carbon/M)
|
||||
if(ispodperson(M) || ismush(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/darkbrew
|
||||
name = "Darkbrew"
|
||||
color = "#000000" //(0, 0, 0)
|
||||
description = "Contained dark matter mixed with coffee."
|
||||
boozepwr = 5 //No booze really
|
||||
taste_description = "Shadows and coffee trees"
|
||||
glass_icon_state = "darkbrew"
|
||||
glass_name = "glass of Darkbrew"
|
||||
glass_desc = "A pitch black drink that's commonly confused with a type of coffee."
|
||||
|
||||
/datum/reagent/consumable/ethanol/darkbrew/on_mob_life(mob/living/carbon/M)
|
||||
if(isshadow(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/hollow_bone
|
||||
name = "Hollow Bone"
|
||||
color = "#FCF7D4" //(252, 247, 212)
|
||||
description = "Shockingly none-harmful mix of toxins and milk."
|
||||
boozepwr = 15
|
||||
taste_description = "Milk and salt"
|
||||
glass_icon_state = "hollow_bone"
|
||||
glass_name = "skull of Hollow Bone"
|
||||
glass_desc = "Mixing of milk and bone hurting juice for enjoyment for rather skinny people."
|
||||
|
||||
/datum/reagent/consumable/ethanol/hollow_bone/on_mob_life(mob/living/carbon/M)
|
||||
if(isplasmaman(M) || isskeleton(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/frisky_kitty
|
||||
name = "Frisky Kitty"
|
||||
color = "#FCF7D4" //(252, 247, 212)
|
||||
description = "Warm milk mixed with a catnip."
|
||||
boozepwr = 0 //No one dont get drunk off milk!
|
||||
taste_description = "Warm milk and catnip"
|
||||
glass_icon_state = "frisky_kitty"
|
||||
glass_name = "cup of Drisky Kitty"
|
||||
glass_desc = "Warm milk and some catnip."
|
||||
|
||||
/datum/reagent/consumable/ethanol/frisky_kitty/on_mob_life(mob/living/carbon/M)
|
||||
if(ismammal(M) || iscatperson(M)) //well its not to bad for mammals
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/jell_wyrm
|
||||
name = "Jell Wyrm"
|
||||
color = "#FF6200" //(255, 98, 0)
|
||||
description = "Horrible mix of Co2, toxins and heat. Meant for slime based life."
|
||||
boozepwr = 40
|
||||
taste_description = "tropical sea"
|
||||
glass_icon_state = "jell_wyrm"
|
||||
glass_name = "glass of Jell Wyrm"
|
||||
glass_desc = "A bubbly drink that is rather inviting to those that don't know who it's meant for."
|
||||
|
||||
/datum/reagent/consumable/ethanol/jell_wyrm/on_mob_life(mob/living/carbon/M)
|
||||
if(isjellyperson(M) || isstartjelly(M) || isslimeperson(M) || isluminescent(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
M.adjustToxLoss(1, 0) //Low tox do to being carp + jell toxins.
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/ethanol/laval_spit //Yes Laval
|
||||
name = "Laval Spit"
|
||||
color = "#DE3009" //(222, 48, 9)
|
||||
description = "Heat minerals and some mauna loa. Meant for rock based life."
|
||||
boozepwr = 30
|
||||
taste_description = "tropical island"
|
||||
glass_icon_state = "laval_spit"
|
||||
glass_name = "glass of Laval Spit"
|
||||
glass_desc = "Piping hot drink for those who can stomach the heat of lava."
|
||||
|
||||
/datum/reagent/consumable/ethanol/laval_spit/on_mob_life(mob/living/carbon/M)
|
||||
if(isgolem(M))
|
||||
quality = RACE_DRINK
|
||||
else
|
||||
M.adjust_disgust(25)
|
||||
return ..()
|
||||
|
||||
///////////////
|
||||
//Barrle Wine//
|
||||
///////////////
|
||||
|
||||
/datum/reagent/consumable/ethanol/fruit_wine
|
||||
name = "Fruit Wine"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////// DRINKS BELOW, Beer is up there though, along with cola. Cap'n Pete's Cuban Spiced Rum////////////////////////////////
|
||||
//////DRINKS BELOW, Beer is up there though, along with cola. Cap'n Pete's Cuban Spiced Rum//////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/reagent/consumable/orangejuice
|
||||
|
||||
@@ -467,9 +467,9 @@
|
||||
if(H.physiology)
|
||||
H.physiology.stamina_mod *= 0.5
|
||||
if(H.dna && H.dna.species)
|
||||
H.dna.species.punchdamagehigh *= 4
|
||||
H.dna.species.punchdamagelow *= 4
|
||||
H.dna.species.punchstunthreshold *= 2
|
||||
H.dna.species.punchdamagehigh += 4
|
||||
H.dna.species.punchdamagelow += 4
|
||||
H.dna.species.punchstunthreshold -= 2
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_end_metabolize(mob/living/L)
|
||||
. = ..()
|
||||
@@ -480,9 +480,9 @@
|
||||
if(H.physiology)
|
||||
H.physiology.stamina_mod *= 2
|
||||
if(H.dna && H.dna.species)
|
||||
H.dna.species.punchdamagehigh *= 0.25
|
||||
H.dna.species.punchdamagelow *= 0.25
|
||||
H.dna.species.punchstunthreshold *= 0.5
|
||||
H.dna.species.punchdamagehigh -= 4
|
||||
H.dna.species.punchdamagelow -= 4
|
||||
H.dna.species.punchstunthreshold += 2
|
||||
|
||||
/datum/reagent/drug/skooma/on_mob_life(mob/living/carbon/M)
|
||||
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, 1*REM)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
/datum/reagent/consumable/on_mob_life(mob/living/carbon/M)
|
||||
current_cycle++
|
||||
M.nutrition += nutriment_factor
|
||||
M.CheckBloodsuckerEatFood(nutriment_factor)
|
||||
holder.remove_reagent(type, metabolization_rate)
|
||||
|
||||
/datum/reagent/consumable/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
@@ -32,6 +33,8 @@
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_verygood)
|
||||
if (DRINK_FANTASTIC)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/quality_fantastic)
|
||||
if (RACE_DRINK)
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "quality_drink", /datum/mood_event/race_drink)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/consumable/nutriment
|
||||
@@ -421,6 +424,50 @@
|
||||
M.emote(pick("twitch","giggle"))
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/garlic //NOTE: having garlic in your blood stops vampires from biting you.
|
||||
name = "Garlic Juice"
|
||||
//id = "garlic"
|
||||
description = "Crushed garlic. Chefs love it, but it can make you smell bad."
|
||||
color = "#FEFEFE"
|
||||
taste_description = "garlic"
|
||||
metabolization_rate = 0.15 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/consumable/garlic/on_mob_life(mob/living/carbon/M)
|
||||
if(isvampire(M)) //incapacitating but not lethal. Unfortunately, vampires cannot vomit.
|
||||
if(prob(min(25, current_cycle)))
|
||||
to_chat(M, "<span class='danger'>You can't get the scent of garlic out of your nose! You can barely think...</span>")
|
||||
M.Stun(10)
|
||||
M.Jitter(10)
|
||||
return
|
||||
|
||||
else if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.job == "Cook")
|
||||
if(prob(20)) //stays in the system much longer than sprinkles/banana juice, so heals slower to partially compensate
|
||||
H.heal_bodypart_damage(1, 1, 0)
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/consumable/garlic/reaction_mob(mob/living/M, method, reac_volume)
|
||||
if(AmBloodsucker(M, TRUE)) //Theyll be immune to garlic as long as they masquarade, but they cant do it if they already have it.
|
||||
switch(method)
|
||||
if(INGEST)
|
||||
if(prob(min(30, current_cycle)))
|
||||
to_chat(M, "<span class='warning'>You cant get the smell of garlic out of your nose! You cant think straight because of it!</span>")
|
||||
M.Jitter(15)
|
||||
if(prob(min(15, current_cycle)))
|
||||
M.visible_message("<span class='danger'>Something you ate is burning your stomach!</span>", "<span class='warning'>[M] clutches their stomach and falls to the ground!</span>")
|
||||
M.Knockdown(20)
|
||||
M.emote("scream")
|
||||
if(prob(min(5, current_cycle)) && iscarbon(M))
|
||||
var/mob/living/carbon/C
|
||||
C.vomit()
|
||||
if(INJECT)
|
||||
if(prob(min(20, current_cycle)))
|
||||
to_chat(M, "<span class='warning'>You feel like your veins are boiling!</span>")
|
||||
M.emote("scream")
|
||||
M.adjustFireLoss(5)
|
||||
..()
|
||||
/datum/reagent/consumable/sprinkles
|
||||
name = "Sprinkles"
|
||||
value = 3
|
||||
|
||||
@@ -263,9 +263,9 @@
|
||||
/datum/reagent/medicine/silver_sulfadiazine/overdose_start(mob/living/M)
|
||||
metabolization_rate = 15 * REAGENTS_METABOLISM
|
||||
M.adjustBruteLoss(2*REM, 0)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.applyLiverDamage(1)
|
||||
var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(L)
|
||||
L.applyOrganDamage(1)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
@@ -326,9 +326,9 @@
|
||||
datum/reagent/medicine/styptic_powder/overdose_start(mob/living/M)
|
||||
metabolization_rate = 15 * REAGENTS_METABOLISM
|
||||
M.adjustBruteLoss(2*REM, 0)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.applyLiverDamage(1)
|
||||
var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(L)
|
||||
L.applyOrganDamage(1)
|
||||
..()
|
||||
. = 1
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
data = list("misc" = 1)
|
||||
data["misc"]++
|
||||
M.jitteriness = min(M.jitteriness+4,10)
|
||||
if(iscultist(M))
|
||||
if(iscultist(M, FALSE, TRUE))
|
||||
for(var/datum/action/innate/cult/blood_magic/BM in M.actions)
|
||||
if(!BM.holy_dispel)
|
||||
BM.holy_dispel = TRUE
|
||||
@@ -361,7 +361,7 @@
|
||||
if("emote")
|
||||
M.visible_message("<span class='warning'>[M] [pick("whimpers quietly", "shivers as though cold", "glances around in paranoia")].</span>")
|
||||
if(data["misc"] >= 60) // 30 units, 135 seconds
|
||||
if(iscultist(M) || is_servant_of_ratvar(M))
|
||||
if(iscultist(M, FALSE, TRUE) || is_servant_of_ratvar(M, FALSE, TRUE))
|
||||
if(iscultist(M))
|
||||
SSticker.mode.remove_cultist(M.mind, FALSE, TRUE)
|
||||
else if(is_servant_of_ratvar(M))
|
||||
@@ -507,93 +507,83 @@
|
||||
/datum/reagent/spraytan/reaction_mob(mob/living/M, method=TOUCH, reac_volume, show_message = 1)
|
||||
if(ishuman(M))
|
||||
if(method == PATCH || method == VAPOR)
|
||||
var/mob/living/carbon/human/N = M
|
||||
if(N.dna.species.id == "human")
|
||||
switch(N.skin_tone)
|
||||
if("african1")
|
||||
N.skin_tone = "african2"
|
||||
if("indian")
|
||||
N.skin_tone = "african1"
|
||||
if("arab")
|
||||
N.skin_tone = "indian"
|
||||
if("asian2")
|
||||
N.skin_tone = "arab"
|
||||
if("asian1")
|
||||
N.skin_tone = "asian2"
|
||||
if("mediterranean")
|
||||
N.skin_tone = "african1"
|
||||
if("latino")
|
||||
N.skin_tone = "mediterranean"
|
||||
if("caucasian3")
|
||||
N.skin_tone = "mediterranean"
|
||||
if("caucasian2")
|
||||
N.skin_tone = pick("caucasian3", "latino")
|
||||
if("caucasian1")
|
||||
N.skin_tone = "caucasian2"
|
||||
if ("albino")
|
||||
N.skin_tone = "caucasian1"
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.dna.species.use_skintones)
|
||||
if(!H.dna.skin_tone_override)
|
||||
var/diff_len = length(GLOB.skin_tones - GLOB.nonstandard_skin_tones)
|
||||
H.skin_tone = GLOB.skin_tones[min(diff_len, GLOB.skin_tones.Find(H.skin_tone) + 1)]
|
||||
else
|
||||
H.skin_tone = H.dna.skin_tone_override = tan_mutant_color(H.dna.skin_tone_override, "#202020")
|
||||
if(MUTCOLORS in H.dna.species.species_traits) //take current alien color and darken it slightly
|
||||
H.dna.features["mcolor"] = tan_mutant_color(H.dna.features["mcolor"])
|
||||
H.update_body()
|
||||
|
||||
if(MUTCOLORS in N.dna.species.species_traits) //take current alien color and darken it slightly
|
||||
var/newcolor = ""
|
||||
var/string = N.dna.features["mcolor"]
|
||||
var/len = length(string)
|
||||
var/char = ""
|
||||
var/ascii = 0
|
||||
for(var/i=1, i<=len, i += length(char))
|
||||
char = string[i]
|
||||
ascii = text2ascii(char)
|
||||
switch(ascii)
|
||||
if(48)
|
||||
newcolor += "0"
|
||||
if(49 to 57)
|
||||
newcolor += ascii2text(ascii-1) //numbers 1 to 9
|
||||
if(97)
|
||||
newcolor += "9"
|
||||
if(98 to 102)
|
||||
newcolor += ascii2text(ascii-1) //letters b to f lowercase
|
||||
if(65)
|
||||
newcolor += "9"
|
||||
if(66 to 70)
|
||||
newcolor += ascii2text(ascii+31) //letters B to F - translates to lowercase
|
||||
else
|
||||
break
|
||||
if(ReadHSV(newcolor)[3] >= ReadHSV("#7F7F7F")[3])
|
||||
N.dna.features["mcolor"] = newcolor
|
||||
N.regenerate_icons()
|
||||
if(method == INGEST)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='notice'>That tasted horrible.</span>")
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/reagent/spraytan/proc/tan_mutant_color(color, limit = "#7F7F7F")
|
||||
var/newcolor = ""
|
||||
var/len = length(color)
|
||||
var/char = ""
|
||||
var/ascii = 0
|
||||
for(var/i=1, i<=len, i += length(char))
|
||||
char = color[i]
|
||||
ascii = text2ascii(char)
|
||||
switch(ascii)
|
||||
if(35)
|
||||
newcolor += "#"
|
||||
if(48)
|
||||
newcolor += "0"
|
||||
if(49 to 57)
|
||||
newcolor += ascii2text(ascii-1) //numbers 1 to 9
|
||||
if(97)
|
||||
newcolor += "9"
|
||||
if(98 to 102)
|
||||
newcolor += ascii2text(ascii-1) //letters b to f lowercase
|
||||
if(65)
|
||||
newcolor += "9"
|
||||
if(66 to 70)
|
||||
newcolor += ascii2text(ascii+31) //letters B to F - translates to lowercase
|
||||
else
|
||||
break
|
||||
if(ReadHSV(newcolor)[3] >= ReadHSV(limit)[3])
|
||||
return newcolor
|
||||
return color
|
||||
|
||||
if(method == INGEST)
|
||||
if(show_message)
|
||||
to_chat(M, "<span class='notice'>That tasted horrible.</span>")
|
||||
..()
|
||||
|
||||
/datum/reagent/spraytan/overdose_start(mob/living/M)
|
||||
. = ..()
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
H.hair_style = "Spiky"
|
||||
H.facial_hair_style = "Shaved"
|
||||
H.facial_hair_color = "000"
|
||||
H.hair_color = "000"
|
||||
if(!(HAIR in H.dna.species.species_traits)) //No hair? No problem!
|
||||
H.dna.species.species_traits += HAIR
|
||||
if(H.dna.species.use_skintones)
|
||||
if(H.dna.skin_tone_override)
|
||||
H.skin_tone = H.dna.skin_tone_override = "#FF8800"
|
||||
else
|
||||
H.skin_tone = "orange"
|
||||
else if(MUTCOLORS in H.dna.species.species_traits) //Aliens with custom colors simply get turned orange
|
||||
H.dna.features["mcolor"] = "f80"
|
||||
H.update_body()
|
||||
|
||||
/datum/reagent/spraytan/overdose_process(mob/living/M)
|
||||
metabolization_rate = 1 * REAGENTS_METABOLISM
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/N = M
|
||||
N.hair_style = "Spiky"
|
||||
N.facial_hair_style = "Shaved"
|
||||
N.facial_hair_color = "000"
|
||||
N.hair_color = "000"
|
||||
if(!(HAIR in N.dna.species.species_traits)) //No hair? No problem!
|
||||
N.dna.species.species_traits += HAIR
|
||||
if(N.dna.species.use_skintones)
|
||||
N.skin_tone = "orange"
|
||||
else if(MUTCOLORS in N.dna.species.species_traits) //Aliens with custom colors simply get turned orange
|
||||
N.dna.features["mcolor"] = "f80"
|
||||
N.regenerate_icons()
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(prob(7))
|
||||
if(N.w_uniform)
|
||||
M.visible_message(pick("<b>[M]</b>'s collar pops up without warning.</span>", "<b>[M]</b> flexes [M.p_their()] arms."))
|
||||
if(H.w_uniform)
|
||||
H.visible_message(pick("<b>[H]</b>'s collar pops up without warning.</span>", "<b>[H]</b> flexes [H.p_their()] arms."))
|
||||
else
|
||||
M.visible_message("<b>[M]</b> flexes [M.p_their()] arms.")
|
||||
H.visible_message("<b>[H]</b> flexes [H.p_their()] arms.")
|
||||
if(prob(10))
|
||||
M.say(pick("Shit was SO cash.", "You are everything bad in the world.", "What sports do you play, other than 'jack off to naked drawn Japanese people?'", "Don’t be a stranger. Just hit me with your best shot.", "My name is John and I hate every single one of you."), forced = "spraytan")
|
||||
..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/datum/reagent/mutationtoxin
|
||||
name = "Stable Mutation Toxin"
|
||||
@@ -1070,11 +1060,11 @@
|
||||
to_chat(M, "<span class='userdanger'>You start feeling your guts twisting painfully!</span>")
|
||||
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "[type]_overdose", /datum/mood_event/overdose, name)
|
||||
|
||||
/datum/reagent/iron/overdose_process(mob/living/carbon/C)
|
||||
/datum/reagent/iron/overdose_process(mob/living/M)
|
||||
if(prob(20))
|
||||
var/obj/item/organ/liver/L = C.getorganslot(ORGAN_SLOT_LIVER)
|
||||
if (istype(L))
|
||||
C.applyLiverDamage(2) //mild until the fabled med rework comes out. the organ damage galore
|
||||
var/obj/item/organ/liver/L = M.getorganslot(ORGAN_SLOT_LIVER)
|
||||
if(L)
|
||||
L.applyOrganDamage(2)
|
||||
..()
|
||||
|
||||
/datum/reagent/gold
|
||||
|
||||
@@ -331,7 +331,6 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>This doesn't fit in [src].</span>")
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/item/hypospray/mkii/AltClick(mob/user)
|
||||
. = ..()
|
||||
|
||||
Reference in New Issue
Block a user