Skip to content

Commit

Permalink
food poisoning
Browse files Browse the repository at this point in the history
  • Loading branch information
KittyNoodle committed Nov 20, 2023
1 parent 122c09c commit 252a752
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/mob/living/basic/vermin/mouse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
var/datum/disease/advance/R = new /datum/disease/advance/random(rand(1, 6), 9, 1)
var/datum/disease/R = new /datum/disease/food //monkestation change advance/random to food poisoning

Check failure on line 59 in code/modules/mob/living/basic/vermin/mouse.dm

View workflow job for this annotation

GitHub Actions / Run Linters

failed to resolve path /datum/disease/food
ratdisease += R
AddElement(/datum/element/connect_loc, loc_connections)
make_tameable()
Expand Down
48 changes: 48 additions & 0 deletions monkestation/code/datums/diseases/food_poisoning
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/datum/disease/food
name = "Food Poisoning"
max_stages = 4
cure_text = "Spaceacillin"
cures = list(/datum/reagent/medicine/spaceacillin)
agent = "Salmonella Cosmosis"
spread_text = "Infected Food or Blood"
viable_mobtypes = list(/mob/living/carbon/human)
spreading_modifier = 1
desc = "If left untreated the subject will vomit profusely."
severity = DISEASE_SEVERITY_HARMFUL
disease_flags = CAN_CARRY|CAN_RESIST
spread_flags = DISEASE_SPREAD_BLOOD
required_organs = list(/obj/item/organ/internal/stomach)
bypasses_immunity = TRUE

/datum/disease/food/stage_act(seconds_per_tick, times_fired)
. = ..()
if(!.)
return

switch(stage)
if(2)
if(SPT_PROB(1, seconds_per_tick))
to_chat(affected_mob, span_danger("[pick("Your stomach hurts.", "Your stomach feels like its spinning.")]"))
affected_mob.adjust_disgust(10)
affected_mob.stamina.adjust(-15)
if(prob(20))
affected_mob.adjustToxLoss(1, FALSE)
if(3)
if(SPT_PROB(1, seconds_per_tick))
to_chat(affected_mob, span_danger("[pick("Your stomach hurts.", "Your stomach feels like its spinning.")]"))
affected_mob.stamina.adjust(-15)
if(prob(20))
affected_mob.adjustToxLoss(1, FALSE)
if(SPT_PROB(1.5, seconds_per_tick))
to_chat(affected_mob, span_warning("[pick("You feel nauseated.", "You feel like you're going to throw up!")]"))
affected_mob.adjust_disgust(30)
if(4)
if(SPT_PROB(1.5, seconds_per_tick))
to_chat(affected_mob, span_warning("[pick("Your head hurts.", "Your head pounds.")]"))
affected_mob.stamina.adjust(-25)
if(SPT_PROB(2.5, seconds_per_tick))
to_chat(affected_mob, span_warning("[pick("You feel nauseated.", "You feel like you're going to throw up!")]"))
affected_mob.adjust_disgust(40)
if(SPT_PROB(6, seconds_per_tick))
affected_mob.adjust_disgust(10)
affected_mob.vomit(20, FALSE, distance = 1)
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5487,6 +5487,7 @@
#include "monkestation\code\datums\components\multi_hit.dm"
#include "monkestation\code\datums\components\throw_bounce.dm"
#include "monkestation\code\datums\components\turf_healing.dm"
#include "monkestation\code\datums\diseases\food_poisoning.dm"
#include "monkestation\code\datums\diseases\advance\symptoms\clockwork.dm"
#include "monkestation\code\datums\keybinding\carbon.dm"
#include "monkestation\code\datums\keybinding\living.dm"
Expand Down

0 comments on commit 252a752

Please sign in to comment.