mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-16 03:56:20 +00:00
* Adds emissive carpet, adds plane support to decal element - Adds a basic abstract/debugging emissive carpet - Makes decals capable of supporting plane - Adds auto-smoothing decals * Adds simple neon carpet variations * Adds neon carpet reagents and recipes * Refactors emissive blockers to allow multiple layers of emissive / emissive blocking objects - Splits the emissive and emissive blocker plane masters into several plane masters which handle different layers of emissiveness. * Makes neon carpet tile stacks emissive * Rearranges and docs some emissive plane masters - Folds the overlay lighting plane master into the emissive planes since it is also used to mask the lighting plane * Fixes null mats_per_unit stack recombining after splitting - I think I broke this a while ago when I reworked how stacks handle materials. Whoops. - This basically only effects carpet at the moment. Good thing I did this when I did! * Adds neon carpets to cargo - Adds a cargo supply crate containing a _lot_ of neon carpets for 3000 credits * Fixes neon carpet highlights leaking through vending machines and such - Turns out vending machines axed their own emissive blockers whenever they updated their icon because they cleared their managed_vis_overlays... - Generic emissive blocking has been elementized and some update_overlays procs have been straightened out. * Fixes id_arg_index for the emissive blocker element * Commits @Rohsie's suggestions
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
/// Inert structures, such as girders, machine frames, and crates/lockers.
|
|
/obj/structure
|
|
icon = 'icons/obj/structures.dmi'
|
|
pressure_resistance = 8
|
|
max_integrity = 300
|
|
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT
|
|
layer = BELOW_OBJ_LAYER
|
|
flags_ricochet = RICOCHET_HARD
|
|
receive_ricochet_chance_mod = 0.6
|
|
pass_flags_self = PASSSTRUCTURE
|
|
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
|
emissive_blocker_plane = STRUCTURE_EMISSIVE_BLOCKER_PLANE
|
|
var/broken = FALSE
|
|
|
|
/obj/structure/Initialize()
|
|
if (!armor)
|
|
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 50)
|
|
. = ..()
|
|
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
|
QUEUE_SMOOTH(src)
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
if(smoothing_flags & SMOOTH_CORNERS)
|
|
icon_state = ""
|
|
GLOB.cameranet.updateVisibility(src)
|
|
|
|
/obj/structure/Destroy()
|
|
GLOB.cameranet.updateVisibility(src)
|
|
if(smoothing_flags & (SMOOTH_CORNERS|SMOOTH_BITMASK))
|
|
QUEUE_SMOOTH_NEIGHBORS(src)
|
|
return ..()
|
|
|
|
/obj/structure/ui_act(action, params)
|
|
add_fingerprint(usr)
|
|
return ..()
|
|
|
|
/obj/structure/examine(mob/user)
|
|
. = ..()
|
|
if(!(resistance_flags & INDESTRUCTIBLE))
|
|
if(resistance_flags & ON_FIRE)
|
|
. += "<span class='warning'>It's on fire!</span>"
|
|
if(broken)
|
|
. += "<span class='notice'>It appears to be broken.</span>"
|
|
var/examine_status = examine_status(user)
|
|
if(examine_status)
|
|
. += examine_status
|
|
|
|
/obj/structure/proc/examine_status(mob/user) //An overridable proc, mostly for falsewalls.
|
|
var/healthpercent = (obj_integrity/max_integrity) * 100
|
|
switch(healthpercent)
|
|
if(50 to 99)
|
|
return "It looks slightly damaged."
|
|
if(25 to 50)
|
|
return "It appears heavily damaged."
|
|
if(0 to 25)
|
|
if(!broken)
|
|
return "<span class='warning'>It's falling apart!</span>"
|
|
|
|
/obj/structure/rust_heretic_act()
|
|
take_damage(500, BRUTE, "melee", 1)
|
|
|
|
/obj/structure/zap_act(power, zap_flags)
|
|
if(zap_flags & ZAP_OBJ_DAMAGE)
|
|
take_damage(power/8000, BURN, "energy")
|
|
power -= power/2000 //walls take a lot out of ya
|
|
. = ..()
|