mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Purges a Bunch of In World Calls (#13641)
* Purges a Bunch of In World Calls * tweaks and fixes also typeless lists * typeless * fixes * tweak
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
playercount = length(GLOB.clients)//grab playercount when event starts not when game starts
|
||||
if(playercount >= highpop_trigger) //spawn with 4 if highpop
|
||||
spawncount = 4
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSair.atmos_machinery)
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
if(temp_vent.parent.other_atmosmch.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
|
||||
vents += temp_vent
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
// Calculate new position (searches through beacons in world)
|
||||
var/obj/item/radio/beacon/chosen
|
||||
var/list/possible = list()
|
||||
for(var/obj/item/radio/beacon/W in world)
|
||||
for(var/obj/item/radio/beacon/W in GLOB.global_radios)
|
||||
if(!is_station_level(W.z))
|
||||
continue
|
||||
possible += W
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
|
||||
// break APC_BREAK_PROBABILITY% of all of the APCs on the station
|
||||
var/affected_apc_count = 0
|
||||
for(var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
for(var/thing in GLOB.apcs)
|
||||
var/obj/machinery/power/apc/C = thing
|
||||
// skip any APCs that are too critical to break
|
||||
var/area/current_area = get_area(C)
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
|
||||
// break APC_BREAK_PROBABILITY% of all of the APCs on the station
|
||||
var/affected_apc_count = 0
|
||||
for(var/obj/machinery/power/apc/C in GLOB.apcs)
|
||||
for(var/thing in GLOB.apcs)
|
||||
var/obj/machinery/power/apc/C = thing
|
||||
// skip any APCs that are too critical to disable
|
||||
var/area/current_area = get_area(C)
|
||||
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
/datum/event/carp_migration/proc/spawn_fish(num_groups, group_size_min = 3, group_size_max = 5)
|
||||
var/list/spawn_locations = list()
|
||||
|
||||
for(var/obj/effect/landmark/C in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/C = thing
|
||||
if(C.name == "carpspawn")
|
||||
spawn_locations.Add(C.loc)
|
||||
spawn_locations = shuffle(spawn_locations)
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
|
||||
for(var/i=1, i <= lightsoutAmount, i++)
|
||||
var/list/possibleEpicentres = list()
|
||||
for(var/obj/effect/landmark/newEpicentre in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/newEpicentre = thing
|
||||
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
|
||||
possibleEpicentres += newEpicentre
|
||||
if(possibleEpicentres.len)
|
||||
@@ -21,7 +22,8 @@
|
||||
if(!epicentreList.len)
|
||||
return
|
||||
|
||||
for(var/obj/effect/landmark/epicentre in epicentreList)
|
||||
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
|
||||
for(var/thing in epicentreList)
|
||||
var/obj/effect/landmark/epicentre = thing
|
||||
for(var/obj/machinery/power/apc/apc in range(epicentre, lightsoutRange))
|
||||
apc.overload_lighting()
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0)
|
||||
Notifications will be sent as updates occur.<br>"
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
for(var/obj/machinery/message_server/MS in GLOB.machines)
|
||||
if(!MS.active) continue
|
||||
MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2)
|
||||
|
||||
@@ -64,7 +64,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0)
|
||||
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
for(var/obj/machinery/message_server/MS in GLOB.machines)
|
||||
if(!MS.active) continue
|
||||
MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(areas && areas.len > 0)
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [station_time_timestamp()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
for(var/obj/machinery/message_server/MS in GLOB.machines)
|
||||
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
|
||||
for(var/mob/living/silicon/ai/A in GLOB.player_list)
|
||||
to_chat(A, "<span class='danger'>Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].</span>")
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
/datum/event/rogue_drone/start()
|
||||
//spawn them at the same place as carp
|
||||
var/list/possible_spawns = list()
|
||||
for(var/obj/effect/landmark/C in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/C = thing
|
||||
if(C.name == "carpspawn")
|
||||
possible_spawns.Add(C)
|
||||
|
||||
|
||||
@@ -16,13 +16,15 @@
|
||||
var/datum/mind/player_mind = new /datum/mind(key_of_slaughter)
|
||||
player_mind.active = 1
|
||||
var/list/spawn_locs = list()
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(isturf(L.loc))
|
||||
switch(L.name)
|
||||
if("revenantspawn")
|
||||
spawn_locs += L.loc
|
||||
if(!spawn_locs) //If we can't find any revenant spawns, try the carp spawns
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(isturf(L.loc))
|
||||
switch(L.name)
|
||||
if("carpspawn")
|
||||
|
||||
@@ -15,7 +15,7 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
|
||||
/datum/event/spider_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 SSair.atmos_machinery)
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
if(temp_vent.parent.other_atmosmch.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
@@ -24,7 +24,8 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
|
||||
return
|
||||
|
||||
var/list/spawnlocs = list()
|
||||
for(var/obj/effect/landmark/landmark in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/landmark = thing
|
||||
if(landmark.name == "traderstart_[station]")
|
||||
spawnlocs += get_turf(landmark)
|
||||
if(!spawnlocs.len)
|
||||
|
||||
Reference in New Issue
Block a user