Merge branch 'master' into upstream-merge-32280
This commit is contained in:
@@ -121,6 +121,13 @@
|
||||
to_chat(user, "<span class='warning'>[P] has no poster... inside it? Inform a coder!</span>")
|
||||
return
|
||||
|
||||
// Deny placing posters on currently-diagonal walls, although the wall may change in the future.
|
||||
if (smooth & SMOOTH_DIAGONAL)
|
||||
for (var/O in our_overlays)
|
||||
var/image/I = O
|
||||
if (copytext(I.icon_state, 1, 3) == "d-")
|
||||
return
|
||||
|
||||
var/stuff_on_wall = 0
|
||||
for(var/obj/O in contents) //Let's see if it already has a poster on it or too much stuff
|
||||
if(istype(O, /obj/structure/sign/poster))
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
var/atmos_link = FALSE //Link source/destination atmos.
|
||||
var/turf/open/atmos_source //Atmos link source
|
||||
var/turf/open/atmos_destination //Atmos link destination
|
||||
var/allow_anchored = FALSE
|
||||
|
||||
/obj/effect/portal/anom
|
||||
name = "wormhole"
|
||||
@@ -42,6 +43,8 @@
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
/obj/effect/portal/Crossed(atom/movable/AM, oldloc)
|
||||
if(isobserver(AM))
|
||||
return ..()
|
||||
if(linked && (get_turf(oldloc) == get_turf(linked)))
|
||||
return ..()
|
||||
if(!teleport(AM))
|
||||
@@ -51,6 +54,8 @@
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
if(get_turf(user) == get_turf(src))
|
||||
teleport(user)
|
||||
if(Adjacent(user))
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
@@ -123,12 +128,18 @@
|
||||
linked = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/attack_ghost(mob/dead/observer/O)
|
||||
if(!teleport(O))
|
||||
return ..()
|
||||
|
||||
/obj/effect/portal/proc/teleport(atom/movable/M)
|
||||
if(!istype(M) || istype(M, /obj/effect) || isobserver(M) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M))) //Things that shouldn't teleport.
|
||||
if(!istype(M) || istype(M, /obj/effect) || (ismecha(M) && !mech_sized) || (!isobj(M) && !ismob(M))) //Things that shouldn't teleport.
|
||||
return
|
||||
var/turf/real_target = get_link_target_turf()
|
||||
if(!istype(real_target))
|
||||
return FALSE
|
||||
if(!ismecha(M) && M.anchored && !allow_anchored)
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_COORDJMP(src)] made by [usr].")
|
||||
if(do_teleport(M, real_target, 0))
|
||||
|
||||
+168
-154
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
/*
|
||||
CONTAINS:
|
||||
RPD
|
||||
@@ -14,109 +12,111 @@ RPD
|
||||
#define CATEGORY_ATMOS 0
|
||||
#define CATEGORY_DISPOSALS 1
|
||||
|
||||
|
||||
//find the defines in code\_DEFINES\pipe_construction.dm
|
||||
GLOBAL_LIST_INIT(atmos_pipe_recipes, list(
|
||||
"Pipes" = list(
|
||||
new /datum/pipe_info/pipe("Pipe", /obj/machinery/atmospherics/pipe/simple),
|
||||
new /datum/pipe_info/pipe("Manifold", /obj/machinery/atmospherics/pipe/manifold),
|
||||
new /datum/pipe_info/pipe("Manual Valve", /obj/machinery/atmospherics/components/binary/valve),
|
||||
new /datum/pipe_info/pipe("Digital Valve", /obj/machinery/atmospherics/components/binary/valve/digital),
|
||||
new /datum/pipe_info/pipe("4-Way Manifold", /obj/machinery/atmospherics/pipe/manifold4w),
|
||||
new /datum/pipe_info/pipe("Layer Manifold", /obj/machinery/atmospherics/pipe/layer_manifold),
|
||||
),
|
||||
"Devices" = list(
|
||||
new /datum/pipe_info/pipe("Connector", /obj/machinery/atmospherics/components/unary/portables_connector),
|
||||
new /datum/pipe_info/pipe("Unary Vent", /obj/machinery/atmospherics/components/unary/vent_pump),
|
||||
new /datum/pipe_info/pipe("Gas Pump", /obj/machinery/atmospherics/components/binary/pump),
|
||||
new /datum/pipe_info/pipe("Passive Gate", /obj/machinery/atmospherics/components/binary/passive_gate),
|
||||
new /datum/pipe_info/pipe("Volume Pump", /obj/machinery/atmospherics/components/binary/volume_pump),
|
||||
new /datum/pipe_info/pipe("Scrubber", /obj/machinery/atmospherics/components/unary/vent_scrubber),
|
||||
new /datum/pipe_info/pipe("Injector", /obj/machinery/atmospherics/components/unary/outlet_injector),
|
||||
new /datum/pipe_info/meter("Meter"),
|
||||
new /datum/pipe_info/pipe("Gas Filter", /obj/machinery/atmospherics/components/trinary/filter),
|
||||
new /datum/pipe_info/pipe("Gas Mixer", /obj/machinery/atmospherics/components/trinary/mixer),
|
||||
),
|
||||
"Heat Exchange" = list(
|
||||
new /datum/pipe_info/pipe("Pipe", /obj/machinery/atmospherics/pipe/heat_exchanging/simple),
|
||||
new /datum/pipe_info/pipe("Manifold", /obj/machinery/atmospherics/pipe/heat_exchanging/manifold),
|
||||
new /datum/pipe_info/pipe("4-Way Manifold", /obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w),
|
||||
new /datum/pipe_info/pipe("Junction", /obj/machinery/atmospherics/pipe/heat_exchanging/junction),
|
||||
new /datum/pipe_info/pipe("Heat Exchanger", /obj/machinery/atmospherics/components/unary/heat_exchanger),
|
||||
)
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(disposal_pipe_recipes, list(
|
||||
"Disposal Pipes" = list(
|
||||
new /datum/pipe_info/disposal("Pipe", /obj/structure/disposalpipe/segment, PIPE_BENDABLE),
|
||||
new /datum/pipe_info/disposal("Junction", /obj/structure/disposalpipe/junction, PIPE_TRIN_M),
|
||||
new /datum/pipe_info/disposal("Y-Junction", /obj/structure/disposalpipe/junction/yjunction),
|
||||
new /datum/pipe_info/disposal("Sort Junction", /obj/structure/disposalpipe/sorting/mail, PIPE_TRIN_M),
|
||||
new /datum/pipe_info/disposal("Trunk", /obj/structure/disposalpipe/trunk),
|
||||
new /datum/pipe_info/disposal("Bin", /obj/machinery/disposal/bin, PIPE_ONEDIR),
|
||||
new /datum/pipe_info/disposal("Outlet", /obj/structure/disposaloutlet),
|
||||
new /datum/pipe_info/disposal("Chute", /obj/machinery/disposal/deliveryChute),
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
/datum/pipe_info
|
||||
var/id=-1
|
||||
var/categoryId
|
||||
var/dir=SOUTH
|
||||
var/dirtype = PIPE_BENDABLE
|
||||
var/name
|
||||
var/icon
|
||||
var/icon_state
|
||||
var/selected=0
|
||||
var/id = -1
|
||||
var/categoryId
|
||||
var/dirtype = PIPE_BENDABLE
|
||||
|
||||
/datum/pipe_info/proc/Render(dispenser)
|
||||
return "<li><a href='?src=[REF(dispenser)]&[Params()]'>[name]</a></li>"
|
||||
|
||||
/datum/pipe_info/proc/Params()
|
||||
return ""
|
||||
|
||||
|
||||
/datum/pipe_info/pipe
|
||||
categoryId = CATEGORY_ATMOS
|
||||
icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
|
||||
|
||||
/datum/pipe_info/pipe/New(obj/machinery/atmospherics/path)
|
||||
/datum/pipe_info/pipe/New(label, obj/machinery/atmospherics/path)
|
||||
name = label
|
||||
id = path
|
||||
icon_state = initial(path.pipe_state)
|
||||
dirtype = initial(path.construction_type)
|
||||
|
||||
/datum/pipe_info/proc/Render(dispenser,label)
|
||||
/datum/pipe_info/pipe/Params()
|
||||
return "makepipe=[id]&type=[dirtype]"
|
||||
|
||||
/datum/pipe_info/pipe/Render(dispenser,label,dir=NORTH)
|
||||
return "<li><a href='?src=[REF(dispenser)];makepipe=[id];dir=[dir];type=[dirtype]'>[label]</a></li>"
|
||||
|
||||
/datum/pipe_info/meter
|
||||
categoryId = CATEGORY_ATMOS
|
||||
icon = 'icons/obj/atmospherics/pipes/simple.dmi'
|
||||
icon_state = "meterX"
|
||||
|
||||
/datum/pipe_info/meter/New()
|
||||
return
|
||||
/datum/pipe_info/meter/New(label)
|
||||
name = label
|
||||
|
||||
/datum/pipe_info/meter/Render(dispenser,label)
|
||||
return "<li><a href='?src=[REF(dispenser)];makemeter=1;type=[dirtype]'>[label]</a></li>" //hardcoding is no
|
||||
/datum/pipe_info/meter/Params()
|
||||
return "makemeter=1&type=[dirtype]"
|
||||
|
||||
GLOBAL_LIST_INIT(disposalpipeID2State, list(
|
||||
"pipe-s",
|
||||
"pipe-c",
|
||||
"pipe-j1",
|
||||
"pipe-j2",
|
||||
"pipe-y",
|
||||
"pipe-t",
|
||||
"disposal",
|
||||
"outlet",
|
||||
"intake",
|
||||
"pipe-j1s",
|
||||
"pipe-j2s"))
|
||||
|
||||
/datum/pipe_info/disposal
|
||||
categoryId = CATEGORY_DISPOSALS
|
||||
icon = 'icons/obj/atmospherics/pipes/disposal.dmi'
|
||||
|
||||
/datum/pipe_info/disposal/New(var/pid,var/dt)
|
||||
id=pid
|
||||
icon_state=GLOB.disposalpipeID2State[pid+1]
|
||||
dir = SOUTH
|
||||
dirtype=dt
|
||||
if(pid<DISP_END_BIN || pid>DISP_END_CHUTE)
|
||||
/datum/pipe_info/disposal/New(label, obj/path, dt=PIPE_UNARY)
|
||||
name = label
|
||||
id = path
|
||||
|
||||
icon_state = initial(path.icon_state)
|
||||
if(ispath(path, /obj/structure/disposalpipe))
|
||||
icon_state = "con[icon_state]"
|
||||
|
||||
/datum/pipe_info/disposal/Render(dispenser,label)
|
||||
return "<li><a href='?src=[REF(dispenser)];dmake=[id];type=[dirtype]'>[label]</a></li>" //avoid hardcoding.
|
||||
dirtype = dt
|
||||
|
||||
/datum/pipe_info/disposal/Params()
|
||||
return "dmake=[id]&type=[dirtype]"
|
||||
|
||||
|
||||
//find these defines in code\game\machinery\pipe\consruction.dm
|
||||
GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
"Pipes" = list(
|
||||
"Pipe" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/simple),
|
||||
"Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/manifold),
|
||||
"Manual Valve" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/valve),
|
||||
"Digital Valve" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/valve/digital),
|
||||
"4-Way Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/manifold4w),
|
||||
"Layer Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/layer_manifold),
|
||||
),
|
||||
"Devices" = list(
|
||||
"Connector" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/portables_connector),
|
||||
"Unary Vent" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/vent_pump),
|
||||
"Gas Pump" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/pump),
|
||||
"Passive Gate" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/passive_gate),
|
||||
"Volume Pump" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/binary/volume_pump),
|
||||
"Scrubber" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/vent_scrubber),
|
||||
"Injector" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/outlet_injector),
|
||||
"Meter" = new /datum/pipe_info/meter(),
|
||||
"Gas Filter" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/trinary/filter),
|
||||
"Gas Mixer" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/trinary/mixer),
|
||||
),
|
||||
"Heat Exchange" = list(
|
||||
"Pipe" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/simple),
|
||||
"Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/manifold),
|
||||
"4-Way Manifold" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/manifold4w),
|
||||
"Junction" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/pipe/heat_exchanging/junction),
|
||||
"Heat Exchanger" = new /datum/pipe_info/pipe(/obj/machinery/atmospherics/components/unary/heat_exchanger),
|
||||
),
|
||||
"Disposal Pipes" = list(
|
||||
"Pipe" = new /datum/pipe_info/disposal(DISP_PIPE_STRAIGHT, PIPE_BINARY),
|
||||
"Bent Pipe" = new /datum/pipe_info/disposal(DISP_PIPE_BENT, PIPE_TRINARY),
|
||||
"Junction" = new /datum/pipe_info/disposal(DISP_JUNCTION, PIPE_TRINARY),
|
||||
"Y-Junction" = new /datum/pipe_info/disposal(DISP_YJUNCTION, PIPE_TRINARY),
|
||||
"Trunk" = new /datum/pipe_info/disposal(DISP_END_TRUNK, PIPE_TRINARY),
|
||||
"Bin" = new /datum/pipe_info/disposal(DISP_END_BIN, PIPE_QUAD),
|
||||
"Outlet" = new /datum/pipe_info/disposal(DISP_END_OUTLET, PIPE_UNARY),
|
||||
"Chute" = new /datum/pipe_info/disposal(DISP_END_CHUTE, PIPE_UNARY),
|
||||
"Sort Junction" = new /datum/pipe_info/disposal(DISP_SORTJUNCTION, PIPE_TRINARY),
|
||||
)
|
||||
))
|
||||
|
||||
/obj/item/pipe_dispenser
|
||||
name = "Rapid Piping Device (RPD)"
|
||||
@@ -138,7 +138,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
var/p_type = /obj/machinery/atmospherics/pipe/simple
|
||||
var/p_conntype = PIPE_BENDABLE
|
||||
var/p_dir = 1
|
||||
var/p_flipped = 0
|
||||
var/p_flipped = FALSE
|
||||
var/p_class = ATMOS_MODE
|
||||
var/list/paint_colors = list(
|
||||
"grey" = rgb(255,255,255),
|
||||
@@ -179,6 +179,7 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
selected=" class=\"imglink selected\""
|
||||
return "<a href=\"?src=[REF(src)];setdir=[_dir];flipped=[flipped]\" title=\"[title]\"[selected]\"><img src=\"[pic]\" /></a>"
|
||||
|
||||
|
||||
/obj/item/pipe_dispenser/proc/show_menu(mob/user)
|
||||
if(!user || !src)
|
||||
return 0
|
||||
@@ -197,38 +198,48 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
|
||||
dat += "<b>Category:</b><ul>"
|
||||
if(screen == CATEGORY_ATMOS)
|
||||
dat += "<span class='linkOn'>Atmospherics</span> <A href='?src=[REF(src)];screen=[CATEGORY_DISPOSALS];dmake=0;type=0'>Disposals</A><BR>"
|
||||
var/list/recipes = GLOB.disposal_pipe_recipes
|
||||
var/datum/pipe_info/first_recipe = recipes[recipes[1]][1]
|
||||
dat += "<span class='linkOn'>Atmospherics</span> "
|
||||
dat += "<A href='?src=[REF(src)]&screen=[CATEGORY_DISPOSALS]&[first_recipe.Params()]'>Disposals</A><BR>"
|
||||
dat += "Atmospherics Piping Layer: "
|
||||
|
||||
var/layers_total = PIPING_LAYER_MAX - PIPING_LAYER_MIN + 1
|
||||
for(var/iter = PIPING_LAYER_MIN, iter <= layers_total, iter++)
|
||||
if(iter == piping_layer)
|
||||
dat += "<span class='linkOn'>[iter]</span>"
|
||||
else
|
||||
dat += "<A href='?src=[REF(src)];setlayer=[iter]'>[iter]</A>"
|
||||
dat += "<BR>"
|
||||
|
||||
else if(screen == CATEGORY_DISPOSALS)
|
||||
dat += "<A href='?src=[REF(src)];screen=[CATEGORY_ATMOS];makepipe=[/obj/machinery/atmospherics/pipe/simple];dir=1;type=0'>Atmospherics</A> <span class='linkOn'>Disposals</span><BR>"
|
||||
var/generated_layer_list = ""
|
||||
var/layers_total = PIPING_LAYER_MAX - PIPING_LAYER_MIN + 1
|
||||
for(var/iter = PIPING_LAYER_MIN, iter <= layers_total, iter++)
|
||||
if(iter == piping_layer)
|
||||
generated_layer_list += "<span class='linkOn'><A href='?src=[REF(src)];setlayer=[iter]'>[iter]</A></span>"
|
||||
else
|
||||
generated_layer_list += "<A href='?src=[REF(src)];setlayer=[iter]'>[iter]</A>"
|
||||
dat += "Atmospherics Piping Layer: [generated_layer_list]<BR>"
|
||||
var/list/recipes = GLOB.atmos_pipe_recipes
|
||||
var/datum/pipe_info/first_recipe = recipes[recipes[1]][1]
|
||||
dat += "<A href='?src=[REF(src)]&screen=[CATEGORY_ATMOS]&[first_recipe.Params()]'>Atmospherics</A> "
|
||||
dat += "<span class='linkOn'>Disposals</span><BR>"
|
||||
|
||||
dat += "</ul>"
|
||||
|
||||
var/icon/preview=null
|
||||
var/datbuild = ""
|
||||
for(var/category in GLOB.RPD_recipes)
|
||||
var/list/cat = GLOB.RPD_recipes[category]
|
||||
for(var/label in cat)
|
||||
var/datum/pipe_info/I = cat[label]
|
||||
var/recipes = GLOB.atmos_pipe_recipes + GLOB.disposal_pipe_recipes
|
||||
for(var/category in recipes)
|
||||
var/list/cat_recipes = recipes[category]
|
||||
for(var/i in cat_recipes)
|
||||
var/datum/pipe_info/I = i
|
||||
var/found=0
|
||||
if(I.id == p_type)
|
||||
if((p_class == ATMOS_MODE || p_class == METER_MODE) && (istype(I, /datum/pipe_info/pipe) || istype(I, /datum/pipe_info/meter)))
|
||||
found=1
|
||||
else if(p_class == DISPOSALS_MODE && istype(I, /datum/pipe_info/disposal))
|
||||
found=1
|
||||
if((p_class == ATMOS_MODE || p_class == METER_MODE) && I.categoryId == CATEGORY_ATMOS)
|
||||
found = 1
|
||||
else if(p_class == DISPOSALS_MODE && I.categoryId == CATEGORY_DISPOSALS)
|
||||
found = 1
|
||||
if(found)
|
||||
preview=new /icon(I.icon,I.icon_state)
|
||||
preview = new /icon(I.icon, I.icon_state)
|
||||
if(screen == I.categoryId)
|
||||
if(I.id == p_type && p_class >= 0)
|
||||
datbuild += "<span class='linkOn'>[label]</span>"
|
||||
datbuild += "<li><span class='linkOn'>[I.name]</span></li>"
|
||||
else
|
||||
datbuild += I.Render(src,label)
|
||||
datbuild += I.Render(src)
|
||||
|
||||
if(length(datbuild) > 0)
|
||||
dat += "<b>[category]:</b><ul>"
|
||||
@@ -264,20 +275,20 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
else
|
||||
dirsel = ""
|
||||
|
||||
if(PIPE_BINARY) // Straight, N-S, W-E
|
||||
if(PIPE_STRAIGHT) // Straight, N-S, W-E
|
||||
if(preview)
|
||||
user << browse_rsc(new /icon(preview, dir=NORTH), "vertical.png")
|
||||
user << browse_rsc(new /icon(preview, dir=EAST), "horizontal.png")
|
||||
|
||||
dirsel += "<p>"
|
||||
dirsel += render_dir_img(1,"vertical.png","Vertical")
|
||||
dirsel += render_dir_img(4,"horizontal.png","Horizontal")
|
||||
dirsel += render_dir_img(NORTH,"vertical.png","Vertical")
|
||||
dirsel += render_dir_img(EAST,"horizontal.png","Horizontal")
|
||||
dirsel += "</p>"
|
||||
else
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=[REF(src)];setdir=1; flipped=0" title="vertical">↕</a>
|
||||
<a href="?src=[REF(src)];setdir=4; flipped=0" title="horizontal">↔</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTH]" title="vertical">↕</a>
|
||||
<a href="?src=[REF(src)];setdir=[EAST]" title="horizontal">↔</a>
|
||||
</p>
|
||||
"}
|
||||
|
||||
@@ -291,26 +302,26 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
user << browse_rsc(new /icon(preview, dir=SOUTHEAST), "se.png")
|
||||
|
||||
dirsel += "<p>"
|
||||
dirsel += render_dir_img(1,"vertical.png","Vertical")
|
||||
dirsel += render_dir_img(4,"horizontal.png","Horizontal")
|
||||
dirsel += render_dir_img(NORTH,"vertical.png","Vertical")
|
||||
dirsel += render_dir_img(EAST,"horizontal.png","Horizontal")
|
||||
dirsel += "<br />"
|
||||
dirsel += render_dir_img(9,"nw.png","West to North")
|
||||
dirsel += render_dir_img(5,"ne.png","North to East")
|
||||
dirsel += render_dir_img(NORTHWEST,"nw.png","West to North")
|
||||
dirsel += render_dir_img(NORTHEAST,"ne.png","North to East")
|
||||
dirsel += "<br />"
|
||||
dirsel += render_dir_img(10,"sw.png","South to West")
|
||||
dirsel += render_dir_img(6,"se.png","East to South")
|
||||
dirsel += render_dir_img(SOUTHWEST,"sw.png","South to West")
|
||||
dirsel += render_dir_img(SOUTHEAST,"se.png","East to South")
|
||||
dirsel += "</p>"
|
||||
else
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=[REF(src)];setdir=1; flipped=0" title="vertical">↕</a>
|
||||
<a href="?src=[REF(src)];setdir=4; flipped=0" title="horizontal">↔</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTH]" title="vertical">↕</a>
|
||||
<a href="?src=[REF(src)];setdir=[EAST]" title="horizontal">↔</a>
|
||||
<br />
|
||||
<a href="?src=[REF(src)];setdir=9; flipped=0" title="West to North">╝</a>
|
||||
<a href="?src=[REF(src)];setdir=5; flipped=0" title="North to East">╚</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTHWEST]" title="West to North">╝</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTHEAST]" title="North to East">╚</a>
|
||||
<br />
|
||||
<a href="?src=[REF(src)];setdir=10; flipped=0" title="South to West">╗</a>
|
||||
<a href="?src=[REF(src)];setdir=6; flipped=0" title="East to South">╔</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTHWEST]" title="South to West">╗</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTHEAST]" title="East to South">╔</a>
|
||||
</p>
|
||||
"}
|
||||
if(PIPE_TRINARY) // Manifold
|
||||
@@ -321,20 +332,20 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
user << browse_rsc(new /icon(preview, dir=WEST), "e.png")
|
||||
|
||||
dirsel += "<p>"
|
||||
dirsel += render_dir_img(1,"s.png","West South East")
|
||||
dirsel += render_dir_img(4,"w.png","North West South")
|
||||
dirsel += render_dir_img(NORTH,"s.png","West South East")
|
||||
dirsel += render_dir_img(EAST,"w.png","North West South")
|
||||
dirsel += "<br />"
|
||||
dirsel += render_dir_img(2,"n.png","East North West")
|
||||
dirsel += render_dir_img(8,"e.png","South East North")
|
||||
dirsel += render_dir_img(SOUTH,"n.png","East North West")
|
||||
dirsel += render_dir_img(WEST,"e.png","South East North")
|
||||
dirsel += "</p>"
|
||||
else
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=[REF(src)];setdir=1; flipped=0" title="West, South, East">╦</a>
|
||||
<a href="?src=[REF(src)];setdir=4; flipped=0" title="North, West, South">╣</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTH]" title="West, South, East">╦</a>
|
||||
<a href="?src=[REF(src)];setdir=[EAST]" title="North, West, South">╣</a>
|
||||
<br />
|
||||
<a href="?src=[REF(src)];setdir=2; flipped=0" title="East, North, West">╩</a>
|
||||
<a href="?src=[REF(src)];setdir=8; flipped=0" title="South, East, North">╠</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTH]" title="East, North, West">╩</a>
|
||||
<a href="?src=[REF(src)];setdir=[WEST]" title="South, East, North">╠</a>
|
||||
</p>
|
||||
"}
|
||||
if(PIPE_TRIN_M) // Mirrored ones
|
||||
@@ -349,32 +360,32 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
user << browse_rsc(new /icon(preview, dir=SOUTHWEST), "em.png")
|
||||
|
||||
dirsel += "<p>"
|
||||
dirsel += render_dir_img(1,"s.png","West South East")
|
||||
dirsel += render_dir_img(4,"w.png","North West South")
|
||||
dirsel += render_dir_img(NORTH,"s.png","West South East")
|
||||
dirsel += render_dir_img(EAST,"w.png","North West South")
|
||||
dirsel += "<br />"
|
||||
dirsel += render_dir_img(2,"n.png","East North West")
|
||||
dirsel += render_dir_img(8,"e.png","South East North")
|
||||
dirsel += render_dir_img(SOUTH,"n.png","East North West")
|
||||
dirsel += render_dir_img(WEST,"e.png","South East North")
|
||||
dirsel += "<br />"
|
||||
dirsel += render_dir_img(6,"sm.png","West South East", 1)
|
||||
dirsel += render_dir_img(5,"wm.png","North West South", 1)
|
||||
dirsel += render_dir_img(SOUTHEAST,"sm.png","West South East", 1)
|
||||
dirsel += render_dir_img(NORTHEAST,"wm.png","North West South", 1)
|
||||
dirsel += "<br />"
|
||||
dirsel += render_dir_img(9,"nm.png","East North West", 1)
|
||||
dirsel += render_dir_img(10,"em.png","South East North", 1)
|
||||
dirsel += render_dir_img(NORTHWEST,"nm.png","East North West", 1)
|
||||
dirsel += render_dir_img(SOUTHWEST,"em.png","South East North", 1)
|
||||
dirsel += "</p>"
|
||||
else
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=[REF(src)];setdir=1; flipped=0" title="West, South, East">╦</a>
|
||||
<a href="?src=[REF(src)];setdir=4; flipped=0" title="North, West, South">╣</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTH]" title="West, South, East">╦</a>
|
||||
<a href="?src=[REF(src)];setdir=[EAST]" title="North, West, South">╣</a>
|
||||
<br />
|
||||
<a href="?src=[REF(src)];setdir=2; flipped=0" title="East, North, West">╩</a>
|
||||
<a href="?src=[REF(src)];setdir=8; flipped=0" title="South, East, North">╠</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTH]" title="East, North, West">╩</a>
|
||||
<a href="?src=[REF(src)];setdir=[WEST]" title="South, East, North">╠</a>
|
||||
<br />
|
||||
<a href="?src=[REF(src)];setdir=6; flipped=1" title="West, South, East">╦</a>
|
||||
<a href="?src=[REF(src)];setdir=5; flipped=1" title="North, West, South">╣</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTHEAST];flipped=1" title="West, South, East">╦</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTHEAST];flipped=1" title="North, West, South">╣</a>
|
||||
<br />
|
||||
<a href="?src=[REF(src)];setdir=9; flipped=1" title="East, North, West">╩</a>
|
||||
<a href="?src=[REF(src)];setdir=10; flipped=1" title="South, East, North">╠</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTHWEST];flipped=1" title="East, North, West">╩</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTHWEST];flipped=1" title="South, East, North">╠</a>
|
||||
</p>
|
||||
"}
|
||||
if(PIPE_UNARY) // Stuff with four directions - includes pumps etc.
|
||||
@@ -393,23 +404,23 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
else
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=[REF(src)];setdir=[NORTH]; flipped=0" title="North">↑</a>
|
||||
<a href="?src=[REF(src)];setdir=[EAST]; flipped=0" title="East">→</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTH]; flipped=0" title="South">↓</a>
|
||||
<a href="?src=[REF(src)];setdir=[WEST]; flipped=0" title="West">←</a>
|
||||
<a href="?src=[REF(src)];setdir=[NORTH]" title="North">↑</a>
|
||||
<a href="?src=[REF(src)];setdir=[EAST]" title="East">→</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTH]" title="South">↓</a>
|
||||
<a href="?src=[REF(src)];setdir=[WEST]" title="West">←</a>
|
||||
</p>
|
||||
"}
|
||||
if(PIPE_QUAD) // Single icon_state (eg 4-way manifolds)
|
||||
if(PIPE_ONEDIR) // Single icon_state (eg 4-way manifolds)
|
||||
if(preview)
|
||||
user << browse_rsc(new /icon(preview), "pipe.png")
|
||||
|
||||
dirsel += "<p>"
|
||||
dirsel += render_dir_img(1,"pipe.png","Pipe")
|
||||
dirsel += render_dir_img(SOUTH,"pipe.png","Pipe")
|
||||
dirsel += "</p>"
|
||||
else
|
||||
dirsel+={"
|
||||
<p>
|
||||
<a href="?src=[REF(src)];setdir=1; flipped=0" title="Pipe">↕</a>
|
||||
<a href="?src=[REF(src)];setdir=[SOUTH]" title="Pipe">↕</a>
|
||||
</p>
|
||||
"}
|
||||
|
||||
@@ -472,8 +483,11 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
show_menu(usr)
|
||||
|
||||
if(href_list["setdir"])
|
||||
p_dir= text2num(href_list["setdir"])
|
||||
p_flipped = text2num(href_list["flipped"])
|
||||
p_dir = text2num(href_list["setdir"])
|
||||
if(href_list["flipped"])
|
||||
p_flipped = text2num(href_list["flipped"])
|
||||
else
|
||||
p_flipped = FALSE
|
||||
show_menu(usr)
|
||||
|
||||
if(href_list["setlayer"])
|
||||
@@ -507,9 +521,9 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
|
||||
if(href_list["makepipe"])
|
||||
p_type = text2path(href_list["makepipe"])
|
||||
p_dir = text2num(href_list["dir"])
|
||||
var/obj/item/pipe/path = text2path(href_list["type"])
|
||||
p_conntype = initial(path.RPD_type)
|
||||
p_dir = NORTH
|
||||
p_class = ATMOS_MODE
|
||||
spark_system.start()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
@@ -518,15 +532,15 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
if(href_list["makemeter"])
|
||||
p_class = METER_MODE
|
||||
p_conntype = -1
|
||||
p_dir = 1
|
||||
p_dir = NORTH
|
||||
spark_system.start()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
show_menu(usr)
|
||||
|
||||
if(href_list["dmake"])
|
||||
p_type = text2num(href_list["dmake"])
|
||||
p_type = text2path(href_list["dmake"])
|
||||
p_conntype = text2num(href_list["type"])
|
||||
p_dir = 1
|
||||
p_dir = NORTH
|
||||
p_class = DISPOSALS_MODE
|
||||
spark_system.start()
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
@@ -614,12 +628,12 @@ GLOBAL_LIST_INIT(RPD_recipes, list(
|
||||
if(!can_make_pipe)
|
||||
return ..()
|
||||
if(isclosedturf(A))
|
||||
to_chat(user, "<span class='warning'>\the [src]'s error light flickers; there's something in the way!</span>")
|
||||
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a disposals pipe...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, 4, target = A))
|
||||
var/obj/structure/disposalconstruct/C = new (A, queued_p_type ,queued_p_dir)
|
||||
var/obj/structure/disposalconstruct/C = new (A, queued_p_type, queued_p_dir, queued_p_flipped)
|
||||
|
||||
if(!C.can_place())
|
||||
to_chat(user, "<span class='warning'>There's not enough room to build that here!</span>")
|
||||
|
||||
@@ -193,6 +193,19 @@
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/exonet_node
|
||||
name = "Exonet Node(machine board)"
|
||||
build_path = /obj/machinery/exonet_node
|
||||
origin_tech = "programming=3;engineering=4;bluespace=3;materials=3"
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/stock_parts/subspace/filter = 1,
|
||||
/obj/item/stock_parts/manipulator = 2,
|
||||
/obj/item/stock_parts/micro_laser = 1,
|
||||
/obj/item/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/stock_parts/subspace/treatment = 2,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/teleporter_hub
|
||||
name = "Teleporter Hub (Machine Board)"
|
||||
build_path = /obj/machinery/teleport/hub
|
||||
|
||||
@@ -1,101 +1,167 @@
|
||||
#define PROXIMITY_NONE ""
|
||||
#define PROXIMITY_ON_SCREEN "_red"
|
||||
#define PROXIMITY_NEAR "_yellow"
|
||||
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
||||
*
|
||||
*/
|
||||
|
||||
/obj/item/device/multitool
|
||||
name = "multitool"
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
|
||||
icon_state = "multitool"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=2"
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
toolspeed = 1
|
||||
|
||||
|
||||
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
|
||||
|
||||
|
||||
/obj/item/device/multitool/ai_detect
|
||||
var/track_cooldown = 0
|
||||
var/track_delay = 10 //How often it checks for proximity
|
||||
var/detect_state = PROXIMITY_NONE
|
||||
var/rangealert = 8 //Glows red when inside
|
||||
var/rangewarning = 20 //Glows yellow when inside
|
||||
origin_tech = "magnets=1;engineering=2;syndicate=1"
|
||||
|
||||
/obj/item/device/multitool/ai_detect/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/multitool/ai_detect/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/multitool/ai_detect/process()
|
||||
if(track_cooldown > world.time)
|
||||
return
|
||||
detect_state = PROXIMITY_NONE
|
||||
multitool_detect()
|
||||
icon_state = "[initial(icon_state)][detect_state]"
|
||||
track_cooldown = world.time + track_delay
|
||||
|
||||
/obj/item/device/multitool/ai_detect/proc/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.ai_list)
|
||||
if(AI.cameraFollow == src)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
if(!detect_state && GLOB.cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
|
||||
var/datum/camerachunk/chunk = GLOB.cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z)
|
||||
if(chunk)
|
||||
if(chunk.seenby.len)
|
||||
for(var/mob/camera/aiEye/A in chunk.seenby)
|
||||
var/turf/detect_turf = get_turf(A)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
if(get_dist(our_turf, detect_turf) < rangewarning)
|
||||
detect_state = PROXIMITY_NEAR
|
||||
break
|
||||
|
||||
/obj/item/device/multitool/ai_detect/admin
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'." //What else should I say for a meme item?
|
||||
track_delay = 5
|
||||
|
||||
/obj/item/device/multitool/ai_detect/admin/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/J in urange(rangewarning,our_turf))
|
||||
if(GLOB.admin_datums[J.ckey])
|
||||
detect_state = PROXIMITY_NEAR
|
||||
var/turf/detect_turf = get_turf(J)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
/obj/item/device/multitool/cyborg
|
||||
name = "multitool"
|
||||
desc = "Optimised and stripped-down version of a regular multitool."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/device/multitool/abductor
|
||||
name = "alien multitool"
|
||||
desc = "An omni-technological interface."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "magnets=5;engineering=5;abductor=3"
|
||||
#define PROXIMITY_NONE ""
|
||||
#define PROXIMITY_ON_SCREEN "_red"
|
||||
#define PROXIMITY_NEAR "_yellow"
|
||||
|
||||
/**
|
||||
* Multitool -- A multitool is used for hacking electronic devices.
|
||||
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/item/device/multitool
|
||||
name = "multitool"
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
|
||||
icon_state = "multitool"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
throwforce = 0
|
||||
throw_range = 7
|
||||
throw_speed = 3
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=20)
|
||||
origin_tech = "magnets=1;engineering=2"
|
||||
var/obj/machinery/buffer // simple machine buffer for device linkage
|
||||
hitsound = 'sound/weapons/tap.ogg'
|
||||
toolspeed = 1
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
var/mode = 0
|
||||
|
||||
/obj/item/device/multitool/attack_self(mob/user)
|
||||
if(selected_io)
|
||||
selected_io = null
|
||||
to_chat(user, "<span class='notice'>You clear the wired connection from the multitool.</span>")
|
||||
else
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/multitool/update_icon()
|
||||
if(selected_io)
|
||||
icon_state = "multitool_red"
|
||||
else
|
||||
icon_state = "multitool"
|
||||
|
||||
/obj/item/device/multitool/proc/wire(var/datum/integrated_io/io, mob/user)
|
||||
if(!io.holder.assembly)
|
||||
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
|
||||
return
|
||||
|
||||
if(selected_io)
|
||||
if(io == selected_io)
|
||||
to_chat(user, "<span class='warning'>Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless.</span>")
|
||||
return
|
||||
if(io.io_type != selected_io.io_type)
|
||||
to_chat(user, "<span class='warning'>Those two types of channels are incompatable. The first is a [selected_io.io_type], \
|
||||
while the second is a [io.io_type].</span>")
|
||||
return
|
||||
if(io.holder.assembly && io.holder.assembly != selected_io.holder.assembly)
|
||||
to_chat(user, "<span class='warning'>Both \the [io.holder] and \the [selected_io.holder] need to be inside the same assembly.</span>")
|
||||
return
|
||||
selected_io.linked |= io
|
||||
io.linked |= selected_io
|
||||
|
||||
to_chat(user, "<span class='notice'>You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name].</span>")
|
||||
selected_io.holder.interact(user) // This is to update the UI.
|
||||
selected_io = null
|
||||
|
||||
else
|
||||
selected_io = io
|
||||
to_chat(user, "<span class='notice'>You link \the multitool to \the [selected_io.holder]'s [selected_io.name] data channel.</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/device/multitool/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
|
||||
if(!io1.linked.len || !io2.linked.len)
|
||||
to_chat(user, "<span class='warning'>There is nothing connected to the data channel.</span>")
|
||||
return
|
||||
|
||||
if(!(io1 in io2.linked) || !(io2 in io1.linked) )
|
||||
to_chat(user, "<span class='warning'>These data pins aren't connected!</span>")
|
||||
return
|
||||
else
|
||||
io1.linked.Remove(io2)
|
||||
io2.linked.Remove(io1)
|
||||
to_chat(user, "<span class='notice'>You clip the data connection between the [io1.holder.displayed_name]'s \
|
||||
[io1.name] and the [io2.holder.displayed_name]'s [io2.name].</span>")
|
||||
io1.holder.interact(user) // This is to update the UI.
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
|
||||
|
||||
|
||||
/obj/item/device/multitool/ai_detect
|
||||
var/track_cooldown = 0
|
||||
var/track_delay = 10 //How often it checks for proximity
|
||||
var/detect_state = PROXIMITY_NONE
|
||||
var/rangealert = 8 //Glows red when inside
|
||||
var/rangewarning = 20 //Glows yellow when inside
|
||||
origin_tech = "magnets=1;engineering=2;syndicate=1"
|
||||
|
||||
/obj/item/device/multitool/ai_detect/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/device/multitool/ai_detect/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/multitool/ai_detect/process()
|
||||
if(track_cooldown > world.time)
|
||||
return
|
||||
detect_state = PROXIMITY_NONE
|
||||
multitool_detect()
|
||||
icon_state = "[initial(icon_state)][detect_state]"
|
||||
track_cooldown = world.time + track_delay
|
||||
|
||||
/obj/item/device/multitool/ai_detect/proc/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/living/silicon/ai/AI in GLOB.ai_list)
|
||||
if(AI.cameraFollow == src)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
if(!detect_state && GLOB.cameranet.chunkGenerated(our_turf.x, our_turf.y, our_turf.z))
|
||||
var/datum/camerachunk/chunk = GLOB.cameranet.getCameraChunk(our_turf.x, our_turf.y, our_turf.z)
|
||||
if(chunk)
|
||||
if(chunk.seenby.len)
|
||||
for(var/mob/camera/aiEye/A in chunk.seenby)
|
||||
var/turf/detect_turf = get_turf(A)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
if(get_dist(our_turf, detect_turf) < rangewarning)
|
||||
detect_state = PROXIMITY_NEAR
|
||||
break
|
||||
|
||||
/obj/item/device/multitool/ai_detect/admin
|
||||
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'." //What else should I say for a meme item?
|
||||
track_delay = 5
|
||||
|
||||
/obj/item/device/multitool/ai_detect/admin/multitool_detect()
|
||||
var/turf/our_turf = get_turf(src)
|
||||
for(var/mob/J in urange(rangewarning,our_turf))
|
||||
if(GLOB.admin_datums[J.ckey])
|
||||
detect_state = PROXIMITY_NEAR
|
||||
var/turf/detect_turf = get_turf(J)
|
||||
if(get_dist(our_turf, detect_turf) < rangealert)
|
||||
detect_state = PROXIMITY_ON_SCREEN
|
||||
break
|
||||
|
||||
/obj/item/device/multitool/cyborg
|
||||
name = "multitool"
|
||||
desc = "Optimised and stripped-down version of a regular multitool."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/device/multitool/abductor
|
||||
name = "alien multitool"
|
||||
desc = "An omni-technological interface."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "magnets=5;engineering=5;abductor=3"
|
||||
|
||||
@@ -35,7 +35,10 @@ MASS SPECTROMETER
|
||||
var/image/I = new(loc = get_turf(pipe))
|
||||
var/mutable_appearance/MA = new(pipe)
|
||||
MA.alpha = 128
|
||||
MA.dir = pipe.dir
|
||||
I.appearance = MA
|
||||
I.dir = pipe.dir
|
||||
// Workaround for a weird bug with icon direction on T-Ray scan not matching the actual disposal pipe dir.
|
||||
if(M.client)
|
||||
flick_overlay(I, list(M.client), 8)
|
||||
|
||||
|
||||
@@ -611,8 +611,7 @@
|
||||
obj/item/storage/box/clown
|
||||
name = "clown box"
|
||||
desc = "A colorful cardboard box for the clown"
|
||||
icon_state = "clownbox"
|
||||
illustration = null
|
||||
illustration = "clown"
|
||||
|
||||
/obj/item/storage/box/clown/attackby(obj/item/I, mob/user, params)
|
||||
if((istype(I, /obj/item/bodypart/l_arm/robot)) || (istype(I, /obj/item/bodypart/r_arm/robot)))
|
||||
|
||||
@@ -205,6 +205,11 @@ Frequency:
|
||||
if(A.noteleport)
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
current_location = get_turf(user) //Recheck.
|
||||
current_area = current_location.loc
|
||||
if(!current_location || current_area.noteleport || current_location.z > ZLEVEL_SPACEMAX || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
user.show_message("<span class='notice'>Locked In.</span>", 2)
|
||||
var/list/obj/effect/portal/created = create_portal_pair(current_location, get_teleport_turf(get_turf(T)), src, 300, 1)
|
||||
if(!(LAZYLEN(created) == 2))
|
||||
|
||||
@@ -309,13 +309,13 @@ LINEN BINS
|
||||
else
|
||||
B = new /obj/item/bedsheet(loc)
|
||||
|
||||
B.loc = user.loc
|
||||
B.forceMove(drop_location())
|
||||
user.put_in_hands(B)
|
||||
to_chat(user, "<span class='notice'>You take [B] out of [src].</span>")
|
||||
update_icon()
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = user.loc
|
||||
hidden.forceMove(drop_location())
|
||||
to_chat(user, "<span class='notice'>[hidden] falls out of [B]!</span>")
|
||||
hidden = null
|
||||
|
||||
@@ -333,12 +333,12 @@ LINEN BINS
|
||||
else
|
||||
B = new /obj/item/bedsheet(loc)
|
||||
|
||||
B.loc = loc
|
||||
B.forceMove(drop_location())
|
||||
to_chat(user, "<span class='notice'>You telekinetically remove [B] from [src].</span>")
|
||||
update_icon()
|
||||
|
||||
if(hidden)
|
||||
hidden.loc = loc
|
||||
hidden.forceMove(drop_location())
|
||||
hidden = null
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
|
||||
#define AIRLOCK_ASSEMBLY_NEEDS_WIRES 0
|
||||
#define AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS 1
|
||||
#define AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER 2
|
||||
|
||||
/obj/structure/door_assembly
|
||||
name = "airlock assembly"
|
||||
icon = 'icons/obj/doors/airlocks/station/public.dmi'
|
||||
@@ -6,8 +11,7 @@
|
||||
anchored = FALSE
|
||||
density = TRUE
|
||||
max_integrity = 200
|
||||
desc = "The mechanical framework for an airlock."
|
||||
var/state = 0
|
||||
var/state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
var/mineral = null
|
||||
var/typetext = ""
|
||||
var/icontext = ""
|
||||
@@ -26,7 +30,7 @@
|
||||
name = "airlock assembly"
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_com
|
||||
name = "command airlock assembly"
|
||||
@@ -36,7 +40,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_command
|
||||
airlock_type = /obj/machinery/door/airlock/command
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_com/glass
|
||||
mineral = "glass"
|
||||
@@ -50,7 +54,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_security
|
||||
airlock_type = /obj/machinery/door/airlock/security
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sec/glass
|
||||
mineral = "glass"
|
||||
@@ -64,7 +68,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_engineering
|
||||
airlock_type = /obj/machinery/door/airlock/engineering
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_eng/glass
|
||||
mineral = "glass"
|
||||
@@ -78,7 +82,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_mining
|
||||
airlock_type = /obj/machinery/door/airlock/mining
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_min/glass
|
||||
mineral = "glass"
|
||||
@@ -92,7 +96,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_atmos
|
||||
airlock_type = /obj/machinery/door/airlock/atmos
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_atmo/glass
|
||||
mineral = "glass"
|
||||
@@ -106,7 +110,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_research
|
||||
airlock_type = /obj/machinery/door/airlock/research
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_research/glass
|
||||
mineral = "glass"
|
||||
@@ -120,7 +124,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_science
|
||||
airlock_type = /obj/machinery/door/airlock/science
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_science/glass
|
||||
mineral = "glass"
|
||||
@@ -134,7 +138,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_medical
|
||||
airlock_type = /obj/machinery/door/airlock/medical
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_med/glass
|
||||
mineral = "glass"
|
||||
@@ -148,7 +152,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_maintenance
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mai/glass
|
||||
mineral = "glass"
|
||||
@@ -163,7 +167,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_external
|
||||
airlock_type = /obj/machinery/door/airlock/external
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_ext/glass
|
||||
mineral = "glass"
|
||||
@@ -176,7 +180,7 @@
|
||||
icontext = "fre"
|
||||
airlock_type = /obj/machinery/door/airlock/freezer
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_hatch
|
||||
name = "airtight hatch assembly"
|
||||
@@ -186,7 +190,7 @@
|
||||
icontext = "hatch"
|
||||
airlock_type = /obj/machinery/door/airlock/hatch
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_mhatch
|
||||
name = "maintenance hatch assembly"
|
||||
@@ -196,7 +200,7 @@
|
||||
icontext = "mhatch"
|
||||
airlock_type = /obj/machinery/door/airlock/maintenance_hatch
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_glass
|
||||
name = "glass airlock assembly"
|
||||
@@ -204,7 +208,7 @@
|
||||
overlays_file = 'icons/obj/doors/airlocks/station2/overlays.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/glass
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "glass"
|
||||
material = "glass"
|
||||
|
||||
@@ -213,7 +217,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/station/gold.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/gold
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "gold"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_silver
|
||||
@@ -221,7 +225,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/station/silver.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/silver
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "silver"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_diamond
|
||||
@@ -229,7 +233,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/station/diamond.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/diamond
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "diamond"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_uranium
|
||||
@@ -237,7 +241,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/station/uranium.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/uranium
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "uranium"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_plasma
|
||||
@@ -245,7 +249,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/station/plasma.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/plasma
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "plasma"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_clown
|
||||
@@ -254,7 +258,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/station/bananium.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/clown
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "bananium"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_sandstone
|
||||
@@ -262,7 +266,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/station/sandstone.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/sandstone
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "sandstone"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_titanium
|
||||
@@ -274,7 +278,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_titanium
|
||||
airlock_type = /obj/machinery/door/airlock/titanium
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "titanium"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_titanium/glass
|
||||
@@ -289,7 +293,7 @@
|
||||
icontext = "highsec"
|
||||
airlock_type = /obj/machinery/door/airlock/highsecurity
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_vault
|
||||
name = "vault door assembly"
|
||||
@@ -299,7 +303,7 @@
|
||||
icontext = "vault"
|
||||
airlock_type = /obj/machinery/door/airlock/vault
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_shuttle
|
||||
name = "shuttle airlock assembly"
|
||||
@@ -309,7 +313,7 @@
|
||||
icontext = "shuttle"
|
||||
airlock_type = /obj/machinery/door/airlock/shuttle
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult
|
||||
name = "cult airlock assembly"
|
||||
@@ -319,7 +323,7 @@
|
||||
icontext = "cult"
|
||||
airlock_type = /obj/machinery/door/airlock/cult
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_cult/glass
|
||||
mineral = "glass"
|
||||
@@ -338,7 +342,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/station/wood.dmi'
|
||||
airlock_type = /obj/machinery/door/airlock/wood
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
mineral = "wood"
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_viro
|
||||
@@ -349,7 +353,7 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass_virology
|
||||
airlock_type = /obj/machinery/door/airlock/virology
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/door_assembly_viro/glass
|
||||
mineral = "glass"
|
||||
@@ -362,7 +366,7 @@
|
||||
icontext = "ele"
|
||||
airlock_type = /obj/machinery/door/airlock/centcom
|
||||
anchored = TRUE
|
||||
state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
|
||||
/obj/structure/door_assembly/examine(mob/user)
|
||||
..()
|
||||
@@ -383,10 +387,10 @@
|
||||
|
||||
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/pen))
|
||||
var/t = stripped_input(user, "Enter the name for the door.", src.name, src.created_name,MAX_NAME_LEN)
|
||||
var/t = stripped_input(user, "Enter the name for the door.", name, created_name,MAX_NAME_LEN)
|
||||
if(!t)
|
||||
return
|
||||
if(!in_range(src, usr) && src.loc != usr)
|
||||
if(!in_range(src, usr) && loc != usr)
|
||||
return
|
||||
created_name = t
|
||||
|
||||
@@ -410,7 +414,7 @@
|
||||
|
||||
|
||||
icontype = input(user, "Please select a paintjob for this airlock.") in optionlist
|
||||
if((!in_range(src, usr) && src.loc != usr) || !WT.use(user))
|
||||
if((!in_range(src, usr) && loc != usr) || !WT.use(user))
|
||||
return
|
||||
var/has_solid = FALSE
|
||||
var/has_glass = FALSE
|
||||
@@ -525,7 +529,7 @@
|
||||
if(WT.remove_fuel(0,user))
|
||||
user.visible_message("<span class='warning'>[user] disassembles the airlock assembly.</span>", \
|
||||
"You start to disassemble the airlock assembly...")
|
||||
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/welder2.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if( !WT.isOn() )
|
||||
@@ -542,22 +546,22 @@
|
||||
break
|
||||
|
||||
if(door_check)
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] secures the airlock assembly to the floor.", \
|
||||
"<span class='notice'>You start to secure the airlock assembly to the floor...</span>", \
|
||||
"<span class='italics'>You hear wrenching.</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if( src.anchored )
|
||||
if(anchored)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You secure the airlock assembly.</span>")
|
||||
src.name = "secured airlock assembly"
|
||||
src.anchored = TRUE
|
||||
name = "secured airlock assembly"
|
||||
anchored = TRUE
|
||||
else
|
||||
to_chat(user, "There is another door here!")
|
||||
|
||||
else
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] unsecures the airlock assembly from the floor.", \
|
||||
"<span class='notice'>You start to unsecure the airlock assembly from the floor...</span>", \
|
||||
"<span class='italics'>You hear wrenching.</span>")
|
||||
@@ -579,63 +583,63 @@
|
||||
if(C.get_amount() < 1 || state != 0)
|
||||
return
|
||||
C.use(1)
|
||||
src.state = 1
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
|
||||
src.name = "wired airlock assembly"
|
||||
name = "wired airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/wirecutters) && state == 1 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] cuts the wires from the airlock assembly.", \
|
||||
"<span class='notice'>You start to cut the wires from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if( src.state != 1 )
|
||||
if(state != 1)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You cut the wires from the airlock assembly.</span>")
|
||||
new/obj/item/stack/cable_coil(get_turf(user), 1)
|
||||
src.state = 0
|
||||
src.name = "secured airlock assembly"
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_WIRES
|
||||
name = "secured airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/electronics/airlock) && state == 1 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", \
|
||||
"<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
if( src.state != 1 )
|
||||
if( state != 1 )
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You install the airlock electronics.</span>")
|
||||
src.state = 2
|
||||
src.name = "near finished airlock assembly"
|
||||
src.electronics = W
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER
|
||||
name = "near finished airlock assembly"
|
||||
electronics = W
|
||||
|
||||
|
||||
else if(istype(W, /obj/item/crowbar) && state == 2 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] removes the electronics from the airlock assembly.", \
|
||||
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if( src.state != 2 )
|
||||
if(state != 2)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You remove the airlock electronics.</span>")
|
||||
src.state = 1
|
||||
src.name = "wired airlock assembly"
|
||||
state = AIRLOCK_ASSEMBLY_NEEDS_ELECTRONICS
|
||||
name = "wired airlock assembly"
|
||||
var/obj/item/electronics/airlock/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/electronics/airlock( src.loc )
|
||||
ae = new/obj/item/electronics/airlock( loc )
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = src.loc
|
||||
ae.forceMove(src.loc)
|
||||
else if(istype(W, /obj/item/stack/sheet) && !mineral)
|
||||
var/obj/item/stack/sheet/G = W
|
||||
if(G)
|
||||
if(G.get_amount() >= 1)
|
||||
if(is_glass_sheet(G))
|
||||
playsound(src.loc, 'sound/items/crowbar.ogg', 100, 1)
|
||||
playsound(src, 'sound/items/crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
|
||||
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
@@ -653,8 +657,8 @@
|
||||
material = "glass"
|
||||
//This list contains the airlock paintjobs that have a glass version:
|
||||
if(icontext in list("eng", "atmo", "sec", "com", "med", "res", "min"))
|
||||
src.airlock_type = text2path("/obj/machinery/door/airlock/[typetext]")
|
||||
src.glass_type = text2path("/obj/machinery/door/airlock/glass_[typetext]")
|
||||
airlock_type = text2path("/obj/machinery/door/airlock/[typetext]")
|
||||
glass_type = text2path("/obj/machinery/door/airlock/glass_[typetext]")
|
||||
else
|
||||
//This airlock is default or does not have a glass version, so we revert to the default glass airlock. |- Ricotez
|
||||
airlock_type = /obj/machinery/door/airlock
|
||||
@@ -664,7 +668,7 @@
|
||||
else if(istype(G, /obj/item/stack/sheet/mineral))
|
||||
var/M = G.sheettype
|
||||
if(G.get_amount() >= 2)
|
||||
playsound(src.loc, 'sound/items/crowbar.ogg', 100, 1)
|
||||
playsound(src, 'sound/items/crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
|
||||
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
@@ -678,28 +682,28 @@
|
||||
glass_type = /obj/machinery/door/airlock/glass
|
||||
|
||||
else if(istype(W, /obj/item/screwdriver) && state == 2 )
|
||||
playsound(src.loc, W.usesound, 100, 1)
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] finishes the airlock.", \
|
||||
"<span class='notice'>You start finishing the airlock...</span>")
|
||||
|
||||
if(do_after(user, 40*W.toolspeed, target = src))
|
||||
if(src.loc && state == 2)
|
||||
if(loc && state == 2)
|
||||
to_chat(user, "<span class='notice'>You finish the airlock.</span>")
|
||||
var/obj/machinery/door/airlock/door
|
||||
if(mineral == "glass")
|
||||
door = new src.glass_type( src.loc )
|
||||
door = new glass_type( loc )
|
||||
else
|
||||
door = new src.airlock_type( src.loc )
|
||||
//door.req_access = src.req_access
|
||||
door.electronics = src.electronics
|
||||
door.heat_proof = src.heat_proof_finished
|
||||
if(src.electronics.one_access)
|
||||
door.req_one_access = src.electronics.accesses
|
||||
door = new airlock_type( loc )
|
||||
//door.req_access = req_access
|
||||
door.electronics = electronics
|
||||
door.heat_proof = heat_proof_finished
|
||||
if(electronics.one_access)
|
||||
door.req_one_access = electronics.accesses
|
||||
else
|
||||
door.req_access = src.electronics.accesses
|
||||
door.req_access = electronics.accesses
|
||||
if(created_name)
|
||||
door.name = created_name
|
||||
src.electronics.loc = door
|
||||
electronics.forceMove(door)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/mineral_amount = 2
|
||||
var/walltype = /turf/closed/wall
|
||||
var/girder_type = /obj/structure/girder/displaced
|
||||
var/opening = 0
|
||||
var/opening = FALSE
|
||||
density = TRUE
|
||||
opacity = 1
|
||||
max_integrity = 100
|
||||
@@ -50,43 +50,38 @@
|
||||
if(opening)
|
||||
return
|
||||
|
||||
opening = 1
|
||||
if(density)
|
||||
do_the_flick()
|
||||
sleep(5)
|
||||
if(!QDELETED(src))
|
||||
density = FALSE
|
||||
set_opacity(0)
|
||||
update_icon()
|
||||
else
|
||||
opening = TRUE
|
||||
update_icon()
|
||||
if(!density)
|
||||
var/srcturf = get_turf(src)
|
||||
for(var/mob/living/obstacle in srcturf) //Stop people from using this as a shield
|
||||
opening = 0
|
||||
opening = FALSE
|
||||
return
|
||||
do_the_flick()
|
||||
density = TRUE
|
||||
sleep(5)
|
||||
if(!QDELETED(src))
|
||||
set_opacity(1)
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, /obj/structure/falsewall/proc/toggle_open), 5)
|
||||
air_update_turf(1)
|
||||
opening = 0
|
||||
|
||||
/obj/structure/falsewall/proc/do_the_flick()
|
||||
if(density)
|
||||
smooth = SMOOTH_FALSE
|
||||
clear_smooth_overlays()
|
||||
icon_state = "fwall_opening"
|
||||
else
|
||||
icon_state = "fwall_closing"
|
||||
/obj/structure/falsewall/proc/toggle_open()
|
||||
if(!QDELETED(src))
|
||||
density = !density
|
||||
set_opacity(density)
|
||||
opening = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
||||
if(density)
|
||||
smooth = SMOOTH_TRUE
|
||||
queue_smooth(src)
|
||||
icon_state = initial(icon_state)
|
||||
if(opening)
|
||||
if(density)
|
||||
icon_state = "fwall_opening"
|
||||
smooth = SMOOTH_FALSE
|
||||
clear_smooth_overlays()
|
||||
else
|
||||
icon_state = "fwall_closing"
|
||||
else
|
||||
icon_state = "fwall_open"
|
||||
if(density)
|
||||
icon_state = initial(icon_state)
|
||||
smooth = SMOOTH_TRUE
|
||||
queue_smooth(src)
|
||||
else
|
||||
icon_state = "fwall_open"
|
||||
|
||||
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -168,7 +168,8 @@
|
||||
return
|
||||
log_game("[user.ckey] golem-swapped into [src]")
|
||||
user.visible_message("<span class='notice'>A faint light leaves [user], moving to [src] and animating it!</span>","<span class='notice'>You leave your old body behind, and transfer into [src]!</span>")
|
||||
create(ckey = user.ckey, flavour = FALSE, name = user.real_name)
|
||||
show_flavour = FALSE
|
||||
create(ckey = user.ckey,name = user.real_name)
|
||||
user.death()
|
||||
return
|
||||
..()
|
||||
@@ -526,3 +527,44 @@
|
||||
/obj/effect/mob_spawn/human/oldsci/Destroy()
|
||||
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
|
||||
return ..()
|
||||
|
||||
|
||||
#define PIRATE_NAMES_FILE "pirates.json"
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate
|
||||
name = "space pirate sleeper"
|
||||
desc = "A cryo sleeper smelling faintly of rum."
|
||||
random = TRUE
|
||||
icon = 'icons/obj/cryogenic2.dmi'
|
||||
icon_state = "sleeper"
|
||||
mob_name = "a space pirate"
|
||||
mob_species = /datum/species/human
|
||||
outfit = /datum/outfit/pirate/space
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
show_flavour = FALSE //Flavour only exists for spawners menu
|
||||
flavour_text = "<font size=3><b>Y</b></font><b>ou are a space pirate. The station refused to pay for your protection, protect the ship, siphon the credits from the station and raid it for even more loot.</b>"
|
||||
assignedrole = "Space Pirate"
|
||||
var/rank = "Mate"
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/special(mob/living/new_spawn)
|
||||
new_spawn.fully_replace_character_name(new_spawn.real_name,generate_pirate_name())
|
||||
new_spawn.mind.add_antag_datum(/datum/antagonist/pirate)
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/proc/generate_pirate_name()
|
||||
var/beggings = strings(PIRATE_NAMES_FILE, "beginnings")
|
||||
var/endings = strings(PIRATE_NAMES_FILE, "endings")
|
||||
return "[rank] [pick(beggings)][pick(endings)]"
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/Destroy()
|
||||
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
|
||||
return ..()
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/captain
|
||||
rank = "Captain"
|
||||
outfit = /datum/outfit/pirate/space/captain
|
||||
|
||||
/obj/effect/mob_spawn/human/pirate/gunner
|
||||
rank = "Gunner"
|
||||
Reference in New Issue
Block a user