mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Merge pull request #458 from Markolie/master
Magistrate/Psych Office shutter fixes, telescience console UI update, camera fixes, borg movement fix, security windoor fix, CentComm identification computer fix, locker fixes
This commit is contained in:
@@ -34,23 +34,33 @@
|
||||
src.attack_hand()
|
||||
|
||||
/obj/machinery/computer/telescience/attack_hand(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/telescience/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
var/t = ""
|
||||
t += "<A href='?src=\ref[src];setx=1'>Set X</A>"
|
||||
t += "<A href='?src=\ref[src];sety=1'>Set Y</A>"
|
||||
t += "<A href='?src=\ref[src];setz=1'>Set Z</A>"
|
||||
t += "<BR><BR>Current set coordinates:"
|
||||
t += "([x_co], [y_co], [z_co])"
|
||||
t += "<BR><BR><A href='?src=\ref[src];send=1'>Send</A>"
|
||||
t += " <A href='?src=\ref[src];receive=1'>Receive</A>"
|
||||
t += "<BR><BR><A href='?src=\ref[src];recal=1'>Recalibrate</A>"
|
||||
var/datum/browser/popup = new(user, "telesci", name, 640, 480)
|
||||
popup.set_content(t)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
// On first use, the coordinates are null. Rather than displaying null, we'll set them to unset.
|
||||
if(!x_co)
|
||||
x_co = "Unset"
|
||||
if(!y_co)
|
||||
y_co = "Unset"
|
||||
if(!z_co)
|
||||
z_co = "Unset"
|
||||
|
||||
var/data[0]
|
||||
data["coordx"] = x_co
|
||||
data["coordy"] = y_co
|
||||
data["coordz"] = z_co
|
||||
|
||||
// Set up the Nano UI
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "telescience_console.tmpl", "Telescience Console UI", 640, 480)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/telescience/proc/telefail(var/level)
|
||||
var/teleturf = get_turf(telepad)
|
||||
@@ -63,7 +73,7 @@
|
||||
s.start()
|
||||
if(2)
|
||||
for(var/mob/living/carbon/human/M in viewers(telepad, null))
|
||||
if(M.loc.loc == telepad.loc.loc) //stops the geneticists with xray vision getting irradiated
|
||||
if(M.loc.loc == telepad.loc.loc) // Stops the geneticists with X-Ray vision getting irradiated
|
||||
M.apply_effect((rand(50, 100)), IRRADIATE, 0)
|
||||
M << "\red You feel irradiated."
|
||||
if(3)
|
||||
@@ -174,14 +184,14 @@
|
||||
|
||||
/obj/machinery/computer/telescience/proc/checkFail()
|
||||
var/fail = 0
|
||||
if(x_co == "")
|
||||
usr << "\red Error: set X coordinates."
|
||||
if(x_co == "" || x_co == "Unset")
|
||||
usr << "\red Error: set X coordinate."
|
||||
fail = 1
|
||||
if(y_co == "")
|
||||
usr << "\red Error: set Y coordinates."
|
||||
if(y_co == "" || y_co == "Unset")
|
||||
usr << "\red Error: set Y coordinate."
|
||||
fail = 1
|
||||
if(z_co == "")
|
||||
usr << "\red Error: set Z coordinates."
|
||||
if(z_co == "" || z_co == "Unset")
|
||||
usr << "\red Error: set Z coordinate."
|
||||
fail = 1
|
||||
if(x_co < 11 || x_co > 245)
|
||||
usr << "\red Error: X is less than 11 or greater than 245."
|
||||
@@ -208,30 +218,36 @@
|
||||
a = copytext(sanitize(a), 1, 20)
|
||||
x_co = a
|
||||
x_co = text2num(x_co)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["sety"])
|
||||
var/b = input("Please input desired Y coordinate.", name, y_co) as num
|
||||
b = copytext(sanitize(b), 1, 20)
|
||||
y_co = b
|
||||
y_co = text2num(y_co)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["setz"])
|
||||
var/c = input("Please input desired Z coordinate.", name, z_co) as num
|
||||
c = copytext(sanitize(c), 1, 20)
|
||||
z_co = c
|
||||
z_co = text2num(z_co)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["send"])
|
||||
teleprep(0)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["receive"])
|
||||
teleprep(1)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if(href_list["recal"])
|
||||
if(telepad == null)
|
||||
for(var/obj/machinery/telepad/T in range(src,10))
|
||||
telepad = T
|
||||
if(!telepad) return
|
||||
if(!telepad)
|
||||
return
|
||||
var/teleturf = get_turf(telepad)
|
||||
teles_left = rand(8,12)
|
||||
x_off = rand(-10,10)
|
||||
@@ -240,12 +256,13 @@
|
||||
s.set_up(5, 1, teleturf)
|
||||
s.start()
|
||||
usr << "\blue Calibration successful."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telescience/attackby(I as obj, user as mob) //Emagging.
|
||||
/obj/machinery/computer/telescience/attackby(I as obj, user as mob) // Emagging
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
if (src.emagged == 0)
|
||||
user << "\blue You scramble the Telescience authentication key to an unknown signal, you should be able to teleport to more places now!"
|
||||
user << "\blue You scramble the Telescience authentication key to an unknown signal. You should be able to teleport to more places now!"
|
||||
src.emagged = 1
|
||||
else
|
||||
user << "\red The machine seems unaffected by the card swipe..."
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/obj/structure/closet/proc/can_close()
|
||||
for(var/obj/structure/closet/closet in get_turf(src))
|
||||
if(closet != src)
|
||||
if(closet != src && closet.anchored != 1)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -129,9 +129,7 @@
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/proc/toggle(mob/user as mob)
|
||||
var/orig = src.opened
|
||||
. = src.opened ? src.close() : src.open()
|
||||
if(. == orig)
|
||||
if(!(src.opened ? src.close() : src.open()))
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
return
|
||||
|
||||
@@ -274,6 +272,9 @@
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(src == user.loc)
|
||||
user << "<span class='notice'>You can not [welded?"unweld":"weld"] the locker from inside.</span>"
|
||||
return
|
||||
if(!WT.remove_fuel(0,user))
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/structure/closet/secure_closet/personal
|
||||
desc = "It's a secure locker for personell. The first card swiped gains control."
|
||||
desc = "It's a secure locker for personnel. The first card swiped gains control."
|
||||
name = "personal closet"
|
||||
req_access = list(access_all_personal_lockers)
|
||||
var/registered_name = null
|
||||
@@ -68,7 +68,9 @@
|
||||
return
|
||||
var/obj/item/weapon/card/id/I = W
|
||||
if(!I || !I.registered_name) return
|
||||
if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
if(src == user.loc)
|
||||
user << "<span class='notice'>You can't reach the lock from inside.</span>"
|
||||
else if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
|
||||
//they can open all lockers, or nobody owns this, or they own this locker
|
||||
src.locked = !( src.locked )
|
||||
if(src.locked) src.icon_state = src.icon_locked
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
if (is_component_functioning("power cell") && cell)
|
||||
if(src.cell.charge <= 0)
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
src.stat = 1
|
||||
Paralyse(3)
|
||||
else
|
||||
if(src.module_state_1)
|
||||
src.cell.use(3)
|
||||
@@ -56,7 +57,8 @@
|
||||
src.stat = 0
|
||||
else
|
||||
uneq_all()
|
||||
src.stat = 1
|
||||
src.stat = 1
|
||||
Paralyse(3)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/handle_regular_status_updates()
|
||||
@@ -129,12 +131,12 @@
|
||||
if (src.stat != 0)
|
||||
uneq_all()
|
||||
|
||||
if(!is_component_functioning("radio"))
|
||||
if(!is_component_functioning("radio") || src.stat == 1)
|
||||
radio.on = 0
|
||||
else
|
||||
radio.on = 1
|
||||
|
||||
if(is_component_functioning("camera"))
|
||||
if(is_component_functioning("camera") && src.stat == 0)
|
||||
src.blinded = 0
|
||||
else
|
||||
src.blinded = 1
|
||||
|
||||
@@ -23,4 +23,9 @@
|
||||
return tally+config.robot_delay
|
||||
|
||||
/mob/living/silicon/robot/Move()
|
||||
..()
|
||||
if (!is_component_functioning("actuator") || !is_component_functioning("power cell") || !cell)
|
||||
return
|
||||
|
||||
else
|
||||
if (src.cell.charge > 0)
|
||||
..()
|
||||
Reference in New Issue
Block a user