h. Updates NTOS, and axes p2p filetransfer!
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
var/obj/item/stock_parts/cell/battery = null
|
||||
device_type = MC_CELL
|
||||
|
||||
/obj/item/computer_hardware/battery/get_cell()
|
||||
return battery
|
||||
|
||||
/obj/item/computer_hardware/battery/New(loc, battery_type = null)
|
||||
if(battery_type)
|
||||
battery = new battery_type(src)
|
||||
@@ -16,6 +19,11 @@
|
||||
. = ..()
|
||||
QDEL_NULL(battery)
|
||||
|
||||
/obj/item/computer_hardware/battery/handle_atom_del(atom/A)
|
||||
if(A == battery)
|
||||
try_eject(0, null, TRUE)
|
||||
. = ..()
|
||||
|
||||
/obj/item/computer_hardware/battery/try_insert(obj/item/I, mob/living/user = null)
|
||||
if(!holder)
|
||||
return FALSE
|
||||
@@ -45,7 +53,10 @@
|
||||
to_chat(user, "<span class='warning'>There is no power cell connected to \the [src].</span>")
|
||||
return FALSE
|
||||
else
|
||||
battery.forceMove(get_turf(src))
|
||||
if(user)
|
||||
user.put_in_hands(battery)
|
||||
else
|
||||
battery.forceMove(drop_location())
|
||||
to_chat(user, "<span class='notice'>You detach \the [battery] from \the [src].</span>")
|
||||
battery = null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user