wound_pregen_data
A singleton datum that holds pre-gen and static data about a wound. Each wound datum should have a corresponding wound_pregen_data.
Vars | |
abstract | Will this be instantiated? |
---|---|
can_be_randomly_generated | If true, our wound can be selected in ordinary wound rolling. If this is set to false, our wound can only be directly instantiated by use of specific typepath. |
compete_for_wounding | If true, we will attempt to, during a random wound roll, overpower and remove other wound typepaths from the possible wounds list using [competition_mode] and [overpower_wounds_of_even_severity]. |
competition_mode | The competition mode with which we will remove other wounds from a possible wound roll assuming [compete_for_wounding] is TRUE. See wounds.dm, the defines file, for more information on what these do. |
duplicates_allowed | If false, we will iterate through wounds on a given limb, and if any match our type, we wont add our wound. |
ignore_cannot_bleed | If we require BIO_BLOODED, we will not add our wound if this is true and the limb cannot bleed. |
match_all_wounding_types | If true, this wound can only be generated by all [required_wounding_types] at once, not just any. |
overpower_wounds_of_even_severity | If this and [compete_for_wounding] is true, we will remove wounds of an even severity to us during a random wound roll. |
require_any_biostate | If false, we will check if the limb has all of our required biostates instead of just any. |
required_limb_biostate | A list of biostates a limb must have to receive our wound, in wounds.dm. |
required_wounding_types | The types of attack that can generate this wound. E.g. WOUND_SLASH = A sharp attack can cause this, WOUND_BLUNT = an attack with no sharpness/an attack with sharpness against a limb with mangled exterior can cause this. |
scar_priorities | A list of BIO_ defines that will be iterated over in order to determine the scar file our wound will generate. Use generate_scar_priorities to create a custom list. |
threshold_minimum | The minimum injury roll a attack must get to generate us. Affected by our wound's threshold_penalty and series_threshold_penalty, as well as the attack's wound_bonus. See check_wounding_mods(). |
viable_zones | A list of bodyzones we are applicable to. |
weight | The weight that will be used if, by the end of wound selection, there are multiple valid wounds. This will be inserted into pick_weight, so use integers. |
wound_path_to_generate | The typepath of the wound we will be handling and storing data of. NECESSARY IF THIS IS A NON-ABSTRACT TYPE! |
wound_series | The series of wounds this is in. See wounds.dm (the defines file) for a more detailed explanation - but tldr is that no 2 wounds of the same series can be on a limb. |
Procs | |
biostate_valid | Returns true if we have the given biostates, or any biostate in it if check_for_any is true. False otherwise. |
can_be_applied_to | Args: |
generate_instance | Returns a new instance of our wound datum. |
generate_scar_priorities | Should return a list of BIO_ biostate priorities, in order. See [scar_priorities] for further documentation. |
get_threshold_for | A simple getter for [threshold_minimum], with arguments supplied to allow custom behavior. |
get_weight | A simple getter for [weight], with arguments supplied to allow custom behavior. |
wounding_types_valid | Returns TRUE if we use WOUND_ALL, or we require all types and have all/if we require any and have any, FALSE otherwise. |
Var Details
abstract
Will this be instantiated?
can_be_randomly_generated
If true, our wound can be selected in ordinary wound rolling. If this is set to false, our wound can only be directly instantiated by use of specific typepath.
compete_for_wounding
If true, we will attempt to, during a random wound roll, overpower and remove other wound typepaths from the possible wounds list using [competition_mode] and [overpower_wounds_of_even_severity].
competition_mode
The competition mode with which we will remove other wounds from a possible wound roll assuming [compete_for_wounding] is TRUE. See wounds.dm, the defines file, for more information on what these do.
duplicates_allowed
If false, we will iterate through wounds on a given limb, and if any match our type, we wont add our wound.
ignore_cannot_bleed
If we require BIO_BLOODED, we will not add our wound if this is true and the limb cannot bleed.
match_all_wounding_types
If true, this wound can only be generated by all [required_wounding_types] at once, not just any.
overpower_wounds_of_even_severity
If this and [compete_for_wounding] is true, we will remove wounds of an even severity to us during a random wound roll.
require_any_biostate
If false, we will check if the limb has all of our required biostates instead of just any.
required_limb_biostate
A list of biostates a limb must have to receive our wound, in wounds.dm.
required_wounding_types
The types of attack that can generate this wound. E.g. WOUND_SLASH = A sharp attack can cause this, WOUND_BLUNT = an attack with no sharpness/an attack with sharpness against a limb with mangled exterior can cause this.
scar_priorities
A list of BIO_ defines that will be iterated over in order to determine the scar file our wound will generate. Use generate_scar_priorities to create a custom list.
threshold_minimum
The minimum injury roll a attack must get to generate us. Affected by our wound's threshold_penalty and series_threshold_penalty, as well as the attack's wound_bonus. See check_wounding_mods().
viable_zones
A list of bodyzones we are applicable to.
weight
The weight that will be used if, by the end of wound selection, there are multiple valid wounds. This will be inserted into pick_weight, so use integers.
wound_path_to_generate
The typepath of the wound we will be handling and storing data of. NECESSARY IF THIS IS A NON-ABSTRACT TYPE!
wound_series
The series of wounds this is in. See wounds.dm (the defines file) for a more detailed explanation - but tldr is that no 2 wounds of the same series can be on a limb.
Proc Details
biostate_valid
Returns true if we have the given biostates, or any biostate in it if check_for_any is true. False otherwise.
can_be_applied_to
Args:
- obj/item/bodypart/limb: The limb we are considering.
- list/suggested_wounding_types: The wounding types to be checked against the wounding types we require. Defaults to required_wounding_types.
- datum/wound/old_wound: If we would replace a wound, this would be said wound. Nullable.
- random_roll = FALSE: If this is in the context of a random wound generation, and this wound wasn't specifically checked.
Returns: FALSE if the limb cannot be wounded, if the wounding types don't match ours (via wounding_types_valid()), if we have a higher severity wound already in our series, if we have a biotype mismatch, if the limb isn't in a viable zone, or if there's any duplicate wound types. TRUE otherwise.
generate_instance
Returns a new instance of our wound datum.
generate_scar_priorities
Should return a list of BIO_ biostate priorities, in order. See [scar_priorities] for further documentation.
get_threshold_for
A simple getter for [threshold_minimum], with arguments supplied to allow custom behavior.
Args:
- obj/item/bodypart/part: The limb we are contemplating being added to.
- attack_direction: The direction of the attack that'd generate us. Nullable.
- damage_source: The source of the damage that'd cause us. Nullable.
get_weight
A simple getter for [weight], with arguments supplied to allow custom behavior.
Args:
- obj/item/bodypart/limb: The limb we are contemplating being added to. Nullable.
- woundtype: The woundtype of the assumed attack that would generate us. Nullable.
- damage: The raw damage that would cause us. Nullable.
- attack_direction: The direction of the attack that'd cause us. Nullable.
- damage_source: The entity that would cause us. Nullable.
Returns: Our weight.
wounding_types_valid
Returns TRUE if we use WOUND_ALL, or we require all types and have all/if we require any and have any, FALSE otherwise.