mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-12 01:43:40 +00:00
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you all here (through the automatic reviewer request system). So, mineral balance! Mineral balance is less a balance and more of a nervous white dude juggling spinning plates on a high-wire on his first day. The fact it hasn't failed after going on this long is a miracle in and of itself. This PR does not change mineral balance. What this does is moves over every individual cost, both in crafting recipes attached to an object over to a define based system. We have 3 defines: `sheet_material_amount=2000` . Stock standard mineral sheet. This being our central mineral unit, this is used for all costs 2000+. `half_sheet_material_amount=1000` . Same as above, but using iron rods as our inbetween for costs of 1000-1999. `small_material_amount=100` . This hits 1-999. This covers... a startlingly large amount of the codebase. It's feast or famine out here in terms of mineral costs as a result, items are either sheets upon sheets, or some fraction of small mats. Shout out to riot darts for being the worst material cost in the game. I will not elaborate. Regardless, this has no functional change, but it sets the groundwork for making future changes to material costs much, MUCH easier, and moves over to a single, standardized set of units to help enforce coding standards on new items, and will bring up lots of uncomfortable balance questions down the line. For now though, this serves as some rough boundaries on how items costs are related, and will make adjusting these values easier going forward. Except for foam darts. I did round up foam darts. Adjusting mineral balance on the macro scale will be as simple as changing the aforementioned mineral defines, where the alternative is a rats nest of magic number defines. ~~No seriously, 11.25 iron for a foam dart are you kidding me what is the POINT WHY NOT JUST MAKE IT 11~~ Items individual numbers have not been adjusted yet, but we can standardize how the conversation can be held and actually GET SOMEWHERE on material balance as opposed to throwing our hands up or ignoring it for another 10 years.
117 lines
3.8 KiB
Plaintext
117 lines
3.8 KiB
Plaintext
/* Table Frames
|
|
* Contains:
|
|
* Frames
|
|
* Wooden Frames
|
|
*/
|
|
|
|
|
|
/*
|
|
* Normal Frames
|
|
*/
|
|
|
|
/obj/structure/table_frame
|
|
name = "table frame"
|
|
desc = "Four metal legs with four framing rods for a table. You could easily pass through this."
|
|
icon = 'icons/obj/structures.dmi'
|
|
icon_state = "table_frame"
|
|
density = FALSE
|
|
anchored = FALSE
|
|
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
|
|
max_integrity = 100
|
|
var/framestack = /obj/item/stack/rods
|
|
var/framestackamount = 2
|
|
|
|
|
|
/obj/structure/table_frame/wrench_act(mob/living/user, obj/item/I)
|
|
to_chat(user, span_notice("You start disassembling [src]..."))
|
|
I.play_tool_sound(src)
|
|
if(!I.use_tool(src, user, 3 SECONDS))
|
|
return TRUE
|
|
playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE)
|
|
deconstruct(TRUE)
|
|
return TRUE
|
|
|
|
|
|
/obj/structure/table_frame/attackby(obj/item/I, mob/user, params)
|
|
if(isstack(I))
|
|
var/obj/item/stack/material = I
|
|
if(material.tableVariant)
|
|
if(material.get_amount() < 1)
|
|
to_chat(user, span_warning("You need one [material.name] sheet to do this!"))
|
|
return
|
|
if(locate(/obj/structure/table) in loc)
|
|
to_chat(user, span_warning("There's already a table built here!"))
|
|
return
|
|
to_chat(user, span_notice("You start adding [material] to [src]..."))
|
|
if(!do_after(user, 2 SECONDS, target = src) || !material.use(1) || (locate(/obj/structure/table) in loc))
|
|
return
|
|
make_new_table(material.tableVariant)
|
|
else if(istype(material, /obj/item/stack/sheet))
|
|
if(material.get_amount() < 1)
|
|
to_chat(user, span_warning("You need one sheet to do this!"))
|
|
return
|
|
if(locate(/obj/structure/table) in loc)
|
|
to_chat(user, span_warning("There's already a table built here!"))
|
|
return
|
|
to_chat(user, span_notice("You start adding [material] to [src]..."))
|
|
if(!do_after(user, 2 SECONDS, target = src) || !material.use(1) || (locate(/obj/structure/table) in loc))
|
|
return
|
|
var/list/material_list = list()
|
|
if(material.material_type)
|
|
material_list[material.material_type] = SHEET_MATERIAL_AMOUNT
|
|
make_new_table(/obj/structure/table/greyscale, material_list)
|
|
return
|
|
return ..()
|
|
|
|
|
|
/obj/structure/table_frame/proc/make_new_table(table_type, custom_materials, carpet_type) //makes sure the new table made retains what we had as a frame
|
|
var/obj/structure/table/T = new table_type(loc)
|
|
T.frame = type
|
|
T.framestack = framestack
|
|
T.framestackamount = framestackamount
|
|
if (carpet_type)
|
|
T.buildstack = carpet_type
|
|
if(custom_materials)
|
|
T.set_custom_materials(custom_materials)
|
|
qdel(src)
|
|
|
|
/obj/structure/table_frame/deconstruct(disassembled = TRUE)
|
|
new framestack(get_turf(src), framestackamount)
|
|
qdel(src)
|
|
|
|
/obj/structure/table_frame/narsie_act()
|
|
new /obj/structure/table_frame/wood(src.loc)
|
|
qdel(src)
|
|
|
|
/*
|
|
* Wooden Frames
|
|
*/
|
|
|
|
/obj/structure/table_frame/wood
|
|
name = "wooden table frame"
|
|
desc = "Four wooden legs with four framing wooden rods for a wooden table. You could easily pass through this."
|
|
icon_state = "wood_frame"
|
|
framestack = /obj/item/stack/sheet/mineral/wood
|
|
framestackamount = 2
|
|
resistance_flags = FLAMMABLE
|
|
|
|
/obj/structure/table_frame/wood/attackby(obj/item/I, mob/user, params)
|
|
if (isstack(I))
|
|
var/obj/item/stack/material = I
|
|
var/toConstruct // stores the table variant
|
|
var/carpet_type // stores the carpet type used for construction in case of poker tables
|
|
if(istype(I, /obj/item/stack/sheet/mineral/wood))
|
|
toConstruct = /obj/structure/table/wood
|
|
else if(istype(I, /obj/item/stack/tile/carpet))
|
|
toConstruct = /obj/structure/table/wood/poker
|
|
carpet_type = I.type
|
|
if (toConstruct)
|
|
if(material.get_amount() < 1)
|
|
to_chat(user, span_warning("You need one [material.name] sheet to do this!"))
|
|
return
|
|
to_chat(user, span_notice("You start adding [material] to [src]..."))
|
|
if(do_after(user, 20, target = src) && material.use(1))
|
|
make_new_table(toConstruct, null, carpet_type)
|
|
else
|
|
return ..()
|