mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +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.
78 lines
2.3 KiB
Plaintext
78 lines
2.3 KiB
Plaintext
#define EXPOSED_VOLUME 1000
|
|
#define ROOM_TEMP 293
|
|
#define MIN_FREEZE_TEMP 50
|
|
#define MAX_FREEZE_TEMP 1000000
|
|
|
|
/obj/item/assembly/igniter
|
|
name = "igniter"
|
|
desc = "A small electronic device able to ignite combustible substances."
|
|
icon_state = "igniter"
|
|
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT*5, /datum/material/glass=SMALL_MATERIAL_AMOUNT*0.5)
|
|
var/datum/effect_system/spark_spread/sparks
|
|
heat = 1000
|
|
drop_sound = 'sound/items/handling/component_drop.ogg'
|
|
pickup_sound = 'sound/items/handling/component_pickup.ogg'
|
|
assembly_flags = ASSEMBLY_NO_DUPLICATES
|
|
|
|
/obj/item/assembly/igniter/suicide_act(mob/living/carbon/user)
|
|
user.visible_message(span_suicide("[user] is trying to ignite [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
|
|
user.ignite_mob()
|
|
return FIRELOSS
|
|
|
|
/obj/item/assembly/igniter/Initialize(mapload)
|
|
. = ..()
|
|
sparks = new
|
|
sparks.set_up(2, 0, src)
|
|
sparks.attach(src)
|
|
|
|
/obj/item/assembly/igniter/Destroy()
|
|
if(sparks)
|
|
qdel(sparks)
|
|
sparks = null
|
|
. = ..()
|
|
|
|
/obj/item/assembly/igniter/activate()
|
|
if(!..())
|
|
return FALSE//Cooldown check
|
|
var/turf/location = get_turf(loc)
|
|
if(location)
|
|
location.hotspot_expose(heat, EXPOSED_VOLUME)
|
|
if(holder)
|
|
SEND_SIGNAL(holder.loc, COMSIG_IGNITER_ACTIVATE)
|
|
if(QDELETED(src))
|
|
return TRUE
|
|
sparks.start()
|
|
return TRUE
|
|
|
|
/obj/item/assembly/igniter/attack_self(mob/user)
|
|
activate()
|
|
add_fingerprint(user)
|
|
|
|
/obj/item/assembly/igniter/ignition_effect(atom/A, mob/user)
|
|
. = span_notice("[user] fiddles with [src], and manages to light [A].")
|
|
activate()
|
|
add_fingerprint(user)
|
|
|
|
//For the Condenser, which functions like the igniter but makes things colder.
|
|
/obj/item/assembly/igniter/condenser
|
|
name = "condenser"
|
|
desc = "A small electronic device able to chill their surroundings."
|
|
icon_state = "freezer"
|
|
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT*2.5, /datum/material/glass=SMALL_MATERIAL_AMOUNT * 3)
|
|
heat = 200
|
|
|
|
/obj/item/assembly/igniter/condenser/activate()
|
|
. = ..()
|
|
if(!.)
|
|
return //Cooldown check
|
|
var/turf/location = get_turf(loc)
|
|
if(location)
|
|
var/datum/gas_mixture/enviro = location.return_air()
|
|
enviro.temperature = clamp(min(ROOM_TEMP, enviro.temperature*0.85),MIN_FREEZE_TEMP,MAX_FREEZE_TEMP)
|
|
sparks.start()
|
|
|
|
#undef EXPOSED_VOLUME
|
|
#undef ROOM_TEMP
|
|
#undef MIN_FREEZE_TEMP
|
|
#undef MAX_FREEZE_TEMP
|