Merge remote-tracking branch 'upstream/dev' into Turrets

This commit is contained in:
PsiOmega
2014-12-03 11:38:54 +01:00
199 changed files with 9408 additions and 8908 deletions
+2
View File
@@ -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"
@@ -1016,6 +1017,7 @@
#include "code\modules\mob\living\carbon\human\logout.dm"
#include "code\modules\mob\living\carbon\human\say.dm"
#include "code\modules\mob\living\carbon\human\species.dm"
#include "code\modules\mob\living\carbon\human\unarmed_attack.dm"
#include "code\modules\mob\living\carbon\human\update_icons.dm"
#include "code\modules\mob\living\carbon\human\whisper.dm"
#include "code\modules\mob\living\carbon\human\alien\alien.dm"
@@ -1,5 +1,5 @@
obj/machinery/atmospherics/binary
dir = SOUTH
set_dir(SOUTH)
initialize_directions = SOUTH|NORTH
use_power = 1
@@ -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)]."
@@ -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)
src.set_dir(turn(src.dir, 90))
@@ -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
@@ -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()
@@ -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
@@ -1,5 +1,5 @@
obj/machinery/atmospherics/trinary
dir = SOUTH
set_dir(SOUTH)
initialize_directions = SOUTH|NORTH|WEST
use_power = 1
+1 -1
View File
@@ -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
@@ -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
@@ -1,5 +1,5 @@
/obj/machinery/atmospherics/unary
dir = SOUTH
set_dir(SOUTH)
initialize_directions = SOUTH
//layer = TURF_LAYER+0.1
+3 -3
View File
@@ -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
+10 -10
View File
@@ -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
+10 -10
View File
@@ -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"
+1 -1
View File
@@ -167,7 +167,7 @@
/obj/effect/hotspot/New()
..()
dir = pick(cardinal)
set_dir(pick(cardinal))
return
/*
+3 -3
View File
@@ -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)
+2 -2
View File
@@ -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"
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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)
src.set_dir(turn(src.dir, -90))
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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)
@@ -89,7 +89,7 @@
anchored = 1
New(var/turf/nloc, var/ndir, var/temp)
dir = ndir
set_dir(ndir)
..(nloc)
if(nloc)
+12 -12
View File
@@ -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
+5 -5
View File
@@ -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)
@@ -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
+11 -11
View File
@@ -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)
+1 -1
View File
@@ -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)
+3 -3
View File
@@ -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
+2 -4
View File
@@ -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()
if(direction != dir)
facedir(direction)
+1 -1
View File
@@ -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
+8 -8
View File
@@ -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
+12 -12
View File
@@ -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
+9 -9
View File
@@ -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
+8 -8
View File
@@ -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)
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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"])
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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)
+12 -2
View File
@@ -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,
@@ -463,7 +473,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/smescoil
name = "Superconducting Magnetic Coil"
contains = list(/obj/item/weapon/smes_coil)
cost = 150
cost = 75
containertype = /obj/structure/closet/crate
containername = "Superconducting Magnetic Coil crate"
group = "Engineering"
@@ -1087,7 +1097,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/smbig
name = "Supermatter Core"
contains = list(/obj/machinery/power/supermatter)
cost = 50
cost = 150
containertype = /obj/structure/closet/crate/secure/phoron
containername = "Supermatter crate (CAUTION)"
group = "Engineering"
+6 -1
View File
@@ -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
-10
View File
@@ -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)
+1
View File
@@ -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
+2 -2
View File
@@ -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()
+13 -1
View File
@@ -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 << "<span class='warning'>Suit hardware locked to your DNA hash.</span>"
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)
+5 -5
View File
@@ -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"
+4 -4
View File
@@ -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
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -13,7 +13,7 @@
use_power = 1
idle_power_usage = 40
interact_offline = 1
/obj/machinery/sleep_console/process()
if(stat & (NOPOWER|BROKEN))
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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()
+2 -2
View File
@@ -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--
+1 -1
View File
@@ -884,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
+4 -4
View File
@@ -234,13 +234,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
+10 -1
View File
@@ -79,7 +79,16 @@
updateicon()
/obj/machinery/cell_charger/attack_ai(mob/user)
return
if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) // Borgs can remove the cell if they are near enough
if(!src.charging)
return
charging.loc = src.loc
charging.updateicon()
charging = null
update_icon()
user.visible_message("[user] removes the cell from the charger.", "You remove the cell from the charger.")
/obj/machinery/cell_charger/emp_act(severity)
if(stat & (BROKEN|NOPOWER))
+1 -1
View File
@@ -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()
+1
View File
@@ -7,6 +7,7 @@
density = 1
anchored = 1.0
layer = 2.8
interact_offline = 1
var/on = 0
use_power = 1
+1
View File
@@ -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.
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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()
+56 -24
View File
@@ -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 << "<span class='notice'>You don't have the dexterity to do this!</span>"
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
+49 -49
View File
@@ -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
+3 -5
View File
@@ -456,9 +456,7 @@
if(check_synth) //If it's set to attack all non-silicons, target them!
if(L.lying)
if(lethal)
return TURRET_SECONDARY_TARGET
return TURRET_NOT_TARGET
return TURRET_SECONDARY_TARGET
return TURRET_PRIORITY_TARGET
if(iscuffed(L)) // If the target is handcuffed, leave it alone
@@ -470,7 +468,7 @@
return check_anomalies ? TURRET_PRIORITY_TARGET : TURRET_NOT_TARGET
if(ishuman(L)) //if the target is a human, analyze threat level
if(assess_perp(L, check_weapons, check_records) < 4)
if(assess_perp(L, check_weapons, check_records, check_arrest) < 4)
return TURRET_NOT_TARGET //if threat level < 4, keep going
if(L.lying) //if the perp is lying down, it's still a target but a less-important target
@@ -535,7 +533,7 @@
if(target && (target.stat != DEAD) && (!(target.lying) || emagged))
spawn()
popUp() //pop the turret up if it's not already up.
dir = get_dir(src, target) //even if you can't shoot, follow the target
set_dir(get_dir(src, target)) //even if you can't shoot, follow the target
spawn()
shootAt(target)
return 1
+2 -2
View File
@@ -25,11 +25,11 @@
if(istype(station))
station.com = hub
station.dir = dir
station.set_dir(dir)
if(istype(hub))
hub.com = src
hub.dir = dir
hub.set_dir(dir)
/obj/machinery/computer/teleporter/attackby(I as obj, mob/living/user as mob)
if(istype(I, /obj/item/weapon/card/data/))
+2 -2
View File
@@ -232,7 +232,7 @@
/obj/machinery/turret/proc/target()
while(src && enabled && !stat && check_target(cur_target))
src.dir = get_dir(src, cur_target)
src.set_dir(get_dir(src, cur_target))
shootAt(cur_target)
sleep(shot_delay)
return
@@ -487,7 +487,7 @@
if(!target)
cur_target = null
return
src.dir = get_dir(src,target)
src.set_dir(get_dir(src,target))
var/turf/targloc = get_turf(target)
var/target_x = targloc.x
var/target_y = targloc.y
@@ -61,7 +61,7 @@
if(chassis.hasInternalDamage(MECHA_INT_CONTROL_LOST))
move_result = step_rand(chassis)
else if(chassis.dir!=direction)
chassis.dir = direction
chassis.set_dir(direction)
move_result = 1
else
move_result = step(chassis,direction)
+4 -4
View File
@@ -316,7 +316,7 @@
return 0
/obj/mecha/proc/mechturn(direction)
dir = direction
set_dir(direction)
playsound(src,'sound/mecha/mechturn.ogg',40,1)
return 1
@@ -1014,7 +1014,7 @@
src.forceMove(src.loc)
src.log_append_to_last("[H] moved in as pilot.")
src.icon_state = src.reset_icon()
dir = dir_in
set_dir(dir_in)
playsound(src, 'sound/machines/windowdoor.ogg', 50, 1)
if(!hasInternalDamage())
src.occupant << sound('sound/mecha/nominal.ogg',volume=50)
@@ -1073,7 +1073,7 @@
src.Entered(mmi_as_oc)
src.Move(src.loc)
src.icon_state = src.reset_icon()
dir = dir_in
set_dir(dir_in)
src.log_message("[mmi_as_oc] moved in as pilot.")
if(!hasInternalDamage())
src.occupant << sound('sound/mecha/nominal.ogg',volume=50)
@@ -1162,7 +1162,7 @@
src.verbs += /obj/mecha/verb/eject
src.occupant = null
src.icon_state = src.reset_icon()+"-open"
src.dir = dir_in
src.set_dir(dir_in)
return
/////////////////////////
+1 -1
View File
@@ -7,7 +7,7 @@
/obj/mecha/medical/mechturn(direction)
dir = direction
set_dir(direction)
playsound(src,'sound/mecha/mechmove01.ogg',40,1)
return 1
+1 -1
View File
@@ -56,7 +56,7 @@
//these three procs overriden to play different sounds
/obj/mecha/working/hoverpod/mechturn(direction)
dir = direction
set_dir(direction)
//playsound(src,'sound/machines/hiss.ogg',40,1)
return 1
+7 -7
View File
@@ -30,7 +30,7 @@
if(!IsValidBiomassLoc(T))
continue
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
starting.dir = get_dir(src,starting)
starting.set_dir(get_dir(src,starting))
starting.originalRift = src
linkedBiomass += starting
spawn(1) //DEBUG
@@ -53,13 +53,13 @@
return
switch(dir)
if(NORTHWEST)
dir = NORTH
set_dir(NORTH)
if(NORTHEAST)
dir = EAST
set_dir(EAST)
if(SOUTHWEST)
dir = WEST
set_dir(WEST)
if(SOUTHEAST)
dir = SOUTH
set_dir(SOUTH)
sleep(spreadDelay)
Spread()
@@ -93,7 +93,7 @@
var/obj/effect/biomass/newBiomass = new /obj/effect/biomass(get_step(src,direction))
newBiomass.curDistance = curDistance + 1
newBiomass.maxDistance = maxDistance
newBiomass.dir = direction
newBiomass.set_dir(direction)
newBiomass.originalRift = originalRift
newBiomass.icon_state = "[originalRift.newicon]" //DEBUG
originalRift.linkedBiomass += newBiomass
@@ -110,7 +110,7 @@
if(!IsValidBiomassLoc(T,src))
continue
var/obj/effect/biomass/starting = new /obj/effect/biomass(T)
starting.dir = get_dir(src,starting)
starting.set_dir(get_dir(src,starting))
starting.maxDistance = maxDistance
/proc/IsValidBiomassLoc(turf/location,obj/effect/biomass/source = null)
+1 -1
View File
@@ -192,7 +192,7 @@
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / dist, safety = 1) //copy reagents to the smoke so mob/breathe() can handle inhaling the reagents
smoke.icon = I
smoke.layer = 6
smoke.dir = pick(cardinal)
smoke.set_dir(pick(cardinal))
smoke.pixel_x = -32 + rand(-8,8)
smoke.pixel_y = -32 + rand(-8,8)
walk_to(smoke, T)
@@ -40,7 +40,7 @@ obj/effect/decal/cleanable/liquid_fuel
icon_state = "mustard"
anchored = 0
New(newLoc, amt = 1, d = 0)
dir = d //Setting this direction means you won't get torched by your own flamethrower.
set_dir(d) //Setting this direction means you won't get torched by your own flamethrower.
. = ..()
Spread()
+2 -2
View File
@@ -402,7 +402,7 @@ steam.start() -- spawns the effect
if(istype(T, /turf/space))
var/obj/effect/effect/ion_trails/I = new /obj/effect/effect/ion_trails(src.oldposition)
src.oldposition = T
I.dir = src.holder.dir
I.set_dir(src.holder.dir)
flick("ion_fade", I)
I.icon_state = "blank"
spawn( 20 )
@@ -449,7 +449,7 @@ steam.start() -- spawns the effect
var/obj/effect/effect/steam/I = new /obj/effect/effect/steam(src.oldposition)
src.number++
src.oldposition = get_turf(holder)
I.dir = src.holder.dir
I.set_dir(src.holder.dir)
spawn(10)
I.delete()
src.number--
+1 -1
View File
@@ -28,7 +28,7 @@
..()
dir = CalcDir()
set_dir(CalcDir())
if(!floor)
switch(dir) //offset to make it be on the wall rather than on the floor
+1 -1
View File
@@ -71,7 +71,7 @@
var/predir = AM.dir
step(AM, direction)
if(!facedir)
AM.dir = predir
AM.set_dir(predir)
+17 -11
View File
@@ -262,7 +262,8 @@
if(H.wear_mask)
return 0
if(H.head && !(H.head.canremove) && (H.head.flags & HEADCOVERSMOUTH))
H << "\red \The [H.head] is in the way."
if(!disable_warning)
H << "<span class='warning'>\The [H.head] is in the way.</span>"
return 0
if( !(slot_flags & SLOT_MASK) )
return 0
@@ -296,7 +297,7 @@
return 0
if(!H.w_uniform && (slot_w_uniform in mob_equip))
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
if( !(slot_flags & SLOT_BELT) )
return
@@ -305,7 +306,8 @@
if(H.glasses)
return 0
if(H.head && !(H.head.canremove) && (H.head.flags & HEADCOVERSEYES))
H << "\red \The [H.head] is in the way."
if(!disable_warning)
H << "<span class='warning'>\The [H.head] is in the way.</span>"
return 0
if( !(slot_flags & SLOT_EYES) )
return 0
@@ -339,6 +341,10 @@
if(slot_w_uniform)
if(H.w_uniform)
return 0
if(H.wear_suit)
if(!disable_warning)
H << "<span class='warning'>\The [H.wear_suit] is in the way.</span>"
return 0
if( !(slot_flags & SLOT_ICLOTHING) )
return 0
return 1
@@ -347,7 +353,7 @@
return 0
if(!H.w_uniform && (slot_w_uniform in mob_equip))
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
if( !(slot_flags & SLOT_ID) )
return 0
@@ -357,7 +363,7 @@
return 0
if(!H.w_uniform && (slot_w_uniform in mob_equip))
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
if(slot_flags & SLOT_DENYPOCKET)
return 0
@@ -368,7 +374,7 @@
return 0
if(!H.w_uniform && (slot_w_uniform in mob_equip))
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
if(slot_flags & SLOT_DENYPOCKET)
return 0
@@ -380,11 +386,11 @@
return 0
if(!H.wear_suit && (slot_wear_suit in mob_equip))
if(!disable_warning)
H << "\red You need a suit before you can attach this [name]."
H << "<span class='warning'>You need a suit before you can attach this [name].</span>"
return 0
if(!H.wear_suit.allowed)
if(!disable_warning)
usr << "You somehow have a suit with no defined allowed items for suit storage, stop that."
usr << "<span class='warning'>You somehow have a suit with no defined allowed items for suit storage, stop that.</span>"
return 0
if( istype(src, /obj/item/device/pda) || istype(src, /obj/item/weapon/pen) || is_type_in_list(src, H.wear_suit.allowed) )
return 1
@@ -410,12 +416,12 @@
if(slot_tie)
if(!H.w_uniform && (slot_w_uniform in mob_equip))
if(!disable_warning)
H << "\red You need a jumpsuit before you can attach this [name]."
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
var/obj/item/clothing/under/uniform = H.w_uniform
if(uniform.hastie)
if (!disable_warning)
H << "\red You already have [uniform.hastie] attached to your [uniform]."
H << "<span class='warning'>You already have [uniform.hastie] attached to your [uniform].</span>"
return 0
if( !(slot_flags & SLOT_TIE) )
return 0
@@ -655,7 +661,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
usr << "You are unable to focus through the [devicename]"
cannotzoom = 1
else if(!zoom && global_hud.darkMask[1] in usr.client.screen)
usr << "Your welding equipment gets in the way of you looking through the [devicename]"
usr << "Your visor gets in the way of looking through the [devicename]"
cannotzoom = 1
else if(!zoom && usr.get_active_hand() != src)
usr << "You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better"
@@ -95,7 +95,7 @@
icon = new_icon
icon_state = new_iconstate
overlays = new_overlays
dir = O.dir
set_dir(O.dir)
M.loc = src
master = C
master.active_dummy = src
@@ -29,7 +29,7 @@
switch(tile_dir_mode)
if(1) // All directions accepted
F.dir = D
F.set_dir(D)
F.icon_state = mode
if(2) // Corner mode - diagonal directions converted CW around.
switch(D)
@@ -41,7 +41,7 @@
D = WEST
if(NORTHWEST)
D = NORTH
F.dir = D
F.set_dir(D)
F.icon_state = mode
if(3) // cardinal directions only. I've adjusted diagonals the same way the facing code does.
switch(D)
@@ -53,7 +53,7 @@
D = WEST
if(NORTHWEST)
D = WEST
F.dir = D
F.set_dir(D)
F.icon_state = mode
if(4) // floors.dmi icon_states "warningcorner" and "warnwhitecorner" are incorrect, this fixes it
var/D2
@@ -66,16 +66,16 @@
D2 = NORTH
if(NORTHWEST)
D2 = EAST
F.dir = D2
F.set_dir(D2)
F.icon_state = mode
if(5)
F.dir = 0
F.set_dir(0)
if(D == NORTH || D == SOUTH || D == NORTHEAST || D == SOUTHWEST)
F.icon_state = mode
else
F.icon_state = "[mode]_inv"
else
F.dir = 0
F.set_dir(0)
F.icon_state = mode
else
usr << "You can't paint that!"
+1 -1
View File
@@ -116,7 +116,7 @@
if(Proj.damage >= 20 || istype(Proj, /obj/item/projectile/beam/practice))
bmark.icon_state = "scorch"
bmark.dir = pick(NORTH,SOUTH,EAST,WEST) // random scorch design
bmark.set_dir(pick(NORTH,SOUTH,EAST,WEST)) // random scorch design
else
@@ -46,6 +46,7 @@ var/global/list/datum/stack_recipe/plastic_recipes = list ( \
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/utensil/pknife, 1, on_floor = 1), \
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
new/datum/stack_recipe("blood pack", /obj/item/weapon/reagent_containers/blood/empty, 4, on_floor = 0), \
)
var/global/list/datum/stack_recipe/iron_recipes = list ( \
+1 -1
View File
@@ -131,7 +131,7 @@
if (src.amount < R.req_amount*multiplier)
return
var/atom/O = new R.result_type( usr.loc )
O.dir = usr.dir
O.set_dir(usr.dir)
if (R.max_res_amount>1)
var/obj/item/stack/new_item = O
new_item.amount = R.res_amount*multiplier
@@ -35,7 +35,7 @@
spawn(det_time)
prime()
return
user.dir = get_dir(user, target)
user.set_dir(get_dir(user, target))
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
+88
View File
@@ -0,0 +1,88 @@
/obj/item/weapon/tape_roll
name = "tape roll"
desc = "A roll of sticky tape. Possibly for taping ducks... or was that ducts?"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "taperoll"
w_class = 1
/* -- Disabled for now until it has a use --
/obj/item/weapon/tape_roll/attack_self(mob/user as mob)
user << "You remove a length of tape from [src]."
var/obj/item/weapon/ducttape/tape = new()
user.put_in_hands(tape)
*/
/obj/item/weapon/tape_roll/proc/stick(var/obj/item/weapon/W, mob/user as mob)
if(!istype(W, /obj/item/weapon/paper))
return
user.drop_from_inventory(W)
var/obj/item/weapon/ducttape/tape = new(get_turf(src))
tape.attach(W)
user.put_in_hands(tape)
/obj/item/weapon/ducttape
name = "tape"
desc = "A piece of sticky tape."
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "tape"
w_class = 1
layer = 4
anchored = 1 //it's sticky, no you cant move it
var/obj/item/weapon/stuck = null
/obj/item/weapon/ducttape/New()
..()
flags |= NOBLUDGEON
/obj/item/weapon/ducttape/examine(mob/user as mob)
return stuck.examine(user)
/obj/item/weapon/ducttape/proc/attach(var/obj/item/weapon/W)
stuck = W
W.forceMove(src)
icon_state = W.icon_state + "_taped"
name = W.name + " (taped)"
/obj/item/weapon/ducttape/attack_self(mob/user as mob)
if(!stuck)
return
user << "You remove \the [initial(name)] from [stuck]."
user.drop_from_inventory(src)
stuck.forceMove(get_turf(src))
user.put_in_hands(stuck)
stuck = null
del(src)
/obj/item/weapon/ducttape/afterattack(var/A, mob/user as mob, flag, params)
if(!in_range(user, A) || istype(A, /obj/machinery/door) || !stuck)
return
var/turf/target_turf = get_turf(A)
var/turf/source_turf = get_turf(user)
var/dir_offset = 0
if(target_turf != source_turf)
dir_offset = get_dir(source_turf, target_turf)
user.drop_from_inventory(src)
forceMove(source_turf)
if(params)
var/list/mouse_control = params2list(params)
if(mouse_control["icon-x"])
pixel_x = text2num(mouse_control["icon-x"]) - 16
if(dir_offset & EAST)
pixel_x += 32
else if(dir_offset & WEST)
pixel_x -= 32
if(mouse_control["icon-y"])
pixel_y = text2num(mouse_control["icon-y"]) - 16
if(dir_offset & NORTH)
pixel_y += 32
else if(dir_offset & SOUTH)
pixel_y -= 32
+1 -1
View File
@@ -169,7 +169,7 @@
if((wielded) && prob(50))
spawn(0)
for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2))
user.dir = i
user.set_dir(i)
sleep(1)
/obj/item/weapon/twohanded/dualsaber/IsShield()
@@ -15,7 +15,7 @@
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/stool/bed/chair/C = new /obj/structure/stool/bed/chair(loc)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
C.dir = dir
C.set_dir(dir)
part.loc = loc
part.master = null
part = null
+14 -11
View File
@@ -170,14 +170,14 @@
/obj/structure/stool/bed/chair/janicart/New()
handle_rotation()
create_reagents(100)
update_layer()
/obj/structure/stool/bed/chair/janicart/examine(mob/user)
if(!..(user, 1))
return
user << "\icon[src] This [callme] contains [reagents.total_volume] unit\s of water!"
if(mybag)
user << "\A [mybag] is hanging on the [callme]."
@@ -215,7 +215,6 @@
if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
step(src, direction)
update_mob()
handle_rotation()
else
user << "<span class='notice'>You'll need the keys in one of your hands to drive this [callme].</span>"
@@ -238,13 +237,20 @@
"<span class='notice'>You climb onto the [callme]!</span>")
M.buckled = src
M.loc = loc
M.dir = dir
M.set_dir(dir)
M.update_canmove()
buckled_mob = M
update_mob()
add_fingerprint(user)
/obj/structure/stool/bed/chair/janicart/update_layer()
if(dir == SOUTH)
layer = FLY_LAYER
else
layer = OBJ_LAYER
/obj/structure/stool/bed/chair/janicart/unbuckle()
if(buckled_mob)
buckled_mob.pixel_x = 0
@@ -252,12 +258,9 @@
..()
/obj/structure/stool/bed/chair/janicart/handle_rotation()
if(dir == SOUTH)
layer = FLY_LAYER
else
layer = OBJ_LAYER
/obj/structure/stool/bed/chair/janicart/set_dir()
..()
update_layer()
if(buckled_mob)
if(buckled_mob.loc != loc)
buckled_mob.buckled = null //Temporary, so Move() succeeds.
@@ -268,7 +271,7 @@
/obj/structure/stool/bed/chair/janicart/proc/update_mob()
if(buckled_mob)
buckled_mob.dir = dir
buckled_mob.set_dir(dir)
switch(dir)
if(SOUTH)
buckled_mob.pixel_x = 0
+1 -1
View File
@@ -77,7 +77,7 @@
for(var/atom/movable/A as mob|obj in src)
A.loc = src.connected.loc
src.connected.icon_state = "morguet"
src.connected.dir = src.dir
src.connected.set_dir(src.dir)
else
//src.connected = null
del(src.connected)
@@ -56,7 +56,7 @@
"<span class='notice'>You hear squelching...</span>")
M.buckled = src
M.loc = src.loc
M.dir = src.dir
M.set_dir(src.dir)
M.update_canmove()
M.pixel_y = 6
M.old_y = 6
@@ -33,9 +33,6 @@
manual_unbuckle(user)
return
/obj/structure/stool/bed/proc/handle_rotation()
return
/obj/structure/stool/bed/MouseDrop(atom/over_object)
return
@@ -104,7 +101,7 @@
"You hear metal clanking")
M.buckled = src
M.loc = src.loc
M.dir = src.dir
M.set_dir(src.dir)
M.update_canmove()
src.buckled_mob = M
src.add_fingerprint(user)
@@ -11,7 +11,7 @@
/obj/structure/stool/bed/chair/New()
..()
spawn(3) //sorry. i don't think there's a better way to do this.
handle_rotation()
update_layer()
return
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -24,7 +24,7 @@
user.drop_item()
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
E.dir = dir
E.set_dir(dir)
E.part = SK
SK.loc = E
SK.master = E
@@ -37,13 +37,17 @@
rotate()
return
/obj/structure/stool/bed/chair/handle_rotation() //making this into a seperate proc so office chairs can call it on Move()
/obj/structure/stool/bed/chair/proc/update_layer()
if(src.dir == NORTH)
src.layer = FLY_LAYER
else
src.layer = OBJ_LAYER
/obj/structure/stool/bed/chair/set_dir()
..()
update_layer()
if(buckled_mob)
buckled_mob.dir = dir
buckled_mob.set_dir(dir)
/obj/structure/stool/bed/chair/verb/rotate()
set name = "Rotate Chair"
@@ -51,8 +55,7 @@
set src in oview(1)
if(config.ghost_interaction)
src.dir = turn(src.dir, 90)
handle_rotation()
src.set_dir(turn(src.dir, 90))
return
else
if(istype(usr,/mob/living/simple_animal/mouse))
@@ -62,8 +65,7 @@
if(usr.stat || usr.restrained())
return
src.dir = turn(src.dir, 90)
handle_rotation()
src.set_dir(turn(src.dir, 90))
return
/obj/structure/stool/bed/chair/MouseDrop_T(mob/M as mob, mob/user as mob)
@@ -142,7 +144,6 @@
Bump(O)
else
unbuckle()
handle_rotation()
/obj/structure/stool/bed/chair/office/Bump(atom/A)
..()
@@ -10,12 +10,13 @@
var/bloodiness
/obj/structure/stool/bed/chair/wheelchair/handle_rotation()
/obj/structure/stool/bed/chair/wheelchair/set_dir()
..()
overlays = null
var/image/O = image(icon = 'icons/obj/objects.dmi', icon_state = "w_overlay", layer = FLY_LAYER, dir = src.dir)
overlays += O
if(buckled_mob)
buckled_mob.dir = dir
buckled_mob.set_dir(dir)
/obj/structure/stool/bed/chair/wheelchair/relaymove(mob/user, direction)
// Redundant check?
@@ -64,8 +65,7 @@
step(src, direction)
if(buckled_mob) // Make sure it stays beneath the occupant
Move(buckled_mob.loc)
dir = direction
handle_rotation()
set_dir(direction)
if(pulling) // Driver
if(pulling.loc == src.loc) // We moved onto the wheelchair? Revert!
pulling.loc = T
@@ -74,7 +74,7 @@
if(get_dist(src, pulling) > 1) // We are too far away? Losing control.
pulling = null
user.pulledby = null
pulling.dir = get_dir(pulling, src) // When everything is right, face the wheelchair
pulling.set_dir(get_dir(pulling, src)) // When everything is right, face the wheelchair
if(bloodiness)
create_track()
driving = 0
@@ -101,7 +101,6 @@
else
if (occupant && (src.loc != occupant.loc))
src.loc = occupant.loc // Failsafe to make sure the wheelchair stays beneath the occupant after driving
handle_rotation()
/obj/structure/stool/bed/chair/wheelchair/attack_hand(mob/user as mob)
if (pulling)
@@ -122,7 +121,7 @@
usr.pulledby = src
if(usr.pulling)
usr.stop_pulling()
usr.dir = get_dir(usr, src)
usr.set_dir(get_dir(usr, src))
usr << "You grip \the [name]'s handles."
else
if(usr != pulling)
@@ -176,14 +175,14 @@
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
var/newdir = get_dir(get_step(loc, dir), 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--
/obj/structure/stool/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
+3 -3
View File
@@ -250,9 +250,9 @@
if(6)
icon_state = "tabledir3"
if (dir_sum in list(1,2,4,8,5,6,9,10))
dir = dir_sum
set_dir(dir_sum)
else
dir = 2
set_dir(2)
/obj/structure/table/attack_tk() // no telehulk sorry
return
@@ -445,7 +445,7 @@
spawn(0)
A.throw_at(pick(targets),1,1)
dir = direction
set_dir(direction)
if(dir != NORTH)
layer = 5
climbable = 0 //flipping tables allows them to be used as makeshift barriers
@@ -170,7 +170,7 @@ obj/structure/ex_act(severity)
nexttube = tube
break
if(!nexttube)
pod.dir = turn(pod.dir, 180)
pod.set_dir(turn(pod.dir, 180))
if(icon_state == "closed" && pod)
pod.follow_tube()
@@ -320,13 +320,13 @@ obj/structure/ex_act(severity)
break
if(current_tube == null)
dir = next_dir
set_dir(next_dir)
Move(get_step(loc, dir)) // Allow collisions when leaving the tubes.
break
last_delay = current_tube.enter_delay(src, next_dir)
sleep(last_delay)
dir = next_dir
set_dir(next_dir)
loc = next_loc // When moving from one tube to another, skip collision and such.
density = current_tube.density
@@ -429,14 +429,14 @@ obj/structure/ex_act(severity)
station.open_animation()
else if(direction in station.directions())
dir = direction
set_dir(direction)
station.launch_pod()
return
for(var/obj/structure/transit_tube/tube in loc)
if(dir in tube.directions())
if(tube.has_exit(direction))
dir = direction
set_dir(direction)
return

Some files were not shown because too many files have changed in this diff Show More