mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-17 12:20:09 +01:00
d73f6b8dbd
* Prevents insta-actions * Do_after sanity NOTE: NUKE do_after_action * Update bonfire.dm * The rest of them Also fixes a tpyo * no minitest :) * . * . * Gets rid of the slowdown for now --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
22 lines
745 B
Plaintext
22 lines
745 B
Plaintext
/obj/machinery/power/smes/batteryrack/mapped
|
|
var/cell_type = /obj/item/cell/apc
|
|
var/cell_number = 3
|
|
|
|
/obj/machinery/power/smes/batteryrack/mapped/Initialize(mapload)
|
|
. = ..()
|
|
for(var/i = 1 to cell_number)
|
|
if(i > max_cells)
|
|
break
|
|
var/obj/item/cell/newcell = new cell_type(src.loc)
|
|
insert_cell(newcell)
|
|
|
|
/obj/item/module/power_control/attackby(var/obj/item/I, var/mob/user)
|
|
if(I.has_tool_quality(TOOL_MULTITOOL))
|
|
to_chat(user, span_notice("You begin tweaking the power control circuits to support a power cell rack."))
|
|
if(do_after(user, 5 SECONDS * I.toolspeed, target = src))
|
|
var/obj/item/newcircuit = new/obj/item/circuitboard/batteryrack(get_turf(user))
|
|
qdel(src)
|
|
user.put_in_hands(newcircuit)
|
|
return
|
|
return ..()
|