Skip to content

[PORT] Fix glass floor crowbar interactions #5975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions code/game/objects/items/stacks/tiles/tile_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
var/list/tile_reskin_types
/// Cached associative lazy list to hold the radial options for tile dirs. See tile_reskinning.dm for more information.
var/list/tile_rotate_dirs
/// Allows us to replace the plating we are attacking if our baseturfs are the same.
var/replace_plating = FALSE

/obj/item/stack/tile/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1)
. = ..()
Expand Down Expand Up @@ -78,25 +76,10 @@
if(!istype(target_plating))
return

if(!replace_plating)
if(!use(1))
return
target_plating = target_plating.PlaceOnTop(placed_turf_path, flags = CHANGETURF_INHERIT_AIR)
target_plating.setDir(turf_dir)
playsound(target_plating, 'sound/weapons/genhit.ogg', 50, TRUE)
return target_plating // Most executions should end here.

// If we and the target tile share the same initial baseturf and they consent, replace em.
if(!target_plating.allow_replacement || initial(target_plating.baseturfs) != initial(placed_turf_path.baseturfs))
to_chat(user, span_notice("You cannot place this tile here directly!"))
return
to_chat(user, span_notice("You begin replacing the floor with the tile..."))
if(!istype(target_plating))
return
if(!use(1))
return

target_plating = target_plating.ChangeTurf(placed_turf_path, target_plating.baseturfs, CHANGETURF_INHERIT_AIR)
target_plating = target_plating.place_on_top(placed_turf_path, flags = CHANGETURF_INHERIT_AIR)

Check failure on line 82 in code/game/objects/items/stacks/tiles/tile_types.dm

View workflow job for this annotation

GitHub Actions / Run Linters

OD0404: Unknown identifier "place_on_top"

Check failure on line 82 in code/game/objects/items/stacks/tiles/tile_types.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined proc: "place_on_top" on /turf/open/floor/plating
target_plating.setDir(turf_dir)
playsound(target_plating, 'sound/weapons/genhit.ogg', 50, TRUE)
return target_plating
Expand Down Expand Up @@ -1308,7 +1291,6 @@
inhand_icon_state = "tile-glass"
merge_type = /obj/item/stack/tile/glass
mats_per_unit = list(/datum/material/glass=SHEET_MATERIAL_AMOUNT * 0.25) // 4 tiles per sheet
replace_plating = TRUE

/obj/item/stack/tile/glass/sixty
amount = 60
Expand All @@ -1322,7 +1304,6 @@
turf_type = /turf/open/floor/glass/reinforced
merge_type = /obj/item/stack/tile/rglass
mats_per_unit = list(/datum/material/iron=SHEET_MATERIAL_AMOUNT * 0.125, /datum/material/glass=SHEET_MATERIAL_AMOUNT * 0.25) // 4 tiles per sheet
replace_plating = TRUE

/obj/item/stack/tile/rglass/sixty
amount = 60
Expand Down
4 changes: 0 additions & 4 deletions code/game/turfs/open/floor/glass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
icon = 'icons/turf/floors/glass.dmi'
icon_state = "glass-0"
base_icon_state = "glass"
baseturfs = /turf/baseturf_bottom
layer = GLASS_FLOOR_LAYER
underfloor_accessibility = UNDERFLOOR_VISIBLE
smoothing_flags = SMOOTH_BITMASK
Expand All @@ -15,7 +14,6 @@
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
floor_tile = /obj/item/stack/tile/glass
overfloor_placed = FALSE
/// List of /atom/movable/render_step that are being used to make this glass floor glow
/// These are OWNED by this floor, they delete when we delete them, not before not after
var/list/glow_stuff
Expand Down Expand Up @@ -54,8 +52,6 @@
glow_stuff = partially_block_emissives(src, alpha_to_leave)
set_light(l_outer_range = 2, l_power = 0.75, l_color = starlight_color)

/turf/open/floor/glass/make_plating()
return

/turf/open/floor/glass/icemoon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
Expand Down
5 changes: 0 additions & 5 deletions code/game/turfs/open/floor/plating.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
//Used for upgrading this into R-Plating
var/upgradable = TRUE

/// If true, will allow tiles to replace us if the tile [wants to] [/obj/item/stack/tile/var/replace_plating].
/// And if our baseturfs are compatible.
/// See [/obj/item/stack/tile/proc/place_tile].
var/allow_replacement = TRUE

/turf/open/floor/plating/broken_states()
return list("damaged1", "damaged2", "damaged4")
Expand Down Expand Up @@ -195,7 +191,6 @@
heat_capacity = INFINITY

baseturfs = /turf/open/floor/plating
allow_replacement = FALSE
rcd_proof = TRUE
upgradable = FALSE

Expand Down
Loading