mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Converts Reagents to Typepaths and Centralises Reagent Spawning (#9140)
Converts reagents to use typepaths instead of IDs.
Centralises reagent spawning in a lot of places to use reagents_to_add instead of a variety of custom methods or initialise overrides.
This commit is contained in:
@@ -226,7 +226,7 @@
|
||||
if(do_after(src, 30))
|
||||
visible_message(SPAN_NOTICE("[src] eliminates the pests in \the [A]."))
|
||||
T.pestlevel = 0
|
||||
T.reagents.add_reagent("nutriment", 0.5)
|
||||
T.reagents.add_reagent(/datum/reagent/nutriment, 0.5)
|
||||
T.update_icon()
|
||||
if(FARMBOT_NUTRIMENT)
|
||||
action = "fertile"
|
||||
@@ -235,7 +235,7 @@
|
||||
attacking = TRUE
|
||||
if(do_after(src, 30))
|
||||
visible_message(SPAN_NOTICE("[src] waters \the [A]."))
|
||||
T.reagents.add_reagent("ammonia", 10)
|
||||
T.reagents.add_reagent(/datum/reagent/ammonia, 10)
|
||||
attacking = FALSE
|
||||
action = ""
|
||||
update_icons()
|
||||
@@ -248,7 +248,7 @@
|
||||
visible_message(SPAN_NOTICE("[src] starts refilling its tank from \the [A]."))
|
||||
attacking = TRUE
|
||||
while(do_after(src, 10) && tank.reagents.total_volume < tank.reagents.maximum_volume)
|
||||
tank.reagents.add_reagent("water", 10)
|
||||
tank.reagents.add_reagent(/datum/reagent/water, 10)
|
||||
if(prob(5))
|
||||
playsound(get_turf(src), 'sound/effects/slosh.ogg', 25, TRUE)
|
||||
attacking = FALSE
|
||||
@@ -297,7 +297,7 @@
|
||||
return FALSE
|
||||
if(tray.dead && removes_dead || tray.harvest && collects_produce)
|
||||
return FARMBOT_COLLECT
|
||||
else if(waters_trays && tray.waterlevel < 10 && !tray.reagents.has_reagent("water"))
|
||||
else if(waters_trays && tray.waterlevel < 10 && !tray.reagents.has_reagent(/datum/reagent/water))
|
||||
return FARMBOT_WATER
|
||||
else if(uproots_weeds && tray.weedlevel >= 5)
|
||||
return FARMBOT_UPROOT
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
var/injection_amount = 15 //How much reagent do we inject at a time?
|
||||
var/heal_threshold = 10 //Start healing when they have this much damage in a category
|
||||
var/use_beaker = 0 //Use reagents in beaker instead of default treatment agents.
|
||||
var/treatment_brute = "tricordrazine"
|
||||
var/treatment_oxy = "tricordrazine"
|
||||
var/treatment_fire = "tricordrazine"
|
||||
var/treatment_tox = "tricordrazine"
|
||||
var/treatment_emag = "toxin"
|
||||
var/treatment_brute = /datum/reagent/tricordrazine
|
||||
var/treatment_oxy = /datum/reagent/tricordrazine
|
||||
var/treatment_fire = /datum/reagent/tricordrazine
|
||||
var/treatment_tox = /datum/reagent/tricordrazine
|
||||
var/treatment_emag = /datum/reagent/toxin
|
||||
var/declare_treatment = 0 //When attempting to treat a patient, should it notify everyone wearing medhuds?
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
density = 0
|
||||
mouth_size = 2 //how large of a creature it can swallow at once, and how big of a bite it can take out of larger things
|
||||
eat_types = 0 //This is a bitfield which must be initialised in New(). The valid values for it are in devour.dm
|
||||
composition_reagent = "nutriment" //Dionae are plants, so eating them doesn't give animal protein
|
||||
composition_reagent = /datum/reagent/nutriment //Dionae are plants, so eating them doesn't give animal protein
|
||||
name = "diona nymph"
|
||||
voice_name = "diona nymph"
|
||||
adult_form = /mob/living/carbon/human
|
||||
@@ -194,12 +194,12 @@
|
||||
vessel = new/datum/reagents(600)
|
||||
vessel.my_atom = src
|
||||
|
||||
vessel.add_reagent("blood", 560)
|
||||
vessel.add_reagent(/datum/reagent/blood, 560)
|
||||
fixblood()
|
||||
|
||||
/mob/living/carbon/alien/diona/proc/fixblood()
|
||||
for(var/datum/reagent/blood/B in vessel.reagent_list)
|
||||
if(B.id == "blood")
|
||||
if(B.type == /datum/reagent/blood)
|
||||
B.data = list(
|
||||
"donor" = WEAKREF(src),
|
||||
"species" = species.name,
|
||||
|
||||
@@ -229,9 +229,9 @@
|
||||
var/mob/living/carbon/human/H = D
|
||||
remove_amount = H.species.blood_volume * 0.05
|
||||
if(remove_amount > 0)
|
||||
vessel.remove_reagent("blood", remove_amount, TRUE)
|
||||
vessel.remove_reagent(/datum/reagent/blood, remove_amount, TRUE)
|
||||
adjustNutritionLoss(-remove_amount * 0.5)
|
||||
var/list/data = vessel.get_data("blood")
|
||||
var/list/data = vessel.get_data(/datum/reagent/blood)
|
||||
newDNA = data["blood_DNA"]
|
||||
|
||||
if(!newDNA) //Fallback. Adminspawned mobs, and possibly some others, have null dna.
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
// ========
|
||||
/datum/medical_effect/headache
|
||||
name = "Headache"
|
||||
triggers = list("cryoxadone" = 10, "bicaridine" = 15, "tricordrazine" = 15)
|
||||
cures = list("alkysine", "tramadol", "paracetamol", "oxycodone")
|
||||
triggers = list(/datum/reagent/cryoxadone = 10, /datum/reagent/bicaridine = 15, /datum/reagent/tricordrazine = 15)
|
||||
cures = list(/datum/reagent/alkysine, /datum/reagent/tramadol, /datum/reagent/paracetamol, /datum/reagent/oxycodone)
|
||||
cure_message = "Your head stops throbbing..."
|
||||
|
||||
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
|
||||
@@ -99,8 +99,8 @@
|
||||
// ===========
|
||||
/datum/medical_effect/bad_stomach
|
||||
name = "Bad Stomach"
|
||||
triggers = list("kelotane" = 30, "dermaline" = 15)
|
||||
cures = list("dylovene")
|
||||
triggers = list(/datum/reagent/kelotane = 30, /datum/reagent/dermaline = 15)
|
||||
cures = list(/datum/reagent/dylovene)
|
||||
cure_message = "Your stomach feels a little better now..."
|
||||
|
||||
/datum/medical_effect/bad_stomach/on_life(mob/living/carbon/human/H, strength)
|
||||
@@ -116,8 +116,8 @@
|
||||
// ======
|
||||
/datum/medical_effect/cramps
|
||||
name = "Cramps"
|
||||
triggers = list("dylovene" = 30, "tramadol" = 15)
|
||||
cures = list("norepinephrine")
|
||||
triggers = list(/datum/reagent/dylovene = 30, /datum/reagent/tramadol = 15)
|
||||
cures = list(/datum/reagent/norepinephrine)
|
||||
cure_message = "The cramps let up..."
|
||||
|
||||
/datum/medical_effect/cramps/on_life(mob/living/carbon/human/H, strength)
|
||||
@@ -134,8 +134,8 @@
|
||||
// ====
|
||||
/datum/medical_effect/itch
|
||||
name = "Itch"
|
||||
triggers = list("space_drugs" = 10)
|
||||
cures = list("norepinephrine")
|
||||
triggers = list(/datum/reagent/space_drugs = 10)
|
||||
cures = list(/datum/reagent/norepinephrine)
|
||||
cure_message = "The itching stops..."
|
||||
|
||||
/datum/medical_effect/itch/on_life(mob/living/carbon/human/H, strength)
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
// ========
|
||||
/datum/medical_effect/headache
|
||||
name = "Headache"
|
||||
triggers = list("cryoxadone" = 10, "bicaridine" = 15, "tricordrazine" = 15)
|
||||
cures = list("alkysine", "tramadol", "paracetamol", "oxycodone")
|
||||
triggers = list(/datum/reagent/cryoxadone = 10, /datum/reagent/bicaridine = 15, /datum/reagent/tricordrazine = 15)
|
||||
cures = list(/datum/reagent/alkysine, /datum/reagent/tramadol, /datum/reagent/paracetamol, /datum/reagent/oxycodone)
|
||||
cure_message = "Your head stops throbbing..."
|
||||
|
||||
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
|
||||
@@ -99,8 +99,8 @@
|
||||
// ===========
|
||||
/datum/medical_effect/bad_stomach
|
||||
name = "Bad Stomach"
|
||||
triggers = list("kelotane" = 30, "dermaline" = 15)
|
||||
cures = list("dylovene")
|
||||
triggers = list(/datum/reagent/kelotane = 30, /datum/reagent/dermaline = 15)
|
||||
cures = list(/datum/reagent/dylovene)
|
||||
cure_message = "Your stomach feels a little better now..."
|
||||
|
||||
/datum/medical_effect/bad_stomach/on_life(mob/living/carbon/human/H, strength)
|
||||
@@ -116,8 +116,8 @@
|
||||
// ======
|
||||
/datum/medical_effect/cramps
|
||||
name = "Cramps"
|
||||
triggers = list("dylovene" = 30, "tramadol" = 15)
|
||||
cures = list("norepinephrine")
|
||||
triggers = list(/datum/reagent/dylovene = 30, /datum/reagent/tramadol = 15)
|
||||
cures = list(/datum/reagent/norepinephrine)
|
||||
cure_message = "The cramps let up..."
|
||||
|
||||
/datum/medical_effect/cramps/on_life(mob/living/carbon/human/H, strength)
|
||||
@@ -134,8 +134,8 @@
|
||||
// ====
|
||||
/datum/medical_effect/itch
|
||||
name = "Itch"
|
||||
triggers = list("space_drugs" = 10)
|
||||
cures = list("norepinephrine")
|
||||
triggers = list(/datum/reagent/space_drugs = 10)
|
||||
cures = list(/datum/reagent/norepinephrine)
|
||||
cure_message = "The itching stops..."
|
||||
|
||||
/datum/medical_effect/itch/on_life(mob/living/carbon/human/H, strength)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/setup_gestalt()
|
||||
composition_reagent = "nutriment"//Dionae are plants, so eating them doesn't give animal protein
|
||||
composition_reagent = /datum/reagent/nutriment //Dionae are plants, so eating them doesn't give animal protein
|
||||
setup_dionastats()
|
||||
verbs += /mob/living/carbon/human/proc/check_light
|
||||
verbs += /mob/living/carbon/human/proc/diona_split_nymph
|
||||
|
||||
@@ -1232,7 +1232,7 @@
|
||||
/mob/living/carbon/human/revive(reset_to_roundstart = TRUE)
|
||||
|
||||
if(species && !(species.flags & NO_BLOOD))
|
||||
vessel.add_reagent("blood",560-vessel.total_volume)
|
||||
vessel.add_reagent(/datum/reagent/blood,560-vessel.total_volume)
|
||||
fixblood()
|
||||
|
||||
// Fix up all organs.
|
||||
@@ -1471,7 +1471,7 @@
|
||||
spawn(0)
|
||||
regenerate_icons()
|
||||
if (vessel)
|
||||
vessel.add_reagent("blood",560-vessel.total_volume)
|
||||
vessel.add_reagent(/datum/reagent/blood,560-vessel.total_volume)
|
||||
fixblood()
|
||||
|
||||
// Rebuild the HUD. If they aren't logged in then login() should reinstantiate it for them.
|
||||
@@ -1966,7 +1966,7 @@
|
||||
|
||||
/mob/living/carbon/human/proc/make_adrenaline(var/amount)
|
||||
if(stat == CONSCIOUS)
|
||||
reagents.add_reagent("adrenaline", amount)
|
||||
reagents.add_reagent(/datum/reagent/adrenaline, amount)
|
||||
|
||||
/mob/living/carbon/human/proc/gigashatter()
|
||||
for(var/obj/item/organ/external/E in organs)
|
||||
|
||||
@@ -355,8 +355,8 @@ This function restores the subjects blood to max.
|
||||
*/
|
||||
/mob/living/carbon/human/proc/restore_blood()
|
||||
if(!(species.flags & NO_BLOOD))
|
||||
var/total_blood = vessel.get_reagent_amount("blood")
|
||||
vessel.add_reagent("blood",560.0-total_blood)
|
||||
var/total_blood = vessel.get_reagent_amount(/datum/reagent/blood)
|
||||
vessel.add_reagent(/datum/reagent/blood,560.0-total_blood)
|
||||
|
||||
|
||||
/*
|
||||
@@ -457,4 +457,4 @@ This function restores all organs.
|
||||
|
||||
/mob/living/carbon/human/remove_blood_simple(var/blood)
|
||||
if(should_have_organ(BP_HEART))
|
||||
vessel.remove_reagent("blood", blood)
|
||||
vessel.remove_reagent(/datum/reagent/blood, blood)
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
O.set_dna(dna)
|
||||
|
||||
/mob/living/carbon/human/proc/get_blood_alcohol()
|
||||
return round(intoxication/max(vessel.get_reagent_amount("blood"),1),0.01)
|
||||
return round(intoxication/max(vessel.get_reagent_amount(/datum/reagent/blood),1),0.01)
|
||||
|
||||
/mob/living/proc/is_asystole()
|
||||
return FALSE
|
||||
|
||||
@@ -850,7 +850,7 @@ mob/living/carbon/human/proc/change_monitor()
|
||||
D.create_reagents(200)
|
||||
if(!src)
|
||||
return
|
||||
D.reagents.add_reagent("greekfire", 200)
|
||||
D.reagents.add_reagent(/datum/reagent/fuel/napalm, 200)
|
||||
D.set_color()
|
||||
D.set_up(my_target, rand(6,8), 1, 50)
|
||||
return
|
||||
@@ -895,7 +895,7 @@ mob/living/carbon/human/proc/change_monitor()
|
||||
adjustBruteLoss(-10*O.amount)
|
||||
adjustFireLoss(-10*O.amount)
|
||||
if(!(species.flags & NO_BLOOD))
|
||||
vessel.add_reagent("blood",20*O.amount)
|
||||
vessel.add_reagent(/datum/reagent/blood,20*O.amount)
|
||||
qdel(O)
|
||||
last_special = world.time + 50
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
sleeping = max(sleeping, 6 SECONDS)
|
||||
adjustBrainLoss(1,5)
|
||||
|
||||
if (bac > INTOX_DEATH*SR && !src.reagents.has_reagent("ethylredoxrazine")) //Death usually occurs here
|
||||
if (bac > INTOX_DEATH*SR && !src.reagents.has_reagent(/datum/reagent/ethylredoxrazine)) //Death usually occurs here
|
||||
add_chemical_effect(CE_HEPATOTOXIC, 10)
|
||||
adjustOxyLoss(3,100)
|
||||
adjustBrainLoss(1,50)
|
||||
|
||||
@@ -614,7 +614,7 @@
|
||||
return FALSE
|
||||
|
||||
/datum/species/proc/get_digestion_product()
|
||||
return "nutriment"
|
||||
return /datum/reagent/nutriment
|
||||
|
||||
/datum/species/proc/can_commune()
|
||||
return FALSE
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
infection_chance -= armor
|
||||
if(prob(infection_chance))
|
||||
if(target.reagents)
|
||||
target.reagents.add_reagent("trioxin", 10)
|
||||
target.reagents.add_reagent(/datum/reagent/toxin/trioxin, 10)
|
||||
|
||||
|
||||
/datum/unarmed_attack/golem
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
var/obj/item/organ/internal/stomach/S = H.internal_organs_by_name[BP_STOMACH]
|
||||
if(S)
|
||||
for(var/datum/reagent/R in S.ingested.reagent_list)
|
||||
if(R.id == "rmt")
|
||||
if(R.type == /datum/reagent/rmt)
|
||||
return 0
|
||||
|
||||
return 4
|
||||
@@ -85,7 +85,7 @@
|
||||
var/obj/item/organ/internal/stomach/S = H.internal_organs_by_name[BP_STOMACH]
|
||||
if(S)
|
||||
for(var/datum/reagent/R in S.ingested.reagent_list)
|
||||
if(R.id == "rmt")
|
||||
if(R.type == /datum/reagent/rmt)
|
||||
return
|
||||
|
||||
var/pain_message = pick("You feel sluggish as if something is weighing you down.",
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/obj/item/slime_extract/Initialize()
|
||||
..()
|
||||
create_reagents(100)
|
||||
reagents.add_reagent("slimejelly", 30)
|
||||
reagents.add_reagent(/datum/reagent/slimejelly, 30)
|
||||
|
||||
/obj/item/slime_extract/grey
|
||||
name = "grey slime extract"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/is_adult = 0
|
||||
speak_emote = list("chirps")
|
||||
mob_size = 4
|
||||
composition_reagent = "slimejelly"
|
||||
composition_reagent = /datum/reagent/slimejelly
|
||||
layer = 5
|
||||
maxHealth = 150
|
||||
health = 150
|
||||
@@ -157,9 +157,9 @@
|
||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
||||
|
||||
if(reagents)
|
||||
if(reagents.has_reagent("hyperzine")) // Hyperzine slows slimes down
|
||||
if(reagents.has_reagent(/datum/reagent/hyperzine)) // Hyperzine slows slimes down
|
||||
tally *= 2
|
||||
if(reagents.has_reagent("frostoil")) // Frostoil also makes them move VEEERRYYYYY slow
|
||||
if(reagents.has_reagent(/datum/reagent/frostoil)) // Frostoil also makes them move VEEERRYYYYY slow
|
||||
tally *= 5
|
||||
|
||||
if(health <= 0) // if damaged, the slime moves twice as slow
|
||||
|
||||
@@ -35,7 +35,7 @@ calculate text size per text.
|
||||
for(var/datum/reagent/R in reagent_list)
|
||||
if(!R.taste_mult)
|
||||
continue
|
||||
if(R.id == "nutriment" || R.id == "synnutriment") //this is ugly but apparently only nutriment (not subtypes) has taste data TODO figure out why
|
||||
if(istype(R, /datum/reagent/nutriment))
|
||||
var/list/taste_data = R.get_data()
|
||||
for(var/taste in taste_data)
|
||||
if(taste in tastes)
|
||||
@@ -44,7 +44,7 @@ calculate text size per text.
|
||||
tastes[taste] = taste_data[taste]
|
||||
else
|
||||
var/taste_desc = R.taste_description
|
||||
var/taste_amount = get_reagent_amount(R.id) * R.taste_mult
|
||||
var/taste_amount = get_reagent_amount(R.type) * R.taste_mult
|
||||
if(R.taste_description in tastes)
|
||||
tastes[taste_desc] += taste_amount
|
||||
else
|
||||
@@ -99,4 +99,4 @@ calculate text size per text.
|
||||
return "[temp_text][temp_text ? " " : ""][english_list(out, "something indescribable")]."
|
||||
|
||||
/mob/living/carbon/proc/get_fullness()
|
||||
return nutrition + (reagents.get_reagent_amount("nutriment") * 25)
|
||||
return nutrition + (reagents.get_reagent_amount(/datum/reagent/nutriment) * 25)
|
||||
|
||||
@@ -629,9 +629,9 @@ default behaviour is:
|
||||
location.add_blood(M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/total_blood = round(H.vessel.get_reagent_amount("blood"))
|
||||
var/total_blood = round(H.vessel.get_reagent_amount(/datum/reagent/blood))
|
||||
if(total_blood > 0)
|
||||
H.vessel.remove_reagent("blood", 1)
|
||||
H.vessel.remove_reagent(/datum/reagent/blood, 1)
|
||||
|
||||
|
||||
step(pulling, get_dir(pulling.loc, T))
|
||||
@@ -897,9 +897,9 @@ default behaviour is:
|
||||
if (!composition_reagent)//if no reagent has been set, then we'll set one
|
||||
var/type = find_type(src)
|
||||
if (type & TYPE_SYNTHETIC)
|
||||
src.composition_reagent = "iron"
|
||||
src.composition_reagent = /datum/reagent/iron
|
||||
else
|
||||
src.composition_reagent = "protein"
|
||||
src.composition_reagent = /datum/reagent/nutriment/protein
|
||||
|
||||
//if the mob is a simple animal with a defined meat quantity
|
||||
if (istype(src, /mob/living/simple_animal))
|
||||
|
||||
@@ -77,7 +77,7 @@ var/controlling
|
||||
meme_points = min(meme_points + gain, MAXIMUM_MEME_POINTS)
|
||||
|
||||
// if there are sleep toxins in the host's body, that's bad
|
||||
if(host.reagents.has_reagent("stoxin"))
|
||||
if(host.reagents.has_reagent(/datum/reagent/soporific))
|
||||
to_chat(src, "<span class='danger'>Something in your host's blood makes you lose consciousness, you fade away...</span>")
|
||||
src.death()
|
||||
return
|
||||
|
||||
@@ -115,9 +115,9 @@ var/global/list/robot_modules = list(
|
||||
F.icon_state = "flash"
|
||||
else if(F.times_used)
|
||||
F.times_used--
|
||||
if(E)
|
||||
if(E.reagents.total_volume < E.reagents.maximum_volume)
|
||||
E.reagents.add_reagent("monoammoniumphosphate", E.max_water * 0.2)
|
||||
|
||||
if(E?.reagents.total_volume < E.reagents.maximum_volume)
|
||||
E.reagents.add_reagent(/datum/reagent/toxin/fertilizer/monoammoniumphosphate, E.max_water * 0.2)
|
||||
|
||||
if(!synths.len)
|
||||
return
|
||||
@@ -225,7 +225,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/device/flash(src) // Non-lethal tool that prevents any 'borg from going lethal on Crew so long as it's an option according to laws.
|
||||
src.modules += new /obj/item/crowbar/robotic(src) // Base crowbar that all 'borgs should have access to.
|
||||
src.emag = new /obj/item/reagent_containers/hypospray/cmo(src)
|
||||
src.emag.reagents.add_reagent("wulumunusha", 30)
|
||||
src.emag.reagents.add_reagent(/datum/reagent/wulumunusha, 30)
|
||||
src.emag.name = "Wulumunusha Hypospray"
|
||||
|
||||
var/datum/matter_synth/medicine = new /datum/matter_synth/medicine(10000)
|
||||
@@ -251,7 +251,7 @@ var/global/list/robot_modules = list(
|
||||
S.update_icon()
|
||||
if(src.emag)
|
||||
var/obj/item/reagent_containers/hypospray/cmo/PS = src.emag
|
||||
PS.reagents.add_reagent("wulumunusha", 2 * amount)
|
||||
PS.reagents.add_reagent(/datum/reagent/wulumunusha, 2 * amount)
|
||||
..()
|
||||
|
||||
/obj/item/robot_module/medical/rescue
|
||||
@@ -291,7 +291,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/device/flash(src) // Non-lethal tool that prevents any 'borg from going lethal on Crew so long as it's an option according to laws.
|
||||
src.modules += new /obj/item/crowbar/robotic(src) // Base crowbar that all 'borgs should have access to.
|
||||
src.emag = new /obj/item/reagent_containers/hypospray/cmo(src)
|
||||
src.emag.reagents.add_reagent("wulumunusha", 30)
|
||||
src.emag.reagents.add_reagent(/datum/reagent/wulumunusha, 30)
|
||||
src.emag.name = "Wulumunusha Hypospray"
|
||||
|
||||
var/datum/matter_synth/medicine = new /datum/matter_synth/medicine(15000)
|
||||
@@ -322,7 +322,7 @@ var/global/list/robot_modules = list(
|
||||
S.update_icon()
|
||||
if(src.emag)
|
||||
var/obj/item/reagent_containers/spray/PS = src.emag
|
||||
PS.reagents.add_reagent("wulumunusha", 2 * amount)
|
||||
PS.reagents.add_reagent(/datum/reagent/wulumunusha, 2 * amount)
|
||||
..()
|
||||
|
||||
/obj/item/robot_module/engineering
|
||||
@@ -542,7 +542,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/device/flash(src) // Non-lethal tool that prevents any 'borg from going lethal on Crew so long as it's an option according to laws.
|
||||
src.modules += new /obj/item/crowbar/robotic(src) // Base crowbar that all 'borgs should have access to.
|
||||
src.emag = new /obj/item/reagent_containers/spray(src)
|
||||
src.emag.reagents.add_reagent("lube", 250)
|
||||
src.emag.reagents.add_reagent(/datum/reagent/lube, 250)
|
||||
src.emag.name = "Lube spray"
|
||||
|
||||
/obj/item/robot_module/janitor/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
|
||||
@@ -551,7 +551,7 @@ var/global/list/robot_modules = list(
|
||||
LR.Charge(R, amount)
|
||||
if(src.emag)
|
||||
var/obj/item/reagent_containers/spray/S = src.emag
|
||||
S.reagents.add_reagent("lube", 2 * amount)
|
||||
S.reagents.add_reagent(/datum/reagent/lube, 2 * amount)
|
||||
|
||||
/obj/item/robot_module/clerical
|
||||
name = "service robot module"
|
||||
@@ -627,7 +627,7 @@ var/global/list/robot_modules = list(
|
||||
var/datum/reagents/R = new /datum/reagents(50)
|
||||
src.emag.reagents = R
|
||||
R.my_atom = src.emag
|
||||
R.add_reagent("beer2", 50)
|
||||
R.add_reagent(/datum/reagent/chloralhydrate/beer2, 50)
|
||||
src.emag.name = "Mickey Finn's Special Brew"
|
||||
|
||||
/obj/item/robot_module/clerical/general
|
||||
|
||||
@@ -205,14 +205,15 @@
|
||||
to_chat(src, SPAN_WARNING("You don't have enough chemicals!"))
|
||||
return
|
||||
|
||||
var/chem = input("Select a chemical to secrete.", "Chemicals") as null|anything in list("Norepinephrine", "Bicaridine", "Kelotane", "Dylovene", "Hyperzine", "Peridaxon", "Tramadol", "Fluvoxamine")
|
||||
var/list/choices = list("Norepinephrine" = /datum/reagent/norepinephrine, "Bicaridine" = /datum/reagent/norepinephrine, "Kelotane" = /datum/reagent/norepinephrine, "Dylovene" = /datum/reagent/dylovene, "Hyperzine" = /datum/reagent/hyperzine, "Peridaxon" = /datum/reagent/peridaxon, "Tramadol" = /datum/reagent/tramadol, "Fluvoxamine" = /datum/reagent/mental/fluvoxamine)
|
||||
var/chem = input("Select a chemical to secrete.", "Chemicals") as null|anything in choices
|
||||
|
||||
if(!chem || chemicals < 20 || !host || controlling || !src || stat) //Sanity check.
|
||||
return
|
||||
|
||||
to_chat(src, SPAN_NOTICE("You squirt a measure of [chem] from your reservoirs into [host]'s bloodstream."))
|
||||
to_chat(host, SPAN_WARNING("You feel cold fluid enter your bloodstream."))
|
||||
host.reagents.add_reagent(lowertext(chem), 5)
|
||||
host.reagents.add_reagent(choices[chem], 5)
|
||||
chemicals -= 20
|
||||
|
||||
/mob/living/simple_animal/borer/verb/dominate_victim()
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
canbrush = TRUE
|
||||
has_udder = TRUE
|
||||
milk_type = "fatshouter_milk"
|
||||
milk_type = /datum/reagent/drink/milk/adhomai
|
||||
|
||||
meat_type = /obj/item/reagent_containers/food/snacks/meat/adhomai
|
||||
butchering_products = list(/obj/item/stack/material/animalhide = 5)
|
||||
@@ -123,7 +123,7 @@
|
||||
health = 50
|
||||
|
||||
has_udder = TRUE
|
||||
milk_type = "milk"
|
||||
milk_type = /datum/reagent/drink/milk
|
||||
|
||||
meat_type = /obj/item/reagent_containers/food/snacks/meat/chicken
|
||||
butchering_products = list(/obj/item/reagent_containers/food/snacks/spreads/lard = 5)
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
mob_size = 15
|
||||
|
||||
has_udder = TRUE
|
||||
milk_type = "beetle_milk"
|
||||
milk_type = /datum/reagent/drink/milk/beetle
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
emote_see = list("jiggles", "bounces in place")
|
||||
var/colour = "grey"
|
||||
mob_size = 3
|
||||
composition_reagent = "slimejelly"
|
||||
composition_reagent = /datum/reagent/slimejelly
|
||||
|
||||
/mob/living/simple_animal/slime/can_force_feed(var/feeder, var/food, var/feedback)
|
||||
if(feedback)
|
||||
@@ -36,7 +36,7 @@
|
||||
emote_see = list("jiggles", "bounces in place")
|
||||
var/colour = "grey"
|
||||
mob_size = 6
|
||||
composition_reagent = "slimejelly"
|
||||
composition_reagent = /datum/reagent/slimejelly
|
||||
|
||||
/mob/living/simple_animal/adultslime/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
heat_damage_per_tick = 20
|
||||
cold_damage_per_tick = 20
|
||||
var/poison_per_bite = 5
|
||||
var/poison_type = "toxin"
|
||||
var/poison_type = /datum/reagent/toxin
|
||||
faction = "spiders"
|
||||
var/busy = 0
|
||||
pass_flags = PASSTABLE
|
||||
@@ -51,7 +51,7 @@
|
||||
melee_damage_upper = 10
|
||||
poison_per_bite = 10
|
||||
var/atom/cocoon_target
|
||||
poison_type = "stoxin"
|
||||
poison_type = /datum/reagent/soporific
|
||||
var/fed = 0
|
||||
|
||||
//hunters have the most poison and move the fastest, so they can find prey
|
||||
@@ -76,7 +76,7 @@
|
||||
if(isliving(.))
|
||||
var/mob/living/L = .
|
||||
if(L.reagents)
|
||||
L.reagents.add_reagent("toxin", poison_per_bite)
|
||||
L.reagents.add_reagent(/datum/reagent/toxin, poison_per_bite)
|
||||
if(prob(poison_per_bite) && (!issilicon(L) && !isipc(L)))
|
||||
to_chat(L, "<span class='warning'>You feel a tiny prick.</span>")
|
||||
L.reagents.add_reagent(poison_type, 5)
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
if(istype(A, /mob/living))
|
||||
var/mob/living/L = A
|
||||
if(L.reagents)
|
||||
var/madhouse = pick("psilocybin","mindbreaker","impedrezene","cryptobiolin","stoxin","mutagen")
|
||||
var/madhouse = pick(/datum/reagent/psilocybin,/datum/reagent/mindbreaker,/datum/reagent/impedrezene,/datum/reagent/cryptobiolin,/datum/reagent/soporific,/datum/reagent/mutagen)
|
||||
var/madhouse_verbal_component = pick(thoughts)
|
||||
L.reagents.add_reagent("[madhouse]", 3)
|
||||
to_chat(L, "<span class='alium'><b><i>[madhouse_verbal_component]</i></b></span>")
|
||||
|
||||
@@ -359,4 +359,4 @@
|
||||
/obj/item/ectoplasm/bs/Initialize()
|
||||
. = ..()
|
||||
create_reagents(8)
|
||||
reagents.add_reagent("bluespace_dust", 8)
|
||||
reagents.add_reagent(/datum/reagent/bluespace_dust, 8)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
var/has_udder = FALSE
|
||||
var/datum/reagents/udder = null
|
||||
var/milk_type = "milk"
|
||||
var/milk_type = /datum/reagent/drink/milk
|
||||
|
||||
var/list/butchering_products //if anything else is created when butchering this creature, like bones and leather
|
||||
|
||||
@@ -433,7 +433,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
to_chat(user, "<span class='warning'>The [O] is full.</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] milks [src] using \the [O].</span>")
|
||||
udder.trans_id_to(G, milk_type , rand(5,10))
|
||||
udder.trans_type_to(G, milk_type , rand(5,10))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/reagent_containers) || istype(O, /obj/item/stack/medical) || istype(O,/obj/item/gripper/))
|
||||
@@ -731,7 +731,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
adjustFireLoss(rand(3, 5))
|
||||
|
||||
/mob/living/simple_animal/get_digestion_product()
|
||||
return "nutriment"
|
||||
return /datum/reagent/nutriment
|
||||
|
||||
/mob/living/simple_animal/bullet_impact_visuals(var/obj/item/projectile/P, var/def_zone, var/damage)
|
||||
..()
|
||||
|
||||
@@ -1033,9 +1033,9 @@ proc/is_blind(A)
|
||||
//We create an MD5 hash of the mob's reference to use as its DNA string.
|
||||
//This creates unique DNA for each creature in a consistently repeatable process
|
||||
var/datum/reagents/vessel = new/datum/reagents(600)
|
||||
vessel.add_reagent("blood",560)
|
||||
vessel.add_reagent(/datum/reagent/blood,560)
|
||||
for(var/datum/reagent/blood/B in vessel.reagent_list)
|
||||
if(B.id == "blood")
|
||||
if(B.type == /datum/reagent/blood)
|
||||
B.data = list(
|
||||
"donor" = WEAKREF(src),
|
||||
"species" = name,
|
||||
|
||||
Reference in New Issue
Block a user