Can scan solar assemblies

This commit is contained in:
9600bauds
2015-12-30 04:28:17 -03:00
parent 502d683fe8
commit 3c46a3edec
4 changed files with 18 additions and 4 deletions

View File

@@ -316,3 +316,7 @@ a {
if (isobj(loc))
var/obj/location = loc
location.on_log()
// Dummy to give items special techlist for the purposes of the Device Analyser, in case you'd ever need them to give them different tech levels depending on special checks.
/obj/proc/give_tech_list()
return null

View File

@@ -30,7 +30,7 @@ var/list/solars_list = list()
//Solar Assembly - For construction of solar arrays
/obj/machinery/power/solar_assembly
name = "solar panel assembly"
desc = "A solar panel assembly kit, allows constructions of a solar panel, or with a tracking circuit board, a solar tracker"
desc = "A solar panel assembly kit, allows constructions of a solar panel, or with a tracking circuit board, a solar tracker."
icon = 'icons/obj/power.dmi'
icon_state = "sp_base"
anchored = 0
@@ -95,3 +95,6 @@ var/list/solars_list = list()
"<span class='notice'>You take the electronics out of [src].</span>")
return 1
..()
/obj/machinery/power/solar_assembly/give_tech_list()
return "power=3"

View File

@@ -38,4 +38,5 @@
name = "tracker electronics"
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
origin_tech = "power=3;engineering=2"
w_class = 2.0

View File

@@ -81,16 +81,22 @@
if((O.mech_flags & MECH_SCAN_FAIL)==MECH_SCAN_FAIL)
return 0
var/list/techlist
var/list/techlist = O.give_tech_list() //Some items may have a specific techlist. Currently only used for solar assemblies, since they don't hold a circuitboard.
if(techlist)
return 1
if(istype(O, /obj/machinery))
var/obj/machinery/M = O
if(user && (!M.allowed(user) && M.mech_flags & MECH_SCAN_ACCESS) && !src.access_avoidance) //if we require access, and don't have it, and the scanner can't bypass it
return -2
if(M.component_parts)
for(var/obj/item/weapon/circuitboard/CB in M.component_parts) //fetching the circuit by looking in the parts
if(istype(CB))
techlist = ConvertReqString2List(CB.origin_tech)
break
else if(istype(M, /obj/machinery/computer))
var/obj/machinery/computer/C = M
if(C.circuit)