mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user