mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 01:53:35 +01:00
Runtime fixes.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user