Skip to content
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

[MIRROR] Makes placing plating on lava-proof rods delete the rods and not break lighting on that tile for the rest of the round #1539

Merged
merged 1 commit into from
Jan 14, 2024
Merged
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
22 changes: 13 additions & 9 deletions code/game/objects/structures/lattice.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,18 @@
/obj/structure/lattice/lava/deconstruction_hints(mob/user)
return span_notice("The rods look like they could be <b>cut</b>, but the <i>heat treatment will shatter off</i>. There's space for a <i>tile</i>.")

/obj/structure/lattice/lava/attackby(obj/item/C, mob/user, params)
/obj/structure/lattice/lava/attackby(obj/item/attacking_item, mob/user, params)
. = ..()
if(istype(C, /obj/item/stack/tile/iron))
var/obj/item/stack/tile/iron/P = C
if(P.use(1))
to_chat(user, span_notice("You construct a floor plating, as lava settles around the rods."))
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
new /turf/open/floor/plating(locate(x, y, z))
else
to_chat(user, span_warning("You need one floor tile to build atop [src]."))
if(!istype(attacking_item, /obj/item/stack/tile/iron))
return
var/obj/item/stack/tile/iron/attacking_tiles = attacking_item
if(!attacking_tiles.use(1))
to_chat(user, span_warning("You need one floor tile to build atop [src]."))
return
to_chat(user, span_notice("You construct new plating with [src] as support."))
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)

var/turf/turf_we_place_on = get_turf(src)
turf_we_place_on.place_on_top(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)

qdel(src)
Loading