everything but mob stuff
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
cached_reagents = null
|
||||
if(my_atom && my_atom.reagents == src)
|
||||
my_atom.reagents = null
|
||||
|
||||
my_atom = null
|
||||
|
||||
// Used in attack logs for reagents in pills and such
|
||||
/datum/reagents/proc/log_list()
|
||||
|
||||
@@ -144,9 +144,9 @@
|
||||
|
||||
data["isPillBottleLoaded"] = bottle ? 1 : 0
|
||||
if(bottle)
|
||||
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
|
||||
data["pillBotContent"] = bottle.contents.len
|
||||
data["pillBotMaxContent"] = bottle.storage_slots
|
||||
|
||||
data["pillBotMaxContent"] = STRB.max_items
|
||||
|
||||
var/beakerContents[0]
|
||||
if(beaker)
|
||||
@@ -160,7 +160,6 @@
|
||||
bufferContents.Add(list(list("name" = N.name, "id" = N.id, "volume" = N.volume))) // ^
|
||||
data["bufferContents"] = bufferContents
|
||||
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/chem_master/ui_act(action, params)
|
||||
@@ -222,12 +221,18 @@
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
var/obj/item/reagent_containers/pill/P
|
||||
var/target_loc = drop_location()
|
||||
var/drop_threshold = INFINITY
|
||||
if(bottle)
|
||||
GET_COMPONENT_FROM(STRB, /datum/component/storage, bottle)
|
||||
if(STRB)
|
||||
drop_threshold = STRB.max_items - bottle.contents.len
|
||||
|
||||
for(var/i = 0; i < amount; i++)
|
||||
if(bottle && bottle.contents.len < bottle.storage_slots)
|
||||
P = new/obj/item/reagent_containers/pill(bottle)
|
||||
if(i < drop_threshold)
|
||||
P = new(target_loc)
|
||||
else
|
||||
P = new/obj/item/reagent_containers/pill(drop_location())
|
||||
P = new(drop_location())
|
||||
P.name = trim("[name] pill")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P,vol_each)
|
||||
@@ -303,7 +308,7 @@
|
||||
reagents.trans_to(P, vol_part)
|
||||
. = TRUE
|
||||
//CITADEL ADD Hypospray Vials
|
||||
if("createvial")
|
||||
if("createVial")
|
||||
var/many = params["many"]
|
||||
if(reagents.total_volume == 0)
|
||||
return
|
||||
@@ -314,21 +319,21 @@
|
||||
amount_full = round(reagents.total_volume / 30)
|
||||
vol_part = reagents.total_volume % 30
|
||||
var/name = stripped_input(usr, "Name:","Name your hypovial!", (reagents.total_volume ? reagents.get_master_reagent_name() : " "), MAX_NAME_LEN)
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, BE_CLOSE))
|
||||
if(!name || !reagents.total_volume || !src || QDELETED(src) || !usr.canUseTopic(src, !issilicon(usr)))
|
||||
return
|
||||
|
||||
var/obj/item/reagent_containers/glass/bottle/vial/small/V
|
||||
var/obj/item/reagent_containers/glass/bottle/vial/small/P
|
||||
for(var/i = 0; i < amount_full; i++)
|
||||
V = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
|
||||
V.name = trim("[name] hypovial")
|
||||
adjust_item_drop_location(V)
|
||||
reagents.trans_to(V, 30)
|
||||
P = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
|
||||
P.name = trim("[name] hypovial")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, 30)
|
||||
|
||||
if(vol_part)
|
||||
V = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
|
||||
V.name = trim("[name] hypovial")
|
||||
adjust_item_drop_location(V)
|
||||
reagents.trans_to(V, vol_part)
|
||||
P = new/obj/item/reagent_containers/glass/bottle/vial/small(drop_location())
|
||||
P.name = trim("[name] hypovial")
|
||||
adjust_item_drop_location(P)
|
||||
reagents.trans_to(P, vol_part)
|
||||
. = TRUE
|
||||
//END CITADEL ADDITIONS
|
||||
if("analyze")
|
||||
|
||||
@@ -101,16 +101,14 @@
|
||||
|
||||
//Fill machine with a bag!
|
||||
if(istype(I, /obj/item/storage/bag))
|
||||
var/obj/item/storage/bag/B = I
|
||||
for (var/obj/item/reagent_containers/food/snacks/grown/G in B.contents)
|
||||
B.remove_from_storage(G, src)
|
||||
holdingitems[G] = TRUE
|
||||
if(length(holdingitems) >= limit) //Sanity checking so the blender doesn't overfill
|
||||
var/list/inserted = list()
|
||||
if(I.SendSignal(COMSIG_TRY_STORAGE_TAKE_TYPE, /obj/item/reagent_containers/food/snacks/grown, src, limit - length(holdingitems), null, null, user, inserted))
|
||||
for(var/i in inserted)
|
||||
holdingitems[i] = TRUE
|
||||
if(!I.contents.len)
|
||||
to_chat(user, "<span class='notice'>You empty [I] into [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You fill [src] to the brim.</span>")
|
||||
break
|
||||
|
||||
if(!I.contents.len)
|
||||
to_chat(user, "<span class='notice'>You empty [I] into [src].</span>")
|
||||
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
#define SOLID 1
|
||||
#define LIQUID 2
|
||||
#define GAS 3
|
||||
|
||||
#define REM REAGENTS_EFFECT_MULTIPLIER
|
||||
|
||||
//Various reagents
|
||||
|
||||
@@ -615,6 +615,7 @@
|
||||
to_chat(M, "<span class = 'warning'>Your eyes sting!</span>")
|
||||
M.blind_eyes(2)
|
||||
|
||||
|
||||
/datum/reagent/consumable/nutriment/stabilized
|
||||
name = "Stabilized Nutriment"
|
||||
id = "stabilizednutriment"
|
||||
@@ -627,7 +628,7 @@
|
||||
if(M.nutrition > NUTRITION_LEVEL_FULL - 25)
|
||||
M.nutrition -= 3*nutriment_factor
|
||||
..()
|
||||
|
||||
|
||||
////Lavaland Flora Reagents////
|
||||
|
||||
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
..()
|
||||
if(!istype(H))
|
||||
return
|
||||
if(!H.dna || !H.dna.species || !(H.dna.species.species_traits & SPECIES_ORGANIC))
|
||||
if(!H.dna || !H.dna.species || !(MOB_ORGANIC in H.mob_biotypes))
|
||||
return
|
||||
|
||||
if(isjellyperson(H))
|
||||
@@ -1472,7 +1472,7 @@
|
||||
/datum/reagent/carpet/reaction_turf(turf/T, reac_volume)
|
||||
if(isplatingturf(T) || istype(T, /turf/open/floor/plasteel))
|
||||
var/turf/open/floor/F = T
|
||||
F.ChangeTurf(/turf/open/floor/carpet)
|
||||
F.PlaceOnTop(/turf/open/floor/carpet)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -1817,12 +1817,6 @@
|
||||
L.remove_trait(TRAIT_PACIFISM, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/pax/borg
|
||||
name = "synth-pax"
|
||||
id = "synthpax"
|
||||
description = "A colorless liquid that suppresses violence on the subjects. Cheaper to synthetize, but wears out faster than normal Pax."
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/bz_metabolites
|
||||
name = "BZ metabolites"
|
||||
id = "bz_metabolites"
|
||||
@@ -1845,3 +1839,40 @@
|
||||
if(changeling)
|
||||
changeling.chem_charges = max(changeling.chem_charges-2, 0)
|
||||
return ..()
|
||||
|
||||
/datum/reagent/pax/peaceborg
|
||||
name = "synth-pax"
|
||||
id = "synthpax"
|
||||
description = "A colorless liquid that suppresses violence on the subjects. Cheaper to synthetize, but wears out faster than normal Pax."
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/peaceborg/confuse
|
||||
name = "Dizzying Solution"
|
||||
id = "dizzysolution"
|
||||
description = "Makes the target off balance and dizzy"
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "dizziness"
|
||||
|
||||
/datum/reagent/peaceborg/confuse/on_mob_life(mob/living/M)
|
||||
if(M.confused < 6)
|
||||
M.confused = CLAMP(M.confused + 3, 0, 5)
|
||||
if(M.dizziness < 6)
|
||||
M.dizziness = CLAMP(M.dizziness + 3, 0, 5)
|
||||
if(prob(20))
|
||||
to_chat(M, "You feel confused and disorientated.")
|
||||
..()
|
||||
|
||||
/datum/reagent/peaceborg/tire
|
||||
name = "Tiring Solution"
|
||||
id = "tiresolution"
|
||||
description = "An extremely weak stamina-toxin that tires out the target. Completely harmless."
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "tiredness"
|
||||
|
||||
/datum/reagent/peaceborg/tire/on_mob_life(mob/living/M)
|
||||
var/healthcomp = (100 - M.health) //DOES NOT ACCOUNT FOR ADMINBUS THINGS THAT MAKE YOU HAVE MORE THAN 200/210 HEALTH, OR SOMETHING OTHER THAN A HUMAN PROCESSING THIS.
|
||||
if(M.getStaminaLoss() < (45 - healthcomp)) //At 50 health you would have 200 - 150 health meaning 50 compensation. 60 - 50 = 10, so would only do 10-19 stamina.)
|
||||
M.adjustStaminaLoss(10)
|
||||
if(prob(30))
|
||||
to_chat(M, "You should sit down and take a rest...")
|
||||
..()
|
||||
|
||||
@@ -231,12 +231,10 @@
|
||||
toxpwr = 1
|
||||
|
||||
/datum/reagent/toxin/pestkiller/reaction_mob(mob/living/M, method=TOUCH, reac_volume)
|
||||
if(method == VAPOR)
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(!C.wear_mask) // If not wearing a mask
|
||||
var/damage = min(round(0.4*reac_volume, 0.1),10)
|
||||
C.adjustToxLoss(damage)
|
||||
..()
|
||||
if(MOB_BUG in M.mob_biotypes)
|
||||
var/damage = min(round(0.4*reac_volume, 0.1),10)
|
||||
M.adjustToxLoss(damage)
|
||||
|
||||
/datum/reagent/toxin/spore
|
||||
name = "Spore Toxin"
|
||||
@@ -847,39 +845,6 @@
|
||||
. = 1
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/peaceborg/confuse
|
||||
name = "Dizzying Solution"
|
||||
id = "dizzysolution"
|
||||
description = "Makes the target off balance and dizzy"
|
||||
toxpwr = 0
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "dizziness"
|
||||
|
||||
/datum/reagent/toxin/peaceborg/confuse/on_mob_life(mob/living/M)
|
||||
if(M.confused < 6)
|
||||
M.confused = CLAMP(M.confused + 3, 0, 5)
|
||||
if(M.dizziness < 6)
|
||||
M.dizziness = CLAMP(M.dizziness + 3, 0, 5)
|
||||
if(prob(20))
|
||||
to_chat(M, "You feel confused and disorientated.")
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/peaceborg/tire
|
||||
name = "Tiring Solution"
|
||||
id = "tiresolution"
|
||||
description = "An extremely weak stamina-toxin that tires out the target. Completely harmless."
|
||||
toxpwr = 0
|
||||
metabolization_rate = 1.5 * REAGENTS_METABOLISM
|
||||
taste_description = "tiredness"
|
||||
|
||||
/datum/reagent/toxin/peaceborg/tire/on_mob_life(mob/living/M)
|
||||
var/healthcomp = (100 - M.health) //DOES NOT ACCOUNT FOR ADMINBUS THINGS THAT MAKE YOU HAVE MORE THAN 200/210 HEALTH, OR SOMETHING OTHER THAN A HUMAN PROCESSING THIS.
|
||||
if(M.getStaminaLoss() < (45 - healthcomp)) //At 50 health you would have 200 - 150 health meaning 50 compensation. 60 - 50 = 10, so would only do 10-19 stamina.)
|
||||
M.adjustStaminaLoss(10)
|
||||
if(prob(30))
|
||||
to_chat(M, "You should sit down and take a rest...")
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/delayed
|
||||
name = "Toxin Microcapsules"
|
||||
id = "delayed_toxin"
|
||||
|
||||
@@ -67,6 +67,21 @@ Borg Hypospray
|
||||
|
||||
modes[reagent] = modes.len + 1
|
||||
|
||||
/obj/item/reagent_containers/borghypo/proc/del_reagent(reagent)
|
||||
reagent_ids -= reagent
|
||||
var/datum/reagents/RG
|
||||
var/datum/reagents/TRG
|
||||
for(var/i in 1 to reagent_ids.len)
|
||||
TRG = reagent_list[i]
|
||||
if (TRG.has_reagent(reagent))
|
||||
RG = TRG
|
||||
break
|
||||
if (RG)
|
||||
reagent_list -= RG
|
||||
RG.del_reagent(reagent)
|
||||
|
||||
modes[reagent] = modes.len - 1
|
||||
|
||||
/obj/item/reagent_containers/borghypo/proc/regenerate_reagents()
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
|
||||
Reference in New Issue
Block a user