mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Can scan solar assemblies
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user