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