-Added maintenance cameras. These are cameras which are located in maintenance, not only that but they have a 66% chance of not spawning. Leading to random blind spots in maintenance.

-Fixed large grenades, removed the reliability prob().

-Added maintenance cameras on the map.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4642 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-09-07 09:33:10 +00:00
parent ca7cb95b7d
commit f39dd65748
5 changed files with 8760 additions and 8732 deletions

View File

@@ -38,6 +38,11 @@
WireColorToFlag = randomCameraWires()
assembly = new(src)
assembly.state = 4
/* // Use this to look for cameras that have the same c_tag.
for(var/obj/machinery/camera/C in cameranet.cameras)
if(C != src && C.c_tag == src.c_tag && C.network == src.network)
world.log << "[src.c_tag] [src.x] [src.y] [src.z] conflicts with [C.c_tag] [C.x] [C.y] [C.z]"
*/
..()

View File

@@ -18,6 +18,13 @@
upgradeXRay()
upgradeMotion()
/obj/machinery/camera/maintenance/New()
// Maintenance camera that has a 66% chance of not spawning.
if(prob(66))
del(src)
return
..()
// CHECKS
/obj/machinery/camera/proc/isEmpProof()

View File

@@ -9,7 +9,7 @@
var/path = 0
var/obj/item/weapon/circuitboard/circuit = null
var/list/beakers = new/list()
var/list/allowed_containers = list("/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/reagent_containers/glass/dispenser", "/obj/item/weapon/reagent_containers/glass/bottle")
var/list/allowed_containers = list(/obj/item/weapon/reagent_containers/glass/beaker, /obj/item/weapon/reagent_containers/glass/bottle)
var/affected_area = 3
New()
@@ -41,7 +41,7 @@
stage = 2
else
user << "\red You need to add at least one beaker before locking the assembly."
else if((istype(W,/obj/item/weapon/reagent_containers/glass/beaker) || istype(W,/obj/item/weapon/reagent_containers/glass/bottle)) && stage == 1 && path != 2)
else if(is_type_in_list(W, allowed_containers) && stage == 1 && path != 2)
path = 1
if(beakers.len == 2)
user << "\red The grenade can not hold more containers."
@@ -56,46 +56,46 @@
user << "\red \the [W] is empty."
prime()
if(prob(reliability))
var/has_reagents = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(G.reagents.total_volume) has_reagents = 1
//if(prob(reliability))
var/has_reagents = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(G.reagents.total_volume) has_reagents = 1
if(!has_reagents)
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
state = 0
return
if(!has_reagents)
playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
state = 0
return
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
if(src.reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/effect/system/steam_spread/steam = new /datum/effect/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
for(var/atom/A in view(affected_area, src.loc))
if( A == src ) continue
src.reagents.reaction(A, 1, 10)
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
else
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
/*else
icon_state = initial(icon_state) + "_locked"
crit_fail = 1
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.loc = get_turf(src.loc)
G.loc = get_turf(src.loc)*/
/obj/item/weapon/grenade/chem_grenade/large
name = "Large Chem Grenade"
desc = "An oversized grenade that affects a larger area."
icon_state = "large_grenade"
allowed_containers = list("/obj/item/weapon/reagent_containers/glass")
allowed_containers = list(/obj/item/weapon/reagent_containers/glass)
origin_tech = "combat=3;materials=3"
affected_area = 4