mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-21 15:23:13 +00:00
77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
/obj/structure/closet/crate/secure
|
|
desc = "A secure crate."
|
|
name = "secure crate"
|
|
icon_state = "securecrate"
|
|
secure = TRUE
|
|
locked = TRUE
|
|
max_integrity = 500
|
|
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
|
var/tamperproof = 0
|
|
|
|
/obj/structure/closet/crate/secure/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
|
if(damage_flag == "melee" && damage_amount < 25)
|
|
return 0
|
|
. = ..()
|
|
|
|
/obj/structure/closet/crate/secure/update_icon()
|
|
..()
|
|
if(broken)
|
|
add_overlay("securecrateemag")
|
|
else if(locked)
|
|
add_overlay("securecrater")
|
|
else
|
|
add_overlay("securecrateg")
|
|
|
|
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
|
if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION)
|
|
boom()
|
|
else
|
|
..()
|
|
|
|
|
|
/obj/structure/closet/crate/secure/proc/boom(mob/user)
|
|
if(user)
|
|
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
|
|
var/message = "[ADMIN_LOOKUPFLW(user)] has detonated [src.name]."
|
|
GLOB.bombers += message
|
|
message_admins(message)
|
|
log_game("[key_name(user)] has detonated [src.name].")
|
|
for(var/atom/movable/AM in src)
|
|
qdel(AM)
|
|
explosion(get_turf(src), 0, 1, 5, 5)
|
|
qdel(src)
|
|
|
|
/obj/structure/closet/crate/secure/weapon
|
|
desc = "A secure weapons crate."
|
|
name = "weapons crate"
|
|
icon_state = "weaponcrate"
|
|
|
|
/obj/structure/closet/crate/secure/plasma
|
|
desc = "A secure plasma crate."
|
|
name = "plasma crate"
|
|
icon_state = "plasmacrate"
|
|
|
|
/obj/structure/closet/crate/secure/gear
|
|
desc = "A secure gear crate."
|
|
name = "gear crate"
|
|
icon_state = "secgearcrate"
|
|
|
|
/obj/structure/closet/crate/secure/hydroponics
|
|
desc = "A crate with a lock on it, painted in the scheme of the station's botanists."
|
|
name = "secure hydroponics crate"
|
|
icon_state = "hydrosecurecrate"
|
|
|
|
/obj/structure/closet/crate/secure/engineering
|
|
desc = "A crate with a lock on it, painted in the scheme of the station's engineers."
|
|
name = "secure engineering crate"
|
|
icon_state = "engi_secure_crate"
|
|
|
|
/obj/structure/closet/crate/secure/science
|
|
name = "secure science crate"
|
|
desc = "A crate with a lock on it, painted in the scheme of the station's scientists."
|
|
icon_state = "scisecurecrate"
|
|
|
|
/obj/structure/closet/crate/secure/medical
|
|
desc = "A secure medical crate."
|
|
name = "medical crate"
|
|
icon_state = "medical_secure_crate" |