mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-28 23:58:31 +01:00
Universal Anomalies (#7914)
* Xenoarch * Map, cleanup. * Convert to DCS. * Attack hand, clean up. * Allows some xenoarch item-finds to become anomalous. * Reagents now actually trigger effects correctly. * Anomaly Containers. * Tweaks and Runtime Fixes. * Adds visual effects to anomalies. * Generalizes anomaly creation. "become_anomalous()" * Modify as per comments. Cleans commented reference code.
This commit is contained in:
@@ -48,12 +48,15 @@
|
||||
|
||||
// This doesn't apply to skin contact - this is for, e.g. extinguishers and sprays. The difference is that reagent is not directly on the mob's skin - it might just be on their clothing.
|
||||
/datum/reagent/proc/touch_mob(var/mob/M, var/amount)
|
||||
SEND_SIGNAL(M, COMSIG_REAGENTS_TOUCH, src, amount)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/touch_obj(var/obj/O, var/amount) // Acid melting, cleaner cleaning, etc
|
||||
SEND_SIGNAL(O, COMSIG_REAGENTS_TOUCH, src, amount)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/touch_turf(var/turf/T, var/amount) // Cleaner cleaning, lube lubbing, etc, all go here
|
||||
SEND_SIGNAL(T, COMSIG_REAGENTS_TOUCH, src, amount)
|
||||
return
|
||||
|
||||
/datum/reagent/proc/on_mob_life(var/mob/living/carbon/M, var/alien, var/datum/reagents/metabolism/location) // Currently, on_mob_life is called on carbons. Any interaction with non-carbon mobs (lube) will need to be done in touch_mob.
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
/datum/reagent/blood/touch_turf(var/turf/simulated/T)
|
||||
if(!istype(T) || volume < 3)
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
if(!data["donor"] || istype(data["donor"], /mob/living/carbon/human))
|
||||
blood_splatter(T, src, 1)
|
||||
else if(istype(data["donor"], /mob/living/carbon/alien))
|
||||
@@ -161,6 +164,8 @@
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/min_temperature = T0C + 100 // 100C, the boiling point of water
|
||||
|
||||
@@ -182,6 +187,7 @@
|
||||
T.wet_floor(1)
|
||||
|
||||
/datum/reagent/water/touch_obj(var/obj/O, var/amount)
|
||||
..()
|
||||
if(istype(O, /obj/item/weapon/reagent_containers/food/snacks/cube))
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/cube/cube = O
|
||||
if(!cube.wrapped)
|
||||
@@ -190,6 +196,7 @@
|
||||
O.water_act(amount / 5)
|
||||
|
||||
/datum/reagent/water/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
// First, kill slimes.
|
||||
if(istype(L, /mob/living/simple_mob/slime))
|
||||
@@ -243,6 +250,7 @@
|
||||
glass_desc = "Unless you are an industrial tool, this is probably not safe for consumption."
|
||||
|
||||
/datum/reagent/fuel/touch_turf(var/turf/T, var/amount)
|
||||
..()
|
||||
new /obj/effect/decal/cleanable/liquid_fuel(T, amount, FALSE)
|
||||
remove_self(amount)
|
||||
return
|
||||
@@ -252,6 +260,7 @@
|
||||
M.adjustToxLoss(4 * removed)
|
||||
|
||||
/datum/reagent/fuel/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 10) // Splashing people with welding fuel to make them easy to ignite!
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
M.ingested.remove_reagent(R.id, removed * effect)
|
||||
|
||||
/datum/reagent/carbon/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(!istype(T, /turf/space))
|
||||
var/obj/effect/decal/cleanable/dirt/dirtoverlay = locate(/obj/effect/decal/cleanable/dirt, T)
|
||||
if (!dirtoverlay)
|
||||
@@ -94,6 +95,7 @@
|
||||
allergen_factor = 0.5 //simulates mixed drinks containing less of the allergen, as they have only a single actual reagent unlike food
|
||||
|
||||
/datum/reagent/ethanol/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 15)
|
||||
|
||||
@@ -187,6 +189,7 @@
|
||||
M.hallucination = max(M.hallucination, halluci)
|
||||
|
||||
/datum/reagent/ethanol/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/weapon/paper))
|
||||
var/obj/item/weapon/paper/paperaffected = O
|
||||
paperaffected.clearpaper()
|
||||
@@ -330,6 +333,7 @@
|
||||
M.adjustToxLoss(100)
|
||||
|
||||
/datum/reagent/radium/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 3)
|
||||
if(!istype(T, /turf/space))
|
||||
var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T)
|
||||
@@ -414,6 +418,7 @@
|
||||
M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit
|
||||
|
||||
/datum/reagent/acid/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(O.unacidable)
|
||||
return
|
||||
if((istype(O, /obj/item) || istype(O, /obj/effect/plant)) && (volume > meltdose))
|
||||
|
||||
@@ -162,6 +162,8 @@
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
var/hotspot = (locate(/obj/fire) in T)
|
||||
if(hotspot && !istype(T, /turf/space))
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air(T:air:total_moles)
|
||||
@@ -354,6 +356,7 @@
|
||||
allergen_type = ALLERGEN_GRAINS //Flour is made from grain
|
||||
|
||||
/datum/reagent/nutriment/flour/touch_turf(var/turf/simulated/T)
|
||||
..()
|
||||
if(!istype(T, /turf/space))
|
||||
new /obj/effect/decal/cleanable/flour(T)
|
||||
|
||||
@@ -533,6 +536,7 @@
|
||||
glass_desc = "Durian paste. It smells horrific."
|
||||
|
||||
/datum/reagent/nutriment/durian/touch_mob(var/mob/M, var/amount)
|
||||
..()
|
||||
if(iscarbon(M) && !M.isSynthetic())
|
||||
var/message = pick("Oh god, it smells disgusting here.", "What is that stench?", "That's an awful odor.")
|
||||
to_chat(M, "<span class='alien'>[message]</span>")
|
||||
@@ -542,6 +546,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/reagent/nutriment/durian/touch_turf(var/turf/T, var/amount)
|
||||
..()
|
||||
if(istype(T))
|
||||
var/obj/effect/decal/cleanable/chemcoating/C = new /obj/effect/decal/cleanable/chemcoating(T)
|
||||
C.reagents.add_reagent(id, amount)
|
||||
|
||||
@@ -338,6 +338,7 @@
|
||||
M.adjustToxLoss(3 * removed)
|
||||
|
||||
/datum/reagent/tricorlidaze/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/stack/medical/bruise_pack) && round(volume) >= 5)
|
||||
var/obj/item/stack/medical/bruise_pack/C = O
|
||||
var/packname = C.name
|
||||
@@ -1247,6 +1248,7 @@
|
||||
M.add_chemical_effect(CE_PAINKILLER, 20 * M.species.chem_strength_pain) // 5 less than paracetamol.
|
||||
|
||||
/datum/reagent/spacomycaze/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/stack/medical/crude_pack) && round(volume) >= 1)
|
||||
var/obj/item/stack/medical/crude_pack/C = O
|
||||
var/packname = C.name
|
||||
@@ -1283,10 +1285,12 @@
|
||||
M.adjustToxLoss(2 * removed)
|
||||
|
||||
/datum/reagent/sterilizine/touch_obj(var/obj/O)
|
||||
..()
|
||||
O.germ_level -= min(volume*20, O.germ_level)
|
||||
O.was_bloodied = null
|
||||
|
||||
/datum/reagent/sterilizine/touch_turf(var/turf/T)
|
||||
..()
|
||||
T.germ_level -= min(volume*20, T.germ_level)
|
||||
for(var/obj/item/I in T.contents)
|
||||
I.was_bloodied = null
|
||||
@@ -1294,6 +1298,7 @@
|
||||
qdel(B)
|
||||
|
||||
/datum/reagent/sterilizine/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
if(istype(L, /mob/living/simple_mob/slime))
|
||||
var/mob/living/simple_mob/slime/S = L
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
affect_blood(M, alien, removed * 0.6)
|
||||
|
||||
/datum/reagent/modapplying/cryofluid/touch_mob(var/mob/M, var/amount)
|
||||
..()
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
for(var/I = 1 to rand(1, round(amount + 1)))
|
||||
@@ -49,6 +50,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/modapplying/cryofluid/touch_turf(var/turf/T, var/amount)
|
||||
..()
|
||||
if(istype(T, /turf/simulated/floor/water) && prob(amount))
|
||||
T.visible_message("<span class='danger'>\The [T] crackles loudly as the cryogenic fluid causes it to boil away, leaving behind a hard layer of ice.</span>")
|
||||
T.ChangeTurf(/turf/simulated/floor/outdoors/ice, 1, 1, TRUE)
|
||||
|
||||
@@ -114,14 +114,17 @@
|
||||
color_weight = 20
|
||||
|
||||
/datum/reagent/paint/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(istype(T) && !istype(T, /turf/space))
|
||||
T.color = color
|
||||
|
||||
/datum/reagent/paint/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O))
|
||||
O.color = color
|
||||
|
||||
/datum/reagent/paint/touch_mob(var/mob/M)
|
||||
..()
|
||||
if(istype(M) && !istype(M, /mob/observer)) //painting ghosts: not allowed
|
||||
M.color = color //maybe someday change this to paint only clothes and exposed body parts for human mobs.
|
||||
|
||||
@@ -267,6 +270,7 @@
|
||||
M.apply_effect(5 * removed, IRRADIATE, 0)
|
||||
|
||||
/datum/reagent/uranium/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 3)
|
||||
if(!istype(T, /turf/space))
|
||||
var/obj/effect/decal/cleanable/greenglow/glow = locate(/obj/effect/decal/cleanable/greenglow, T)
|
||||
@@ -288,7 +292,7 @@
|
||||
name = "Lithium-6"
|
||||
id = "lithium6"
|
||||
description = "An isotope of lithium. It has 3 neutrons, but shares all chemical characteristics with regular lithium."
|
||||
|
||||
|
||||
/datum/reagent/helium/helium3
|
||||
name = "Helium-3"
|
||||
id = "helium3"
|
||||
@@ -317,11 +321,11 @@
|
||||
/datum/reagent/supermatter/affect_ingest(mob/living/carbon/M, alien, removed)
|
||||
. = ..()
|
||||
M.ash()
|
||||
|
||||
|
||||
/datum/reagent/supermatter/affect_blood(mob/living/carbon/M, alien, removed)
|
||||
. = ..()
|
||||
M.ash()
|
||||
|
||||
|
||||
|
||||
/datum/reagent/adrenaline
|
||||
name = "Adrenaline"
|
||||
@@ -357,6 +361,7 @@
|
||||
cult.remove_antagonist(M.mind)
|
||||
|
||||
/datum/reagent/water/holywater/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 5)
|
||||
T.holy = 1
|
||||
return
|
||||
@@ -404,6 +409,7 @@
|
||||
touch_met = 50
|
||||
|
||||
/datum/reagent/thermite/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 5)
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = T
|
||||
@@ -413,6 +419,7 @@
|
||||
return
|
||||
|
||||
/datum/reagent/thermite/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 5)
|
||||
|
||||
@@ -429,14 +436,17 @@
|
||||
touch_met = 50
|
||||
|
||||
/datum/reagent/space_cleaner/touch_mob(var/mob/M)
|
||||
..()
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
C.clean_blood()
|
||||
|
||||
/datum/reagent/space_cleaner/touch_obj(var/obj/O)
|
||||
..()
|
||||
O.clean_blood()
|
||||
|
||||
/datum/reagent/space_cleaner/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(volume >= 1)
|
||||
if(istype(T, /turf/simulated))
|
||||
var/turf/simulated/S = T
|
||||
@@ -484,6 +494,7 @@
|
||||
M.vomit()
|
||||
|
||||
/datum/reagent/space_cleaner/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.wear_mask)
|
||||
@@ -502,6 +513,7 @@
|
||||
color = "#009CA8"
|
||||
|
||||
/datum/reagent/lube/touch_turf(var/turf/simulated/T)
|
||||
..()
|
||||
if(!istype(T))
|
||||
return
|
||||
if(volume >= 1)
|
||||
@@ -516,6 +528,7 @@
|
||||
color = "#C7FFFF"
|
||||
|
||||
/datum/reagent/silicate/touch_obj(var/obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/structure/window))
|
||||
var/obj/structure/window/W = O
|
||||
W.apply_silicate(volume)
|
||||
@@ -589,9 +602,11 @@
|
||||
color = "#F2F3F4"
|
||||
|
||||
/datum/reagent/luminol/touch_obj(var/obj/O)
|
||||
..()
|
||||
O.reveal_blood()
|
||||
|
||||
/datum/reagent/luminol/touch_mob(var/mob/living/L)
|
||||
..()
|
||||
L.reveal_blood()
|
||||
|
||||
/datum/reagent/nutriment/biomass
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
var/fire_mult = 30
|
||||
|
||||
/datum/reagent/toxin/hydrophoron/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / fire_mult)
|
||||
|
||||
@@ -105,6 +106,7 @@
|
||||
/datum/reagent/toxin/hydrophoron/touch_turf(var/turf/simulated/T)
|
||||
if(!istype(T))
|
||||
return
|
||||
..()
|
||||
T.assume_gas("phoron", CEILING(volume/2, 1), T20C)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,T))
|
||||
target_tile.assume_gas("phoron", volume/2, 400+T0C)
|
||||
@@ -146,6 +148,7 @@
|
||||
skin_danger = 1
|
||||
|
||||
/datum/reagent/toxin/phoron/touch_mob(var/mob/living/L, var/amount)
|
||||
..()
|
||||
if(istype(L))
|
||||
L.adjust_fire_stacks(amount / 5)
|
||||
|
||||
@@ -167,6 +170,7 @@
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T, var/amount)
|
||||
..()
|
||||
if(!istype(T))
|
||||
return
|
||||
T.assume_gas("volatile_fuel", amount, T20C)
|
||||
@@ -388,6 +392,7 @@
|
||||
color = "#e67819"
|
||||
|
||||
/datum/reagent/toxin/fertilizer/tannin/touch_obj(var/obj/O, var/volume)
|
||||
..()
|
||||
if(istype(O, /obj/item/stack/hairlesshide))
|
||||
var/obj/item/stack/hairlesshide/HH = O
|
||||
HH.rapidcure(round(volume))
|
||||
@@ -403,6 +408,7 @@
|
||||
strength = 4
|
||||
|
||||
/datum/reagent/toxin/plantbgone/touch_turf(var/turf/T)
|
||||
..()
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = T
|
||||
if(locate(/obj/effect/overlay/wallrot) in W)
|
||||
@@ -411,6 +417,7 @@
|
||||
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!</span>")
|
||||
|
||||
/datum/reagent/toxin/plantbgone/touch_obj(var/obj/O, var/volume)
|
||||
..()
|
||||
if(istype(O, /obj/effect/plant))
|
||||
qdel(O)
|
||||
else if(istype(O, /obj/effect/alien/weeds/))
|
||||
|
||||
Reference in New Issue
Block a user