Files
Bubberstation/code/game/objects/structures/broken_flooring.dm
SkyratBot b15b16976a [MIRROR] Attack chain refactoring: Broadening tool_act into item_interact, moving some item interactions to... atom/item_interact / item/interact_with_atom [MDB IGNORE] (#25516)
* Attack chain refactoring: Broadening `tool_act` into `item_interact`, moving some item interactions to... `atom/item_interact` / `item/interact_with_atom`

* Patches up merge skew (#80197)

## About The Pull Request

Yeah #79968 (1e76fd70b4) was not
compatible with master but no one said anything on the PR so i got
jebaited into merging it. The code should be up to the same standards
per the documentation I read (preventing thwacking the target in certain
situations while not returning anything in other situations)

master will definitely compile now though

* Patches up merge skew

* Merge conflicts

* Modular adjustments

* Removes this entirely duplicated proc...

* Update tool_override.dm

* Update weldingtool.dm

* Update tool_override.dm

* Update tool_override.dm

* Nope. Copy paste begone.

A skyrat edit is so much easier to deal with here

* Update brand_intelligence.dm

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-12-09 08:22:19 -05:00

77 lines
2.5 KiB
Plaintext

/obj/structure/broken_flooring
name = "broken tiling"
desc = "A segment of broken flooring."
icon = 'icons/obj/fluff/brokentiling.dmi'
icon_state = "corner"
anchored = TRUE
density = FALSE
opacity = FALSE
plane = FLOOR_PLANE
layer = CATWALK_LAYER
/// do we always have FLOOR_PLANE even if we arent on plating?
var/always_floorplane = FALSE
/obj/structure/broken_flooring/Initialize(mapload)
. = ..()
return INITIALIZE_HINT_LATELOAD
/obj/structure/broken_flooring/LateInitialize()
. = ..()
var/turf/turf = get_turf(src)
if(!isplatingturf(turf) && !always_floorplane) // Render as trash if not on plating
plane = GAME_PLANE
layer = LOW_OBJ_LAYER
return
for(var/obj/object in turf)
if(object.flags_1 & INITIALIZED_1)
SEND_SIGNAL(object, COMSIG_OBJ_HIDE, UNDERFLOOR_VISIBLE)
CHECK_TICK
/obj/structure/broken_flooring/crowbar_act(mob/living/user, obj/item/I)
I.play_tool_sound(src, 80)
balloon_alert(user, "tile reclaimed")
new /obj/item/stack/tile/iron(get_turf(src))
qdel(src)
return ITEM_INTERACT_SUCCESS
/obj/structure/broken_flooring/singular
icon_state = "singular"
/obj/structure/broken_flooring/singular/always_floorplane
always_floorplane = TRUE
/obj/structure/broken_flooring/pile
icon_state = "pile"
/obj/structure/broken_flooring/pile/always_floorplane
always_floorplane = TRUE
/obj/structure/broken_flooring/side
icon_state = "side"
/obj/structure/broken_flooring/side/always_floorplane
always_floorplane = TRUE
/obj/structure/broken_flooring/corner
icon_state = "corner"
/obj/structure/broken_flooring/corner/always_floorplane
always_floorplane = TRUE
/obj/structure/broken_flooring/plating
icon_state = "plating"
/obj/structure/broken_flooring/plating/always_floorplane
always_floorplane = TRUE
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/singular, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/pile, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/side, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/corner, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/plating, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/singular/always_floorplane, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/pile/always_floorplane, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/side/always_floorplane, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/corner/always_floorplane, 0)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/broken_flooring/plating/always_floorplane, 0)