[MIRROR] Defines damage flags. (Hopefully without 50+ commits) (#491)

* Defines damage flags. (#53158)

* Defines damage flags. (Hopefully without 50+ commits)

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
This commit is contained in:
SkyratBot
2020-08-24 22:52:31 +02:00
committed by GitHub
parent a6c3cbb8e3
commit 3bd294f26f
278 changed files with 731 additions and 700 deletions
@@ -9,7 +9,7 @@
light_on = FALSE
integrity_failure = 0.5
max_integrity = 100
armor = list("melee" = 0, "bullet" = 20, "laser" = 20, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 0, "acid" = 0)
armor = list(MELEE = 0, BULLET = 20, LASER = 20, ENERGY = 100, BOMB = 0, BIO = 100, RAD = 100, FIRE = 0, ACID = 0)
var/enabled = 0 // Whether the computer is turned on.
var/screen_on = 1 // Whether the computer is active/opened/it's screen is on.
@@ -2,9 +2,9 @@
. = ..()
var/component_probability = min(50, max(damage_amount*0.1, 1 - obj_integrity/max_integrity))
switch(damage_flag)
if("bullet")
if(BULLET)
component_probability = damage_amount * 0.5
if("laser")
if(LASER)
component_probability = damage_amount * 0.66
if(component_probability)
for(var/I in all_components)