July 5th TG sync (#1883)

July 5th TG sync
This commit is contained in:
Poojawa
2017-07-05 22:14:19 -05:00
committed by GitHub
parent 454b9c3d68
commit b1b4826c0c
1264 changed files with 149689 additions and 570309 deletions
+1 -1
View File
@@ -283,7 +283,7 @@
else
visible_message("<span class='danger'>\The [src] [change_msg]!</span>")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, 'sound/items/wirecutter.ogg', 100, 1)
update_icon()
// now disconnect anyone using the camera
@@ -15,8 +15,8 @@
obj_integrity = 150
max_integrity = 150
// Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/device/analyzer)
var/list/upgrades = list()
var/static/list/possible_upgrades = typecacheof(list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/device/analyzer))
var/list/upgrades
var/state = 1
/*
@@ -26,15 +26,14 @@
4 = Screwdriver panel closed and is fully built (you cannot attach upgrades)
*/
/obj/structure/camera_assembly/New(loc, ndir, building)
..()
/obj/structure/camera_assembly/Initialize(mapload, ndir, building)
. = ..()
if(building)
setDir(ndir)
upgrades = list()
/obj/structure/camera_assembly/Destroy()
for(var/I in upgrades)
qdel(I)
upgrades.Cut()
QDEL_LIST(upgrades)
return ..()
/obj/structure/camera_assembly/attackby(obj/item/W, mob/living/user, params)
@@ -110,7 +109,7 @@
return
// Upgrades!
if(is_type_in_list(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already.
if(is_type_in_typecache(W, possible_upgrades) && !is_type_in_list(W, upgrades)) // Is a possible upgrade and isn't in the camera already.
if(!user.drop_item(W))
return
to_chat(user, "<span class='notice'>You attach \the [W] into the assembly inner circuits.</span>")
@@ -137,7 +136,7 @@
playsound(src.loc, WT.usesound, 50, 1)
if(do_after(user, 20*WT.toolspeed, target = src))
if(WT.isOn())
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
return 1
return 0
+68 -68
View File
@@ -1,48 +1,48 @@
// PRESETS
// EMP
/obj/machinery/camera/emp_proof
start_active = 1
/obj/machinery/camera/emp_proof/Initialize()
// PRESETS
// EMP
/obj/machinery/camera/emp_proof
start_active = 1
/obj/machinery/camera/emp_proof/Initialize()
. = ..()
upgradeEmpProof()
// X-RAY
/obj/machinery/camera/xray
start_active = 1
icon_state = "xraycam" // Thanks to Krutchen for the icons.
/obj/machinery/camera/xray/Initialize()
upgradeEmpProof()
// X-RAY
/obj/machinery/camera/xray
start_active = 1
icon_state = "xraycam" // Thanks to Krutchen for the icons.
/obj/machinery/camera/xray/Initialize()
. = ..()
upgradeXRay()
// MOTION
/obj/machinery/camera/motion
start_active = 1
name = "motion-sensitive security camera"
/obj/machinery/camera/motion/Initialize()
..()
upgradeMotion()
// ALL UPGRADES
/obj/machinery/camera/all
start_active = 1
/obj/machinery/camera/all/Initialize()
upgradeXRay()
// MOTION
/obj/machinery/camera/motion
start_active = 1
name = "motion-sensitive security camera"
/obj/machinery/camera/motion/Initialize()
..()
upgradeMotion()
// ALL UPGRADES
/obj/machinery/camera/all
start_active = 1
/obj/machinery/camera/all/Initialize()
. = ..()
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.
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/Initialize()
..()
return INITIALIZE_HINT_LATELOAD
@@ -59,29 +59,29 @@
if(C.number)
number = max(number, C.number+1)
c_tag = "[A.name] #[number]"
// CHECKS
/obj/machinery/camera/proc/isEmpProof()
return upgrades & CAMERA_UPGRADE_EMP_PROOF
/obj/machinery/camera/proc/isXRay()
return upgrades & CAMERA_UPGRADE_XRAY
/obj/machinery/camera/proc/isMotion()
return upgrades & CAMERA_UPGRADE_MOTION
// UPGRADE PROCS
/obj/machinery/camera/proc/upgradeEmpProof()
assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/plasma(assembly))
upgrades |= CAMERA_UPGRADE_EMP_PROOF
/obj/machinery/camera/proc/upgradeXRay()
assembly.upgrades.Add(new /obj/item/device/analyzer(assembly))
upgrades |= CAMERA_UPGRADE_XRAY
// If you are upgrading Motion, and it isn't in the camera's Initialize(), add it to the machines list.
/obj/machinery/camera/proc/upgradeMotion()
assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly))
upgrades |= CAMERA_UPGRADE_MOTION
// CHECKS
/obj/machinery/camera/proc/isEmpProof()
return upgrades & CAMERA_UPGRADE_EMP_PROOF
/obj/machinery/camera/proc/isXRay()
return upgrades & CAMERA_UPGRADE_XRAY
/obj/machinery/camera/proc/isMotion()
return upgrades & CAMERA_UPGRADE_MOTION
// UPGRADE PROCS
/obj/machinery/camera/proc/upgradeEmpProof()
assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/plasma(assembly))
upgrades |= CAMERA_UPGRADE_EMP_PROOF
/obj/machinery/camera/proc/upgradeXRay()
assembly.upgrades.Add(new /obj/item/device/analyzer(assembly))
upgrades |= CAMERA_UPGRADE_XRAY
// If you are upgrading Motion, and it isn't in the camera's Initialize(), add it to the machines list.
/obj/machinery/camera/proc/upgradeMotion()
assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly))
upgrades |= CAMERA_UPGRADE_MOTION