This commit is contained in:
LetterN
2021-10-28 17:34:52 +08:00
parent 49940c373e
commit f7b898a2a9
346 changed files with 13714 additions and 8493 deletions
@@ -7,13 +7,14 @@
device_type = MC_AI
expansion_hw = TRUE
var/obj/item/aicard/stored_card = null
var/obj/item/aicard/stored_card
var/locked = FALSE
/obj/item/computer_hardware/ai_slot/handle_atom_del(atom/A)
if(A == stored_card)
try_eject(forced = TRUE)
. = ..()
///What happens when the intellicard is removed (or deleted) from the module, through try_eject() or not.
/obj/item/computer_hardware/ai_slot/Exited(atom/movable/gone, direction)
if(stored_card == gone)
stored_card = null
return ..()
/obj/item/computer_hardware/ai_slot/examine(mob/user)
. = ..()
@@ -28,34 +29,33 @@
return FALSE
if(stored_card)
to_chat(user, "<span class='warning'>You try to insert \the [I] into \the [src], but the slot is occupied.</span>")
to_chat(user, span_warning("You try to insert \the [I] into \the [src], but the slot is occupied."))
return FALSE
if(user && !user.transferItemToLoc(I, src))
return FALSE
stored_card = I
to_chat(user, "<span class='notice'>You insert \the [I] into \the [src].</span>")
to_chat(user, span_notice("You insert \the [I] into \the [src]."))
return TRUE
/obj/item/computer_hardware/ai_slot/try_eject(mob/living/user = null, forced = FALSE)
if(!stored_card)
to_chat(user, "<span class='warning'>There is no card in \the [src].</span>")
to_chat(user, span_warning("There is no card in \the [src]."))
return FALSE
if(locked && !forced)
to_chat(user, "<span class='warning'>Safeties prevent you from removing the card until reconstruction is complete...</span>")
to_chat(user, span_warning("Safeties prevent you from removing the card until reconstruction is complete..."))
return FALSE
if(stored_card)
to_chat(user, "<span class='notice'>You remove [stored_card] from [src].</span>")
to_chat(user, span_notice("You remove [stored_card] from [src]."))
locked = FALSE
if(user)
if(Adjacent(user))
user.put_in_hands(stored_card)
else
stored_card.forceMove(drop_location())
stored_card = null
return TRUE
return FALSE
@@ -64,6 +64,6 @@
if(..())
return
if(I.tool_behaviour == TOOL_SCREWDRIVER)
to_chat(user, "<span class='notice'>You press down on the manual eject button with \the [I].</span>")
to_chat(user, span_notice("You press down on the manual eject button with \the [I]."))
try_eject(user, TRUE)
return