Files
Bubberstation/code/game/objects/structures.dm
LemonInTheDark b59132ad60 Removes Corner Smoothing (Mild Bitmask Improvements) (#90002)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

[Removes all remaining users of SMOOTH_CORNER + dirt
automation](71d120511a)

Removes all remaining instances of overlay smoothing (the deprecated
system that stitches corners together IN ENGINE) from the game.

This amounts to:
The test smoothing wall, which I converted to just bitmask + diagonals 
Stationary canisters, which I've done the same to (alongside adding all
the states to gags, which around doubled their gags count). These
autocut now.

I've also given dirt icons autocutting, for spriter convieneince (I
would have done this before but I didn't know they smoothed)

[Removes corner smoothing from the
codebase](98ebe58152)

This code is OLD, and has been functionally deprecated for as long as
I've been here. It basically does what bitmask smoothing does, but
instead of prebaking connections they're formed in engine with overlays.

This is... fine, and does TECHNICALLY allow for unique effects, but
none's gonna use it because the details are so niche, so it just becomes
a risk factor for someone fucking up and using overlays for some reason.

What it does do then is clutter up our smoothing code with 2 different
async systems, one of which functions SLIGHTLY differently from its
brother. IMO it just works to confuse people trying to read smoothing
code (already quite confusing).

I've removed it, alongside its bespoke code/variables, excluding
area_limited_icon_smoothing, a var on areas that prevents smoothing out
of network, which I have instead integrated into bitmask smoothing.

I've updated snowflake's documentation to be more up to date with modern
systems, and earmarked where explanations/automation for the more...
underdeveloped bits of smoothing should go in the future.

## Why It's Good For The Game

I relapsed and needed something to put that energy towards.

We don't really want people to use this, and none knows enough about it
to take advantage of its theoretical uses.
Really its only purpose right now is making understanding diagonal
smoothing easier, and that's not all that hard of a task.
Better to remove and integrate then to let rot and confuse.

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and its effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
add: Smoothed objects on shuttles now will only smooth with other
shuttles (added support for extensions of this system)
refactor: I've funked around with our smoothing system, cutting out some
older code. Lemme know if anything is weird PLEASE
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-03-20 15:42:16 +13:00

80 lines
2.6 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
armor_type = /datum/armor/obj_structure
burning_particles = /particles/smoke/burning
var/broken = FALSE
/datum/armor/obj_structure
fire = 50
acid = 50
/obj/structure/Initialize(mapload)
. = ..()
if(smoothing_flags & USES_SMOOTHING)
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
GLOB.cameranet.updateVisibility(src)
/obj/structure/Destroy(force)
GLOB.cameranet.updateVisibility(src)
if(smoothing_flags & USES_SMOOTHING)
QUEUE_SMOOTH_NEIGHBORS(src)
return ..()
/obj/structure/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
add_fingerprint(usr)
return ..()
/obj/structure/examine(mob/user)
. = ..()
if(!(resistance_flags & INDESTRUCTIBLE))
if(resistance_flags & ON_FIRE)
. += span_warning("It's on fire!")
if(broken)
. += span_notice("It appears to be broken.")
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 = (atom_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_warning("It's falling apart!")
/obj/structure/examine_descriptor(mob/user)
return "structure"
/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 * 2.5e-4, BURN, "energy")
power -= power * 5e-4 //walls take a lot out of ya
. = ..()
/obj/structure/animate_atom_living(mob/living/owner)
new /mob/living/basic/mimic/copy(drop_location(), src, owner)
/// For when a mob comes flying through the window, smash it and damage the mob
/obj/structure/proc/smash_and_injure(mob/living/flying_mob, atom/oldloc, direction)
flying_mob.balloon_alert_to_viewers("smashed through!")
flying_mob.apply_damage(damage = rand(5, 15), damagetype = BRUTE, wound_bonus = 15, bare_wound_bonus = 25, sharpness = SHARP_EDGED, attack_direction = get_dir(src, oldloc))
new /obj/effect/decal/cleanable/glass(get_step(flying_mob, flying_mob.dir))
deconstruct(disassembled = FALSE)