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

View File

@@ -307,7 +307,7 @@
update_icon()
/obj/item/device/modular_computer/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/modular_computer/attackby(obj/item/weapon/W, mob/user)
// Insert items into the components
for(var/h in all_components)
var/obj/item/weapon/computer_hardware/H = all_components[h]

View File

@@ -3,11 +3,13 @@
return FALSE
if(H.w_class > max_hardware_size)
to_chat(user, "<span class='warning'>This component is too large for \the [src]!</span>")
if(user)
to_chat(user, "<span class='warning'>This component is too large for \the [src]!</span>")
return FALSE
if(all_components[H.device_type])
to_chat(user, "<span class='warning'>This computer's hardware slot is already occupied by \the [all_components[H.device_type]].</span>")
if(user)
to_chat(user, "<span class='warning'>This computer's hardware slot is already occupied by \the [all_components[H.device_type]].</span>")
return FALSE
return TRUE
@@ -23,7 +25,8 @@
all_components[H.device_type] = H
to_chat(user, "<span class='notice'>You install \the [H] into \the [src].</span>")
if(user)
to_chat(user, "<span class='notice'>You install \the [H] into \the [src].</span>")
H.holder = src
H.on_install(src, user)
@@ -35,7 +38,8 @@
all_components.Remove(H.device_type)
to_chat(user, "<span class='notice'>You remove \the [H] from \the [src].</span>")
if(user)
to_chat(user, "<span class='notice'>You remove \the [H] from \the [src].</span>")
H.forceMove(get_turf(src))
H.holder = null