mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
Virus stuff (#7738)
This commit is contained in:
@@ -189,7 +189,7 @@
|
||||
if(virus.len > 0)
|
||||
for (var/ID in virus)
|
||||
var/datum/disease2/disease/V = virus[ID]
|
||||
P.info += "[V.name()]<br>"
|
||||
P.info += "stamm #[add_zero("[V.uniqueID]", 4)]<br>" // CHOMPEdit - Making sure to not show the name at first!
|
||||
else
|
||||
P.info += "None<br>"
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
var/max_stage = 4
|
||||
var/list/affected_species = list(SPECIES_HUMAN,SPECIES_UNATHI,SPECIES_SKRELL,SPECIES_TAJ)
|
||||
var/resistance = 10 // % chance a disease will resist cure, up to 100
|
||||
var/name // CHOMPEdit - For custom built diseases.
|
||||
|
||||
/datum/disease2/disease/New()
|
||||
uniqueID = rand(0,10000)
|
||||
@@ -149,6 +150,7 @@
|
||||
|
||||
/datum/disease2/disease/proc/majormutate()
|
||||
uniqueID = rand(0,10000)
|
||||
name = null // CHOMPEdit - Not the same one anymore.
|
||||
var/datum/disease2/effectholder/holder = pick(effects)
|
||||
var/list/exclude = list()
|
||||
for(var/datum/disease2/effectholder/D in effects)
|
||||
@@ -172,6 +174,7 @@
|
||||
disease.stageprob = stageprob
|
||||
disease.antigen = antigen
|
||||
disease.uniqueID = uniqueID
|
||||
disease.name = name // CHOMPEdit - Copy our name as well.
|
||||
disease.resistance = resistance
|
||||
disease.affected_species = affected_species.Copy()
|
||||
for(var/datum/disease2/effectholder/holder in effects)
|
||||
@@ -215,7 +218,10 @@
|
||||
var/global/list/virusDB = list()
|
||||
|
||||
/datum/disease2/disease/proc/name()
|
||||
.= "stamm #[add_zero("[uniqueID]", 4)]"
|
||||
if(name) // CHOMPEdit - Lets use our name
|
||||
.= "[name]"
|
||||
else // CHOMPEdit - ...unless we're an undiscovered disease.
|
||||
.= "stamm #[add_zero("[uniqueID]", 4)]"
|
||||
if ("[uniqueID]" in virusDB)
|
||||
var/datum/data/record/V = virusDB["[uniqueID]"]
|
||||
.= V.fields["name"]
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
// Temporary power failure, but mitigatead by subgrids
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 0, list(ASSIGNMENT_SCIENTIST = 10, ASSIGNMENT_ENGINEER = 25), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grub Infestation", /datum/event/grub_infestation, -20, list(ASSIGNMENT_SECURITY = 40, ASSIGNMENT_ENGINEER = 40), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Infected Room", /datum/event/infectedroom, -30, list(ASSIGNMENT_MEDICAL = 30, ASSIGNMENT_JANITOR = 10), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Infected Room", /datum/event/infectedroom, -30, list(ASSIGNMENT_MEDICAL = 30, ASSIGNMENT_JANITOR = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
|
||||
// Pure RP fun, no mechanical effects.
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 80, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5), min_jobs = list(ASSIGNMENT_AI = 1)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MODERATE, "Jellyfish School", /datum/event/jellyfish_migration, 5, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 5, ASSIGNMENT_MEDICAL = 3), 1),
|
||||
@@ -127,7 +127,7 @@
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, -110, list(ASSIGNMENT_SECURITY = 50, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10), 1, min_jobs = list(ASSIGNMENT_SECURITY = 3)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Exotic Horde Infestation", /datum/event/highdangerinfestation, -50, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_SCIENCE = 5, ASSIGNMENT_ANY = 2)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Horde Infestation", /datum/event/horde_infestation, -60, list(ASSIGNMENT_SECURITY = 20, ASSIGNMENT_HOS = 10, ASSIGNMENT_WARDEN = 10, ASSIGNMENT_ANY = 3), 0),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Infected Room", /datum/event/infectedroom, -50, list(ASSIGNMENT_MEDICAL = 25, ASSIGNMENT_JANITOR = 10), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Infected Room", /datum/event/infectedroom, -50, list(ASSIGNMENT_MEDICAL = 25, ASSIGNMENT_JANITOR = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_MEDICAL = 2)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Jellyfish Migration", /datum/event/jellyfish_migration, 5, list(ASSIGNMENT_ANY = 1, ASSIGNMENT_SECURITY = 5, ASSIGNMENT_MEDICAL = 3), 1),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meaty Ores Wave", /datum/event/meteor_wave/meatyores, -90, list(ASSIGNMENT_ENGINEER = 50, ASSIGNMENT_MEDICAL = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_ENGINEER = 1)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, -90, list(ASSIGNMENT_ENGINEER = 50, ASSIGNMENT_MEDICAL = 10, ASSIGNMENT_ANY = 1), 1, min_jobs = list(ASSIGNMENT_ENGINEER = 1)),
|
||||
|
||||
@@ -8,19 +8,56 @@
|
||||
/area/shuttle,
|
||||
/area/crew_quarters,
|
||||
/area/holodeck,
|
||||
/area/engineering/engine_room
|
||||
/area/engineering/engine_room)
|
||||
|
||||
var/commondisease = list(
|
||||
"Friday Fever" = list(
|
||||
/datum/disease2/effect/choreomania,
|
||||
/datum/disease2/effect/spin,
|
||||
/datum/disease2/effect/flip,
|
||||
/datum/disease2/effect/scream),
|
||||
"Common Cold" = list(
|
||||
/datum/disease2/effect/sneeze,
|
||||
/datum/disease2/effect/cough,
|
||||
/datum/disease2/effect/fridge,
|
||||
/datum/disease2/effect/drowsness),
|
||||
"Brain Bloat" = list(
|
||||
/datum/disease2/effect/invisible,
|
||||
/datum/disease2/effect/headache,
|
||||
/datum/disease2/effect/telepathic,
|
||||
/datum/disease2/effect/nothing
|
||||
),
|
||||
"Glutton's Gut" = list(
|
||||
/datum/disease2/effect/drool,
|
||||
/datum/disease2/effect/hungry,
|
||||
/datum/disease2/effect/pica,
|
||||
/datum/disease2/effect/nothing
|
||||
),
|
||||
"Motor System Impairment" = list(
|
||||
/datum/disease2/effect/twitch,
|
||||
/datum/disease2/effect/jellylegs,
|
||||
/datum/disease2/effect/spin,
|
||||
/datum/disease2/effect/groan
|
||||
)
|
||||
)
|
||||
|
||||
/datum/event/infectedroom/setup()
|
||||
announceWhen = rand(0, 3000)
|
||||
endWhen = announceWhen + 1
|
||||
var/list/area/affected_area = get_station_areas(excluded)
|
||||
var/chosenvirus = pick(commondisease)
|
||||
|
||||
if(severity == EVENT_LEVEL_MAJOR)
|
||||
virus.makerandom(rand(2,3))
|
||||
if(prob(75))
|
||||
virus.makerandom(rand(2,3))
|
||||
else
|
||||
virus.makedisease(commondisease[chosenvirus], rand(2,3), chosenvirus)
|
||||
infected_tiles = rand(4, 8)
|
||||
else if(severity == EVENT_LEVEL_MODERATE)
|
||||
virus.makerandom(2)
|
||||
if(prob(50))
|
||||
virus.makerandom(2)
|
||||
else
|
||||
virus.makedisease(commondisease[chosenvirus], 2, chosenvirus)
|
||||
infected_tiles = rand(3, 6)
|
||||
else
|
||||
virus.makerandom(1)
|
||||
|
||||
55
modular_chomp/code/modules/virus2/disease2.dm
Normal file
55
modular_chomp/code/modules/virus2/disease2.dm
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
To make a custom disease, make a list with 4 symptoms, give it the severity and a name if you wish.
|
||||
This is mostly useful for mapping, events or some mobs.
|
||||
Example custom virus:
|
||||
|
||||
var/datum/disease2/disease/virus = new
|
||||
|
||||
virus.makedisease(list(
|
||||
/datum/disease2/effect/invisible,
|
||||
/datum/disease2/effect/invisible,
|
||||
/datum/disease2/effect/invisible,
|
||||
/datum/disease2/effect/invisible
|
||||
), 2, "Invis")
|
||||
|
||||
var/obj/effect/decal/cleanable/mucus/mapped/M
|
||||
M.virus2[1] = virus.getcopy()
|
||||
|
||||
This will create a disease without effects, mildly infectious and with "Invis" as name,
|
||||
then added to some mucus on the ground for out dear explo team to step on it and get infected.
|
||||
|
||||
*/
|
||||
/datum/disease2/disease/proc/makedisease(symptom, severity, dname)
|
||||
for(var/i in 1 to 4)
|
||||
var/datum/disease2/effectholder/holder = new /datum/disease2/effectholder
|
||||
var/Etype = symptom[i]
|
||||
holder.stage = i
|
||||
holder.effect = new Etype()
|
||||
holder.effect.generate()
|
||||
holder.chance = rand(0,holder.effect.chance_maxm)
|
||||
holder.multiplier = rand(1,holder.effect.maxm)
|
||||
effects += holder
|
||||
|
||||
if(dname)
|
||||
name = "[dname]"
|
||||
|
||||
uniqueID = rand(0,10000)
|
||||
|
||||
switch(severity)
|
||||
if(1)
|
||||
infectionchance = 1
|
||||
if(2)
|
||||
infectionchance = rand(15,25)
|
||||
else
|
||||
infectionchance = rand(60,90)
|
||||
|
||||
antigen = list(pick(ALL_ANTIGENS))
|
||||
antigen |= pick(ALL_ANTIGENS)
|
||||
spreadtype = prob(70) ? "Airborne" : "Contact"
|
||||
resistance = rand(15,70)
|
||||
|
||||
if(severity >= 2 && prob(33))
|
||||
resistance += 10
|
||||
|
||||
if(GLOB.all_species.len)
|
||||
affected_species = get_infectable_species()
|
||||
@@ -4940,6 +4940,7 @@
|
||||
#include "modular_chomp\code\modules\tickets\tickets.dm"
|
||||
#include "modular_chomp\code\modules\tickets\tickets_player_ui.dm"
|
||||
#include "modular_chomp\code\modules\tickets\tickets_ui.dm"
|
||||
#include "modular_chomp\code\modules\virus2\disease2.dm"
|
||||
#include "modular_chomp\code\modules\virus2\effect.dm"
|
||||
#include "modular_chomp\code\modules\vore\eating\exportpanel_ch.dm"
|
||||
#include "modular_chomp\code\modules\vore\resizing\resize.dm"
|
||||
|
||||
Reference in New Issue
Block a user