mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Merge pull request #11179 from VOREStation/Arokha/opt
Optimize a couple things
This commit is contained in:
@@ -104,9 +104,7 @@
|
||||
parent.radiate_heat_to_space(surface, 1)
|
||||
|
||||
if(has_buckled_mobs())
|
||||
for(var/M in buckled_mobs)
|
||||
var/mob/living/L = M
|
||||
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
var/hc = pipe_air.heat_capacity()
|
||||
var/avg_temp = (pipe_air.temperature * hc + L.bodytemperature * 3500) / (hc + 3500)
|
||||
pipe_air.temperature = avg_temp
|
||||
|
||||
+1
-2
@@ -93,8 +93,7 @@
|
||||
return AIR_BLOCKED
|
||||
|
||||
var/result = 0
|
||||
for(var/mm in contents)
|
||||
var/atom/movable/M = mm
|
||||
for(var/atom/movable/M as anything in contents)
|
||||
switch(M.can_atmos_pass)
|
||||
if(ATMOS_PASS_YES)
|
||||
continue
|
||||
|
||||
+1
-2
@@ -71,8 +71,7 @@ If it gains pressure too slowly, it may leak or just rupture instead of explodin
|
||||
|
||||
var/fuel_to_remove = used_liquid_fuel/(fuel_objs.len*LIQUIDFUEL_AMOUNT_TO_MOL) //convert back to liquid volume units
|
||||
|
||||
for(var/O in fuel_objs)
|
||||
var/obj/effect/decal/cleanable/liquid_fuel/fuel = O
|
||||
for(var/obj/effect/decal/cleanable/liquid_fuel/fuel as anything in fuel_objs)
|
||||
if(!istype(fuel))
|
||||
fuel_objs -= fuel
|
||||
continue
|
||||
|
||||
@@ -127,22 +127,19 @@
|
||||
//returns a new list with only atoms that are in typecache L
|
||||
/proc/typecache_filter_list(list/atoms, list/typecache)
|
||||
. = list()
|
||||
for(var/thing in atoms)
|
||||
var/atom/A = thing
|
||||
for(var/atom/A as anything in atoms)
|
||||
if(typecache[A.type])
|
||||
. += A
|
||||
|
||||
/proc/typecache_filter_list_reverse(list/atoms, list/typecache)
|
||||
. = list()
|
||||
for(var/thing in atoms)
|
||||
var/atom/A = thing
|
||||
for(var/atom/A as anything in atoms)
|
||||
if(!typecache[A.type])
|
||||
. += A
|
||||
|
||||
/proc/typecache_filter_multi_list_exclusion(list/atoms, list/typecache_include, list/typecache_exclude)
|
||||
. = list()
|
||||
for(var/thing in atoms)
|
||||
var/atom/A = thing
|
||||
for(var/atom/A as anything in atoms)
|
||||
if(typecache_include[A.type] && !typecache_exclude[A.type])
|
||||
. += A
|
||||
|
||||
|
||||
@@ -226,8 +226,7 @@
|
||||
. = list()
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
var/list/speaker_coverage = list()
|
||||
for(var/r in radios)
|
||||
var/obj/item/device/radio/R = r // You better fucking be a radio.
|
||||
for(var/obj/item/device/radio/R as anything in radios)
|
||||
var/turf/speaker = get_turf(R)
|
||||
if(speaker)
|
||||
for(var/turf/T in hear(R.canhear_range,speaker))
|
||||
@@ -365,8 +364,7 @@
|
||||
|
||||
/proc/flick_overlay_view(image/I, atom/target, duration, gc_after) //wrapper for the above, flicks to everyone who can see the target atom
|
||||
var/list/viewing = list()
|
||||
for(var/m in viewers(target))
|
||||
var/mob/M = m
|
||||
for(var/mob/M as anything in viewers(target))
|
||||
if(M.client)
|
||||
viewing += M.client
|
||||
flick_overlay(I, viewing, duration, gc_after)
|
||||
|
||||
@@ -215,23 +215,20 @@ GLOBAL_LIST_EMPTY(mannequins)
|
||||
|
||||
// Suit cyclers
|
||||
paths = subtypesof(/datum/suit_cycler_choice/department)
|
||||
for(var/path in paths)
|
||||
var/datum/suit_cycler_choice/SCC = path
|
||||
for(var/datum/suit_cycler_choice/SCC as anything in paths)
|
||||
if(!initial(SCC.name))
|
||||
continue
|
||||
GLOB.suit_cycler_departments += new path()
|
||||
GLOB.suit_cycler_departments += new SCC()
|
||||
paths = subtypesof(/datum/suit_cycler_choice/species)
|
||||
for(var/path in paths)
|
||||
var/datum/suit_cycler_choice/SCC = path
|
||||
for(var/datum/suit_cycler_choice/SCC as anything in paths)
|
||||
if(!initial(SCC.name))
|
||||
continue
|
||||
GLOB.suit_cycler_species += new path()
|
||||
GLOB.suit_cycler_species += new SCC()
|
||||
paths = subtypesof(/datum/suit_cycler_choice/department/emag)
|
||||
for(var/path in paths)
|
||||
var/datum/suit_cycler_choice/SCC = path
|
||||
for(var/datum/suit_cycler_choice/SCC as anything in paths)
|
||||
if(!initial(SCC.name))
|
||||
continue
|
||||
GLOB.suit_cycler_emagged += new path()
|
||||
GLOB.suit_cycler_emagged += new SCC()
|
||||
|
||||
//Ores
|
||||
paths = subtypesof(/ore)
|
||||
@@ -273,7 +270,7 @@ GLOBAL_LIST_EMPTY(mannequins)
|
||||
|
||||
/*
|
||||
// Custom species traits
|
||||
paths = subtypesof(/datum/trait) - /datum/trait
|
||||
paths = subtypesof(/datum/trait)
|
||||
for(var/path in paths)
|
||||
var/datum/trait/instance = new path()
|
||||
if(!instance.name)
|
||||
|
||||
@@ -510,7 +510,7 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
|
||||
var/paths
|
||||
|
||||
// Custom Hair Accessories
|
||||
paths = typesof(/datum/sprite_accessory/hair_accessory) - /datum/sprite_accessory/hair_accessory
|
||||
paths = subtypesof(/datum/sprite_accessory/hair_accessory)
|
||||
for(var/path in paths)
|
||||
var/datum/sprite_accessory/hair_accessory/instance = new path()
|
||||
hair_accesories_list[path] = instance
|
||||
@@ -544,14 +544,14 @@ var/global/list/remainless_species = list(SPECIES_PROMETHEAN,
|
||||
|
||||
|
||||
// Weaver recipe stuff
|
||||
paths = typesof(/datum/weaver_recipe/structure) - /datum/weaver_recipe/structure
|
||||
paths = subtypesof(/datum/weaver_recipe/structure)
|
||||
for(var/path in paths)
|
||||
var/datum/weaver_recipe/instance = new path()
|
||||
if(!instance.title)
|
||||
continue //A prototype or something
|
||||
weavable_structures[instance.title] = instance
|
||||
|
||||
paths = typesof(/datum/weaver_recipe/item) - /datum/weaver_recipe/item
|
||||
paths = subtypesof(/datum/weaver_recipe/item)
|
||||
for(var/path in paths)
|
||||
var/datum/weaver_recipe/instance = new path()
|
||||
if(!instance.title)
|
||||
|
||||
@@ -762,8 +762,7 @@ world
|
||||
// Dimensions of overlay being added
|
||||
var/list/add_size[4]
|
||||
|
||||
for(var/V in layers)
|
||||
var/image/I = V
|
||||
for(var/image/I as anything in layers)
|
||||
if(I.alpha == 0)
|
||||
continue
|
||||
|
||||
@@ -897,8 +896,7 @@ world
|
||||
//For photo camera.
|
||||
/proc/build_composite_icon(atom/A)
|
||||
var/icon/composite = icon(A.icon, A.icon_state, A.dir, 1)
|
||||
for(var/O in A.overlays)
|
||||
var/image/I = O
|
||||
for(var/image/I as anything in A.overlays)
|
||||
composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY)
|
||||
return composite
|
||||
|
||||
|
||||
@@ -1256,8 +1256,7 @@ var/mob/dview/dview_mob = new
|
||||
if(orange)
|
||||
turfs -= get_turf(center)
|
||||
. = list()
|
||||
for(var/V in turfs)
|
||||
var/turf/T = V
|
||||
for(var/turf/T as anything in turfs)
|
||||
. += T
|
||||
. += T.contents
|
||||
if(areas)
|
||||
|
||||
@@ -335,8 +335,7 @@ GLOBAL_LIST_INIT(master_filter_info, list(
|
||||
/obj/item/update_filters()
|
||||
. = ..()
|
||||
/* Will port this from TG
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
for(var/datum/action/A as anything in actions)
|
||||
A.UpdateButtonIcon()
|
||||
*/
|
||||
|
||||
|
||||
@@ -21,8 +21,7 @@
|
||||
screenobjs += new /obj/screen/rig/deco1_f
|
||||
screenobjs += new /obj/screen/rig/deco2_f
|
||||
|
||||
for(var/scr in screenobjs)
|
||||
var/obj/screen/S = scr
|
||||
for(var/obj/screen/S as anything in screenobjs)
|
||||
S.master = owner_rig
|
||||
..()
|
||||
|
||||
@@ -71,8 +70,7 @@
|
||||
screenobjs += new /obj/screen/mech/deco1_f
|
||||
screenobjs += new /obj/screen/mech/deco2_f
|
||||
|
||||
for(var/scr in screenobjs)
|
||||
var/obj/screen/S = scr
|
||||
for(var/obj/screen/S as anything in screenobjs)
|
||||
S.master = owner_mech
|
||||
..()
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ var/list/gamemode_cache = list()
|
||||
var/static/list/jukebox_track_files
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||
var/list/L = subtypesof(/datum/game_mode)
|
||||
for (var/T in L)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
|
||||
@@ -248,8 +248,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
var/list/tickersubsystems = list()
|
||||
var/list/runlevel_sorted_subsystems = list(list()) //ensure we always have at least one runlevel
|
||||
var/timer = world.time
|
||||
for (var/thing in subsystems)
|
||||
var/datum/controller/subsystem/SS = thing
|
||||
for (var/datum/controller/subsystem/SS as anything in subsystems)
|
||||
if (SS.flags & SS_NO_FIRE)
|
||||
continue
|
||||
SS.queued_time = 0
|
||||
@@ -336,8 +335,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
cached_runlevel = checking_runlevel
|
||||
current_runlevel_subsystems = runlevel_sorted_subsystems[cached_runlevel]
|
||||
var/stagger = world.time
|
||||
for(var/I in current_runlevel_subsystems)
|
||||
var/datum/controller/subsystem/SS = I
|
||||
for(var/datum/controller/subsystem/SS as anything in current_runlevel_subsystems)
|
||||
if(SS.next_fire <= world.time)
|
||||
stagger += world.tick_lag * rand(1, 5)
|
||||
SS.next_fire = stagger
|
||||
@@ -550,8 +548,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
for(var/I in runlevel_SS)
|
||||
subsystemstocheck |= I
|
||||
|
||||
for (var/thing in subsystemstocheck)
|
||||
var/datum/controller/subsystem/SS = thing
|
||||
for (var/datum/controller/subsystem/SS as anything in subsystemstocheck)
|
||||
if (!SS || !istype(SS))
|
||||
//list(SS) is so if a list makes it in the subsystem list, we remove the list, not the contents
|
||||
subsystems -= list(SS)
|
||||
@@ -598,8 +595,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
//disallow more than one map to load at once, multithreading it will just cause race conditions
|
||||
while(map_loading)
|
||||
stoplag()
|
||||
for(var/S in subsystems)
|
||||
var/datum/controller/subsystem/SS = S
|
||||
for(var/datum/controller/subsystem/SS as anything in subsystems)
|
||||
SS.StartLoadingMap()
|
||||
|
||||
map_loading = TRUE
|
||||
@@ -608,6 +604,5 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
if(!quiet)
|
||||
admin_notice("<span class='danger'>Map is finished. Unlocking.</span>", R_DEBUG)
|
||||
map_loading = FALSE
|
||||
for(var/S in subsystems)
|
||||
var/datum/controller/subsystem/SS = S
|
||||
for(var/datum/controller/subsystem/SS as anything in subsystems)
|
||||
SS.StopLoadingMap()
|
||||
|
||||
@@ -6,8 +6,7 @@ SUBSYSTEM_DEF(assets)
|
||||
var/list/preload = list()
|
||||
|
||||
/datum/controller/subsystem/assets/Initialize(timeofday)
|
||||
for(var/type in typesof(/datum/asset))
|
||||
var/datum/asset/A = type
|
||||
for(var/datum/asset/A as anything in typesof(/datum/asset))
|
||||
if (type != initial(A._abstract))
|
||||
get_asset_datum(type)
|
||||
|
||||
|
||||
@@ -38,11 +38,10 @@ SUBSYSTEM_DEF(atoms)
|
||||
if(atoms)
|
||||
created_atoms = list()
|
||||
count = atoms.len
|
||||
for(var/I in atoms)
|
||||
var/atom/A = I
|
||||
for(var/atom/A as anything in atoms)
|
||||
if(!A.initialized)
|
||||
if(InitAtom(I, mapload_arg))
|
||||
atoms -= I
|
||||
if(InitAtom(A, mapload_arg))
|
||||
atoms -= A
|
||||
CHECK_TICK
|
||||
else
|
||||
count = 0
|
||||
@@ -57,8 +56,7 @@ SUBSYSTEM_DEF(atoms)
|
||||
initialized = INITIALIZATION_INNEW_REGULAR
|
||||
|
||||
if(late_loaders.len)
|
||||
for(var/I in late_loaders)
|
||||
var/atom/A = I
|
||||
for(var/atom/A as anything in late_loaders)
|
||||
A.LateInitialize()
|
||||
CHECK_TICK
|
||||
testing("Late initialized [late_loaders.len] atoms")
|
||||
|
||||
@@ -13,8 +13,7 @@ SUBSYSTEM_DEF(chat)
|
||||
|
||||
/datum/controller/subsystem/chat/fire()
|
||||
var/list/msg_queue = src.msg_queue // Local variable for sanic speed.
|
||||
for(var/i in msg_queue)
|
||||
var/client/C = i
|
||||
for(var/client/C as anything in msg_queue)
|
||||
var/list/messages = msg_queue[C]
|
||||
msg_queue -= C
|
||||
if (C)
|
||||
|
||||
@@ -23,11 +23,10 @@ SUBSYSTEM_DEF(circuit)
|
||||
|
||||
/datum/controller/subsystem/circuit/proc/circuits_init()
|
||||
//Cached lists for free performance
|
||||
for(var/path in typesof(/obj/item/integrated_circuit))
|
||||
var/obj/item/integrated_circuit/IC = path
|
||||
var/name = initial(IC.name)
|
||||
all_components[name] = path // Populating the component lists
|
||||
cached_components[IC] = new path
|
||||
for(var/obj/item/integrated_circuit/IC as anything in typesof(/obj/item/integrated_circuit))
|
||||
var/path = IC
|
||||
all_components[initial(IC.name)] = path // Populating the component lists
|
||||
cached_components[path] = new path
|
||||
|
||||
if(!(initial(IC.spawn_flags) & (IC_SPAWN_DEFAULT | IC_SPAWN_RESEARCH)))
|
||||
continue
|
||||
@@ -38,11 +37,10 @@ SUBSYSTEM_DEF(circuit)
|
||||
var/list/category_list = circuit_fabricator_recipe_list[category]
|
||||
category_list += IC // Populating the fabricator categories
|
||||
|
||||
for(var/path in typesof(/obj/item/device/electronic_assembly))
|
||||
var/obj/item/device/electronic_assembly/A = path
|
||||
var/name = initial(A.name)
|
||||
all_assemblies[name] = path
|
||||
cached_assemblies[A] = new path
|
||||
for(var/obj/item/device/electronic_assembly/A as anything in typesof(/obj/item/device/electronic_assembly))
|
||||
var/path = A
|
||||
all_assemblies[initial(A.name)] = path
|
||||
cached_assemblies[path] = new path
|
||||
|
||||
|
||||
circuit_fabricator_recipe_list["Assemblies"] = list(
|
||||
|
||||
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(events)
|
||||
var/datum/event_meta/new_event = new
|
||||
|
||||
/datum/controller/subsystem/events/Initialize()
|
||||
allEvents = typesof(/datum/event) - /datum/event
|
||||
allEvents = subtypesof(/datum/event)
|
||||
event_containers = list(
|
||||
EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane,
|
||||
EVENT_LEVEL_MODERATE = new/datum/event_container/moderate,
|
||||
|
||||
@@ -14,8 +14,7 @@ SUBSYSTEM_DEF(event_ticker)
|
||||
|
||||
// Process active events.
|
||||
/datum/controller/subsystem/event_ticker/fire(resumed)
|
||||
for(var/E in active_events)
|
||||
var/datum/event2/event/event = E
|
||||
for(var/datum/event2/event/event as anything in active_events)
|
||||
event.process()
|
||||
if(event.finished)
|
||||
event_finished(event)
|
||||
|
||||
@@ -74,8 +74,7 @@ SUBSYSTEM_DEF(game_master)
|
||||
chosen_event.enabled = FALSE
|
||||
if(chosen_event.event_class)
|
||||
// Disable similar events, too.
|
||||
for(var/M in available_events)
|
||||
var/datum/event2/meta/meta = M
|
||||
for(var/datum/event2/meta/meta as anything in available_events)
|
||||
if(meta.event_class == chosen_event.event_class)
|
||||
meta.enabled = FALSE
|
||||
|
||||
@@ -235,8 +234,7 @@ SUBSYSTEM_DEF(game_master)
|
||||
dat += "<th colspan='2'>Players</td>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/P in player_list)
|
||||
var/mob/M = P
|
||||
for(var/mob/M as anything in player_list)
|
||||
dat += "<tr>"
|
||||
dat += "<td>[M] ([M.ckey])</td>"
|
||||
dat += "<td>[metric.assess_player_activity(M)]%</td>"
|
||||
@@ -255,8 +253,7 @@ SUBSYSTEM_DEF(game_master)
|
||||
dat += "<th>Buttons</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/E in available_events)
|
||||
var/datum/event2/meta/event = E
|
||||
for(var/datum/event2/meta/event as anything in available_events)
|
||||
dat += "<tr>"
|
||||
if(!event.enabled)
|
||||
dat += "<td><strike>[event.name]</strike></td>"
|
||||
@@ -285,8 +282,7 @@ SUBSYSTEM_DEF(game_master)
|
||||
dat += "<th>Buttons</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/E in SSevent_ticker.active_events)
|
||||
var/datum/event2/event/event = E
|
||||
for(var/datum/event2/event/event as anything in SSevent_ticker.active_events)
|
||||
dat += "<tr>"
|
||||
dat += "<td>[event.type]</td>"
|
||||
dat += "<td>[event.time_started]</td>"
|
||||
@@ -309,8 +305,7 @@ SUBSYSTEM_DEF(game_master)
|
||||
dat += "<th>Finish Time</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/E in SSevent_ticker.finished_events)
|
||||
var/datum/event2/event/event = E
|
||||
for(var/datum/event2/event/event as anything in SSevent_ticker.finished_events)
|
||||
dat += "<tr>"
|
||||
dat += "<td>[event.type]</td>"
|
||||
dat += "<td>[event.time_started]</td>"
|
||||
|
||||
@@ -172,8 +172,7 @@ SUBSYSTEM_DEF(garbage)
|
||||
|
||||
log_world("## TESTING: GC: -- \ref[D] | [type] was unable to be GC'd --")
|
||||
#ifdef TESTING
|
||||
for(var/c in GLOB.admins) //Using testing() here would fill the logs with ADMIN_VV garbage
|
||||
var/client/admin = c
|
||||
for(var/client/admin as anything in GLOB.admins) //Using testing() here would fill the logs with ADMIN_VV garbage
|
||||
if(!check_rights_for(admin, R_ADMIN))
|
||||
continue
|
||||
to_chat(admin, "## TESTING: GC: -- [ADMIN_VV(D)] | [type] was unable to be GC'd --")
|
||||
|
||||
@@ -34,11 +34,10 @@ SUBSYSTEM_DEF(mapping)
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/load_map_templates()
|
||||
for(var/T in subtypesof(/datum/map_template))
|
||||
var/datum/map_template/template = T
|
||||
for(var/datum/map_template/template as anything in subtypesof(/datum/map_template))
|
||||
if(!(initial(template.mappath))) // If it's missing the actual path its probably a base type or being used for inheritence.
|
||||
continue
|
||||
template = new T()
|
||||
template = new template()
|
||||
map_templates[template.name] = template
|
||||
return TRUE
|
||||
|
||||
@@ -113,8 +112,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
MT.load_new_z(centered = FALSE)
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/preloadShelterTemplates()
|
||||
for(var/item in subtypesof(/datum/map_template/shelter))
|
||||
var/datum/map_template/shelter/shelter_type = item
|
||||
for(var/datum/map_template/shelter/shelter_type as anything in subtypesof(/datum/map_template/shelter))
|
||||
if(!(initial(shelter_type.mappath)))
|
||||
continue
|
||||
var/datum/map_template/shelter/S = new shelter_type()
|
||||
|
||||
@@ -12,11 +12,10 @@ SUBSYSTEM_DEF(persistence)
|
||||
|
||||
/datum/controller/subsystem/persistence/Initialize()
|
||||
. = ..()
|
||||
for(var/thing in subtypesof(/datum/persistent))
|
||||
var/datum/persistent/P = thing
|
||||
for(var/datum/persistent/P as anything in subtypesof(/datum/persistent))
|
||||
if(initial(P.name))
|
||||
P = new P
|
||||
persistence_datums[thing] = P
|
||||
persistence_datums[P.type] = P
|
||||
P.Initialize()
|
||||
|
||||
/datum/controller/subsystem/persistence/Shutdown()
|
||||
|
||||
@@ -111,8 +111,7 @@ SUBSYSTEM_DEF(planets)
|
||||
|
||||
/datum/controller/subsystem/planets/proc/updateTemp(var/datum/planet/P)
|
||||
//Set new temperatures
|
||||
for(var/W in P.planet_walls)
|
||||
var/turf/unsimulated/wall/planetary/wall = W
|
||||
for(var/turf/unsimulated/wall/planetary/wall as anything in P.planet_walls)
|
||||
wall.set_temperature(P.weather_holder.temperature)
|
||||
CHECK_TICK
|
||||
|
||||
@@ -120,8 +119,7 @@ SUBSYSTEM_DEF(planets)
|
||||
var/count = 100000
|
||||
while(count > 0)
|
||||
count--
|
||||
for(var/planet in planets)
|
||||
var/datum/planet/P = planet
|
||||
for(var/datum/planet/P as anything in planets)
|
||||
if(P.weather_holder)
|
||||
P.weather_holder.change_weather(pick(P.weather_holder.allowed_weather_types))
|
||||
sleep(3)
|
||||
|
||||
@@ -62,7 +62,7 @@ SUBSYSTEM_DEF(plants)
|
||||
accessible_product_sprites |= base
|
||||
|
||||
// Populate the global seed datum list.
|
||||
for(var/type in typesof(/datum/seed)-/datum/seed)
|
||||
for(var/type in subtypesof(/datum/seed))
|
||||
var/datum/seed/S = new type
|
||||
seeds[S.name] = S
|
||||
S.uid = "[seeds.len]"
|
||||
|
||||
@@ -33,11 +33,10 @@ PROCESSING_SUBSYSTEM_DEF(instruments)
|
||||
songs -= S
|
||||
|
||||
/datum/controller/subsystem/processing/instruments/proc/initialize_instrument_data()
|
||||
for(var/path in subtypesof(/datum/instrument))
|
||||
var/datum/instrument/I = path
|
||||
if(initial(I.abstract_type) == path)
|
||||
for(var/datum/instrument/I as anything in subtypesof(/datum/instrument))
|
||||
if(initial(I.abstract_type) == I)
|
||||
continue
|
||||
I = new path
|
||||
I = new I
|
||||
I.Initialize()
|
||||
if(!I.id)
|
||||
qdel(I)
|
||||
|
||||
@@ -19,7 +19,6 @@ PROCESSING_SUBSYSTEM_DEF(projectiles)
|
||||
|
||||
/datum/controller/subsystem/processing/projectiles/proc/set_pixel_speed(new_speed)
|
||||
global_pixel_speed = new_speed
|
||||
for(var/i in processing)
|
||||
var/obj/item/projectile/P = i
|
||||
for(var/obj/item/projectile/P as anything in processing)
|
||||
if(istype(P)) //there's non projectiles on this too.
|
||||
P.set_pixel_speed(new_speed)
|
||||
|
||||
@@ -63,8 +63,7 @@ SUBSYSTEM_DEF(radiation)
|
||||
if(!istype(T))
|
||||
return
|
||||
|
||||
for(var/value in sources)
|
||||
var/datum/radiation_source/source = value
|
||||
for(var/datum/radiation_source/source as anything in sources)
|
||||
if(source.rad_power < .)
|
||||
continue // Already being affected by a stronger source
|
||||
|
||||
|
||||
@@ -119,8 +119,7 @@ SUBSYSTEM_DEF(shuttles)
|
||||
landmarks_still_needed[landmark_tag] = given_sector // Landmark isn't registered yet, queue it to be added once it is.
|
||||
|
||||
var/landmarks_to_check = landmarks_awaiting_sector.Copy()
|
||||
for(var/thing in landmarks_to_check)
|
||||
var/obj/effect/shuttle_landmark/automatic/landmark = thing
|
||||
for(var/obj/effect/shuttle_landmark/automatic/landmark as anything in landmarks_to_check)
|
||||
if(landmark.z in given_sector.map_z)
|
||||
given_sector.add_landmark(landmark, landmark.shuttle_restricted)
|
||||
landmarks_awaiting_sector -= landmark
|
||||
@@ -170,8 +169,7 @@ SUBSYSTEM_DEF(shuttles)
|
||||
if(overmap_halted == new_setting)
|
||||
return
|
||||
overmap_halted = !overmap_halted
|
||||
for(var/ship in ships)
|
||||
var/obj/effect/overmap/visitable/ship/ship_effect = ship
|
||||
for(var/obj/effect/overmap/visitable/ship/ship_effect as anything in ships)
|
||||
overmap_halted ? ship_effect.halt() : ship_effect.unhalt()
|
||||
|
||||
/datum/controller/subsystem/shuttles/stat_entry()
|
||||
|
||||
@@ -202,8 +202,7 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
bucket_count -= length(spent)
|
||||
|
||||
for (var/i in spent)
|
||||
var/datum/timedevent/qtimer = i
|
||||
for(var/datum/timedevent/qtimer as anything in spent)
|
||||
if(QDELETED(qtimer))
|
||||
bucket_count++
|
||||
continue
|
||||
|
||||
@@ -35,8 +35,7 @@ SUBSYSTEM_DEF(vote)
|
||||
// Before doing the vote, see if anyone is playing.
|
||||
// If not, just do the transfer.
|
||||
var/players_are_in_round = FALSE
|
||||
for(var/a in player_list) // Mobs with clients attached.
|
||||
var/mob/living/L = a
|
||||
for(var/mob/living/L as anything in player_list) // Mobs with clients attached.
|
||||
if(!istype(L)) // Exclude ghosts and other weird things.
|
||||
continue
|
||||
if(L.stat == DEAD) // Dead mobs aren't playing.
|
||||
|
||||
@@ -41,8 +41,7 @@ SUBSYSTEM_DEF(xenoarch)
|
||||
continue
|
||||
|
||||
var/farEnough = 1
|
||||
for(var/A in digsite_spawning_turfs)
|
||||
var/turf/T = A
|
||||
for(var/turf/T as anything in digsite_spawning_turfs)
|
||||
if(T in range(5, M))
|
||||
farEnough = 0
|
||||
break
|
||||
|
||||
@@ -75,8 +75,7 @@
|
||||
options["MC"] = Master
|
||||
options["Failsafe"] = Failsafe
|
||||
options["Configuration"] = config
|
||||
for(var/i in Master.subsystems)
|
||||
var/datum/controller/subsystem/S = i
|
||||
for(var/datum/controller/subsystem/S as anything in Master.subsystems)
|
||||
if(!istype(S)) //Eh, we're a debug verb, let's have typechecking.
|
||||
continue
|
||||
var/strtype = "SS[get_end_section_of_type(S.type)]"
|
||||
|
||||
@@ -172,8 +172,7 @@ var/list/runechat_image_cache = list()
|
||||
if(owned_by.seen_messages)
|
||||
var/idx = 1
|
||||
var/combined_height = approx_lines
|
||||
for(var/msg in owned_by.seen_messages[message_loc])
|
||||
var/datum/chatmessage/m = msg
|
||||
for(var/datum/chatmessage/m as anything in owned_by.seen_messages[message_loc])
|
||||
animate(m.message, pixel_y = m.message.pixel_y + mheight, time = CHAT_MESSAGE_SPAWN_TIME)
|
||||
combined_height += m.approx_lines
|
||||
|
||||
@@ -336,8 +335,7 @@ var/list/runechat_image_cache = list()
|
||||
var/list/hear = get_mobs_and_objs_in_view_fast(get_turf(src), range, remote_ghosts = FALSE)
|
||||
hearing_mobs = hear["mobs"]
|
||||
|
||||
for(var/mob in hearing_mobs)
|
||||
var/mob/M = mob
|
||||
for(var/mob/M as anything in hearing_mobs)
|
||||
if(!M.client)
|
||||
continue
|
||||
M.create_chat_message(src, message, italics, classes, audible)
|
||||
|
||||
@@ -320,8 +320,7 @@
|
||||
var/proctype = C.signal_procs[src][sigtype]
|
||||
return NONE | CallAsync(C, proctype, arguments)
|
||||
. = NONE
|
||||
for(var/I in target)
|
||||
var/datum/C = I
|
||||
for(var/datum/C as anything in target)
|
||||
if(!C.signal_enabled)
|
||||
continue
|
||||
var/proctype = C.signal_procs[src][sigtype]
|
||||
@@ -444,8 +443,7 @@
|
||||
var/list/arguments = raw_args.Copy()
|
||||
arguments[1] = new_comp
|
||||
var/make_new_component = TRUE
|
||||
for(var/i in GetComponents(new_type))
|
||||
var/datum/component/C = i
|
||||
for(var/datum/component/C as anything in GetComponents(new_type))
|
||||
if(C.CheckDupeComponent(arglist(arguments)))
|
||||
make_new_component = FALSE
|
||||
QDEL_NULL(new_comp)
|
||||
|
||||
@@ -402,8 +402,7 @@
|
||||
|
||||
var/list/surroundings = get_surroundings(user)
|
||||
var/list/craftability = list()
|
||||
for(var/rec in GLOB.crafting_recipes)
|
||||
var/datum/crafting_recipe/R = rec
|
||||
for(var/datum/crafting_recipe/R as anything in GLOB.crafting_recipes)
|
||||
|
||||
if(!R.always_available && !(R.type in user?.mind?.learned_recipes)) //User doesn't actually know how to make this.
|
||||
continue
|
||||
@@ -420,11 +419,10 @@
|
||||
var/list/data = list()
|
||||
|
||||
var/list/crafting_recipes = list()
|
||||
for(var/rec in GLOB.crafting_recipes)
|
||||
var/datum/crafting_recipe/R = rec
|
||||
for(var/datum/crafting_recipe/R as anything in GLOB.crafting_recipes)
|
||||
|
||||
if(R.name == "") //This is one of the invalid parents that sneaks in
|
||||
GLOB.crafting_recipes -= rec
|
||||
GLOB.crafting_recipes -= R
|
||||
continue
|
||||
|
||||
if(!R.always_available && !(R.type in user?.mind?.learned_recipes)) //User doesn't actually know how to make this.
|
||||
|
||||
@@ -99,9 +99,8 @@
|
||||
/datum/component/material_container/proc/on_examine(datum/source, mob/user, list/examine_texts)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
for(var/I in materials)
|
||||
var/datum/material/M = I
|
||||
var/amt = materials[I]
|
||||
for(var/datum/material/M as anything in materials)
|
||||
var/amt = materials[M]
|
||||
if(amt)
|
||||
examine_texts += "<span class='notice'>It has [amt] units of [lowertext(M.name)] stored.</span>"
|
||||
|
||||
@@ -327,13 +326,13 @@
|
||||
|
||||
var/list/mats_to_remove = list() //Assoc list MAT | AMOUNT
|
||||
|
||||
for(var/x in mats) //Loop through all required materials
|
||||
var/datum/material/req_mat = x
|
||||
for(var/datum/material/req_mat as anything in mats) //Loop through all required materials
|
||||
var/imat = req_mat
|
||||
if(!istype(req_mat))
|
||||
req_mat = GET_MATERIAL_REF(req_mat) //Get the ref if necesary
|
||||
if(!materials[req_mat]) //Do we have the resource?
|
||||
return FALSE //Can't afford it
|
||||
var/amount_required = mats[x] * multiplier
|
||||
var/amount_required = mats[imat] * multiplier
|
||||
if(!(materials[req_mat] >= amount_required)) // do we have enough of the resource?
|
||||
return FALSE //Can't afford it
|
||||
mats_to_remove[req_mat] += amount_required //Add it to the assoc list of things to remove
|
||||
@@ -392,8 +391,8 @@
|
||||
if(!mats || !mats.len)
|
||||
return FALSE
|
||||
|
||||
for(var/x in mats) //Loop through all required materials
|
||||
var/datum/material/req_mat = x
|
||||
for(var/datum/material/req_mat as anything in mats) //Loop through all required materials
|
||||
var/imat = req_mat
|
||||
if(!istype(req_mat))
|
||||
if(ispath(req_mat) || istext(req_mat)) //Is this an actual material, or is it a category?
|
||||
req_mat = GET_MATERIAL_REF(req_mat) //Get the ref
|
||||
@@ -404,7 +403,7 @@
|
||||
// else
|
||||
// continue
|
||||
|
||||
if(!has_enough_of_material(req_mat, mats[x], multiplier))//Not a category, so just check the normal way
|
||||
if(!has_enough_of_material(req_mat, mats[imat], multiplier))//Not a category, so just check the normal way
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -171,8 +171,7 @@
|
||||
|
||||
///Clears the affected_turfs lazylist, removing from its contents the effects of being near the light.
|
||||
/datum/component/overlay_lighting/proc/clean_old_turfs()
|
||||
for(var/t in affected_turfs)
|
||||
var/turf/lit_turf = t
|
||||
for(var/turf/lit_turf as anything in affected_turfs)
|
||||
lit_turf.dynamic_lumcount -= lum_power
|
||||
affected_turfs = null
|
||||
|
||||
@@ -431,8 +430,7 @@
|
||||
. = lum_power
|
||||
lum_power = new_lum_power
|
||||
var/difference = . - lum_power
|
||||
for(var/t in affected_turfs)
|
||||
var/turf/lit_turf = t
|
||||
for(var/turf/lit_turf as anything in affected_turfs)
|
||||
lit_turf.dynamic_lumcount -= difference
|
||||
|
||||
///Moves the light directional_atom that emits our "light" based on our position and our direction
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
//clear timers
|
||||
var/list/timers = active_timers
|
||||
active_timers = null
|
||||
for(var/thing in timers)
|
||||
var/datum/timedevent/timer = thing
|
||||
for(var/datum/timedevent/timer as anything in timers)
|
||||
if (timer.spent)
|
||||
continue
|
||||
qdel(timer)
|
||||
@@ -45,8 +44,7 @@
|
||||
if(dc)
|
||||
var/all_components = dc[/datum/component]
|
||||
if(length(all_components))
|
||||
for(var/I in all_components)
|
||||
var/datum/component/C = I
|
||||
for(var/datum/component/C as anything in all_components)
|
||||
qdel(C, FALSE, TRUE)
|
||||
else
|
||||
var/datum/component/C = all_components
|
||||
@@ -58,8 +56,7 @@
|
||||
for(var/sig in lookup)
|
||||
var/list/comps = lookup[sig]
|
||||
if(length(comps))
|
||||
for(var/i in comps)
|
||||
var/datum/component/comp = i
|
||||
for(var/datum/component/comp as anything in comps)
|
||||
comp.UnregisterSignal(src, sig)
|
||||
else
|
||||
var/datum/component/comp = comps
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
log_game_master("Got [best_events.len] choice\s for the next event.")
|
||||
var/list/weighted_events = list()
|
||||
|
||||
for(var/E in best_events)
|
||||
var/datum/event2/meta/event = E
|
||||
for(var/datum/event2/meta/event as anything in best_events)
|
||||
var/weight = event.get_weight()
|
||||
if(weight <= 0)
|
||||
continue
|
||||
@@ -71,8 +70,7 @@
|
||||
// If no list is passed, all the events will be returned.
|
||||
/datum/game_master/default/proc/filter_events_by_departments(list/departments)
|
||||
. = list()
|
||||
for(var/E in SSgame_master.available_events)
|
||||
var/datum/event2/meta/event = E
|
||||
for(var/datum/event2/meta/event as anything in SSgame_master.available_events)
|
||||
if(!event.enabled)
|
||||
continue
|
||||
if(event.chaotic_threshold && !ignore_round_chaos)
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
// * Does not react to danger at all.
|
||||
/datum/game_master/classic/choose_event()
|
||||
var/list/weighted_events = list()
|
||||
for(var/E in SSgame_master.available_events)
|
||||
var/datum/event2/meta/event = E
|
||||
for(var/datum/event2/meta/event as anything in SSgame_master.available_events)
|
||||
if(!event.enabled)
|
||||
continue
|
||||
weighted_events[event] = event.get_weight()
|
||||
@@ -31,8 +30,7 @@
|
||||
|
||||
/datum/game_master/brutal/choose_event()
|
||||
var/list/weighted_events = list()
|
||||
for(var/E in SSgame_master.available_events)
|
||||
var/datum/event2/meta/event = E
|
||||
for(var/datum/event2/meta/event as anything in SSgame_master.available_events)
|
||||
if(!event.enabled)
|
||||
continue
|
||||
weighted_events[event] = event.get_weight() + (event.chaos * 2)
|
||||
|
||||
@@ -45,8 +45,7 @@ GLOBAL_DATUM(revdata, /datum/getrev)
|
||||
return
|
||||
if(header)
|
||||
. += "The following pull requests are currently test merged:"
|
||||
for(var/line in testmerge)
|
||||
var/datum/tgs_revision_information/test_merge/tm = line
|
||||
for(var/datum/tgs_revision_information/test_merge/tm as anything in testmerge)
|
||||
var/cm = tm.pull_request_commit
|
||||
var/details = ": '" + html_encode(tm.title) + "' by " + html_encode(tm.author) + " at commit " + html_encode(copytext_char(cm, 1, 11))
|
||||
if(details && findtext(details, "\[s\]") && (!usr || !usr.client.holder))
|
||||
|
||||
@@ -40,8 +40,7 @@ GLOBAL_LIST_EMPTY(event_listen_count)
|
||||
|
||||
/decl/observ/destroyed/proc/cleanup_global_listener(listener, listen_count)
|
||||
GLOB.global_listen_count -= listener
|
||||
for(var/entry in GLOB.all_observable_events.events)
|
||||
var/decl/observ/event = entry
|
||||
for(var/decl/observ/event as anything in GLOB.all_observable_events.events)
|
||||
if(event.unregister_global(listener))
|
||||
// log_debug("[event] - [listener] was deleted while still registered to global events.") // TODO: Apply axe, reimplement with datum component listeners
|
||||
if(!(--listen_count))
|
||||
@@ -49,8 +48,7 @@ GLOBAL_LIST_EMPTY(event_listen_count)
|
||||
|
||||
/decl/observ/destroyed/proc/cleanup_source_listeners(event_source, source_listener_count)
|
||||
GLOB.event_sources_count -= event_source
|
||||
for(var/entry in GLOB.all_observable_events.events)
|
||||
var/decl/observ/event = entry
|
||||
for(var/decl/observ/event as anything in GLOB.all_observable_events.events)
|
||||
var/proc_owners = event.event_sources[event_source]
|
||||
if(proc_owners)
|
||||
for(var/proc_owner in proc_owners)
|
||||
@@ -61,8 +59,7 @@ GLOBAL_LIST_EMPTY(event_listen_count)
|
||||
|
||||
/decl/observ/destroyed/proc/cleanup_event_listener(listener, listener_count)
|
||||
GLOB.event_listen_count -= listener
|
||||
for(var/entry in GLOB.all_observable_events.events)
|
||||
var/decl/observ/event = entry
|
||||
for(var/decl/observ/event as anything in GLOB.all_observable_events.events)
|
||||
for(var/event_source in event.event_sources)
|
||||
if(event.unregister(event_source, listener))
|
||||
// log_debug("[event] - [listener] was deleted while still listening to [event_source].") // TODO: Apply axe, reimplement with datum component listeners
|
||||
|
||||
@@ -110,8 +110,7 @@
|
||||
/atom/Destroy(force = FALSE)
|
||||
. = ..()
|
||||
if (orbiters)
|
||||
for (var/thing in orbiters)
|
||||
var/datum/orbit/O = thing
|
||||
for(var/datum/orbit/O as anything in orbiters)
|
||||
if (O.orbiter)
|
||||
O.orbiter.stop_orbit()
|
||||
|
||||
@@ -123,8 +122,7 @@
|
||||
/*
|
||||
/atom/movable/proc/transfer_observers_to(atom/movable/target)
|
||||
if(orbiters)
|
||||
for(var/thing in orbiters)
|
||||
var/datum/orbit/O = thing
|
||||
for(var/datum/orbit/O as anything in orbiters)
|
||||
if(O.orbiter && isobserver(O.orbiter))
|
||||
var/mob/dead/observer/D = O.orbiter
|
||||
D.ManualFollow(target)
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
animate(bar, pixel_y = shiftheight, time = 5, easing = SINE_EASING)
|
||||
|
||||
/datum/progressbar/Destroy()
|
||||
for(var/I in user.progressbars[bar.loc])
|
||||
var/datum/progressbar/P = I
|
||||
for(var/datum/progressbar/P as anything in user.progressbars[bar.loc])
|
||||
if(P != src && P.listindex > listindex)
|
||||
P.shiftDown()
|
||||
|
||||
|
||||
@@ -6,13 +6,11 @@
|
||||
var/list/shared_soul_links // Soul links we are a/the sharer of.
|
||||
|
||||
/mob/living/Destroy()
|
||||
for(var/s in owned_soul_links)
|
||||
var/datum/soul_link/S = s
|
||||
for(var/datum/soul_link/S as anything in owned_soul_links)
|
||||
S.owner_died(FALSE)
|
||||
qdel(s) // If the owner is destroy()'d, the soullink is destroy()'d.
|
||||
qdel(S) // If the owner is destroy()'d, the soullink is destroy()'d.
|
||||
owned_soul_links = null
|
||||
for(var/s in shared_soul_links)
|
||||
var/datum/soul_link/S = s
|
||||
for(var/datum/soul_link/S as anything in shared_soul_links)
|
||||
S.sharer_died(FALSE)
|
||||
S.remove_soul_sharer(src) // If a sharer is destroy()'d, they are simply removed.
|
||||
shared_soul_links = null
|
||||
@@ -82,8 +80,7 @@
|
||||
soul_owner = owner
|
||||
soul_sharers = sharers
|
||||
LAZYADD(owner.owned_soul_links, src)
|
||||
for(var/l in sharers)
|
||||
var/mob/living/L = l
|
||||
for(var/mob/living/L as anything in sharers)
|
||||
LAZYADD(L.shared_soul_links, src)
|
||||
return TRUE
|
||||
|
||||
@@ -144,8 +141,7 @@
|
||||
/datum/soul_link/multi_sharer/replacement_pool/owner_died(gibbed, mob/living/owner)
|
||||
if(LAZYLEN(soul_sharers) && !gibbed) //let's not put them in some gibs
|
||||
var/list/souls = shuffle(soul_sharers.Copy())
|
||||
for(var/l in souls)
|
||||
var/mob/living/L = l
|
||||
for(var/mob/living/L as anything in souls)
|
||||
if(L.stat != DEAD && L.mind)
|
||||
L.mind.transfer_to(soul_owner)
|
||||
soul_owner.revive(TRUE, TRUE)
|
||||
|
||||
@@ -46,7 +46,7 @@ var/global/list/antag_names_to_ids = list()
|
||||
antag.update_all_icons()
|
||||
|
||||
/proc/populate_antag_type_list()
|
||||
for(var/antag_type in typesof(/datum/antagonist)-/datum/antagonist)
|
||||
for(var/antag_type in subtypesof(/datum/antagonist))
|
||||
var/datum/antagonist/A = new antag_type
|
||||
all_antag_types[A.id] = A
|
||||
all_antag_spawnpoints[A.landmark_id] = list()
|
||||
|
||||
@@ -54,7 +54,7 @@ var/datum/antagonist/mutineer/mutineers
|
||||
|
||||
proc/get_directive_candidates()
|
||||
var/list/candidates[0]
|
||||
for(var/T in typesof(/datum/directive) - /datum/directive)
|
||||
for(var/T in subtypesof(/datum/directive))
|
||||
var/datum/directive/D = new T(src)
|
||||
if (D.meets_prerequisites())
|
||||
candidates.Add(D)
|
||||
|
||||
+7
-14
@@ -153,8 +153,7 @@
|
||||
ASSERT(callback)
|
||||
ASSERT(isturf(loc))
|
||||
var/list/turfs = trange(range, src)
|
||||
for(var/t in turfs)
|
||||
var/turf/T = t
|
||||
for(var/turf/T as anything in turfs)
|
||||
GLOB.turf_entered_event.register(T, src, callback)
|
||||
|
||||
//Unregister from prox listening in a certain range. You should do this BEFORE you move, but if you
|
||||
@@ -162,8 +161,7 @@
|
||||
/atom/proc/unsense_proximity(var/range = 1, var/callback, var/center)
|
||||
ASSERT(isturf(center) || isturf(loc))
|
||||
var/list/turfs = trange(range, center ? center : src)
|
||||
for(var/t in turfs)
|
||||
var/turf/T = t
|
||||
for(var/turf/T as anything in turfs)
|
||||
GLOB.turf_entered_event.unregister(T, src, callback)
|
||||
|
||||
|
||||
@@ -529,11 +527,9 @@
|
||||
if(LAZYLEN(exclude_mobs))
|
||||
seeing_mobs -= exclude_mobs
|
||||
|
||||
for(var/obj in seeing_objs)
|
||||
var/obj/O = obj
|
||||
for(var/obj/O as anything in seeing_objs)
|
||||
O.show_message(message, VISIBLE_MESSAGE, blind_message, AUDIBLE_MESSAGE)
|
||||
for(var/mob in seeing_mobs)
|
||||
var/mob/M = mob
|
||||
for(var/mob/M as anything in seeing_mobs)
|
||||
if(M.see_invisible >= invisibility && MOB_CAN_SEE_PLANE(M, plane))
|
||||
M.show_message(message, VISIBLE_MESSAGE, blind_message, AUDIBLE_MESSAGE)
|
||||
if(runemessage != -1)
|
||||
@@ -555,16 +551,13 @@
|
||||
var/list/hearing_objs = hear["objs"]
|
||||
|
||||
if(radio_message)
|
||||
for(var/obj in hearing_objs)
|
||||
var/obj/O = obj
|
||||
for(var/obj/O as anything in hearing_objs)
|
||||
O.hear_talk(src, list(new /datum/multilingual_say_piece(GLOB.all_languages["Noise"], radio_message)), null)
|
||||
else
|
||||
for(var/obj in hearing_objs)
|
||||
var/obj/O = obj
|
||||
for(var/obj/O as anything in hearing_objs)
|
||||
O.show_message(message, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE)
|
||||
|
||||
for(var/mob in hearing_mobs)
|
||||
var/mob/M = mob
|
||||
for(var/mob/M as anything in hearing_mobs)
|
||||
var/msg = message
|
||||
M.show_message(msg, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE)
|
||||
if(runemessage != -1)
|
||||
|
||||
@@ -134,8 +134,7 @@
|
||||
oldarea.Exited(src, newloc)
|
||||
|
||||
// Multi-tile objects can't reach here, otherwise you'd need to avoid uncrossing yourself
|
||||
for(var/i in oldloc)
|
||||
var/atom/movable/thing = i
|
||||
for(var/atom/movable/thing as anything in oldloc)
|
||||
// We don't call parent so we are calling this for byond
|
||||
thing.Uncrossed(src)
|
||||
|
||||
@@ -145,8 +144,7 @@
|
||||
newarea.Entered(src, oldloc)
|
||||
|
||||
// Multi-tile objects can't reach here, otherwise you'd need to avoid uncrossing yourself
|
||||
for(var/i in loc)
|
||||
var/atom/movable/thing = i
|
||||
for(var/atom/movable/thing as anything in loc)
|
||||
// We don't call parent so we are calling this for byond
|
||||
thing.Crossed(src, oldloc)
|
||||
|
||||
@@ -315,8 +313,7 @@
|
||||
old_area.Exited(src, destination)
|
||||
|
||||
// Uncross everything where we left
|
||||
for(var/i in oldloc)
|
||||
var/atom/movable/AM = i
|
||||
for(var/atom/movable/AM as anything in oldloc)
|
||||
if(AM == src)
|
||||
continue
|
||||
AM.Uncrossed(src)
|
||||
@@ -341,8 +338,7 @@
|
||||
destarea.Entered(src, oldloc)
|
||||
|
||||
// We ignore ourselves because if we're multi-tile we might be in both old and new locs
|
||||
for(var/i in destination)
|
||||
var/atom/movable/AM = i
|
||||
for(var/atom/movable/AM as anything in destination)
|
||||
if(AM == src)
|
||||
continue
|
||||
AM.Crossed(src, oldloc)
|
||||
@@ -364,8 +360,7 @@
|
||||
loc = null
|
||||
|
||||
// Uncross everything where we left (no multitile safety like above because we are definitely not still there)
|
||||
for(var/i in oldloc)
|
||||
var/atom/movable/AM = i
|
||||
for(var/atom/movable/AM as anything in oldloc)
|
||||
AM.Uncrossed(src)
|
||||
|
||||
// Exited() our loc and area
|
||||
@@ -379,8 +374,7 @@
|
||||
/atom/movable/proc/onTransitZ(old_z,new_z)
|
||||
GLOB.z_moved_event.raise_event(src, old_z, new_z)
|
||||
SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z)
|
||||
for(var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
|
||||
var/atom/movable/AM = item
|
||||
for(var/atom/movable/AM as anything in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care.
|
||||
AM.onTransitZ(old_z,new_z)
|
||||
|
||||
/atom/movable/proc/glide_for(movetime)
|
||||
|
||||
@@ -258,8 +258,7 @@
|
||||
|
||||
//VOREStation Add
|
||||
/mob/living/carbon/human/proc/force_update_organs()
|
||||
for(var/organ in organs + internal_organs)
|
||||
var/obj/item/organ/O = organ
|
||||
for(var/obj/item/organ/O as anything in organs + internal_organs)
|
||||
O.species = species
|
||||
//VOREStation Add End
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
//Ling power's evolution menu entry datum should be contained alongside the mob proc for the actual power, in their own file.
|
||||
|
||||
var/list/powers = typesof(/datum/power/changeling) - /datum/power/changeling //needed for the badmin verb for now
|
||||
var/list/powers = subtypesof(/datum/power/changeling) //needed for the badmin verb for now
|
||||
var/list/datum/power/changeling/powerinstances = list()
|
||||
|
||||
/datum/power //Could be used by other antags too
|
||||
|
||||
@@ -107,7 +107,7 @@ mob
|
||||
hsb.loc = usr.loc
|
||||
to_chat(usr, "<b>Sandbox: Created an airlock.</b>")
|
||||
if("hsbcanister")
|
||||
var/list/hsbcanisters = typesof(/obj/machinery/portable_atmospherics/canister/) - /obj/machinery/portable_atmospherics/canister/
|
||||
var/list/hsbcanisters = subtypesof(/obj/machinery/portable_atmospherics/canister)
|
||||
var/hsbcanister = tgui_input_list(usr, "Choose a canister to spawn:", "Sandbox", hsbcanisters)
|
||||
if(hsbcanister)
|
||||
new hsbcanister(usr.loc)
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#define UTILITY_SPELLS "Utility"
|
||||
#define SUPPORT_SPELLS "Support"
|
||||
|
||||
var/list/all_technomancer_spells = typesof(/datum/technomancer/spell) - /datum/technomancer/spell
|
||||
var/list/all_technomancer_equipment = typesof(/datum/technomancer/equipment) - /datum/technomancer/equipment
|
||||
var/list/all_technomancer_consumables = typesof(/datum/technomancer/consumable) - /datum/technomancer/consumable
|
||||
var/list/all_technomancer_assistance = typesof(/datum/technomancer/assistance) - /datum/technomancer/assistance
|
||||
var/list/all_technomancer_spells = subtypesof(/datum/technomancer/spell)
|
||||
var/list/all_technomancer_equipment = subtypesof(/datum/technomancer/equipment)
|
||||
var/list/all_technomancer_consumables = subtypesof(/datum/technomancer/consumable)
|
||||
var/list/all_technomancer_assistance = subtypesof(/datum/technomancer/assistance)
|
||||
|
||||
/datum/technomancer
|
||||
var/name = "technomancer thing"
|
||||
|
||||
@@ -474,9 +474,8 @@
|
||||
infected = "Gangrene Detected:"
|
||||
|
||||
var/unknown_body = 0
|
||||
for(var/thing in e.implants)
|
||||
var/obj/item/weapon/implant/I = thing
|
||||
var/obj/item/device/nif/N = thing //VOREStation Add: NIFs
|
||||
for(var/obj/item/weapon/implant/I as anything in e.implants)
|
||||
var/obj/item/device/nif/N = I //VOREStation Add: NIFs
|
||||
if(istype(I) && I.known_implant)
|
||||
imp += "[I] implanted:"
|
||||
if(istype(N) && N.known_implant) //VOREStation Add: NIFs
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
var/livingprey = 0
|
||||
var/objectprey = 0
|
||||
|
||||
for(var/belly in H.vore_organs)
|
||||
var/obj/belly/B = belly
|
||||
for(var/obj/belly/B as anything in H.vore_organs)
|
||||
for(var/C in B)
|
||||
if(ishuman(C))
|
||||
humanprey++
|
||||
|
||||
@@ -183,9 +183,8 @@
|
||||
//Check if we still have the materials.
|
||||
var/coeff = (making.no_scale ? 1 : mat_efficiency) //stacks are unaffected by production coefficient
|
||||
|
||||
for(var/MAT in making.resources)
|
||||
var/datum/material/used_material = MAT
|
||||
var/amount_needed = making.resources[MAT] * coeff * multiplier
|
||||
for(var/datum/material/used_material as anything in making.resources)
|
||||
var/amount_needed = making.resources[used_material] * coeff * multiplier
|
||||
materials_used[used_material] = amount_needed
|
||||
|
||||
if(LAZYLEN(materials_used))
|
||||
|
||||
@@ -111,8 +111,7 @@
|
||||
data["id_rank"] = modify && modify.assignment ? modify.assignment : "Unassigned"
|
||||
|
||||
var/list/departments = list()
|
||||
for(var/D in SSjob.get_all_department_datums())
|
||||
var/datum/department/dept = D
|
||||
for(var/datum/department/dept as anything in SSjob.get_all_department_datums())
|
||||
if(!dept.assignable) // No AI ID cards for you.
|
||||
continue
|
||||
if(dept.centcom_only && !is_centcom())
|
||||
|
||||
@@ -373,8 +373,7 @@
|
||||
hook_vr("despawn", list(to_despawn, src))
|
||||
if(isliving(to_despawn))
|
||||
var/mob/living/L = to_despawn
|
||||
for(var/belly in L.vore_organs)
|
||||
var/obj/belly/B = belly
|
||||
for(var/obj/belly/B as anything in L.vore_organs)
|
||||
for(var/mob/living/sub_L in B)
|
||||
despawn_occupant(sub_L)
|
||||
for(var/obj/item/W in B)
|
||||
|
||||
@@ -1220,8 +1220,7 @@ About the new airlock wires panel:
|
||||
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
|
||||
|
||||
//if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator
|
||||
for(var/P in player_list)
|
||||
var/mob/M = P
|
||||
for(var/mob/M as anything in player_list)
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
var/old_sounds = M.client.is_preference_enabled(/datum/client_preference/old_door_sounds)
|
||||
@@ -1349,8 +1348,7 @@ About the new airlock wires panel:
|
||||
|
||||
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
|
||||
has_beeped = 0
|
||||
for(var/P in player_list)
|
||||
var/mob/M = P
|
||||
for(var/mob/M as anything in player_list)
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
var/old_sounds = M.client.is_preference_enabled(/datum/client_preference/old_door_sounds)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//Create global frame type list if it hasn't been made already.
|
||||
construction_frame_wall = list()
|
||||
construction_frame_floor = list()
|
||||
for(var/R in typesof(/datum/frame/frame_types) - /datum/frame/frame_types)
|
||||
for(var/R in subtypesof(/datum/frame/frame_types))
|
||||
var/datum/frame/frame_types/type = new R
|
||||
if(type.frame_style == FRAME_STYLE_WALL)
|
||||
construction_frame_wall += type
|
||||
@@ -272,9 +272,8 @@
|
||||
for(var/A in circuit.req_components)
|
||||
req_components[A] = circuit.req_components[A]
|
||||
req_component_names = circuit.req_components.Copy()
|
||||
for(var/A in req_components)
|
||||
var/obj/ct = A
|
||||
req_component_names[A] = initial(ct.name)
|
||||
for(var/obj/ct as anything in req_components)
|
||||
req_component_names[ct] = initial(ct.name)
|
||||
|
||||
/obj/structure/frame/New(var/loc, var/dir, var/building = 0, var/datum/frame/frame_types/type, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -91,8 +91,7 @@
|
||||
media_start_time = 0
|
||||
update_music()
|
||||
//VOREStation Add
|
||||
for(var/rem in remotes)
|
||||
var/obj/item/device/juke_remote/remote = rem
|
||||
for(var/obj/item/device/juke_remote/remote as anything in remotes)
|
||||
remote.update_music()
|
||||
//VOREStation Add End
|
||||
|
||||
|
||||
@@ -548,8 +548,7 @@ Class Procs:
|
||||
surviving_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
surviving_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
|
||||
for(var/a in surviving_parts)
|
||||
var/atom/movable/A = a
|
||||
for(var/atom/movable/A as anything in surviving_parts)
|
||||
A.forceMove(droploc)
|
||||
if(scatter && isturf(droploc))
|
||||
var/turf/T = droploc
|
||||
|
||||
@@ -265,8 +265,7 @@
|
||||
if(istype(copy_board))
|
||||
data["copyBoard"] = copy_board.name
|
||||
var/list/req_components_ui = list()
|
||||
for(var/CP in (copy_board.req_components || list()))
|
||||
var/obj/comp_path = CP
|
||||
for(var/obj/comp_path as anything in (copy_board.req_components || list()))
|
||||
var/comp_amt = copy_board.req_components[comp_path]
|
||||
if(comp_amt && (comp_path in partslathe_recipies))
|
||||
req_components_ui.Add(list(list("name" = initial(comp_path.name), "qty" = comp_amt)))
|
||||
@@ -355,7 +354,7 @@
|
||||
/obj/machinery/partslathe/proc/update_recipe_list()
|
||||
if(!partslathe_recipies)
|
||||
partslathe_recipies = list()
|
||||
var/list/paths = typesof(/obj/item/weapon/stock_parts)-/obj/item/weapon/stock_parts
|
||||
var/list/paths = subtypesof(/obj/item/weapon/stock_parts)
|
||||
for(var/type in paths)
|
||||
var/obj/item/weapon/stock_parts/I = new type()
|
||||
if(getHighestOriginTechLevel(I) > 1)
|
||||
|
||||
@@ -22,8 +22,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
|
||||
. = ..()
|
||||
if(id_tag)
|
||||
//No more than 1 controller please.
|
||||
for(var/thing in pointdefense_controllers)
|
||||
var/obj/machinery/pointdefense_control/PC = thing
|
||||
for(var/obj/machinery/pointdefense_control/PC as anything in pointdefense_controllers)
|
||||
if(PC != src && PC.id_tag == id_tag)
|
||||
warning("Two [src] with the same id_tag of [id_tag]")
|
||||
id_tag = null
|
||||
@@ -98,8 +97,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
|
||||
var/new_ident = input(user, "Enter a new ident tag.", "[src]", id_tag) as null|text
|
||||
if(new_ident && new_ident != id_tag && user.Adjacent(src) && CanInteract(user, GLOB.tgui_physical_state))
|
||||
// Check for duplicate controllers with this ID
|
||||
for(var/thing in pointdefense_controllers)
|
||||
var/obj/machinery/pointdefense_control/PC = thing
|
||||
for(var/obj/machinery/pointdefense_control/PC as anything in pointdefense_controllers)
|
||||
if(PC != src && PC.id_tag == id_tag)
|
||||
to_chat(user, "<span class='warning'>The [new_ident] network already has a controller.</span>")
|
||||
return
|
||||
@@ -207,8 +205,7 @@ GLOBAL_LIST_BOILERPLATE(pointdefense_turrets, /obj/machinery/power/pointdefense)
|
||||
if(!id_tag)
|
||||
return null
|
||||
var/list/connected_z_levels = GetConnectedZlevels(get_z(src))
|
||||
for(var/thing in pointdefense_controllers)
|
||||
var/obj/machinery/pointdefense_control/PDC = thing
|
||||
for(var/obj/machinery/pointdefense_control/PDC as anything in pointdefense_controllers)
|
||||
if(PDC.id_tag == id_tag && (get_z(PDC) in connected_z_levels))
|
||||
return PDC
|
||||
|
||||
|
||||
@@ -682,12 +682,11 @@
|
||||
for(var/turf/T in oview(world.view, src))
|
||||
seenturfs += T
|
||||
|
||||
for(var/mob in living_mob_list)
|
||||
var/mob/M = mob
|
||||
for(var/mob/M as anything in living_mob_list)
|
||||
if(M.z != z) //Skip
|
||||
continue
|
||||
if(get_turf(M) in seenturfs)
|
||||
assess_and_assign(mob, targets, secondarytargets)
|
||||
assess_and_assign(M, targets, secondarytargets)
|
||||
|
||||
/* This was dumb. Why do this and then check line of sight later?
|
||||
for(var/mob/M in mobs_in_xray_view(world.view, src))
|
||||
|
||||
@@ -176,8 +176,7 @@
|
||||
return M
|
||||
|
||||
/atom/movable/proc/handle_buckled_mob_movement(atom/old_loc, direct, movetime)
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
if(!L.Move(loc, direct, movetime))
|
||||
L.forceMove(loc, direct, movetime)
|
||||
L.last_move = last_move
|
||||
|
||||
@@ -294,8 +294,7 @@
|
||||
for(var/obj/effect/alien/weeds/W in orange(node_range, src))
|
||||
nearby_weeds |= W
|
||||
|
||||
for(var/nbw in nearby_weeds)
|
||||
var/obj/effect/alien/weeds/W = nbw
|
||||
for(var/obj/effect/alien/weeds/W as anything in nearby_weeds)
|
||||
|
||||
if(!W.linked_node)
|
||||
W.linked_node = src
|
||||
|
||||
@@ -113,8 +113,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
var/lowest_y = 0
|
||||
|
||||
// First pass is for finding the top right corner.
|
||||
for(var/thing in vis_contents)
|
||||
var/turf/T = thing
|
||||
for(var/turf/T as anything in vis_contents)
|
||||
if(T.x > highest_x)
|
||||
highest_x = T.x
|
||||
if(T.y > highest_y)
|
||||
@@ -124,8 +123,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
lowest_y = highest_y
|
||||
|
||||
// Second one is for the bottom left corner.
|
||||
for(var/thing in vis_contents)
|
||||
var/turf/T = thing
|
||||
for(var/turf/T as anything in vis_contents)
|
||||
if(T.x < lowest_x)
|
||||
lowest_x = T.x
|
||||
if(T.y < lowest_y)
|
||||
@@ -182,8 +180,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
|
||||
// Connects both sides of a portal together.
|
||||
/obj/effect/map_effect/portal/master/proc/find_counterparts()
|
||||
for(var/thing in GLOB.all_portal_masters)
|
||||
var/obj/effect/map_effect/portal/master/M = thing
|
||||
for(var/obj/effect/map_effect/portal/master/M as anything in GLOB.all_portal_masters)
|
||||
if(M == src)
|
||||
continue
|
||||
if(M.counterpart)
|
||||
@@ -205,8 +202,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
|
||||
/obj/effect/map_effect/portal/master/proc/make_visuals()
|
||||
var/list/observed_turfs = list()
|
||||
for(var/thing in portal_lines + src)
|
||||
var/obj/effect/map_effect/portal/P = thing
|
||||
for(var/obj/effect/map_effect/portal/P as anything in portal_lines + src)
|
||||
P.name = null
|
||||
P.icon_state = null
|
||||
|
||||
@@ -230,8 +226,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
// Shifts the portal's pixels in order to line up properly, as BYOND offsets the sprite when it holds multiple turfs inside `vis_contents`.
|
||||
// This undos the shift that BYOND did.
|
||||
/obj/effect/map_effect/portal/master/proc/apply_offset()
|
||||
for(var/thing in portal_lines + src)
|
||||
var/obj/effect/map_effect/portal/P = thing
|
||||
for(var/obj/effect/map_effect/portal/P as anything in portal_lines + src)
|
||||
|
||||
P.pixel_x = WORLD_ICON_SIZE * P.portal_distance_x
|
||||
P.pixel_y = WORLD_ICON_SIZE * P.portal_distance_y
|
||||
@@ -245,8 +240,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0)
|
||||
var/list/mobs_to_relay = in_range["mobs"]
|
||||
|
||||
for(var/thing in mobs_to_relay)
|
||||
var/mob/mob = thing
|
||||
for(var/mob/mob as anything in mobs_to_relay)
|
||||
var/rendered = "<span class='message'>[text]</span>"
|
||||
mob.show_message(rendered)
|
||||
|
||||
@@ -261,8 +255,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0)
|
||||
var/list/mobs_to_relay = in_range["mobs"]
|
||||
|
||||
for(var/thing in mobs_to_relay)
|
||||
var/mob/mob = thing
|
||||
for(var/mob/mob as anything in mobs_to_relay)
|
||||
mob.show_message(rendered)
|
||||
|
||||
..()
|
||||
@@ -275,8 +268,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
var/list/in_range = get_mobs_and_objs_in_view_fast(T, world.view, 0)
|
||||
var/list/mobs_to_relay = in_range["mobs"]
|
||||
|
||||
for(var/thing in mobs_to_relay)
|
||||
var/mob/mob = thing
|
||||
for(var/mob/mob as anything in mobs_to_relay)
|
||||
var/list/combined = mob.combine_message(message_pieces, verb, M)
|
||||
var/message = combined["formatted"]
|
||||
var/name_used = M.GetVoice()
|
||||
@@ -296,8 +288,7 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
var/obj/effect/map_effect/portal/master/other_master = counterpart
|
||||
|
||||
var/in_vis_contents = FALSE
|
||||
for(var/thing in other_master.portal_lines + other_master)
|
||||
var/obj/effect/map_effect/portal/P = thing
|
||||
for(var/obj/effect/map_effect/portal/P as anything in other_master.portal_lines + other_master)
|
||||
if(P in true_turf.vis_locs)
|
||||
in_vis_contents = TRUE
|
||||
break
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
var/shake_strength = 1 // How much it shakes.
|
||||
|
||||
/obj/effect/map_effect/interval/screen_shaker/trigger()
|
||||
for(var/A in player_list)
|
||||
var/mob/M = A
|
||||
for(var/mob/M as anything in player_list)
|
||||
if(M.z == src.z && get_dist(src, M) <= shake_radius)
|
||||
shake_camera(M, shake_duration, shake_strength)
|
||||
..()
|
||||
@@ -23,8 +23,7 @@
|
||||
if(light_range > 0 && light_intensity > 0)
|
||||
var/list/turf/line = getline(starting.return_turf(), ending.return_turf())
|
||||
tracing_line:
|
||||
for(var/i in line)
|
||||
var/turf/T = i
|
||||
for(var/turf/T as anything in line)
|
||||
for(var/obj/effect/projectile_lighting/PL in T)
|
||||
if(PL.owner == instance_key)
|
||||
continue tracing_line
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
|
||||
cam_plane_masters = get_tgui_plane_masters()
|
||||
|
||||
for(var/plane in cam_plane_masters)
|
||||
var/obj/screen/instance = plane
|
||||
for(var/obj/screen/instance as anything in cam_plane_masters)
|
||||
instance.assigned_map = map_name
|
||||
instance.del_on_map_removal = FALSE
|
||||
instance.screen_loc = "[map_name]:CENTER"
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
hack_state = new(src)
|
||||
|
||||
/obj/item/device/multitool/hacktool/Destroy()
|
||||
for(var/T in known_targets)
|
||||
var/atom/target = T
|
||||
for(var/atom/target as anything in known_targets)
|
||||
target.unregister(OBSERVER_EVENT_DESTROY, src)
|
||||
known_targets.Cut()
|
||||
qdel(hack_state)
|
||||
|
||||
@@ -4,8 +4,7 @@ var/global/list/active_radio_jammers = list()
|
||||
var/turf/Tr = get_turf(radio)
|
||||
if(!Tr) return 0 //Nullspace radios don't get jammed.
|
||||
|
||||
for(var/jammer in active_radio_jammers)
|
||||
var/obj/item/device/radio_jammer/J = jammer
|
||||
for(var/obj/item/device/radio_jammer/J as anything in active_radio_jammers)
|
||||
var/turf/Tj = get_turf(J)
|
||||
|
||||
if(J.on && Tj.z == Tr.z) //If we're on the same Z, it's worth checking.
|
||||
|
||||
@@ -133,8 +133,7 @@ HALOGEN COUNTER - Radcount on mobs
|
||||
var/unknown = 0
|
||||
var/reagentdata[0]
|
||||
var/unknownreagents[0]
|
||||
for(var/A in C.reagents.reagent_list)
|
||||
var/datum/reagent/R = A
|
||||
for(var/datum/reagent/R as anything in C.reagents.reagent_list)
|
||||
if(R.scannable)
|
||||
reagentdata["[R.id]"] = "<span class='notice'>\t[round(C.reagents.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.volume > R.overdose) ? " - <span class='danger'>Overdose</span>" : ""]</span><br>"
|
||||
else
|
||||
@@ -155,8 +154,7 @@ HALOGEN COUNTER - Radcount on mobs
|
||||
var/unknown = 0
|
||||
var/stomachreagentdata[0]
|
||||
var/stomachunknownreagents[0]
|
||||
for(var/B in C.ingested.reagent_list)
|
||||
var/datum/reagent/R = B
|
||||
for(var/datum/reagent/R as anything in C.ingested.reagent_list)
|
||||
if(R.scannable)
|
||||
stomachreagentdata["[R.id]"] = "<span class='notice'>\t[round(C.ingested.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.volume > R.overdose) ? " - <span class='danger'>Overdose</span>" : ""]</span><br>"
|
||||
if (advscan == 0 || showadvscan == 0)
|
||||
@@ -179,8 +177,7 @@ HALOGEN COUNTER - Radcount on mobs
|
||||
var/unknown = 0
|
||||
var/touchreagentdata[0]
|
||||
var/touchunknownreagents[0]
|
||||
for(var/B in C.touching.reagent_list)
|
||||
var/datum/reagent/R = B
|
||||
for(var/datum/reagent/R as anything in C.touching.reagent_list)
|
||||
if(R.scannable)
|
||||
touchreagentdata["[R.id]"] = "<span class='notice'>\t[round(C.touching.get_reagent_amount(R.id), 1)]u [R.name][(R.overdose && R.can_overdose_touch && R.volume > R.overdose) ? " - <span class='danger'>Overdose</span>" : ""]</span><br>"
|
||||
if (advscan == 0 || showadvscan == 0)
|
||||
|
||||
@@ -54,8 +54,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
|
||||
// Gather potential subtargets
|
||||
var/list/choices = list(M)
|
||||
if(istype(M))
|
||||
for(var/belly in M.vore_organs)
|
||||
var/obj/belly/B = belly
|
||||
for(var/obj/belly/B as anything in M.vore_organs)
|
||||
for(var/mob/living/carbon/human/H in B) // I do want an istype
|
||||
choices += H
|
||||
// Subtargets
|
||||
|
||||
@@ -43,16 +43,14 @@
|
||||
var/clotted = 0
|
||||
var/too_far_gone = 0
|
||||
|
||||
for(var/org in H.organs) //'organs' is just external organs, as opposed to 'internal_organs'
|
||||
var/obj/item/organ/external/affecting = org
|
||||
for(var/obj/item/organ/external/affecting as anything in H.organs) //'organs' is just external organs, as opposed to 'internal_organs'
|
||||
|
||||
// No amount of clotting is going to help you here.
|
||||
if(affecting.open)
|
||||
too_far_gone++
|
||||
continue
|
||||
|
||||
for(var/wnd in affecting.wounds)
|
||||
var/datum/wound/W = wnd
|
||||
for(var/datum/wound/W as anything in affecting.wounds)
|
||||
// No need
|
||||
if(W.bandaged)
|
||||
continue
|
||||
|
||||
@@ -252,6 +252,5 @@
|
||||
return TRUE
|
||||
|
||||
/obj/structure/proc/refresh_neighbors()
|
||||
for(var/thing in RANGE_TURFS(1, src))
|
||||
var/turf/T = thing
|
||||
for(var/turf/T as anything in RANGE_TURFS(1, src))
|
||||
T.update_icon()
|
||||
|
||||
@@ -65,8 +65,7 @@
|
||||
s.set_up(12, 1, src)
|
||||
s.start()
|
||||
if(has_buckled_mobs())
|
||||
for(var/a in buckled_mobs)
|
||||
var/mob/living/L = a
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
L.burn_skin(85)
|
||||
to_chat(L, "<span class='danger'>You feel a deep shock course through your body!</span>")
|
||||
sleep(1)
|
||||
|
||||
@@ -456,8 +456,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
..()
|
||||
update_layer()
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
if(L.loc != loc)
|
||||
L.buckled = null //Temporary, so Move() succeeds.
|
||||
L.buckled = src //Restoring
|
||||
@@ -467,8 +466,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
|
||||
/obj/structure/bed/chair/janicart/proc/update_mob()
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
L.set_dir(dir)
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
|
||||
@@ -63,8 +63,7 @@
|
||||
..()
|
||||
update_layer()
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
L.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/chair/verb/rotate_clockwise()
|
||||
@@ -151,8 +150,7 @@
|
||||
playsound(src, 'sound/effects/roll.ogg', 100, 1)
|
||||
|
||||
/obj/structure/bed/chair/office/handle_buckled_mob_movement(atom/new_loc, direction, movetime)
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/occupant = A
|
||||
for(var/mob/living/occupant as anything in buckled_mobs)
|
||||
occupant.buckled = null
|
||||
occupant.Move(loc, direction, movetime)
|
||||
occupant.buckled = src
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
L.set_dir(dir)
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -95,8 +94,7 @@
|
||||
var/turf/T = null
|
||||
//--1---Move occupant---1--//
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/L = A
|
||||
for(var/mob/living/L as anything in buckled_mobs)
|
||||
L.buckled = null
|
||||
step(L, direction)
|
||||
L.buckled = src
|
||||
@@ -128,8 +126,7 @@
|
||||
. = ..()
|
||||
playsound(src, 'sound/effects/roll.ogg', 75, 1)
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
var/mob/living/occupant = A
|
||||
for(var/mob/living/occupant as anything in buckled_mobs)
|
||||
if(!driving)
|
||||
occupant.buckled = null
|
||||
occupant.Move(src.loc)
|
||||
|
||||
@@ -265,12 +265,11 @@
|
||||
|
||||
/obj/machinery/shower/process()
|
||||
if(!on) return
|
||||
for(var/thing in loc)
|
||||
var/atom/movable/AM = thing
|
||||
var/mob/living/L = thing
|
||||
if(istype(AM) && AM.simulated)
|
||||
for(var/atom/movable/AM in loc)
|
||||
if(AM.simulated)
|
||||
wash(AM)
|
||||
if(istype(L))
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
process_heat(L)
|
||||
wash_floor()
|
||||
reagents.add_reagent("water", reagents.get_free_space())
|
||||
|
||||
@@ -109,7 +109,7 @@ var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluesp
|
||||
|
||||
var/global/tmp/announced_news_types = list()
|
||||
/proc/check_for_newscaster_updates(type)
|
||||
for(var/subtype in typesof(type)-type)
|
||||
for(var/subtype in subtypesof(type))
|
||||
var/datum/news_announcement/news = new subtype()
|
||||
if(news.round_time * 10 <= world.time && !(subtype in announced_news_types))
|
||||
announced_news_types += subtype
|
||||
|
||||
+1
-2
@@ -17,8 +17,7 @@
|
||||
var/list/listeners = player_list
|
||||
if(!ignore_walls) //these sounds don't carry through walls
|
||||
listeners = listeners & hearers(maxdistance,turf_source)
|
||||
for(var/P in listeners)
|
||||
var/mob/M = P
|
||||
for(var/mob/M as anything in listeners)
|
||||
if(!M || !M.client)
|
||||
continue
|
||||
var/turf/T = get_turf(M)
|
||||
|
||||
@@ -238,19 +238,17 @@
|
||||
|
||||
/turf/proc/AdjacentTurfs(var/check_blockage = TRUE)
|
||||
. = list()
|
||||
for(var/t in (trange(1,src) - src))
|
||||
var/turf/T = t
|
||||
for(var/turf/T as anything in (trange(1,src) - src))
|
||||
if(check_blockage)
|
||||
if(!T.density)
|
||||
if(!LinkBlocked(src, T) && !TurfBlockedNonWindow(T))
|
||||
. += t
|
||||
. += T
|
||||
else
|
||||
. += t
|
||||
. += T
|
||||
|
||||
/turf/proc/CardinalTurfs(var/check_blockage = TRUE)
|
||||
. = list()
|
||||
for(var/ad in AdjacentTurfs(check_blockage))
|
||||
var/turf/T = ad
|
||||
for(var/turf/T as anything in AdjacentTurfs(check_blockage))
|
||||
if(T.x == src.x || T.y == src.y)
|
||||
. += T
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ var/datum/admin_secrets/admin_secrets = new()
|
||||
for(var/datum/admin_secret_category/category in categories)
|
||||
category_assoc[category.type] = category
|
||||
|
||||
for(var/item_type in (typesof(/datum/admin_secret_item) - /datum/admin_secret_item))
|
||||
for(var/item_type in subtypesof(/datum/admin_secret_item))
|
||||
var/datum/admin_secret_item/secret_item = item_type
|
||||
if(!initial(secret_item.name))
|
||||
continue
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
to_chat(usr, "<span class='warning'>Looks like you didn't select a mob.</span>")
|
||||
return
|
||||
|
||||
var/list/possible_modifiers = typesof(/datum/modifier) - /datum/modifier
|
||||
var/list/possible_modifiers = subtypesof(/datum/modifier)
|
||||
|
||||
var/new_modifier_type = tgui_input_list(usr, "What modifier should we add to [L]?", "Modifier Type", possible_modifiers)
|
||||
if(!new_modifier_type)
|
||||
|
||||
@@ -238,8 +238,7 @@ Example: USING PROCCALL = BLOCKING, SELECT = FORCE_NULLS, PRIORITY = HIGH SELECT
|
||||
do
|
||||
CHECK_TICK
|
||||
finished = TRUE
|
||||
for(var/i in running)
|
||||
var/datum/SDQL2_query/query = i
|
||||
for(var/datum/SDQL2_query/query as anything in running)
|
||||
if(QDELETED(query))
|
||||
running -= query
|
||||
continue
|
||||
@@ -562,8 +561,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
|
||||
location = list(location)
|
||||
|
||||
if(type == "*")
|
||||
for(var/i in location)
|
||||
var/datum/d = i
|
||||
for(var/datum/d as anything in location)
|
||||
if(d.can_vv_get() || superuser)
|
||||
out += d
|
||||
SDQL2_TICK_CHECK
|
||||
|
||||
@@ -63,8 +63,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
return
|
||||
var/list/dat = list("<html><head><title>[title]</title></head>")
|
||||
dat += "<A HREF='?_src_=holder;ahelp_tickets=[state]'>Refresh</A><br><br>"
|
||||
for(var/I in l2b)
|
||||
var/datum/admin_help/AH = I
|
||||
for(var/datum/admin_help/AH as anything in l2b)
|
||||
dat += "<span class='adminnotice'><span class='adminhelp'>Ticket #[AH.id]</span>: <A HREF='?_src_=holder;ahelp=\ref[AH];ahelp_action=ticket'>[AH.initiator_key_name]: [AH.name]</A></span><br>"
|
||||
|
||||
usr << browse(dat.Join(), "window=ahelp_list[state];size=600x480")
|
||||
@@ -73,8 +72,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
/datum/admin_help_tickets/proc/stat_entry()
|
||||
var/num_disconnected = 0
|
||||
stat("Active Tickets:", astatclick.update("[active_tickets.len]"))
|
||||
for(var/I in active_tickets)
|
||||
var/datum/admin_help/AH = I
|
||||
for(var/datum/admin_help/AH as anything in active_tickets)
|
||||
if(AH.initiator)
|
||||
stat("#[AH.id]. [AH.initiator_key_name]:", AH.statclick.update())
|
||||
else
|
||||
@@ -100,8 +98,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
|
||||
//Get a ticket given a ckey
|
||||
/datum/admin_help_tickets/proc/CKey2ActiveTicket(ckey)
|
||||
for(var/I in active_tickets)
|
||||
var/datum/admin_help/AH = I
|
||||
for(var/datum/admin_help/AH as anything in active_tickets)
|
||||
if(AH.initiator_ckey == ckey)
|
||||
return AH
|
||||
|
||||
@@ -637,8 +634,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
/proc/ircadminwho()
|
||||
var/list/message = list("Admins: ")
|
||||
var/list/admin_keys = list()
|
||||
for(var/adm in GLOB.admins)
|
||||
var/client/C = adm
|
||||
for(var/client/C as anything in GLOB.admins)
|
||||
admin_keys += "[C][C.holder.fakekey ? "(Stealth)" : ""][C.is_afk() ? "(AFK)" : ""]"
|
||||
|
||||
for(var/admin in admin_keys)
|
||||
|
||||
@@ -282,8 +282,7 @@ Ccomp's first proc.
|
||||
GLOB.respawn_timers -= target
|
||||
|
||||
var/found_client = FALSE
|
||||
for(var/c in GLOB.clients)
|
||||
var/client/C = c
|
||||
for(var/client/C as anything in GLOB.clients)
|
||||
if(C.ckey == target)
|
||||
found_client = C
|
||||
to_chat(C, "<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>")
|
||||
|
||||
@@ -46,8 +46,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
var/things = get_all_of_type(type, subtypes)
|
||||
|
||||
var/i = 0
|
||||
for(var/thing in things)
|
||||
var/datum/D = thing
|
||||
for(var/datum/D as anything in things)
|
||||
i++
|
||||
//try one of 3 methods to shorten the type text:
|
||||
// fancy type,
|
||||
|
||||
@@ -175,11 +175,10 @@
|
||||
var/list/choices = list()
|
||||
for(var/typechoice in types)
|
||||
var/list/found = list()
|
||||
for(var/mob in searching) // Isnt't there a helper for this, maybe? I forget.
|
||||
var/atom/M = mob
|
||||
for(var/atom/M as anything in searching) // Isnt't there a helper for this, maybe? I forget.
|
||||
if(!(M.z in levels_working))
|
||||
continue
|
||||
if(!istype(mob,typechoice))
|
||||
if(!istype(M,typechoice))
|
||||
continue
|
||||
found += M
|
||||
choices["[typechoice] ([found.len])"] = found // Prettified name for the user input below)
|
||||
@@ -190,8 +189,7 @@
|
||||
href_list["datumrefresh"] = "\ref[src]"
|
||||
return
|
||||
var/list/selected = choices[choice]
|
||||
for(var/mob in selected)
|
||||
var/mob/living/L = mob
|
||||
for(var/mob/living/L as anything in selected)
|
||||
if(!istype(L))
|
||||
to_chat(usr,"<span class='warning'>Skipping incompatible mob: [L] [ADMIN_COORDJMP(L)]</span>")
|
||||
continue
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
ai_log("test_projectile_safety() : Test projectile did[!would_hit_primary_target ? " NOT " : " "]hit \the [AM]", AI_LOG_DEBUG)
|
||||
|
||||
// Make sure we don't have a chance to shoot our friends.
|
||||
for(var/a in hit_things)
|
||||
var/atom/A = a
|
||||
for(var/atom/A as anything in hit_things)
|
||||
ai_log("test_projectile_safety() : Evaluating \the [A] ([A.type]).", AI_LOG_TRACE)
|
||||
if(isliving(A)) // Don't shoot at our friends, even if they're behind the target, as RNG can make them get hit.
|
||||
var/mob/living/L = A
|
||||
|
||||
@@ -84,8 +84,7 @@
|
||||
if(rand(0,200) < speak_chance)
|
||||
// Check if anyone is around to 'appreciate' what we say.
|
||||
var/alone = TRUE
|
||||
for(var/m in viewers(holder))
|
||||
var/mob/M = m
|
||||
for(var/mob/M as anything in viewers(holder))
|
||||
if(M.client)
|
||||
alone = FALSE
|
||||
break
|
||||
|
||||
@@ -127,8 +127,7 @@
|
||||
return TRUE
|
||||
if("visible")
|
||||
visible = !visible
|
||||
for(var/ibeam in i_beams)
|
||||
var/obj/effect/beam/i_beam/I = ibeam
|
||||
for(var/obj/effect/beam/i_beam/I as anything in i_beams)
|
||||
I.visible = visible
|
||||
CHECK_TICK
|
||||
return TRUE
|
||||
|
||||
@@ -375,8 +375,7 @@
|
||||
|
||||
/datum/asset/spritesheet/vending/register()
|
||||
populate_vending_products()
|
||||
for(var/k in GLOB.vending_products)
|
||||
var/atom/item = k
|
||||
for(var/atom/item as anything in GLOB.vending_products)
|
||||
if(!ispath(item, /atom))
|
||||
continue
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
//credits
|
||||
var/amount = rand(2,6)
|
||||
var/list/possible_spawns = list()
|
||||
for(var/cash_type in typesof(/obj/item/weapon/spacecash) - /obj/item/weapon/spacecash)
|
||||
for(var/cash_type in subtypesof(/obj/item/weapon/spacecash))
|
||||
possible_spawns += cash_type
|
||||
|
||||
var/cash_type = pick(possible_spawns)
|
||||
|
||||
@@ -111,8 +111,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
|
||||
shuffle_inplace(blobs_to_affect)
|
||||
|
||||
for(var/L in blobs_to_affect)
|
||||
var/obj/structure/blob/B = L
|
||||
for(var/obj/structure/blob/B as anything in blobs_to_affect)
|
||||
if(B.faction != faction)
|
||||
continue
|
||||
|
||||
|
||||
@@ -197,8 +197,7 @@ var/list/blob_cores = list()
|
||||
if(!difficulty_threshold)
|
||||
return
|
||||
var/list/valid_types = list()
|
||||
for(var/thing in subtypesof(/datum/blob_type))
|
||||
var/datum/blob_type/BT = thing
|
||||
for(var/datum/blob_type/BT as anything in subtypesof(/datum/blob_type))
|
||||
if(initial(BT.difficulty) > difficulty_threshold) // Too hard.
|
||||
continue
|
||||
if(initial(BT.difficulty) < difficulty_floor) // Too easy.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user