Skip to content

Commit

Permalink
Updates the armour pumps to account for lag properly (#2668)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bokkiewokkie authored Jun 21, 2024
1 parent f844e33 commit 879aea1
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 879aea1

Please sign in to comment.