diff --git a/aurorastation.dme b/aurorastation.dme
index 0c08262c02b..f2ae630614f 100644
--- a/aurorastation.dme
+++ b/aurorastation.dme
@@ -2447,7 +2447,6 @@
#include "code\modules\mapping\map_template.dm"
#include "code\modules\mapping\reader.dm"
#include "code\modules\mapping\ruins.dm"
-#include "code\modules\mapping\swapmaps.dm"
#include "code\modules\mapping\planet_types\asteroid.dm"
#include "code\modules\mapping\planet_types\barren.dm"
#include "code\modules\mapping\planet_types\crystal.dm"
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index cbdf51b0e21..abb673de75b 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -96,7 +96,12 @@ Contains helper procs for airflow, handled in /connection_group.
SPAN_DANGER("You hear a loud slam!"),2)
playsound(src.loc, 'sound/weapons/smash.ogg', 25, 1, -1)
- var/weak_amt = istype(A,/obj/item) ? A:w_class : rand(1,5) //Heheheh
+ var/weak_amt
+ if(istype(A, /obj/item))
+ var/obj/item/I = A
+ weak_amt = I.w_class
+ else
+ weak_amt = rand(1, 5)
Weaken(weak_amt)
. = ..()
diff --git a/code/ZAS/ConnectionGroup.dm b/code/ZAS/ConnectionGroup.dm
index b7611a799ae..ff678f234c6 100644
--- a/code/ZAS/ConnectionGroup.dm
+++ b/code/ZAS/ConnectionGroup.dm
@@ -106,9 +106,10 @@ Class Procs:
//Check for knocking people over
if(ismob(M) && differential > vsc.airflow_stun_pressure)
- if(M:status_flags & GODMODE)
+ var/mob/mob = M
+ if(mob.status_flags & GODMODE)
continue
- M:airflow_stun()
+ mob.airflow_stun()
if(M.check_airflow_movable(differential))
//Check for things that are in range of the midpoint turfs.
diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm
index cc3757691a8..a5b81105e49 100644
--- a/code/__DEFINES/flags.dm
+++ b/code/__DEFINES/flags.dm
@@ -1,5 +1,3 @@
-var/global/list/bitflags = list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768)
-
#define TURF_IS_MIMICING(T) (isturf(T) && (T:z_flags & ZM_MIMIC_BELOW))
#define CHECK_OO_EXISTENCE(OO) if (OO && !TURF_IS_MIMICING(OO.loc)) { qdel(OO); }
#define UPDATE_OO_IF_PRESENT CHECK_OO_EXISTENCE(bound_overlay); if (bound_overlay) { update_above(); }
diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm
index cb2f6425f81..e5a1ce15b7d 100644
--- a/code/__HELPERS/icons.dm
+++ b/code/__HELPERS/icons.dm
@@ -895,8 +895,10 @@ lighting determines lighting capturing (optional), suppress_errors suppreses err
if(A)
var/icon/img = getFlatIcon(A)
if(istype(img, /icon))
- if(istype(A, /mob/living) && A:lying)
- img.BecomeLying()
+ if(istype(A, /mob/living))
+ var/mob/living/L = A
+ if(L.lying)
+ img.BecomeLying()
var/xoff = (A.x - tx) * 32
var/yoff = (A.y - ty) * 32
cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 0265dd86269..42a3b95a687 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -913,35 +913,37 @@ var/global/list/common_tools = list(
return 1
return 0
-/proc/is_hot(obj/item/W as obj)
- switch(W.type)
- if(/obj/item/weldingtool)
- var/obj/item/weldingtool/WT = W
- if(WT.isOn())
- return 3800
- else
- return 0
- if(/obj/item/flame/lighter)
- if(W:lit)
- return 1500
- else
- return 0
- if(/obj/item/flame/match)
- if(W:lit)
- return 1000
- else
- return 0
- if(/obj/item/clothing/mask/smokable/cigarette)
- if(W:lit)
- return 1000
- else
- return 0
- if(/obj/item/gun/energy/plasmacutter)
+/proc/is_hot(obj/item/W)
+ SHOULD_NOT_SLEEP(TRUE)
+ SHOULD_BE_PURE(TRUE)
+
+ . = 0
+
+ if(istype(W, /obj/item/weldingtool))
+ var/obj/item/weldingtool/WT = W
+ if(WT.isOn())
return 3800
- if(/obj/item/melee/energy)
- return 3500
- else
- return 0
+
+ if(istype(W, /obj/item/flame/lighter))
+ var/obj/item/flame/lighter/lighter = W
+ if(lighter.lit)
+ return 1500
+
+ if(istype(W, /obj/item/flame/match))
+ var/obj/item/flame/match/match = W
+ if(match.lit)
+ return 1000
+
+ if(istype(W, /obj/item/clothing/mask/smokable/cigarette))
+ var/obj/item/clothing/mask/smokable/cigarette/cigarette = W
+ if(cigarette.lit)
+ return 1000
+
+ if(istype(W, /obj/item/gun/energy/plasmacutter))
+ return 3800
+
+ if(istype(W, /obj/item/melee/energy))
+ return 3500
//Whether or not the given item counts as sharp in terms of dealing damage
/proc/is_sharp(obj/O)
diff --git a/code/___linters/odlint.dm b/code/___linters/odlint.dm
index 3714dc5298c..1af9cdf8988 100644
--- a/code/___linters/odlint.dm
+++ b/code/___linters/odlint.dm
@@ -18,6 +18,8 @@
#pragma SuspiciousMatrixCall error
#pragma FallbackBuiltinArgument error
#pragma PointlessScopeOperator error
+#pragma PointlessPositionalArgument error
+#pragma ProcArgumentGlobal error
#pragma MalformedRange error
#pragma InvalidRange error
#pragma InvalidSetStatement error
@@ -33,5 +35,8 @@
#pragma SuspiciousSwitchCase error
#pragma AssignmentInConditional error
#pragma AmbiguousInOrder error
+#pragma ExtraToken error
+//We rely on macros for things that require this operator, so for now it's kept disabled
+#pragma RuntimeSearchOperator disabled
#endif
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 2a4e9390889..54a2ff6fd62 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -334,7 +334,7 @@
usr.stop_pulling()
if("throw")
if(!usr.stat && isturf(usr.loc) && !usr.restrained())
- usr:toggle_throw_mode()
+ usr.toggle_throw_mode()
if("drop")
if(usr.client)
usr.client.drop_item()
@@ -400,19 +400,21 @@
to_chat(R, "You haven't selected a module yet.")
if("radio")
- if(issilicon(usr))
- if(isrobot(usr))
- if(modifiers["shift"])
- var/mob/living/silicon/robot/R = usr
- if(!R.radio.radio_desc)
- R.radio.setupRadioDescription()
- to_chat(R, SPAN_NOTICE("You analyze your integrated radio:"))
- to_chat(R, R.radio.radio_desc)
- return
- usr:radio_menu()
+ if(isrobot(usr))
+ var/mob/living/silicon/robot/R = usr
+ if(modifiers["shift"])
+ if(!R.radio.radio_desc)
+ R.radio.setupRadioDescription()
+ to_chat(R, SPAN_NOTICE("You analyze your integrated radio:"))
+ to_chat(R, R.radio.radio_desc)
+ return
+
+ R.radio_menu()
+
if("panel")
- if(issilicon(usr))
- usr:installed_modules()
+ if(isrobot(usr))
+ var/mob/living/silicon/robot/R = usr
+ R.installed_modules()
if("store")
if(isrobot(usr))
@@ -446,9 +448,9 @@
var/mob/living/carbon/C = usr
C.activate_hand("l")
if("swap")
- usr:swap_hand()
+ usr.swap_hand()
if("hand")
- usr:swap_hand()
+ usr.swap_hand()
else
if(usr.attack_ui(slot_id))
usr.update_inv_l_hand(0)
diff --git a/code/controllers/subsystems/falling.dm b/code/controllers/subsystems/falling.dm
index a2bd77bedc7..36a11201a9e 100644
--- a/code/controllers/subsystems/falling.dm
+++ b/code/controllers/subsystems/falling.dm
@@ -35,21 +35,22 @@ SUBSYSTEM_DEF(falling)
// The call_fall checks that are executed for every atom forever. These
// should not be overwritten/there shouldn't be a need to overwrite them.
// For specialty conditions, edit CanZPass and can_fall procs.
- if (!isturf(victim.loc))
+ var/turf/mob_loc = victim.loc
+ if (!isturf(mob_loc))
REMOVE_AND_CONTINUE
// Get the below turf.
- var/turf/T = get_turf(victim)
- var/turf/below = GET_TURF_BELOW(T)
+ var/turf/below = GET_TURF_BELOW(mob_loc)
if (!below)
REMOVE_AND_CONTINUE
// Check if we can fall through the current tile and onto the next one.
- if (!victim.loc:CanZPass(victim, DOWN) || !below.CanZPass(victim, DOWN))
+ if (!mob_loc.CanZPass(victim, DOWN) || !below.CanZPass(victim, DOWN))
REMOVE_AND_CONTINUE
// Check if the victim's current position is affected by gravity.
- if (!victim.loc.loc:has_gravity())
+ var/area/mob_area = get_area(mob_loc)
+ if (!mob_area.has_gravity())
REMOVE_AND_CONTINUE
// Thrown objects don't fall, generally speaking.
@@ -75,40 +76,43 @@ SUBSYSTEM_DEF(falling)
// Invokes fall_through() after the atom is moved to
// its new destination this cycle. Immediately invokes fall_impact and
// fall_collateral if the next turf is not open space.
- if (isopenturf(victim.loc) && victim.loc:is_hole)
- victim.begin_falling(victim.loc, below)
- victim.forceMove(below)
- if(victim.pulledby && victim.pulledby.z != victim.z)
- var/mob/M = victim.pulledby
- M.stop_pulling()
+ if (isopenturf(victim.loc))
+ var/turf/simulated/open/mob_openturf = victim.loc
- if (locate(/obj/structure/stairs) in victim.loc) // If there's stairs, we're probably going down them.
- if (falling[victim] <= 1) // Just moving down a flight, skip damage.
- victim.multiz_falling = 0
- falling -= victim
- for(var/obj/item/grab/grab in victim)
- if(grab.affecting)
- grab.affecting.forceMove(victim.loc)
+ if(mob_openturf.is_hole)
+ victim.begin_falling(victim.loc, below)
+ victim.forceMove(below)
+ if(victim.pulledby && victim.pulledby.z != victim.z)
+ var/mob/M = victim.pulledby
+ M.stop_pulling()
+
+ if (locate(/obj/structure/stairs) in victim.loc) // If there's stairs, we're probably going down them.
+ if (falling[victim] <= 1) // Just moving down a flight, skip damage.
+ victim.multiz_falling = 0
+ falling -= victim
+ for(var/obj/item/grab/grab in victim)
+ if(grab.affecting)
+ grab.affecting.forceMove(victim.loc)
+ else
+ // Falling more than a level, fuck 'em up.
+ victim.fall_impact(falling[victim], FALSE)
+ victim.fall_collateral(falling[victim], FALSE)
+ victim.multiz_falling = 0
+ falling -= victim
+
+ else if (isopenturf(victim.loc))
+ victim.fall_through()
else
- // Falling more than a level, fuck 'em up.
+ // This is a lookahead. It removes any lag from being moved onto
+ // the destination turf, and calling fall_impact.
victim.fall_impact(falling[victim], FALSE)
victim.fall_collateral(falling[victim], FALSE)
victim.multiz_falling = 0
falling -= victim
- else if (isopenturf(victim.loc))
- victim.fall_through()
- else
- // This is a lookahead. It removes any lag from being moved onto
- // the destination turf, and calling fall_impact.
- victim.fall_impact(falling[victim], FALSE)
- victim.fall_collateral(falling[victim], FALSE)
- victim.multiz_falling = 0
- falling -= victim
-
- if (MC_TICK_CHECK)
- return
- continue
+ if (MC_TICK_CHECK)
+ return
+ continue
// This shouldn't actually happen. But for safety, here it is.
victim.fall_impact(falling[victim], FALSE)
diff --git a/code/controllers/subsystems/processing/airflow.dm b/code/controllers/subsystems/processing/airflow.dm
index bf873eb7282..4a6b3f66504 100644
--- a/code/controllers/subsystems/processing/airflow.dm
+++ b/code/controllers/subsystems/processing/airflow.dm
@@ -82,8 +82,10 @@ PROCESSING_SUBSYSTEM_DEF(airflow)
continue
step_towards(target, target.airflow_dest)
- if (ismob(target) && target:client)
- target:setMoveCooldown(vsc.airflow_mob_slowdown)
+ if(ismob(target))
+ var/mob/target_mob = target
+ if(target_mob.client)
+ target_mob:setMoveCooldown(vsc.airflow_mob_slowdown)
if (MC_TICK_CHECK)
return
diff --git a/code/controllers/subsystems/vis_contents.dm b/code/controllers/subsystems/vis_contents.dm
index 57787d0576d..e1ee295fb2a 100644
--- a/code/controllers/subsystems/vis_contents.dm
+++ b/code/controllers/subsystems/vis_contents.dm
@@ -6,7 +6,7 @@ SUBSYSTEM_DEF(vis_contents_update)
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/list/queue_refs = list()
-/datum/controller/subsystem/vis_contents_update/stat_entry()
+/datum/controller/subsystem/vis_contents_update/stat_entry(msg)
..("Queue: [queue_refs.len]")
/datum/controller/subsystem/vis_contents_update/Initialize()
@@ -24,17 +24,15 @@ SUBSYSTEM_DEF(vis_contents_update)
if(!queue_refs.len)
can_fire = FALSE
return
- var/i = 0
- while (i < queue_refs.len)
- i++
- var/atom/A = queue_refs[i]
- if(QDELETED(A))
+ for(var/i in 1 to length(queue_refs))
+ var/atom/movable/MA = queue_refs[i]
+ if(QDELETED(MA))
continue
if(Master.map_loading)
queue_refs.Cut(1, i+1)
return
- A.vis_update_queued = FALSE
- A.update_vis_contents(force_no_queue = TRUE)
+ MA.vis_update_queued = FALSE
+ MA.update_vis_contents(force_no_queue = TRUE)
if (no_mc_tick)
CHECK_TICK
else if (MC_TICK_CHECK)
@@ -52,24 +50,55 @@ SUBSYSTEM_DEF(vis_contents_update)
SSvis_contents_update.queue_refs.Add(src)
SSvis_contents_update.can_fire = TRUE
-// Horrible colon syntax below is because vis_contents
-// exists in /atom.vars, but will not compile. No idea why.
+
/atom/proc/add_vis_contents(adding)
- src:vis_contents |= adding
+ SHOULD_CALL_PARENT(FALSE)
+ crash_with("Turfs, movable atoms, and images can be given a list of atoms, but not atmos themselves!")
+
+/atom/movable/add_vis_contents(adding)
+ vis_contents |= adding
+
+/turf/add_vis_contents(adding)
+ vis_contents |= adding
+
/atom/proc/remove_vis_contents(removing)
- src:vis_contents -= removing
+ SHOULD_CALL_PARENT(FALSE)
+ crash_with("Turfs, movable atoms, and images can be given a list of atoms, but not atmos themselves!")
+
+/atom/movable/remove_vis_contents(removing)
+ vis_contents -= removing
+
+/turf/remove_vis_contents(removing)
+ vis_contents -= removing
+
/atom/proc/clear_vis_contents()
- src:vis_contents = null
+ SHOULD_CALL_PARENT(FALSE)
+ crash_with("Turfs, movable atoms, and images can be given a list of atoms, but not atmos themselves!")
+
+/atom/movable/clear_vis_contents()
+ vis_contents = null
+
+/turf/clear_vis_contents()
+ vis_contents = null
+
/atom/proc/set_vis_contents(list/adding)
- src:vis_contents = adding
+ SHOULD_CALL_PARENT(FALSE)
+ crash_with("Turfs, movable atoms, and images can be given a list of atoms, but not atmos themselves!")
+
+/atom/movable/set_vis_contents(list/adding)
+ vis_contents = adding
+
+/turf/set_vis_contents(list/adding)
+ vis_contents = adding
+
/atom/proc/get_vis_contents_to_add()
return
-/atom/proc/update_vis_contents(force_no_queue = FALSE)
+/atom/movable/proc/update_vis_contents(force_no_queue = FALSE)
if(!force_no_queue && (!SSvis_contents_update.initialized || TICK_CHECK))
queue_vis_contents_update()
return
@@ -77,7 +106,7 @@ SUBSYSTEM_DEF(vis_contents_update)
var/new_vis_contents = get_vis_contents_to_add()
if(length(new_vis_contents))
set_vis_contents(new_vis_contents)
- else if(length(src:vis_contents))
+ else if(length(vis_contents))
clear_vis_contents()
/image/proc/add_vis_contents(adding)
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 3fea41aa0f0..ef5599ebefd 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -268,7 +268,7 @@
var/mob/def_target = null
var/objective_list[] = list(/datum/objective/assassinate, /datum/objective/protect, /datum/objective/debrain)
- if (objective&&(objective.type in objective_list) && objective:target)
+ if (objective && (objective.type in objective_list) && objective.target)
def_target = objective.target.current
var/new_target = input("Select target:", "Objective target", def_target) as null|anything in possible_targets
@@ -279,13 +279,13 @@
if (!istype(M) || !M.mind || new_target == "Free objective")
new_objective = new objective_path
new_objective.owner = src
- new_objective:target = null
+ new_objective.target = null
new_objective.explanation_text = "Free objective"
else
new_objective = new objective_path
new_objective.owner = src
- new_objective:target = M.mind
- new_objective.explanation_text = "[objective_type] [M.real_name], the [M.mind.special_role ? M.mind:special_role : M.mind:assigned_role]."
+ new_objective.target = M.mind
+ new_objective.explanation_text = "[objective_type] [M.real_name], the [M.mind.special_role ? M.mind.special_role : M.mind.assigned_role]."
if ("prevent")
new_objective = new /datum/objective/block
diff --git a/code/datums/radio/signal.dm b/code/datums/radio/signal.dm
index 39ce0e953eb..8a0d06d7034 100644
--- a/code/datums/radio/signal.dm
+++ b/code/datums/radio/signal.dm
@@ -17,7 +17,7 @@
/datum/signal/proc/debug_print()
if (source)
- . = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
+ . = "signal = {source = '[source]' ([source.x],[source.y],[source.z])\n"
else
. = "signal = {source = '[source]' ()\n"
for (var/i in data)
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm
index 85fb47ca62d..3ecf7151401 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/HARDWARE.dm
@@ -163,4 +163,4 @@
SSticker.station_explosion_cinematic(0,null)
if(SSticker.mode)
- SSticker.mode:station_was_nuked = 1
+ SSticker.mode.station_was_nuked = TRUE
diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm
index b287dfb0ff4..1245b34cb6f 100644
--- a/code/game/gamemodes/objective.dm
+++ b/code/game/gamemodes/objective.dm
@@ -477,8 +477,8 @@ GLOBAL_LIST_EMPTY(process_objectives)
if (new_target == "custom")
var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
if (!custom_target) return
- var/tmp_obj = new custom_target
- var/custom_name = tmp_obj:name
+ var/obj/item/tmp_obj = new custom_target
+ var/custom_name = tmp_obj.name
qdel(tmp_obj)
custom_name = sanitize(input("Enter target name:", "Objective target", custom_name) as text|null)
if (!custom_name) return
diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm
index ac3f286e735..5f0c57b4e22 100644
--- a/code/game/machinery/ai_slipper.dm
+++ b/code/game/machinery/ai_slipper.dm
@@ -68,9 +68,9 @@
return
user.set_machine(src)
- var/loc = src.loc
+ var/turf/loc = src.loc
if (istype(loc, /turf))
- loc = loc:loc
+ loc = loc.loc
if (!istype(loc, /area))
to_chat(user, "Turret badly positioned - loc.loc is [loc].")
return
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index fd2b641e436..99b8dbdfe94 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -172,9 +172,11 @@
jump_to = A
else if(ismob(A))
if(ishuman(A))
- jump_to = locate() in A:head
+ var/mob/living/carbon/human/H = A
+ jump_to = locate() in H.head
else if(isrobot(A))
- jump_to = A:camera
+ var/mob/living/silicon/robot/R = A
+ jump_to = R.camera
else if(isobj(A))
jump_to = locate() in A
else if(isturf(A))
diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm
index 57e111431fc..e2424ea039b 100644
--- a/code/game/machinery/doors/airlock_electronics.dm
+++ b/code/game/machinery/doors/airlock_electronics.dm
@@ -76,7 +76,7 @@
var/obj/item/card/id/I = usr.GetIdCard()
if(istype(I) && src.check_access(I))
locked = FALSE
- last_configurator = I:registered_name
+ last_configurator = I.registered_name
if(locked)
return
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 11d74f6ab56..61861e1765b 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -118,12 +118,27 @@
/obj/machinery/door/blast/attackby(obj/item/attacking_item, mob/user)
if(!istype(attacking_item, /obj/item/forensics))
src.add_fingerprint(user)
- if((istype(attacking_item, /obj/item/material/twohanded/fireaxe) && attacking_item:wielded == 1) || attacking_item.ishammer() || istype(attacking_item, /obj/item/crowbar/hydraulic_rescue_tool))
- if (((stat & NOPOWER) || (stat & BROKEN)) && !( src.operating ))
+ if(istype(attacking_item, /obj/item/material/twohanded/fireaxe))
+ var/obj/item/material/twohanded/fireaxe/F = attacking_item
+ if(!F.wielded)
+ return TRUE
+
+ if(((stat & NOPOWER) || (stat & BROKEN)) && !src.operating)
force_toggle()
else
to_chat(usr, SPAN_NOTICE("[src]'s motors resist your effort."))
+
return TRUE
+
+
+ if(attacking_item.ishammer() || istype(attacking_item, /obj/item/crowbar/hydraulic_rescue_tool))
+ if(((stat & NOPOWER) || (stat & BROKEN)) && !src.operating)
+ force_toggle()
+ else
+ to_chat(usr, SPAN_NOTICE("[src]'s motors resist your effort."))
+
+ return TRUE
+
if(istype(attacking_item, /obj/item/stack/material) && attacking_item.get_material_name() == "plasteel")
var/amt = Ceiling((maxhealth - health)/150)
if(!amt)
diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm
index a17dcc858ec..1456da0ca43 100644
--- a/code/game/machinery/nuclear_bomb.dm
+++ b/code/game/machinery/nuclear_bomb.dm
@@ -351,11 +351,12 @@ var/bomb_set
else
off_station = 2
- if(SSticker.mode && SSticker.mode.name == "Mercenary")
+ if(istype(SSticker.mode, /datum/game_mode/nuclear))
+ var/datum/game_mode/nuclear/merc_current_mode = SSticker.mode
var/obj/machinery/computer/shuttle_control/multi/antag/syndicate/syndie_location = locate(/obj/machinery/computer/shuttle_control/multi/antag/syndicate)
if(syndie_location)
- SSticker.mode:syndies_didnt_escape = isNotAdminLevel(syndie_location.z)
- SSticker.mode:nuke_off_station = off_station
+ merc_current_mode.syndies_didnt_escape = isNotAdminLevel(syndie_location.z)
+ merc_current_mode.nuke_off_station = off_station
SSticker.station_explosion_cinematic(off_station, null, GetConnectedZlevels(z))
if(SSticker.mode)
diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm
index dd8de7c71f0..b7867587bf7 100644
--- a/code/game/machinery/overview.dm
+++ b/code/game/machinery/overview.dm
@@ -98,7 +98,8 @@
colour2 = rgb(255,128,0)
if(istype(AM, /mob))
- if(AM:client)
+ var/mob/a_mob = AM
+ if(a_mob.client)
colour = rgb(255,0,0)
else
colour = rgb(255,128,128)
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index f1b14faa12c..3e50f96dd26 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -206,12 +206,12 @@ steam.start() -- spawns the effect
for(var/mob/living/carbon/M in get_turf(src))
affect(M)
-/obj/effect/effect/smoke/sleepy/affect(mob/living/carbon/M as mob )
+/obj/effect/effect/smoke/sleepy/affect(mob/living/carbon/M)
if (!..())
return 0
M.drop_item()
- M:sleeping += 1
+ M.sleeping += 1
if (M.coughedtime != 1)
M.coughedtime = 1
M.emote("cough")
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 8c46a1edcb4..e2d82b21a36 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -141,7 +141,7 @@
log_attack("[s] ([H.ckey])")
if(O.take_damage(3, 0, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE, used_weapon = "teeth marks"))
- H:UpdateDamageIcon()
+ H.UpdateDamageIcon()
last_chew = world.time
diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm
index 53233afe922..ce40310ab30 100644
--- a/code/game/objects/items/weapons/storage/fancy.dm
+++ b/code/game/objects/items/weapons/storage/fancy.dm
@@ -229,7 +229,7 @@
/obj/item/storage/box/fancy/crayons/attackby(obj/item/attacking_item, mob/user)
if(istype(attacking_item, /obj/item/pen/crayon))
var/obj/item/pen/crayon/W = attacking_item
- switch(W:colourName)
+ switch(W.colourName)
if("mime")
to_chat(usr, "This crayon is too sad to be contained in this box.")
return
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 8ef997e095f..f81554baa04 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -254,7 +254,8 @@
for(var/obj/item/gift/G in src)
. += G.gift
if (istype(G.gift, /obj/item/storage))
- . += G.gift:return_inv()
+ var/obj/item/storage/gift_storage = G.gift
+ . += gift_storage.return_inv()
/obj/item/storage/proc/show_to(mob/user as mob)
if(user.s_active != src)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
index 24acde2acc2..d741c2fbf63 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
@@ -40,7 +40,8 @@
/obj/structure/closet/secure_closet/personal/attackby(obj/item/attacking_item, mob/user)
if (opened)
if (istype(attacking_item, /obj/item/grab))
- mouse_drop_receive(attacking_item:affecting, user) //act like they were dragged onto the closet
+ var/obj/item/grab/G = attacking_item
+ mouse_drop_receive(G.affecting, user) //act like they were dragged onto the closet
if(attacking_item)
user.drop_from_inventory(attacking_item,loc)
else
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index 7b27c92fe79..35e36c70a94 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -167,7 +167,7 @@
src.name = "Anchored Windoor Assembly"
//Adding airlock electronics for access. Step 6 complete.
- else if(istype(attacking_item, /obj/item/airlock_electronics) && attacking_item:icon_state != "door_electronics_smoked")
+ else if(istype(attacking_item, /obj/item/airlock_electronics) && attacking_item.icon_state != "door_electronics_smoked")
var/obj/item/airlock_electronics/EL = attacking_item
if(!EL.is_installed)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
diff --git a/code/game/turfs/turf_flick_animations.dm b/code/game/turfs/turf_flick_animations.dm
index 520c2b5041a..cd65cc5f75a 100644
--- a/code/game/turfs/turf_flick_animations.dm
+++ b/code/game/turfs/turf_flick_animations.dm
@@ -1,4 +1,4 @@
-/proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
+/proc/anim(turf/location as turf, atom/target as mob|obj,a_icon,a_icon_state as text,flick_anim as text,sleeptime = 0,direction as num)
SHOULD_NOT_SLEEP(TRUE)
//This proc throws up either an icon or an animation for a specified amount of time.
//The variables should be apparent enough.
@@ -10,7 +10,7 @@
if(direction)
animation.set_dir(direction)
animation.icon = a_icon
- animation.layer = target:layer+1
+ animation.layer = target.layer+1
if(a_icon_state)
animation.icon_state = a_icon_state
else
diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm
index 81026ba0eff..1c1d0a57c41 100644
--- a/code/modules/admin/DB ban/functions.dm
+++ b/code/modules/admin/DB ban/functions.dm
@@ -71,9 +71,10 @@
var/a_ip
if(holder && holder.owner && istype(holder.owner, /client))
- a_ckey = holder.owner:ckey
- a_computerid = holder.owner:computer_id
- a_ip = holder.owner:address
+ var/client/owner_client = holder.owner
+ a_ckey = owner_client.ckey
+ a_computerid = owner_client.computer_id
+ a_ip = owner_client.address
else
a_ckey = "Adminbot"
a_computerid = ""
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index 153d526f82b..1b67525194e 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -202,11 +202,11 @@
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
- var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
+ var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
if(!selection)
to_chat(src, "No keys found.")
return
- var/mob/M = selection:mob
+ var/mob/M = selection.mob
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
usr.on_mob_jump()
@@ -242,10 +242,10 @@
var/list/keys = list()
for(var/mob/M in GLOB.player_list)
keys += M.client
- var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
+ var/client/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in sortKey(keys)
if(!selection)
return
- var/mob/M = selection:mob
+ var/mob/M = selection.mob
if(!M)
return
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index b3ab6e5e1a0..0adb05a3834 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -72,9 +72,9 @@
alert("Wait until the game starts")
return
if(istype(M, /mob/living/carbon/human))
- log_admin("[key_name(src)] has robotized [M.key].")
- spawn(10)
- M:Robotize()
+ var/mob/living/carbon/human/H = M
+ log_admin("[key_name(src)] has robotized [H.key].")
+ H.Robotize()
else
alert("Invalid mob")
@@ -108,10 +108,10 @@
alert("Wait until the game starts")
return
if(ishuman(M))
- log_and_message_admins("has slimeized [key_name(M)].", user = usr)
- spawn(10)
- M:slimeize()
- feedback_add_details("admin_verb","MKMET") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+ var/mob/living/carbon/human/H = M
+ log_and_message_admins("has slimeized [key_name(H)].", user = usr)
+ H.slimeize()
+ feedback_add_details("admin_verb","MKMET") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
else
alert("Invalid mob")
diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm
index 58cf7337588..eb79ba095b4 100644
--- a/code/modules/admin/verbs/diagnostics.dm
+++ b/code/modules/admin/verbs/diagnostics.dm
@@ -89,9 +89,9 @@
output += " [filter]: ERROR
"
continue
output += " [filter]: [f.len]
"
- for (var/device in f)
+ for (var/obj/device as anything in f)
if (isobj(device))
- output += " [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])
"
+ output += " [device] ([device.x],[device.y],[device.z] in area [get_area(device.loc)])
"
else
output += " [device]
"
diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm
index 35b0707e7f4..5e07fea9118 100644
--- a/code/modules/admin/verbs/massmodvar.dm
+++ b/code/modules/admin/verbs/massmodvar.dm
@@ -122,7 +122,7 @@
if (!istype(O, /atom))
original_name = "[REF(O)] ([O])"
else
- original_name = O:name
+ original_name = O.name
switch(class)
if("restore to default")
diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm
index 5c00a049d44..d77dc74d763 100644
--- a/code/modules/admin/verbs/modifyvariables.dm
+++ b/code/modules/admin/verbs/modifyvariables.dm
@@ -584,7 +584,7 @@ var/list/VVdynamic_lock = list(
if (!istype(O, /atom))
original_name = "[REF(O)] ([O])"
else
- original_name = O:name
+ original_name = O.name
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 96267a384ce..4e8a7a8530c 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -293,7 +293,7 @@ Ccomp's first proc.
G.has_enabled_antagHUD = 2
G.can_reenter_corpse = 1
- G:show_message(SPAN_NOTICE("You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead."), 1)
+ G.show_message(SPAN_NOTICE("You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead."), 1)
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the [GLOB.config.respawn_delay] minute respawn limit")
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the [GLOB.config.respawn_delay] minute respawn limit", 1)
diff --git a/code/modules/atmospherics/components/unary/unary_base.dm b/code/modules/atmospherics/components/unary/unary_base.dm
index 18964334c5f..7f24679fd40 100644
--- a/code/modules/atmospherics/components/unary/unary_base.dm
+++ b/code/modules/atmospherics/components/unary/unary_base.dm
@@ -92,12 +92,15 @@
return null
-/obj/machinery/atmospherics/unary/vent_pump/proc/is_welded() // TODO: refactor welding into unary
- if (welded > 0)
- return 1
- return 0
+/obj/machinery/atmospherics/unary/proc/is_welded()
+ return FALSE
-/obj/machinery/atmospherics/unary/vent_scrubber/proc/is_welded()
+/obj/machinery/atmospherics/unary/vent_pump/is_welded()
if (welded > 0)
- return 1
- return 0
+ return TRUE
+ return FALSE
+
+/obj/machinery/atmospherics/unary/vent_scrubber/is_welded()
+ if (welded > 0)
+ return TRUE
+ return FALSE
diff --git a/code/modules/atmospherics/he_pipes.dm b/code/modules/atmospherics/he_pipes.dm
index f5f52a2ff0f..6e20f4935e4 100644
--- a/code/modules/atmospherics/he_pipes.dm
+++ b/code/modules/atmospherics/he_pipes.dm
@@ -74,10 +74,11 @@
var/energy_to_temp = parent.air.get_thermal_energy_change(lava_temperature)
parent.air.add_thermal_energy(max(min(energy_to_temp, max_energy_change), 0))
- else if(istype(loc, /turf/simulated/))
+ else if(istype(loc, /turf/simulated))
+ var/turf/simulated/simulated_turf = loc
var/environment_temperature = 0
- if(loc:blocks_air)
- environment_temperature = loc:temperature
+ if(simulated_turf.blocks_air)
+ environment_temperature = simulated_turf.temperature
else
var/datum/gas_mixture/environment = loc.return_air()
environment_temperature = environment.temperature
diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm
index 2dda8083f55..65341ae3765 100644
--- a/code/modules/library/lib_machines.dm
+++ b/code/modules/library/lib_machines.dm
@@ -479,6 +479,7 @@
/obj/machinery/bookbinder/attackby(obj/item/attacking_item, mob/user)
if(istype(attacking_item, /obj/item/paper))
+ var/obj/item/paper/paper = attacking_item
if(!anchored)
to_chat(user, SPAN_WARNING("\The [src] must be secured to the floor first!"))
return
@@ -486,7 +487,7 @@
to_chat(user, SPAN_WARNING("You must wait for \the [src] to finish its current operation!"))
return
var/turf/T = get_turf(src)
- user.drop_from_inventory(attacking_item,src)
+ user.drop_from_inventory(paper,src)
user.visible_message(SPAN_NOTICE("\The [user] loads some paper into \the [src]."), SPAN_NOTICE("You load some paper into \the [src]."))
visible_message(SPAN_NOTICE("\The [src] begins to hum as it warms up its printing drums."))
playsound(T, 'sound/bureaucracy/binder.ogg', 75, 1)
@@ -495,16 +496,17 @@
binding = FALSE
if(!anchored)
visible_message(SPAN_WARNING("\The [src] buzzes and flashes an error light."))
- attacking_item.forceMove(T)
+ paper.forceMove(T)
return
visible_message(SPAN_NOTICE("\The [src] whirs as it prints and binds a new book."))
playsound(T, 'sound/bureaucracy/print.ogg', 75, 1)
var/obj/item/book/b = new(T)
- b.dat = attacking_item:info
+ b.dat = paper.info
b.name = "blank book"
b.icon_state = "book[rand(1,7)]"
- qdel(attacking_item)
+ qdel(paper)
return
+
if(attacking_item.iswrench())
attacking_item.play_tool_sound(get_turf(src), 75)
if(anchored)
diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm
index 0db6f22d92d..7bf7c40f7ed 100644
--- a/code/modules/lighting/lighting_source.dm
+++ b/code/modules/lighting/lighting_source.dm
@@ -304,8 +304,12 @@
if (light_angle)
var/ndir
- if (istype(top_atom, /mob) && top_atom:facing_dir)
- ndir = top_atom:facing_dir
+ if(istype(top_atom, /mob) && top_atom:facing_dir)
+ var/mob/mob = top_atom
+ if(mob.facing_dir)
+ ndir = mob.facing_dir
+ else
+ ndir = top_atom.dir
else
ndir = top_atom.dir
diff --git a/code/modules/mapping/swapmaps.dm b/code/modules/mapping/swapmaps.dm
deleted file mode 100644
index 851d9c4a8ca..00000000000
--- a/code/modules/mapping/swapmaps.dm
+++ /dev/null
@@ -1,599 +0,0 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
-
-/*
- SwapMaps library by Lummox JR
- developed for digitalBYOND
- http://www.digitalbyond.org
-
- Version 2.1
-
- The purpose of this library is to make it easy for authors to swap maps
- in and out of their game using savefiles. Swapped-out maps can be
- transferred between worlds for an MMORPG, sent to the client, etc.
- This is facilitated by the use of a special datum and a global list.
-
- Uses of swapmaps:
-
- - Temporary battle arenas
- - House interiors
- - Individual custom player houses
- - Virtually unlimited terrain
- - Sharing maps between servers running different instances of the same game
- - Loading and saving pieces of maps for reusable room templates
- */
-
-/*
- User Interface:
-
- VARS:
-
- swapmaps_iconcache
- An associative list of icon files with names, like
- 'player.dmi' = "player"
- swapmaps_mode
- This must be set at runtime, like in world/New().
-
- SWAPMAPS_SAV 0 (default)
- Uses .sav files for raw /savefile output.
- SWAPMAPS_TEXT 1
- Uses .txt files via ExportText() and ImportText(). These maps
- are easily editable and appear to take up less space in the
- current version of BYOND.
-
- PROCS:
-
- SwapMaps_Find(id)
- Find a map by its id
- SwapMaps_Load(id)
- Load a map by its id
- SwapMaps_Save(id)
- Save a map by its id (calls swapmap.Save())
- SwapMaps_Unload(id)
- Save and unload a map by its id (calls swapmap.Unload())
- SwapMaps_Save_All()
- Save all maps
- SwapMaps_DeleteFile(id)
- Delete a map file
- SwapMaps_CreateFromTemplate(id)
- Create a new map by loading another map to use as a template.
- This map has id==src and will not be saved. To make it savable,
- change id with swapmap.SetID(newid).
- SwapMaps_LoadChunk(id,turf/locorner)
- Load a swapmap as a "chunk", at a specific place. A new datum is
- created but it's not added to the list of maps to save or unload.
- The new datum can be safely deleted without affecting the turfs
- it loaded. The purpose of this is to load a map file onto part of
- another swapmap or an existing part of the world.
- locorner is the corner turf with the lowest x,y,z values.
- SwapMaps_SaveChunk(id,turf/corner1,turf/corner2)
- Save a piece of the world as a "chunk". A new datum is created
- for the chunk, but it can be deleted without destroying any turfs.
- The chunk file can be reloaded as a swapmap all its own, or loaded
- via SwapMaps_LoadChunk() to become part of another map.
- SwapMaps_GetSize(id)
- Return a list corresponding to the x,y,z sizes of a map file,
- without loading the map.
- Returns null if the map is not found.
- SwapMaps_AddIconToCache(name,icon)
- Cache an icon file by name for space-saving storage
-
- swapmap.New(id,x,y,z)
- Create a new map; specify id, width (x), height (y), and depth (z)
- Default size is world.maxx,world.maxy,1
-
- swapmap.New(id,turf1,turf2)
- Create a new map; specify id and 2 corners
- This becomes a /swapmap for one of the compiled-in maps, for easy saving.
-
- swapmap.New()
- Create a new map datum, but does not allocate space or assign an ID (used for loading).
-
- swapmap.Del()
- Deletes a map but does not save
- swapmap.Save()
- Saves to map_[id].sav
- Maps with id==src are not saved.
- swapmap.Unload()
- Saves the map and then deletes it
- Maps with id==src are not saved.
- swapmap.SetID(id)
- Change the map's id and make changes to the lookup list
- swapmap.AllTurfs(z)
- Returns a block of turfs encompassing the entire map, or on just one z-level
- z is in world coordinates; it is optional
-
- swapmap.Contains(turf/T)
- Returns nonzero if T is inside the map's boundaries.
- Also works for objs and mobs, but the proc is not area-safe.
- swapmap.InUse()
- Returns nonzero if a mob with a key is within the map's boundaries.
-
- swapmap.LoCorner(z=z1)
- Returns locate(x1,y1,z), where z=z1 if none is specified.
- swapmap.HiCorner(z=z2)
- Returns locate(x2,y2,z), where z=z2 if none is specified.
- swapmap.BuildFilledRectangle(turf/corner1,turf/corner2,item)
- Builds a filled rectangle of item from one corner turf to the other, on multiple z-levels if necessary. The corners may be specified in any order.
- item is a type path like /turf/wall or /obj/barrel{full=1}.
-
- swapmap.BuildRectangle(turf/corner1,turf/corner2,item)
- Builds an unfilled rectangle of item from one corner turf to the other, on multiple z-levels if necessary.
-
- swapmap.BuildInTurfs(list/turfs,item)
- Builds item on all of the turfs listed. The list need not contain only turfs, or even only atoms.
- */
-
-/swapmap
- var/id // a string identifying this map uniquely
- var/x1 // minimum x,y,z coords
- var/y1
- var/z1
- var/x2 // maximum x,y,z coords (also used as width,height,depth until positioned)
- var/y2
- var/z2
- var/tmp/locked // don't move anyone to this map; it's saving or loading
- var/tmp/mode // save as text-mode
- var/ischunk // tells the load routine to load to the specified location
-
-/swapmap/New(_id,x,y,z)
- if(isnull(_id)) return
- id=_id
- mode=swapmaps_mode
- if(isturf(x) && isturf(y))
- /*
- Special format: Defines a map as an existing set of turfs;
- this is useful for saving a compiled map in swapmap format.
- Because this is a compiled-in map, its turfs are not deleted
- when the datum is deleted.
- */
- x1=min(x:x,y:x);x2=max(x:x,y:x)
- y1=min(x:y,y:y);y2=max(x:y,y:y)
- z1=min(x:z,y:z);z2=max(x:z,y:z)
- InitializeSwapMaps()
- if(z2>swapmaps_compiled_maxz ||\
- y2>swapmaps_compiled_maxy ||\
- x2>swapmaps_compiled_maxx)
- qdel(src)
- return
- x2=x?(x):world.maxx
- y2=y?(y):world.maxy
- z2=z?(z):1
- AllocateSwapMap()
-
-/swapmap/Del()
- // a temporary datum for a chunk can be deleted outright
- // for others, some cleanup is necessary
- if(!ischunk)
- swapmaps_loaded-=src
- swapmaps_byname-=id
- if(z2>swapmaps_compiled_maxz ||\
- y2>swapmaps_compiled_maxy ||\
- x2>swapmaps_compiled_maxx)
- var/list/areas=new
- for(var/atom/A in block(locate(x1,y1,z1),locate(x2,y2,z2)))
- for(var/obj/O in A) qdel(O)
- for(var/mob/M in A)
- if(!M.key) qdel(M)
- else M.loc=null
- areas[A.loc]=null
- qdel(A)
- // delete areas that belong only to this map
- for(var/area/a in areas)
- if(a && !a.contents.len) qdel(a)
- if(x2>=world.maxx || y2>=world.maxy || z2>=world.maxz) CutXYZ()
- qdel(areas)
- ..()
-
-/swapmap/Read(savefile/S,_id,turf/locorner)
- var/x
- var/y
- var/z
- var/n
- var/list/areas
- var/area/defarea=locate(world.area)
- id=_id
- if(locorner)
- ischunk=1
- x1=locorner.x
- y1=locorner.y
- z1=locorner.z
- if(!defarea) defarea=new world.area
- if(!_id)
- S["id"] >> id
- else
- var/dummy
- S["id"] >> dummy
- S["z"] >> z2 // these are depth,
- S["y"] >> y2 // height,
- S["x"] >> x2 // width
- S["areas"] >> areas
- locked=1
- AllocateSwapMap() // adjust x1,y1,z1 - x2,y2,z2 coords
- var/oldcd=S.cd
- for(z=z1,z<=z2,++z)
- S.cd="[z-z1+1]"
- for(y=y1,y<=y2,++y)
- S.cd="[y-y1+1]"
- for(x=x1,x<=x2,++x)
- S.cd="[x-x1+1]"
- var/tp
- S["type"]>>tp
- var/turf/T=locate(x,y,z)
- T.loc.contents-=T
- T=new tp(locate(x,y,z))
- if("AREA" in S.dir)
- S["AREA"]>>n
- var/area/A=areas[n]
- A.contents+=T
- else defarea.contents+=T
- // clear the turf
- for(var/obj/O in T) qdel(O)
- for(var/mob/M in T)
- if(!M.key) qdel(M)
- else M.loc=null
- // finish the read
- T.Read(S)
- S.cd=".."
- S.cd=".."
- sleep()
- S.cd=oldcd
- locked=0
- qdel(areas)
-
- /*
- Find an empty block on the world map in which to load this map.
- If no space is found, increase world.maxz as necessary. (If the
- map is greater in x,y size than the current world, expand
- world.maxx and world.maxy too.)
-
- Ignore certain operations if loading a map as a chunk. Use the
- x1,y1,z1 position for it, and *don't* count it as a loaded map.
- */
-/swapmap/proc/AllocateSwapMap()
- InitializeSwapMaps()
- world.maxx=max(x2,world.maxx) // stretch x/y if necessary
- world.maxy=max(y2,world.maxy)
- if(!ischunk)
- if(world.maxz<=swapmaps_compiled_maxz)
- z1=swapmaps_compiled_maxz+1
- x1=1;y1=1
- else
- var/list/l=ConsiderRegion(1,1,world.maxx,world.maxy,swapmaps_compiled_maxz+1)
- x1=l[1]
- y1=l[2]
- z1=l[3]
- qdel(l)
- x2+=x1-1
- y2+=y1-1
- z2+=z1-1
- if(z2 > world.maxz)
- world.maxz = z2 // stretch z if necessary
- SEND_GLOBAL_SIGNAL(COMSIG_GLOB_NEW_Z, world.maxz)
- if(!ischunk)
- swapmaps_loaded[src]=null
- swapmaps_byname[id]=src
-
-/swapmap/proc/ConsiderRegion(X1,Y1,X2,Y2,Z1,Z2)
- while(1)
- var/nextz=0
- var/swapmap/M
- for(M in swapmaps_loaded)
- if(M.z2Z2) || M.z1>=Z1+z2 ||\
- M.x1>X2 || M.x2=X1+x2 ||\
- M.y1>Y2 || M.y2=Y1+y2) continue
- // look for sub-regions with a defined ceiling
- var/nz2=Z2?(Z2):Z1+z2-1+M.z2-M.z1
- if(M.x1>=X1+x2)
- .=ConsiderRegion(X1,Y1,M.x1-1,Y2,Z1,nz2)
- if(.) return
- else if(M.x2<=X2-x2)
- .=ConsiderRegion(M.x2+1,Y1,X2,Y2,Z1,nz2)
- if(.) return
- if(M.y1>=Y1+y2)
- .=ConsiderRegion(X1,Y1,X2,M.y1-1,Z1,nz2)
- if(.) return
- else if(M.y2<=Y2-y2)
- .=ConsiderRegion(X1,M.y2+1,X2,Y2,Z1,nz2)
- if(.) return
- nextz=nextz?min(nextz,M.z2+1):(M.z2+1)
- if(!M)
- /* If nextz is not 0, then at some point there was an overlap that
- could not be resolved by using an area to the side */
- if(nextz) Z1=nextz
- if(!nextz || (Z2 && Z2-Z1+1=z2)?list(X1,Y1,Z1):null
- X1=1;X2=world.maxx
- Y1=1;Y2=world.maxy
-
-/swapmap/proc/CutXYZ()
- var/mx=swapmaps_compiled_maxx
- var/my=swapmaps_compiled_maxy
- var/mz=swapmaps_compiled_maxz
- for(var/swapmap/M in swapmaps_loaded) // may not include src
- mx=max(mx,M.x2)
- my=max(my,M.y2)
- mz=max(mz,M.z2)
- world.maxx=mx
- world.maxy=my
- world.maxz=mz
-
-// save and delete
-/swapmap/proc/Unload()
- Save()
- qdel(src)
-
-/swapmap/proc/Save()
- if(id==src) return 0
- var/savefile/S=mode?(new):new("map_[id].sav")
- to_chat(S, src)
- while(locked) sleep(1)
- if(mode)
- fdel("map_[id].txt")
- S.ExportText("/","map_[id].txt")
- return 1
-
-// this will not delete existing savefiles for this map
-/swapmap/proc/SetID(newid)
- swapmaps_byname-=id
- id=newid
- swapmaps_byname[id]=src
-
-/swapmap/proc/AllTurfs(z)
- if(isnum(z) && (zz2)) return null
- return block(LoCorner(z),HiCorner(z))
-
-// this could be safely called for an obj or mob as well, but
-// probably not an area
-/swapmap/proc/Contains(turf/T)
- return (T && T.x>=x1 && T.x<=x2\
- && T.y>=y1 && T.y<=y2\
- && T.z>=z1 && T.z<=z2)
-
-/swapmap/proc/InUse()
- for(var/turf/T in AllTurfs())
- for(var/mob/M in T) if(M.key) return 1
-
-/swapmap/proc/LoCorner(z=z1)
- return locate(x1,y1,z)
-
-/swapmap/proc/HiCorner(z=z2)
- return locate(x2,y2,z)
-
-
-// Build procs: Take 2 turfs as corners, plus an item type.
-// An item may be like:
-//
-// /turf/wall
-// /obj/fence{icon_state="iron"}
-/swapmap/proc/BuildFilledRectangle(turf/T1,turf/T2,item)
- if(!Contains(T1) || !Contains(T2)) return
- var/turf/T=T1
- // pick new corners in a block()-friendly form
- T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
- T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
- for(T in block(T1,T2)) new item(T)
-
-/swapmap/proc/BuildRectangle(turf/T1,turf/T2,item)
- if(!Contains(T1) || !Contains(T2)) return
- var/turf/T=T1
- // pick new corners in a block()-friendly form
- T1=locate(min(T1.x,T2.x),min(T1.y,T2.y),min(T1.z,T2.z))
- T2=locate(max(T.x,T2.x),max(T.y,T2.y),max(T.z,T2.z))
- if(T2.x-T1.x<2 || T2.y-T1.y<2) BuildFilledRectangle(T1,T2,item)
- else
- //for(T in block(T1,T2)-block(locate(T1.x+1,T1.y+1,T1.z),locate(T2.x-1,T2.y-1,T2.z)))
- for(T in block(T1,locate(T2.x,T1.y,T2.z))) new item(T)
- for(T in block(locate(T1.x,T2.y,T1.z),T2)) new item(T)
- for(T in block(locate(T1.x,T1.y+1,T1.z),locate(T1.x,T2.y-1,T2.z))) new item(T)
- for(T in block(locate(T2.x,T1.y+1,T1.z),locate(T2.x,T2.y-1,T2.z))) new item(T)
-
-/*
- Supplementary build proc: Takes a list of turfs, plus an item
- type. Actually the list doesn't have to be just turfs.
-*/
-/swapmap/proc/BuildInTurfs(list/turfs,item)
- for(var/T in turfs) new item(T)
-
-/atom/Read(savefile/S)
- var/list/l
- if(contents.len) l=contents
- ..()
- // if the icon was a text string, it would not have loaded properly
- // replace it from the cache list
- if(!icon && ("icon" in S.dir))
- var/ic
- S["icon"]>>ic
- if(istext(ic)) icon=swapmaps_iconcache[ic]
- if(l && contents!=l)
- contents+=l
- qdel(l)
-
-
-// set this up (at runtime) as follows:
-// list(
-// 'player.dmi'="player",
-// 'monster.dmi'="monster",
-// ...
-// 'item.dmi'="item")
-var/list/swapmaps_iconcache
-
-// preferred mode; sav or text
-var/const/SWAPMAPS_SAV=0
-var/const/SWAPMAPS_TEXT=1
-var/swapmaps_mode=SWAPMAPS_SAV
-
-var/swapmaps_compiled_maxx
-var/swapmaps_compiled_maxy
-var/swapmaps_compiled_maxz
-var/swapmaps_initialized
-var/swapmaps_loaded
-var/swapmaps_byname
-
-/proc/InitializeSwapMaps()
- if(swapmaps_initialized) return
- swapmaps_initialized=1
- swapmaps_compiled_maxx=world.maxx
- swapmaps_compiled_maxy=world.maxy
- swapmaps_compiled_maxz=world.maxz
- swapmaps_loaded=list()
- swapmaps_byname=list()
- if(swapmaps_iconcache)
- for(var/V in swapmaps_iconcache)
- // reverse-associate everything
- // so you can look up an icon file by name or vice-versa
- swapmaps_iconcache[swapmaps_iconcache[V]]=V
-
-/proc/SwapMaps_AddIconToCache(name,icon)
- if(!swapmaps_iconcache) swapmaps_iconcache=list()
- swapmaps_iconcache[name]=icon
- swapmaps_iconcache[icon]=name
-
-/proc/SwapMaps_Find(id)
- InitializeSwapMaps()
- return swapmaps_byname[id]
-
-/proc/SwapMaps_Load(id)
- InitializeSwapMaps()
- var/swapmap/M=swapmaps_byname[id]
- if(!M)
- var/savefile/S
- var/text=0
- if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt"))
- text=1
- else if(fexists("map_[id].sav"))
- S=new("map_[id].sav")
- else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[id].txt"))
- text=1
- else return // no file found
- if(text)
- S=new
- S.ImportText("/",file("map_[id].txt"))
- S >> M
- while(M.locked) sleep(1)
- M.mode=text
- return M
-
-/proc/SwapMaps_Save(id)
- InitializeSwapMaps()
- var/swapmap/M=swapmaps_byname[id]
- if(M) M.Save()
- return M
-
-/proc/SwapMaps_Save_All()
- InitializeSwapMaps()
- for(var/swapmap/M in swapmaps_loaded)
- if(M) M.Save()
-
-/proc/SwapMaps_Unload(id)
- InitializeSwapMaps()
- var/swapmap/M=swapmaps_byname[id]
- if(!M) return // return silently from an error
- M.Unload()
- return 1
-
-/proc/SwapMaps_DeleteFile(id)
- fdel("map_[id].sav")
- fdel("map_[id].txt")
-
-/proc/SwapMaps_CreateFromTemplate(template_id)
- var/swapmap/M=new
- var/savefile/S
- var/text=0
- if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[template_id].txt"))
- text=1
- else if(fexists("map_[template_id].sav"))
- S=new("map_[template_id].sav")
- else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[template_id].txt"))
- text=1
- else
- world.log << "SwapMaps error in SwapMaps_CreateFromTemplate(): map_[template_id] file not found."
- return
- if(text)
- S=new
- S.ImportText("/",file("map_[template_id].txt"))
- /*
- This hacky workaround is needed because S >> M will create a brand new
- M to fill with data. There's no way to control the Read() process
- properly otherwise. The //.0 path should always match the map, however.
- */
- S.cd="//.0"
- M.Read(S,M)
- M.mode=text
- while(M.locked) sleep(1)
- return M
-
-/proc/SwapMaps_LoadChunk(chunk_id,turf/locorner)
- var/swapmap/M=new
- var/savefile/S
- var/text=0
- if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[chunk_id].txt"))
- text=1
- else if(fexists("map_[chunk_id].sav"))
- S=new("map_[chunk_id].sav")
- else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[chunk_id].txt"))
- text=1
- else
- world.log << "SwapMaps error in SwapMaps_LoadChunk(): map_[chunk_id] file not found."
- return
- if(text)
- S=new
- S.ImportText("/",file("map_[chunk_id].txt"))
- /*
- This hacky workaround is needed because S >> M will create a brand new
- M to fill with data. There's no way to control the Read() process
- properly otherwise. The //.0 path should always match the map, however.
- */
- S.cd="//.0"
- M.Read(S,M,locorner)
- while(M.locked) sleep(1)
- qdel(M)
- return 1
-
-/proc/SwapMaps_SaveChunk(chunk_id,turf/corner1,turf/corner2)
- if(!corner1 || !corner2)
- world.log << "SwapMaps error in SwapMaps_SaveChunk():"
- if(!corner1) world.log << " corner1 turf is null"
- if(!corner2) world.log << " corner2 turf is null"
- return
- var/swapmap/M=new
- M.id=chunk_id
- M.ischunk=1 // this is a chunk
- M.x1=min(corner1.x,corner2.x)
- M.y1=min(corner1.y,corner2.y)
- M.z1=min(corner1.z,corner2.z)
- M.x2=max(corner1.x,corner2.x)
- M.y2=max(corner1.y,corner2.y)
- M.z2=max(corner1.z,corner2.z)
- M.mode=swapmaps_mode
- M.Save()
- while(M.locked) sleep(1)
- qdel(M)
- return 1
-
-/proc/SwapMaps_GetSize(id)
- var/savefile/S
- var/text=0
- if(swapmaps_mode==SWAPMAPS_TEXT && fexists("map_[id].txt"))
- text=1
- else if(fexists("map_[id].sav"))
- S=new("map_[id].sav")
- else if(swapmaps_mode!=SWAPMAPS_TEXT && fexists("map_[id].txt"))
- text=1
- else
- world.log << "SwapMaps error in SwapMaps_GetSize(): map_[id] file not found."
- return
- if(text)
- S=new
- S.ImportText("/",file("map_[id].txt"))
- /*
- The //.0 path should always be the map. There's no other way to
- read this data.
- */
- S.cd="//.0"
- var/x
- var/y
- var/z
- S["x"] >> x
- S["y"] >> y
- S["z"] >> z
- return list(x,y,z)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 89d08324045..28c9767c3a9 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -262,9 +262,10 @@
if((isskeleton(H)) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else
- if (istype(src,/mob/living/carbon/human) && src:w_uniform)
+ if (istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/H = src
- H.w_uniform.add_fingerprint(M)
+ if(H.w_uniform)
+ H.w_uniform.add_fingerprint(M)
var/show_ssd
var/mob/living/carbon/human/H
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 7e70d5b9ddd..e429267a418 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -506,7 +506,9 @@ This saves us from having to call add_fingerprint() any time something is put in
if (lying || !shoes || !istype(shoes, /obj/item/clothing/shoes))
return
- if (shoes:silent)
+ var/obj/item/clothing/shoes/clothing_shoes = shoes
+
+ if (clothing_shoes.silent)
return
is_noisy = TRUE
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index c9431870be0..b43b9af96a7 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -163,10 +163,12 @@ default behaviour is:
return
step(AM, t)
- if(ishuman(AM) && AM:grabbed_by)
- for(var/obj/item/grab/G in AM:grabbed_by)
- step(G:assailant, get_dir(G:assailant, AM))
- G.adjust_position()
+ if(ishuman(AM))
+ var/mob/living/carbon/human/H = AM
+ if(H.grabbed_by)
+ for(var/obj/item/grab/G in H.grabbed_by)
+ step(G.assailant, get_dir(G.assailant, H))
+ G.adjust_position()
now_pushing = FALSE
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index ffd3c7844d8..13e1f487131 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -119,7 +119,7 @@
switch(PRP)
if (1) to_chat(src, "Unable to locate APC!")
else to_chat(src, "Lost connection with the APC!")
- src:ai_restore_power_routine = 2
+ ai_restore_power_routine = 2
return
if (current_area.power_equip)
if (!istype(T, /turf/space))
diff --git a/code/modules/mob/living/silicon/pai/emote.dm b/code/modules/mob/living/silicon/pai/emote.dm
index 7d4f6e08504..45821f1fb0b 100644
--- a/code/modules/mob/living/silicon/pai/emote.dm
+++ b/code/modules/mob/living/silicon/pai/emote.dm
@@ -69,7 +69,7 @@
m_type = 1
if("law")
- if (src:secHUD)
+ if (secHUD)
message = "[src] flashes its legal authorization barcode."
playsound(src.loc, 'sound/voice/biamthelaw.ogg', 50, 0)
m_type = 2
@@ -102,7 +102,7 @@
m_type = 1
if("halt")
- if (src:secHUD)
+ if (secHUD)
message = "[src]'s speakers skreech, \"Halt! Security!\"."
playsound(src.loc, 'sound/voice/halt.ogg', 50, 0)
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index a0125db6f01..a8fc896be96 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -276,11 +276,11 @@
if(I && !(istype(I, /obj/item/cell) || istype(I, /obj/item/device/radio) || istype(I, /obj/machinery/camera) || istype(I, /obj/item/device/mmi)))
client.screen += I
if(module_state_1)
- module_state_1:screen_loc = ui_inv1
+ module_state_1.screen_loc = ui_inv1
if(module_state_2)
- module_state_2:screen_loc = ui_inv2
+ module_state_2.screen_loc = ui_inv2
if(module_state_3)
- module_state_3:screen_loc = ui_inv3
+ module_state_3.screen_loc = ui_inv3
update_icon()
/mob/living/silicon/robot/proc/process_killswitch()
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 2a09761141e..106c1dba895 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -929,19 +929,22 @@
O.hud_layerise()
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
- sight_mode |= module_state_1:sight_mode
+ var/obj/item/borg/sight/sight_module = module_state_3
+ sight_mode |= sight_module.sight_mode
else if(!module_state_2)
module_state_2 = O
O.hud_layerise()
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
- sight_mode |= module_state_2:sight_mode
+ var/obj/item/borg/sight/sight_module = module_state_3
+ sight_mode |= sight_module.sight_mode
else if(!module_state_3)
module_state_3 = O
O.hud_layerise()
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
- sight_mode |= module_state_3:sight_mode
+ var/obj/item/borg/sight/sight_module = module_state_3
+ sight_mode |= sight_module.sight_mode
else
to_chat(src, SPAN_WARNING("You need to disable a module first!"))
installed_modules()
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 3f690255117..fc1e5d68669 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -41,9 +41,11 @@
/proc/ishuman_species(A)
- if(istype(A, /mob/living/carbon/human) && (A:get_species() == SPECIES_HUMAN))
- return 1
- return 0
+ if(istype(A, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = A
+ if(H.get_species() == SPECIES_HUMAN)
+ return TRUE
+ return FALSE
/proc/isoffworlder(A)
if(ishuman(A))
@@ -71,7 +73,8 @@
/proc/istajara(A)
if(istype(A, /mob/living/carbon/human))
- switch(A:get_species())
+ var/mob/living/carbon/human/H = A
+ switch(H.get_species())
if (SPECIES_TAJARA)
return 1
if(SPECIES_TAJARA_ZHAN)
@@ -86,7 +89,8 @@
/proc/isskrell(A)
if(istype(A, /mob/living/carbon/human))
- switch(A:get_species())
+ var/mob/living/carbon/human/H = A
+ switch(H.get_species())
if (SPECIES_SKRELL)
return 1
if (SPECIES_SKRELL_AXIORI)
@@ -97,7 +101,8 @@
/proc/isvaurca(A, var/isbreeder = FALSE)
if(istype(A, /mob/living/carbon/human))
- switch(A:get_species())
+ var/mob/living/carbon/human/H = A
+ switch(H.get_species())
if(SPECIES_VAURCA_WORKER)
if(isbreeder)
return FALSE
@@ -151,9 +156,11 @@
return FALSE
/proc/isskeleton(A)
- if(istype(A, /mob/living/carbon/human) && (A:get_species() == SPECIES_SKELETON))
- return 1
- return 0
+ if(istype(A, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = A
+ if(H.get_species() == SPECIES_SKELETON)
+ return TRUE
+ return FALSE
/proc/iszombie(A)
if(ishuman(A))
@@ -188,7 +195,8 @@
/proc/islesserform(A)
if(istype(A, /mob/living/carbon/human))
- switch(A:get_species())
+ var/mob/living/carbon/human/H = A
+ switch(H.get_species())
if (SPECIES_MONKEY)
return 1
if (SPECIES_MONKEY_TAJARA)
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index 580bb32a9c8..4a428e6bffc 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -93,7 +93,8 @@
/client/verb/swap_hand()
set hidden = 1
if(istype(mob, /mob/living/carbon))
- mob:swap_hand()
+ var/mob/living/carbon/C = mob
+ C.swap_hand()
if(istype(mob,/mob/living/silicon/robot))
var/mob/living/silicon/robot/R = mob
R.cycle_modules()
@@ -112,8 +113,11 @@
set hidden = 1
if(!istype(mob, /mob/living/carbon))
return
- if (!mob.stat && isturf(mob.loc) && !mob.restrained())
- mob:toggle_throw_mode()
+
+ var/mob/living/carbon/C = mob
+
+ if (!C.stat && isturf(C.loc) && !C.restrained())
+ C.toggle_throw_mode()
else
return
diff --git a/code/modules/multiz/zmimic/mimic_movable.dm b/code/modules/multiz/zmimic/mimic_movable.dm
index c68d0e6fdeb..cf0032c2581 100644
--- a/code/modules/multiz/zmimic/mimic_movable.dm
+++ b/code/modules/multiz/zmimic/mimic_movable.dm
@@ -203,7 +203,8 @@
/atom/movable/openspace/turf_mimic/Initialize(mapload, ...)
. = ..()
ASSERT(isturf(loc))
- delegate = loc:below
+ var/turf/T = loc
+ delegate = T.below
/atom/movable/openspace/turf_mimic/attackby(obj/item/attacking_item, mob/user)
loc.attackby(attacking_item, user)
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index d63c0ca3d62..f7dc3bb2a58 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -210,9 +210,9 @@ var/global/photo_count = 0
holding = "They are holding \a [A.r_hand]"
if(!mob_detail)
- mob_detail = "You can see [A] in the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]. "
+ mob_detail = "You can see [A] in the photo[A.health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]. "
else
- mob_detail += "You can also see [A] in the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]."
+ mob_detail += "You can also see [A] in the photo[A.health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]."
return mob_detail
/obj/item/device/camera/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
diff --git a/code/modules/power/singularity/particle_accelerator/particle.dm b/code/modules/power/singularity/particle_accelerator/particle.dm
index c7a29ad485b..e74844b84d4 100644
--- a/code/modules/power/singularity/particle_accelerator/particle.dm
+++ b/code/modules/power/singularity/particle_accelerator/particle.dm
@@ -46,8 +46,9 @@
if (A)
if(ismob(A))
toxmob(A)
- if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/)))
- A:energy += energy
+ if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity)))
+ var/obj/singularity/singulo = A
+ singulo.energy += energy
else if(istype(A, /obj/machinery/power/fusion_core))
var/obj/machinery/power/fusion_core/collided_core = A
if(particle_type && particle_type != "neutron")
diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm
index 69b3000d567..473fd135e0c 100644
--- a/code/modules/reagents/Chemistry-Machinery.dm
+++ b/code/modules/reagents/Chemistry-Machinery.dm
@@ -123,7 +123,7 @@
// Process the beaker
if(beaker)
- var/datum/reagents/beaker_reagents = beaker:reagents
+ var/datum/reagents/beaker_reagents = beaker.reagents
for(var/reagent in beaker_reagents.reagent_volumes)
var/singleton/reagent/reagent_singleton = GET_SINGLETON(reagent)
@@ -199,7 +199,7 @@
// These actions makes sense only if there's a beaker in
if(beaker)
if(action == "analyze")
- var/datum/reagents/R = beaker:reagents
+ var/datum/reagents/R = beaker.reagents
if(!condi)
if(params["name"] == "Blood")
var/singleton/reagent/blood/G = GET_SINGLETON(/singleton/reagent/blood)
diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm
index 53b693e8012..fe29cfb28c7 100644
--- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm
+++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm
@@ -141,7 +141,7 @@
var/hotspot = (locate(/obj/fire) in T)
if(hotspot && !istype(T, /turf/space))
- var/datum/gas_mixture/lowertemp = T.remove_air(T:air:total_moles)
+ var/datum/gas_mixture/lowertemp = T.remove_air(T.air.total_moles)
lowertemp.temperature = max(lowertemp.temperature-2000, lowertemp.temperature / 2, T0C)
lowertemp.react()
T.assume_air(lowertemp)
diff --git a/code/modules/reagents/dispenser/cartridge.dm b/code/modules/reagents/dispenser/cartridge.dm
index e39a08c77e3..a1dec9dc21b 100644
--- a/code/modules/reagents/dispenser/cartridge.dm
+++ b/code/modules/reagents/dispenser/cartridge.dm
@@ -101,9 +101,10 @@
return
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
- target.add_fingerprint(user)
+ var/obj/structure/reagent_dispensers/reagent_dispensers = target
+ reagent_dispensers.add_fingerprint(user)
- if(!target.reagents.total_volume && target.reagents)
+ if(!reagent_dispensers.reagents.total_volume && reagent_dispensers.reagents)
to_chat(user, SPAN_WARNING("\The [target] is empty."))
return
@@ -111,7 +112,7 @@
to_chat(user, SPAN_WARNING("\The [src] is full."))
return
- var/trans = target.reagents.trans_to(src, target:amount_per_transfer_from_this)
+ var/trans = reagent_dispensers.reagents.trans_to(src, reagent_dispensers.amount_per_transfer_from_this)
to_chat(user, SPAN_NOTICE("You fill \the [src] with [trans] units of the contents of \the [target]."))
else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it.
diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm
index ae6e2ec37d3..8e35597a4f7 100644
--- a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm
+++ b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm
@@ -173,9 +173,11 @@
/obj/machinery/artifact/attack_hand(mob/user)
if(use_check_and_message(user, USE_ALLOW_NON_ADV_TOOL_USR))
return
- if(ishuman(user) && user:gloves)
- to_chat(user, "You touch \the [src] with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].")
- return
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ if(H.gloves)
+ to_chat(user, "You touch \the [src] with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].")
+ return
src.add_fingerprint(user)
diff --git a/code/modules/research/xenoarchaeology/finds/finds.dm b/code/modules/research/xenoarchaeology/finds/finds.dm
index 76550ae7a85..c9d3f3fc0e1 100644
--- a/code/modules/research/xenoarchaeology/finds/finds.dm
+++ b/code/modules/research/xenoarchaeology/finds/finds.dm
@@ -251,8 +251,9 @@
possible_spawns += /obj/item/stack/material/silver
var/new_type = pick(possible_spawns)
- new_item = new new_type(src.loc)
- new_item:amount = rand(5,45)
+ var/obj/item/stack/material/new_mat_stack = new new_type(src.loc)
+ new_mat_stack.amount = rand(5,45)
+ new_item = new_mat_stack
if(15)
if(prob(75))
new_item = new /obj/item/pen(src.loc)
diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm
index 0f3a116ea97..5506b6b91b8 100644
--- a/code/modules/surgery/other.dm
+++ b/code/modules/surgery/other.dm
@@ -42,7 +42,8 @@
affected.status &= ~ORGAN_ARTERY_CUT
affected.update_damages()
if(ishuman(user) && prob(40))
- user:bloody_hands(target, 0)
+ var/mob/living/carbon/human/H = user
+ H.bloody_hands(target, 0)
/singleton/surgery_step/fix_vein/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
diff --git a/code/modules/ventcrawl/ventcrawl.dm b/code/modules/ventcrawl/ventcrawl.dm
index 8340e692663..f70dea89149 100644
--- a/code/modules/ventcrawl/ventcrawl.dm
+++ b/code/modules/ventcrawl/ventcrawl.dm
@@ -151,7 +151,7 @@ var/global/list/can_enter_vent_with = list(
if(vent_found)
break
- if(vent_found:is_welded()) // welded check
+ if(vent_found.is_welded()) // welded check
to_chat(src, SPAN_WARNING("You can't crawl into a welded vent!"))
return
diff --git a/code/modules/ventcrawl/ventcrawl_atmospherics.dm b/code/modules/ventcrawl/ventcrawl_atmospherics.dm
index 89875b2e1c0..ec879507cff 100644
--- a/code/modules/ventcrawl/ventcrawl_atmospherics.dm
+++ b/code/modules/ventcrawl/ventcrawl_atmospherics.dm
@@ -33,14 +33,16 @@
/obj/machinery/atmospherics/proc/ventcrawl_to(var/mob/living/user, var/obj/machinery/atmospherics/target_move, var/direction)
if(target_move)
if(is_type_in_list(target_move, ventcrawl_machinery) && target_move.can_crawl_through())
- if(target_move:is_welded())
+ var/obj/machinery/atmospherics/unary/UA = target_move
+ if(UA.is_welded())
user.visible_message(SPAN_WARNING("You hear something banging on \the [target_move.name]!"), SPAN_NOTICE("You can't escape from a welded vent."))
else
user.remove_ventcrawl()
- user.forceMove(target_move.loc) //handles entering and so on
+ user.forceMove(UA.loc) //handles entering and so on
user.sight &= ~(SEE_TURFS|BLIND)
user.visible_message(SPAN_WARNING("You hear something squeezing through the ducts."), "You climb out the ventilation system.")
- user.vent_trap_check("arriving", target_move)
+ user.vent_trap_check("arriving", UA)
+
else if(target_move.can_crawl_through())
if(target_move.return_network(target_move) != return_network(src))
user.remove_ventcrawl()