Runtime fixes.

This commit is contained in:
davipatury
2017-02-20 21:44:06 -03:00
parent 67ee6fdd41
commit 84f71a7d0f
7 changed files with 47 additions and 25 deletions
@@ -21,11 +21,13 @@
return FALSE
if(battery)
to_chat(user, "<span class='warning'>You try to connect \the [I] to \the [src], but its connectors are occupied.</span>")
if(user)
to_chat(user, "<span class='warning'>You try to connect \the [I] to \the [src], but its connectors are occupied.</span>")
return FALSE
if(I.w_class > holder.max_hardware_size)
to_chat(user, "<span class='warning'>This power cell is too large for \the [holder]!</span>")
if(user)
to_chat(user, "<span class='warning'>This power cell is too large for \the [holder]!</span>")
return FALSE
if(user && !user.unEquip(I))
@@ -33,18 +35,21 @@
I.forceMove(src)
battery = I
to_chat(user, "<span class='notice'>You connect \the [I] to \the [src].</span>")
if(user)
to_chat(user, "<span class='notice'>You connect \the [I] to \the [src].</span>")
return TRUE
/obj/item/weapon/computer_hardware/battery/try_eject(slot=0, mob/living/user = null, forced = 0)
if(!battery)
to_chat(user, "<span class='warning'>There is no power cell connected to \the [src].</span>")
if(user)
to_chat(user, "<span class='warning'>There is no power cell connected to \the [src].</span>")
return FALSE
else
battery.forceMove(get_turf(src))
to_chat(user, "<span class='notice'>You detach \the [battery] from \the [src].</span>")
if(user)
to_chat(user, "<span class='notice'>You detach \the [battery] from \the [src].</span>")
battery = null
if(holder)