[MIRROR] some borg upgrade overhaul, power use function, bluespace pounce and some fixes (#8277)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
Co-authored-by: Raeschen <rycoop29@gmail.com>
This commit is contained in:
CHOMPStation2
2024-04-29 16:07:03 +02:00
committed by GitHub
co-authored by Kashargul CHOMPStation2 Raeschen
parent ec14ff4baf
commit 244322e58d
16 changed files with 263 additions and 61 deletions
@@ -95,17 +95,16 @@
/obj/item/device/self_repair_system/proc/self_repair(mob/living/silicon/robot/R, datum/robot_component/C, var/tick_delay, var/heal_per_tick)
if(!C || !R.cell)
return
if(R.cell.charge < 500) //We don't want to drain ourselves too far down during exploration
to_chat(R, "<span class='warning'>Not enough power to initialize the repair system.</span>")
return
if(C.brute_damage == 0 && C.electronics_damage == 0)
to_chat(R, "<span class='notice'>Repair of [target_component] completed.</span>")
return
if(!R.use_direct_power(50, 500)) //We don't want to drain ourselves too far down during exploration
to_chat(R, "<span class='warning'>Not enough power to initialize the repair system.</span>")
return
if(do_after(R, tick_delay))
if(!C || !R.cell)
if(!C)
return
C.brute_damage -= min(C.brute_damage, heal_per_tick)
C.electronics_damage -= min(C.electronics_damage, heal_per_tick)
R.updatehealth()
R.cell.use(50)
src.self_repair(R, C, tick_delay, heal_per_tick)