Made some object lists less terrible to read

This commit is contained in:
CitadelStationBot
2017-07-18 09:44:43 -05:00
parent c294d781b6
commit a72962c300
236 changed files with 733 additions and 629 deletions
+1 -1
View File
@@ -238,7 +238,7 @@
materials = list(MAT_METAL=100)
/obj/item/device/am_shielding_container/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/device/multitool) && istype(src.loc,/turf))
if(istype(I, /obj/item/device/multitool) && istype(src.loc, /turf))
new/obj/machinery/am_shielding(src.loc)
qdel(src)
else
+3 -3
View File
@@ -301,7 +301,7 @@ By design, d1 is the smallest direction and d2 is the highest
//first let's add turf cables to our powernet
//then we'll connect machines on turf with a node cable is present
for(var/AM in loc)
if(istype(AM,/obj/structure/cable))
if(istype(AM, /obj/structure/cable))
var/obj/structure/cable/C = AM
if(C.d1 == d1 || C.d2 == d1 || C.d1 == d2 || C.d2 == d2) //only connected if they have a common direction
if(C.powernet == powernet)
@@ -311,7 +311,7 @@ By design, d1 is the smallest direction and d2 is the highest
else
powernet.add_cable(C) //the cable was powernetless, let's just add it to our powernet
else if(istype(AM,/obj/machinery/power/apc))
else if(istype(AM, /obj/machinery/power/apc))
var/obj/machinery/power/apc/N = AM
if(!N.terminal)
continue // APC are connected through their terminal
@@ -321,7 +321,7 @@ By design, d1 is the smallest direction and d2 is the highest
to_connect += N.terminal //we'll connect the machines after all cables are merged
else if(istype(AM,/obj/machinery/power)) //other power machines
else if(istype(AM, /obj/machinery/power)) //other power machines
var/obj/machinery/power/M = AM
if(M.powernet == powernet)
+11 -11
View File
@@ -194,7 +194,7 @@
if(AM == source)
continue //we don't want to return source
if(!cable_only && istype(AM,/obj/machinery/power))
if(!cable_only && istype(AM, /obj/machinery/power))
var/obj/machinery/power/P = AM
if(P.powernet == 0)
continue // exclude APCs which have powernet=0
@@ -203,7 +203,7 @@
if(d == 0)
. += P
else if(istype(AM,/obj/structure/cable))
else if(istype(AM, /obj/structure/cable))
var/obj/structure/cable/C = AM
if(!unmarked || !C.powernet)
@@ -228,13 +228,13 @@
P = worklist[index] //get the next power object found
index++
if( istype(P,/obj/structure/cable))
if( istype(P, /obj/structure/cable))
var/obj/structure/cable/C = P
if(C.powernet != PN) //add it to the powernet, if it isn't already there
PN.add_cable(C)
worklist |= C.get_connections() //get adjacents power objects, with or without a powernet
else if(P.anchored && istype(P,/obj/machinery/power))
else if(P.anchored && istype(P, /obj/machinery/power))
var/obj/machinery/power/M = P
found_machines |= M //we wait until the powernet is fully propagates to connect the machines
@@ -279,7 +279,7 @@
//dist_check - set to only shock mobs within 1 of source (vendors, airlocks, etc.)
//No animations will be performed by this proc.
/proc/electrocute_mob(mob/living/carbon/M, power_source, obj/source, siemens_coeff = 1, dist_check = FALSE)
if(istype(M.loc,/obj/mecha))
if(istype(M.loc, /obj/mecha))
return 0 //feckin mechs are dumb
if(dist_check)
if(!in_range(source,M))
@@ -292,21 +292,21 @@
return 0 //to avoid spamming with insulated glvoes on
var/area/source_area
if(istype(power_source,/area))
if(istype(power_source, /area))
source_area = power_source
power_source = source_area.get_apc()
if(istype(power_source,/obj/structure/cable))
if(istype(power_source, /obj/structure/cable))
var/obj/structure/cable/Cable = power_source
power_source = Cable.powernet
var/datum/powernet/PN
var/obj/item/weapon/stock_parts/cell/cell
if(istype(power_source,/datum/powernet))
if(istype(power_source, /datum/powernet))
PN = power_source
else if(istype(power_source,/obj/item/weapon/stock_parts/cell))
else if(istype(power_source, /obj/item/weapon/stock_parts/cell))
cell = power_source
else if(istype(power_source,/obj/machinery/power/apc))
else if(istype(power_source, /obj/machinery/power/apc))
var/obj/machinery/power/apc/apc = power_source
cell = apc.cell
if (apc.terminal)
@@ -338,7 +338,7 @@
if (source_area)
source_area.use_power(drained_energy/GLOB.CELLRATE)
else if (istype(power_source,/datum/powernet))
else if (istype(power_source, /datum/powernet))
var/drained_power = drained_energy/GLOB.CELLRATE //convert from "joules" to "watts"
PN.load+=drained_power
else if (istype(power_source, /obj/item/weapon/stock_parts/cell))
@@ -169,24 +169,24 @@
connected_parts.Cut()
T = get_step(T,rdir)
if(!check_part(T,/obj/structure/particle_accelerator/fuel_chamber))
if(!check_part(T, /obj/structure/particle_accelerator/fuel_chamber))
return 0
T = get_step(T,odir)
if(!check_part(T,/obj/structure/particle_accelerator/end_cap))
if(!check_part(T, /obj/structure/particle_accelerator/end_cap))
return 0
T = get_step(T,dir)
T = get_step(T,dir)
if(!check_part(T,/obj/structure/particle_accelerator/power_box))
if(!check_part(T, /obj/structure/particle_accelerator/power_box))
return 0
T = get_step(T,dir)
if(!check_part(T,/obj/structure/particle_accelerator/particle_emitter/center))
if(!check_part(T, /obj/structure/particle_accelerator/particle_emitter/center))
return 0
T = get_step(T,ldir)
if(!check_part(T,/obj/structure/particle_accelerator/particle_emitter/left))
if(!check_part(T, /obj/structure/particle_accelerator/particle_emitter/left))
return 0
T = get_step(T,rdir)
T = get_step(T,rdir)
if(!check_part(T,/obj/structure/particle_accelerator/particle_emitter/right))
if(!check_part(T, /obj/structure/particle_accelerator/particle_emitter/right))
return 0
assembled = 1