mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Merge pull request #11179 from VOREStation/Arokha/opt
Optimize a couple things
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user