mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-16 01:25:10 +01:00
Virus timers
This commit is contained in:
@@ -5,9 +5,10 @@
|
||||
#define HIDDEN_PANDEMIC (1<<1)
|
||||
|
||||
//Disease Flags
|
||||
#define CURABLE (1<<0)
|
||||
#define CAN_CARRY (1<<1)
|
||||
#define CAN_RESIST (1<<2)
|
||||
#define CURABLE (1<<0)
|
||||
#define CAN_CARRY (1<<1)
|
||||
#define CAN_RESIST (1<<2)
|
||||
#define CAN_NOT_POPULATE (1<<3)
|
||||
|
||||
//Spread Flags
|
||||
#define SPECIAL (1<<0)
|
||||
|
||||
@@ -119,7 +119,19 @@ SUBSYSTEM_DEF(supply)
|
||||
EC.contents[EC.contents.len]["quantity"] = cashmoney.worth
|
||||
EC.value += EC.contents[EC.contents.len]["value"]
|
||||
|
||||
|
||||
if(istype(A, /obj/item/reagent_containers/glass/bottle/vaccine))
|
||||
var/obj/item/reagent_containers/glass/bottle/vaccine/sale_bottle = A
|
||||
if(istype(CR, /obj/structure/closet/crate/freezer))
|
||||
EC.contents = list(
|
||||
"error" = "Error: Product was improperly packaged. Send conents in freezer crate to preserver contents for transport."
|
||||
)
|
||||
else if(sale_bottle.reagents.reagent_list.len != 1 || sale_bottle.reagents.get_reagent_amount(REAGENT_ID_VACCINE) < sale_bottle.volume)
|
||||
EC.contents = list(
|
||||
"error" = "Error: Tainted product in batch. Was opened, contaminated, or was full. Payment rendered null under terms of agreement."
|
||||
)
|
||||
else
|
||||
EC.contents[EC.contents.len]["value"] = 5
|
||||
EC.value += EC.contents[EC.contents.len]["value"]
|
||||
|
||||
// Make a log of it, but it wasn't shipped properly, and so isn't worth anything
|
||||
else
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
/mob/proc/AddDisease(datum/disease/D, respect_carrier = FALSE)
|
||||
var/datum/disease/DD = new D.type(1, D, 0)
|
||||
DD.start_cure_timer()
|
||||
viruses += DD
|
||||
DD.affected_mob = src
|
||||
active_diseases += DD
|
||||
|
||||
@@ -42,6 +42,7 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
|
||||
var/allow_dead = FALSE
|
||||
var/infect_synthetics = FALSE
|
||||
var/processing = FALSE
|
||||
var/has_timer = FALSE
|
||||
|
||||
/datum/disease/Destroy()
|
||||
affected_mob = null
|
||||
@@ -147,6 +148,23 @@ GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
|
||||
remove_virus()
|
||||
qdel(src)
|
||||
|
||||
/datum/disease/proc/start_cure_timer()
|
||||
if(has_timer)
|
||||
return
|
||||
if(!(disease_flags & CURABLE))
|
||||
return
|
||||
has_timer = TRUE
|
||||
addtimer(CALLBACK(src, PROC_REF(check_natural_immunity)), (1 HOUR) + rand( -20 MINUTES, 30 MINUTES), TIMER_DELETE_ME)
|
||||
|
||||
/datum/disease/proc/check_natural_immunity()
|
||||
if(!(disease_flags & CURABLE))
|
||||
return
|
||||
if(prob(rand(10, 15)))
|
||||
has_timer = FALSE
|
||||
cure()
|
||||
return
|
||||
addtimer(CALLBACK(src, PROC_REF(check_natural_immunity)), rand(5 MINUTES, 10 MINUTES), TIMER_DELETE_ME)
|
||||
|
||||
/datum/disease/proc/IsSame(datum/disease/D)
|
||||
if(ispath(D))
|
||||
return istype(src, D)
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
GLOBAL_LIST_EMPTY(archive_diseases)
|
||||
|
||||
GLOBAL_LIST_INIT(advance_cures, list(
|
||||
REAGENT_ID_SODIUMCHLORIDE, REAGENT_ID_SUGAR, REAGENT_ID_ORANGEJUICE,
|
||||
REAGENT_ID_SPACEACILLIN, REAGENT_ID_GLUCOSE, REAGENT_ID_ETHANOL,
|
||||
REAGENT_ID_LEPORAZINE, REAGENT_ID_IMPEDREZENE, REAGENT_ID_HEPANEPHRODAXON,
|
||||
REAGENT_ID_SILVER, REAGENT_ID_GOLD
|
||||
REAGENT_ID_SPACEACILLIN,
|
||||
REAGENT_ID_ORANGEJUICE,
|
||||
REAGENT_ID_ETHANOL,
|
||||
REAGENT_ID_GLUCOSE,
|
||||
REAGENT_ID_COPPER,
|
||||
REAGENT_ID_LEAD,
|
||||
REAGENT_ID_LITHIUM,
|
||||
REAGENT_ID_RADIUM,
|
||||
REAGENT_ID_MERCURY,
|
||||
REAGENT_ID_BLISS,
|
||||
REAGENT_ID_MUTAGEN,
|
||||
REAGENT_ID_PHORON,
|
||||
REAGENT_ID_SACID
|
||||
))
|
||||
|
||||
/datum/disease/advance
|
||||
@@ -13,6 +22,7 @@ GLOBAL_LIST_INIT(advance_cures, list(
|
||||
form = "Advance Disease"
|
||||
agent = "advance microbes"
|
||||
max_stages = 5
|
||||
disease_flags = CAN_NOT_POPULATE
|
||||
spread_text = "Unknown"
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ Bonus
|
||||
if(3, 4)
|
||||
L.jitteriness += 10
|
||||
else
|
||||
if(L.reagents.get_reagent_amount(REAGENT_ID_HYPERZINE < 10))
|
||||
if(L.reagents.get_reagent_amount(REAGENT_ID_HYPERZINE) < 10)
|
||||
L.reagents.add_reagent(REAGENT_ID_HYPERZINE, 5)
|
||||
if(prob(30))
|
||||
L.jitteriness += 15
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
desc = "If left untreated the subject will become very weak, and may vomit often."
|
||||
severity = MINOR
|
||||
disease_flags = CAN_CARRY|CAN_RESIST
|
||||
disease_flags = CAN_CARRY|CAN_RESIST|CAN_NOT_POPULATE
|
||||
visibility_flags = HIDDEN_PANDEMIC
|
||||
required_organs = list(/obj/item/organ/internal/appendix)
|
||||
bypasses_immunity = TRUE
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
desc = "Nausea, sickness, and vomitting."
|
||||
severity = MINOR
|
||||
disease_flags = CURABLE
|
||||
disease_flags = CURABLE|CAN_NOT_POPULATE
|
||||
virus_heal_resistant = TRUE
|
||||
|
||||
/datum/disease/food_poisoning/stage_act()
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
agent = "Gravitokinetic Bipotential SADS+"
|
||||
viable_mobtypes = list(/mob/living/carbon/human)
|
||||
severity = BIOHAZARD
|
||||
disease_flags = CAN_NOT_POPULATE
|
||||
|
||||
/datum/disease/gbs/stage_act()
|
||||
if(!..())
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
var/selected_strain_index = 1
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
|
||||
// PanDEMIC Bottle
|
||||
/obj/item/reagent_containers/glass/bottle/vaccine
|
||||
icon_state = "bottle10"
|
||||
possible_transfer_amounts = (list(5, 10, 15))
|
||||
volume = 15
|
||||
|
||||
/obj/machinery/computer/pandemic/Initialize(mapload)
|
||||
. = ..()
|
||||
update_icon()
|
||||
@@ -68,7 +74,7 @@
|
||||
icon_state = "pandemic[(beaker)?"1":"0"][!(stat & NOPOWER) ? "" : "_nopower"]"
|
||||
|
||||
/obj/machinery/computer/pandemic/proc/create_culture(name, bottle_type = "culture", cooldown = 50)
|
||||
var/obj/item/reagent_containers/glass/bottle/B = new/obj/item/reagent_containers/glass/bottle(loc)
|
||||
var/obj/item/reagent_containers/glass/bottle/vaccine/B = new/obj/item/reagent_containers/glass/bottle/vaccine(loc)
|
||||
B.icon_state = "bottle10"
|
||||
B.pixel_x = rand(-3, 3)
|
||||
B.pixel_y = rand(-3, 3)
|
||||
@@ -146,8 +152,13 @@
|
||||
atom_say("Unable to synthesize requested antibody.")
|
||||
return
|
||||
|
||||
var/obj/item/reagent_containers/glass/bottle/B = create_culture(vaccine_name, REAGENT_ID_VACCINE, 200)
|
||||
var/obj/item/reagent_containers/glass/bottle/vaccine/B = create_culture(vaccine_name, REAGENT_ID_VACCINE, 200)
|
||||
B.reagents.add_reagent(REAGENT_ID_VACCINE, 15, list(vaccine_type))
|
||||
if(beaker && beaker.reagents && length(beaker.reagents.reagent_list))
|
||||
beaker.reagents.remove_reagent(REAGENT_ID_BLOOD, 5)
|
||||
if(!length(beaker.reagents.reagent_list))
|
||||
update_tgui_static_data(ui.user)
|
||||
|
||||
if("eject_beaker")
|
||||
eject_beaker()
|
||||
update_tgui_static_data(ui.user)
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
GLOBAL_LIST_EMPTY(current_pending_diseases)
|
||||
/datum/event/disease_outbreak
|
||||
var/datum/disease/chosen_disease
|
||||
var/list/disease_blacklist = list(
|
||||
/datum/disease/advance,
|
||||
/datum/disease/food_poisoning,
|
||||
/datum/disease/gbs // Terrible. It's only in the code to scare people.
|
||||
)
|
||||
var/static/list/transmissable_symptoms = list()
|
||||
var/static/list/diseases_minor = list()
|
||||
var/static/list/diseases_moderate_major = list()
|
||||
@@ -85,7 +80,7 @@ GLOBAL_LIST_EMPTY(current_pending_diseases)
|
||||
/datum/event/disease_outbreak/proc/populate_diseases()
|
||||
for(var/candidate in subtypesof(/datum/disease))
|
||||
var/datum/disease/CD = new candidate
|
||||
if(is_type_in_list(CD, disease_blacklist))
|
||||
if(CD.disease_flags & CAN_NOT_POPULATE)
|
||||
continue
|
||||
switch(CD.severity)
|
||||
if(NONTHREAT, MINOR)
|
||||
|
||||
Vendored
-53
@@ -1,53 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'tgfont';
|
||||
src:
|
||||
url('./tgfont.woff2?958b912b123580c55529f68c4e2261bd') format('woff2'),
|
||||
url('./tgfont.eot?958b912b123580c55529f68c4e2261bd#iefix')
|
||||
format('embedded-opentype');
|
||||
}
|
||||
|
||||
i[class^='tg-']:before,
|
||||
i[class*=' tg-']:before {
|
||||
font-family: tgfont !important;
|
||||
font-style: normal;
|
||||
font-weight: normal !important;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.tg-air-tank-slash:before {
|
||||
content: '\f101';
|
||||
}
|
||||
.tg-air-tank:before {
|
||||
content: '\f102';
|
||||
}
|
||||
.tg-bad-touch:before {
|
||||
content: '\f103';
|
||||
}
|
||||
.tg-image-minus:before {
|
||||
content: '\f104';
|
||||
}
|
||||
.tg-image-plus:before {
|
||||
content: '\f105';
|
||||
}
|
||||
.tg-nanotrasen-logo:before {
|
||||
content: '\f106';
|
||||
}
|
||||
.tg-non-binary:before {
|
||||
content: '\f107';
|
||||
}
|
||||
.tg-prosthetic-leg:before {
|
||||
content: '\f108';
|
||||
}
|
||||
.tg-sound-minus:before {
|
||||
content: '\f109';
|
||||
}
|
||||
.tg-sound-plus:before {
|
||||
content: '\f10a';
|
||||
}
|
||||
.tg-syndicate-logo:before {
|
||||
content: '\f10b';
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user