mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 08:56:49 +01:00
Power Outlets (#19943)
* Added power outlets to the service area. More can be printed at RnD. The capacitor can be upgraded to improve charging speed for connected devices.
This commit is contained in:
@@ -37,8 +37,12 @@
|
||||
|
||||
// At this point, we know that APC can power us for this tick. Check if we also need to charge our battery, and then actually use the power.
|
||||
if(battery_module && (battery_module.battery.charge < battery_module.battery.maxcharge))
|
||||
power_usage += tesla_link.passive_charging_rate
|
||||
battery_module.battery.give(tesla_link.passive_charging_rate * CELLRATE)
|
||||
var/power_to_get = tesla_link.passive_charging_rate
|
||||
if(istype(tesla_link, /obj/item/computer_hardware/tesla_link/charging_cable))
|
||||
var/obj/item/computer_hardware/tesla_link/charging_cable/cable = tesla_link
|
||||
power_to_get += cable.source.active_power_usage
|
||||
power_usage += power_to_get
|
||||
battery_module.battery.give(power_to_get * CELLRATE)
|
||||
|
||||
A.use_power_oneoff(power_usage, EQUIP)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user