mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Refactors table creation (#19441)
* refactors table creation * probably works will test later * tested and tweaked * words are hard * Apply suggestions from code review Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> * steel review * proc breakout Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,7 @@ GLOBAL_LIST_INIT(glass_recipes, list (
|
||||
full_window = /obj/structure/window/full/basic
|
||||
merge_type = /obj/item/stack/sheet/glass
|
||||
point_value = 1
|
||||
table_type = /obj/structure/table/glass
|
||||
|
||||
/obj/item/stack/sheet/glass/detailed_examine()
|
||||
return "Use in your hand to build a window. Can be upgraded to reinforced glass by adding metal rods, which are made from metal sheets."
|
||||
@@ -110,6 +111,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list (
|
||||
full_window = /obj/structure/window/full/reinforced
|
||||
merge_type = /obj/item/stack/sheet/rglass
|
||||
point_value = 4
|
||||
table_type = /obj/structure/table/glass/reinforced
|
||||
|
||||
/obj/item/stack/sheet/rglass/New(loc, amount)
|
||||
recipes = GLOB.reinforced_glass_recipes
|
||||
@@ -145,6 +147,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list (
|
||||
created_window = /obj/structure/window/plasmabasic
|
||||
full_window = /obj/structure/window/full/plasmabasic
|
||||
point_value = 19
|
||||
table_type = /obj/structure/table/glass/plasma
|
||||
|
||||
/obj/item/stack/sheet/plasmaglass/New(loc, amount)
|
||||
recipes = GLOB.pglass_recipes
|
||||
@@ -188,6 +191,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list (
|
||||
created_window = /obj/structure/window/plasmareinforced
|
||||
full_window = /obj/structure/window/full/plasmareinforced
|
||||
point_value = 23
|
||||
table_type = /obj/structure/table/glass/reinforced/plasma
|
||||
|
||||
/obj/item/stack/sheet/plasmarglass/New(loc, amount)
|
||||
recipes = GLOB.prglass_recipes
|
||||
@@ -208,6 +212,7 @@ GLOBAL_LIST_INIT(titaniumglass_recipes, list(
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/titaniumglass
|
||||
full_window = /obj/structure/window/full/shuttle
|
||||
table_type = /obj/structure/table/glass/reinforced/titanium
|
||||
|
||||
/obj/item/stack/sheet/titaniumglass/New(loc, amount)
|
||||
recipes = GLOB.titaniumglass_recipes
|
||||
@@ -228,6 +233,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
||||
resistance_flags = ACID_PROOF
|
||||
merge_type = /obj/item/stack/sheet/plastitaniumglass
|
||||
full_window = /obj/structure/window/full/plastitanium
|
||||
table_type = /obj/structure/table/glass/reinforced/plastitanium
|
||||
|
||||
/obj/item/stack/sheet/plastitaniumglass/New(loc, amount)
|
||||
recipes = GLOB.plastitaniumglass_recipes
|
||||
|
||||
@@ -418,6 +418,7 @@ GLOBAL_LIST_INIT(plastitanium_recipes, list(
|
||||
throw_speed = 1
|
||||
origin_tech = "materials=6;abductor=1"
|
||||
sheettype = "abductor"
|
||||
table_type = /obj/structure/table/abductor
|
||||
|
||||
/obj/item/stack/sheet/mineral/abductor/fifty
|
||||
amount = 50
|
||||
|
||||
@@ -126,6 +126,7 @@ GLOBAL_LIST_INIT(metal_recipes, list(
|
||||
origin_tech = "materials=1"
|
||||
merge_type = /obj/item/stack/sheet/metal
|
||||
point_value = 2
|
||||
table_type = /obj/structure/table
|
||||
|
||||
/obj/item/stack/sheet/metal/cyborg
|
||||
energy_type = /datum/robot_energy_storage/metal
|
||||
@@ -177,6 +178,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list(
|
||||
origin_tech = "materials=2"
|
||||
merge_type = /obj/item/stack/sheet/plasteel
|
||||
point_value = 23
|
||||
table_type = /obj/structure/table/reinforced
|
||||
|
||||
/obj/item/stack/sheet/plasteel/New(loc, amount=null)
|
||||
recipes = GLOB.plasteel_recipes
|
||||
@@ -243,6 +245,7 @@ GLOBAL_LIST_INIT(wood_recipes, list(
|
||||
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 50, ACID = 0)
|
||||
merge_type = /obj/item/stack/sheet/wood
|
||||
sheettype = "wood"
|
||||
table_type = /obj/structure/table/wood
|
||||
|
||||
/obj/item/stack/sheet/wood/New(loc, amount=null)
|
||||
recipes = GLOB.wood_recipes
|
||||
@@ -497,6 +500,7 @@ GLOBAL_LIST_INIT(brass_recipes, list (
|
||||
throw_speed = 1
|
||||
throw_range = 3
|
||||
turf_type = /turf/simulated/floor/clockwork
|
||||
table_type = /obj/structure/table/reinforced/brass
|
||||
|
||||
/obj/item/stack/tile/brass/narsie_act()
|
||||
new /obj/item/stack/sheet/runed_metal(loc, amount)
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
|
||||
var/recipe_width = 400 //Width of the recipe popup
|
||||
var/recipe_height = 400 //Height of the recipe popup
|
||||
/// What sort of table is made when applying this stack to a frame?
|
||||
var/table_type
|
||||
|
||||
/obj/item/stack/New(loc, new_amount, merge = TRUE)
|
||||
..()
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
icon_state = "tile-carpet"
|
||||
turf_type = /turf/simulated/floor/carpet
|
||||
resistance_flags = FLAMMABLE
|
||||
var/fancy_table_type = /obj/structure/table/wood/fancy //Decides what table will be built with what carpet tile
|
||||
table_type = /obj/structure/table/wood/fancy //Decides what table will be built with what carpet tile
|
||||
|
||||
/obj/item/stack/tile/carpet/twenty
|
||||
amount = 20
|
||||
@@ -85,7 +85,7 @@
|
||||
name = "black carpet"
|
||||
icon_state = "tile-carpet-black"
|
||||
turf_type = /turf/simulated/floor/carpet/black
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/black
|
||||
table_type = /obj/structure/table/wood/fancy/black
|
||||
|
||||
/obj/item/stack/tile/carpet/black/twenty
|
||||
amount = 20
|
||||
@@ -94,7 +94,7 @@
|
||||
name = "blue carpet"
|
||||
icon_state = "tile-carpet-blue"
|
||||
turf_type = /turf/simulated/floor/carpet/blue
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/blue
|
||||
table_type = /obj/structure/table/wood/fancy/blue
|
||||
|
||||
/obj/item/stack/tile/carpet/blue/twenty
|
||||
amount = 20
|
||||
@@ -103,7 +103,7 @@
|
||||
name = "cyan carpet"
|
||||
icon_state = "tile-carpet-cyan"
|
||||
turf_type = /turf/simulated/floor/carpet/cyan
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/cyan
|
||||
table_type = /obj/structure/table/wood/fancy/cyan
|
||||
|
||||
/obj/item/stack/tile/carpet/cyan/twenty
|
||||
amount = 20
|
||||
@@ -112,7 +112,7 @@
|
||||
name = "green carpet"
|
||||
icon_state = "tile-carpet-green"
|
||||
turf_type = /turf/simulated/floor/carpet/green
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/green
|
||||
table_type = /obj/structure/table/wood/fancy/green
|
||||
|
||||
/obj/item/stack/tile/carpet/green/twenty
|
||||
amount = 20
|
||||
@@ -121,7 +121,7 @@
|
||||
name = "orange carpet"
|
||||
icon_state = "tile-carpet-orange"
|
||||
turf_type = /turf/simulated/floor/carpet/orange
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/orange
|
||||
table_type = /obj/structure/table/wood/fancy/orange
|
||||
|
||||
/obj/item/stack/tile/carpet/orange/twenty
|
||||
amount = 20
|
||||
@@ -130,7 +130,7 @@
|
||||
name = "purple carpet"
|
||||
icon_state = "tile-carpet-purple"
|
||||
turf_type = /turf/simulated/floor/carpet/purple
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/purple
|
||||
table_type = /obj/structure/table/wood/fancy/purple
|
||||
|
||||
/obj/item/stack/tile/carpet/purple/twenty
|
||||
amount = 20
|
||||
@@ -139,7 +139,7 @@
|
||||
name = "red carpet"
|
||||
icon_state = "tile-carpet-red"
|
||||
turf_type = /turf/simulated/floor/carpet/red
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/red
|
||||
table_type = /obj/structure/table/wood/fancy/red
|
||||
|
||||
/obj/item/stack/tile/carpet/red/twenty
|
||||
amount = 20
|
||||
@@ -148,7 +148,7 @@
|
||||
name = "royal black carpet"
|
||||
icon_state = "tile-carpet-royalblack"
|
||||
turf_type = /turf/simulated/floor/carpet/royalblack
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/royalblack
|
||||
table_type = /obj/structure/table/wood/fancy/royalblack
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblack/ten
|
||||
amount = 10
|
||||
@@ -159,7 +159,7 @@
|
||||
name = "royal blue carpet"
|
||||
icon_state = "tile-carpet-royalblue"
|
||||
turf_type = /turf/simulated/floor/carpet/royalblue
|
||||
fancy_table_type = /obj/structure/table/wood/fancy/royalblue
|
||||
table_type = /obj/structure/table/wood/fancy/royalblue
|
||||
|
||||
/obj/item/stack/tile/carpet/royalblue/ten
|
||||
amount = 10
|
||||
|
||||
Reference in New Issue
Block a user