Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 2 really annoying cytology virus bugs. #56062

Merged
merged 1 commit into from Jan 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/datums/elements/swabbable.dm
Expand Up @@ -12,7 +12,7 @@ This element is used in vat growing to allow for the object to be
var/virus_define
///Amount of cell lines on a single sample
var/cell_line_amount
///Amount of viruses on a single sample
///The chance the sample will be infected with a virus.
var/virus_chance

///Listens for the swab signal and then generate a sample based on pre-determined lists that are saved as GLOBs. this allows us to have very few swabbable element instances.
Expand Down
Expand Up @@ -63,7 +63,7 @@
reagents.remove_reagent(i, REAGENTS_METABOLISM)

//Handle debuffing growth based on viruses here.
for(var/datum/micro_organism/cell_line/virus in biological_sample.micro_organisms)
for(var/datum/micro_organism/virus/active_virus in biological_sample.micro_organisms)
if(reagents.has_reagent(/datum/reagent/medicine/spaceacillin, REAGENTS_METABOLISM))
reagents.remove_reagent(/datum/reagent/medicine/spaceacillin, REAGENTS_METABOLISM)
continue //This virus is stopped, We have antiviral stuff
Expand Down
Expand Up @@ -16,7 +16,7 @@
var/datum/micro_organism/chosen_type = pickweight(temp_weight_list)
temp_weight_list -= chosen_type
micro_organisms += new chosen_type
if(virus_chance)
if(prob(virus_chance))
if(!GLOB.cell_virus_tables[virus_define])
return
var/datum/micro_organism/chosen_type = pickweight(GLOB.cell_virus_tables[virus_define])
Expand Down