mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Armor defines (#20563)
Added armor defines Converted raw strings use to defines Added UT test to ensure people set the armor var correctly (to a list) No player facing changes
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
if(isnull(armor_values[key]))
|
||||
return 0
|
||||
if(armor_flags & ARMOR_TYPE_RIG)
|
||||
if(key == "bio" && sealed)
|
||||
if(key == BIO && sealed)
|
||||
return 100
|
||||
return min(armor_values[key], 100)
|
||||
|
||||
@@ -90,23 +90,23 @@
|
||||
switch(damage_type)
|
||||
if(DAMAGE_BRUTE)
|
||||
if(damage_flags & DAMAGE_FLAG_BULLET)
|
||||
key = "bullet"
|
||||
key = BULLET
|
||||
else if(damage_flags & DAMAGE_FLAG_EXPLODE)
|
||||
key = "bomb"
|
||||
key = BOMB
|
||||
else
|
||||
key = "melee"
|
||||
key = MELEE
|
||||
if(DAMAGE_BURN)
|
||||
if(damage_flags & DAMAGE_FLAG_LASER)
|
||||
key = "laser"
|
||||
key = LASER
|
||||
else if(damage_flags & DAMAGE_FLAG_EXPLODE)
|
||||
key = "bomb"
|
||||
key = BOMB
|
||||
else
|
||||
key = "energy"
|
||||
key = ENERGY
|
||||
if (DAMAGE_TOXIN)
|
||||
if(damage_flags & DAMAGE_FLAG_BIO)
|
||||
key = "bio" // Otherwise just not blocked by default.
|
||||
key = BIO // Otherwise just not blocked by default.
|
||||
if (DAMAGE_RADIATION)
|
||||
key = "rad"
|
||||
key = RAD
|
||||
return key
|
||||
|
||||
/datum/component/armor/toggle
|
||||
|
||||
Reference in New Issue
Block a user