Kills off /obj/item/device (#6561)
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
var/max_idle_programs = 2 // 2 idle, + 1 active = 3 as said in description.
|
||||
device_type = MC_CPU
|
||||
|
||||
/obj/item/computer_hardware/processor_unit/on_remove(obj/item/device/modular_computer/MC, mob/user)
|
||||
/obj/item/computer_hardware/processor_unit/on_remove(obj/item/modular_computer/MC, mob/user)
|
||||
MC.shutdown_computer()
|
||||
|
||||
/obj/item/computer_hardware/processor_unit/small
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
w_class = WEIGHT_CLASS_TINY // w_class limits which devices can contain this component.
|
||||
// 1: PDAs/Tablets, 2: Laptops, 3-4: Consoles only
|
||||
var/obj/item/device/modular_computer/holder = null
|
||||
var/obj/item/modular_computer/holder = null
|
||||
// Computer that holds this hardware, if any.
|
||||
|
||||
var/power_usage = 0 // If the hardware uses extra power, change this.
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/obj/item/computer_hardware/attackby(obj/item/I, mob/living/user)
|
||||
// Multitool. Runs diagnostics
|
||||
if(istype(I, /obj/item/device/multitool))
|
||||
if(istype(I, /obj/item/multitool))
|
||||
to_chat(user, "***** DIAGNOSTICS REPORT *****")
|
||||
diagnostics(user)
|
||||
to_chat(user, "******************************")
|
||||
@@ -83,15 +83,15 @@
|
||||
to_chat(user, "<span class='notice'>It seems to be slightly damaged.</span>")
|
||||
|
||||
// Component-side compatibility check.
|
||||
/obj/item/computer_hardware/proc/can_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/proc/can_install(obj/item/modular_computer/M, mob/living/user = null)
|
||||
return can_install
|
||||
|
||||
// Called when component is installed into PC.
|
||||
/obj/item/computer_hardware/proc/on_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/proc/on_install(obj/item/modular_computer/M, mob/living/user = null)
|
||||
return
|
||||
|
||||
// Called when component is removed from PC.
|
||||
/obj/item/computer_hardware/proc/on_remove(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/proc/on_remove(obj/item/modular_computer/M, mob/living/user = null)
|
||||
try_eject(forced = 1)
|
||||
|
||||
// Called when someone tries to insert something in it - paper in printer, card in card reader, etc.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
device_type = MC_AI
|
||||
|
||||
var/obj/item/device/aicard/stored_card = null
|
||||
var/obj/item/aicard/stored_card = null
|
||||
var/locked = FALSE
|
||||
|
||||
|
||||
@@ -15,17 +15,17 @@
|
||||
if(stored_card)
|
||||
to_chat(user, "There appears to be an intelliCard loaded. There appears to be a pinhole protecting a manual eject button. A screwdriver could probably press it.")
|
||||
|
||||
/obj/item/computer_hardware/ai_slot/on_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/ai_slot/on_install(obj/item/modular_computer/M, mob/living/user = null)
|
||||
M.add_verb(device_type)
|
||||
|
||||
/obj/item/computer_hardware/ai_slot/on_remove(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/ai_slot/on_remove(obj/item/modular_computer/M, mob/living/user = null)
|
||||
M.remove_verb(device_type)
|
||||
|
||||
/obj/item/computer_hardware/ai_slot/try_insert(obj/item/I, mob/living/user = null)
|
||||
if(!holder)
|
||||
return FALSE
|
||||
|
||||
if(!istype(I, /obj/item/device/aicard))
|
||||
if(!istype(I, /obj/item/aicard))
|
||||
return FALSE
|
||||
|
||||
if(stored_card)
|
||||
|
||||
@@ -29,10 +29,10 @@
|
||||
return stored_card2
|
||||
return ..()
|
||||
|
||||
/obj/item/computer_hardware/card_slot/on_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/card_slot/on_install(obj/item/modular_computer/M, mob/living/user = null)
|
||||
M.add_verb(device_type)
|
||||
|
||||
/obj/item/computer_hardware/card_slot/on_remove(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/card_slot/on_remove(obj/item/modular_computer/M, mob/living/user = null)
|
||||
M.remove_verb(device_type)
|
||||
|
||||
/obj/item/computer_hardware/card_slot/try_insert(obj/item/I, mob/living/user = null)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/used_capacity = 0
|
||||
var/list/stored_files = list() // List of stored files on this drive. DO NOT MODIFY DIRECTLY!
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/on_remove(obj/item/device/modular_computer/MC, mob/user)
|
||||
/obj/item/computer_hardware/hard_drive/on_remove(obj/item/modular_computer/MC, mob/user)
|
||||
MC.shutdown_computer()
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/proc/install_default_programs()
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
max_capacity = 16
|
||||
device_type = MC_SDD
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/portable/on_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/hard_drive/portable/on_install(obj/item/modular_computer/M, mob/living/user = null)
|
||||
M.add_verb(device_type)
|
||||
|
||||
/obj/item/computer_hardware/hard_drive/portable/on_remove(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/hard_drive/portable/on_remove(obj/item/modular_computer/M, mob/living/user = null)
|
||||
..()
|
||||
M.remove_verb(device_type)
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
icon_state = "charger_wire"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/computer_hardware/recharger/wired/can_install(obj/item/device/modular_computer/M, mob/living/user = null)
|
||||
/obj/item/computer_hardware/recharger/wired/can_install(obj/item/modular_computer/M, mob/living/user = null)
|
||||
if(ismachinery(M.physical) && M.physical.anchored)
|
||||
return ..()
|
||||
to_chat(user, "<span class='warning'>\The [src] is incompatible with portable computers!</span>")
|
||||
|
||||
Reference in New Issue
Block a user