mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Phasing out world loops, pt 1
This commit is contained in:
@@ -10,6 +10,7 @@ var/global/list/mob_list = list() //List of all mobs, including clientless
|
||||
var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player
|
||||
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
|
||||
|
||||
var/global/list/machine_list = list() //List of all /obj/machinery
|
||||
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
//world << sound('sound/AI/aliens.ogg')
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
@@ -325,7 +325,7 @@
|
||||
apc.overload_lighting()
|
||||
|
||||
else
|
||||
for(var/obj/machinery/power/apc/apc in world)
|
||||
for(var/obj/machinery/power/apc/apc in machines)
|
||||
apc.overload_lighting()
|
||||
|
||||
return
|
||||
@@ -436,7 +436,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
M.add_ion_law("THE STATION IS [who2pref] [who2]")
|
||||
|
||||
if(botEmagChance)
|
||||
for(var/obj/machinery/bot/bot in world)
|
||||
for(var/obj/machinery/bot/bot in machines)
|
||||
if(prob(botEmagChance))
|
||||
bot.Emag()
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ Implants;
|
||||
else
|
||||
intercepttext += "<b>[M.name]</b>, the <b>[M.mind.assigned_role]</b> <br>"
|
||||
|
||||
for (var/obj/machinery/computer/communications/comm in world)
|
||||
for (var/obj/machinery/computer/communications/comm in machines)
|
||||
if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept)
|
||||
var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc )
|
||||
intercept.name = "paper- 'Cent. Com. Status Summary'"
|
||||
|
||||
@@ -6,10 +6,12 @@ var/list/doppler_arrays = list()
|
||||
|
||||
|
||||
/obj/machinery/doppler_array/New()
|
||||
..()
|
||||
doppler_arrays += src
|
||||
|
||||
/obj/machinery/doppler_array/Del()
|
||||
doppler_arrays -= src
|
||||
..()
|
||||
|
||||
/obj/machinery/doppler_array/process()
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -114,6 +114,7 @@ Class Procs:
|
||||
machines += src
|
||||
|
||||
/obj/machinery/Del()
|
||||
machines -= src
|
||||
..()
|
||||
|
||||
/obj/machinery/process()//If you dont use process or power why are you here
|
||||
|
||||
@@ -69,6 +69,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
icon_state = "req_comp0"
|
||||
|
||||
/obj/machinery/requests_console/New()
|
||||
..()
|
||||
name = "[department] Requests Console"
|
||||
allConsoles += src
|
||||
//req_console_departments += department
|
||||
|
||||
@@ -19,7 +19,7 @@ client/verb/JoinResponseTeam()
|
||||
var/leader_selected = (response_team_members.len == 0)
|
||||
|
||||
|
||||
for (var/obj/effect/landmark/L in world) if (L.name == "Commando")
|
||||
for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Commando")
|
||||
|
||||
var/new_name = input(usr, "Pick a name","Name") as null|text
|
||||
if(!new_name) return
|
||||
@@ -43,9 +43,10 @@ client/verb/JoinResponseTeam()
|
||||
proc/percentage_dead()
|
||||
var/total = 0
|
||||
var/deadcount = 0
|
||||
for(var/mob/living/carbon/human/H in world) if(H.mind) // I *think* monkeys gone human don't have a mind
|
||||
if(H.stat == 2) deadcount++
|
||||
total++
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(H.mind) // I *think* monkeys gone human don't have a mind
|
||||
if(H.stat == 2) deadcount++
|
||||
total++
|
||||
|
||||
if(total == 0) return 0
|
||||
else return round(100 * deadcount / total)
|
||||
@@ -54,7 +55,7 @@ proc/percentage_dead()
|
||||
proc/percentage_antagonists()
|
||||
var/total = 0
|
||||
var/antagonists = 0
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(is_special_character(H) >= 1)
|
||||
antagonists++
|
||||
total++
|
||||
|
||||
@@ -34,11 +34,9 @@
|
||||
attack(mob/living/carbon/human/M as mob, mob/user as mob)
|
||||
if (!ishuman(M))
|
||||
user << "\red [M] is not human and cannot have the fingerprints."
|
||||
flick("forensic0",src)
|
||||
return 0
|
||||
if (( !( istype(M.dna, /datum/dna) ) || M.gloves) )
|
||||
user << "\blue No fingerprints found on [M]"
|
||||
flick("forensic0",src)
|
||||
return 0
|
||||
else
|
||||
if (src.amount < 1)
|
||||
@@ -73,7 +71,6 @@
|
||||
return
|
||||
if(istype(A,/obj/item/weapon/f_card))
|
||||
user << "The scanner displays on the screen: \"ERROR 43: Object on Excluded Object List.\""
|
||||
flick("forensic0",src)
|
||||
return
|
||||
|
||||
add_fingerprint(user)
|
||||
@@ -84,7 +81,6 @@
|
||||
if(!isnull(A.blood_DNA))
|
||||
for(var/blood in A.blood_DNA)
|
||||
user << "\blue Blood type: [A.blood_DNA[blood]]\nDNA: [blood]"
|
||||
flick("forensic2",src)
|
||||
return
|
||||
|
||||
//General
|
||||
@@ -92,12 +88,10 @@
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\
|
||||
"\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\
|
||||
"You hear a faint hum of electrical equipment.")
|
||||
flick("forensic0",src)
|
||||
return 0
|
||||
|
||||
if(add_data(A))
|
||||
user << "\blue Object already in internal memory. Consolidating data..."
|
||||
flick("forensic2",src)
|
||||
return
|
||||
|
||||
|
||||
@@ -122,7 +116,6 @@
|
||||
//FIBERS
|
||||
if(A.suit_fibers)
|
||||
user << "\blue Fibers/Materials Data Stored: Scan with Hi-Res Forensic Scanner to retrieve."
|
||||
flick("forensic2",src)
|
||||
|
||||
//Blood
|
||||
if (A.blood_DNA)
|
||||
@@ -134,13 +127,11 @@
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\
|
||||
"You finish scanning \the [A].",\
|
||||
"You hear a faint hum of electrical equipment.")
|
||||
flick("forensic2",src)
|
||||
return 0
|
||||
else
|
||||
user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]\n[user.gender == MALE ? "He" : "She"] seems to perk up slightly at the readout." ,\
|
||||
"The results of the scan pique your interest.",\
|
||||
"You hear a faint hum of electrical equipment, and someone making a thoughtful noise.")
|
||||
flick("forensic2",src)
|
||||
return 0
|
||||
return
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/datum/event/alien_infestation/start()
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in machines)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
|
||||
if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
Reference in New Issue
Block a user