h. Updates NTOS, and axes p2p filetransfer!

This commit is contained in:
Letter N
2020-07-30 20:54:13 +08:00
parent b376a6b6c4
commit e40470f553
54 changed files with 797 additions and 516 deletions
@@ -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