mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-21 12:26:35 +01:00
PCUs and SR Connected Computers (#4040)
* PCU and Connected Consoles * Clean this up
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/obj/item/modular_computer/examine(mob/user)
|
||||
. = ..()
|
||||
if(damage > broken_damage)
|
||||
. += "<span class='danger'>It is heavily damaged!</span>"
|
||||
. += SPAN_DANGER("It is heavily damaged!")
|
||||
else if(damage)
|
||||
. += "It is damaged."
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
H.take_damage(rand(10,30))
|
||||
qdel()
|
||||
|
||||
/obj/item/modular_computer/take_damage(var/amount, var/component_probability, var/damage_casing = 1, var/randomize = 1)
|
||||
/obj/item/modular_computer/take_damage(amount, component_probability, damage_casing = TRUE, randomize = TRUE)
|
||||
if(randomize)
|
||||
// 75%-125%, rand() works with integers, apparently.
|
||||
amount *= (rand(75, 125) / 100.0)
|
||||
@@ -33,19 +33,23 @@
|
||||
if(damage >= max_damage)
|
||||
break_apart()
|
||||
|
||||
// Stronger explosions cause serious damage to internal components
|
||||
// Minor explosions are mostly mitigitated by casing.
|
||||
/obj/item/modular_computer/ex_act(var/severity)
|
||||
/**
|
||||
* Stronger explosions cause serious damage to internal components
|
||||
* Minor explosions are mostly mitigitated by casing.
|
||||
*/
|
||||
/obj/item/modular_computer/ex_act(severity)
|
||||
take_damage(rand(100,200) / severity, 30 / severity)
|
||||
|
||||
// EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components
|
||||
/obj/item/modular_computer/emp_act(var/severity)
|
||||
/// EMPs are similar to explosions, but don't cause physical damage to the casing. Instead they screw up the components
|
||||
/obj/item/modular_computer/emp_act(severity)
|
||||
take_damage(rand(100,200) / severity, 50 / severity, 0)
|
||||
|
||||
// "Stun" weapons can cause minor damage to components (short-circuits?)
|
||||
// "Burn" damage is equally strong against internal components and exterior casing
|
||||
// "Brute" damage mostly damages the casing.
|
||||
/obj/item/modular_computer/bullet_act(var/obj/item/projectile/Proj)
|
||||
/**
|
||||
* "Stun" weapons can cause minor damage to components (short-circuits?)
|
||||
* "Burn" damage is equally strong against internal components and exterior casing
|
||||
* "Brute" damage mostly damages the casing.
|
||||
*/
|
||||
/obj/item/modular_computer/bullet_act(obj/item/projectile/Proj)
|
||||
switch(Proj.damage_type)
|
||||
if(BRUTE)
|
||||
take_damage(Proj.damage, Proj.damage / 2)
|
||||
|
||||
Reference in New Issue
Block a user