Modular computers now use list of components (#20557)

* Bringing computers to the light side

Bringing computers to the light side

* Lighter and lighter

Lighter and lighter

* Missed some lists

Missed some lists

* Text to defines

Text to defines

* Last commit

Last commit

* How did this even get here

How did this even get here

* Removing bad stuff

Removing bad stuff

* Fixes verb adding and idle check

Fixes verb adding and idle check
This commit is contained in:
Razharas
2016-09-18 00:40:21 +02:00
committed by phil235
parent 6b3e788ee9
commit 186d852bc5
30 changed files with 269 additions and 217 deletions
@@ -87,6 +87,11 @@
return 1
if(ishuman(user))
var/obj/item/weapon/card/id/D
var/obj/item/weapon/computer_hardware/card_slot/card_slot
if(computer && card_slot)
card_slot = computer.all_components[MC_CARD]
D = card_slot.GetID()
var/mob/living/carbon/human/h = user
var/obj/item/weapon/card/id/I = h.get_idcard()
var/obj/item/weapon/card/id/C = h.get_active_held_item()
@@ -95,7 +100,7 @@
if(!(C && istype(C)))
C = null
if(!I && !C)
if(!I && !C && !D)
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"RFID Error - Unable to scan ID\" warning.</span>"
return 0
@@ -106,6 +111,9 @@
else if(C)
if(access_to_check in C.GetAccess())
return 1
else if(D)
if(access_to_check in D.GetAccess())
return 1
if(loud)
user << "<span class='danger'>\The [computer] flashes an \"Access Denied\" warning.</span>"
return 0
@@ -162,7 +170,7 @@
return 1
if("PC_minimize")
var/mob/user = usr
if(!computer.active_program || !computer.processor_unit)
if(!computer.active_program || !computer.all_components[MC_CPU])
return
computer.idle_threads.Add(computer.active_program)