Skip to content

Commit

Permalink
Tram tile/bench fixes (tgstation#81798)
Browse files Browse the repository at this point in the history
## About The Pull Request

- Tram benches can be rebuilt after deconstruction
- Tram tiles build the correct amount inhand
- Tram tiles available in the engineering protolathe with other items
- Tram tiles create the right stack type when pulled up
- Tram tiles have inhand/obj icons for both types

## Changelog

:cl: LT3
fix: Tram floor tiles constructed inhand provides 4 instead of 1
fix: Tram floor tiles provide correct stack item when pulled up
image: Tram floor tiles have their own inhand icons
qol: Tram floor tiles available in the engineering protolathe
fix: You can reconstruct deconstructed tram benches
/:cl:
  • Loading branch information
lessthnthree authored Mar 4, 2024
1 parent 09946dc commit 760c85a
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 4 deletions.
8 changes: 7 additions & 1 deletion code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ GLOBAL_LIST_INIT(metal_recipes, list ( \
new /datum/stack_recipe("bench (left)", /obj/structure/chair/sofa/bench/left, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
new /datum/stack_recipe("bench (right)", /obj/structure/chair/sofa/bench/right, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
new /datum/stack_recipe("bench (corner)", /obj/structure/chair/sofa/bench/corner, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
new /datum/stack_recipe("tram bench (solo)", /obj/structure/chair/sofa/bench/tram/solo, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
new /datum/stack_recipe("tram bench (middle)", /obj/structure/chair/sofa/bench/tram, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
new /datum/stack_recipe("tram bench (left)", /obj/structure/chair/sofa/bench/tram/left, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
new /datum/stack_recipe("tram bench (right)", /obj/structure/chair/sofa/bench/tram/right, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
new /datum/stack_recipe("tram bench (corner)", /obj/structure/chair/sofa/bench/tram/corner, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_FURNITURE), \
)), \
new /datum/stack_recipe_list("chess pieces", list( \
new /datum/stack_recipe("White Pawn", /obj/structure/chess/whitepawn, 2, time = 1 SECONDS, one_per_turf = TRUE, on_solid_ground = TRUE, category = CAT_ENTERTAINMENT), \
Expand Down Expand Up @@ -779,7 +784,8 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
)
GLOBAL_LIST_INIT(plastic_recipes, list(
new /datum/stack_recipe("plastic floor tile", /obj/item/stack/tile/plastic, 1, 4, 20, time = 2 SECONDS, check_density = FALSE, category = CAT_TILES), \
new /datum/stack_recipe("thermoplastic tram tile", /obj/item/stack/thermoplastic, 1, 2, time = 4 SECONDS, check_density = FALSE, placement_checks = STACK_CHECK_TRAM_EXCLUSIVE, category = CAT_TILES), \
new /datum/stack_recipe("light tram tile", /obj/item/stack/thermoplastic/light, 1, 4, 20, time = 2 SECONDS, check_density = FALSE, category = CAT_TILES), \
new /datum/stack_recipe("dark tram tile", /obj/item/stack/thermoplastic, 1, 4, 20, time = 2 SECONDS, check_density = FALSE, category = CAT_TILES), \
new /datum/stack_recipe("folding plastic chair", /obj/structure/chair/plastic, 2, check_density = FALSE, category = CAT_FURNITURE), \
new /datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = TRUE, on_solid_ground = TRUE, time = 4 SECONDS, category = CAT_FURNITURE), \
new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/cup/glass/waterbottle/empty, check_density = FALSE, category = CAT_CONTAINERS), \
Expand Down
26 changes: 26 additions & 0 deletions code/modules/research/designs/autolathe/engineering_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -426,3 +426,29 @@
RND_CATEGORY_CONSTRUCTION + RND_SUBCATEGORY_CONSTRUCTION_MOUNTS,
)
departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING

/datum/design/tram_floor_dark
name = "Dark Tram Tile"
id = "tram_floor_dark"
build_type = PROTOLATHE
materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 0.25)
build_path = /obj/item/stack/thermoplastic
maxstack = 50
category = list(
RND_CATEGORY_INITIAL,
RND_CATEGORY_CONSTRUCTION + RND_SUBCATEGORY_CONSTRUCTION_MATERIALS,
)
departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING

/datum/design/tram_floor_light
name = "Light Tram Tile"
id = "tram_floor_light"
build_type = PROTOLATHE
materials = list(/datum/material/plastic = SHEET_MATERIAL_AMOUNT * 0.25)
build_path = /obj/item/stack/thermoplastic/light
maxstack = 50
category = list(
RND_CATEGORY_INITIAL,
RND_CATEGORY_CONSTRUCTION + RND_SUBCATEGORY_CONSTRUCTION_MATERIALS,
)
departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING
2 changes: 2 additions & 0 deletions code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
"toy_armblade",
"toy_balloon",
"toygun",
"tram_floor_dark",
"tram_floor_light",
"trapdoor_electronics",
"turbine_part_compressor",
"turbine_part_rotor",
Expand Down
8 changes: 5 additions & 3 deletions code/modules/transport/tram/tram_floors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
span_notice("You wedge \the [tool] into the tram panel's gap in the frame and start prying..."))
if(tool.use_tool(src, user, 1 SECONDS, volume = 50))
to_chat(user, span_notice("The panel pops out of the frame."))
var/obj/item/stack/thermoplastic/pulled_tile = new()
var/obj/item/stack/thermoplastic/pulled_tile = new floor_tile()
pulled_tile.update_integrity(atom_integrity)
user.put_in_hands(pulled_tile)
qdel(src)
Expand Down Expand Up @@ -283,8 +283,8 @@
icon = 'icons/obj/tiles.dmi'
lefthand_file = 'icons/mob/inhands/items/tiles_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items/tiles_righthand.dmi'
icon_state = "tile_textured_white_large"
inhand_icon_state = "tile-neon-glow"
icon_state = "tile_tram_dark"
inhand_icon_state = "tile-tram"
color = COLOR_TRAM_BLUE
w_class = WEIGHT_CLASS_NORMAL
force = 1
Expand All @@ -297,7 +297,9 @@
var/tile_type = /obj/structure/thermoplastic

/obj/item/stack/thermoplastic/light
icon_state = "tile_tram_light"
color = COLOR_TRAM_LIGHT_BLUE
merge_type = /obj/item/stack/thermoplastic/light
tile_type = /obj/structure/thermoplastic/light

/obj/item/stack/thermoplastic/Initialize(mapload, new_amount, merge = TRUE, list/mat_override=null, mat_amt=1)
Expand Down
Binary file modified icons/mob/inhands/items/tiles_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/items/tiles_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/tiles.dmi
Binary file not shown.

0 comments on commit 760c85a

Please sign in to comment.