diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm
index adb9d60ab1f..4db227ab6f6 100644
--- a/code/ATMOSPHERICS/atmospherics.dm
+++ b/code/ATMOSPHERICS/atmospherics.dm
@@ -156,7 +156,7 @@ Pipelines + Other Objects -> Pipe network
/obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
if(can_unwrench && istype(W, /obj/item/weapon/wrench))
var/turf/T = get_turf(src)
- if (level == 1 && isturf(T) && T.intact)
+ if(level == 1 && isturf(T) && T.intact)
to_chat(user, "You must remove the plating first.")
return 1
var/datum/gas_mixture/int_air = return_air()
@@ -168,11 +168,11 @@ Pipelines + Other Objects -> Pipe network
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
to_chat(user, "You begin to unfasten \the [src]...")
- if (internal_pressure > 2*ONE_ATMOSPHERE)
+ if(internal_pressure > 2*ONE_ATMOSPHERE)
to_chat(user, "As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?")
unsafe_wrenching = TRUE //Oh dear oh dear
- if (do_after(user, 40, target = src) && isnull(gcDestroyed))
+ if(do_after(user, 40, target = src) && isnull(gcDestroyed))
user.visible_message( \
"[user] unfastens \the [src].", \
"You have unfastened \the [src].", \
@@ -293,7 +293,7 @@ Pipelines + Other Objects -> Pipe network
add_underlay_adapter(T, , node_dir, "")
add_underlay_adapter(T, node, node_dir, "-supply")
add_underlay_adapter(T, , node_dir, "-scrubbers")
- else if (node.icon_connect_type == "-scrubbers")
+ else if(node.icon_connect_type == "-scrubbers")
add_underlay_adapter(T, , node_dir, "")
add_underlay_adapter(T, , node_dir, "-supply")
add_underlay_adapter(T, node, node_dir, "-scrubbers")
diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
index f24623f9422..8951977d4db 100644
--- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
@@ -49,7 +49,7 @@
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
- if (c)
+ if(c)
target.connected_to = c
connected_to = c
node1 = target
@@ -58,7 +58,7 @@
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
- if (c)
+ if(c)
target.connected_to = c
connected_to = c
node2 = target
diff --git a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
index aff64bd8a10..06fe22de2ce 100644
--- a/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/dp_vent_pump.dm
@@ -35,7 +35,7 @@
/obj/machinery/atmospherics/binary/dp_vent_pump/New()
..()
- if (!id_tag)
+ if(!id_tag)
assign_uid()
id_tag = num2text(uid)
icon = null
@@ -93,11 +93,11 @@
if(T.intact && node1 && node2 && node1.level == 1 && node2.level == 1 && istype(node1, /obj/machinery/atmospherics/pipe) && istype(node2, /obj/machinery/atmospherics/pipe))
return
else
- if (node1)
+ if(node1)
add_underlay(T, node1, turn(dir, -180), node1.icon_connect_type)
else
add_underlay(T, node1, turn(dir, -180))
- if (node2)
+ if(node2)
add_underlay(T, node2, dir, node2.icon_connect_type)
else
add_underlay(T, node2, dir)
diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
index 3e643565ac6..ae27f829621 100644
--- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm
@@ -155,9 +155,9 @@
return
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
- if (!istype(W, /obj/item/weapon/wrench))
+ if(!istype(W, /obj/item/weapon/wrench))
return ..()
- if (on)
+ if(on)
to_chat(user, "You cannot unwrench this [src], turn it off first.")
return 1
return ..()
diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm
index a8d8c453706..6157c87115c 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm
@@ -182,9 +182,9 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
- if (!istype(W, /obj/item/weapon/wrench))
+ if(!istype(W, /obj/item/weapon/wrench))
return ..()
- if (!(stat & NOPOWER) && on)
+ if(!(stat & NOPOWER) && on)
to_chat(user, "You cannot unwrench this [src], turn it off first.")
return 1
return ..()
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/components/binary_devices/valve.dm b/code/ATMOSPHERICS/components/binary_devices/valve.dm
index 1c0f625e036..b9ab8a4272d 100644
--- a/code/ATMOSPHERICS/components/binary_devices/valve.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/valve.dm
@@ -52,7 +52,7 @@
add_fingerprint(usr)
update_icon(1)
sleep(10)
- if (open)
+ if(open)
close()
return
open()
diff --git a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
index 059cb25f080..875f09f6bda 100644
--- a/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/volume_pump.dm
@@ -173,9 +173,9 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
- if (!istype(W, /obj/item/weapon/wrench))
+ if(!istype(W, /obj/item/weapon/wrench))
return ..()
- if (!(stat & NOPOWER) && on)
+ if(!(stat & NOPOWER) && on)
to_chat(user, "You cannot unwrench this [src], turn it off first.")
return 1
return ..()
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm
index 8570f92462a..94efade9b1a 100644
--- a/code/ATMOSPHERICS/components/omni_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm
@@ -117,7 +117,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
- if (!ui)
+ if(!ui)
ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330)
ui.set_initial_data(data)
ui.open()
diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
index 27bf6437c9e..c64703773d3 100644
--- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm
@@ -141,7 +141,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
- if (!ui)
+ if(!ui)
ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330)
ui.set_initial_data(data)
ui.open()
diff --git a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
index 77fd2328b08..beae30e55db 100644
--- a/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
+++ b/code/ATMOSPHERICS/components/omni_devices/omni_base.dm
@@ -103,7 +103,7 @@
for(var/datum/omni_port/P in ports)
int_pressure += P.air.return_pressure()
var/datum/gas_mixture/env_air = loc.return_air()
- if ((int_pressure - env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
+ if((int_pressure - env_air.return_pressure()) > 2*ONE_ATMOSPHERE)
to_chat(user, "You cannot unwrench [src], it is too exerted due to internal pressure.")
add_fingerprint(user)
return 1
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 698753fa1be..612f51df80a 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -191,7 +191,7 @@ Filter types:
onclose(user, "atmo_filter")
return
- if (src.temp)
+ if(src.temp)
dat = text("[]
Clear Screen", src.temp, src)
//else
// src.on != src.on
@@ -207,7 +207,7 @@ Filter types:
src.add_fingerprint(usr)
if(href_list["filterset"])
src.filter_type = text2num(href_list["filterset"])
- if (href_list["temp"])
+ if(href_list["temp"])
src.temp = null
if(href_list["set_press"])
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
@@ -218,7 +218,7 @@ Filter types:
src.updateUsrDialog()
/*
for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
+ if((M.client && M.machine == src))
src.attack_hand(M)
*/
return
diff --git a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
index 2f6845a16c6..cdf11742ad8 100644
--- a/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/outlet_injector.dm
@@ -172,7 +172,7 @@
interact(user)
return 1
if(istype(W, /obj/item/weapon/wrench))
- if (!(stat & NOPOWER) && on)
+ if(!(stat & NOPOWER) && on)
to_chat(user, "You cannot unwrench this [src], turn if off first.")
return 1
return ..()
diff --git a/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm b/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm
index 94384f8ca3d..dc7da589017 100644
--- a/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/thermal_plate.dm
@@ -28,10 +28,10 @@
var/transfer_moles = 0.25 * environment.total_moles()
var/datum/gas_mixture/external_removed = environment.remove(transfer_moles)
- if (!external_removed)
+ if(!external_removed)
return radiate()
- if (external_removed.total_moles() < 10)
+ if(external_removed.total_moles() < 10)
return radiate()
//Get same info from connected gas
@@ -39,7 +39,7 @@
var/internal_transfer_moles = 0.25 * air_contents.total_moles()
var/datum/gas_mixture/internal_removed = air_contents.remove(internal_transfer_moles)
- if (!internal_removed)
+ if(!internal_removed)
environment.merge(external_removed)
return 1
@@ -63,7 +63,7 @@
var/internal_transfer_moles = 0.25 * air_contents.total_moles()
var/datum/gas_mixture/internal_removed = air_contents.remove(internal_transfer_moles)
- if (!internal_removed)
+ if(!internal_removed)
return 1
var/combined_heat_capacity = internal_removed.heat_capacity() + RADIATION_CAPACITY
diff --git a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm
index 3c993e26b0b..e61a62736c3 100644
--- a/code/ATMOSPHERICS/components/unary_devices/unary_base.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/unary_base.dm
@@ -27,7 +27,7 @@
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
- if (c)
+ if(c)
target.connected_to = c
src.connected_to = c
node = target
diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
index 6fe6c646cf5..0a856fb047a 100644
--- a/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/vent_pump.dm
@@ -63,7 +63,7 @@
icon = null
initial_loc = get_area(loc)
area_uid = initial_loc.uid
- if (!id_tag)
+ if(!id_tag)
assign_uid()
id_tag = num2text(uid)
..()
@@ -121,7 +121,7 @@
/obj/machinery/atmospherics/unary/vent_pump/process()
if(!..() || (stat & (NOPOWER|BROKEN)))
return 0
- if (!node)
+ if(!node)
on = 0
//broadcast_status() // from now air alarm/control computer should request update purposely --rastaf0
if(!on)
@@ -164,7 +164,7 @@
var/transfer_moles = pressure_delta*air_contents.volume/(environment.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
- if (isnull(removed)) //in space
+ if(isnull(removed)) //in space
return
air_contents.merge(removed)
@@ -252,7 +252,7 @@
on = !on
if(signal.data["checks"] != null)
- if (signal.data["checks"] == "default")
+ if(signal.data["checks"] == "default")
pressure_checks = pressure_checks_default
else
pressure_checks = text2num(signal.data["checks"])
@@ -264,7 +264,7 @@
pump_direction = text2num(signal.data["direction"])
if(signal.data["set_internal_pressure"] != null)
- if (signal.data["set_internal_pressure"] == "default")
+ if(signal.data["set_internal_pressure"] == "default")
internal_pressure_bound = internal_pressure_bound_default
else
internal_pressure_bound = between(
@@ -274,7 +274,7 @@
)
if(signal.data["set_external_pressure"] != null)
- if (signal.data["set_external_pressure"] == "default")
+ if(signal.data["set_external_pressure"] == "default")
external_pressure_bound = external_pressure_bound_default
else
external_pressure_bound = between(
@@ -320,7 +320,7 @@
/obj/machinery/atmospherics/unary/vent_pump/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
- if (WT.remove_fuel(0,user))
+ if(WT.remove_fuel(0,user))
to_chat(user, "Now welding the vent.")
if(do_after(user, 20, target = src))
if(!src || !WT.isOn()) return
@@ -343,12 +343,12 @@
if(!welded)
if(open)
to_chat(user, " Now closing the vent.")
- if (do_after(user, 20, target = src))
+ if(do_after(user, 20, target = src))
open = 0
user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.")
else
to_chat(user, " Now opening the vent.")
- if (do_after(user, 20, target = src))
+ if(do_after(user, 20, target = src))
open = 1
user.visible_message("[user] screwdrivers the vent shut.", "You screwdriver the vent shut.", "You hear a screwdriver.")
return
@@ -365,8 +365,8 @@
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
- if (istype(W, /obj/item/weapon/wrench))
- if (!(stat & NOPOWER) && on)
+ if(istype(W, /obj/item/weapon/wrench))
+ if(!(stat & NOPOWER) && on)
to_chat(user, "You cannot unwrench this [src], turn it off first.")
return 1
diff --git a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
index d0b0c9eb693..a7829d9fc1c 100644
--- a/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
+++ b/code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
@@ -44,7 +44,7 @@
icon = null
initial_loc = get_area(loc)
area_uid = initial_loc.uid
- if (!id_tag)
+ if(!id_tag)
assign_uid()
id_tag = num2text(uid)
..()
@@ -63,26 +63,26 @@
/obj/machinery/atmospherics/unary/vent_scrubber/auto_use_power()
if(!powered(power_channel))
return 0
- if (!on || welded)
+ if(!on || welded)
return 0
if(stat & (NOPOWER|BROKEN))
return 0
var/amount = idle_power_usage
- if (scrubbing)
- if (scrub_CO2)
+ if(scrubbing)
+ if(scrub_CO2)
amount += idle_power_usage
- if (scrub_Toxins)
+ if(scrub_Toxins)
amount += idle_power_usage
- if (scrub_N2)
+ if(scrub_N2)
amount += idle_power_usage
- if (scrub_N2O)
+ if(scrub_N2O)
amount += idle_power_usage
else
amount = active_power_usage
- if (widenet)
+ if(widenet)
amount += amount*(adjacent_turfs.len*(adjacent_turfs.len/2))
use_power(amount, power_channel)
return 1
@@ -178,13 +178,13 @@
if(!..())
return 0
- if (widenet)
+ if(widenet)
check_turfs()
if(stat & (NOPOWER|BROKEN))
return
- if (!node)
+ if(!node)
on = 0
if(welded)
@@ -194,8 +194,8 @@
return 0
scrub(loc)
- if (widenet)
- for (var/turf/simulated/tile in adjacent_turfs)
+ if(widenet)
+ for(var/turf/simulated/tile in adjacent_turfs)
scrub(tile)
//we populate a list of turfs with nonatmos-blocked cardinal turfs AND
@@ -203,11 +203,11 @@
/obj/machinery/atmospherics/unary/vent_scrubber/proc/check_turfs()
adjacent_turfs.Cut()
var/turf/T = loc
- if (istype(T))
+ if(istype(T))
adjacent_turfs = T.GetAtmosAdjacentTurfs(alldir=1)
/obj/machinery/atmospherics/unary/vent_scrubber/proc/scrub(var/turf/simulated/tile)
- if (!tile || !istype(tile))
+ if(!tile || !istype(tile))
return 0
var/datum/gas_mixture/environment = tile.return_air()
@@ -218,7 +218,7 @@
//Take a gas sample
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
- if (isnull(removed)) //in space
+ if(isnull(removed)) //in space
return
//Filter it
@@ -253,7 +253,7 @@
tile.air_update_turf()
else //Just siphoning all air
- if (air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
+ if(air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
return
var/transfer_moles = environment.total_moles()*(volume_rate/environment.volume)
@@ -372,7 +372,7 @@
/obj/machinery/atmospherics/unary/vent_scrubber/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
- if (WT.remove_fuel(0,user))
+ if(WT.remove_fuel(0,user))
to_chat(user, "Now welding the scrubber.")
if(do_after(user, 20, target = src))
if(!src || !WT.isOn()) return
@@ -394,8 +394,8 @@
if(istype(W, /obj/item/device/multitool))
update_multitool_menu(user)
return 1
- if (istype(W, /obj/item/weapon/wrench))
- if (!(stat & NOPOWER) && on)
+ if(istype(W, /obj/item/weapon/wrench))
+ if(!(stat & NOPOWER) && on)
to_chat(user, "You cannot unwrench this [src], turn it off first.")
return 1
diff --git a/code/ATMOSPHERICS/pipes/cap.dm b/code/ATMOSPHERICS/pipes/cap.dm
index f20d71c2828..0504062eb09 100644
--- a/code/ATMOSPHERICS/pipes/cap.dm
+++ b/code/ATMOSPHERICS/pipes/cap.dm
@@ -67,7 +67,7 @@
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
- if (c)
+ if(c)
target.connected_to = c
src.connected_to = c
node = target
diff --git a/code/ATMOSPHERICS/pipes/manifold.dm b/code/ATMOSPHERICS/pipes/manifold.dm
index 8ba5db9fbd5..4b37036f96a 100644
--- a/code/ATMOSPHERICS/pipes/manifold.dm
+++ b/code/ATMOSPHERICS/pipes/manifold.dm
@@ -124,8 +124,8 @@
if(!node1 && !node2 && !node3)
var/turf/T = get_turf(src)
new /obj/item/pipe(loc, make_from=src)
- for (var/obj/machinery/meter/meter in T)
- if (meter.target == src)
+ for(var/obj/machinery/meter/meter in T)
+ if(meter.target == src)
new /obj/item/pipe_meter(T)
qdel(meter)
qdel(src)
diff --git a/code/ATMOSPHERICS/pipes/manifold4w.dm b/code/ATMOSPHERICS/pipes/manifold4w.dm
index 5975ffce26b..b6cd15bc211 100644
--- a/code/ATMOSPHERICS/pipes/manifold4w.dm
+++ b/code/ATMOSPHERICS/pipes/manifold4w.dm
@@ -97,8 +97,8 @@
if(!node1 && !node2 && !node3 && !node4)
var/turf/T = get_turf(src)
new /obj/item/pipe(loc, make_from=src)
- for (var/obj/machinery/meter/meter in T)
- if (meter.target == src)
+ for(var/obj/machinery/meter/meter in T)
+ if(meter.target == src)
new /obj/item/pipe_meter(T)
qdel(meter)
qdel(src)
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
index fbd5f85b6c5..5db391d4dd0 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple.dm
@@ -144,8 +144,8 @@
if(!node1 && !node2)
var/turf/T = get_turf(src)
new /obj/item/pipe(loc, make_from=src)
- for (var/obj/machinery/meter/meter in T)
- if (meter.target == src)
+ for(var/obj/machinery/meter/meter in T)
+ if(meter.target == src)
new /obj/item/pipe_meter(T)
qdel(meter)
qdel(src)
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm
index 5cde784c8ce..a771bdd6234 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm
@@ -96,17 +96,17 @@
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/New()
.. ()
- switch (dir)
- if (SOUTH)
+ switch(dir)
+ if(SOUTH)
initialize_directions = NORTH
initialize_directions_he = SOUTH
- if (NORTH)
+ if(NORTH)
initialize_directions = SOUTH
initialize_directions_he = NORTH
- if (EAST)
+ if(EAST)
initialize_directions = WEST
initialize_directions_he = EAST
- if (WEST)
+ if(WEST)
initialize_directions = EAST
initialize_directions_he = WEST
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
index 7cf983e0e32..db62f8e51fe 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_hidden.dm
@@ -37,14 +37,14 @@
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
underlays.Cut()
- if (node1)
+ if(node1)
universal_underlays(node1)
if(node2)
universal_underlays(node2)
else
var/node2_dir = turn(get_dir(src,node1),-180)
universal_underlays(,node2_dir)
- else if (node2)
+ else if(node2)
universal_underlays(node2)
var/node1_dir = turn(get_dir(src,node2),-180)
universal_underlays(,node1_dir)
diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
index a93351b29c7..1fcb45e7959 100644
--- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
+++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_visible.dm
@@ -48,14 +48,14 @@
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "universal")
underlays.Cut()
- if (node1)
+ if(node1)
universal_underlays(node1)
if(node2)
universal_underlays(node2)
else
var/node1_dir = get_dir(node1,src)
universal_underlays(,node1_dir)
- else if (node2)
+ else if(node2)
universal_underlays(node2)
else
universal_underlays(,dir)
diff --git a/code/LINDA/LINDA_fire.dm b/code/LINDA/LINDA_fire.dm
index afbeb0a0e45..14f8ab20998 100644
--- a/code/LINDA/LINDA_fire.dm
+++ b/code/LINDA/LINDA_fire.dm
@@ -165,7 +165,7 @@
var/turf/simulated/T = loc
if(T.to_be_destroyed)
var/chance_of_deletion
- if (T.heat_capacity) //beware of division by zero
+ if(T.heat_capacity) //beware of division by zero
chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0
else
chance_of_deletion = 100
diff --git a/code/LINDA/LINDA_system.dm b/code/LINDA/LINDA_system.dm
index 2584192e7b4..423356c4e8e 100644
--- a/code/LINDA/LINDA_system.dm
+++ b/code/LINDA/LINDA_system.dm
@@ -83,35 +83,35 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
//alldir includes adjacent diagonal tiles that can share
// air with both of the related adjacent cardinal tiles
/turf/proc/GetAtmosAdjacentTurfs(alldir = 0)
- if (!istype(src, /turf/simulated))
+ if(!istype(src, /turf/simulated))
return list()
var/adjacent_turfs = list()
var/turf/simulated/curloc = src
- for (var/direction in cardinal)
+ for(var/direction in cardinal)
if(!(curloc.atmos_adjacent_turfs & direction))
continue
var/turf/simulated/S = get_step(curloc, direction)
- if (istype(S))
+ if(istype(S))
adjacent_turfs += S
- if (!alldir)
+ if(!alldir)
return adjacent_turfs
- for (var/direction in diagonals)
+ for(var/direction in diagonals)
var/matchingDirections = 0
var/turf/simulated/S = get_step(curloc, direction)
- for (var/checkDirection in cardinal)
+ for(var/checkDirection in cardinal)
if(!(S.atmos_adjacent_turfs & checkDirection))
continue
var/turf/simulated/checkTurf = get_step(S, checkDirection)
- if (checkTurf in adjacent_turfs)
+ if(checkTurf in adjacent_turfs)
matchingDirections++
- if (matchingDirections >= 2)
+ if(matchingDirections >= 2)
adjacent_turfs += S
break
diff --git a/code/LINDA/LINDA_turf_tile.dm b/code/LINDA/LINDA_turf_tile.dm
index 3aeacb942a7..b292e7664b2 100644
--- a/code/LINDA/LINDA_turf_tile.dm
+++ b/code/LINDA/LINDA_turf_tile.dm
@@ -246,14 +246,14 @@
overlays -= icemaster
var/new_overlay_type = tile_graphic()
- if (new_overlay_type == atmos_overlay_type)
+ if(new_overlay_type == atmos_overlay_type)
return
var/atmos_overlay = get_atmos_overlay_by_name(atmos_overlay_type)
- if (atmos_overlay)
+ if(atmos_overlay)
overlays -= atmos_overlay
atmos_overlay = get_atmos_overlay_by_name(new_overlay_type)
- if (atmos_overlay)
+ if(atmos_overlay)
overlays += atmos_overlay
atmos_overlay_type = new_overlay_type
diff --git a/code/__DEFINES/tick.dm b/code/__DEFINES/tick.dm
index 0469a81a392..71a63af6289 100644
--- a/code/__DEFINES/tick.dm
+++ b/code/__DEFINES/tick.dm
@@ -2,4 +2,4 @@
#define TICK_LIMIT_TO_RUN 85
#define TICK_CHECK ( world.tick_usage > TICK_LIMIT_RUNNING ? stoplag() : 0 )
-#define CHECK_TICK if (world.tick_usage > TICK_LIMIT_RUNNING) stoplag()
\ No newline at end of file
+#define CHECK_TICK if(world.tick_usage > TICK_LIMIT_RUNNING) stoplag()
\ No newline at end of file
diff --git a/code/__HELPERS/AnimationLibrary.dm b/code/__HELPERS/AnimationLibrary.dm
index 65225d37363..fcabe2e0a78 100644
--- a/code/__HELPERS/AnimationLibrary.dm
+++ b/code/__HELPERS/AnimationLibrary.dm
@@ -64,7 +64,7 @@
return
var/matrix/M = matrix()
var/do_loops = 15
- while (do_loops > 0)
+ while(do_loops > 0)
do_loops--
animate(A, transform = M, pixel_z = A.pixel_z + 12, alpha = A.alpha - 17, time = 1, loop = 1, easing = LINEAR_EASING)
M.Scale(1.2,1.2)
diff --git a/code/__HELPERS/experimental.dm b/code/__HELPERS/experimental.dm
index 27daccfc58c..533f67b68d9 100644
--- a/code/__HELPERS/experimental.dm
+++ b/code/__HELPERS/experimental.dm
@@ -16,18 +16,18 @@
* -2, parameter A is not a string
*/
/proc/strpos(const/A, const/B)
- if (istext(A) == 0 || length(A) < 1)
+ if(istext(A) == 0 || length(A) < 1)
return -2
- if (istext(B) == 0 || length(B) > 1)
+ if(istext(B) == 0 || length(B) > 1)
return -1
var/i = findtext(A, B)
- if (0 == i)
+ if(0 == i)
return 0
- while (i)
+ while(i)
. = i
i = findtext(A, B, i + 1)
@@ -35,8 +35,8 @@
var/prototype = Object.type
Object = null
- for (var/type in params2list(types))
- if (ispath(prototype, text2path(type)))
+ for(var/type in params2list(types))
+ if(ispath(prototype, text2path(type)))
return 1
return 0
@@ -45,7 +45,7 @@
/obj/machinery/proc/getArea()
var/area/A = loc.loc
- if (A != myArea)
+ if(A != myArea)
myArea = A
. = myArea
\ No newline at end of file
diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 47cee347876..ef909b93c85 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -10,7 +10,7 @@
/proc/get_area_master(const/O)
var/area/A = get_area(O)
- if (isarea(A))
+ if(isarea(A))
return A
/proc/get_area(atom/A)
@@ -440,7 +440,7 @@ proc/pollCandidates(var/Question, var/be_special_type, var/antag_age_check = 0,
var/roletext = be_special_type ? get_roletext(be_special_type) : null
var/list/mob/dead/observer/candidates = list()
var/time_passed = world.time
- if (!Question)
+ if(!Question)
Question = "Would you like to be a special role?"
for(var/mob/dead/observer/G in player_list)
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index 36bb824e642..8a44c1b7cab 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -29,7 +29,7 @@
init_datum_subtypes(/datum/nations, all_nations, null, "default_name")
init_datum_subtypes(/datum/language, all_languages, null, "name")
- for (var/language_name in all_languages)
+ for(var/language_name in all_languages)
var/datum/language/L = all_languages[language_name]
if(!(L.flags & NONGLOBAL))
language_keys[":[lowertext(L.key)]"] = L
@@ -52,7 +52,7 @@
/* // Uncomment to debug chemical reaction list.
/client/verb/debug_chemical_list()
- for (var/reaction in chemical_reactions_list)
+ for(var/reaction in chemical_reactions_list)
. += "chemical_reactions_list\[\"[reaction]\"\] = \"[chemical_reactions_list[reaction]]\"\n"
if(islist(chemical_reactions_list[reaction]))
var/list/L = chemical_reactions_list[reaction]
diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm
index 6376ebb4215..5b51ad21187 100644
--- a/code/__HELPERS/icons.dm
+++ b/code/__HELPERS/icons.dm
@@ -747,7 +747,7 @@ The _flatIcons list is a cache for generated icon files.
add = icon(I:icon, I:icon_state, I:dir)
// This checks for a silent failure mode of the icon routine. If the requested dir
// doesn't exist in this icon state it returns a 32x32 icon with 0 alpha.
- if (I:dir != SOUTH && add.Width() == 32 && add.Height() == 32)
+ if(I:dir != SOUTH && add.Width() == 32 && add.Height() == 32)
// Check every pixel for blank (computationally expensive, but the process is limited
// by the amount of film on the station, only happens when we hit something that's
// turned, and bails at the very first pixel it sees.
@@ -760,7 +760,7 @@ The _flatIcons list is a cache for generated icon files.
if(!blankpixel)
break
// If we ALWAYS returned a null (which happens when GetPixel encounters something with alpha 0)
- if (blankpixel)
+ if(blankpixel)
// Pull the default direction.
add = icon(I:icon, I:icon_state)
else // 'I' is an appearance object.
@@ -830,8 +830,8 @@ The _flatIcons list is a cache for generated icon files.
return composite
proc/adjust_brightness(var/color, var/value)
- if (!color) return "#FFFFFF"
- if (!value) return color
+ if(!color) return "#FFFFFF"
+ if(!value) return color
var/list/RGB = ReadRGB(color)
RGB[1] = Clamp(RGB[1]+value,0,255)
@@ -844,7 +844,7 @@ proc/sort_atoms_by_layer(var/list/atoms)
var/list/result = atoms.Copy()
var/gap = result.len
var/swapped = 1
- while (gap > 1 || swapped)
+ while(gap > 1 || swapped)
swapped = 0
if(gap > 1)
gap = round(gap / 1.3) // 1.3 is the emperic comb sort coefficient
diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm
index 948602def06..e749dab5fa8 100644
--- a/code/__HELPERS/lists.dm
+++ b/code/__HELPERS/lists.dm
@@ -12,17 +12,17 @@
//Returns a list in plain english as a string
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
var/total = input.len
- if (!total)
+ if(!total)
return "[nothing_text]"
- else if (total == 1)
+ else if(total == 1)
return "[input[1]]"
- else if (total == 2)
+ else if(total == 2)
return "[input[1]][and_text][input[2]]"
else
var/output = ""
var/index = 1
- while (index < total)
- if (index == total - 1)
+ while(index < total)
+ if(index == total - 1)
comma_text = final_comma_text
output += "[input[index]][comma_text]"
@@ -107,22 +107,22 @@
/proc/pickweight(list/L)
var/total = 0
var/item
- for (item in L)
- if (!L[item])
+ for(item in L)
+ if(!L[item])
L[item] = 1
total += L[item]
total = rand(1, total)
- for (item in L)
+ for(item in L)
total -=L [item]
- if (total <= 0)
+ if(total <= 0)
return item
return null
//Pick a random element from the list and remove it from the list.
/proc/pick_n_take(list/listfrom)
- if (listfrom.len > 0)
+ if(listfrom.len > 0)
var/picked = pick(listfrom)
listfrom -= picked
return picked
@@ -130,7 +130,7 @@
//Returns the top(last) element from the list and removes it from the list (typical stack function)
/proc/pop(list/listfrom)
- if (listfrom.len > 0)
+ if(listfrom.len > 0)
var/picked = listfrom[listfrom.len]
listfrom.len--
return picked
@@ -459,22 +459,22 @@ proc/dd_sortedObjectList(list/incoming)
var/list/list_bottom
var/current_sort_object
- for (current_sort_object in incoming)
+ for(current_sort_object in incoming)
low_index = 1
high_index = sorted_list.len
- while (low_index <= high_index)
+ while(low_index <= high_index)
// Figure out the midpoint, rounding up for fractions. (BYOND rounds down, so add 1 if necessary.)
midway_calc = (low_index + high_index) / 2
current_index = round(midway_calc)
- if (midway_calc > current_index)
+ if(midway_calc > current_index)
current_index++
current_item = sorted_list[current_index]
current_item_value = current_item:dd_SortValue()
current_sort_object_value = current_sort_object:dd_SortValue()
- if (current_sort_object_value < current_item_value)
+ if(current_sort_object_value < current_item_value)
high_index = current_index - 1
- else if (current_sort_object_value > current_item_value)
+ else if(current_sort_object_value > current_item_value)
low_index = current_index + 1
else
// current_sort_object == current_item
@@ -485,7 +485,7 @@ proc/dd_sortedObjectList(list/incoming)
insert_index = low_index
// Special case adding to end of list.
- if (insert_index > sorted_list.len)
+ if(insert_index > sorted_list.len)
sorted_list += current_sort_object
continue
@@ -515,28 +515,28 @@ proc/dd_sortedObjectList(list/incoming)
var/sort_result
var/current_sort_text
- for (current_sort_text in incoming)
+ for(current_sort_text in incoming)
low_index = 1
high_index = sorted_text.len
- while (low_index <= high_index)
+ while(low_index <= high_index)
// Figure out the midpoint, rounding up for fractions. (BYOND rounds down, so add 1 if necessary.)
midway_calc = (low_index + high_index) / 2
current_index = round(midway_calc)
- if (midway_calc > current_index)
+ if(midway_calc > current_index)
current_index++
current_item = sorted_text[current_index]
- if (case_sensitive)
+ if(case_sensitive)
sort_result = sorttextEx(current_sort_text, current_item)
else
sort_result = sorttext(current_sort_text, current_item)
switch(sort_result)
- if (1)
+ if(1)
high_index = current_index - 1 // current_sort_text < current_item
- if (-1)
+ if(-1)
low_index = current_index + 1 // current_sort_text > current_item
- if (0)
+ if(0)
low_index = current_index // current_sort_text == current_item
break
@@ -544,7 +544,7 @@ proc/dd_sortedObjectList(list/incoming)
insert_index = low_index
// Special case adding to end of list.
- if (insert_index > sorted_text.len)
+ if(insert_index > sorted_text.len)
sorted_text += current_sort_text
continue
diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm
index bf3a5b3ffc9..b2d81f9060d 100644
--- a/code/__HELPERS/logging.dm
+++ b/code/__HELPERS/logging.dm
@@ -21,12 +21,12 @@
/proc/log_admin(text)
admin_log.Add(text)
- if (config.log_admin)
+ if(config.log_admin)
diary << "\[[time_stamp()]]ADMIN: [text]"
/proc/log_debug(text)
- if (config.log_debug)
+ if(config.log_debug)
diary << "\[[time_stamp()]]DEBUG: [text]"
for(var/client/C in admins)
@@ -35,47 +35,47 @@
/proc/log_game(text)
- if (config.log_game)
+ if(config.log_game)
diary << "\[[time_stamp()]]GAME: [text]"
/proc/log_vote(text)
- if (config.log_vote)
+ if(config.log_vote)
diary << "\[[time_stamp()]]VOTE: [text]"
/proc/log_access(text)
- if (config.log_access)
+ if(config.log_access)
diary << "\[[time_stamp()]]ACCESS: [text]"
/proc/log_say(text)
- if (config.log_say)
+ if(config.log_say)
diary << "\[[time_stamp()]]SAY: [text]"
/proc/log_ooc(text)
- if (config.log_ooc)
+ if(config.log_ooc)
diary << "\[[time_stamp()]]OOC: [text]"
/proc/log_whisper(text)
- if (config.log_whisper)
+ if(config.log_whisper)
diary << "\[[time_stamp()]]WHISPER: [text]"
/proc/log_emote(text)
- if (config.log_emote)
+ if(config.log_emote)
diary << "\[[time_stamp()]]EMOTE: [text]"
/proc/log_attack(text)
- if (config.log_attack)
+ if(config.log_attack)
diary << "\[[time_stamp()]]ATTACK: [text]" //Seperate attack logs? Why?
/proc/log_adminsay(text)
- if (config.log_adminchat)
+ if(config.log_adminchat)
diary << "\[[time_stamp()]]ADMINSAY: [text]"
/proc/log_adminwarn(text)
- if (config.log_adminwarn)
+ if(config.log_adminwarn)
diary << "\[[time_stamp()]]ADMINWARN: [text]"
/proc/log_pda(text)
- if (config.log_pda)
+ if(config.log_pda)
diary << "\[[time_stamp()]]PDA: [text][log_end]"
/proc/log_misc(text)
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 9d790b75345..4bc41808b96 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -116,7 +116,7 @@ proc/random_skin_tone(species = "Human")
proc/skintone2racedescription(tone, species = "Human")
if(species == "Human")
- switch (tone)
+ switch(tone)
if(30 to INFINITY) return "albino"
if(20 to 30) return "pale"
if(5 to 15) return "light skinned"
@@ -190,15 +190,15 @@ proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=nul
var/holding = user.get_active_hand()
var/datum/progressbar/progbar
- if (progress)
+ if(progress)
progbar = new(user, time, target)
var/endtime = world.time+time
var/starttime = world.time
. = 1
- while (world.time < endtime)
+ while(world.time < endtime)
sleep(1)
- if (progress)
+ if(progress)
progbar.update(world.time - starttime)
if(!user || !target)
. = 0
@@ -213,7 +213,7 @@ proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=nul
if((!drifting && user.loc != user_loc) || target.loc != target_loc || user.get_active_hand() != holding || user.incapacitated() || user.lying )
. = 0
break
- if (progress)
+ if(progress)
qdel(progbar)
/proc/do_after(mob/user, delay, needhand = 1, atom/target = null, progress = 1)
@@ -236,15 +236,15 @@ proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=nul
holdingnull = 0 //Users hand started holding something, check to see if it's still holding that
var/datum/progressbar/progbar
- if (progress)
+ if(progress)
progbar = new(user, delay, target)
var/endtime = world.time + delay
var/starttime = world.time
. = 1
- while (world.time < endtime)
+ while(world.time < endtime)
sleep(1)
- if (progress)
+ if(progress)
progbar.update(world.time - starttime)
if(drifting && !user.inertia_dir)
@@ -269,5 +269,5 @@ proc/add_logs(mob/target, mob/user, what_done, var/object=null, var/addition=nul
if(user.get_active_hand() != holding)
. = 0
break
- if (progress)
+ if(progress)
qdel(progbar)
\ No newline at end of file
diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm
index 0ac3da3a10a..0375b7aacea 100644
--- a/code/__HELPERS/names.dm
+++ b/code/__HELPERS/names.dm
@@ -1,13 +1,13 @@
var/church_name = null
/proc/church_name()
- if (church_name)
+ if(church_name)
return church_name
var/name = ""
name += pick("Holy", "United", "First", "Second", "Last")
- if (prob(20))
+ if(prob(20))
name += " Space"
name += " " + pick("Church", "Cathedral", "Body", "Worshippers", "Movement", "Witnesses")
@@ -17,7 +17,7 @@ var/church_name = null
var/command_name = null
/proc/command_name()
- if (command_name)
+ if(command_name)
return command_name
var/name = "Central Command"
@@ -33,7 +33,7 @@ var/command_name = null
var/religion_name = null
/proc/religion_name()
- if (religion_name)
+ if(religion_name)
return religion_name
var/name = ""
@@ -47,12 +47,12 @@ var/religion_name = null
return "Nyx"
/proc/station_name()
- if (station_name)
+ if(station_name)
return station_name
var/name = ""
- if (config && config.server_name)
+ if(config && config.server_name)
world.name = "[config.server_name]: [name]"
else
world.name = station_name
@@ -65,7 +65,7 @@ var/religion_name = null
var/new_station_name = ""
//Rare: Pre-Prefix
- if (prob(10))
+ if(prob(10))
name = pick("Imperium", "Heretical", "Cuban", "Psychic", "Elegant", "Common", "Uncommon", "Rare", "Unique", "Houseruled", "Religious", "Atheist", "Traditional", "Houseruled", "Mad", "Super", "Ultra", "Secret", "Top Secret", "Deep", "Death", "Zybourne", "Central", "Main", "Government", "Uoi", "Fat", "Automated", "Experimental", "Augmented")
new_station_name = name + " "
name = ""
@@ -107,7 +107,7 @@ var/religion_name = null
station_name = name
- if (config && config.server_name)
+ if(config && config.server_name)
world.name = "[config.server_name]: [name]"
else
world.name = name
@@ -116,7 +116,7 @@ var/religion_name = null
var/syndicate_name = null
/proc/syndicate_name()
- if (syndicate_name)
+ if(syndicate_name)
return syndicate_name
var/name = ""
@@ -125,11 +125,11 @@ var/syndicate_name = null
name += pick("Clandestine", "Prima", "Blue", "Zero-G", "Max", "Blasto", "Waffle", "North", "Omni", "Newton", "Cyber", "Bonk", "Gene", "Gib")
// Suffix
- if (prob(80))
+ if(prob(80))
name += " "
// Full
- if (prob(60))
+ if(prob(60))
name += pick("Syndicate", "Consortium", "Collective", "Corporation", "Group", "Holdings", "Biotech", "Industries", "Systems", "Products", "Chemicals", "Enterprises", "Family", "Creations", "International", "Intergalactic", "Interplanetary", "Foundation", "Positronics", "Hive")
// Broken
else
diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm
index f490f71df43..5020693a499 100644
--- a/code/__HELPERS/sanitize_values.dm
+++ b/code/__HELPERS/sanitize_values.dm
@@ -62,6 +62,6 @@
// Calls the above proc on each entry of a list to ensure its entries are clean
/proc/sql_sanitize_text_list(var/list/l)
var/list/new_list = l.Copy()
- for (var/text in new_list)
+ for(var/text in new_list)
sql_sanitize_text(text)
return new_list
\ No newline at end of file
diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm
index 0aa9589c510..b17cda4e560 100644
--- a/code/__HELPERS/text.dm
+++ b/code/__HELPERS/text.dm
@@ -154,15 +154,15 @@
proc/checkhtml(var/t)
t = sanitize_simple(t, list(""="."))
var/p = findtext(t,"<",1)
- while (p) //going through all the tags
+ while(p) //going through all the tags
var/start = p++
var/tag = copytext(t,p, p+1)
- if (tag != "/")
- while (reject_bad_text(copytext(t, p, p+1), 1))
+ if(tag != "/")
+ while(reject_bad_text(copytext(t, p, p+1), 1))
tag = copytext(t,start, p)
p++
tag = copytext(t,start+1, p)
- if (!(tag in paper_tag_whitelist)) //if it's unkown tag, disarming it
+ if(!(tag in paper_tag_whitelist)) //if it's unkown tag, disarming it
t = copytext(t,1,start-1) + "<" + copytext(t,start+1)
p = findtext(t,"<",p)
return t
@@ -218,7 +218,7 @@ proc/checkhtml(var/t)
//Adds 'u' number of zeros ahead of the text 't'
/proc/add_zero(t, u)
- while (length(t) < u)
+ while(length(t) < u)
t = "0[t]"
return t
@@ -236,15 +236,15 @@ proc/checkhtml(var/t)
//Returns a string with reserved characters and spaces before the first letter removed
/proc/trim_left(text)
- for (var/i = 1 to length(text))
- if (text2ascii(text, i) > 32)
+ for(var/i = 1 to length(text))
+ if(text2ascii(text, i) > 32)
return copytext(text, i)
return ""
//Returns a string with reserved characters and spaces after the last letter removed
/proc/trim_right(text)
- for (var/i = length(text), i > 0, i--)
- if (text2ascii(text, i) > 32)
+ for(var/i = length(text), i > 0, i--)
+ if(text2ascii(text, i) > 32)
return copytext(text, 1, i + 1)
return ""
diff --git a/code/__HELPERS/timed_alerts.dm b/code/__HELPERS/timed_alerts.dm
index 929341c3fc0..97e92900288 100644
--- a/code/__HELPERS/timed_alerts.dm
+++ b/code/__HELPERS/timed_alerts.dm
@@ -10,9 +10,9 @@
var/ref_result
ref_result = ref_alert.timed_alert(src, question, title, time, choice1, choice2, choice3)
- if (!ref_result) ref_result = default
+ if(!ref_result) ref_result = default
- if (ref_alert) del(ref_alert)
+ if(ref_alert) del(ref_alert)
return ref_result
@@ -20,13 +20,13 @@
/mob/proc/timed_alert(question as text, title as text, default as text, time as num, \
choice1 as text, choice2 as text, choice3 as text)
- if (client) return client.timed_alert(question, title, default, time, choice1, choice2, choice3)
+ if(client) return client.timed_alert(question, title, default, time, choice1, choice2, choice3)
return
/timed_alert/proc/timed_alert(client/ref_client, question, title, time, choice1, choice2, choice3)
- if (!ref_client) return
+ if(!ref_client) return
spawn (time) del(src) // When src is deleted, the proc ends immediately. The alert itself closes.
var/ref_answer
diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm
index 0dd40091e1e..005ef4c2fc9 100644
--- a/code/__HELPERS/type2type.dm
+++ b/code/__HELPERS/type2type.dm
@@ -10,7 +10,7 @@
//Returns an integer given a hex input
/proc/hex2num(hex)
- if (!( istext(hex) ))
+ if(!( istext(hex) ))
return
var/num = 0
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 596dcda719c..6cd28a20a32 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -26,11 +26,11 @@
//Inverts the colour of an HTML string
/proc/invertHTML(HTMLstring)
- if (!( istext(HTMLstring) ))
+ if(!( istext(HTMLstring) ))
CRASH("Given non-text argument!")
return
else
- if (length(HTMLstring) != 7)
+ if(length(HTMLstring) != 7)
CRASH("Given non-HTML argument!")
return
var/textr = copytext(HTMLstring, 2, 4)
@@ -42,11 +42,11 @@
textr = num2hex(255 - r)
textg = num2hex(255 - g)
textb = num2hex(255 - b)
- if (length(textr) < 2)
+ if(length(textr) < 2)
textr = text("0[]", textr)
- if (length(textg) < 2)
+ if(length(textg) < 2)
textr = text("0[]", textg)
- if (length(textb) < 2)
+ if(length(textb) < 2)
textr = text("0[]", textb)
return text("#[][][]", textr, textg, textb)
return
@@ -218,14 +218,14 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Returns whether or not a player is a guest using their ckey as an input
/proc/IsGuestKey(key)
- if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
+ if(findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
return 0
var/i, ch, len = length(key)
- for (i = 7, i <= len, ++i)
+ for(i = 7, i <= len, ++i)
ch = text2ascii(key, i)
- if (ch < 48 || ch > 57)
+ if(ch < 48 || ch > 57)
return 0
return 1
@@ -234,7 +234,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
f = round(f)
f = max(low, f)
f = min(high, f)
- if ((f % 2) == 0) //Ensure the last digit is an odd number
+ if((f % 2) == 0) //Ensure the last digit is an odd number
f += 1
return f
@@ -277,13 +277,13 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/freeborg()
var/select = null
var/list/borgs = list()
- for (var/mob/living/silicon/robot/A in player_list)
- if (A.stat == 2 || A.connected_ai || A.scrambledcodes || istype(A,/mob/living/silicon/robot/drone))
+ for(var/mob/living/silicon/robot/A in player_list)
+ if(A.stat == 2 || A.connected_ai || A.scrambledcodes || istype(A,/mob/living/silicon/robot/drone))
continue
var/name = "[A.real_name] ([A.modtype] [A.braintype])"
borgs[name] = A
- if (borgs.len)
+ if(borgs.len)
select = input("Unshackled borg signals detected:", "Borg selection", null, null) as null|anything in borgs
return borgs[select]
@@ -352,15 +352,15 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/list/namecounts = list()
for(var/mob/M in mobs)
var/name = M.name
- if (name in names)
+ if(name in names)
namecounts[name]++
name = "[name] ([namecounts[name]])"
else
names.Add(name)
namecounts[name] = 1
- if (M.real_name && M.real_name != M.name)
+ if(M.real_name && M.real_name != M.name)
name += " \[[M.real_name]\]"
- if (M.stat == 2)
+ if(M.stat == 2)
if(istype(M, /mob/dead/observer/))
name += " \[ghost\]"
else
@@ -679,13 +679,13 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
var/src_min_x = 0
var/src_min_y = 0
- for (var/turf/T in turfs_src)
+ for(var/turf/T in turfs_src)
if(T.x < src_min_x || !src_min_x) src_min_x = T.x
if(T.y < src_min_y || !src_min_y) src_min_y = T.y
var/trg_min_x = 0
var/trg_min_y = 0
- for (var/turf/T in turfs_trg)
+ for(var/turf/T in turfs_trg)
if(T.x < trg_min_x || !trg_min_x) trg_min_x = T.x
if(T.y < trg_min_y || !trg_min_y) trg_min_y = T.y
@@ -709,9 +709,9 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
var/list/toupdate = new/list()
moving:
- for (var/turf/T in refined_src)
+ for(var/turf/T in refined_src)
var/datum/coords/C_src = refined_src[T]
- for (var/turf/B in refined_trg)
+ for(var/turf/B in refined_trg)
var/datum/coords/C_trg = refined_trg[B]
if(C_src.x_pos == C_trg.x_pos && C_src.y_pos == C_trg.y_pos)
@@ -845,13 +845,13 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
var/src_min_x = 0
var/src_min_y = 0
- for (var/turf/T in turfs_src)
+ for(var/turf/T in turfs_src)
if(T.x < src_min_x || !src_min_x) src_min_x = T.x
if(T.y < src_min_y || !src_min_y) src_min_y = T.y
var/trg_min_x = 0
var/trg_min_y = 0
- for (var/turf/T in turfs_trg)
+ for(var/turf/T in turfs_trg)
if(T.x < trg_min_x || !trg_min_x) trg_min_x = T.x
if(T.y < trg_min_y || !trg_min_y) trg_min_y = T.y
@@ -877,9 +877,9 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
moving:
- for (var/turf/T in refined_src)
+ for(var/turf/T in refined_src)
var/datum/coords/C_src = refined_src[T]
- for (var/turf/B in refined_trg)
+ for(var/turf/B in refined_trg)
var/datum/coords/C_trg = refined_trg[B]
if(C_src.x_pos == C_trg.x_pos && C_src.y_pos == C_trg.y_pos)
@@ -990,24 +990,24 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
proc/get_mob_with_client_list()
var/list/mobs = list()
for(var/mob/M in mob_list)
- if (M.client)
+ if(M.client)
mobs += M
return mobs
/proc/parse_zone(zone)
if(zone == "r_hand") return "right hand"
- else if (zone == "l_hand") return "left hand"
- else if (zone == "l_arm") return "left arm"
- else if (zone == "r_arm") return "right arm"
- else if (zone == "l_leg") return "left leg"
- else if (zone == "r_leg") return "right leg"
- else if (zone == "l_foot") return "left foot"
- else if (zone == "r_foot") return "right foot"
- else if (zone == "l_hand") return "left hand"
- else if (zone == "r_hand") return "right hand"
- else if (zone == "l_foot") return "left foot"
- else if (zone == "r_foot") return "right foot"
+ else if(zone == "l_hand") return "left hand"
+ else if(zone == "l_arm") return "left arm"
+ else if(zone == "r_arm") return "right arm"
+ else if(zone == "l_leg") return "left leg"
+ else if(zone == "r_leg") return "right leg"
+ else if(zone == "l_foot") return "left foot"
+ else if(zone == "r_foot") return "right foot"
+ else if(zone == "l_hand") return "left hand"
+ else if(zone == "r_hand") return "right hand"
+ else if(zone == "l_foot") return "left foot"
+ else if(zone == "r_foot") return "right foot"
else return zone
//Finds the distance between two atoms, in pixels
@@ -1139,15 +1139,15 @@ var/global/list/common_tools = list(
//Whether or not the given item counts as sharp in terms of dealing damage
/proc/is_sharp(obj/O as obj)
- if (!O) return 0
- if (O.sharp) return 1
- if (O.edge) return 1
+ if(!O) return 0
+ if(O.sharp) return 1
+ if(O.edge) return 1
return 0
//Whether or not the given item counts as cutting with an edge in terms of removing limbs
/proc/has_edge(obj/O as obj)
- if (!O) return 0
- if (O.edge) return 1
+ if(!O) return 0
+ if(O.edge) return 1
return 0
//Returns 1 if the given item is capable of popping things like balloons, inflatable barriers, or cutting police tape.
@@ -1521,7 +1521,7 @@ var/mob/dview/dview_mob = new
lastloc = loc
sleep(0.6)
- if (orbiting == A) //make sure we haven't started orbiting something else.
+ if(orbiting == A) //make sure we haven't started orbiting something else.
orbiting = null
SpinAnimation(0,0)
@@ -1672,7 +1672,7 @@ var/mob/dview/dview_mob = new
/proc/pick_closest_path(value)
var/list/matches = get_fancy_list_of_types()
- if (!isnull(value) && value!="")
+ if(!isnull(value) && value!="")
matches = filter_fancy_list(matches, value)
if(matches.len==0)
@@ -1706,13 +1706,13 @@ var/list/TYPES_SHORTCUTS = list(
var/global/list/g_fancy_list_of_types = null
/proc/get_fancy_list_of_types()
- if (isnull(g_fancy_list_of_types)) //init
+ if(isnull(g_fancy_list_of_types)) //init
var/list/temp = sortList(subtypesof(/atom) - typesof(/area) - /atom/movable)
g_fancy_list_of_types = new(temp.len)
for(var/type in temp)
var/typename = "[type]"
- for (var/tn in TYPES_SHORTCUTS)
- if (copytext(typename,1, length("[tn]/")+1)=="[tn]/" /*findtextEx(typename,"[tn]/",1,2)*/ )
+ for(var/tn in TYPES_SHORTCUTS)
+ if(copytext(typename,1, length("[tn]/")+1)=="[tn]/" /*findtextEx(typename,"[tn]/",1,2)*/ )
typename = TYPES_SHORTCUTS[tn]+copytext(typename,length("[tn]/"))
break
g_fancy_list_of_types[typename] = type
@@ -1730,10 +1730,10 @@ var/global/list/g_fancy_list_of_types = null
/proc/stoplag()
. = 1
sleep(world.tick_lag)
- if (world.tick_usage > TICK_LIMIT_TO_RUN) //woke up, still not enough tick, sleep for more.
+ if(world.tick_usage > TICK_LIMIT_TO_RUN) //woke up, still not enough tick, sleep for more.
. += 2
sleep(world.tick_lag*2)
- if (world.tick_usage > TICK_LIMIT_TO_RUN) //woke up, STILL not enough tick, sleep for more.
+ if(world.tick_usage > TICK_LIMIT_TO_RUN) //woke up, STILL not enough tick, sleep for more.
. += 4
sleep(world.tick_lag*4)
//you might be thinking of adding more steps to this, or making it use a loop and a counter var
diff --git a/code/_hooks/hooks.dm b/code/_hooks/hooks.dm
index b78526bfc2b..ccd0eb04722 100644
--- a/code/_hooks/hooks.dm
+++ b/code/_hooks/hooks.dm
@@ -29,26 +29,26 @@
var/global/list/hooks = list()
/proc/SetupHooks()
- for (var/hook_path in typesof(/hook))
+ for(var/hook_path in typesof(/hook))
var/hook/hook = new hook_path
hooks[hook.name] = hook
// log_to_dd("Found hook: " + hook.name)
- for (var/hook_path in typesof(/hook_handler))
+ for(var/hook_path in typesof(/hook_handler))
var/hook_handler/hook_handler = new hook_path
- for (var/name in hooks)
- if (hascall(hook_handler, "On" + name))
+ for(var/name in hooks)
+ if(hascall(hook_handler, "On" + name))
var/hook/hook = hooks[name]
hook.handlers += hook_handler
// log_to_dd("Found hook handler for: " + name)
- for (var/hook/hook in hooks)
+ for(var/hook/hook in hooks)
hook.Setup()
/proc/CallHook(var/name as text, var/list/args)
var/hook/hook = hooks[name]
- if (!hook)
+ if(!hook)
//log_to_dd("WARNING: Hook with name " + name + " does not exist")
return
- if (hook.Called(args))
+ if(hook.Called(args))
return
- for (var/hook_handler/hook_handler in hook.handlers)
+ for(var/hook_handler/hook_handler in hook.handlers)
call(hook_handler, "On" + hook.name)(args)
\ No newline at end of file
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 58fb139ce33..1b32a9201a3 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -143,7 +143,7 @@
for(var/i=1, i 0)
+ if(hitsound && force > 0)
playsound(loc, hitsound, 50, 1, -1)
/////////////////////////
user.lastattacked = M
@@ -177,9 +177,9 @@
else
M.take_organ_damage(power)
- if (prob(33)) // Added blood for whacking non-humans too
+ if(prob(33)) // Added blood for whacking non-humans too
var/turf/simulated/location = M.loc
- if (istype(location, /turf/simulated))
+ if(istype(location, /turf/simulated))
location.add_blood_floor(M)
if("fire")
M.take_organ_damage(0, power)
diff --git a/code/_onclick/oldcode.dm b/code/_onclick/oldcode.dm
index 89b1131a6f0..a68f9668e78 100644
--- a/code/_onclick/oldcode.dm
+++ b/code/_onclick/oldcode.dm
@@ -2,7 +2,7 @@
if(!usr) return
// ------- TIME SINCE LAST CLICK -------
- if (world.time <= usr:lastDblClick+1)
+ if(world.time <= usr:lastDblClick+1)
return
else
usr:lastDblClick = world.time
@@ -38,15 +38,15 @@
// ------- AI -------
- else if (istype(usr, /mob/living/silicon/ai))
+ else if(istype(usr, /mob/living/silicon/ai))
var/mob/living/silicon/ai/ai = usr
- if (ai.control_disabled)
+ if(ai.control_disabled)
return
// ------- CYBORG -------
- else if (istype(usr, /mob/living/silicon/robot))
+ else if(istype(usr, /mob/living/silicon/robot))
var/mob/living/silicon/robot/bot = usr
- if (bot.lockcharge) return
+ if(bot.lockcharge) return
..()
@@ -106,7 +106,7 @@
W = null
*/
// ------- ATTACK SELF -------
- if (W == src && usr.stat == 0)
+ if(W == src && usr.stat == 0)
W.attack_self(usr)
if(usr.hand)
usr.update_inv_l_hand(0) //update in-hand overlays
@@ -115,14 +115,14 @@
return
// ------- PARALYSIS, STUN, WEAKENED, DEAD, (And not AI) -------
- if (((usr.paralysis || usr.stunned || usr.weakened) && !istype(usr, /mob/living/silicon/ai)) || usr.stat != 0)
+ if(((usr.paralysis || usr.stunned || usr.weakened) && !istype(usr, /mob/living/silicon/ai)) || usr.stat != 0)
return
// ------- CLICKING STUFF IN CONTAINERS -------
- if ((!( src in usr.contents ) && (((!( isturf(src) ) && (!( isturf(src.loc) ) && (src.loc && !( isturf(src.loc.loc) )))) || !( isturf(usr.loc) )) && (src.loc != usr.loc && (!( istype(src, /obj/screen) ) && !( usr.contents.Find(src.loc) ))))))
- if (istype(usr, /mob/living/silicon/ai))
+ if((!( src in usr.contents ) && (((!( isturf(src) ) && (!( isturf(src.loc) ) && (src.loc && !( isturf(src.loc.loc) )))) || !( isturf(usr.loc) )) && (src.loc != usr.loc && (!( istype(src, /obj/screen) ) && !( usr.contents.Find(src.loc) ))))))
+ if(istype(usr, /mob/living/silicon/ai))
var/mob/living/silicon/ai/ai = usr
- if (ai.control_disabled || ai.malfhacking)
+ if(ai.control_disabled || ai.malfhacking)
return
else
return
@@ -141,11 +141,11 @@
// to_chat(world, "according to dblclick(), t5 is [t5]")
// ------- ACTUALLY DETERMINING STUFF -------
- if (((t5 || (W && (W.flags & USEDELAY))) && !( istype(src, /obj/screen) )))
+ if(((t5 || (W && (W.flags & USEDELAY))) && !( istype(src, /obj/screen) )))
// ------- ( CAN USE ITEM OR HAS 1 SECOND USE DELAY ) AND NOT CLICKING ON SCREEN -------
- if (usr.next_move < world.time)
+ if(usr.next_move < world.time)
usr.prev_move = usr.next_move
usr.next_move = world.time + 10
else
@@ -154,14 +154,14 @@
// ------- DELAY CHECK PASSED -------
- if ((src.loc && (get_dist(src, usr) < 2 || src.loc == usr.loc)))
+ if((src.loc && (get_dist(src, usr) < 2 || src.loc == usr.loc)))
// ------- CLICKED OBJECT EXISTS IN GAME WORLD, DISTANCE FROM PERSON TO OBJECT IS 1 SQUARE OR THEY'RE ON THE SAME SQUARE -------
var/direct = get_dir(usr, src)
var/obj/item/weapon/dummy/D = new /obj/item/weapon/dummy( usr.loc )
var/ok = 0
- if ( (direct - 1) & direct)
+ if( (direct - 1) & direct)
// ------- CLICKED OBJECT IS LOCATED IN A DIAGONAL POSITION FROM THE PERSON -------
@@ -259,39 +259,39 @@
D = null
// ------- DUMMY OBJECT'S SERVED IT'S PURPOSE, IT'S REWARDED WITH A SWIFT DELETE -------
- if (!( ok ))
+ if(!( ok ))
// ------- TESTS ABOVE DETERMINED YOU CANNOT REACH THE TILE -------
return 0
- if (!( usr.restrained() || (usr.lying && usr.buckled!=src) ))
+ if(!( usr.restrained() || (usr.lying && usr.buckled!=src) ))
// ------- YOU ARE NOT REASTRAINED -------
- if (W)
+ if(W)
// ------- YOU HAVE AN ITEM IN YOUR HAND - HANDLE ATTACKBY AND AFTERATTACK -------
var/ignoreAA = 0 //Ignore afterattack(). Surgery uses this.
- if (t5)
+ if(t5)
ignoreAA = src.attackby(W, usr, params)
- if (W && !ignoreAA)
+ if(W && !ignoreAA)
W.afterattack(src, usr, (t5 ? 1 : 0), params)
else
// ------- YOU DO NOT HAVE AN ITEM IN YOUR HAND -------
- if (istype(usr, /mob/living/carbon/human))
+ if(istype(usr, /mob/living/carbon/human))
// ------- YOU ARE HUMAN -------
src.attack_hand(usr, usr.hand)
else
// ------- YOU ARE NOT HUMAN. WHAT ARE YOU - DETERMINED HERE AND PROPER ATTACK_MOBTYPE CALLED -------
- if (istype(usr, /mob/living/carbon/monkey))
+ if(istype(usr, /mob/living/carbon/monkey))
src.attack_paw(usr, usr.hand)
- else if (istype(usr, /mob/living/carbon/alien/humanoid))
+ else if(istype(usr, /mob/living/carbon/alien/humanoid))
if(usr.m_intent == "walk" && istype(usr, /mob/living/carbon/alien/humanoid/hunter))
usr.m_intent = "run"
usr.hud_used.move_intent.icon_state = "running"
usr.update_icons()
src.attack_alien(usr, usr.hand)
- else if (istype(usr, /mob/living/carbon/alien/larva))
+ else if(istype(usr, /mob/living/carbon/alien/larva))
src.attack_larva(usr)
- else if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
+ else if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
src.attack_ai(usr, usr.hand)
else if(istype(usr, /mob/living/carbon/slime))
src.attack_slime(usr)
@@ -299,51 +299,51 @@
src.attack_animal(usr)
else
// ------- YOU ARE RESTRAINED. DETERMINE WHAT YOU ARE AND ATTACK WITH THE PROPER HAND_X PROC -------
- if (istype(usr, /mob/living/carbon/human))
+ if(istype(usr, /mob/living/carbon/human))
src.hand_h(usr, usr.hand)
- else if (istype(usr, /mob/living/carbon/monkey))
+ else if(istype(usr, /mob/living/carbon/monkey))
src.hand_p(usr, usr.hand)
- else if (istype(usr, /mob/living/carbon/alien/humanoid))
+ else if(istype(usr, /mob/living/carbon/alien/humanoid))
src.hand_al(usr, usr.hand)
- else if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
+ else if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
src.hand_a(usr, usr.hand)
else
// ------- ITEM INACESSIBLE OR CLICKING ON SCREEN -------
- if (istype(src, /obj/screen))
+ if(istype(src, /obj/screen))
// ------- IT'S THE HUD YOU'RE CLICKING ON -------
usr.prev_move = usr.next_move
usr:lastDblClick = world.time + 2
- if (usr.next_move < world.time)
+ if(usr.next_move < world.time)
usr.next_move = world.time + 2
else
return
// ------- 2 DECISECOND DELAY FOR CLICKING PASSED -------
- if (!( usr.restrained() ))
+ if(!( usr.restrained() ))
// ------- YOU ARE NOT RESTRAINED -------
- if ((W && !( istype(src, /obj/screen) )))
+ if((W && !( istype(src, /obj/screen) )))
// ------- IT SHOULD NEVER GET TO HERE, DUE TO THE ISTYPE(SRC, /OBJ/SCREEN) FROM PREVIOUS IF-S - I TESTED IT WITH A DEBUG OUTPUT AND I COULDN'T GET THIST TO SHOW UP. -------
src.attackby(W, usr, params)
- if (W)
+ if(W)
W.afterattack(src, usr,, params)
else
// ------- YOU ARE NOT RESTRAINED, AND ARE CLICKING A HUD OBJECT -------
- if (istype(usr, /mob/living/carbon/human))
+ if(istype(usr, /mob/living/carbon/human))
src.attack_hand(usr, usr.hand)
- else if (istype(usr, /mob/living/carbon/monkey))
+ else if(istype(usr, /mob/living/carbon/monkey))
src.attack_paw(usr, usr.hand)
- else if (istype(usr, /mob/living/carbon/alien/humanoid))
+ else if(istype(usr, /mob/living/carbon/alien/humanoid))
src.attack_alien(usr, usr.hand)
else
// ------- YOU ARE RESTRAINED CLICKING ON A HUD OBJECT -------
- if (istype(usr, /mob/living/carbon/human))
+ if(istype(usr, /mob/living/carbon/human))
src.hand_h(usr, usr.hand)
- else if (istype(usr, /mob/living/carbon/monkey))
+ else if(istype(usr, /mob/living/carbon/monkey))
src.hand_p(usr, usr.hand)
- else if (istype(usr, /mob/living/carbon/alien/humanoid))
+ else if(istype(usr, /mob/living/carbon/alien/humanoid))
src.hand_al(usr, usr.hand)
else
// ------- YOU ARE CLICKING ON AN OBJECT THAT'S INACCESSIBLE TO YOU AND IS NOT YOUR HUD -------
diff --git a/code/controllers/ProcessScheduler/core/process.dm b/code/controllers/ProcessScheduler/core/process.dm
index 620dafca4ec..55e277b4d67 100644
--- a/code/controllers/ProcessScheduler/core/process.dm
+++ b/code/controllers/ProcessScheduler/core/process.dm
@@ -171,7 +171,7 @@
main.restartProcess(src.name)
/datum/controller/process/proc/kill()
- if (!killed)
+ if(!killed)
var/msg = "[name] process was killed at tick #[ticks]."
log_debug(msg)
message_admins(msg)
@@ -186,22 +186,22 @@
// Do not call this directly - use SHECK or SCHECK_EVERY
/datum/controller/process/proc/sleepCheck(var/tickId = 0)
calls_since_last_scheck = 0
- if (killed)
+ if(killed)
// The kill proc is the only place where killed is set.
// The kill proc should have deleted this datum, and all sleeping procs that are
// owned by it.
CRASH("A killed process is still running somehow...")
- if (hung)
+ if(hung)
// This will only really help if the doWork proc ends up in an infinite loop.
handleHung()
CRASH("Process [name] hung and was restarted.")
- if (main.getCurrentTickElapsedTime() > main.timeAllowance)
+ if(main.getCurrentTickElapsedTime() > main.timeAllowance)
sleep(world.tick_lag)
cpu_defer_count++
last_slept = 0
else
- if (TimeOfTick > last_slept + sleep_interval)
+ if(TimeOfTick > last_slept + sleep_interval)
// If we haven't slept in sleep_interval deciseconds, sleep to allow other work to proceed.
sleep(0)
last_slept = TimeOfTick
@@ -213,14 +213,14 @@
var/elapsedTime = getElapsedTime()
- if (hung)
+ if(hung)
handleHung()
return
- else if (elapsedTime > hang_restart_time)
+ else if(elapsedTime > hang_restart_time)
hung()
- else if (elapsedTime > hang_alert_time)
+ else if(elapsedTime > hang_alert_time)
setStatus(PROCESS_STATUS_PROBABLY_HUNG)
- else if (elapsedTime > hang_warning_time)
+ else if(elapsedTime > hang_warning_time)
setStatus(PROCESS_STATUS_MAYBE_HUNG)
diff --git a/code/controllers/ProcessScheduler/core/processScheduler.dm b/code/controllers/ProcessScheduler/core/processScheduler.dm
index 86e1fc5bbe9..494e776650d 100644
--- a/code/controllers/ProcessScheduler/core/processScheduler.dm
+++ b/code/controllers/ProcessScheduler/core/processScheduler.dm
@@ -66,7 +66,7 @@ var/global/datum/controller/processScheduler/processScheduler
* this treatment.
*/
/datum/controller/processScheduler/proc/deferSetupFor(var/processPath)
- if (!(processPath in deferredSetupList))
+ if(!(processPath in deferredSetupList))
deferredSetupList += processPath
/datum/controller/processScheduler/proc/setup()
@@ -77,11 +77,11 @@ var/global/datum/controller/processScheduler/processScheduler
var/process
// Add all the processes we can find, except for the ticker
- for (process in subtypesof(/datum/controller/process))
- if (!(process in deferredSetupList))
+ for(process in subtypesof(/datum/controller/process))
+ if(!(process in deferredSetupList))
addProcess(new process(src))
- for (process in deferredSetupList)
+ for(process in deferredSetupList)
addProcess(new process(src))
/datum/controller/processScheduler/proc/start()
@@ -114,7 +114,7 @@ var/global/datum/controller/processScheduler/processScheduler
for(var/datum/controller/process/p in running)
p.update()
- if (isnull(p)) // Process was killed
+ if(isnull(p)) // Process was killed
continue
var/status = p.getStatus()
@@ -132,11 +132,11 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/queueProcesses()
for(var/datum/controller/process/p in processes)
// Don't double-queue, don't queue running processes
- if (p.disabled || p.running || p.queued || !p.idle)
+ if(p.disabled || p.running || p.queued || !p.idle)
continue
// If the process should be running by now, go ahead and queue it
- if (world.time >= last_queued[p] + p.schedule_interval)
+ if(world.time >= last_queued[p] + p.schedule_interval)
setQueuedProcessState(p)
/datum/controller/processScheduler/proc/runQueuedProcesses()
@@ -217,34 +217,34 @@ var/global/datum/controller/processScheduler/processScheduler
recordEnd(process)
/datum/controller/processScheduler/proc/setIdleProcessState(var/datum/controller/process/process)
- if (process in running)
+ if(process in running)
running -= process
- if (process in queued)
+ if(process in queued)
queued -= process
- if (!(process in idle))
+ if(!(process in idle))
idle += process
/datum/controller/processScheduler/proc/setQueuedProcessState(var/datum/controller/process/process)
- if (process in running)
+ if(process in running)
running -= process
- if (process in idle)
+ if(process in idle)
idle -= process
- if (!(process in queued))
+ if(!(process in queued))
queued += process
// The other state transitions are handled internally by the process.
process.queued()
/datum/controller/processScheduler/proc/setRunningProcessState(var/datum/controller/process/process)
- if (process in queued)
+ if(process in queued)
queued -= process
- if (process in idle)
+ if(process in idle)
idle -= process
- if (!(process in running))
+ if(!(process in running))
running += process
/datum/controller/processScheduler/proc/recordStart(var/datum/controller/process/process, var/time = null)
- if (isnull(time))
+ if(isnull(time))
time = TimeOfGame
last_queued[process] = world.time
last_start[process] = time
@@ -253,7 +253,7 @@ var/global/datum/controller/processScheduler/processScheduler
last_start[process] = time
/datum/controller/processScheduler/proc/recordEnd(var/datum/controller/process/process, var/time = null)
- if (isnull(time))
+ if(isnull(time))
time = TimeOfGame
var/lastRunTime = time - last_start[process]
@@ -273,7 +273,7 @@ var/global/datum/controller/processScheduler/processScheduler
highest_run_time[process] = time
var/list/lastTwenty = last_twenty_run_times[process]
- if (lastTwenty.len == 20)
+ if(lastTwenty.len == 20)
lastTwenty.Cut(1, 2)
lastTwenty.len++
lastTwenty[lastTwenty.len] = time
@@ -304,7 +304,7 @@ var/global/datum/controller/processScheduler/processScheduler
/datum/controller/processScheduler/proc/getStatusData()
var/list/data = new
- for (var/datum/controller/process/p in processes)
+ for(var/datum/controller/process/p in processes)
data.len++
data[data.len] = p.getContextData()
@@ -314,14 +314,14 @@ var/global/datum/controller/processScheduler/processScheduler
return processes.len
/datum/controller/processScheduler/proc/hasProcess(var/processName as text)
- if (nameToProcessMap[processName])
+ if(nameToProcessMap[processName])
return 1
/datum/controller/processScheduler/proc/killProcess(var/processName as text)
restartProcess(processName)
/datum/controller/processScheduler/proc/restartProcess(var/processName as text)
- if (hasProcess(processName))
+ if(hasProcess(processName))
var/datum/controller/process/oldInstance = nameToProcessMap[processName]
var/datum/controller/process/newInstance = new oldInstance.type(src)
newInstance._copyStateFrom(oldInstance)
@@ -329,24 +329,24 @@ var/global/datum/controller/processScheduler/processScheduler
oldInstance.kill()
/datum/controller/processScheduler/proc/enableProcess(var/processName as text)
- if (hasProcess(processName))
+ if(hasProcess(processName))
var/datum/controller/process/process = nameToProcessMap[processName]
process.enable()
/datum/controller/processScheduler/proc/disableProcess(var/processName as text)
- if (hasProcess(processName))
+ if(hasProcess(processName))
var/datum/controller/process/process = nameToProcessMap[processName]
process.disable()
/datum/controller/processScheduler/proc/getCurrentTickElapsedTime()
- if (world.time > currentTick)
+ if(world.time > currentTick)
updateCurrentTickData()
return 0
else
return TimeOfTick
/datum/controller/processScheduler/proc/updateCurrentTickData()
- if (world.time > currentTick)
+ if(world.time > currentTick)
// New tick!
currentTick = world.time
updateTimeAllowance()
diff --git a/code/controllers/communications.dm b/code/controllers/communications.dm
index 43bee48f267..dc7cbe6a24d 100644
--- a/code/controllers/communications.dm
+++ b/code/controllers/communications.dm
@@ -153,7 +153,7 @@ var/list/DEPT_FREQS = list(AI_FREQ, COMM_FREQ, ENG_FREQ, MED_FREQ, SEC_FREQ, SCI
/proc/frequency_span_class(var/frequency)
// Antags!
- if (frequency in ANTAG_FREQS)
+ if(frequency in ANTAG_FREQS)
return "syndradio"
// centcomm channels (deathsquid and ert)
if(frequency in CENT_FREQS)
@@ -167,7 +167,7 @@ var/list/DEPT_FREQS = list(AI_FREQ, COMM_FREQ, ENG_FREQ, MED_FREQ, SEC_FREQ, SCI
// department radio formatting (poorly optimized, ugh)
if(frequency == SEC_FREQ)
return "secradio"
- if (frequency == ENG_FREQ)
+ if(frequency == ENG_FREQ)
return "engradio"
if(frequency == SCI_FREQ)
return "sciradio"
@@ -265,17 +265,17 @@ var/global/datum/controller/radio/radio_controller
if(!start_point)
qdel(signal)
return 0
- if (filter)
+ if(filter)
send_to_filter(source, signal, filter, start_point, range)
send_to_filter(source, signal, RADIO_DEFAULT, start_point, range)
else
//Broadcast the signal to everyone!
- for (var/next_filter in devices)
+ for(var/next_filter in devices)
send_to_filter(source, signal, next_filter, start_point, range)
//Sends a signal to all machines belonging to a given filter. Should be called by post_signal()
/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, var/filter, var/turf/start_point = null, var/range = null)
- if (range && !start_point)
+ if(range && !start_point)
return
for(var/obj/device in devices[filter])
@@ -291,11 +291,11 @@ var/global/datum/controller/radio/radio_controller
device.receive_signal(signal, TRANSMISSION_RADIO, frequency)
/datum/radio_frequency/proc/add_listener(obj/device as obj, var/filter as text|null)
- if (!filter)
+ if(!filter)
filter = RADIO_DEFAULT
//log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]")
var/list/obj/devices_line = devices[filter]
- if (!devices_line)
+ if(!devices_line)
devices_line = new
devices[filter] = devices_line
devices_line+=device
@@ -305,12 +305,12 @@ var/global/datum/controller/radio/radio_controller
//log_admin("DEBUG: devices(filter_str).len=[l]")
/datum/radio_frequency/proc/remove_listener(obj/device)
- for (var/devices_filter in devices)
+ for(var/devices_filter in devices)
var/list/devices_line = devices[devices_filter]
devices_line-=device
- while (null in devices_line)
+ while(null in devices_line)
devices_line -= null
- if (devices_line.len==0)
+ if(devices_line.len==0)
devices -= devices_filter
qdel(devices_line)
@@ -335,11 +335,11 @@ var/global/datum/controller/radio/radio_controller
frequency = model.frequency
/datum/signal/proc/debug_print()
- if (source)
+ if(source)
. = "signal = {source = '[source]' ([source:x],[source:y],[source:z])\n"
else
. = "signal = {source = '[source]' ()\n"
- for (var/i in data)
+ for(var/i in data)
. += "data\[\"[i]\"\] = \"[data[i]]\"\n"
if(islist(data[i]))
var/list/L = data[i]
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index b0e3059ee6d..d3da4ccf1c3 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -181,18 +181,18 @@
/datum/configuration/New()
var/list/L = subtypesof(/datum/game_mode)
- for (var/T in L)
+ for(var/T in L)
// I wish I didn't have to instance the game modes in order to look up
// their information, but it is the only way (at least that I know of).
var/datum/game_mode/M = new T()
- if (M.config_tag)
+ if(M.config_tag)
if(!(M.config_tag in modes)) // ensure each mode is added only once
diary << "Adding game mode [M.name] ([M.config_tag]) to configuration."
src.modes += M.config_tag
src.mode_names[M.config_tag] = M.name
src.probabilities[M.config_tag] = M.probability
- if (M.votable)
+ if(M.votable)
src.votable_modes += M.config_tag
qdel(M)
src.votable_modes += "secret"
@@ -204,188 +204,188 @@
if(!t) continue
t = trim(t)
- if (length(t) == 0)
+ if(length(t) == 0)
continue
- else if (copytext(t, 1, 2) == "#")
+ else if(copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
var/value = null
- if (pos)
+ if(pos)
name = lowertext(copytext(t, 1, pos))
value = copytext(t, pos + 1)
else
name = lowertext(t)
- if (!name)
+ if(!name)
continue
if(type == "config")
- switch (name)
- if ("resource_urls")
+ switch(name)
+ if("resource_urls")
config.resource_urls = splittext(value, " ")
- if ("admin_legacy_system")
+ if("admin_legacy_system")
config.admin_legacy_system = 1
- if ("ban_legacy_system")
+ if("ban_legacy_system")
config.ban_legacy_system = 1
- if ("use_age_restriction_for_jobs")
+ if("use_age_restriction_for_jobs")
config.use_age_restriction_for_jobs = 1
- if ("use_age_restriction_for_antags")
+ if("use_age_restriction_for_antags")
config.use_age_restriction_for_antags = 1
- if ("jobs_have_minimal_access")
+ if("jobs_have_minimal_access")
config.jobs_have_minimal_access = 1
- if ("log_ooc")
+ if("log_ooc")
config.log_ooc = 1
- if ("log_access")
+ if("log_access")
config.log_access = 1
- if ("log_say")
+ if("log_say")
config.log_say = 1
- if ("log_admin")
+ if("log_admin")
config.log_admin = 1
- if ("log_debug")
+ if("log_debug")
config.log_debug = text2num(value)
- if ("log_game")
+ if("log_game")
config.log_game = 1
- if ("log_vote")
+ if("log_vote")
config.log_vote = 1
- if ("log_whisper")
+ if("log_whisper")
config.log_whisper = 1
- if ("log_attack")
+ if("log_attack")
config.log_attack = 1
- if ("log_emote")
+ if("log_emote")
config.log_emote = 1
- if ("log_adminchat")
+ if("log_adminchat")
config.log_adminchat = 1
- if ("log_adminwarn")
+ if("log_adminwarn")
config.log_adminwarn = 1
- if ("log_pda")
+ if("log_pda")
config.log_pda = 1
- if ("log_world_output")
+ if("log_world_output")
config.log_world_output = 1
- if ("log_hrefs")
+ if("log_hrefs")
config.log_hrefs = 1
- if ("log_runtime")
+ if("log_runtime")
config.log_runtime = 1
- if ("mentors")
+ if("mentors")
config.mods_are_mentors = 1
if("allow_admin_ooccolor")
config.allow_admin_ooccolor = 1
- if ("allow_vote_restart")
+ if("allow_vote_restart")
config.allow_vote_restart = 1
- if ("allow_vote_mode")
+ if("allow_vote_mode")
config.allow_vote_mode = 1
if("no_dead_vote")
config.vote_no_dead = 1
- if ("default_no_vote")
+ if("default_no_vote")
config.vote_no_default = 1
- if ("vote_delay")
+ if("vote_delay")
config.vote_delay = text2num(value)
- if ("vote_period")
+ if("vote_period")
config.vote_period = text2num(value)
- if ("allow_ai")
+ if("allow_ai")
config.allow_ai = 1
-// if ("authentication")
+// if("authentication")
// config.enable_authentication = 1
- if ("norespawn")
+ if("norespawn")
config.respawn = 0
- if ("servername")
+ if("servername")
config.server_name = value
- if ("serversuffix")
+ if("serversuffix")
config.server_suffix = 1
- if ("nudge_script_path")
+ if("nudge_script_path")
config.nudge_script_path = value
- if ("hostedby")
+ if("hostedby")
config.hostedby = value
- if ("server")
+ if("server")
config.server = value
- if ("banappeals")
+ if("banappeals")
config.banappeals = value
- if ("wikiurl")
+ if("wikiurl")
config.wikiurl = value
- if ("forumurl")
+ if("forumurl")
config.forumurl = value
- if ("rulesurl")
+ if("rulesurl")
config.rulesurl = value
- if ("donationsurl")
+ if("donationsurl")
config.donationsurl = value
- if ("repositoryurl")
+ if("repositoryurl")
config.repositoryurl = value
- if ("guest_jobban")
+ if("guest_jobban")
config.guest_jobban = 1
- if ("guest_ban")
+ if("guest_ban")
guests_allowed = 0
- if ("usewhitelist")
+ if("usewhitelist")
config.usewhitelist = 1
- if ("feature_object_spell_system")
+ if("feature_object_spell_system")
config.feature_object_spell_system = 1
- if ("allow_metadata")
+ if("allow_metadata")
config.allow_Metadata = 1
- if ("traitor_scaling")
+ if("traitor_scaling")
config.traitor_scaling = 1
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
- if ("probability")
+ if("probability")
var/prob_pos = findtext(value, " ")
var/prob_name = null
var/prob_value = null
- if (prob_pos)
+ if(prob_pos)
prob_name = lowertext(copytext(value, 1, prob_pos))
prob_value = copytext(value, prob_pos + 1)
- if (prob_name in config.modes)
+ if(prob_name in config.modes)
config.probabilities[prob_name] = text2num(prob_value)
else
diary << "Unknown game mode probability configuration definition: [prob_name]."
@@ -611,11 +611,11 @@
config.reactionary_explosions = 1
if("bombcap")
var/BombCap = text2num(value)
- if (!BombCap)
+ if(!BombCap)
continue
- if (BombCap < 4)
+ if(BombCap < 4)
BombCap = 4
- if (BombCap > 128)
+ if(BombCap > 128)
BombCap = 128
MAX_EX_DEVESTATION_RANGE = round(BombCap/4)
@@ -634,36 +634,36 @@
if(!t) continue
t = trim(t)
- if (length(t) == 0)
+ if(length(t) == 0)
continue
- else if (copytext(t, 1, 2) == "#")
+ else if(copytext(t, 1, 2) == "#")
continue
var/pos = findtext(t, " ")
var/name = null
var/value = null
- if (pos)
+ if(pos)
name = lowertext(copytext(t, 1, pos))
value = copytext(t, pos + 1)
else
name = lowertext(t)
- if (!name)
+ if(!name)
continue
- switch (name)
+ switch(name)
if("sql_enabled")
config.sql_enabled = 1
- if ("address")
+ if("address")
sqladdress = value
- if ("port")
+ if("port")
sqlport = value
- if ("feedback_database")
+ if("feedback_database")
sqlfdbkdb = value
- if ("feedback_login")
+ if("feedback_login")
sqlfdbklogin = value
- if ("feedback_password")
+ if("feedback_password")
sqlfdbkpass = value
if("feedback_tableprefix")
sqlfdbktableprefix = value
@@ -676,9 +676,9 @@
if(!t) continue
t = trim(t)
- if (length(t) == 0)
+ if(length(t) == 0)
continue
- else if (copytext(t, 1, 2) == "#")
+ else if(copytext(t, 1, 2) == "#")
continue
config.overflow_whitelist += t
@@ -686,25 +686,25 @@
/datum/configuration/proc/pick_mode(mode_name)
// I wish I didn't have to instance the game modes in order to look up
// their information, but it is the only way (at least that I know of).
- for (var/T in subtypesof(/datum/game_mode))
+ for(var/T in subtypesof(/datum/game_mode))
var/datum/game_mode/M = new T()
- if (M.config_tag && M.config_tag == mode_name)
+ if(M.config_tag && M.config_tag == mode_name)
return M
qdel(M)
return new /datum/game_mode/extended()
/datum/configuration/proc/get_runnable_modes()
var/list/datum/game_mode/runnable_modes = new
- for (var/T in subtypesof(/datum/game_mode))
+ for(var/T in subtypesof(/datum/game_mode))
var/datum/game_mode/M = new T()
// to_chat(world, "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]")
- if (!(M.config_tag in modes))
+ if(!(M.config_tag in modes))
qdel(M)
continue
- if (probabilities[M.config_tag]<=0)
+ if(probabilities[M.config_tag]<=0)
qdel(M)
continue
- if (M.can_start())
+ if(M.can_start())
runnable_modes[M] = probabilities[M.config_tag]
// to_chat(world, "DEBUG: runnable_mode\[[runnable_modes.len]\] = [M.config_tag]")
return runnable_modes
diff --git a/code/controllers/failsafe.dm b/code/controllers/failsafe.dm
index 2775590dab6..afb0e68d83f 100644
--- a/code/controllers/failsafe.dm
+++ b/code/controllers/failsafe.dm
@@ -18,8 +18,8 @@ var/global/datum/controller/failsafe/failsafe
. = ..()
// There can be only one failsafe. Out with the old in with the new (that way we can restart the Failsafe by spawning a new one).
- if (failsafe != src)
- if (istype(failsafe))
+ if(failsafe != src)
+ if(istype(failsafe))
recover()
qdel(failsafe)
diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm
index 97c490852b6..25b038554cc 100644
--- a/code/controllers/verbs.dm
+++ b/code/controllers/verbs.dm
@@ -28,7 +28,7 @@
if("Master")
debug_variables(master_controller)
feedback_add_details("admin_verb","DMC")
- if ("failsafe")
+ if("failsafe")
debug_variables(failsafe)
feedback_add_details("admin_verb", "dfailsafe")
if("Ticker")
diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm
index 7816e88e556..52c976ec470 100644
--- a/code/controllers/voting.dm
+++ b/code/controllers/voting.dm
@@ -200,7 +200,7 @@ datum/controller/vote
return 0
choices.Add(config.votable_modes)
if("crew_transfer")
- if (check_rights(R_ADMIN|R_MOD))
+ if(check_rights(R_ADMIN|R_MOD))
if(ticker.current_state <= 2)
return 0
question = "End the shift?"
diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm
index 4af13e256fd..0f796798d26 100644
--- a/code/datums/ai_laws.dm
+++ b/code/datums/ai_laws.dm
@@ -83,17 +83,17 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
if(full_sync || supplied_laws.len)
S.laws.clear_supplied_laws()
- for (var/datum/ai_law/law in ion_laws)
+ for(var/datum/ai_law/law in ion_laws)
S.laws.add_ion_law(law.law)
- for (var/datum/ai_law/law in inherent_laws)
+ for(var/datum/ai_law/law in inherent_laws)
S.laws.add_inherent_law(law.law)
- for (var/datum/ai_law/law in supplied_laws)
+ for(var/datum/ai_law/law in supplied_laws)
if(law)
S.laws.add_supplied_law(law.index, law.law)
/mob/living/silicon/proc/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg)
- if (!is_special_character(src) || mind.original != src)
+ if(!is_special_character(src) || mind.original != src)
if(zeroth_law_borg)
laws.set_zeroth_law(zeroth_law_borg.law)
else if(zeroth_law)
@@ -159,7 +159,7 @@ var/global/const/base_law_type = /datum/ai_laws/nanotrasen
if(supplied_laws.len >= number && supplied_laws[number])
delete_law(supplied_laws[number])
- while (src.supplied_laws.len < number)
+ while(src.supplied_laws.len < number)
src.supplied_laws += ""
if(state_supplied.len < supplied_laws.len)
state_supplied += 1
diff --git a/code/datums/browser.dm b/code/datums/browser.dm
index e8f17f17ad0..85f8e52e89d 100644
--- a/code/datums/browser.dm
+++ b/code/datums/browser.dm
@@ -20,13 +20,13 @@
user = nuser
window_id = nwindow_id
- if (ntitle)
+ if(ntitle)
title = format_text(ntitle)
- if (nwidth)
+ if(nwidth)
width = nwidth
- if (nheight)
+ if(nheight)
height = nheight
- if (nref)
+ if(nref)
ref = nref
add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs
@@ -60,18 +60,18 @@
/datum/browser/proc/get_header()
var/key
var/filename
- for (key in stylesheets)
+ for(key in stylesheets)
filename = "[ckey(key)].css"
user << browse_rsc(stylesheets[key], filename)
head_content += ""
- for (key in scripts)
+ for(key in scripts)
filename = "[ckey(key)].js"
user << browse_rsc(scripts[key], filename)
head_content += ""
var/title_attributes = "class='uiTitle'"
- if (title_image)
+ if(title_image)
title_attributes = "class='uiTitle icon' style='background-image: url([title_image]);'"
return {"
@@ -103,10 +103,10 @@
/datum/browser/proc/open(var/use_onclose = 1)
var/window_size = ""
- if (width && height)
+ if(width && height)
window_size = "size=[width]x[height];"
user << browse(get_content(), "window=[window_id];[window_size][window_options]")
- if (use_onclose)
+ if(use_onclose)
onclose(user, window_id, ref)
/datum/browser/proc/close()
@@ -118,7 +118,7 @@
/mob/proc/browse_rsc_icon(icon, icon_state, dir = -1)
/*
var/icon/I
- if (dir >= 0)
+ if(dir >= 0)
I = new /icon(icon, icon_state, dir)
else
I = new /icon(icon, icon_state)
diff --git a/code/datums/cache/apc.dm b/code/datums/cache/apc.dm
index f50b0a8e121..4271886ac4b 100644
--- a/code/datums/cache/apc.dm
+++ b/code/datums/cache/apc.dm
@@ -11,7 +11,7 @@ var/global/datum/repository/apc/apc_repository = new()
if(world.time < cache_entry.timestamp)
return cache_entry.data
- if (powermonitor && !isnull(powermonitor.powernet))
+ if(powermonitor && !isnull(powermonitor.powernet))
var/list/L = list()
for(var/obj/machinery/power/terminal/term in powermonitor.powernet.nodes)
if(istype(term.master, /obj/machinery/power/apc))
diff --git a/code/datums/cache/crew.dm b/code/datums/cache/crew.dm
index 0afb70a4404..2912b8c6753 100644
--- a/code/datums/cache/crew.dm
+++ b/code/datums/cache/crew.dm
@@ -62,6 +62,6 @@ var/global/datum/repository/crew/crew_repository = new()
for(var/mob/living/carbon/human/H in mob_list)
if(istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/C = H.w_uniform
- if (C.has_sensor)
+ if(C.has_sensor)
tracked |= C
return tracked
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index ff081676b43..f9c3ce39b08 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -17,7 +17,7 @@
var/real_title = assignment
for(var/datum/data/record/t in data_core.general)
- if (t)
+ if(t)
if(t.fields["name"] == name)
foundrecord = t
break
@@ -131,7 +131,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
var/g = "m"
- if (H.gender == FEMALE)
+ if(H.gender == FEMALE)
g = "f"
var/icon/icobase = H.species.icobase
@@ -153,7 +153,7 @@ proc/get_id_photo(var/mob/living/carbon/human/H)
// Skin tone
if(H.species.bodyflags & HAS_SKIN_TONE)
- if (H.s_tone >= 0)
+ if(H.s_tone >= 0)
preview_icon.Blend(rgb(H.s_tone, H.s_tone, H.s_tone), ICON_ADD)
else
preview_icon.Blend(rgb(-H.s_tone, -H.s_tone, -H.s_tone), ICON_SUBTRACT)
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index eeb26f5f6f2..1413b5c7dc9 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -20,7 +20,7 @@
title = "[A.name] (\ref[A]) = [A.type]"
#ifdef VARSICON
- if (A.icon)
+ if(A.icon)
body += debug_variable("icon", new/icon(A.icon, A.icon_state, A.dir), 0)
#endif
@@ -43,11 +43,11 @@
if(event.keyCode == 13){ //Enter / return
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
- for ( var i = 0; i < lis.length; ++i )
+ for( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
- if ( li.style.backgroundColor == "#ffee88" )
+ if( li.style.backgroundColor == "#ffee88" )
{
alist = lis\[i\].getElementsByTagName("a")
if(alist.length > 0){
@@ -62,11 +62,11 @@
if(event.keyCode == 38){ //Up arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
- for ( var i = 0; i < lis.length; ++i )
+ for( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
- if ( li.style.backgroundColor == "#ffee88" )
+ if( li.style.backgroundColor == "#ffee88" )
{
if( (i-1) >= 0){
var li_new = lis\[i-1\];
@@ -83,11 +83,11 @@
if(event.keyCode == 40){ //Down arrow
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
- for ( var i = 0; i < lis.length; ++i )
+ for( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
- if ( li.style.backgroundColor == "#ffee88" )
+ if( li.style.backgroundColor == "#ffee88" )
{
if( (i+1) < lis.length){
var li_new = lis\[i+1\];
@@ -113,11 +113,11 @@
var vars_ol = document.getElementById('vars');
var lis = vars_ol.getElementsByTagName("li");
- for ( var i = 0; i < lis.length; ++i )
+ for( var i = 0; i < lis.length; ++i )
{
try{
var li = lis\[i\];
- if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
+ if( li.innerText.toLowerCase().indexOf(filter) == -1 )
{
vars_ol.removeChild(li);
i--;
@@ -126,10 +126,10 @@
}
}
var lis_new = vars_ol.getElementsByTagName("li");
- for ( var j = 0; j < lis_new.length; ++j )
+ for( var j = 0; j < lis_new.length; ++j )
{
var li1 = lis\[j\];
- if (j == 0){
+ if(j == 0){
li1.style.backgroundColor = "#ffee88";
}else{
li1.style.backgroundColor = "white";
@@ -293,18 +293,18 @@
body += ""
var/list/names = list()
- for (var/V in D.vars)
+ for(var/V in D.vars)
names += V
names = sortList(names)
- for (var/V in names)
+ for(var/V in names)
body += debug_variable(V, D.vars[V], 0, D)
body += "
"
var/html = ""
- if (title)
+ if(title)
html += "[title]"
html += {"