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

Changes 'recipes' variable to 'get_recipes()' proc #9385

Merged
merged 1 commit into from
Jul 18, 2023
Merged
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
5 changes: 2 additions & 3 deletions code/game/objects/items/stacks/ores/ore_type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ STACKSIZE_MACRO(/obj/item/stack/ore/iron)
refined_type = /obj/item/stack/sheet/glass
w_class = WEIGHT_CLASS_TINY

/obj/item/stack/ore/glass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.sand_recipes
. = ..()
/obj/item/stack/ore/glass/get_recipes()
return GLOB.sand_recipes

/obj/item/stack/ore/glass/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
if(..() || !ishuman(hit_atom))
Expand Down
4 changes: 3 additions & 1 deletion code/game/objects/items/stacks/rods/rods.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
user.visible_message("<span class='suicide'>[user] begins to stuff \the [src] down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide!</span>")//it looks like theyre ur mum
return BRUTELOSS

/obj/item/stack/rods/get_recipes()
return GLOB.rod_recipes

/obj/item/stack/rods/Initialize(mapload, new_amount, merge = TRUE, mob/user = null)
. = ..()
if(QDELETED(src)) // we can be deleted during merge, check before doing stuff
return

recipes = GLOB.rod_recipes
update_icon()
AddElement(/datum/element/openspace_item_click_handler)

Expand Down
15 changes: 6 additions & 9 deletions code/game/objects/items/stacks/sheets/mineral/exotics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ Exotic mineral Sheets
point_value = 50
merge_type = /obj/item/stack/sheet/mineral/bananium

/obj/item/stack/sheet/mineral/bananium/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.bananium_recipes
. = ..()
/obj/item/stack/sheet/mineral/bananium/get_recipes()
return GLOB.bananium_recipes


/* Adamantine */
Expand All @@ -34,9 +33,8 @@ Exotic mineral Sheets
merge_type = /obj/item/stack/sheet/mineral/adamantine
grind_results = list(/datum/reagent/liquidadamantine = 10)

/obj/item/stack/sheet/mineral/adamantine/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.adamantine_recipes
. = ..()
/obj/item/stack/sheet/mineral/adamantine/get_recipes()
return GLOB.adamantine_recipes

/* Alien Alloy */

Expand All @@ -49,6 +47,5 @@ Exotic mineral Sheets
sheettype = "abductor"
merge_type = /obj/item/stack/sheet/mineral/abductor

/obj/item/stack/sheet/mineral/abductor/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.abductor_recipes
. = ..()
/obj/item/stack/sheet/mineral/abductor/get_recipes()
return GLOB.abductor_recipes
30 changes: 12 additions & 18 deletions code/game/objects/items/stacks/sheets/mineral/glass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
user.visible_message("<span class='suicide'>[user] begins to slice [user.p_their()] neck with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS

/obj/item/stack/sheet/glass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.glass_recipes
return ..()
/obj/item/stack/sheet/glass/get_recipes()
return GLOB.glass_recipes

/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
Expand Down Expand Up @@ -94,9 +93,8 @@
source.add_charge(amount * metcost)
glasource.add_charge(amount * glacost)

/obj/item/stack/sheet/rglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.reinforced_glass_recipes
return ..()
/obj/item/stack/sheet/rglass/get_recipes()
return GLOB.reinforced_glass_recipes

/* Plasma glass */

Expand All @@ -113,9 +111,8 @@
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10)
tableVariant = /obj/structure/table/glass/plasma

/obj/item/stack/sheet/plasmaglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.pglass_recipes
return ..()
/obj/item/stack/sheet/plasmaglass/get_recipes()
return GLOB.pglass_recipes

/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
Expand Down Expand Up @@ -150,9 +147,8 @@
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10)
point_value = 23

/obj/item/stack/sheet/plasmarglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.prglass_recipes
return ..()
/obj/item/stack/sheet/plasmarglass/get_recipes()
return GLOB.prglass_recipes

/* Titanium glass */

Expand All @@ -167,9 +163,8 @@
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/titaniumglass

/obj/item/stack/sheet/titaniumglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.titaniumglass_recipes
return ..()
/obj/item/stack/sheet/titaniumglass/get_recipes()
return GLOB.titaniumglass_recipes

/* Plastitanium glass */

Expand All @@ -184,9 +179,8 @@
resistance_flags = ACID_PROOF
merge_type = /obj/item/stack/sheet/plastitaniumglass

/obj/item/stack/sheet/plastitaniumglass/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.plastitaniumglass_recipes
return ..()
/obj/item/stack/sheet/plastitaniumglass/get_recipes()
return GLOB.plastitaniumglass_recipes

/*SHARDS FROM HERE ONWARD, NOT A STACK, MOVE IT AS THE PROPHECY FORETOLD*/
/obj/item/shard
Expand Down
45 changes: 18 additions & 27 deletions code/game/objects/items/stacks/sheets/mineral/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ Mineral Sheets
sheettype = "sandstone"
merge_type = /obj/item/stack/sheet/mineral/sandstone

/obj/item/stack/sheet/mineral/sandstone/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.sandstone_recipes
. = ..()
/obj/item/stack/sheet/mineral/sandstone/get_recipes()
return GLOB.sandstone_recipes

/* Diamond */

Expand All @@ -51,9 +50,8 @@ Mineral Sheets
point_value = 25
merge_type = /obj/item/stack/sheet/mineral/diamond

/obj/item/stack/sheet/mineral/diamond/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.diamond_recipes
. = ..()
/obj/item/stack/sheet/mineral/diamond/get_recipes()
return GLOB.diamond_recipes

/* Uranium */

Expand All @@ -68,9 +66,8 @@ Mineral Sheets
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/uranium

/obj/item/stack/sheet/mineral/uranium/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.uranium_recipes
. = ..()
/obj/item/stack/sheet/mineral/uranium/get_recipes()
return GLOB.uranium_recipes

/* Plasma */

Expand All @@ -91,9 +88,8 @@ Mineral Sheets
user.visible_message("<span class='suicide'>[user] begins licking \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return TOXLOSS//dont you kids know that stuff is toxic?

/obj/item/stack/sheet/mineral/plasma/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.plasma_recipes
. = ..()
/obj/item/stack/sheet/mineral/plasma/get_recipes()
return GLOB.plasma_recipes

/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/W as obj, mob/user as mob, params)
if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite
Expand Down Expand Up @@ -123,9 +119,8 @@ Mineral Sheets
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/gold

/obj/item/stack/sheet/mineral/gold/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.gold_recipes
. = ..()
/obj/item/stack/sheet/mineral/gold/get_recipes()
return GLOB.gold_recipes

/* Silver */

Expand All @@ -141,9 +136,8 @@ Mineral Sheets
merge_type = /obj/item/stack/sheet/mineral/silver
tableVariant = /obj/structure/table/optable

/obj/item/stack/sheet/mineral/silver/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.silver_recipes
. = ..()
/obj/item/stack/sheet/mineral/silver/get_recipes()
return GLOB.silver_recipes

/* Copper */

Expand All @@ -159,9 +153,8 @@ Mineral Sheets
merge_type = /obj/item/stack/sheet/mineral/copper


/obj/item/stack/sheet/mineral/copper/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.copper_recipes
. = ..()
/obj/item/stack/sheet/mineral/copper/get_recipes()
return GLOB.copper_recipes

/* Titanium */

Expand All @@ -181,9 +174,8 @@ Mineral Sheets
merge_type = /obj/item/stack/sheet/mineral/titanium


/obj/item/stack/sheet/mineral/titanium/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.titanium_recipes
. = ..()
/obj/item/stack/sheet/mineral/titanium/get_recipes()
return GLOB.titanium_recipes

/* Plastitanium */

Expand All @@ -202,9 +194,8 @@ Mineral Sheets
point_value = 45
merge_type = /obj/item/stack/sheet/mineral/plastitanium

/obj/item/stack/sheet/mineral/plastitanium/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.plastitanium_recipes
. = ..()
/obj/item/stack/sheet/mineral/plastitanium/get_recipes()
return GLOB.plastitanium_recipes

/* Coal */

Expand Down
23 changes: 12 additions & 11 deletions code/game/objects/items/stacks/sheets/mineral/metals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ Metals Sheets
new /obj/item/stack/sheet/runed_metal(loc, amount)
qdel(src)

/obj/item/stack/sheet/iron/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.metal_recipes
return ..()
/obj/item/stack/sheet/iron/get_recipes()
return GLOB.metal_recipes

/obj/item/stack/sheet/iron/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins whacking [user.p_them()]self over the head with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
Expand All @@ -63,9 +62,8 @@ Metals Sheets
point_value = 23
tableVariant = /obj/structure/table/reinforced

/obj/item/stack/sheet/plasteel/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.plasteel_recipes
return ..()
/obj/item/stack/sheet/plasteel/get_recipes()
return GLOB.plasteel_recipes

/* Runed Metal */

Expand Down Expand Up @@ -95,9 +93,8 @@ Metals Sheets
return FALSE
return ..()

/obj/item/stack/sheet/runed_metal/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.runed_metal_recipes
return ..()
/obj/item/stack/sheet/runed_metal/get_recipes()
return GLOB.runed_metal_recipes


/* Brass - the cult one */
Expand Down Expand Up @@ -127,9 +124,11 @@ Metals Sheets
else
return ..()

/obj/item/stack/sheet/brass/get_recipes()
return GLOB.brass_recipes

/obj/item/stack/sheet/brass/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
recipes = GLOB.brass_recipes
pixel_x = 0
pixel_y = 0

Expand Down Expand Up @@ -157,8 +156,10 @@ Metals Sheets
else
return ..()

/obj/item/stack/sheet/bronze/get_recipes()
return GLOB.bronze_recipes

/obj/item/stack/sheet/bronze/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.bronze_recipes
. = ..()
pixel_x = 0
pixel_y = 0
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ Miscellaneous material sheets
grind_results = list(/datum/reagent/consumable/honey = 20)
merge_type = /obj/item/stack/sheet/wax

/obj/item/stack/sheet/wax/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.wax_recipes
. = ..()
/obj/item/stack/sheet/wax/get_recipes()
return GLOB.wax_recipes

/* Sandbags */

Expand All @@ -40,9 +39,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
new/datum/stack_recipe("sandbags", /obj/structure/barricade/sandbags, 1, one_per_turf = TRUE, on_floor = TRUE, time = 2.5 SECONDS), \
))

/obj/item/stack/sheet/sandbags/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.sandbag_recipes
. = ..()
/obj/item/stack/sheet/sandbags/get_recipes()
return GLOB.sandbag_recipes

/obj/item/emptysandbag
name = "empty sandbag"
Expand Down Expand Up @@ -76,9 +74,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
grind_results = list(/datum/reagent/consumable/ice = 20)
merge_type = /obj/item/stack/sheet/snow

/obj/item/stack/sheet/snow/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.snow_recipes
. = ..()
/obj/item/stack/sheet/snow/get_recipes()
return GLOB.snow_recipes

/* Plastic */

Expand All @@ -92,9 +89,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
throwforce = 7
merge_type = /obj/item/stack/sheet/plastic

/obj/item/stack/sheet/plastic/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.plastic_recipes
. = ..()
/obj/item/stack/sheet/plastic/get_recipes()
return GLOB.plastic_recipes

/* Cardboard */

Expand All @@ -110,9 +106,8 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
throwforce = 0
merge_type = /obj/item/stack/sheet/cardboard

/obj/item/stack/sheet/cardboard/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.cardboard_recipes
return ..()
/obj/item/stack/sheet/cardboard/get_recipes()
return GLOB.cardboard_recipes


/obj/item/stack/sheet/cardboard/attackby(obj/item/I, mob/user, params)
Expand Down
15 changes: 6 additions & 9 deletions code/game/objects/items/stacks/sheets/organic/cloths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ Various Cloths
pull_effort = 50
loom_result = /obj/item/stack/sheet/silk

/obj/item/stack/sheet/cotton/cloth/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
recipes = GLOB.cloth_recipes
/obj/item/stack/sheet/cotton/cloth/get_recipes()
return GLOB.cloth_recipes

/* Durathread cloth */

Expand All @@ -66,9 +65,8 @@ Various Cloths
drop_sound = 'sound/items/handling/cloth_drop.ogg'
pickup_sound = 'sound/items/handling/cloth_pickup.ogg'

/obj/item/stack/sheet/cotton/cloth/durathread/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
recipes = GLOB.durathread_recipes
/obj/item/stack/sheet/cotton/cloth/durathread/get_recipes()
return GLOB.durathread_recipes

/* Silk */

Expand All @@ -84,6 +82,5 @@ Various Cloths
drop_sound = 'sound/items/handling/cloth_drop.ogg'
pickup_sound = 'sound/items/handling/cloth_pickup.ogg'

/obj/item/stack/sheet/silk/Initialize(mapload, new_amount, merge = TRUE)
recipes = GLOB.silk_recipes
return ..()
/obj/item/stack/sheet/silk/get_recipes()
return GLOB.silk_recipes
Loading
Loading