Does the neutral trait thing for everyone, and also updates Shadekin a lil (#4148)

* Auuugh

* Fixes shi
This commit is contained in:
Zandario
2022-06-03 14:38:04 -07:00
committed by GitHub
parent 78b93ff401
commit b8a9fcb6b4
36 changed files with 759 additions and 506 deletions
+95 -48
View File
@@ -1,54 +1,101 @@
// This is a datum that tells the mob that something is affecting them.
// The advantage of using this datum verses just setting a variable on the mob directly, is that there is no risk of two different procs overwriting
// each other, or other weirdness. An excellent example is adjusting max health.
/**
* This is a datum that tells the mob that something is affecting them.
* The advantage of using this datum verses just setting a variable on the mob directly, is that there is no risk of two different procs overwriting
* each other, or other weirdness. An excellent example is adjusting max health.
*/
/datum/modifier
var/name = null // Mostly used to organize, might show up on the UI in the Future(tm)
var/desc = null // Ditto.
var/icon_state = null // See above.
var/mob/living/holder = null // The mob that this datum is affecting.
var/datum/weakref/origin = null // A weak reference to whatever caused the modifier to appear. THIS NEEDS TO BE A MOB/LIVING. It's a weakref to not interfere with qdel().
var/expire_at = null // world.time when holder's Life() will remove the datum. If null, it lasts forever or until it gets deleted by something else.
var/on_created_text = null // Text to show to holder upon being created.
var/on_expired_text = null // Text to show to holder when it expires.
var/hidden = FALSE // If true, it will not show up on the HUD in the Future(tm)
var/stacks = MODIFIER_STACK_FORBID // If true, attempts to add a second instance of this type will refresh expire_at instead.
var/flags = 0 // Flags for the modifier, see mobs.dm defines for more details.
/// Mostly used to organize, might show up on the UI in the Future(tm)
var/name = null
/// Ditto.
var/desc = null
/// See above.
var/icon_state = null
/// The mob that this datum is affecting.
var/mob/living/holder = null
/// A weak reference to whatever caused the modifier to appear. THIS NEEDS TO BE A MOB/LIVING. It's a weakref to not interfere with qdel().
var/datum/weakref/origin = null
/// world.time when holder's Life() will remove the datum. If null, it lasts forever or until it gets deleted by something else.
var/expire_at = null
/// Text to show to holder upon being created.
var/on_created_text = null
/// Text to show to holder when it expires.
var/on_expired_text = null
/// If true, it will not show up on the HUD in the Future(tm)
var/hidden = FALSE
/// If true, attempts to add a second instance of this type will refresh expire_at instead.
var/stacks = MODIFIER_STACK_FORBID
/// Flags for the modifier, see mobs.dm defines for more details.
var/flags = 0
var/light_color = null // If set, the mob possessing the modifier will glow in this color. Not implemented yet.
var/light_range = null // How far the light for the above var goes. Not implemented yet.
var/light_intensity = null // Ditto. Not implemented yet.
var/mob_overlay_state = null // Icon_state for an overlay to apply to a (human) mob while this exists. This is actually implemented.
var/client_color = null // If set, the client will have the world be shown in this color, from their perspective.
var/wire_colors_replace = null // If set, the client will have wires replaced by the given replacement list. For colorblindness.
/// If set, the mob possessing the modifier will glow in this color. Not implemented yet.
var/light_color = null
/// How far the light for the above var goes. Not implemented yet.
var/light_range = null
/// Ditto. Not implemented yet.
var/light_intensity = null
/// Icon_state for an overlay to apply to a (human) mob while this exists. This is actually implemented.
var/mob_overlay_state = null
/// If set, the client will have the world be shown in this color, from their perspective.
var/client_color = null
/// If set, the client will have wires replaced by the given replacement list. For colorblindness.
var/wire_colors_replace = null
// Now for all the different effects.
// Percentage modifiers are expressed as a multipler. (e.g. +25% damage should be written as 1.25)
var/max_health_flat // Adjusts max health by a flat (e.g. +20) amount. Note this is added to base health.
var/max_health_percent // Adjusts max health by a percentage (e.g. -30%).
var/disable_duration_percent // Adjusts duration of 'disables' (stun, weaken, paralyze, confusion, sleep, halloss, etc) Setting to 0 will grant immunity.
var/incoming_damage_percent // Adjusts all incoming damage.
var/incoming_brute_damage_percent // Only affects bruteloss.
var/incoming_fire_damage_percent // Only affects fireloss.
var/incoming_tox_damage_percent // Only affects toxloss.
var/incoming_oxy_damage_percent // Only affects oxyloss.
var/incoming_clone_damage_percent // Only affects cloneloss.
var/incoming_hal_damage_percent // Only affects halloss.
var/incoming_healing_percent // Adjusts amount of healing received.
var/outgoing_melee_damage_percent // Adjusts melee damage inflicted by holder by a percentage. Affects attacks by melee weapons and hand-to-hand.
var/slowdown // Negative numbers speed up, positive numbers slow down movement.
var/haste // If set to 1, the mob will be 'hasted', which makes it ignore slowdown and go really fast.
var/evasion // Positive numbers reduce the odds of being hit. Negative numbers increase the odds.
var/bleeding_rate_percent // Adjusts amount of blood lost when bleeding.
var/accuracy // Positive numbers makes hitting things with guns easier, negatives make it harder.
var/accuracy_dispersion // Positive numbers make gun firing cover a wider tile range, and therefore more inaccurate. Negatives help negate dispersion penalties.
var/metabolism_percent // Adjusts the mob's metabolic rate, which affects reagent processing. Won't affect mobs without reagent processing.
var/icon_scale_x_percent // Makes the holder's icon get scaled wider or thinner.
var/icon_scale_y_percent // Makes the holder's icon get scaled taller or shorter.
var/attack_speed_percent // Makes the holder's 'attack speed' (click delay) shorter or longer.
var/pain_immunity // Makes the holder not care about pain while this is on. Only really useful to human mobs.
var/pulse_modifier // Modifier for pulse, will be rounded on application, then added to the normal 'pulse' multiplier which ranges between 0 and 5 normally. Only applied if they're living.
var/pulse_set_level // Positive number. If this is non-null, it will hard-set the pulse level to this. Pulse ranges from 0 to 5 normally.
//! Now for all the different effects.
//! Percentage modifiers are expressed as a multipler. (e.g. +25% damage should be written as 1.25)
/// Adjusts max health by a flat (e.g. +20) amount. Note this is added to base health.
var/max_health_flat
/// Adjusts max health by a percentage (e.g. -30%).
var/max_health_percent
/// Adjusts duration of 'disables' (stun, weaken, paralyze, confusion, sleep, halloss, etc) Setting to 0 will grant immunity.
var/disable_duration_percent
/// Adjusts all incoming damage.
var/incoming_damage_percent
/// Only affects bruteloss.
var/incoming_brute_damage_percent
/// Only affects fireloss.
var/incoming_fire_damage_percent
/// Only affects toxloss.
var/incoming_tox_damage_percent
/// Only affects oxyloss.
var/incoming_oxy_damage_percent
/// Only affects cloneloss.
var/incoming_clone_damage_percent
/// Only affects halloss.
var/incoming_hal_damage_percent
/// Adjusts amount of healing received.
var/incoming_healing_percent
/// Adjusts melee damage inflicted by holder by a percentage. Affects attacks by melee weapons and hand-to-hand.
var/outgoing_melee_damage_percent
/// Negative numbers speed up, positive numbers slow down movement.
var/slowdown
/// If set to 1, the mob will be 'hasted', which makes it ignore slowdown and go really fast.
var/haste
/// Positive numbers reduce the odds of being hit. Negative numbers increase the odds.
var/evasion
/// Adjusts amount of blood lost when bleeding.
var/bleeding_rate_percent
/// Positive numbers makes hitting things with guns easier, negatives make it harder.
var/accuracy
/// Positive numbers make gun firing cover a wider tile range, and therefore more inaccurate. Negatives help negate dispersion penalties.
var/accuracy_dispersion
/// Adjusts the mob's metabolic rate, which affects reagent processing. Won't affect mobs without reagent processing.
var/metabolism_percent
/// Makes the holder's icon get scaled wider or thinner.
var/icon_scale_x_percent
/// Makes the holder's icon get scaled taller or shorter.
var/icon_scale_y_percent
/// Makes the holder's 'attack speed' (click delay) shorter or longer.
var/attack_speed_percent
/// Makes the holder not care about pain while this is on. Only really useful to human mobs.
var/pain_immunity
/// Modifier for pulse, will be rounded on application, then added to the normal 'pulse' multiplier which ranges between 0 and 5 normally. Only applied if they're living.
var/pulse_modifier
/// Positive number. If this is non-null, it will hard-set the pulse level to this. Pulse ranges from 0 to 5 normally.
var/pulse_set_level
/// Vision flags to add to the mob. SEE_MOB, SEE_OBJ, etc.
var/vision_flags
/datum/modifier/New(var/new_holder, var/new_origin)
holder = new_holder