mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
-Reduced the chunks of code about minerals in door_assembly.dm Preeeetty much this commit is just to update all the files to the new path of the minerals. From here, if I can, I'll start changing one by one to remove the huge chunks of code. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5087 316c924e-a436-60f5-8080-3fe189b3f50e
77 lines
1.9 KiB
Plaintext
77 lines
1.9 KiB
Plaintext
// PRESETS
|
|
|
|
// EMP
|
|
|
|
/obj/machinery/camera/emp_proof/New()
|
|
..()
|
|
upgradeEmpProof()
|
|
|
|
// X-RAY
|
|
|
|
/obj/machinery/camera/xray
|
|
icon_state = "xraycam" // Thanks to Krutchen for the icons.
|
|
|
|
/obj/machinery/camera/xray/New()
|
|
..()
|
|
upgradeXRay()
|
|
|
|
// MOTION
|
|
|
|
/obj/machinery/camera/motion/New()
|
|
..()
|
|
upgradeMotion()
|
|
|
|
// ALL UPGRADES
|
|
|
|
/obj/machinery/camera/all/New()
|
|
..()
|
|
upgradeEmpProof()
|
|
upgradeXRay()
|
|
upgradeMotion()
|
|
|
|
// AUTONAME
|
|
|
|
/obj/machinery/camera/autoname
|
|
var/number = 0 //camera number in area
|
|
|
|
//This camera type automatically sets it's name to whatever the area that it's in is called.
|
|
/obj/machinery/camera/autoname/New()
|
|
..()
|
|
spawn(10)
|
|
number = 1
|
|
var/area/A = get_area(src)
|
|
if(A)
|
|
for(var/obj/machinery/camera/autoname/C in world)
|
|
if(C == src) continue
|
|
var/area/CA = get_area(C)
|
|
if(CA.type == A.type)
|
|
if(C.number)
|
|
number = max(number, C.number+1)
|
|
c_tag = "[A.name] #[number]"
|
|
|
|
|
|
// CHECKS
|
|
|
|
/obj/machinery/camera/proc/isEmpProof()
|
|
var/O = locate(/obj/item/stack/sheet/mineral/plasma) in assembly.upgrades
|
|
return O
|
|
|
|
/obj/machinery/camera/proc/isXRay()
|
|
var/O = locate(/obj/item/weapon/reagent_containers/food/snacks/grown/carrot) in assembly.upgrades
|
|
return O
|
|
|
|
/obj/machinery/camera/proc/isMotion()
|
|
var/O = locate(/obj/item/device/assembly/prox_sensor) in assembly.upgrades
|
|
return O
|
|
|
|
// UPGRADE PROCS
|
|
|
|
/obj/machinery/camera/proc/upgradeEmpProof()
|
|
assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/plasma(assembly))
|
|
|
|
/obj/machinery/camera/proc/upgradeXRay()
|
|
assembly.upgrades.Add(new /obj/item/weapon/reagent_containers/food/snacks/grown/carrot(assembly))
|
|
|
|
// If you are upgrading Motion, and it isn't in the camera's New(), add it to the machines list.
|
|
/obj/machinery/camera/proc/upgradeMotion()
|
|
assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly)) |