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

Updates the armour pumps to account for lag properly #2668

Merged
merged 2 commits into from
Jun 21, 2024
Merged
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
6 changes: 3 additions & 3 deletions nsv13/code/modules/overmap/armour/nano_pump.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if(stress_shutdown)
. += "<span class='warning'>The system overload lights are flashing</span>"

/obj/machinery/armour_plating_nanorepair_pump/process()
/obj/machinery/armour_plating_nanorepair_pump/process(delta_time)
if(!OM)
OM = get_overmap()
if(online && is_operational && !stress_shutdown)
Expand All @@ -71,7 +71,7 @@
var/armour_integrity = (OM.armour_quadrants[quadrant]["current_armour"] / OM.armour_quadrants[quadrant]["max_armour"]) * 100
if(armour_integrity < 15)
armour_integrity = 15
armour_repair_amount = ((382 * NUM_E **(0.0764 * armour_integrity))/(50 + NUM_E ** (0.0764 * armour_integrity)) ** 2 ) * (apnw.repair_efficiency * (armour_allocation / 100)) * 6 //Don't ask
armour_repair_amount = delta_time * ((382 * NUM_E **(0.0764 * armour_integrity))/(50 + NUM_E ** (0.0764 * armour_integrity)) ** 2 ) * (apnw.repair_efficiency * (armour_allocation / 100)) * 3 //Don't ask
if(apnw.repair_resources >= (armour_repair_amount * weight_class))
OM.armour_quadrants[quadrant]["current_armour"] += armour_repair_amount
if(OM.armour_quadrants[quadrant]["current_armour"] > OM.armour_quadrants[quadrant]["max_armour"])
Expand All @@ -82,7 +82,7 @@
if(OM.obj_integrity < OM.max_integrity) //Structure Check
if(OM.structure_crit_no_return) //If we have crossed the point of no return, halt repairs
return
structure_repair_amount = ((2 + (weight_class / 10)) * apnw.repair_efficiency * structure_allocation) / 100
structure_repair_amount = delta_time * ((2 + (weight_class / 10)) * apnw.repair_efficiency * structure_allocation) / 200
if(apnw.repair_resources >= (structure_repair_amount * weight_class) * 1.5)
OM.obj_integrity += structure_repair_amount
if(OM.obj_integrity > OM.max_integrity)
Expand Down
Loading