mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
[MIRROR] Renames delta time to be a more obvious name [MDB IGNORE] (#20507)
* Renames delta time to be a more obvious name * updates to our code --------- Co-authored-by: oranges <email@oranges.net.nz> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
@@ -216,7 +216,7 @@
|
||||
if(istype(target, /obj/item/stack/ore))
|
||||
process_ore(target)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/process(delta_time)
|
||||
/obj/machinery/mineral/processing_unit/process(seconds_per_tick)
|
||||
if(!on)
|
||||
end_processing()
|
||||
if(mineral_machine)
|
||||
@@ -224,32 +224,32 @@
|
||||
return
|
||||
|
||||
if(selected_material)
|
||||
smelt_ore(delta_time)
|
||||
smelt_ore(seconds_per_tick)
|
||||
else if(selected_alloy)
|
||||
smelt_alloy(delta_time)
|
||||
smelt_alloy(seconds_per_tick)
|
||||
|
||||
if(mineral_machine)
|
||||
mineral_machine.updateUsrDialog()
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_ore(delta_time = 2)
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_ore(seconds_per_tick = 2)
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/datum/material/mat = selected_material
|
||||
if(!mat)
|
||||
return
|
||||
var/sheets_to_remove = (materials.materials[mat] >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT * delta_time) ) ? SMELT_AMOUNT * delta_time : round(materials.materials[mat] / MINERAL_MATERIAL_AMOUNT)
|
||||
var/sheets_to_remove = (materials.materials[mat] >= (MINERAL_MATERIAL_AMOUNT * SMELT_AMOUNT * seconds_per_tick) ) ? SMELT_AMOUNT * seconds_per_tick : round(materials.materials[mat] / MINERAL_MATERIAL_AMOUNT)
|
||||
if(!sheets_to_remove)
|
||||
on = FALSE
|
||||
else
|
||||
var/out = get_step(src, output_dir)
|
||||
materials.retrieve_sheets(sheets_to_remove, mat, out)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_alloy(delta_time = 2)
|
||||
/obj/machinery/mineral/processing_unit/proc/smelt_alloy(seconds_per_tick = 2)
|
||||
var/datum/design/alloy = stored_research.isDesignResearchedID(selected_alloy) //check if it's a valid design
|
||||
if(!alloy)
|
||||
on = FALSE
|
||||
return
|
||||
|
||||
var/amount = can_smelt(alloy, delta_time)
|
||||
var/amount = can_smelt(alloy, seconds_per_tick)
|
||||
|
||||
if(!amount)
|
||||
on = FALSE
|
||||
@@ -260,11 +260,11 @@
|
||||
|
||||
generate_mineral(alloy.build_path)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/can_smelt(datum/design/D, delta_time = 2)
|
||||
/obj/machinery/mineral/processing_unit/proc/can_smelt(datum/design/D, seconds_per_tick = 2)
|
||||
if(D.make_reagent)
|
||||
return FALSE
|
||||
|
||||
var/build_amount = SMELT_AMOUNT * delta_time
|
||||
var/build_amount = SMELT_AMOUNT * seconds_per_tick
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user