Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into auxtools-atmos
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
var/mob/living/silicon/ai/occupier = null
|
||||
var/active = FALSE
|
||||
|
||||
/obj/machinery/computer/aifixer/attackby(obj/I, mob/user, params)
|
||||
if(occupier && istype(I, /obj/item/screwdriver))
|
||||
/obj/machinery/computer/aifixer/attackby(obj/item/I, mob/user, params)
|
||||
if(occupier && I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
to_chat(user, "<span class='warning'>The screws on [name]'s screen won't budge.</span>")
|
||||
else
|
||||
|
||||
@@ -151,7 +151,14 @@
|
||||
var/obj/machinery/power/apc/target = locate(ref) in GLOB.apcs_list
|
||||
if(!target)
|
||||
return
|
||||
target.vars[type] = target.setsubsystem(text2num(value))
|
||||
value = target.setsubsystem(text2num(value))
|
||||
switch(type) // Sanity check
|
||||
if("equipment", "lighting", "environ")
|
||||
target.vars[type] = value
|
||||
else
|
||||
message_admins("Warning: possible href exploit by [key_name(usr)] - attempted to set [type] on [target] to [value]")
|
||||
log_game("Warning: possible href exploit by [key_name(usr)] - attempted to set [type] on [target] to [value]")
|
||||
return
|
||||
target.update_icon()
|
||||
target.update()
|
||||
var/setTo = ""
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
add_fingerprint(user)
|
||||
switch(state)
|
||||
if(0)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start wrenching the frame into place...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50))
|
||||
to_chat(user, "<span class='notice'>You wrench the frame into place.</span>")
|
||||
setAnchored(TRUE)
|
||||
state = 1
|
||||
return
|
||||
if(istype(P, /obj/item/weldingtool))
|
||||
if(P.tool_behaviour == TOOL_WELDER)
|
||||
if(!P.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
if(1)
|
||||
if(istype(P, /obj/item/wrench))
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start to unfasten the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50) && state == 1)
|
||||
to_chat(user, "<span class='notice'>You unfasten the frame.</span>")
|
||||
@@ -46,13 +46,13 @@
|
||||
else if(istype(P, /obj/item/circuitboard) && !circuit)
|
||||
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You screw [circuit] into place.</span>")
|
||||
state = 2
|
||||
icon_state = "2"
|
||||
return
|
||||
if(istype(P, /obj/item/crowbar) && circuit)
|
||||
if(P.tool_behaviour == TOOL_CROWBAR && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove [circuit].</span>")
|
||||
state = 1
|
||||
@@ -62,7 +62,7 @@
|
||||
circuit = null
|
||||
return
|
||||
if(2)
|
||||
if(istype(P, /obj/item/screwdriver) && circuit)
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You unfasten the circuit board.</span>")
|
||||
state = 1
|
||||
@@ -78,7 +78,7 @@
|
||||
icon_state = "3"
|
||||
return
|
||||
if(3)
|
||||
if(istype(P, /obj/item/wirecutters))
|
||||
if(P.tool_behaviour == TOOL_WIRECUTTER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the cables.</span>")
|
||||
state = 2
|
||||
@@ -98,7 +98,7 @@
|
||||
src.icon_state = "4"
|
||||
return
|
||||
if(4)
|
||||
if(istype(P, /obj/item/crowbar))
|
||||
if(P.tool_behaviour == TOOL_CROWBAR)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = 3
|
||||
@@ -106,7 +106,7 @@
|
||||
var/obj/item/stack/sheet/glass/G = new(drop_location(), 2)
|
||||
G.add_fingerprint(user)
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
P.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You connect the monitor.</span>")
|
||||
var/obj/B = new circuit.build_path (loc, circuit)
|
||||
@@ -117,12 +117,6 @@
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
//callback proc used on stacks use_tool to stop unnecessary amounts being wasted from spam clicking.
|
||||
/obj/structure/frame/computer/proc/check_state(target_state)
|
||||
if(state == target_state)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/frame/computer/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(state == 4)
|
||||
|
||||
@@ -133,22 +133,20 @@
|
||||
to_chat(user, "<span class='notice'>You insert [W].</span>")
|
||||
playsound(src, 'sound/machines/terminal_insert_disc.ogg', 50, 0)
|
||||
src.updateUsrDialog()
|
||||
else if(istype(W, /obj/item/multitool))
|
||||
var/obj/item/multitool/P = W
|
||||
|
||||
if(istype(P.buffer, clonepod_type))
|
||||
if(get_area(P.buffer) != get_area(src))
|
||||
else if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(istype(W.buffer, clonepod_type))
|
||||
if(get_area(W.buffer) != get_area(src))
|
||||
to_chat(user, "<font color = #666633>-% Cannot link machines across power zones. Buffer cleared %-</font color>")
|
||||
P.buffer = null
|
||||
W.buffer = null
|
||||
return
|
||||
to_chat(user, "<font color = #666633>-% Successfully linked [P.buffer] with [src] %-</font color>")
|
||||
var/obj/machinery/clonepod/pod = P.buffer
|
||||
to_chat(user, "<font color = #666633>-% Successfully linked [W.buffer] with [src] %-</font color>")
|
||||
var/obj/machinery/clonepod/pod = W.buffer
|
||||
if(pod.connected)
|
||||
pod.connected.DetachCloner(pod)
|
||||
AttachCloner(pod)
|
||||
else
|
||||
P.buffer = src
|
||||
to_chat(user, "<font color = #666633>-% Successfully stored [REF(P.buffer)] [P.buffer.name] in buffer %-</font color>")
|
||||
W.buffer = src
|
||||
to_chat(user, "<font color = #666633>-% Successfully stored [REF(W.buffer)] [W.buffer] in buffer %-</font color>")
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
@@ -473,7 +471,7 @@
|
||||
scanner.locked = prev_locked
|
||||
src.updateUsrDialog()
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_occupant(occupant)
|
||||
var/mob/living/mob_occupant = get_mob_or_brainmob(occupant)
|
||||
|
||||
@@ -23,11 +23,10 @@
|
||||
if(W.tool_behaviour == TOOL_MULTITOOL)
|
||||
if(!multitool_check_buffer(user, W))
|
||||
return
|
||||
var/obj/item/multitool/M = W
|
||||
if(M.buffer && istype(M.buffer, /obj/machinery/launchpad))
|
||||
if(W.buffer && istype(W.buffer, /obj/machinery/launchpad))
|
||||
if(LAZYLEN(launchpads) < maximum_pads)
|
||||
launchpads |= M.buffer
|
||||
M.buffer = null
|
||||
launchpads |= W.buffer
|
||||
W.buffer = null
|
||||
to_chat(user, "<span class='notice'>You upload the data from the [W.name]'s buffer.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot handle any more connections!</span>")
|
||||
|
||||
@@ -55,11 +55,12 @@
|
||||
return connected_mechpad
|
||||
|
||||
/obj/machinery/computer/mechpad/multitool_act(mob/living/user, obj/item/tool)
|
||||
if(!tool.tool_behaviour == TOOL_MULTITOOL)
|
||||
return
|
||||
if(!multitool_check_buffer(user, tool))
|
||||
return
|
||||
var/obj/item/multitool/multitool = tool
|
||||
if(istype(multitool.buffer, /obj/machinery/mechpad))
|
||||
var/obj/machinery/mechpad/buffered_console = multitool.buffer
|
||||
if(istype(tool.buffer, /obj/machinery/mechpad))
|
||||
var/obj/machinery/mechpad/buffered_console = tool.buffer
|
||||
if(!(mechpads.len < maximum_pads))
|
||||
to_chat(user, "<span class='warning'>[src] cannot handle any more connections!</span>")
|
||||
return
|
||||
@@ -69,13 +70,13 @@
|
||||
connected_mechpad = buffered_console
|
||||
connected_mechpad.connected_console = src
|
||||
connected_mechpad.id = id
|
||||
multitool.buffer = null
|
||||
to_chat(user, "<span class='notice'>You connect the console to the pad with data from the [multitool.name]'s buffer.</span>")
|
||||
tool.buffer = null
|
||||
to_chat(user, "<span class='notice'>You connect the console to the pad with data from the [tool.name]'s buffer.</span>")
|
||||
else
|
||||
mechpads += buffered_console
|
||||
LAZYADD(buffered_console.consoles, src)
|
||||
multitool.buffer = null
|
||||
to_chat(user, "<span class='notice'>You upload the data from the [multitool.name]'s buffer.</span>")
|
||||
tool.buffer = null
|
||||
to_chat(user, "<span class='notice'>You upload the data from the [tool.name]'s buffer.</span>")
|
||||
|
||||
/**
|
||||
* Tries to call the launch proc on the connected mechpad, returns if there is no connected mechpad or there is no mecha on the pad
|
||||
|
||||
@@ -264,6 +264,8 @@ What a mess.*/
|
||||
active1 = null
|
||||
if(!( GLOB.data_core.security.Find(active2) ))
|
||||
active2 = null
|
||||
if(!authenticated && href_list["choice"] != "Log In") // logging in is the only action you can do if not logged in
|
||||
return
|
||||
if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr) || IsAdminGhost(usr))
|
||||
usr.set_machine(src)
|
||||
switch(href_list["choice"])
|
||||
|
||||
Reference in New Issue
Block a user