diff --git a/baystation12.dme b/baystation12.dme
index d6dee8af999..a7176e3b98a 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -577,6 +577,7 @@
#include "code\game\objects\items\weapons\surgery_tools.dm"
#include "code\game\objects\items\weapons\swords_axes_etc.dm"
#include "code\game\objects\items\weapons\table_rack_parts.dm"
+#include "code\game\objects\items\weapons\tape.dm"
#include "code\game\objects\items\weapons\teleportation.dm"
#include "code\game\objects\items\weapons\tools.dm"
#include "code\game\objects\items\weapons\twohanded.dm"
diff --git a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
index 649972297a3..aed8b2dc07e 100644
--- a/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/binary_atmos_base.dm
@@ -1,5 +1,5 @@
obj/machinery/atmospherics/binary
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH|NORTH
use_power = 1
diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm
index 0ac8ab62997..cb9ecfbdc58 100644
--- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm
@@ -111,7 +111,7 @@
if (usr.stat || usr.restrained() || anchored)
return
- src.dir = turn(src.dir, 90)
+ src.set_dir(turn(src.dir, 90))
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
@@ -123,5 +123,5 @@
if (usr.stat || usr.restrained() || anchored)
return
- src.dir = turn(src.dir, -90)
+ src.set_dir(turn(src.dir, -90))
desc = initial(desc) + " Its outlet port is to the [dir2text(dir)]."
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
index 7f0984efd7e..6923b6d31eb 100644
--- a/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/pipeturbine.dm
@@ -129,7 +129,7 @@
if (usr.stat || usr.restrained() || anchored)
return
- src.dir = turn(src.dir, -90)
+ src.set_dir(turn(src.dir, -90))
verb/rotate_anticlockwise()
@@ -140,7 +140,7 @@
if (usr.stat || usr.restrained() || anchored)
return
- src.dir = turn(src.dir, 90)
+ src.set_dir(turn(src.dir, 90))
//Goddamn copypaste from binary base class because atmospherics machinery API is not damn flexible
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
@@ -276,7 +276,7 @@
if (usr.stat || usr.restrained() || anchored)
return
- src.dir = turn(src.dir, -90)
+ src.set_dir(turn(src.dir, -90))
verb/rotate_anticlock()
set category = "Object"
@@ -286,4 +286,4 @@
if (usr.stat || usr.restrained() || anchored)
return
- src.dir = turn(src.dir, 90)
\ No newline at end of file
+ src.set_dir(turn(src.dir, 90))
\ No newline at end of file
diff --git a/code/ATMOSPHERICS/components/portables_connector.dm b/code/ATMOSPHERICS/components/portables_connector.dm
index 4bfd61a0a2a..488c1eeb915 100644
--- a/code/ATMOSPHERICS/components/portables_connector.dm
+++ b/code/ATMOSPHERICS/components/portables_connector.dm
@@ -5,7 +5,7 @@
name = "Connector Port"
desc = "For connecting portables devices related to atmospherics control."
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH
var/obj/machinery/portable_atmospherics/connected_device
diff --git a/code/ATMOSPHERICS/components/trinary_devices/filter.dm b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
index 5649b25e012..4f5205687ed 100755
--- a/code/ATMOSPHERICS/components/trinary_devices/filter.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/filter.dm
@@ -248,7 +248,7 @@
/obj/machinery/atmospherics/trinary/filter/m_filter
icon_state = "mmap"
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH|NORTH|EAST
obj/machinery/atmospherics/trinary/filter/m_filter/New()
diff --git a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
index 051a2ced27f..9432518b539 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/mixer.dm
@@ -181,7 +181,7 @@
obj/machinery/atmospherics/trinary/mixer/t_mixer
icon_state = "tmap"
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH|EAST|WEST
//node 3 is the outlet, nodes 1 & 2 are intakes
@@ -227,7 +227,7 @@ obj/machinery/atmospherics/trinary/mixer/t_mixer/initialize()
obj/machinery/atmospherics/trinary/mixer/m_mixer
icon_state = "mmap"
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH|NORTH|EAST
//node 3 is the outlet, nodes 1 & 2 are intakes
diff --git a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
index 822c9a4d6dc..ce3aafc9536 100644
--- a/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
+++ b/code/ATMOSPHERICS/components/trinary_devices/trinary_base.dm
@@ -1,5 +1,5 @@
obj/machinery/atmospherics/trinary
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH|NORTH|WEST
use_power = 1
diff --git a/code/ATMOSPHERICS/components/tvalve.dm b/code/ATMOSPHERICS/components/tvalve.dm
index 39ca1e25fd8..4d931bd3249 100644
--- a/code/ATMOSPHERICS/components/tvalve.dm
+++ b/code/ATMOSPHERICS/components/tvalve.dm
@@ -6,7 +6,7 @@
desc = "A pipe valve"
level = 1
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH|NORTH|WEST
var/state = 0 // 0 = go straight, 1 = go to side
diff --git a/code/ATMOSPHERICS/components/unary/oxygen_generator.dm b/code/ATMOSPHERICS/components/unary/oxygen_generator.dm
index 14bbb46bbaa..c3ccdbc574b 100644
--- a/code/ATMOSPHERICS/components/unary/oxygen_generator.dm
+++ b/code/ATMOSPHERICS/components/unary/oxygen_generator.dm
@@ -6,7 +6,7 @@ obj/machinery/atmospherics/unary/oxygen_generator
name = "Oxygen Generator"
desc = ""
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH
var/on = 0
diff --git a/code/ATMOSPHERICS/components/unary/unary_base.dm b/code/ATMOSPHERICS/components/unary/unary_base.dm
index 8af26e51eb3..8d850cc74fa 100644
--- a/code/ATMOSPHERICS/components/unary/unary_base.dm
+++ b/code/ATMOSPHERICS/components/unary/unary_base.dm
@@ -1,5 +1,5 @@
/obj/machinery/atmospherics/unary
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH
//layer = TURF_LAYER+0.1
diff --git a/code/ATMOSPHERICS/components/valve.dm b/code/ATMOSPHERICS/components/valve.dm
index bce38d06545..4633c06511f 100644
--- a/code/ATMOSPHERICS/components/valve.dm
+++ b/code/ATMOSPHERICS/components/valve.dm
@@ -6,7 +6,7 @@
desc = "A pipe valve"
level = 1
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH|NORTH
var/open = 0
@@ -123,9 +123,9 @@
/obj/machinery/atmospherics/valve/proc/normalize_dir()
if(dir==3)
- dir = 1
+ set_dir(1)
else if(dir==12)
- dir = 4
+ set_dir(4)
/obj/machinery/atmospherics/valve/attack_ai(mob/user as mob)
return
diff --git a/code/ATMOSPHERICS/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm
index 631f3530a24..ce23f7bfba3 100644
--- a/code/ATMOSPHERICS/mainspipe.dm
+++ b/code/ATMOSPHERICS/mainspipe.dm
@@ -115,7 +115,7 @@ obj/machinery/atmospherics/mains_pipe/simple
name = "mains pipe"
desc = "A one meter section of 3-line mains pipe"
- dir = SOUTH
+ set_dir(SOUTH)
initialize_mains_directions = SOUTH|NORTH
New()
@@ -137,9 +137,9 @@ obj/machinery/atmospherics/mains_pipe/simple
proc/normalize_dir()
if(dir==3)
- dir = 1
+ set_dir(1)
else if(dir==12)
- dir = 4
+ set_dir(4)
update_icon()
if(nodes[1] && nodes[2])
@@ -148,7 +148,7 @@ obj/machinery/atmospherics/mains_pipe/simple
//var/node1_direction = get_dir(src, node1)
//var/node2_direction = get_dir(src, node2)
- //dir = node1_direction|node2_direction
+ //set_dir(node1_direction|node2_direction)
else
if(!nodes[1]&&!nodes[2])
@@ -196,7 +196,7 @@ obj/machinery/atmospherics/mains_pipe/manifold
name = "manifold pipe"
desc = "A manifold composed of mains pipes"
- dir = SOUTH
+ set_dir(SOUTH)
initialize_mains_directions = EAST|NORTH|WEST
volume = 105
@@ -261,7 +261,7 @@ obj/machinery/atmospherics/mains_pipe/manifold4w
name = "manifold pipe"
desc = "A manifold composed of mains pipes"
- dir = SOUTH
+ set_dir(SOUTH)
initialize_mains_directions = EAST|NORTH|WEST|SOUTH
volume = 105
@@ -504,7 +504,7 @@ obj/machinery/atmospherics/mains_pipe/cap
name = "pipe cap"
desc = "A cap for the end of a mains pipe"
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH
volume = 35
@@ -546,7 +546,7 @@ obj/machinery/atmospherics/mains_pipe/valve
var/open = 1
- dir = SOUTH
+ set_dir(SOUTH)
initialize_mains_directions = SOUTH|NORTH
New()
@@ -597,9 +597,9 @@ obj/machinery/atmospherics/mains_pipe/valve
proc/normalize_dir()
if(dir==3)
- dir = 1
+ set_dir(1)
else if(dir==12)
- dir = 4
+ set_dir(4)
proc/open()
if(open) return 0
diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm
index 53910f2fe3d..037d39218ae 100644
--- a/code/ATMOSPHERICS/pipes.dm
+++ b/code/ATMOSPHERICS/pipes.dm
@@ -143,7 +143,7 @@
volume = ATMOS_DEFAULT_VOLUME_PIPE
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH|NORTH
var/obj/machinery/atmospherics/node1
@@ -216,9 +216,9 @@
/obj/machinery/atmospherics/pipe/simple/proc/normalize_dir()
if(dir==3)
- dir = 1
+ set_dir(1)
else if(dir==12)
- dir = 4
+ set_dir(4)
/obj/machinery/atmospherics/pipe/simple/Del()
if(node1)
@@ -406,7 +406,7 @@
volume = ATMOS_DEFAULT_VOLUME_PIPE * 1.5
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = EAST|NORTH|WEST
var/obj/machinery/atmospherics/node1
@@ -658,7 +658,7 @@
volume = ATMOS_DEFAULT_VOLUME_PIPE * 2
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = NORTH|SOUTH|EAST|WEST
var/obj/machinery/atmospherics/node1
@@ -918,7 +918,7 @@
volume = 35
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH
var/obj/machinery/atmospherics/node
@@ -1042,7 +1042,7 @@
var/start_pressure = 25*ONE_ATMOSPHERE
level = 1
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH
density = 1
@@ -1220,7 +1220,7 @@
volume = 250
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH
var/build_killswitch = 1
@@ -1259,7 +1259,7 @@
if(node1)
icon_state = "intact"
- dir = get_dir(src, node1)
+ set_dir(get_dir(src, node1))
else
icon_state = "exposed"
@@ -1291,7 +1291,7 @@
/obj/machinery/atmospherics/pipe/vent/hide(var/i) //to make the little pipe section invisible, the icon changes.
if(node1)
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
- dir = get_dir(src, node1)
+ set_dir(get_dir(src, node1))
else
icon_state = "exposed"
diff --git a/code/FEA/FEA_fire.dm b/code/FEA/FEA_fire.dm
index bb71f31d47f..b7a8d42fa5e 100644
--- a/code/FEA/FEA_fire.dm
+++ b/code/FEA/FEA_fire.dm
@@ -167,7 +167,7 @@
/obj/effect/hotspot/New()
..()
- dir = pick(cardinal)
+ set_dir(pick(cardinal))
return
/*
diff --git a/code/TriDimension/Pipes.dm b/code/TriDimension/Pipes.dm
index 4132ddfe947..4f38444e988 100644
--- a/code/TriDimension/Pipes.dm
+++ b/code/TriDimension/Pipes.dm
@@ -10,7 +10,7 @@ obj/machinery/atmospherics/pipe/zpipe
volume = 70
- dir = SOUTH
+ set_dir(SOUTH)
initialize_directions = SOUTH
var/obj/machinery/atmospherics/node1 //connection on the same Z
@@ -84,9 +84,9 @@ obj/machinery/atmospherics/pipe/zpipe/proc/burst()
obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
if(dir==3)
- dir = 1
+ set_dir(1)
else if(dir==12)
- dir = 4
+ set_dir(4)
obj/machinery/atmospherics/pipe/zpipe/Del()
if(node1)
diff --git a/code/TriDimension/Structures.dm b/code/TriDimension/Structures.dm
index fa91ccd5bb6..554853535a7 100644
--- a/code/TriDimension/Structures.dm
+++ b/code/TriDimension/Structures.dm
@@ -256,8 +256,8 @@
initialise_stair_connection(S, src, inv_dir)
proc/initialise_stair_connection(var/obj/multiz/stairs/top, var/obj/multiz/stairs/bottom, var/dir)
- top.dir = dir
- bottom.dir = dir
+ top.set_dir(dir)
+ bottom.set_dir(dir)
top.connected = bottom
bottom.connected = top
top.icon_state = "ramptop"
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
index 95f7c265565..7e350dc3a06 100644
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm
@@ -368,7 +368,7 @@
var/predir = M.dir
step(M, throw_dir)
- M.dir = predir
+ M.set_dir(predir)
//gives turf a different description, to try and trick players
/obj/effect/step_trigger/trap/fake
diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm
index ffc1265b7dd..7ae07059f7d 100644
--- a/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm
@@ -62,7 +62,7 @@
continue moving
var/turf/X = new T.type(B)
- X.dir = old_dir1
+ X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port_construction.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port_construction.dm
index b012d1c360e..0c12ed23a01 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port_construction.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_assembly_port_construction.dm
@@ -39,7 +39,7 @@
// offset 24 pixels in direction of dir
// this allows the APC to be embedded in a wall, yet still inside an area
if (building)
- dir = ndir
+ set_dir(ndir)
else
has_electronics = 3
opened = 0
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor_construction.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor_construction.dm
index fab9eb87d5c..3d2e32f971e 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor_construction.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_compressor_construction.dm
@@ -39,7 +39,7 @@
// offset 24 pixels in direction of dir
// this allows the APC to be embedded in a wall, yet still inside an area
if (building)
- dir = ndir
+ set_dir(ndir)
else
has_electronics = 3
opened = 0
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
index e3441dafd86..ad7ea622e25 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/fuel_injector.dm
@@ -294,7 +294,7 @@
if (usr.stat || usr.restrained() || anchored)
return
- src.dir = turn(src.dir, 90)
+ src.set_dir(turn(src.dir, 90))
/obj/machinery/power/rust_fuel_injector/verb/rotate_anticlock()
set category = "Object"
@@ -304,4 +304,4 @@
if (usr.stat || usr.restrained() || anchored)
return
- src.dir = turn(src.dir, -90)
\ No newline at end of file
+ src.set_dir(turn(src.dir, -90))
\ No newline at end of file
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
index f375716b21e..0fff75bb508 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/gyrotron.dm
@@ -95,7 +95,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
- A.dir = src.dir
+ A.set_dir(src.dir)
if(src.dir == 1)//Up
A.yo = 20
A.xo = 0
@@ -125,7 +125,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()*/
- A.dir = src.dir
+ A.set_dir(src.dir)
if(src.dir == 1)//Up
A.yo = 20
A.xo = 0
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/radiation.dm b/code/WorkInProgress/Cael_Aislinn/Rust/radiation.dm
index 155ef23c5c6..b94127ffa2b 100644
--- a/code/WorkInProgress/Cael_Aislinn/Rust/radiation.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Rust/radiation.dm
@@ -26,7 +26,7 @@
if(!dir)
RadiateParticleRand(energy, ionizing)
var/obj/effect/accelerated_particle/particle = new
- particle.dir = dir
+ particle.set_dir(dir)
particle.ionizing = ionizing
if(energy)
particle.energy = energy
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm
index 38032c459ca..3782e76209c 100644
--- a/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/Laser2.dm
@@ -22,7 +22,7 @@
if(!first)
src.first = new /obj/beam/e_beam(src.loc)
src.first.master = src
- src.first.dir = src.dir
+ src.first.set_dir(src.dir)
src.first.power = src.power
src.first.freq = src.freq
src.first.phase = src.phase
@@ -61,7 +61,7 @@
if(!next)
if(get_step(src.loc,src.dir))
var/obj/beam/e_beam/e = new /obj/beam/e_beam(src.loc)
- e.dir = src.dir
+ e.set_dir(src.dir)
src.next = e
e.master = src.master
e.power = src.power
diff --git a/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm b/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
index 04c07733df2..66ccf181bd8 100644
--- a/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
+++ b/code/WorkInProgress/Cael_Aislinn/Supermatter/ZeroPointLaser.dm
@@ -34,7 +34,7 @@
if (src.anchored || usr:stat)
usr << "It is fastened to the floor!"
return 0
- src.dir = turn(src.dir, 90)
+ src.set_dir(turn(src.dir, 90))
return 1
/obj/machinery/zero_point_emitter/New()
@@ -98,7 +98,7 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
- A.dir = src.dir
+ A.set_dir(src.dir)
switch(dir)
if(NORTH)
A.yo = 20
diff --git a/code/WorkInProgress/Cael_Aislinn/meteor_battery.dm b/code/WorkInProgress/Cael_Aislinn/meteor_battery.dm
index 85bcc084b7a..9ebc5fa5dec 100644
--- a/code/WorkInProgress/Cael_Aislinn/meteor_battery.dm
+++ b/code/WorkInProgress/Cael_Aislinn/meteor_battery.dm
@@ -13,7 +13,7 @@
/obj/item/projectile/missile/process(var/turf/newtarget)
target = newtarget
- dir = get_dir(src.loc, target)
+ set_dir(get_dir(src.loc, target))
walk_towards(src, target, MISSILE_SPEED)
/obj/item/projectile/missile/Bump(atom/A)
@@ -164,7 +164,7 @@
/obj/machinery/meteor_battery/proc/target()
while(src && enabled && !stat)
- src.dir = get_dir(src, cur_target)
+ src.set_dir(get_dir(src, cur_target))
shootAt(cur_target)
sleep(shot_delay)
return
diff --git a/code/WorkInProgress/Cael_Aislinn/sculpture.dm b/code/WorkInProgress/Cael_Aislinn/sculpture.dm
index 639c2c84877..808e968f55e 100644
--- a/code/WorkInProgress/Cael_Aislinn/sculpture.dm
+++ b/code/WorkInProgress/Cael_Aislinn/sculpture.dm
@@ -56,7 +56,7 @@
continue
turfs += thisturf
var/turf/target_turf = pick(turfs)
- src.dir = get_dir(src, target_turf)
+ src.set_dir(get_dir(src, target_turf))
src.loc = target_turf
hibernate = 1
@@ -193,7 +193,7 @@
if(!next_turf.CanPass(src, next_turf))
break
src.loc = next_turf
- src.dir = get_dir(src, target_mob)
+ src.set_dir(get_dir(src, target_mob))
next_turf = get_step(src, get_dir(next_turf,target_mob))
num_turfs--
@@ -233,7 +233,7 @@
if(!next_turf.CanPass(src, next_turf))
break
src.loc = next_turf
- src.dir = get_dir(src, target_mob)
+ src.set_dir(get_dir(src, target_mob))
next_turf = get_step(src, get_dir(next_turf,target_turf))
num_turfs--
else if(G)
diff --git a/code/WorkInProgress/Chinsky/overmap/ships/engines/thermal.dm b/code/WorkInProgress/Chinsky/overmap/ships/engines/thermal.dm
index b26e7216389..44a7dcb84f9 100644
--- a/code/WorkInProgress/Chinsky/overmap/ships/engines/thermal.dm
+++ b/code/WorkInProgress/Chinsky/overmap/ships/engines/thermal.dm
@@ -89,7 +89,7 @@
anchored = 1
New(var/turf/nloc, var/ndir, var/temp)
- dir = ndir
+ set_dir(ndir)
..(nloc)
if(nloc)
diff --git a/code/WorkInProgress/Cib/amorph/amorph_hud.dm b/code/WorkInProgress/Cib/amorph/amorph_hud.dm
index c9a4ef0cc9c..41a3adc9f58 100644
--- a/code/WorkInProgress/Cib/amorph/amorph_hud.dm
+++ b/code/WorkInProgress/Cib/amorph/amorph_hud.dm
@@ -46,7 +46,7 @@
using = new /obj/screen( src )
using.name = "act_intent"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
@@ -105,7 +105,7 @@
using = new /obj/screen( src )
using.name = "mov_intent"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
@@ -123,7 +123,7 @@
using = new /obj/screen( src )
using.name = "r_hand"
- using.dir = WEST
+ using.set_dir(WEST)
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
@@ -135,7 +135,7 @@
using = new /obj/screen( src )
using.name = "l_hand"
- using.dir = EAST
+ using.set_dir(EAST)
using.icon = ui_style
using.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
@@ -147,7 +147,7 @@
using = new /obj/screen( src )
using.name = "hand"
- using.dir = SOUTH
+ using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
@@ -156,7 +156,7 @@
using = new /obj/screen( src )
using.name = "hand"
- using.dir = SOUTH
+ using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
@@ -165,7 +165,7 @@
using = new /obj/screen( src )
using.name = "mask"
- using.dir = NORTH
+ using.set_dir(NORTH)
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_monkey_mask
@@ -174,7 +174,7 @@
using = new /obj/screen( src )
using.name = "back"
- using.dir = NORTHEAST
+ using.set_dir(NORTHEAST)
using.icon = ui_style
using.icon_state = "equip"
using.screen_loc = ui_back
@@ -291,19 +291,19 @@
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
- mymob.gun_setting_icon.dir = 2
+ mymob.gun_setting_icon.set_dir(2)
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
- mymob.item_use_icon.dir = 1
+ mymob.item_use_icon.set_dir(1)
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
- mymob.gun_move_icon.dir = 1
+ mymob.gun_move_icon.set_dir(1)
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
- mymob.gun_run_icon.dir = 1
+ mymob.gun_run_icon.set_dir(1)
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
diff --git a/code/WorkInProgress/Tastyfish/livestock.dm b/code/WorkInProgress/Tastyfish/livestock.dm
index f17265ba046..0befcb4c61b 100644
--- a/code/WorkInProgress/Tastyfish/livestock.dm
+++ b/code/WorkInProgress/Tastyfish/livestock.dm
@@ -63,15 +63,15 @@
if(movement_target) //Not redundant due to sleeps, Item can be gone in 6 decisecomds
if (movement_target.loc.x < src.x)
- dir = WEST
+ set_dir(WEST)
else if (movement_target.loc.x > src.x)
- dir = EAST
+ set_dir(EAST)
else if (movement_target.loc.y < src.y)
- dir = SOUTH
+ set_dir(SOUTH)
else if (movement_target.loc.y > src.y)
- dir = NORTH
+ set_dir(NORTH)
else
- dir = SOUTH
+ set_dir(SOUTH)
if(isturf(movement_target.loc))
movement_target.attack_animal(src)
diff --git a/code/WorkInProgress/Tastyfish/wallmount_frame.dm b/code/WorkInProgress/Tastyfish/wallmount_frame.dm
index 16bdb12d6c6..28b6101a751 100644
--- a/code/WorkInProgress/Tastyfish/wallmount_frame.dm
+++ b/code/WorkInProgress/Tastyfish/wallmount_frame.dm
@@ -25,7 +25,7 @@
del(src)
return
- dir = get_dir(T, loc)
+ set_dir(get_dir(T, loc))
/obj/machinery/constructable_frame/wallmount_frame/attackby(obj/item/P as obj, mob/user as mob)
if(P.crit_fail)
@@ -109,7 +109,7 @@
if(component_check)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc)
- new_machine.dir = dir
+ new_machine.set_dir(dir)
if(istype(circuit, /obj/item/weapon/circuitboard/status_display))
new_machine.pixel_x = pixel_x * 1.33
new_machine.pixel_y = pixel_y * 1.33
diff --git a/code/WorkInProgress/buildmode.dm b/code/WorkInProgress/buildmode.dm
index d93d45fec5c..acd442355a0 100644
--- a/code/WorkInProgress/buildmode.dm
+++ b/code/WorkInProgress/buildmode.dm
@@ -48,15 +48,15 @@
Click()
switch(dir)
if(NORTH)
- dir = EAST
+ set_dir(EAST)
if(EAST)
- dir = SOUTH
+ set_dir(SOUTH)
if(SOUTH)
- dir = WEST
+ set_dir(WEST)
if(WEST)
- dir = NORTHWEST
+ set_dir(NORTHWEST)
if(NORTHWEST)
- dir = NORTH
+ set_dir(NORTH)
return 1
/obj/effect/bmode/buildhelp
@@ -219,19 +219,19 @@
switch(holder.builddir.dir)
if(NORTH)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
- WIN.dir = NORTH
+ WIN.set_dir(NORTH)
if(SOUTH)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
- WIN.dir = SOUTH
+ WIN.set_dir(SOUTH)
if(EAST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
- WIN.dir = EAST
+ WIN.set_dir(EAST)
if(WEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
- WIN.dir = WEST
+ WIN.set_dir(WEST)
if(NORTHWEST)
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
- WIN.dir = NORTHWEST
+ WIN.set_dir(NORTHWEST)
if(2)
if(pa.Find("left"))
if(ispath(holder.buildmode.objholder,/turf))
@@ -239,7 +239,7 @@
T.ChangeTurf(holder.buildmode.objholder)
else
var/obj/A = new holder.buildmode.objholder (get_turf(object))
- A.dir = holder.builddir.dir
+ A.set_dir(holder.builddir.dir)
else if(pa.Find("right"))
if(isobj(object)) del(object)
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index 24aa1d2a514..babce841261 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -161,7 +161,7 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if(!istype(loc, /turf))
del src
- dir = pick(cardinal)
+ set_dir(pick(cardinal))
SetLuminosity(3)
firelevel = fl
air_master.active_hotspots.Add(src)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 4a213027771..d78f3e7a9d0 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -623,7 +623,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
//The variables should be apparent enough.
var/atom/movable/overlay/animation = new(location)
if(direction)
- animation.dir = direction
+ animation.set_dir(direction)
animation.icon = a_icon
animation.layer = target:layer+1
if(a_icon_state)
@@ -854,7 +854,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
var/old_icon1 = T.icon
var/turf/X = B.ChangeTurf(T.type)
- X.dir = old_dir1
+ X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
@@ -1027,7 +1027,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
continue moving
var/turf/X = new T.type(B)
- X.dir = old_dir1
+ X.set_dir(old_dir1)
X.icon_state = old_icon_state1
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm
index 020efa396f2..0a8ea086a17 100644
--- a/code/_onclick/ai.dm
+++ b/code/_onclick/ai.dm
@@ -124,7 +124,7 @@
Topic(src, list("src"= "\ref[src]", "breaker"="1"), 1) // 1 meaning no window (consistency!)
/obj/machinery/turretid/AICtrlClick() //turns off/on Turrets
- Topic(src, list("src"= "\ref[src]", "toggleOn"="1", 1)) // 1 meaning no window (consistency!)
+ Topic(src, list("src"= "\ref[src]", "operation"="toggleon"), 1) // 1 meaning no window (consistency!)
/atom/proc/AIAltClick(var/atom/A)
AltClick(A)
@@ -139,7 +139,7 @@
return
/obj/machinery/turretid/AIAltClick() //toggles lethal on turrets
- Topic(src, list("src"= "\ref[src]", "toggleLethal"="1", 1)) // 1 meaning no window (consistency!)
+ Topic(src, list("src"= "\ref[src]", "operation"="togglelethal"), 1) // 1 meaning no window (consistency!)
/atom/proc/AIMiddleClick()
return
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index eadc657a9ce..5ab826fa867 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -350,7 +350,5 @@
else
if(dx > 0) direction = EAST
else direction = WEST
- dir = direction
- if(buckled && buckled.movable)
- buckled.dir = direction
- buckled.handle_rotation()
\ No newline at end of file
+ if(direction != dir)
+ facedir(direction)
diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm
index 5037353ff1a..6c5da7817ad 100644
--- a/code/_onclick/hud/alien_larva.dm
+++ b/code/_onclick/hud/alien_larva.dm
@@ -7,7 +7,7 @@
using = new /obj/screen()
using.name = "mov_intent"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_acti
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 8b3fe141340..33a14d2e4d2 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -34,7 +34,7 @@
inv_box.icon_state = slot_data["state"]
if(slot_data["dir"])
- inv_box.dir = slot_data["dir"]
+ inv_box.set_dir(slot_data["dir"])
if(slot_data["toggle"])
src.other += inv_box
@@ -58,7 +58,7 @@
using = new /obj/screen()
using.name = "act_intent"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = "intent_"+mymob.a_intent
using.screen_loc = ui_acti
@@ -125,7 +125,7 @@
if(hud_data.has_m_intent)
using = new /obj/screen()
using.name = "mov_intent"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
@@ -160,7 +160,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
- inv_box.dir = WEST
+ inv_box.set_dir(WEST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
@@ -176,7 +176,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
- inv_box.dir = EAST
+ inv_box.set_dir(EAST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
@@ -191,7 +191,7 @@
using = new /obj/screen/inventory()
using.name = "hand"
- using.dir = SOUTH
+ using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
@@ -202,7 +202,7 @@
using = new /obj/screen/inventory()
using.name = "hand"
- using.dir = SOUTH
+ using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
@@ -358,7 +358,7 @@
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
- mymob.gun_setting_icon.dir = 2
+ mymob.gun_setting_icon.set_dir(2)
mymob.client.screen = null
diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm
index 7ca8216bf21..65924284b51 100644
--- a/code/_onclick/hud/monkey.dm
+++ b/code/_onclick/hud/monkey.dm
@@ -8,7 +8,7 @@
using = new /obj/screen()
using.name = "act_intent"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
@@ -67,7 +67,7 @@
using = new /obj/screen()
using.name = "mov_intent"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
@@ -85,7 +85,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "r_hand"
- inv_box.dir = WEST
+ inv_box.set_dir(WEST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
@@ -98,7 +98,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "l_hand"
- inv_box.dir = EAST
+ inv_box.set_dir(EAST)
inv_box.icon = ui_style
inv_box.icon_state = "hand_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
@@ -111,7 +111,7 @@
using = new /obj/screen/inventory()
using.name = "hand"
- using.dir = SOUTH
+ using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
@@ -120,7 +120,7 @@
using = new /obj/screen/inventory()
using.name = "hand"
- using.dir = SOUTH
+ using.set_dir(SOUTH)
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
@@ -129,7 +129,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "mask"
- inv_box.dir = NORTH
+ inv_box.set_dir(NORTH)
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_monkey_mask
@@ -139,7 +139,7 @@
inv_box = new /obj/screen/inventory()
inv_box.name = "back"
- inv_box.dir = NORTHEAST
+ inv_box.set_dir(NORTHEAST)
inv_box.icon = ui_style
inv_box.icon_state = "equip"
inv_box.screen_loc = ui_back
@@ -224,19 +224,19 @@
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
- mymob.gun_setting_icon.dir = 2
+ mymob.gun_setting_icon.set_dir(2)
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
- mymob.item_use_icon.dir = 1
+ mymob.item_use_icon.set_dir(1)
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
- mymob.gun_move_icon.dir = 1
+ mymob.gun_move_icon.set_dir(1)
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
- mymob.gun_run_icon.dir = 1
+ mymob.gun_run_icon.set_dir(1)
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index c696308d2d9..644b8113765 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -11,7 +11,7 @@ var/obj/screen/robot_inventory
//Radio
using = new /obj/screen()
using.name = "radio"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "radio"
using.screen_loc = ui_movi
@@ -22,7 +22,7 @@ var/obj/screen/robot_inventory
using = new /obj/screen()
using.name = "module1"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv1"
using.screen_loc = ui_inv1
@@ -32,7 +32,7 @@ var/obj/screen/robot_inventory
using = new /obj/screen()
using.name = "module2"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv2"
using.screen_loc = ui_inv2
@@ -42,7 +42,7 @@ var/obj/screen/robot_inventory
using = new /obj/screen()
using.name = "module3"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = "inv3"
using.screen_loc = ui_inv3
@@ -55,7 +55,7 @@ var/obj/screen/robot_inventory
//Intent
using = new /obj/screen()
using.name = "act_intent"
- using.dir = SOUTHWEST
+ using.set_dir(SOUTHWEST)
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
@@ -155,19 +155,19 @@ var/obj/screen/robot_inventory
mymob.gun_setting_icon = new /obj/screen/gun/mode(null)
if (mymob.client)
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
- mymob.gun_setting_icon.dir = 2
+ mymob.gun_setting_icon.set_dir(2)
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
- mymob.item_use_icon.dir = 1
+ mymob.item_use_icon.set_dir(1)
src.adding += mymob.item_use_icon
mymob.gun_move_icon = new /obj/screen/gun/move(null)
if (mymob.client.target_can_move)
- mymob.gun_move_icon.dir = 1
+ mymob.gun_move_icon.set_dir(1)
mymob.gun_run_icon = new /obj/screen/gun/run(null)
if (mymob.client.target_can_run)
- mymob.gun_run_icon.dir = 1
+ mymob.gun_run_icon.set_dir(1)
src.adding += mymob.gun_run_icon
src.adding += mymob.gun_move_icon
diff --git a/code/_onclick/oldcode.dm b/code/_onclick/oldcode.dm
index 2d52a26390a..8585eb8e5fc 100644
--- a/code/_onclick/oldcode.dm
+++ b/code/_onclick/oldcode.dm
@@ -23,16 +23,16 @@
if(dy || dx)
if(abs(dx) < abs(dy))
- if(dy > 0) usr.dir = NORTH
- else usr.dir = SOUTH
+ if(dy > 0) usr.set_dir(NORTH)
+ else usr.set_dir(SOUTH)
else
- if(dx > 0) usr.dir = EAST
- else usr.dir = WEST
+ if(dx > 0) usr.set_dir(EAST)
+ else usr.set_dir(WEST)
else
- if(pixel_y > 16) usr.dir = NORTH
- else if(pixel_y < -16) usr.dir = SOUTH
- else if(pixel_x > 16) usr.dir = EAST
- else if(pixel_x < -16) usr.dir = WEST
+ if(pixel_y > 16) usr.set_dir(NORTH)
+ else if(pixel_y < -16) usr.set_dir(SOUTH)
+ else if(pixel_x > 16) usr.set_dir(EAST)
+ else if(pixel_x < -16) usr.set_dir(WEST)
diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm
index 3f74cbd0eae..88c9feca369 100644
--- a/code/_onclick/telekinesis.dm
+++ b/code/_onclick/telekinesis.dm
@@ -167,7 +167,7 @@ var/const/tk_maxrange = 15
O.anchored = 1
O.density = 0
O.layer = FLY_LAYER
- O.dir = pick(cardinal)
+ O.set_dir(pick(cardinal))
O.icon = 'icons/effects/effects.dmi'
O.icon_state = "nothing"
flick("empdisable",O)
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index a51ac42ee25..e69ed4b5ddd 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -670,8 +670,8 @@ client
return
switch(href_list["rotatedir"])
- if("right") A.dir = turn(A.dir, -45)
- if("left") A.dir = turn(A.dir, 45)
+ if("right") A.set_dir(turn(A.dir, -45))
+ if("left") A.set_dir(turn(A.dir, 45))
href_list["datumrefresh"] = href_list["rotatedatum"]
else if(href_list["makemonkey"])
diff --git a/code/datums/spells/dumbfire.dm b/code/datums/spells/dumbfire.dm
index 4a466d1663a..53df7d1f92d 100644
--- a/code/datums/spells/dumbfire.dm
+++ b/code/datums/spells/dumbfire.dm
@@ -43,7 +43,7 @@
projectile:linked_spells += proj_type
projectile.icon = proj_icon
projectile.icon_state = proj_icon_state
- projectile.dir = get_dir(projectile, target)
+ projectile.set_dir(get_dir(projectile, target))
projectile.name = proj_name
var/current_loc = usr.loc
diff --git a/code/datums/spells/projectile.dm b/code/datums/spells/projectile.dm
index 5d5ba5e1f8e..9bd1a34f18d 100644
--- a/code/datums/spells/projectile.dm
+++ b/code/datums/spells/projectile.dm
@@ -34,7 +34,7 @@
projectile:linked_spells += proj_type
projectile.icon = proj_icon
projectile.icon_state = proj_icon_state
- projectile.dir = get_dir(target,projectile)
+ projectile.set_dir(get_dir(target,projectile))
projectile.name = proj_name
var/current_loc = usr.loc
@@ -47,7 +47,7 @@
if(proj_homing)
if(proj_insubstantial)
- projectile.dir = get_dir(projectile,target)
+ projectile.set_dir(get_dir(projectile,target))
projectile.loc = get_step_to(projectile,target)
else
step_to(projectile,target)
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 6cf36e48a0a..ef9f6e3b1c6 100755
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -380,6 +380,16 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Medical crate"
group = "Medical"
+/datum/supply_packs/medical
+ name = "BloodPack crate"
+ contains = list(/obj/item/weapon/storage/box/bloodpacks,
+ /obj/item/weapon/storage/box/bloodpacks,
+ /obj/item/weapon/storage/box/bloodpacks)
+ cost = 10
+ containertype = /obj/structure/closet/crate/medical
+ containername = "BloodPack crate"
+ group = "Medical"
+
/datum/supply_packs/bodybag
name = "Body bag crate"
contains = list(/obj/item/weapon/storage/box/bodybags,
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index adaaa5b9633..93cb08b5a09 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -138,7 +138,7 @@ its easier to just keep the beam vertical.
//of range or to another z-level, then the beam will stop. Otherwise it will
//continue to draw.
- dir=get_dir(src,BeamTarget) //Causes the source of the beam to rotate to continuosly face the BeamTarget.
+ set_dir(get_dir(src,BeamTarget)) //Causes the source of the beam to rotate to continuosly face the BeamTarget.
for(var/obj/effect/overlay/beam/O in orange(10,src)) //This section erases the previously drawn beam because I found it was easier to
if(O.BeamSource==src) //just draw another instance of the beam instead of trying to manipulate all the
@@ -209,6 +209,11 @@ its easier to just keep the beam vertical.
/atom/proc/relaymove()
return
+//called to set the atom's dir and used to add behaviour to dir-changes
+/atom/proc/set_dir(new_dir)
+ . = new_dir != dir
+ dir = new_dir
+
/atom/proc/ex_act()
return
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 82c7eb3016e..21e8b5d9a9f 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -14,16 +14,6 @@
var/moved_recently = 0
var/mob/pulledby = null
-/atom/movable/Move()
- var/atom/A = src.loc
- . = ..()
- src.move_speed = world.time - src.l_move_time
- src.l_move_time = world.time
- src.m_flag = 1
- if ((A != src.loc && A && A.z == src.z))
- src.last_move = get_dir(A, src.loc)
- return
-
/atom/movable/Bump(var/atom/A as mob|obj|turf|area, yes)
if(src.throwing)
src.throw_impact(A)
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index 01ef334ce7d..322e65202f9 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -46,6 +46,7 @@
use_power = 1
idle_power_usage = 50
active_power_usage = 300
+ interact_offline = 1
var/locked = 0
var/mob/living/carbon/occupant = null
var/obj/item/weapon/reagent_containers/glass/beaker = null
diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm
index 51b321528ee..f6351c84809 100644
--- a/code/game/gamemodes/blob/theblob.dm
+++ b/code/game/gamemodes/blob/theblob.dm
@@ -25,7 +25,7 @@
New(loc, var/h = 30)
blobs += src
src.health = h
- src.dir = pick(1,2,4,8)
+ src.set_dir(pick(1,2,4,8))
src.update_icon()
..(loc)
return
@@ -195,7 +195,7 @@
New(loc, var/h = 10)
src.health = h
- src.dir = pick(1,2,4,8)
+ src.set_dir(pick(1,2,4,8))
src.update_idle()
diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm
index 97bb3e2404a..1bf2406db5b 100644
--- a/code/game/gamemodes/events/space_ninja.dm
+++ b/code/game/gamemodes/events/space_ninja.dm
@@ -531,7 +531,19 @@ As such, it's hard-coded for now. No reason for it not to be, really.
else
equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform)
- equip_to_slot_or_del(new /obj/item/weapon/rig/light/ninja(src), slot_back)
+ var/obj/item/weapon/rig/light/ninja/ninjasuit = new(src)
+
+ // Make sure the ninja can actually equip the suit.
+ if(src.dna && src.dna.unique_enzymes)
+ src << "Suit hardware locked to your DNA hash."
+ ninjasuit.locked_dna = src.dna.unique_enzymes
+ else
+ ninjasuit.req_access = list()
+
+ equip_to_slot_or_del(ninjasuit,slot_back)
+ spawn(10)
+ ninjasuit.toggle_seals(src,1)
+
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/voice/space_ninja(src), slot_wear_mask)
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_belt)
equip_to_slot_or_del(new /obj/item/weapon/tank/oxygen(src), slot_s_store)
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index 36137a74a93..50ae7b9fc13 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -30,7 +30,7 @@
if(!the_disk)
icon_state = "pinonnull"
return
- dir = get_dir(src,the_disk)
+ set_dir(get_dir(src,the_disk))
switch(get_dist(src,the_disk))
if(0)
icon_state = "pinondirect"
@@ -79,7 +79,7 @@
if(!location)
icon_state = "pinonnull"
return
- dir = get_dir(src,location)
+ set_dir(get_dir(src,location))
switch(get_dist(src,location))
if(0)
icon_state = "pinondirect"
@@ -98,7 +98,7 @@
if(!target)
icon_state = "pinonnull"
return
- dir = get_dir(src,target)
+ set_dir(get_dir(src,target))
switch(get_dist(src,target))
if(0)
icon_state = "pinondirect"
@@ -215,7 +215,7 @@
// if(loc.z != the_disk.z) //If you are on a different z-level from the disk
// icon_state = "pinonnull"
// else
- dir = get_dir(src, the_disk)
+ set_dir(get_dir(src, the_disk))
switch(get_dist(src, the_disk))
if(0)
icon_state = "pinondirect"
@@ -248,7 +248,7 @@
if(loc.z != home.z) //If you are on a different z-level from the shuttle
icon_state = "pinonnull"
else
- dir = get_dir(src, home)
+ set_dir(get_dir(src, home))
switch(get_dist(src, home))
if(0)
icon_state = "pinondirect"
diff --git a/code/game/jobs/job/civilian_chaplain.dm b/code/game/jobs/job/civilian_chaplain.dm
index d7b4b1f96ca..34fe340a126 100644
--- a/code/game/jobs/job/civilian_chaplain.dm
+++ b/code/game/jobs/job/civilian_chaplain.dm
@@ -84,7 +84,7 @@
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
- T.dir = 4
+ T.set_dir(4)
if("Scrapbook")
B.icon_state = "scrapbook"
B.item_state = "scrapbook"
@@ -103,7 +103,7 @@
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
- T.dir = 10
+ T.set_dir(10)
if("Tome")
B.icon_state = "tome"
B.item_state = "syringe_kit"
@@ -119,7 +119,7 @@
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
- T.dir = 8
+ T.set_dir(8)
if("the bible melts")
B.icon_state = "melted"
B.item_state = "melted"
@@ -133,7 +133,7 @@
for(var/area/chapel/main/A in world)
for(var/turf/T in A.contents)
if(T.icon_state == "carpetsymbol")
- T.dir = 2
+ T.set_dir(2)
H.update_inv_l_hand() // so that it updates the bible's item_state in his hand
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index e87b3c36ec6..326f705a5da 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -422,7 +422,7 @@ var/global/datum/controller/occupations/job_master
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/stool/bed/chair/wheelchair))
H.buckled.loc = H.loc
- H.buckled.dir = H.dir
+ H.buckled.set_dir(H.dir)
//give them an account in the station database
var/datum/money_account/M = create_account(H.real_name, rand(50,500)*10, null)
@@ -516,7 +516,7 @@ var/global/datum/controller/occupations/job_master
var/obj/structure/stool/bed/chair/wheelchair/W = new /obj/structure/stool/bed/chair/wheelchair(H.loc)
H.buckled = W
H.update_canmove()
- W.dir = H.dir
+ W.set_dir(H.dir)
W.buckled_mob = H
W.add_fingerprint(H)
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index f5474c927d0..9e52c28133a 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -13,7 +13,7 @@
use_power = 1
idle_power_usage = 40
-
+ interact_offline = 1
/obj/machinery/sleep_console/process()
if(stat & (NOPOWER|BROKEN))
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index f8074755a8b..0c7e738cff9 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -104,7 +104,7 @@
src.loc = loc
if(dir)
- src.dir = dir
+ src.set_dir(dir)
buildstage = 0
wiresexposed = 1
@@ -1274,7 +1274,7 @@ FIRE ALARM
src.loc = loc
if(dir)
- src.dir = dir
+ src.set_dir(dir)
if(building)
buildstage = 0
diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm
index 9f98f89deef..c4007c69944 100644
--- a/code/game/machinery/bots/bots.dm
+++ b/code/game/machinery/bots/bots.dm
@@ -120,7 +120,7 @@
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
pulse2.anchored = 1
- pulse2.dir = pick(cardinal)
+ pulse2.set_dir(pick(cardinal))
spawn(10)
pulse2.delete()
diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm
index a2436f9de41..e7f766a5b40 100644
--- a/code/game/machinery/bots/mulebot.dm
+++ b/code/game/machinery/bots/mulebot.dm
@@ -526,14 +526,14 @@
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
var/newdir = get_dir(next, loc)
if(newdir == dir)
- B.dir = newdir
+ B.set_dir(newdir)
else
newdir = newdir | dir
if(newdir == 3)
newdir = 1
else if(newdir == 12)
newdir = 4
- B.dir = newdir
+ B.set_dir(newdir)
bloodiness--
diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm
index 84f3efb167f..4dd60649253 100644
--- a/code/game/machinery/bots/secbot.dm
+++ b/code/game/machinery/bots/secbot.dm
@@ -20,7 +20,8 @@
var/frustration = 0
var/idcheck = 0 //If false, all station IDs are authorized for weapons.
- var/check_records = 1 //Does it check security records?
+ var/check_records = 0 //Does it check security records?
+ var/check_arrest = 1 //Does it check arrest status?
var/arrest_type = 0 //If true, don't handcuff
var/declare_arrests = 0 //When making an arrest, should it notify everyone wearing sechuds?
@@ -97,6 +98,7 @@
radio_controller.add_object(src, beacon_freq, filter = RADIO_NAVBEACONS)
if(lasercolor)
shot_delay = 6 //Longer shot delay because JESUS CHRIST
+ check_arrest = 0
check_records = 0 //Don't actively target people set to arrest
arrest_type = 1 //Don't even try to cuff
req_access = list(access_maint_tunnels)
@@ -150,12 +152,14 @@ Maintenance panel is [src.open ? "opened" : "closed"]"},
dat += text({"
Check for Weapon Authorization: []
Check Security Records: []
+Check Arrest Status: []
Operating Mode: []
Report Arrests: []
Auto Patrol: []"},
"[src.idcheck ? "Yes" : "No"]",
"[src.check_records ? "Yes" : "No"]",
+"[src.check_arrest ? "Yes" : "No"]",
"[src.arrest_type ? "Detain" : "Arrest"]",
"[src.declare_arrests ? "Yes" : "No"]",
"[auto_patrol ? "On" : "Off"]" )
@@ -189,6 +193,8 @@ Auto Patrol: []"},
src.idcheck = !src.idcheck
if("ignorerec")
src.check_records = !src.check_records
+ if("ignorearr")
+ src.check_arrest = !src.check_arrest
if("switchmode")
src.arrest_type = !src.arrest_type
if("patrol")
@@ -262,7 +268,7 @@ Auto Patrol: []"},
// We re-assess human targets, before bashing their head in, in case their credentials change
if(target && istype(target, /mob/living/carbon/human))
- var/threat = src.assess_perp(target, idcheck, check_records)
+ var/threat = src.assess_perp(target, idcheck, check_records, check_arrest)
if(threat < 4)
target = null
@@ -649,7 +655,7 @@ Auto Patrol: []"},
continue
if(istype(C, /mob/living/carbon/human))
- src.threatlevel = src.assess_perp(C, idcheck, check_records)
+ src.threatlevel = src.assess_perp(C, idcheck, check_records, check_arrest)
else if(istype(M, /mob/living/simple_animal/hostile))
if(M.stat == DEAD)
@@ -878,7 +884,7 @@ Auto Patrol: []"},
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
pulse2.anchored = 1
- pulse2.dir = pick(cardinal)
+ pulse2.set_dir(pick(cardinal))
spawn(10)
pulse2.delete()
var/list/mob/living/carbon/targets = new
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 96f87e89c1d..75f58902c7d 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -294,13 +294,13 @@
//If someone knows a better way to do this, let me know. -Giacom
switch(i)
if(NORTH)
- src.dir = SOUTH
+ src.set_dir(SOUTH)
if(SOUTH)
- src.dir = NORTH
+ src.set_dir(NORTH)
if(WEST)
- src.dir = EAST
+ src.set_dir(EAST)
if(EAST)
- src.dir = WEST
+ src.set_dir(WEST)
break
//Return a working camera that can see a given mob
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 4e5b64c631b..03fa91212fc 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -294,7 +294,7 @@ obj/item/weapon/circuitboard/rdserver
/obj/item/weapon/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U)
//TODO: Move this stuff into the relevant constructor when pipe/construction.dm is cleaned up.
- U.dir = src.machine_dir
+ U.set_dir(src.machine_dir)
U.initialize_directions = src.init_dirs
U.initialize()
U.build_network()
diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm
index 3974ebdd503..32543822b99 100644
--- a/code/game/machinery/cryo.dm
+++ b/code/game/machinery/cryo.dm
@@ -7,6 +7,7 @@
density = 1
anchored = 1.0
layer = 2.8
+ interact_offline = 1
var/on = 0
use_power = 1
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index d9c40ce64e6..c2a6d996a1e 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -15,6 +15,7 @@
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "cellconsole"
circuit = "/obj/item/weapon/circuitboard/cryopodcontrol"
+ interact_offline = 1
var/mode = null
//Used for logging people entering cryosleep and important items they are carrying.
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index bb23176478c..7328c7b8f3d 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -899,7 +899,7 @@ About the new airlock wires panel:
var/obj/structure/door_assembly/da = new assembly_type(src.loc)
if (istype(da, /obj/structure/door_assembly/multi_tile))
- da.dir = src.dir
+ da.set_dir(src.dir)
da.anchored = 1
if(mineral)
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index bc8719060f4..80c64acf33f 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -29,7 +29,7 @@
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
//Multi-tile doors
- dir = EAST
+ set_dir(EAST)
var/width = 1
/obj/machinery/door/New()
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index f2e81684855..209b993788a 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -194,7 +194,7 @@
wa.name = "Wired Windoor Assembly"
if (src.base_state == "right" || src.base_state == "rightsecure")
wa.facing = "r"
- wa.dir = src.dir
+ wa.set_dir(src.dir)
wa.state = "02"
wa.update_icon()
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index fab5bbea6e0..519219e96e9 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -109,6 +109,7 @@ Class Procs:
var/list/component_parts = list() //list of all the parts used to build it, if made from certain kinds of frames.
var/uid
var/manual = 0
+ var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/global/gl_uid = 1
/obj/machinery/drain_power(var/drain_check)
@@ -152,7 +153,7 @@ Class Procs:
pulse2.icon_state = "empdisable"
pulse2.name = "emp sparks"
pulse2.anchored = 1
- pulse2.dir = pick(cardinal)
+ pulse2.set_dir(pick(cardinal))
spawn(10)
pulse2.delete()
@@ -197,35 +198,66 @@ Class Procs:
/obj/machinery/proc/inoperable(var/additional_flags = 0)
return (stat & (NOPOWER|BROKEN|additional_flags))
+
/obj/machinery/Topic(href, href_list, var/nowindow = 0, var/checkrange = 1)
if(..())
return 1
- if(inoperable())
+ if(!can_be_used_by(usr, be_close = checkrange))
return 1
- if(usr.restrained() || usr.lying || usr.stat)
- return 1
- if ( ! (istype(usr, /mob/living/carbon/human) || \
- istype(usr, /mob/living/silicon) || \
- istype(usr, /mob/living/carbon/monkey)) )
- usr << "\red You don't have the dexterity to do this!"
- return 1
-
- var/norange = 0
- if(istype(usr, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = usr
- if(istype(H.l_hand, /obj/item/tk_grab))
- norange = 1
- else if(istype(H.r_hand, /obj/item/tk_grab))
- norange = 1
-
- if(checkrange && !norange)
- if ((!in_range(src, usr) || !istype(src.loc, /turf)) && !istype(usr, /mob/living/silicon))
- return 1
-
- src.add_fingerprint(usr)
-
+ add_fingerprint(usr)
return 0
+/obj/machinery/proc/can_be_used_by(mob/user, be_close = 1)
+ if(!interact_offline && stat & (NOPOWER|BROKEN))
+ return 0
+ if(!user.canUseTopic(src, be_close))
+ return 0
+ return 1
+
+////////////////////////////////////////////////////////////////////////////////////////////
+
+/mob/proc/canUseTopic(atom/movable/M, be_close = 1)
+ return
+
+/mob/dead/observer/canUseTopic(atom/movable/M, be_close = 1)
+ if(check_rights(R_ADMIN, 0))
+ return
+
+/mob/living/canUseTopic(atom/movable/M, be_close = 1, no_dextery = 0)
+ if(no_dextery)
+ src << "You don't have the dexterity to do this!"
+ return 0
+ return be_close && !in_range(M, src)
+
+/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 1)
+ if(restrained() || lying || stat || stunned || weakened)
+ return
+ if(be_close && !in_range(M, src))
+ if(TK in mutations)
+ var/mob/living/carbon/human/H = M
+ if(istype(H.l_hand, /obj/item/tk_grab) || istype(H.r_hand, /obj/item/tk_grab))
+ return 1
+ return
+ if(!isturf(M.loc) && M.loc != src)
+ return
+ return 1
+
+/mob/living/silicon/ai/canUseTopic(atom/movable/M)
+ if(stat)
+ return
+ //stop AIs from leaving windows open and using then after they lose vision
+ //apc_override is needed here because AIs use their own APC when powerless
+ if(cameranet && !cameranet.checkTurfVis(get_turf(M)) && !apc_override)
+ return
+ return 1
+
+/mob/living/silicon/robot/canUseTopic(atom/movable/M)
+ if(stat || lockcharge || stunned || weakened)
+ return
+ return 1
+
+////////////////////////////////////////////////////////////////////////////////////////////
+
/obj/machinery/attack_ai(mob/user as mob)
if(isrobot(user))
// For some reason attack_robot doesn't work
@@ -318,7 +350,7 @@ Class Procs:
/obj/machinery/proc/is_assess_emagged()
return emagged
-/obj/machinery/proc/assess_perp(mob/living/carbon/human/perp, var/auth_weapons, var/check_records)
+/obj/machinery/proc/assess_perp(mob/living/carbon/human/perp, var/auth_weapons, var/check_records, var/check_arrest)
var/threatcount = 0 //the integer returned
if(is_assess_emagged())
@@ -345,13 +377,17 @@ Class Procs:
if(perp.dna && perp.dna.mutantrace && perp.dna.mutantrace != "none")
threatcount += 2
- if(check_records)
+
+ if(check_records || check_arrest)
var/perpname = perp.name
if(id)
perpname = id.registered_name
var/datum/data/record/R = find_security_record("name", perpname)
- if(R && (R.fields["criminal"] == "*Arrest*"))
+ if(check_records && !R)
+ threatcount += 4
+
+ if(check_arrest && R && (R.fields["criminal"] == "*Arrest*"))
threatcount += 4
return threatcount
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index 205cc1cedef..210948bbd3e 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -67,7 +67,7 @@ Buildable meters
/obj/item/pipe/New(var/loc, var/pipe_type as num, var/dir as num, var/obj/machinery/atmospherics/make_from = null)
..()
if (make_from)
- src.dir = make_from.dir
+ src.set_dir(make_from.dir)
src.pipename = make_from.name
color = make_from.pipe_color
var/is_bent
@@ -180,7 +180,7 @@ Buildable meters
///// Z-Level stuff
else
src.pipe_type = pipe_type
- src.dir = dir
+ src.set_dir(dir)
if (pipe_type == 29 || pipe_type == 30 || pipe_type == 33 || pipe_type == 35 || pipe_type == 37 || pipe_type == 39 || pipe_type == 41)
connect_types = list(2)
src.color = PIPE_COLOR_BLUE
@@ -314,28 +314,28 @@ Buildable meters
if ( usr.stat || usr.restrained() )
return
- src.dir = turn(src.dir, -90)
+ src.set_dir(turn(src.dir, -90))
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if(dir==2)
- dir = 1
+ set_dir(1)
else if(dir==8)
- dir = 4
+ set_dir(4)
else if (pipe_type in list (PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W))
- dir = 2
- //src.pipe_dir = get_pipe_dir()
+ set_dir(2)
+ //src.pipe_set_dir(get_pipe_dir())
return
/obj/item/pipe/Move()
..()
if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)) \
&& (src.dir in cardinal))
- src.dir = src.dir|turn(src.dir, 90)
+ src.set_dir(src.dir|turn(src.dir, 90))
else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if(dir==2)
- dir = 1
+ set_dir(1)
else if(dir==8)
- dir = 4
+ set_dir(4)
return
// returns all pipe's endpoints
@@ -427,11 +427,11 @@ Buildable meters
return 1
if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE))
if(dir==2)
- dir = 1
+ set_dir(1)
else if(dir==8)
- dir = 4
+ set_dir(4)
else if (pipe_type in list(PIPE_MANIFOLD4W, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W, PIPE_OMNI_MIXER, PIPE_OMNI_FILTER))
- dir = 2
+ set_dir(2)
var/pipe_dir = get_pipe_dir()
for(var/obj/machinery/atmospherics/M in src.loc)
@@ -447,7 +447,7 @@ Buildable meters
if(PIPE_SIMPLE_STRAIGHT, PIPE_SIMPLE_BENT)
var/obj/machinery/atmospherics/pipe/simple/P = new( src.loc )
P.pipe_color = color
- P.dir = src.dir
+ P.set_dir(src.dir)
P.initialize_directions = pipe_dir
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
@@ -466,7 +466,7 @@ Buildable meters
if(PIPE_SUPPLY_STRAIGHT, PIPE_SUPPLY_BENT)
var/obj/machinery/atmospherics/pipe/simple/hidden/supply/P = new( src.loc )
P.color = color
- P.dir = src.dir
+ P.set_dir(src.dir)
P.initialize_directions = pipe_dir
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
@@ -485,7 +485,7 @@ Buildable meters
if(PIPE_SCRUBBERS_STRAIGHT, PIPE_SCRUBBERS_BENT)
var/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers/P = new( src.loc )
P.color = color
- P.dir = src.dir
+ P.set_dir(src.dir)
P.initialize_directions = pipe_dir
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
@@ -504,7 +504,7 @@ Buildable meters
if(PIPE_UNIVERSAL)
var/obj/machinery/atmospherics/pipe/simple/hidden/universal/P = new( src.loc )
P.color = color
- P.dir = src.dir
+ P.set_dir(src.dir)
P.initialize_directions = pipe_dir
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
@@ -522,7 +522,7 @@ Buildable meters
if(PIPE_HE_STRAIGHT, PIPE_HE_BENT)
var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/P = new ( src.loc )
- P.dir = src.dir
+ P.set_dir(src.dir)
P.initialize_directions = pipe_dir //this var it's used to know if the pipe is bent or not
P.initialize_directions_he = pipe_dir
//var/turf/T = P.loc
@@ -541,7 +541,7 @@ Buildable meters
if(PIPE_CONNECTOR) // connector
var/obj/machinery/atmospherics/portables_connector/C = new( src.loc )
- C.dir = dir
+ C.set_dir(dir)
C.initialize_directions = pipe_dir
if (pipename)
C.name = pipename
@@ -557,7 +557,7 @@ Buildable meters
if(PIPE_MANIFOLD) //manifold
var/obj/machinery/atmospherics/pipe/manifold/M = new( src.loc )
M.pipe_color = color
- M.dir = dir
+ M.set_dir(dir)
M.initialize_directions = pipe_dir
//M.New()
var/turf/T = M.loc
@@ -580,7 +580,7 @@ Buildable meters
if(PIPE_SUPPLY_MANIFOLD) //manifold
var/obj/machinery/atmospherics/pipe/manifold/hidden/supply/M = new( src.loc )
M.color = color
- M.dir = dir
+ M.set_dir(dir)
M.initialize_directions = pipe_dir
//M.New()
var/turf/T = M.loc
@@ -603,7 +603,7 @@ Buildable meters
if(PIPE_SCRUBBERS_MANIFOLD) //manifold
var/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers/M = new( src.loc )
M.color = color
- M.dir = dir
+ M.set_dir(dir)
M.initialize_directions = pipe_dir
//M.New()
var/turf/T = M.loc
@@ -626,7 +626,7 @@ Buildable meters
if(PIPE_MANIFOLD4W) //4-way manifold
var/obj/machinery/atmospherics/pipe/manifold4w/M = new( src.loc )
M.pipe_color = color
- M.dir = dir
+ M.set_dir(dir)
M.initialize_directions = pipe_dir
//M.New()
var/turf/T = M.loc
@@ -652,7 +652,7 @@ Buildable meters
if(PIPE_SUPPLY_MANIFOLD4W) //4-way manifold
var/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply/M = new( src.loc )
M.color = color
- M.dir = dir
+ M.set_dir(dir)
M.initialize_directions = pipe_dir
M.connect_types = src.connect_types
//M.New()
@@ -679,7 +679,7 @@ Buildable meters
if(PIPE_SCRUBBERS_MANIFOLD4W) //4-way manifold
var/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers/M = new( src.loc )
M.color = color
- M.dir = dir
+ M.set_dir(dir)
M.initialize_directions = pipe_dir
M.connect_types = src.connect_types
//M.New()
@@ -705,7 +705,7 @@ Buildable meters
if(PIPE_JUNCTION)
var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/P = new ( src.loc )
- P.dir = src.dir
+ P.set_dir(src.dir)
P.initialize_directions = src.get_pdir()
P.initialize_directions_he = src.get_hdir()
//var/turf/T = P.loc
@@ -724,7 +724,7 @@ Buildable meters
if(PIPE_UVENT) //unary vent
var/obj/machinery/atmospherics/unary/vent_pump/V = new( src.loc )
- V.dir = dir
+ V.set_dir(dir)
V.initialize_directions = pipe_dir
if (pipename)
V.name = pipename
@@ -739,7 +739,7 @@ Buildable meters
if(PIPE_MVALVE) //manual valve
var/obj/machinery/atmospherics/valve/V = new( src.loc)
- V.dir = dir
+ V.set_dir(dir)
V.initialize_directions = pipe_dir
if (pipename)
V.name = pipename
@@ -758,7 +758,7 @@ Buildable meters
if(PIPE_PUMP) //gas pump
var/obj/machinery/atmospherics/binary/pump/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -775,7 +775,7 @@ Buildable meters
if(PIPE_GAS_FILTER) //gas filter
var/obj/machinery/atmospherics/trinary/filter/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -795,7 +795,7 @@ Buildable meters
if(PIPE_GAS_MIXER) //gas mixer
var/obj/machinery/atmospherics/trinary/mixer/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -815,7 +815,7 @@ Buildable meters
if(PIPE_GAS_FILTER_M) //gas filter mirrored
var/obj/machinery/atmospherics/trinary/filter/m_filter/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -835,7 +835,7 @@ Buildable meters
if(PIPE_GAS_MIXER_T) //gas mixer-t
var/obj/machinery/atmospherics/trinary/mixer/t_mixer/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -855,7 +855,7 @@ Buildable meters
if(PIPE_GAS_MIXER_M) //gas mixer mirrored
var/obj/machinery/atmospherics/trinary/mixer/m_mixer/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -875,7 +875,7 @@ Buildable meters
if(PIPE_SCRUBBER) //scrubber
var/obj/machinery/atmospherics/unary/vent_scrubber/S = new(src.loc)
- S.dir = dir
+ S.set_dir(dir)
S.initialize_directions = pipe_dir
if (pipename)
S.name = pipename
@@ -889,7 +889,7 @@ Buildable meters
if(PIPE_INSULATED_STRAIGHT, PIPE_INSULATED_BENT)
var/obj/machinery/atmospherics/pipe/simple/insulated/P = new( src.loc )
- P.dir = src.dir
+ P.set_dir(src.dir)
P.initialize_directions = pipe_dir
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
@@ -907,7 +907,7 @@ Buildable meters
if(PIPE_MTVALVE) //manual t-valve
var/obj/machinery/atmospherics/tvalve/V = new(src.loc)
- V.dir = dir
+ V.set_dir(dir)
V.initialize_directions = pipe_dir
if (pipename)
V.name = pipename
@@ -927,7 +927,7 @@ Buildable meters
if(PIPE_CAP)
var/obj/machinery/atmospherics/pipe/cap/C = new(src.loc)
- C.dir = dir
+ C.set_dir(dir)
C.initialize_directions = pipe_dir
C.initialize()
C.build_network()
@@ -937,7 +937,7 @@ Buildable meters
if(PIPE_SUPPLY_CAP)
var/obj/machinery/atmospherics/pipe/cap/hidden/supply/C = new(src.loc)
- C.dir = dir
+ C.set_dir(dir)
C.initialize_directions = pipe_dir
C.initialize()
C.build_network()
@@ -947,7 +947,7 @@ Buildable meters
if(PIPE_SCRUBBERS_CAP)
var/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers/C = new(src.loc)
- C.dir = dir
+ C.set_dir(dir)
C.initialize_directions = pipe_dir
C.initialize()
C.build_network()
@@ -957,7 +957,7 @@ Buildable meters
if(PIPE_PASSIVE_GATE) //passive gate
var/obj/machinery/atmospherics/binary/passive_gate/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -974,7 +974,7 @@ Buildable meters
if(PIPE_VOLUME_PUMP) //volume pump
var/obj/machinery/atmospherics/binary/pump/high_power/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -991,7 +991,7 @@ Buildable meters
if(PIPE_HEAT_EXCHANGE) // heat exchanger
var/obj/machinery/atmospherics/unary/heat_exchanger/C = new( src.loc )
- C.dir = dir
+ C.set_dir(dir)
C.initialize_directions = pipe_dir
if (pipename)
C.name = pipename
@@ -1005,7 +1005,7 @@ Buildable meters
///// Z-Level stuff
if(PIPE_UP)
var/obj/machinery/atmospherics/pipe/zpipe/up/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -1021,7 +1021,7 @@ Buildable meters
P.node2.build_network()
if(PIPE_DOWN)
var/obj/machinery/atmospherics/pipe/zpipe/down/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -1037,7 +1037,7 @@ Buildable meters
P.node2.build_network()
if(PIPE_SUPPLY_UP)
var/obj/machinery/atmospherics/pipe/zpipe/up/supply/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -1053,7 +1053,7 @@ Buildable meters
P.node2.build_network()
if(PIPE_SUPPLY_DOWN)
var/obj/machinery/atmospherics/pipe/zpipe/down/supply/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -1069,7 +1069,7 @@ Buildable meters
P.node2.build_network()
if(PIPE_SCRUBBERS_UP)
var/obj/machinery/atmospherics/pipe/zpipe/up/scrubbers/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
@@ -1085,7 +1085,7 @@ Buildable meters
P.node2.build_network()
if(PIPE_SCRUBBERS_DOWN)
var/obj/machinery/atmospherics/pipe/zpipe/down/scrubbers/P = new(src.loc)
- P.dir = dir
+ P.set_dir(dir)
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
diff --git a/code/game/machinery/portable_tag_turret.dm b/code/game/machinery/portable_tag_turret.dm
index fa4e75bfc5a..13f7032aa3a 100644
--- a/code/game/machinery/portable_tag_turret.dm
+++ b/code/game/machinery/portable_tag_turret.dm
@@ -23,9 +23,10 @@
eprojectile = /obj/item/weapon/gun/energy/laser/bluetag
lasercolor = "b"
req_access = list(access_maint_tunnels, access_theatre)
+ check_arrest = 0
check_records = 0
- auth_weapons = 1
- stun_all = 0
+ check_weapons = 1
+ check_access = 0
check_anomalies = 0
shot_delay = 30
@@ -33,9 +34,10 @@
eprojectile = /obj/item/weapon/gun/energy/laser/redtag
lasercolor = "r"
req_access = list(access_maint_tunnels, access_theatre)
+ check_arrest = 0
check_records = 0
- auth_weapons = 1
- stun_all = 0
+ check_weapons = 1
+ check_access = 0
check_anomalies = 0
shot_delay = 30
iconholder = 1
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 8832f70c14e..33334ffe04d 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -36,11 +36,12 @@
var/last_fired = 0 //1: if the turret is cooling down from a shot, 0: turret is ready to fire
var/shot_delay = 15 //1.5 seconds between each shot
- var/check_records = 1 //checks if it can use the security records
- var/auth_weapons = 0 //checks if it can shoot people that have a weapon they aren't authorized to have
- var/stun_all = 1 //if this is active, the turret shoots everything that does not meet the access requirements
+ var/check_arrest = 1 //checks if the perp is set to arrest
+ var/check_records = 1 //checks if a security record exists at all
+ var/check_weapons = 0 //checks if it can shoot people that have a weapon they aren't authorized to have
+ var/check_access = 1 //if this is active, the turret shoots everything that does not meet the access requirements
var/check_anomalies = 1 //checks if it can shoot at unidentified lifeforms (ie xenos)
- var/ai = 0 //if active, will shoot at anything not an AI or cyborg
+ var/check_synth = 0 //if active, will shoot at anything not an AI or cyborg
var/ailock = 0 // AI cannot use this
var/attacked = 0 //if set to 1, the turret gets pissed off and shoots at people nearby (unless they have sec access!)
@@ -181,17 +182,21 @@
Neutralize All Non-Synthetics: []
"},
"[lethal ? "Enabled" : "Disabled"]",
- "[ai ? "Yes" : "No"]")
- if(!ai)
+ "[check_synth ? "Yes" : "No"]")
+ if(!check_synth)
dat += text({"Check for Weapon Authorization: []
Check Security Records: []
+ Check Arrest Status: []
Neutralize All Non-Authorized Personnel: []
Neutralize All Unidentified Life Signs: []
"},
- "[auth_weapons ? "Yes" : "No"]",
+ "[check_weapons ? "Yes" : "No"]",
"[check_records ? "Yes" : "No"]",
- "[stun_all ? "Yes" : "No"]",
+ "[check_arrest ? "Yes" : "No"]",
+ "[check_access ? "Yes" : "No"]",
"[check_anomalies ? "Yes" : "No"]" )
+ else
+ dat += "
| - Power supply - | -
+
+
+
+ Power supply
+
+
{{:helper.displayBar(data.chargestatus, 0, 50, (data.chargestatus >= 35) ? 'good' : (data.chargestatus >= 15) ? 'average' : 'bad')}} {{:data.charge}}/{{:data.maxcharge}}
- |
- |
| - AI control: - | -- {{if data.aioverride}} - ENABLED - {{else}} - DISABLED - {{/if}} - | -- {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_ai_control' : 1}, null)}} - | -
| - Suit status: - | -
- {{if data.sealing == 1}}
- SEALING
- {{else}}
- {{if data.seals == 1}}
- OPEN
+
+
+
+
+
+ AI control:
+
+
+ {{if data.aioverride}}
+ ENABLED
{{else}}
- SEALED
+ DISABLED
{{/if}}
- {{/if}}
- |
- - {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_seals' : 1}, null)}} - | -
| - Cover status: - | -
- {{if data.emagged || !data.securitycheck}}
- ERROR - MAINTENANCE LOCK CONTROL OFFLINE
- {{else}}
- {{if data.coverlock}}
- LOCKED
+
+
+ {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_ai_control' : 1}, null)}}
+
+
+
+
+ Suit status:
+
+
+ {{if data.sealing == 1}}
+ SEALING
{{else}}
- UNLOCKED
+ {{if data.seals == 1}}
+ OPEN
+ {{else}}
+ SEALED
+ {{/if}}
{{/if}}
- {{/if}}
- |
- - {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_suit_lock' : 1}, null)}} - | -
| - Helmet: - | -- {{:data.helmet}} - | -- {{if data.sealing != 1}} - {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_piece' : 'helmet'}, null)}} - {{/if}} - | -
| - Gauntlets: - | -- {{:data.gauntlets}} - | -- {{if data.sealing != 1}} - {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_piece' : 'gauntlets'}, null)}} - {{/if}} - | -
| - Boots: - | -- {{:data.boots}} - | -- {{if data.sealing != 1}} - {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_piece' : 'boots'}, null)}} - {{/if}} - | -
| - Chestpiece: - | -- {{:data.chest}} - | -- {{if data.sealing != 1}} - {{:helper.link('Toggle', 'circle-arrow-s', {'toggle_piece' : 'chest'}, null)}} - {{/if}} - | -
|
-
- {{:value.name}}
+
+
+
+
- {{:helper.capitalizeFirstLetter(value.name)}}
{{if value.damage > 0}}
- {{if value.damage == 1}}
- (damaged)
- {{else}}
- (destroyed)
- {{/if}}
- {{/if}}
- [E: {{:value.engagecost}} | A: {{:value.activecost}} | P: {{:value.passivecost}}]
- |
- |||
|
- {{:value.desc}}
- |
-
- {{if value.can_use == 1}}
-
- {{:helper.link(value.engagestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'engage'}, null)}}
-
- {{/if}}
- {{if value.can_select == 1}}
-
- {{if value.name == data.primarysystem}}
- SELECTED
+
+ {{if value.damage == 1}}
+ (
{{/if}}
- {{if value.can_toggle == 1}}
- damaged )
{{else}}
- {{:helper.link('Select', 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'select'}, null)}}
+ (destroyed )
{{/if}}
- {{if value.is_active == 1}}
- {{:helper.link(value.deactivatestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'deactivate'}, null)}}
- {{else}}
- {{:helper.link(value.activatestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'activate'}, null)}}
+
+
-
+ Engage: {{:value.engagecost}}
+ Activate: {{:value.activecost}}
+ Passive: {{:value.passivecost}}
+
+
+ {{:value.desc}}
+
+
+ {{if value.can_use == 1}}
+
- {{/if}}
-
+ {{:helper.link(value.engagestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'engage'}, null)}}
+
+ {{/if}}
+ {{if value.can_select == 1}}
+
+ {{if value.name == data.primarysystem}}
+
+ {{/if}}
+ {{if value.can_toggle == 1}}
+ SELECTED
+ {{else}}
+ {{:helper.link('Select', 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'select'}, null)}}
+ {{/if}}
+
+ {{if value.is_active == 1}}
+ {{:helper.link(value.deactivatestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'deactivate'}, null)}}
+ {{else}}
+ {{:helper.link(value.activatestring, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'activate'}, null)}}
+ {{/if}}
+
{{/if}}
|
- ||
|
-
- Stored charges
- Selected: {{:value.chargetype}}
- |
-
-
+
+
+ {{if value.charges}}
+
- Stored charges
+ Selected: {{:helper.capitalizeFirstLetter(value.chargetype)}}
{{for value.charges :itemValue:itemIndex}}
- {{:helper.link(itemValue.caption, 'circle-arrow-s', {'interact_module' : value.index, 'module_mode' : 'select_charge_type', 'charge_type' : itemValue.index}, null)}}
+
+ {{:helper.link(helper.capitalizeFirstLetter(itemValue.caption), null, {'interact_module' : value.index, 'module_mode' : 'select_charge_type', 'charge_type' : itemValue.index}, null)}}
+
{{/for}}
- |
- ||