mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 01:24:21 +01:00
[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user