Plated Catwalks (#37125)

* Plated Catwalks

* fix perspective

* rewrite

* mapping aid
This commit is contained in:
west3436
2024-09-25 07:55:55 -04:00
committed by GitHub
parent 6b314ffdb3
commit 04114a8d44
7 changed files with 114 additions and 0 deletions

View File

@@ -274,6 +274,7 @@ var/list/datum/stack_recipe/metal_recipes = list (
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/metal, 1, 4, 60),
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60),
new/datum/stack_recipe("conveyor belt", /obj/item/stack/conveyor_assembly, 2, 1, 20),
new/datum/stack_recipe("plated catwalk frame", /obj/item/stack/tile/plated_catwalk, 1, 4, 60),
//new/datum/stack_recipe/dorf("chain", /obj/item/stack/chains, 2, 1, 20, 5, inherit_material = TRUE),
null,
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1 ),

View File

@@ -152,3 +152,19 @@
else
current_slowdown *= 0.01
..()
/obj/item/stack/tile/plated_catwalk
name = "plated catwalk frame"
singular_name = "plated catwalk frame"
desc = "A frame for a plated catwalk. Add rods after installing."
icon_state = "ptile"
force = 1.0
throwforce = 5
throw_speed = 5
throw_range = 10
material = "metal"
w_class = W_CLASS_MEDIUM
w_type = RECYK_METAL
flags = FPRINT
siemens_coefficient = 0
max_amount = 60

View File

@@ -52,6 +52,10 @@ var/global/list/turf/simulated/floor/phazontiles = list()
var/datum/paint_overlay/plating_paint = null
//plated catwalk vars
var/hatch_installed = FALSE
var/hatch_open = FALSE
/turf/simulated/floor/New()
create_floor_tile()
..()
@@ -122,6 +126,12 @@ var/global/list/turf/simulated/floor/phazontiles = list()
/turf/simulated/floor/update_icon()
if(lava)
return
else if(is_plated_catwalk())
icon = 'icons/turf/catwalks.dmi'
plane = TURF_PLANE
layer = PAINT_LAYER
relativewall()
relativewall_neighbours()
else if(is_metal_floor())
if(!broken && !burnt)
icon_state = icon_regular_floor
@@ -297,6 +307,9 @@ var/global/list/turf/simulated/floor/phazontiles = list()
/turf/simulated/floor/is_plating()
return !floor_tile
/turf/simulated/floor/is_plated_catwalk()
return istype(floor_tile,/obj/item/stack/tile/plated_catwalk)
/turf/simulated/floor/is_mineral_floor()
return istype(floor_tile,/obj/item/stack/tile/mineral)
@@ -504,6 +517,12 @@ var/global/list/turf/simulated/floor/phazontiles = list()
advanced_graffiti_overlay = null
qdel(advanced_graffiti)
remove_floor_tile()
else if(is_plated_catwalk())
if(hatch_installed)
to_chat(user, "<span class='notice'>The hatch falls apart after removing \the [src].</span>")
new /obj/item/stack/rods(src,2)
icon = 'icons/turf/floors.dmi'
overlays.Cut()
else
//No longer phazon, not a teleport destination
if(material=="phazon")
@@ -527,6 +546,8 @@ var/global/list/turf/simulated/floor/phazontiles = list()
make_plating()
C.playtoolsound(src, 80)
else if(is_plated_catwalk())
toggle_hatch(C,user)
return
else if(istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
@@ -540,6 +561,8 @@ var/global/list/turf/simulated/floor/phazontiles = list()
return
else
to_chat(user, "<span class='warning'>You need more rods.</span>")
else if (is_plated_catwalk())
install_hatch(C,user)
else
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return
@@ -685,3 +708,58 @@ var/global/list/turf/simulated/floor/phazontiles = list()
current_slowdown = floor_tile.adjust_slowdown(L, current_slowdown)
return ..()
/turf/simulated/floor/levelupdate()
if(is_plated_catwalk())
return
else
..()
/turf/simulated/floor/proc/install_hatch(obj/item/stack/rods/R, mob/user)
if(is_plated_catwalk())
if(hatch_installed)
to_chat(user, "<span class='warning'>\The [src] already has a hatch installed.</span>")
return
if (R.amount >= 2)
to_chat(user, "<span class='notice'>You place the rods inside the catwalk frame.</span>")
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
R.use(2)
hatch_installed = TRUE
hatch_open = FALSE
update_icon()
/turf/simulated/floor/proc/toggle_hatch(obj/item/C, mob/user)
if(is_plated_catwalk())
if(!hatch_installed)
to_chat(user, "<span class='warning'>\The [src] is missing a maintenance hatch!</span>")
return
to_chat(user, "<span class='notice'>You [hatch_open ? "replace" : "remove"] the [src]'s maintenance hatch.</span>")
C.playtoolsound(src, 80)
hatch_open = !hatch_open
update_icon()
/turf/simulated/floor/canSmoothWith()
return is_plated_catwalk()
/turf/simulated/floor/relativewall()
if(is_plated_catwalk())
icon_state = "pcat[..()]"
overlays.Cut()
overlays += mutable_appearance(icon='icons/turf/floors.dmi', icon_state="plating", layer = CATWALK_LAYER, plane = ABOVE_PLATING_PLANE)
if(!hatch_open && hatch_installed)
overlays += mutable_appearance(icon='icons/turf/catwalks.dmi', icon_state="[icon_state]_olay", layer = PAINT_LAYER, plane = TURF_PLANE)
else
..()
/turf/simulated/floor/isSmoothableNeighbor(atom/A)
if(istype(A, /turf/simulated/floor))
var/turf/simulated/floor/F = A
return F.is_plated_catwalk()
/turf/simulated/floor/examine(mob/user)
..()
if(is_plated_catwalk())
if(hatch_installed)
to_chat(user, "<span class='notice'>The maintenance hatch has been installed.</span>")
else
to_chat(user, "<span class='warning'>\The [src] is missing a maintenance hatch!</span>")

View File

@@ -540,3 +540,20 @@
oxygen=0 // BIRDS HATE OXYGEN FOR SOME REASON
nitrogen = MOLES_O2STANDARD+MOLES_N2STANDARD // So it totals to the same pressure
//icon = 'icons/turf/shuttle-debug.dmi'
// Plated catwalks
/turf/simulated/floor/plated_catwalk
icon = 'icons/turf/catwalks.dmi'
icon_state = "pcat0"
name = "plated catwalk"
desc = "A hybrid floor tile-catwalk which provides visibility and easy access to pipes and wires beneath it."
plane = TURF_PLANE
layer = PAINT_LAYER
hatch_installed = TRUE
hatch_open = FALSE
/turf/simulated/floor/plated_catwalk/New()
..()
overlays.Cut()
overlays += mutable_appearance(icon='icons/turf/floors.dmi', icon_state="plating", layer = CATWALK_LAYER, plane = ABOVE_PLATING_PLANE)
overlays += mutable_appearance(icon='icons/turf/catwalks.dmi', icon_state="[icon_state]_olay", layer = PAINT_LAYER, plane = TURF_PLANE)

View File

@@ -282,6 +282,8 @@
return 0
/turf/proc/is_mineral_floor()
return 0
/turf/proc/is_plated_catwalk()
return 0
/turf/proc/return_siding_icon_state() //used for grass floors, which have siding.
return 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 12 KiB