mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Adds Modifier Armor (#7416)
This commit is contained in:
@@ -55,6 +55,14 @@
|
||||
var/emp_modifier // Added to the EMP strength, which is an inverse scale from 1 to 4, with 1 being the strongest EMP. 5 is a nullification.
|
||||
var/explosion_modifier // Added to the bomb strength, which is an inverse scale from 1 to 3, with 1 being gibstrength. 4 is a nullification.
|
||||
|
||||
// Note that these are combined with the mob's real armor values additatively. You can also omit specific armor types.
|
||||
var/list/armor_percent = null // List of armor values to add to the holder when doing armor calculations. This is for percentage based armor. E.g. 50 = half damage.
|
||||
var/list/armor_flat = null // Same as above but only for flat armor calculations. E.g. 5 = 5 less damage (this comes after percentage).
|
||||
// Unlike armor, this is multiplicative. Two 50% protection modifiers will be combined into 75% protection (assuming no base protection on the mob).
|
||||
var/heat_protection = null // Modifies how 'heat' protection is calculated, like wearing a firesuit. 1 = full protection.
|
||||
var/cold_protection = null // Ditto, but for cold, like wearing a winter coat.
|
||||
var/siemens_coefficient = null // Similar to above two vars but 0 = full protection, to be consistant with siemens numbers everywhere else.
|
||||
|
||||
var/vision_flags // Vision flags to add to the mob. SEE_MOB, SEE_OBJ, etc.
|
||||
|
||||
/datum/modifier/New(var/new_holder, var/new_origin)
|
||||
@@ -186,10 +194,14 @@
|
||||
|
||||
// Checks if the mob has a modifier type.
|
||||
/mob/living/proc/has_modifier_of_type(var/modifier_type)
|
||||
return get_modifier_of_type(modifier_type) ? TRUE : FALSE
|
||||
|
||||
// Gets the first instance of a specific modifier type or subtype.
|
||||
/mob/living/proc/get_modifier_of_type(var/modifier_type)
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(istype(M, modifier_type))
|
||||
return TRUE
|
||||
return FALSE
|
||||
return M
|
||||
return null
|
||||
|
||||
// This displays the actual 'numbers' that a modifier is doing. Should only be shown in OOC contexts.
|
||||
// When adding new effects, be sure to update this as well.
|
||||
|
||||
Reference in New Issue
Block a user