Merge pull request #8776 from Ghommie/Ghommie-cit96

Porting in donut fixes, beepsky smash and Neurotoxin reworks.
This commit is contained in:
kevinz000
2019-07-03 13:45:02 -07:00
committed by GitHub
15 changed files with 188 additions and 66 deletions
@@ -8,27 +8,34 @@
icon_state = "donut1"
bitesize = 5
bonus_reagents = list("sugar" = 1)
list_reagents = list("nutriment" = 3, "sugar" = 2)
var/extra_reagent = null
list_reagents = list("nutriment" = 3, "sprinkles" = 1, "sugar" = 2)
filling_color = "#D2691E"
tastes = list("donut" = 1)
foodtype = JUNKFOOD | GRAIN | FRIED | SUGAR
var/frosted_icon = "donut2"
var/is_frosted = FALSE
var/extra_reagent = null
/obj/item/reagent_containers/food/snacks/donut/Initialize()
. = ..()
if(prob(30))
icon_state = "donut2"
name = "frosted donut"
reagents.add_reagent("sprinkles", 2)
bonus_reagents = list("sprinkles" = 2, "sugar" = 1)
filling_color = "#FF69B4"
frost_donut()
/obj/item/reagent_containers/food/snacks/donut/proc/frost_donut()
if(is_frosted || !frosted_icon)
return
is_frosted = TRUE
name = "frosted [name]"
icon_state = frosted_icon //delish~!
reagents.add_reagent("sprinkles", 1)
filling_color = "#FF69B4"
return TRUE
/obj/item/reagent_containers/food/snacks/donut/checkLiked(fraction, mob/M) //Sec officers always love donuts
if(last_check_time + 50 < world.time)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.mind && H.mind.assigned_role == "Security Officer" || H.mind.assigned_role == "Detective" || H.mind.assigned_role == "Warden" || H.mind.assigned_role == "Head of Security" && !HAS_TRAIT(H, TRAIT_AGEUSIA))
if(M.mind && HAS_TRAIT(M.mind, TRAIT_LAW_ENFORCEMENT_METABOLISM) && !HAS_TRAIT(H, TRAIT_AGEUSIA))
to_chat(H,"<span class='notice'>I love this taste!</span>")
H.adjust_disgust(-5 + -2.5 * fraction)
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
@@ -48,18 +55,12 @@
. = ..()
extra_reagent = pick("nutriment", "capsaicin", "frostoil", "krokodil", "plasma", "cocoa", "slimejelly", "banana", "berryjuice", "omnizine")
reagents.add_reagent("[extra_reagent]", 3)
bonus_reagents = list("[extra_reagent]" = 3, "sugar" = 1)
if(prob(30))
icon_state = "donut2"
name = "frosted chaos donut"
reagents.add_reagent("sprinkles", 2)
bonus_reagents = list("sprinkles" = 2, "[extra_reagent]" = 3, "sugar" = 1)
filling_color = "#FF69B4"
/obj/item/reagent_containers/food/snacks/donut/jelly
name = "jelly donut"
desc = "You jelly?"
icon_state = "jdonut1"
frosted_icon = "jdonut2"
bonus_reagents = list("sugar" = 1, "vitamin" = 1)
extra_reagent = "berryjuice"
tastes = list("jelly" = 1, "donut" = 3)
@@ -69,12 +70,6 @@
. = ..()
if(extra_reagent)
reagents.add_reagent("[extra_reagent]", 3)
if(prob(30))
icon_state = "jdonut2"
name = "frosted jelly Donut"
reagents.add_reagent("sprinkles", 2)
bonus_reagents = list("sprinkles" = 2, "sugar" = 1)
filling_color = "#FF69B4"
/obj/item/reagent_containers/food/snacks/donut/jelly/slimejelly
name = "jelly donut"
@@ -152,8 +152,8 @@
/datum/chemical_reaction/beepsky_smash
name = "Beepksy Smash"
id = "beepksysmash"
results = list("beepskysmash" = 4)
required_reagents = list("limejuice" = 2, "whiskey" = 2, "iron" = 1)
results = list("beepskysmash" = 5)
required_reagents = list("limejuice" = 2, "quadruple_sec" = 2, "iron" = 1)
/datum/chemical_reaction/doctor_delight
name = "The Doctor's Delight"
+3
View File
@@ -18,6 +18,7 @@ Clown
minimal_access = list(ACCESS_THEATRE)
/datum/job/clown/after_spawn(mob/living/carbon/human/H, mob/M)
. = ..()
H.apply_pref_name("clown", M.client)
/datum/outfit/job/clown
@@ -174,6 +175,8 @@ Lawyer
access = list(ACCESS_LAWYER, ACCESS_COURT, ACCESS_SEC_DOORS)
minimal_access = list(ACCESS_LAWYER, ACCESS_COURT, ACCESS_SEC_DOORS)
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
/datum/outfit/job/lawyer
name = "Lawyer"
jobtype = /datum/job/lawyer
@@ -19,6 +19,7 @@ Chaplain
minimal_access = list(ACCESS_MORGUE, ACCESS_CHAPEL_OFFICE, ACCESS_CREMATORIUM, ACCESS_THEATRE)
/datum/job/chaplain/after_spawn(mob/living/H, mob/M)
. = ..()
if(H.mind)
H.mind.isholy = TRUE
+5
View File
@@ -54,10 +54,15 @@
//can be overridden by antag_rep.txt config
var/antag_rep = 10
var/list/mind_traits // Traits added to the mind of the mob assigned this job
//Only override this proc
//H is usually a human unless an /equip override transformed it
/datum/job/proc/after_spawn(mob/living/H, mob/M, latejoin = FALSE)
//do actions on H but send messages to M as the key may not have been transferred_yet
if(mind_traits)
for(var/t in mind_traits)
ADD_TRAIT(H.mind, t, JOB_TRAIT)
/datum/job/proc/announce(mob/living/carbon/human/H)
if(head_announce)
+7
View File
@@ -35,6 +35,8 @@ Head of Security
ACCESS_RESEARCH, ACCESS_ENGINE, ACCESS_MINING, ACCESS_MEDICAL, ACCESS_CONSTRUCTION, ACCESS_MAILSORTING,
ACCESS_HEADS, ACCESS_HOS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM)
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
/datum/outfit/job/hos
name = "Head of Security"
jobtype = /datum/job/hos
@@ -92,6 +94,8 @@ Warden
access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_MAINT_TUNNELS, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_FORENSICS_LOCKERS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_ARMORY, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) //SEE /DATUM/JOB/WARDEN/GET_ACCESS()
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
/datum/job/warden/get_access()
var/list/L = list()
L = ..() | check_config_for_sec_maint()
@@ -145,6 +149,8 @@ Detective
access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_SEC_DOORS, ACCESS_FORENSICS_LOCKERS, ACCESS_MORGUE, ACCESS_MAINT_TUNNELS, ACCESS_COURT, ACCESS_BRIG, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM)
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
/datum/outfit/job/detective
name = "Detective"
jobtype = /datum/job/detective
@@ -198,6 +204,7 @@ Security Officer
access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_MAINT_TUNNELS, ACCESS_MORGUE, ACCESS_WEAPONS, ACCESS_FORENSICS_LOCKERS, ACCESS_MINERAL_STOREROOM)
minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) //BUT SEE /DATUM/JOB/WARDEN/GET_ACCESS()
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
/datum/job/officer/get_access()
var/list/L = list()
+1 -1
View File
@@ -265,7 +265,7 @@
var/list/datum/brain_trauma/possible_traumas = list()
for(var/T in subtypesof(brain_trauma_type))
var/datum/brain_trauma/BT = T
if(can_gain_trauma(BT, resilience))
if(can_gain_trauma(BT, resilience) && initial(BT.random_gain))
possible_traumas += BT
if(!LAZYLEN(possible_traumas))
@@ -284,12 +284,8 @@
if(health < maxHealth)
adjustBruteLoss(-8) //Fast life regen
for(var/obj/item/reagent_containers/food/snacks/donut/D in range(1, src)) //Frosts nearby donuts!
if(D.icon_state != "donut2")
D.name = "frosted donut"
D.icon_state = "donut2"
D.reagents.add_reagent("sprinkles", 2)
D.bonus_reagents = list("sprinkles" = 2, "sugar" = 1)
D.filling_color = "#FF69B4"
if(!D.is_frosted)
D.frost_donut()
/mob/living/simple_animal/pet/cat/cak/attack_hand(mob/living/L)
..()
@@ -633,19 +633,42 @@ All effects don't start immediately, but rather get worse over time; the rate is
color = "#664300" // rgb: 102, 67, 0
boozepwr = 90 //THE FIST OF THE LAW IS STRONG AND HARD
quality = DRINK_GOOD
metabolization_rate = 0.8
metabolization_rate = 0.5
taste_description = "JUSTICE"
glass_icon_state = "beepskysmashglass"
glass_name = "Beepsky Smash"
glass_desc = "Heavy, hot and strong. Just like the Iron fist of the LAW."
overdose_threshold = 40
var/datum/brain_trauma/special/beepsky/B
/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_metabolize(mob/living/carbon/M)
if(HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
metabolization_rate = 0.8
if(!HAS_TRAIT(M, TRAIT_LAW_ENFORCEMENT_METABOLISM))
B = new()
M.gain_trauma(B, TRAUMA_RESILIENCE_ABSOLUTE)
..()
/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_life(mob/living/carbon/M)
if(HAS_TRAIT(M, TRAIT_ALCOHOL_TOLERANCE))
M.Stun(30, 0) //this realistically does nothing to prevent chainstunning but will cause them to recover faster once it's out of their system
else
M.Stun(40, 0)
M.Jitter(2)
if(HAS_TRAIT(M, TRAIT_LAW_ENFORCEMENT_METABOLISM))
M.adjustStaminaLoss(-10, 0)
if(prob(20))
new /datum/hallucination/items_other(M)
if(prob(10))
new /datum/hallucination/stray_bullet(M)
..()
. = TRUE
/datum/reagent/consumable/ethanol/beepsky_smash/on_mob_end_metabolize(mob/living/carbon/M)
if(B)
QDEL_NULL(B)
return ..()
/datum/reagent/consumable/ethanol/beepsky_smash/overdose_start(mob/living/carbon/M)
if(!HAS_TRAIT(M, TRAIT_LAW_ENFORCEMENT_METABOLISM))
M.gain_trauma(/datum/brain_trauma/mild/phobia/security, TRAUMA_RESILIENCE_BASIC)
/datum/reagent/consumable/ethanol/irish_cream
name = "Irish Cream"
id = "irishcream"
@@ -1319,32 +1342,49 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/neurotoxin
name = "Neurotoxin"
id = "neurotoxin"
description = "A strong neurotoxin that puts the subject into a death-like state."
color = "#2E2E61" // rgb: 46, 46, 97
boozepwr = 0 //custom drunk effect
boozepwr = 50
quality = DRINK_VERYGOOD
taste_description = "a numbing sensation"
metabolization_rate = 1 * REAGENTS_METABOLISM
glass_icon_state = "neurotoxinglass"
glass_name = "Neurotoxin"
glass_desc = "A drink that is guaranteed to knock you silly."
/datum/reagent/consumable/ethanol/neurotoxin/proc/pickt()
return (pick(TRAIT_PARALYSIS_L_ARM,TRAIT_PARALYSIS_R_ARM,TRAIT_PARALYSIS_R_LEG,TRAIT_PARALYSIS_L_LEG))
/datum/reagent/consumable/ethanol/neurotoxin/on_mob_life(mob/living/carbon/M)
M.Knockdown(60, 1, 0)
M.set_drugginess(50)
M.dizziness +=2
switch(current_cycle)
if(15 to 45)
M.slurring = max(M.slurring,50)
M.slurring += 3
if(45 to 55)
if(prob(50))
M.confused = max(M.confused+3,0)
if(55 to 200)
M.set_drugginess(55)
if(200 to INFINITY)
M.adjustToxLoss(2, 0)
M.adjustBrainLoss(1*REM, 150)
if(prob(20))
M.adjustStaminaLoss(10)
M.drop_all_held_items()
to_chat(M, "<span class='notice'>You cant feel your hands!</span>")
if(current_cycle > 5)
if(prob(20))
var/t = pickt()
ADD_TRAIT(M, t, type)
M.adjustStaminaLoss(10)
if(current_cycle > 30)
M.adjustBrainLoss(2*REM)
if(current_cycle > 50 && prob(15))
if(!M.undergoing_cardiac_arrest() && M.can_heartattack())
M.set_heartattack(TRUE)
if(M.stat == CONSCIOUS)
M.visible_message("<span class='userdanger'>[M] clutches at [M.p_their()] chest as if [M.p_their()] heart stopped!</span>")
. = TRUE
..()
/datum/reagent/consumable/ethanol/neurotoxin/on_mob_end_metabolize(mob/living/carbon/M)
REMOVE_TRAIT(M, TRAIT_PARALYSIS_L_ARM, type)
REMOVE_TRAIT(M, TRAIT_PARALYSIS_R_ARM, type)
REMOVE_TRAIT(M, TRAIT_PARALYSIS_R_LEG, type)
REMOVE_TRAIT(M, TRAIT_PARALYSIS_L_LEG, type)
M.adjustStaminaLoss(10)
..()
. = 1
/datum/reagent/consumable/ethanol/hippies_delight
name = "Hippie's Delight"
@@ -1468,7 +1508,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "An intimidating and lawful beverage dares you to violate the law and make its day. Still can't drink it on duty, though."
/datum/reagent/consumable/ethanol/quadruple_sec/on_mob_life(mob/living/carbon/M)
if(M.mind && M.mind.assigned_role in list("Security Officer", "Detective", "Head of Security", "Warden", "Lawyer")) //Securidrink in line with the screwderiver for engineers or nothing for mimes.
if(M.mind && HAS_TRAIT(M.mind, TRAIT_LAW_ENFORCEMENT_METABOLISM)) //Securidrink in line with the screwderiver for engineers or nothing for mimes.
M.heal_bodypart_damage(1, 1)
M.adjustBruteLoss(-2,0)
. = 1
@@ -1487,7 +1527,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
glass_desc = "Now you are become law, destroyer of clowns."
/datum/reagent/consumable/ethanol/quintuple_sec/on_mob_life(mob/living/carbon/M)
if(M.mind && M.mind.assigned_role in list("Security Officer", "Detective", "Head of Security", "Warden", "Lawyer")) //Securidrink in line with the screwderiver for engineers or nothing for mimes but STRONG..
if(M.mind && HAS_TRAIT(M.mind, TRAIT_LAW_ENFORCEMENT_METABOLISM)) //Securidrink in line with the screwderiver for engineers or nothing for mimes but STRONG..
M.heal_bodypart_damage(2,2,2)
M.adjustBruteLoss(-5,0)
M.adjustOxyLoss(-5,0)
@@ -433,7 +433,7 @@
taste_description = "childhood whimsy"
/datum/reagent/consumable/sprinkles/on_mob_life(mob/living/carbon/M)
if(ishuman(M) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden"))
if(M.mind && HAS_TRAIT(M.mind, TRAIT_LAW_ENFORCEMENT_METABOLISM))
M.heal_bodypart_damage(1,1, 0)
. = 1
..()