mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
more OOP
This commit is contained in:
@@ -1040,9 +1040,11 @@
|
||||
|
||||
/mob/living/carbon/human/proc/handle_pulse()
|
||||
|
||||
if(mob_master.current_cycle % 5) return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
if(mob_master.current_cycle % 5)
|
||||
return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
|
||||
|
||||
if(species && species.flags & NO_BLOOD) return PULSE_NONE //No blood, no pulse.
|
||||
if(species && species.flags & NO_BLOOD)
|
||||
return PULSE_NONE //No blood, no pulse.
|
||||
|
||||
if(stat == DEAD)
|
||||
return PULSE_NONE //that's it, you're dead, nothing can influence your pulse
|
||||
@@ -1060,25 +1062,21 @@
|
||||
temp = PULSE_NONE //pretend that we're dead. unlike actual death, can be inflienced by meds
|
||||
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
if(R.id in bradycardics)
|
||||
if(R.heart_rate_decrease)
|
||||
if(temp <= PULSE_THREADY && temp >= PULSE_NORM)
|
||||
temp--
|
||||
break //one reagent is enough
|
||||
//comment out the breaks to make med effects stack
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //handles different chems' influence on pulse
|
||||
if(R.id in tachycardics)
|
||||
break
|
||||
|
||||
for(var/datum/reagent/R in reagents.reagent_list)//handles different chems' influence on pulse
|
||||
if(R.heart_rate_increase)
|
||||
if(temp <= PULSE_FAST && temp >= PULSE_NONE)
|
||||
temp++
|
||||
break
|
||||
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //To avoid using fakedeath
|
||||
if(R.id in heartstopper)
|
||||
if(R.heart_rate_stop)
|
||||
temp = PULSE_NONE
|
||||
break
|
||||
for(var/datum/reagent/R in reagents.reagent_list) //Conditional heart-stoppage
|
||||
if(R.id in cheartstopper)
|
||||
if(R.volume >= R.overdose_threshold)
|
||||
temp = PULSE_NONE
|
||||
break
|
||||
|
||||
return temp
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
/obj/item/ammo_casing/shotgun/dart/bioterror/New()
|
||||
..()
|
||||
reagents.add_reagent("neurotoxin", 6)
|
||||
reagents.add_reagent("spores", 6)
|
||||
reagents.add_reagent("spore", 6)
|
||||
reagents.add_reagent("mutetoxin", 6) //;HELP OPS IN MAINT
|
||||
reagents.add_reagent("coniine", 6)
|
||||
reagents.add_reagent("sodium_thiopental", 6)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
volume = ..()
|
||||
M.apply_damage(0.6*volume, TOX)
|
||||
M.hallucination += 0.6*volume
|
||||
M.reagents.add_reagent("spores", 0.4*volume)
|
||||
M.reagents.add_reagent("spore", 0.4*volume)
|
||||
|
||||
/datum/reagent/blob/lexorin_jelly //does tons of oxygen damage and a little brute
|
||||
name = "Lexorin Jelly"
|
||||
|
||||
@@ -122,31 +122,6 @@
|
||||
qdel(ate_heart)
|
||||
..()
|
||||
|
||||
/datum/reagent/spore
|
||||
name = "Blob Spores"
|
||||
id = "spore"
|
||||
description = "Spores of some blob creature thingy."
|
||||
reagent_state = LIQUID
|
||||
color = "#CE760A" // rgb: 206, 118, 10
|
||||
var/client/blob_client = null
|
||||
var/blob_point_rate = 3
|
||||
|
||||
/datum/reagent/spore/on_mob_life(mob/living/M)
|
||||
if(holder.has_reagent("atrazine",45))
|
||||
holder.del_reagent("spore") //apparently this never metabolizes and stays in forever unless you have 45 units of atrazine in you or some stupid thing like that.
|
||||
if(prob(1))
|
||||
to_chat(M, "<span class='danger'>Your mouth tastes funny.</span>")
|
||||
if(prob(1) && prob(25))
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
if(directory[ckey(C.key)])
|
||||
blob_client = directory[ckey(C.key)]
|
||||
C.gib()
|
||||
if(blob_client)
|
||||
var/obj/effect/blob/core/core = new(get_turf(C), 200, blob_client, blob_point_rate)
|
||||
if(core.overmind && core.overmind.mind)
|
||||
core.overmind.mind.name = C.name
|
||||
|
||||
//virus food
|
||||
/datum/reagent/virus_food
|
||||
name = "Virus Food"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
color = "#60A584" // rgb: 96, 165, 132
|
||||
overdose_threshold = 35
|
||||
addiction_chance = 70
|
||||
heart_rate_increase = 1
|
||||
|
||||
/datum/reagent/nicotine/on_mob_life(mob/living/M)
|
||||
var/smoke_message = pick("You feel relaxed.", "You feel calmed.", "You feel less stressed.", "You feel more placid.", "You feel more undivided.")
|
||||
@@ -234,6 +235,7 @@
|
||||
overdose_threshold = 20
|
||||
addiction_chance = 60
|
||||
metabolization_rate = 0.6
|
||||
heart_rate_increase = 1
|
||||
|
||||
/datum/reagent/methamphetamine/on_mob_life(mob/living/M)
|
||||
if(prob(5))
|
||||
|
||||
@@ -748,6 +748,7 @@
|
||||
description = "A rare drug that causes the user to appear dead for some time."
|
||||
reagent_state = LIQUID
|
||||
color = "#60A584"
|
||||
heart_rate_stop = 1
|
||||
|
||||
/datum/chemical_reaction/capulettium
|
||||
name = "capulettium"
|
||||
@@ -778,6 +779,7 @@
|
||||
description = "A rare and expensive drug that causes the user to appear dead for some time while they retain consciousness and vision."
|
||||
reagent_state = LIQUID
|
||||
color = "#60A584"
|
||||
heart_rate_stop = 1
|
||||
|
||||
/datum/chemical_reaction/capulettium_plus
|
||||
name = "capulettium_plus"
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
//var/list/viruses = list()
|
||||
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
|
||||
var/shock_reduction = 0
|
||||
var/heart_rate_increase = 0
|
||||
var/heart_rate_decrease = 0
|
||||
var/heart_rate_stop = 0
|
||||
var/penetrates_skin = 0 //Whether or not a reagent penetrates the skin
|
||||
var/can_grow_in_plants = 1 //Determines if the reagent can be grown in plants, 0 means it cannot be grown
|
||||
//Processing flags, defines the type of mobs the reagent will affect
|
||||
|
||||
@@ -182,6 +182,7 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#102000" // rgb: 16, 32, 0
|
||||
alcohol_perc = 0.3
|
||||
heart_rate_increase = 1
|
||||
|
||||
/datum/reagent/ethanol/thirteenloko/on_mob_life(mob/living/M)
|
||||
M.nutrition += nutriment_factor
|
||||
@@ -623,6 +624,7 @@
|
||||
color = "#2E2E61" // rgb: 46, 46, 97
|
||||
dizzy_adj = 6
|
||||
alcohol_perc = 0.7
|
||||
heart_rate_decrease = 1
|
||||
|
||||
/datum/reagent/ethanol/neurotoxin/on_mob_life(mob/living/M)
|
||||
M.weakened = max(M.weakened, 3)
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
adj_temp_hot = 25
|
||||
overdose_threshold = 45
|
||||
addiction_chance = 1 // It's true.
|
||||
heart_rate_increase = 1
|
||||
|
||||
/datum/reagent/drink/coffee/on_mob_life(mob/living/M)
|
||||
if(holder.has_reagent("frostoil"))
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
color = "#9087A2"
|
||||
metabolization_rate = 0.2
|
||||
addiction_chance = 65
|
||||
heart_rate_decrease = 1
|
||||
|
||||
/datum/reagent/space_drugs/on_mob_life(mob/living/M)
|
||||
M.druggy = max(M.druggy, 15)
|
||||
@@ -84,4 +85,31 @@
|
||||
if(M.canmove && !M.restrained())
|
||||
step(M, pick(cardinal))
|
||||
if(prob(7)) M.emote(pick("twitch","drool","moan","giggle"))
|
||||
..()
|
||||
|
||||
/datum/reagent/psilocybin
|
||||
name = "Psilocybin"
|
||||
id = "psilocybin"
|
||||
description = "A strong psycotropic derived from certain species of mushroom."
|
||||
color = "#E700E7" // rgb: 231, 0, 231
|
||||
|
||||
/datum/reagent/psilocybin/on_mob_life(mob/living/M)
|
||||
M.druggy = max(M.druggy, 30)
|
||||
switch(current_cycle)
|
||||
if(1 to 5)
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Dizzy(5)
|
||||
if(prob(10)) M.emote(pick("twitch","giggle"))
|
||||
if(5 to 10)
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Jitter(10)
|
||||
M.Dizzy(10)
|
||||
M.druggy = max(M.druggy, 35)
|
||||
if(prob(20)) M.emote(pick("twitch","giggle"))
|
||||
if(10 to INFINITY)
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Jitter(20)
|
||||
M.Dizzy(20)
|
||||
M.druggy = max(M.druggy, 40)
|
||||
if(prob(30)) M.emote(pick("twitch","giggle"))
|
||||
..()
|
||||
@@ -84,12 +84,4 @@
|
||||
id = "glycerol"
|
||||
description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity."
|
||||
reagent_state = LIQUID
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
|
||||
|
||||
/datum/reagent/nitroglycerin
|
||||
name = "Nitroglycerin"
|
||||
id = "nitroglycerin"
|
||||
description = "Nitroglycerin is a heavy, colorless, oily, explosive liquid obtained by nitrating glycerol."
|
||||
reagent_state = LIQUID
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
@@ -166,7 +166,6 @@
|
||||
id = "blackpepper"
|
||||
description = "A powder ground from peppercorns. *AAAACHOOO*"
|
||||
reagent_state = SOLID
|
||||
// no color (ie, black)
|
||||
|
||||
/datum/reagent/cocoa
|
||||
name = "Cocoa Powder"
|
||||
@@ -194,35 +193,6 @@
|
||||
M.nutrition += nutriment_factor
|
||||
..()
|
||||
|
||||
|
||||
/datum/reagent/psilocybin
|
||||
name = "Psilocybin"
|
||||
id = "psilocybin"
|
||||
description = "A strong psycotropic derived from certain species of mushroom."
|
||||
color = "#E700E7" // rgb: 231, 0, 231
|
||||
|
||||
/datum/reagent/psilocybin/on_mob_life(mob/living/M)
|
||||
M.druggy = max(M.druggy, 30)
|
||||
switch(current_cycle)
|
||||
if(1 to 5)
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Dizzy(5)
|
||||
if(prob(10)) M.emote(pick("twitch","giggle"))
|
||||
if(5 to 10)
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Jitter(10)
|
||||
M.Dizzy(10)
|
||||
M.druggy = max(M.druggy, 35)
|
||||
if(prob(20)) M.emote(pick("twitch","giggle"))
|
||||
if(10 to INFINITY)
|
||||
if(!M.stuttering) M.stuttering = 1
|
||||
M.Jitter(20)
|
||||
M.Dizzy(20)
|
||||
M.druggy = max(M.druggy, 40)
|
||||
if(prob(30)) M.emote(pick("twitch","giggle"))
|
||||
..()
|
||||
|
||||
|
||||
/datum/reagent/sprinkles
|
||||
name = "Sprinkles"
|
||||
id = "sprinkles"
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
description = "A plasma mixture with almost magical healing powers. Its main limitation is that the targets body temperature must be under 265K for it to metabolise correctly."
|
||||
reagent_state = LIQUID
|
||||
color = "#0000C8" // rgb: 200, 165, 220
|
||||
heart_rate_decrease = 1
|
||||
|
||||
/datum/reagent/cryoxadone/on_mob_life(mob/living/M)
|
||||
if(M.bodytemperature < 265)
|
||||
|
||||
@@ -324,10 +324,10 @@
|
||||
..()
|
||||
|
||||
|
||||
/datum/reagent/spores
|
||||
/datum/reagent/spore
|
||||
name = "Spore Toxin"
|
||||
id = "spores"
|
||||
description = "A toxic spore cloud which blocks vision when ingested."
|
||||
id = "spore"
|
||||
description = "A natural toxin produced by blob spores that inhibits vision when ingested."
|
||||
color = "#9ACD32"
|
||||
|
||||
/datum/reagent/spores/on_mob_life(mob/living/M)
|
||||
|
||||
Reference in New Issue
Block a user