Fix PDA flashlights not working or installing (#14336)

This commit is contained in:
Wildkins
2022-06-18 16:11:33 -04:00
committed by GitHub
parent 7104cd6229
commit c040f9dc6f
3 changed files with 17 additions and 14 deletions

View File

@@ -72,6 +72,12 @@
to_chat(personal_ai.pai, SPAN_NOTICE("You gain access to \the [src]'s computronics."))
user.drop_from_inventory(H, src)
update_icon()
else if(istype(H, /obj/item/computer_hardware/flashlight))
if(flashlight)
to_chat(user, SPAN_WARNING("\The [src]'s flashlight slot is already occupied by \the [flashlight]."))
return
found = TRUE
flashlight = H
if(found)
to_chat(user, SPAN_NOTICE("You install \the [H] into \the [src]."))
H.parent_computer = src
@@ -186,4 +192,4 @@
all_components.Add(tesla_link)
if(flashlight)
all_components.Add(flashlight)
return all_components
return all_components