Skip to content

Commit 5a72460

Browse files
authored
standardizes for loops to using purely commas rather than comma-semicolon mixes (discordia-space#8627)
spacemanDMM hints moved to top of procs
1 parent bb997f7 commit 5a72460

12 files changed

Lines changed: 18 additions & 18 deletions

File tree

code/controllers/subsystems/chunks.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,14 @@ SUBSYSTEM_DEF(chunks)
217217
RegisterSignal(newContainer, COMSIG_MOVABLE_MOVED, PROC_REF(chunkHearerOnMove))
218218

219219
/obj/proc/chunkHearerClearSelf(datum/source)
220+
SIGNAL_HANDLER
220221
var/atom/container = getContainingAtom()
221222
UnregisterSignal(container, COMSIG_MOVABLE_MOVED)
222223
UnregisterSignal(src, list(COMSIG_ATOM_CONTAINERED, COMSIG_PARENT_QDELETING))
223224
// in this case we never registered
224225
if(container.z != 0)
225226
var/datum/chunk/chunk_reference = SSchunks.chunk_list_by_zlevel[container.z][CHUNKID(container.x, container.y)]
226227
chunk_reference.hearers -= src
227-
SIGNAL_HANDLER
228228

229229

230230
// This is done by the mob itself because keeping track of them with reference solving is trash and unefficient

code/controllers/subsystems/jamming.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SUBSYSTEM_DEF(jamming)
99

1010
/datum/controller/subsystem/jamming/Initialize(start_timeofday)
1111
active_jammers = new /list(world.maxz)
12-
for(var/i = 1, i < world.maxz; i++)
12+
for(var/i = 1, i < world.maxz, i++)
1313
active_jammers[i] = list()
1414
. = ..()
1515

code/datums/components/jamming.dm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
if(!active)
3636
return
3737
var/list/affectedLevels = getAffectedLevels(oldLevel)
38-
for(var/i = affectedLevels[1], i <= affectedLevels[2]; i++)
38+
for(var/i = affectedLevels[1], i <= affectedLevels[2], i++)
3939
SSjamming.active_jammers[i] -= src
4040
affectedLevels = getAffectedLevels(newLevel)
41-
for(var/i = affectedLevels[1], i <= affectedLevels[2]; i++)
41+
for(var/i = affectedLevels[1], i <= affectedLevels[2], i++)
4242
SSjamming.active_jammers[i] += src
4343

4444

@@ -53,7 +53,7 @@
5353
if(active)
5454
var/turf/ownerTurf = get_turf(owner)
5555
var/list/affectedLevels = getAffectedLevels(ownerTurf.z)
56-
for(var/i = affectedLevels[1], i <= affectedLevels[2]; i++)
56+
for(var/i = affectedLevels[1], i <= affectedLevels[2], i++)
5757
SSjamming.active_jammers[i] -= src
5858
owner = null
5959
..()
@@ -62,10 +62,10 @@
6262
var/turf/ownerTurf = get_turf(owner)
6363
var/list/affectedLevels = getAffectedLevels(ownerTurf.z)
6464
if(active)
65-
for(var/i = affectedLevels[1], i <= affectedLevels[2]; i++)
65+
for(var/i = affectedLevels[1], i <= affectedLevels[2], i++)
6666
SSjamming.active_jammers[i] -= src
6767
else
68-
for(var/i = affectedLevels[1], i <= affectedLevels[2]; i++)
68+
for(var/i = affectedLevels[1], i <= affectedLevels[2], i++)
6969
SSjamming.active_jammers[i] += src
7070
active = !active
7171

code/datums/perks/perk.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,17 @@
3636

3737
/// Proc called when the perk is assigned to a human. Should be the first thing to be called.
3838
/datum/perk/proc/assign(mob/living/carbon/human/H)
39+
SHOULD_CALL_PARENT(TRUE)
3940
if(istype(H))
40-
SHOULD_CALL_PARENT(TRUE)
4141
holder = H
4242
RegisterSignal(holder, COMSIG_MOB_LIFE, PROC_REF(on_process))
4343
to_chat(holder, SPAN_NOTICE("[gain_text]"))
4444
return TRUE
4545

4646
/// Proc called when the perk is removed from a human. Obviously, in your perks, you should call parent as the last thing you do, since it deletes the perk itself.
4747
/datum/perk/proc/remove()
48-
UnregisterSignal(holder, COMSIG_MOB_LIFE, PROC_REF(on_process))
4948
SHOULD_CALL_PARENT(TRUE)
49+
UnregisterSignal(holder, COMSIG_MOB_LIFE, PROC_REF(on_process))
5050
qdel(src)
5151

5252
/// Proc called , a bitflag is always expected.

code/game/gamemodes/events/blob.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
log_and_message_admins("Blob spawned at \the [get_area(T)]", location = T)
3939
Blob = new /obj/effect/blob/core(T)
40-
for(var/i = 1; i < rand(3, 4), i++)
40+
for(var/i = 1, i < rand(3, 4), i++)
4141
Blob.Process()
4242

4343
/datum/event/blob/tick()

code/game/machinery/camera/camera.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
/atom/proc/auto_turn()
379379
//Automatically turns based on nearby walls.
380380
var/turf/wall/T = null
381-
for(var/i = 1, i <= 8; i += i)
381+
for(var/i = 1, i <= 8, i += i)
382382
T = get_ranged_target_turf(src, i, 1)
383383
if(istype(T))
384384
//If someone knows a better way to do this, let me know. -Giacom

code/game/objects/items/stacks/stack.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
9696
recipe_list = srl.recipes
9797
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.get_amount())
98-
for(var/i=1;i<=recipe_list.len,i++)
98+
for(var/i=1,i<=recipe_list.len,i++)
9999
var/E = recipe_list[i]
100100
if (isnull(E))
101101
t1 += "<hr>"

code/modules/dungeons/asteroid.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@
239239

240240
var/datum/rogue/asteroid/A = new(rand(core_min,core_max))
241241

242-
for(var/x = 1; x <= A.coresize, x++)
243-
for(var/y = 1; y <= A.coresize, y++)
242+
for(var/x = 1, x <= A.coresize, x++)
243+
for(var/y = 1, y <= A.coresize, y++)
244244
A.spot_add(A.coresize+x, A.coresize+y, A.type_wall)
245245

246246

code/modules/mob/animations.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ note dizziness decrements automatically in the mob's Life() proc.
234234
aiEyeFlag = 1
235235

236236
var/x
237-
for(x=0; x<duration, x++)
237+
for(x=0, x<duration, x++)
238238
if(aiEyeFlag)
239239
M.client.eye = locate(dd_range(1,oldeye.loc.x+rand(-strength,strength),world.maxx),dd_range(1,oldeye.loc.y+rand(-strength,strength),world.maxy),oldeye.loc.z)
240240
else

code/modules/power/lighting.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@
778778
//Automatically turns based on nearby walls, destroys if not found.
779779
var/turf/wall/T = null
780780
var/gotdir = 0
781-
for(var/i = 1, i <= 8; i += i)
781+
for(var/i = 1, i <= 8, i += i)
782782
T = get_ranged_target_turf(src, i, 1)
783783

784784
if(istype(T))

0 commit comments

Comments
 (0)