Merge pull request #10329 from Ghommie/Ghommie-cit490

Ports reagents id removal and typepath usage.
This commit is contained in:
Lin
2020-01-10 01:34:39 +00:00
committed by GitHub
318 changed files with 4775 additions and 5377 deletions
@@ -27,7 +27,7 @@
/obj/item/organ/alien/prepare_eat()
var/obj/S = ..()
S.reagents.add_reagent("sacid", 10)
S.reagents.add_reagent(/datum/reagent/toxin/acid, 10)
return S
@@ -46,7 +46,7 @@
/obj/item/organ/alien/plasmavessel/prepare_eat()
var/obj/S = ..()
S.reagents.add_reagent("plasma", storedPlasma/10)
S.reagents.add_reagent(/datum/reagent/toxin/plasma, storedPlasma/10)
return S
/obj/item/organ/alien/plasmavessel/large
@@ -18,7 +18,7 @@
/obj/item/organ/body_egg/alien_embryo/prepare_eat()
var/obj/S = ..()
S.reagents.add_reagent("sacid", 10)
S.reagents.add_reagent(/datum/reagent/toxin/acid, 10)
return S
/obj/item/organ/body_egg/alien_embryo/on_life()
File diff suppressed because it is too large Load Diff
@@ -243,7 +243,7 @@
shock_damage *= dna.species.siemens_coeff
if(shock_damage<1 && !override)
return 0
if(reagents.has_reagent("teslium"))
if(reagents.has_reagent(/datum/reagent/teslium))
shock_damage *= 1.5 //If the mob has teslium in their body, shocks are 50% more damaging!
if(illusion)
adjustStaminaLoss(shock_damage)
@@ -255,7 +255,7 @@
else
msg += "<B>[t_He] [t_is] bleeding!</B>\n"
if(reagents.has_reagent("teslium"))
if(reagents.has_reagent(/datum/reagent/teslium))
msg += "[t_He] [t_is] emitting a gentle blue glow!\n"
if(islist(stun_absorption))
@@ -278,7 +278,7 @@
if(91.01 to INFINITY)
msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n"
if(reagents.has_reagent("astral"))
if(reagents.has_reagent(/datum/reagent/fermi/astral))
if(mind)
msg += "[t_He] has wild, spacey eyes and they have a strange, abnormal look to them.\n"
else
@@ -1270,9 +1270,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
H.update_mutant_bodyparts()
/datum/species/proc/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == exotic_blood)
if(chem.type == exotic_blood)
H.blood_volume = min(H.blood_volume + round(chem.volume, 0.1), BLOOD_VOLUME_MAXIMUM)
H.reagents.del_reagent(chem.id)
H.reagents.del_reagent(chem.type)
return 1
return FALSE
@@ -7,18 +7,18 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
id = "dwarf" //Also called Homo sapiens pumilionis
default_color = "FFFFFF"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NO_UNDERWEAR)
inherent_traits = list()
inherent_traits = list()
default_features = list("mcolor" = "FFF", "wings" = "None")
limbs_id = "human"
use_skintones = 1
say_mod = "bellows" //high energy, EXTRA BIOLOGICAL FUEL
damage_overlay_type = "human"
damage_overlay_type = "human"
skinned_type = /obj/item/stack/sheet/animalhide/human
liked_food = ALCOHOL | MEAT | DAIRY //Dwarves like alcohol, meat, and dairy products.
disliked_food = JUNKFOOD | FRIED //Dwarves hate foods that have no nutrition other than alcohol.
mutant_organs = list(/obj/item/organ/dwarfgland) //Dwarven alcohol gland, literal gland warrior
mutantliver = /obj/item/organ/liver/dwarf //Dwarven super liver (Otherwise they r doomed)
/mob/living/carbon/human/species/dwarf //species admin spawn path
race = /datum/species/dwarf //and the race the path is set to.
@@ -30,7 +30,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
/datum/species/dwarf/on_species_gain(mob/living/carbon/C, datum/species/old_species)
. = ..()
var/dwarf_hair = pick("Beard (Dwarf)", "Beard (Very Long)", "Beard (Long)") //beard roullette
var/mob/living/carbon/human/H = C
var/mob/living/carbon/human/H = C
H.facial_hair_style = dwarf_hair
H.update_hair()
H.transform = H.transform.Scale(1, 0.8) //We use scale, and yeah. Dwarves can become gnomes with DWARFISM.
@@ -95,7 +95,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
/obj/item/organ/dwarfgland/prepare_eat()
var/obj/S = ..()
S.reagents.add_reagent("ethanol", stored_alcohol/10)
S.reagents.add_reagent(/datum/reagent/consumable/ethanol, stored_alcohol/10)
return S
/obj/item/organ/dwarfgland/on_life() //Primary loop to hook into to start delayed loops for other loops..
@@ -108,8 +108,8 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
return //We make sure they are not dead, so they don't increment any tickers.
dwarf_eth_ticker++
dwarf_filth_ticker++
if(dwarf_filth_ticker >= 4) //Should be around 4-8 seconds since a tick is around 2 seconds.
if(dwarf_filth_ticker >= 4) //Should be around 4-8 seconds since a tick is around 2 seconds.
dwarf_filth_cycle() //On_life will adjust regarding other factors, so we are along for the ride.
dwarf_filth_ticker = 0 //We set the ticker back to 0 to go again.
if(dwarf_eth_ticker >= 1) //Alcohol reagent check should be around 2 seconds, since a tick is around 2 seconds.
@@ -13,9 +13,9 @@
exotic_bloodtype = "BUG"
/datum/species/fly/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "pestkiller")
if(chem.type == /datum/reagent/toxin/pestkiller)
H.adjustToxLoss(3)
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
return 1
@@ -305,9 +305,9 @@
H.take_overall_damage(2,0)
/datum/species/golem/wood/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "plantbgone")
if(chem.type == /datum/reagent/toxin/plantbgone)
H.adjustToxLoss(3)
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
return 1
//Radioactive
@@ -619,14 +619,14 @@
C.RemoveSpell(dominate)
/datum/species/golem/runic/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "holywater")
if(chem.type == /datum/reagent/water/holywater)
H.adjustFireLoss(4)
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
if(chem.id == "unholywater")
if(chem.type == /datum/reagent/fuel/unholywater)
H.adjustBruteLoss(-4)
H.adjustFireLoss(-4)
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
/datum/species/golem/clockwork
@@ -12,7 +12,7 @@
inherent_traits = list(TRAIT_TOXINLOVER)
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/slime
gib_types = list(/obj/effect/gibspawner/slime, /obj/effect/gibspawner/slime/bodypartless)
exotic_blood = "jellyblood"
exotic_blood = /datum/reagent/blood/jellyblood
exotic_bloodtype = "GEL"
damage_overlay_type = ""
var/datum/action/innate/regenerate_limbs/regenerate_limbs
@@ -52,9 +52,9 @@
QDEL_NULL(mush)
/datum/species/mush/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "weedkiller")
if(chem.type == /datum/reagent/toxin/plantbgone/weedkiller)
H.adjustToxLoss(3)
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
return TRUE
/datum/species/mush/handle_mutant_bodyparts(mob/living/carbon/human/H, forced_colour)
@@ -47,9 +47,9 @@
H.take_overall_damage(2,0)
/datum/species/pod/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "plantbgone")
if(chem.type == /datum/reagent/toxin/plantbgone)
H.adjustToxLoss(3)
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
return 1
/datum/species/pod/on_hit(obj/item/projectile/P, mob/living/carbon/human/H)
@@ -36,9 +36,9 @@
UnregisterSignal(H, COMSIG_MOB_SAY)
/datum/species/synth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
if(chem.id == "synthflesh")
if(chem.type == /datum/reagent/medicine/synthflesh)
chem.reaction_mob(H, TOUCH, 2 ,0) //heal a little
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM)
return 1
else
return ..()
+3 -3
View File
@@ -80,7 +80,7 @@
//Second link in a breath chain, calls check_breath()
/mob/living/carbon/proc/breathe()
var/obj/item/organ/lungs = getorganslot(ORGAN_SLOT_LUNGS)
if(reagents.has_reagent("lexorin"))
if(reagents.has_reagent(/datum/reagent/toxin/lexorin))
return
if(istype(loc, /obj/machinery/atmospherics/components/unary/cryo_cell))
return
@@ -156,7 +156,7 @@
//CRIT
if(!breath || (breath.total_moles() == 0) || !lungs)
if(reagents.has_reagent("epinephrine") && lungs)
if(reagents.has_reagent(/datum/reagent/medicine/epinephrine) && lungs)
return
adjustOxyLoss(1)
@@ -357,7 +357,7 @@
return
// No decay if formaldehyde in corpse or when the corpse is charred
if(reagents.has_reagent("formaldehyde", 15) || HAS_TRAIT(src, TRAIT_HUSK))
if(reagents.has_reagent(/datum/reagent/toxin/formaldehyde, 15) || HAS_TRAIT(src, TRAIT_HUSK))
return
// Also no decay if corpse chilled or not organic/undead
@@ -66,7 +66,7 @@
. = ..()
remove_movespeed_modifier(MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD, TRUE)
var/amount
if(reagents.has_reagent("morphine"))
if(reagents.has_reagent(/datum/reagent/medicine/morphine))
amount = -1
if(amount)
add_movespeed_modifier(MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = amount)