-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Renaming viro subtypes and fixing disease severities and maintence panels (AKA a bunch of fixes for viro at this point.) #4931
Conversation
This has too many names to be frank
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code is overall good, just a few minor nitpicks
@@ -24,8 +24,8 @@ | |||
EFFECT_DANGER_HARMFUL = 0, | |||
EFFECT_DANGER_DEADLY = 0, | |||
) | |||
var/virus_choice = pick(subtypesof(/datum/disease/advanced)- typesof(/datum/disease/advanced/premade)) | |||
var/datum/disease/advanced/D = new virus_choice | |||
var/virus_choice = pick(subtypesof(/datum/disease/acute)- typesof(/datum/disease/acute/premade)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
honestly with how much this pattern is repeated, I'd prefer a define somewhere like this:
#define NON_PREMADE_ACUTE_DISEASES (subtypesof(/datum/disease/acute) - typesof(/datum/disease/acute/premade))
altho you can prolly come up with a better name for it
/datum/disease/acute/proc/A_Refresh(new_name = FALSE) | ||
A_GenerateProperties() | ||
A_assign_properties() | ||
|
||
/datum/disease/acute/proc/A_GenerateProperties() | ||
properties = list("severity" = 0) | ||
for(var/datum/symptom/S in symptoms) | ||
if(!S.neutered) | ||
properties["severity"] = max(properties["severity"], S.severity) // severity is based on the highest severity non-neutered symptom | ||
|
||
/datum/disease/acute/proc/A_assign_properties() | ||
if(properties?.len) | ||
A_set_severity(properties["severity"]) | ||
else | ||
CRASH("Our properties were empty or null!") | ||
|
||
|
||
/datum/disease/acute/proc/A_set_severity(level_sev) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer these have more descriptive names (and maybe documentation, but I'm not gonna be picky), alongside just being snake_case in general
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, change properties?.len
to length(properties)
About The Pull Request
Renames all mentions of
disease/advanced
intodisease/acute
Salvages Old viro code to enable disease severities to be set automatically
Triggered when most disease sources are created.
Immunity scanners, disease analyzers, or disease state analyzers are used
Delightful effect is now considered positive.
Viro machines (Disease analyzer, Incubator, and centrifuge) now have maintenance panels and can be upgraded with a basic RPED and deconstructed with a crowbar.
Porokeratosis Acanthus, Porokeratosis Acanthus, and Epidermolysis Bullosa will no longer appear.
close: biometallic replication seems to not work #3328
Disease incubators now are built with 4 scanning modules, rather than 2.
Why It's Good For The Game
Refactoring
disease/advanced
Old diseases had/have the subtype of
disease/advance
, new diseases have the current subtype ofdisease/advanced
The one-letter difference between the two can easily cause confusion and make the code difficult to work with for potential mix-ups. The change todisease/acute
at the least has helped me greatly in this pr.Severities are now automatic rather than manually defined
With disease severities now set automatically for most if not all instances I can find, Health huds should properly be displaying the severity of the infectee's disease. Knowing if concerned should be given or if it can be overlooked by a doctor
Delightful is a helpful symptoms
Delightful is a mostly positive effect, much like tox comp or regen coma when too strong or weak it becomes negative.
Maintence panels included
Viro machines have been given maintenance panels. For a job that greatly benefits from having parts to complete their work not having maintenance panels seriously hurt their processes.
Removing nonfunctional symptoms for now
Epidermolysis Bullosa (Butterfly skin) and Porokeratosis Acanthus were removed from the viro pool because the symptoms do not trigger functionally.
Biometallic is coded in virology code and can still show up, but wont function. (Uses old viro stages as a core part of its code)
Incubators now are faster
Incubators are now made with four scanning modules. Functionally this means mutation chance goes from 10% and 40% at max to 20% and 80% max. Recently we've seen the pace of rounds speed up. And viro slows down. Most notably with emergency shuttles now being voted on at the one-hour-thirty mark. And my PR #4061, which took away easy high tier scanning modules for virologists.
In my experience, you'll finish up diseases a good portion of the time while the shuttle arrives.
This makes Viro less reliant on other departments for a half-decent QOL if mining or science fails to do their job. While making cross-departmental cooperation between those departments more influential.
In addition the waiting period for your virus's to mutate are the least interesting part of virology.
Changelog
🆑
add: Maintence panels and sprites to viro machines
del: Removed Epidermolysis Bullosa, Biometalic replication, and Porokeratosis Acanthus symptoms from appearing
balance: Delightful effect is now considered a helpful effect
balance: Viro's incubators are now twice as fast overall (10%:40% to 20%:80%)
fix: Disease severities and hud states will now properly set
code: Changed the subtype for diseases
/:cl: