mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge pull request #1742 from Markolie/ghosties
Ghost/admin ghost machinery interaction
This commit is contained in:
@@ -70,8 +70,9 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
wait_for_launch = 0
|
||||
|
||||
//calls the shuttle for an emergency evacuation
|
||||
/datum/emergency_shuttle_controller/proc/call_evac()
|
||||
if(!can_call()) return 0
|
||||
/datum/emergency_shuttle_controller/proc/call_evac(var/reason)
|
||||
if(!can_call())
|
||||
return 0
|
||||
|
||||
//set the launch timer
|
||||
autopilot = 1
|
||||
@@ -82,7 +83,10 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
shuttle.move_time = SHUTTLE_TRANSIT_DURATION
|
||||
|
||||
evac = 1
|
||||
emergency_shuttle_called.Announce("An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes.")
|
||||
var/emergencytext = "An emergency evacuation shuttle has been called. It will arrive in approximately [round(estimate_arrival_time()/60)] minutes."
|
||||
if(reason)
|
||||
emergencytext += "\n\nReason: [reason]"
|
||||
emergency_shuttle_called.Announce(emergencytext)
|
||||
for(var/area/A in world)
|
||||
if(istype(A, /area/hallway))
|
||||
A.readyalert()
|
||||
|
||||
@@ -557,4 +557,11 @@ proc/get_nt_opposed()
|
||||
if(BE_ALIEN) roletext="alien"
|
||||
if(BE_MUTINEER) roletext="mutineer"
|
||||
if(BE_BLOB) roletext="blob"
|
||||
return roletext
|
||||
return roletext
|
||||
|
||||
/proc/get_nuke_code()
|
||||
var/nukecode = "ERROR"
|
||||
for(var/obj/machinery/nuclearbomb/bomb in world)
|
||||
if(bomb && bomb.r_code && bomb.z == ZLEVEL_STATION)
|
||||
nukecode = bomb.r_code
|
||||
return nukecode
|
||||
@@ -261,7 +261,7 @@ datum/game_mode/proc/auto_declare_completion_heist()
|
||||
text += "<br>[vox.key] was [vox.name] ("
|
||||
if(check_return)
|
||||
var/obj/stack = raiders[vox]
|
||||
if(get_area(stack) != locate(/area/shuttle/vox/station))
|
||||
if(get_area(stack.loc) != locate(/area/shuttle/vox/station))
|
||||
text += "left behind)"
|
||||
continue
|
||||
if(vox.current)
|
||||
|
||||
@@ -163,13 +163,13 @@ var/bomb_set
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/nuclearbomb/attack_ghost(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
|
||||
if (src.extended)
|
||||
if (src.opened)
|
||||
nukehack_win(user,50)
|
||||
user.set_machine(src)
|
||||
ui_interact(user)
|
||||
ui_interact(user)
|
||||
else if (src.deployable)
|
||||
if(removal_stage < 5)
|
||||
src.anchored = 1
|
||||
@@ -182,9 +182,6 @@ var/bomb_set
|
||||
src.extended = 1
|
||||
return
|
||||
|
||||
obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/nuclearbomb/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
var/uiwidth
|
||||
@@ -193,8 +190,8 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
data["is_syndicate"] = is_syndicate
|
||||
if(!src.opened)
|
||||
data["hacking"] = 0
|
||||
data["auth"] = src.auth
|
||||
if (src.auth)
|
||||
data["auth"] = is_auth(user)
|
||||
if (is_auth(user))
|
||||
if (src.yes_code)
|
||||
data["authstatus"] = src.timing ? "Functional/Set" : "Functional"
|
||||
else
|
||||
@@ -211,7 +208,7 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
data["anchored"] = src.anchored
|
||||
data["yescode"] = src.yes_code
|
||||
data["message"] = "AUTH"
|
||||
if (src.auth)
|
||||
if (is_auth(user))
|
||||
data["message"] = src.code
|
||||
if (src.yes_code)
|
||||
data["message"] = "*****"
|
||||
@@ -230,11 +227,13 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
uiwidth = 420
|
||||
uiheight = 440
|
||||
uititle = "Nuclear Bomb Defusion"
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "nuclear_bomb.tmpl", uititle, uiwidth, uiheight)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/nuclearbomb/verb/make_deployable()
|
||||
set category = "Object"
|
||||
@@ -252,137 +251,137 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
src.deployable = 1
|
||||
return
|
||||
|
||||
/obj/machinery/nuclearbomb/proc/is_auth(user as mob)
|
||||
if(auth)
|
||||
return 1
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/nuclearbomb/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if (!usr.canmove || usr.stat || usr.restrained())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if(href_list["act"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
if(href_list["act"] == "pulse")
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
return 1
|
||||
|
||||
if(href_list["act"])
|
||||
var/temp_wire = href_list["wire"]
|
||||
if(href_list["act"] == "pulse")
|
||||
if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
|
||||
usr << "You need a multitool!"
|
||||
else
|
||||
if(src.wires[temp_wire])
|
||||
usr << "You can't pulse a cut wire."
|
||||
else
|
||||
if(src.wires[temp_wire])
|
||||
usr << "You can't pulse a cut wire."
|
||||
else
|
||||
if(src.light_wire == temp_wire)
|
||||
src.lighthack = !src.lighthack
|
||||
spawn(100) src.lighthack = !src.lighthack
|
||||
if(src.timing_wire == temp_wire)
|
||||
if(src.timing)
|
||||
explode()
|
||||
if(src.safety_wire == temp_wire)
|
||||
src.safety = !src.safety
|
||||
spawn(100) src.safety = !src.safety
|
||||
if(src.safety == 1)
|
||||
visible_message("\blue The [src] quiets down.")
|
||||
if(!src.lighthack)
|
||||
if (src.icon_state == "nuclearbomb2")
|
||||
src.icon_state = "nuclearbomb1"
|
||||
else
|
||||
visible_message("\blue The [src] emits a quiet whirling noise!")
|
||||
if(href_list["act"] == "wire")
|
||||
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
|
||||
usr << "You need wirecutters!"
|
||||
else
|
||||
wires[temp_wire] = !wires[temp_wire]
|
||||
if(src.safety_wire == temp_wire)
|
||||
if(src.timing)
|
||||
explode()
|
||||
if(src.timing_wire == temp_wire)
|
||||
if(!src.lighthack)
|
||||
if (src.icon_state == "nuclearbomb2")
|
||||
src.icon_state = "nuclearbomb1"
|
||||
src.timing = 0
|
||||
bomb_set = 0
|
||||
if(src.light_wire == temp_wire)
|
||||
src.lighthack = !src.lighthack
|
||||
|
||||
if (href_list["auth"])
|
||||
if (src.auth)
|
||||
src.auth.loc = src.loc
|
||||
src.yes_code = 0
|
||||
src.auth = null
|
||||
spawn(100) src.lighthack = !src.lighthack
|
||||
if(src.timing_wire == temp_wire)
|
||||
if(src.timing)
|
||||
explode()
|
||||
if(src.safety_wire == temp_wire)
|
||||
src.safety = !src.safety
|
||||
spawn(100) src.safety = !src.safety
|
||||
if(src.safety == 1)
|
||||
visible_message("\blue The [src] quiets down.")
|
||||
if(!src.lighthack)
|
||||
if (src.icon_state == "nuclearbomb2")
|
||||
src.icon_state = "nuclearbomb1"
|
||||
else
|
||||
visible_message("\blue The [src] emits a quiet whirling noise!")
|
||||
if(href_list["act"] == "wire")
|
||||
if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
|
||||
usr << "You need wirecutters!"
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/disk/nuclear))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
src.auth = I
|
||||
if (src.auth)
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if (src.code == src.r_code)
|
||||
src.yes_code = 1
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if (href_list["type"] == "R")
|
||||
src.yes_code = 0
|
||||
src.code = null
|
||||
else
|
||||
lastentered = text("[]", href_list["type"])
|
||||
if (text2num(lastentered) == null)
|
||||
var/turf/LOC = get_turf(usr)
|
||||
message_admins("[key_name_admin(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: <a href='?_src_=vars;Vars=\ref[src]'>[lastentered]</a>! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
|
||||
log_admin("EXPLOIT: [key_name(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]!")
|
||||
else
|
||||
src.code += lastentered
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
if (src.yes_code)
|
||||
if (href_list["time"])
|
||||
var/time = text2num(href_list["time"])
|
||||
src.timeleft += time
|
||||
src.timeleft = min(max(round(src.timeleft), 60), 600)
|
||||
if (href_list["timer"])
|
||||
if (src.timing == -1.0)
|
||||
return
|
||||
if (src.safety)
|
||||
usr << "\red The safety is still on."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
src.timing = !( src.timing )
|
||||
if (src.timing)
|
||||
if(!src.lighthack)
|
||||
src.icon_state = "nuclearbomb2"
|
||||
if(!src.safety)
|
||||
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
|
||||
else
|
||||
bomb_set = 0
|
||||
else
|
||||
bomb_set = 0
|
||||
if(!src.lighthack)
|
||||
wires[temp_wire] = !wires[temp_wire]
|
||||
if(src.safety_wire == temp_wire)
|
||||
if(src.timing)
|
||||
explode()
|
||||
if(src.timing_wire == temp_wire)
|
||||
if(!src.lighthack)
|
||||
if (src.icon_state == "nuclearbomb2")
|
||||
src.icon_state = "nuclearbomb1"
|
||||
if (href_list["safety"])
|
||||
src.safety = !( src.safety )
|
||||
if(safety)
|
||||
src.timing = 0
|
||||
bomb_set = 0
|
||||
if (href_list["anchor"])
|
||||
if(removal_stage == 5)
|
||||
src.anchored = 0
|
||||
visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
|
||||
return
|
||||
src.timing = 0
|
||||
bomb_set = 0
|
||||
if(src.light_wire == temp_wire)
|
||||
src.lighthack = !src.lighthack
|
||||
|
||||
src.anchored = !( src.anchored )
|
||||
if(src.anchored)
|
||||
visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring.")
|
||||
if (href_list["auth"])
|
||||
if (src.auth)
|
||||
src.auth.loc = src.loc
|
||||
src.yes_code = 0
|
||||
src.auth = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/disk/nuclear))
|
||||
usr.drop_item()
|
||||
I.loc = src
|
||||
src.auth = I
|
||||
if (is_auth(usr))
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if (src.code == src.r_code)
|
||||
src.yes_code = 1
|
||||
src.code = null
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if (href_list["type"] == "R")
|
||||
src.yes_code = 0
|
||||
src.code = null
|
||||
else
|
||||
lastentered = text("[]", href_list["type"])
|
||||
if (text2num(lastentered) == null)
|
||||
var/turf/LOC = get_turf(usr)
|
||||
message_admins("[key_name_admin(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: <a href='?_src_=vars;Vars=\ref[src]'>[lastentered]</a>! ([LOC ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[LOC.x];Y=[LOC.y];Z=[LOC.z]'>JMP</a>" : "null"])", 0)
|
||||
log_admin("EXPLOIT: [key_name(usr)] tried to exploit a nuclear bomb by entering non-numerical codes: [lastentered]!")
|
||||
else
|
||||
visible_message("\red The anchoring bolts slide back into the depths of [src].")
|
||||
src.code += lastentered
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
if (src.yes_code)
|
||||
if (href_list["time"])
|
||||
var/time = text2num(href_list["time"])
|
||||
src.timeleft += time
|
||||
src.timeleft = min(max(round(src.timeleft), 60), 600)
|
||||
if (href_list["timer"])
|
||||
if (src.timing == -1.0)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
if (src.safety)
|
||||
usr << "\red The safety is still on."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
src.timing = !( src.timing )
|
||||
if (src.timing)
|
||||
if(!src.lighthack)
|
||||
src.icon_state = "nuclearbomb2"
|
||||
if(!src.safety)
|
||||
bomb_set = 1//There can still be issues with this reseting when there are multiple bombs. Not a big deal tho for Nuke/N
|
||||
else
|
||||
bomb_set = 0
|
||||
else
|
||||
bomb_set = 0
|
||||
if(!src.lighthack)
|
||||
src.icon_state = "nuclearbomb1"
|
||||
if (href_list["safety"])
|
||||
src.safety = !( src.safety )
|
||||
if(safety)
|
||||
src.timing = 0
|
||||
bomb_set = 0
|
||||
if (href_list["anchor"])
|
||||
if(removal_stage == 5)
|
||||
src.anchored = 0
|
||||
visible_message("\red \The [src] makes a highly unpleasant crunching noise. It looks like the anchoring bolts have been cut.")
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if ((M.client && M.machine == src))
|
||||
nanomanager.update_uis(src)
|
||||
else
|
||||
return
|
||||
return
|
||||
src.anchored = !( src.anchored )
|
||||
if(src.anchored)
|
||||
visible_message("\red With a steely snap, bolts slide out of [src] and anchor it to the flooring.")
|
||||
else
|
||||
visible_message("\red The anchoring bolts slide back into the depths of [src].")
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/nuclearbomb/ex_act(severity)
|
||||
return
|
||||
@@ -394,7 +393,6 @@ obj/machinery/nuclearbomb/proc/nukehack_win(mob/user as mob)
|
||||
return ..()
|
||||
return
|
||||
|
||||
|
||||
#define NUKERANGE 80
|
||||
/obj/machinery/nuclearbomb/proc/explode()
|
||||
if (src.safety)
|
||||
|
||||
@@ -150,13 +150,6 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/datum/game_mode/xenos/proc/get_nuke_code()
|
||||
var/nukecode = "ERROR"
|
||||
for(var/obj/machinery/nuclearbomb/bomb in world)
|
||||
if(bomb && bomb.r_code && bomb.z == ZLEVEL_STATION)
|
||||
nukecode = bomb.r_code
|
||||
return nukecode
|
||||
|
||||
/datum/game_mode/xenos/proc/xenos_alive()
|
||||
var/list/livingxenos = list()
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
|
||||
@@ -695,7 +695,7 @@
|
||||
data["danger"] = danger
|
||||
return data
|
||||
|
||||
/obj/machinery/alarm/proc/get_nano_data(mob/user)
|
||||
/obj/machinery/alarm/proc/get_nano_data(mob/user, href_list)
|
||||
var/data[0]
|
||||
data["name"] = sanitize(name)
|
||||
data["air"] = ui_air_status()
|
||||
@@ -705,7 +705,7 @@
|
||||
// Locked when:
|
||||
// Not sent from atmos console AND
|
||||
// Not silicon AND locked.
|
||||
data["locked"] = (!(istype(user, /mob/living/silicon)) && locked)
|
||||
data["locked"] = is_locked(user,href_list)
|
||||
data["rcon"] = rcon_setting
|
||||
data["target_temp"] = target_temperature - T0C
|
||||
data["atmos_alarm"] = alarm_area.atmosalm
|
||||
@@ -805,15 +805,15 @@
|
||||
return thresholds
|
||||
|
||||
/obj/machinery/alarm/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
var/list/data = get_nano_data(user)
|
||||
|
||||
var/list/href = state.href_list(user)
|
||||
var/remote_connection = 0
|
||||
var/remote_access = 0
|
||||
if(state)
|
||||
var/list/href = state.href_list(user)
|
||||
if(href)
|
||||
remote_connection = href["remote_connection"] // Remote connection means we're non-adjacent/connecting from another computer
|
||||
remote_access = href["remote_access"] // Remote access means we also have the privilege to alter the air alarm.
|
||||
|
||||
var/list/data = get_nano_data(user, href)
|
||||
|
||||
data["remote_connection"] = remote_connection
|
||||
data["remote_access"] = remote_access
|
||||
|
||||
@@ -825,13 +825,25 @@
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/alarm/proc/is_authenticated(mob/user as mob, href_list)
|
||||
if(isAI(user) || isrobot(user) || emagged || is_auth_rcon(href_list))
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 1
|
||||
else if(isAI(user) || isrobot(user) || emagged || is_auth_rcon(href_list))
|
||||
return 1
|
||||
else
|
||||
return !locked
|
||||
|
||||
/obj/machinery/alarm/proc/is_locked(mob/user as mob, href_list)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 0
|
||||
else if(is_auth_rcon(href_list))
|
||||
return 0
|
||||
else if(isAI(user) || isrobot(user))
|
||||
return 0
|
||||
else
|
||||
return locked
|
||||
|
||||
/obj/machinery/alarm/proc/is_auth_rcon(href_list)
|
||||
if(href_list["remote_connection"] && href_list["remote_access"])
|
||||
if(href_list && href_list["remote_connection"] && href_list["remote_access"])
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
@@ -840,7 +852,7 @@
|
||||
if(buildstage != 2)
|
||||
return STATUS_CLOSE
|
||||
|
||||
if(aidisabled && isAI(user))
|
||||
if(aidisabled && (isAI(user) || isrobot(user)))
|
||||
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
|
||||
return STATUS_CLOSE
|
||||
|
||||
|
||||
@@ -50,8 +50,12 @@ var/time_last_changed_position = 0
|
||||
/obj/machinery/computer/card/proc/is_centcom()
|
||||
return istype(src, /obj/machinery/computer/card/centcom)
|
||||
|
||||
/obj/machinery/computer/card/proc/is_authenticated()
|
||||
return scan ? check_access(scan) : 0
|
||||
/obj/machinery/computer/card/proc/is_authenticated(user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 1
|
||||
if(scan)
|
||||
return check_access(scan)
|
||||
return 0
|
||||
|
||||
/obj/machinery/computer/card/proc/get_target_rank()
|
||||
return modify && modify.assignment ? modify.assignment : "Unassigned"
|
||||
@@ -180,7 +184,7 @@ var/time_last_changed_position = 0
|
||||
data["target_owner"] = modify && modify.registered_name ? modify.registered_name : "-----"
|
||||
data["target_rank"] = get_target_rank()
|
||||
data["scan_name"] = scan ? scan.name : "-----"
|
||||
data["authenticated"] = is_authenticated()
|
||||
data["authenticated"] = is_authenticated(user)
|
||||
data["has_modify"] = !!modify
|
||||
data["account_number"] = modify ? modify.associated_account_number : null
|
||||
data["centcom_access"] = is_centcom()
|
||||
@@ -285,7 +289,7 @@ var/time_last_changed_position = 0
|
||||
|
||||
if("access")
|
||||
if(href_list["allowed"])
|
||||
if(is_authenticated())
|
||||
if(is_authenticated(usr))
|
||||
var/access_type = text2num(href_list["access_target"])
|
||||
var/access_allowed = text2num(href_list["allowed"])
|
||||
if(access_type in (is_centcom() ? get_all_centcom_access() : get_all_accesses()))
|
||||
@@ -295,11 +299,11 @@ var/time_last_changed_position = 0
|
||||
|
||||
if("skin")
|
||||
var/skin = href_list["skin_target"]
|
||||
if(is_authenticated() && modify && ((skin in get_station_card_skins()) || ((skin in get_centcom_card_skins()) && is_centcom())))
|
||||
if(is_authenticated(usr) && modify && ((skin in get_station_card_skins()) || ((skin in get_centcom_card_skins()) && is_centcom())))
|
||||
modify.icon_state = href_list["skin_target"]
|
||||
|
||||
if ("assign")
|
||||
if (is_authenticated() && modify)
|
||||
if (is_authenticated(usr) && modify)
|
||||
var/t1 = href_list["assign_target"]
|
||||
if(t1 == "Custom")
|
||||
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
|
||||
@@ -330,7 +334,7 @@ var/time_last_changed_position = 0
|
||||
callHook("reassign_employee", list(modify))
|
||||
|
||||
if ("reg")
|
||||
if (is_authenticated())
|
||||
if (is_authenticated(usr))
|
||||
var/t2 = modify
|
||||
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/temp_name = reject_bad_name(href_list["reg"])
|
||||
@@ -341,7 +345,7 @@ var/time_last_changed_position = 0
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
if ("account")
|
||||
if (is_authenticated())
|
||||
if (is_authenticated(usr))
|
||||
var/t2 = modify
|
||||
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
|
||||
var/account_num = text2num(href_list["account"])
|
||||
@@ -381,7 +385,7 @@ var/time_last_changed_position = 0
|
||||
P.info += " [get_access_desc(A)]"
|
||||
|
||||
if ("terminate")
|
||||
if (is_authenticated())
|
||||
if (is_authenticated(usr))
|
||||
modify.assignment = "Terminated"
|
||||
modify.access = list()
|
||||
|
||||
@@ -389,7 +393,7 @@ var/time_last_changed_position = 0
|
||||
|
||||
if("make_job_available")
|
||||
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
|
||||
if(is_authenticated())
|
||||
if(is_authenticated(usr))
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
@@ -404,7 +408,7 @@ var/time_last_changed_position = 0
|
||||
|
||||
if("make_job_unavailable")
|
||||
// MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS
|
||||
if(is_authenticated())
|
||||
if(is_authenticated(usr))
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
|
||||
@@ -64,50 +64,69 @@ var/shuttle_call/shuttle_calls[0]
|
||||
/obj/machinery/computer/communications/New()
|
||||
..()
|
||||
crew_announcement.newscast = 1
|
||||
|
||||
/obj/machinery/computer/communications/proc/is_authenticated(user as mob, var/message = 1)
|
||||
if(authenticated == 2)
|
||||
return 2
|
||||
else if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 2
|
||||
else if(authenticated)
|
||||
return 1
|
||||
else
|
||||
if(message)
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
return 0
|
||||
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
if(..(href, href_list))
|
||||
return 1
|
||||
|
||||
if ((!(src.z in config.station_levels) && !(src.z in config.admin_levels)))
|
||||
usr << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
usr << "<span class='warning'>Unable to establish a connection: You're too far away from the station!</span>"
|
||||
return 1
|
||||
|
||||
if(href_list["login"])
|
||||
var/mob/living/carbon/human/M = usr
|
||||
var/obj/item/card = M.get_active_hand()
|
||||
var/obj/item/weapon/card/id/I = (card && card.GetID())||M.wear_id||M.wear_pda
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
if (I && istype(I))
|
||||
if(src.check_access(I))
|
||||
authenticated = 1
|
||||
if(access_captain in I.access)
|
||||
authenticated = 2
|
||||
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
if(href_list["logout"])
|
||||
authenticated = 0
|
||||
crew_announcement.announcer = ""
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
if(!is_authenticated(usr))
|
||||
return 1
|
||||
|
||||
if(!href_list["operation"])
|
||||
return
|
||||
switch(href_list["operation"])
|
||||
// main interface
|
||||
if("main")
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
if("login")
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/card/id/I = M.get_active_hand()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
if (I && istype(I))
|
||||
if(src.check_access(I))
|
||||
authenticated = 1
|
||||
if(access_captain in I.access)
|
||||
authenticated = 2
|
||||
crew_announcement.announcer = GetNameAndAssignmentFromId(I)
|
||||
if("logout")
|
||||
authenticated = 0
|
||||
crew_announcement.announcer = ""
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
// ALART LAVUL
|
||||
|
||||
if("changeseclevel")
|
||||
setMenuState(usr,COMM_SCREEN_SECLEVEL)
|
||||
|
||||
if("newalertlevel")
|
||||
if(issilicon(usr))
|
||||
return
|
||||
if(isAI(usr) || isrobot(usr))
|
||||
usr << "<span class='warning'>Firewalls prevent you from changing the alert level.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
tmp_alertlevel = text2num(href_list["level"])
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/card/id/I = M.get_active_hand()
|
||||
var/mob/living/carbon/human/L = usr
|
||||
var/obj/item/card = L.get_active_hand()
|
||||
var/obj/item/weapon/card/id/I = (card && card.GetID())||L.wear_id||L.wear_pda
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
@@ -128,20 +147,22 @@ var/shuttle_call/shuttle_calls[0]
|
||||
if(SEC_LEVEL_BLUE)
|
||||
feedback_inc("alert_comms_blue",1)
|
||||
tmp_alertlevel = 0
|
||||
else:
|
||||
usr << "You are not authorized to do this."
|
||||
else
|
||||
usr << "<span class='warning'>You are not authorized to do this.</span>"
|
||||
tmp_alertlevel = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
else
|
||||
usr << "You need to swipe your ID."
|
||||
usr << "<span class='warning'>You need to swipe your ID.</span>"
|
||||
|
||||
if("announce")
|
||||
if(src.authenticated==2)
|
||||
if(is_authenticated(usr) == 2)
|
||||
if(message_cooldown)
|
||||
usr << "Please allow at least one minute to pass between announcements"
|
||||
usr << "<span class='warning'>Please allow at least one minute to pass between announcements.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
if(!input || ..() || !(is_authenticated(usr) == 2))
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
crew_announcement.Announce(input)
|
||||
message_cooldown = 1
|
||||
@@ -149,27 +170,34 @@ var/shuttle_call/shuttle_calls[0]
|
||||
message_cooldown = 0
|
||||
|
||||
if("callshuttle")
|
||||
if(src.authenticated)
|
||||
var/response = alert("Are you sure you wish to call the shuttle?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
call_shuttle_proc(usr)
|
||||
if(emergency_shuttle.online())
|
||||
post_status("shuttle")
|
||||
var/input = stripped_input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
if(!input || ..() || !(is_authenticated(usr) == 2))
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
call_shuttle_proc(usr, input)
|
||||
if(emergency_shuttle.online())
|
||||
post_status("shuttle")
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("cancelshuttle")
|
||||
if(issilicon(usr)) return
|
||||
if(src.authenticated)
|
||||
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
cancel_call_proc(usr)
|
||||
if(emergency_shuttle.online())
|
||||
post_status("shuttle")
|
||||
if(isAI(usr) || isrobot(usr))
|
||||
usr << "<span class='warning'>Firewalls prevent you from recalling the shuttle.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
cancel_call_proc(usr)
|
||||
if(emergency_shuttle.online())
|
||||
post_status("shuttle")
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("messagelist")
|
||||
src.currmsg = 0
|
||||
if(href_list["msgid"])
|
||||
setCurrentMessage(usr, text2num(href_list["msgid"]))
|
||||
setMenuState(usr,COMM_SCREEN_MESSAGES)
|
||||
|
||||
if("delmessage")
|
||||
if(href_list["msgid"])
|
||||
src.currmsg = text2num(href_list["msgid"])
|
||||
@@ -203,18 +231,39 @@ var/shuttle_call/shuttle_calls[0]
|
||||
if("setmsg1")
|
||||
stat_msg1 = input("Line 1", "Enter Message Text", stat_msg1) as text|null
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
|
||||
if("setmsg2")
|
||||
stat_msg2 = input("Line 2", "Enter Message Text", stat_msg2) as text|null
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
|
||||
// OMG CENTCOMM LETTERHEAD
|
||||
if("MessageCentcomm")
|
||||
if(src.authenticated==2)
|
||||
if("nukerequest")
|
||||
if(is_authenticated(usr) == 2)
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
usr << "<span class='warning'>Arrays recycling. Please stand by.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
var/input = input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") as text|null
|
||||
if(!input || ..() || !(is_authenticated(usr) == 2))
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
Nuke_request(input, usr)
|
||||
usr << "<span class='notice'>Request sent.</span>"
|
||||
log_say("[key_name(usr)] has requested the nuclear codes from Centcomm")
|
||||
priority_announcement.Announce("The codes for the on-station nuclear self-destruct have been requested by [usr]. Confirmation or denial of this request will be sent shortly.", "Nuclear Self Destruct Codes Requested",'sound/AI/commandreport.ogg')
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("MessageCentcomm")
|
||||
if(is_authenticated(usr) == 2)
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "<span class='warning'>Arrays recycling. Please stand by.</span>"
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null
|
||||
if(!input || ..() || !(is_authenticated(usr) == 2))
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
Centcomm_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
@@ -224,15 +273,16 @@ var/shuttle_call/shuttle_calls[0]
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
|
||||
// OMG SYNDICATE ...LETTERHEAD
|
||||
if("MessageSyndicate")
|
||||
if((src.authenticated==2) && (src.emagged))
|
||||
if((is_authenticated(usr) == 2) && (src.emagged))
|
||||
if(centcomm_message_cooldown)
|
||||
usr << "Arrays recycling. Please stand by."
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null
|
||||
if(!input || ..() || !(is_authenticated(usr) == 2))
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
Syndicate_announce(input, usr)
|
||||
usr << "Message transmitted."
|
||||
@@ -247,17 +297,18 @@ var/shuttle_call/shuttle_calls[0]
|
||||
src.emagged = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/communications/emag_act(user as mob)
|
||||
if(!emagged)
|
||||
src.emagged = 1
|
||||
user << "You scramble the communication routing circuits!"
|
||||
user << "<span class='notice'>You scramble the communication routing circuits!</span>"
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/communications/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/communications/attack_hand(var/mob/user as mob)
|
||||
if(..(user))
|
||||
return
|
||||
@@ -266,7 +317,7 @@ var/shuttle_call/shuttle_calls[0]
|
||||
return
|
||||
|
||||
if (!(src.z in list(ZLEVEL_STATION, ZLEVEL_CENTCOMM)))
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
user << "<span class='warning'>Unable to establish a connection: You're too far away from the station!</span>"
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
@@ -274,10 +325,10 @@ var/shuttle_call/shuttle_calls[0]
|
||||
/obj/machinery/computer/communications/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
data["is_ai"] = issilicon(user)
|
||||
data["is_ai"] = isAI(user)||isrobot(user)
|
||||
data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state
|
||||
data["emagged"] = emagged
|
||||
data["authenticated"] = authenticated
|
||||
data["authenticated"] = is_authenticated(user, 0)
|
||||
data["screen"] = getMenuState(usr)
|
||||
|
||||
data["stat_display"] = list(
|
||||
@@ -297,7 +348,7 @@ var/shuttle_call/shuttle_calls[0]
|
||||
)
|
||||
)
|
||||
data["security_level"] = security_level
|
||||
data["str_security_level"] = get_security_level()
|
||||
data["str_security_level"] = capitalize(get_security_level())
|
||||
data["levels"] = list(
|
||||
list("id"=SEC_LEVEL_GREEN, "name"="Green"),
|
||||
list("id"=SEC_LEVEL_BLUE, "name"="Blue"),
|
||||
@@ -333,29 +384,27 @@ var/shuttle_call/shuttle_calls[0]
|
||||
ui.set_initial_data(data)
|
||||
// open the new ui window
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/computer/communications/proc/setCurrentMessage(var/mob/user,var/value)
|
||||
if(issilicon(user))
|
||||
if(isAI(user) || isrobot(user))
|
||||
aicurrmsg=value
|
||||
else
|
||||
currmsg=value
|
||||
|
||||
/obj/machinery/computer/communications/proc/getCurrentMessage(var/mob/user)
|
||||
if(issilicon(user))
|
||||
if(isAI(user) || isrobot(user))
|
||||
return aicurrmsg
|
||||
else
|
||||
return currmsg
|
||||
|
||||
/obj/machinery/computer/communications/proc/setMenuState(var/mob/user,var/value)
|
||||
if(issilicon(user))
|
||||
if(isAI(user) || isrobot(user))
|
||||
ai_menu_state=value
|
||||
else
|
||||
menu_state=value
|
||||
|
||||
/obj/machinery/computer/communications/proc/getMenuState(var/mob/user)
|
||||
if(issilicon(user))
|
||||
if(isAI(user) || isrobot(user))
|
||||
return ai_menu_state
|
||||
else
|
||||
return menu_state
|
||||
@@ -364,39 +413,38 @@ var/shuttle_call/shuttle_calls[0]
|
||||
for(var/obj/machinery/computer/prison_shuttle/PS in world)
|
||||
PS.allowedtocall = !(PS.allowedtocall)
|
||||
|
||||
/proc/call_shuttle_proc(var/mob/user)
|
||||
/proc/call_shuttle_proc(var/mob/user, var/reason)
|
||||
if ((!( ticker ) || !emergency_shuttle.location()))
|
||||
return
|
||||
|
||||
if(sent_strike_team == 1)
|
||||
user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated."
|
||||
user << "<span class='warning'>Central Command will not allow the shuttle to be called. Consider all contracts terminated.</span>"
|
||||
return
|
||||
|
||||
if(emergency_shuttle.deny_shuttle)
|
||||
user << "The emergency shuttle may not be sent at this time. Please try again later."
|
||||
user << "<span class='warning'>The emergency shuttle may not be sent at this time. Please try again later.</span>"
|
||||
return
|
||||
|
||||
if(world.time < 6000) // Ten minute grace period to let the game get going without lolmetagaming. -- TLE
|
||||
user << "The emergency shuttle is refueling. Please wait another [round((6000-world.time)/60)] minutes before trying again."
|
||||
user << "<span class='warning'>The emergency shuttle is refueling. Please wait another [round((6000-world.time)/60)] minutes before trying again.</span>"
|
||||
return
|
||||
|
||||
if(emergency_shuttle.going_to_centcom())
|
||||
user << "The emergency shuttle may not be called while returning to CentCom."
|
||||
user << "<span class='warning'>The emergency shuttle may not be called while returning to Central Command.</span>"
|
||||
return
|
||||
|
||||
if(emergency_shuttle.online())
|
||||
user << "The emergency shuttle is already on its way."
|
||||
user << "<span class='warning'>The emergency shuttle is already on its way.</span>"
|
||||
return
|
||||
|
||||
if(ticker.mode.name == "blob")
|
||||
user << "Under directive 7-10, [station_name()] is quarantined until further notice."
|
||||
user << "<span class='warning'>Under directive 7-10, [station_name()] is quarantined until further notice.</span>"
|
||||
return
|
||||
|
||||
emergency_shuttle.call_evac()
|
||||
emergency_shuttle.call_evac(reason)
|
||||
log_game("[key_name(user)] has called the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
|
||||
|
||||
|
||||
return
|
||||
|
||||
/proc/init_shift_change(var/mob/user, var/force = 0)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
/obj/machinery/embedded_controller/radio/airlock/advanced_airlock_controller/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
update_icon()
|
||||
src.updateDialog()
|
||||
|
||||
/obj/machinery/embedded_controller/attack_ghost(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/embedded_controller/attack_ai(mob/user as mob)
|
||||
src.ui_interact(user)
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@ var/list/turret_icons
|
||||
user << "<span class='notice'>There seems to be a firewall preventing you from accessing this device.</span>"
|
||||
return 1
|
||||
|
||||
if(locked && !(isrobot(user) || isAI(user)))
|
||||
if(locked && !(isrobot(user) || isAI(user) || isobserver(user)))
|
||||
user << "<span class='notice'>Access denied.</span>"
|
||||
return 1
|
||||
|
||||
@@ -185,6 +185,9 @@ var/list/turret_icons
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/porta_turret/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/porta_turret/attack_hand(mob/user)
|
||||
if(isLocked(user))
|
||||
|
||||
@@ -1103,7 +1103,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
M.regenerate_icons()
|
||||
|
||||
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
|
||||
message_admins("\blue [key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode]..", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode].", 1)
|
||||
return
|
||||
|
||||
/client/proc/startSinglo()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
/proc/Centcomm_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=orange>CENTCOMM:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=orange>CENTCOMM: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/proc/Syndicate_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color='#DC143C'>SYNDICATE:</font> [key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color='#DC143C'>SYNDICATE: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/proc/HONK_announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=pink>HONK:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;HONKReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=pink>HONK: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;HONKReply=\ref[Sender]'>RPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
@@ -50,8 +50,15 @@
|
||||
|
||||
/proc/ERT_Announce(var/text , var/mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "\blue <b><font color=orange>ERT REQUEST:</font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;ErtReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
msg = "\blue <b><font color=orange>ERT REQUEST: </font>[key_name(Sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;ErtReply=\ref[Sender]'>REPLY</A>):</b> [msg]"
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
X << msg
|
||||
X << msg
|
||||
|
||||
/proc/Nuke_request(text , mob/Sender)
|
||||
var/nuke_code = get_nuke_code()
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST: </font>[key_name(Sender)] (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) ([admin_jump_link(Sender, "holder")]) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
admins << msg
|
||||
admins << "<span class='adminnotice'><b>The nuke code is [nuke_code].</b></span>"
|
||||
@@ -911,10 +911,13 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
choice = input("The shuttle will not be able to leave if you call it. Call anyway?") in list("Confirm", "Cancel")
|
||||
if(choice != "Confirm")
|
||||
return
|
||||
|
||||
|
||||
|
||||
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
|
||||
if (choice == "Emergency")
|
||||
emergency_shuttle.call_evac()
|
||||
var/reason = stripped_input(usr, "Optional: Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
emergency_shuttle.call_evac(reason)
|
||||
else
|
||||
emergency_shuttle.call_transfer()
|
||||
|
||||
|
||||
@@ -1,15 +1,59 @@
|
||||
|
||||
/obj/machinery/artillerycontrol
|
||||
var/reload = 180
|
||||
/obj/machinery/computer/artillerycontrol
|
||||
name = "bluespace artillery control"
|
||||
icon_state = "control_boxp1"
|
||||
icon = 'icons/obj/machines/particle_accelerator.dmi'
|
||||
density = 1
|
||||
anchored = 1
|
||||
icon_screen = "accelerator"
|
||||
icon_keyboard = "accelerator_key"
|
||||
icon_state = "computer_wires"
|
||||
req_access = list(access_cent_commander)
|
||||
var/last_fire = 0
|
||||
var/reload_cooldown = 180 // 3 minute cooldown
|
||||
|
||||
light_color = LIGHT_COLOR_LIGHTBLUE
|
||||
|
||||
/obj/machinery/artillerycontrol/process()
|
||||
if(src.reload<180)
|
||||
src.reload++
|
||||
/obj/machinery/computer/artillerycontrol/attack_ai(user as mob)
|
||||
user << "<span class='warning'>Access denied.</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/computer/artillerycontrol/attack_hand(user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/artillerycontrol/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
var/time_to_wait = round(reload_cooldown - ((world.time / 10) - last_fire), 1)
|
||||
var/mins = round(time_to_wait / 60)
|
||||
var/seconds = time_to_wait - (60*mins)
|
||||
data["reloadtime_mins"] = mins
|
||||
data["reloadtime_secs"] = (seconds < 10) ? "0[seconds]" : seconds
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "bluespace_artillery.tmpl", "Bluespace Control", 400, 260)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/computer/artillerycontrol/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/A
|
||||
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
if(..() || !istype(thearea))
|
||||
return
|
||||
|
||||
var/delta = (world.time / 10) - last_fire
|
||||
if(reload_cooldown > delta)
|
||||
return 1
|
||||
|
||||
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/loc = pick(L)
|
||||
explosion(loc,2,5,11)
|
||||
last_fire = world.time / 10
|
||||
|
||||
/obj/structure/artilleryplaceholder
|
||||
name = "artillery"
|
||||
@@ -19,47 +63,3 @@
|
||||
|
||||
/obj/structure/artilleryplaceholder/decorative
|
||||
density = 0
|
||||
|
||||
/obj/machinery/artillerycontrol/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = "<B>Bluespace Artillery Control:</B><BR>"
|
||||
dat += "Locked on<BR>"
|
||||
dat += "<B>Charge progress: [reload]/180:</B><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];fire=1'>Open Fire</A><BR>"
|
||||
dat += "Deployment of weapon authorized by <br>Nanotrasen Naval Command<br><br>Remember, friendly fire is grounds for termination of your contract and life.<HR>"
|
||||
user << browse(dat, "window=scroll")
|
||||
onclose(user, "scroll")
|
||||
return
|
||||
|
||||
/obj/machinery/artillerycontrol/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
var/A
|
||||
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
if (usr.stat || usr.restrained()) return
|
||||
if(src.reload < 180) return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
message_admins("[key_name_admin(usr)] has launched an artillery strike.", 1)
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/loc = pick(L)
|
||||
explosion(loc,2,5,11)
|
||||
reload = 0
|
||||
|
||||
/*mob/proc/openfire()
|
||||
var/A
|
||||
A = input("Area to jump bombard", "Open Fire", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
command_announcement.Announce("Bluespace artillery fire detected. Brace for impact.")
|
||||
spawn(30)
|
||||
var/list/L = list()
|
||||
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
L+=T
|
||||
var/loc = pick(L)
|
||||
explosion(loc,2,5,11)*/
|
||||
@@ -129,7 +129,10 @@
|
||||
if(!computer.radio.subspace)
|
||||
return
|
||||
if(authenticated)
|
||||
call_shuttle_proc(usr)
|
||||
var/input = stripped_input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
if(!input || ..(href, href_list) || !authenticated)
|
||||
return
|
||||
call_shuttle_proc(usr, input)
|
||||
if(emergency_shuttle.online())
|
||||
post_status("shuttle")
|
||||
state = STATE_DEFAULT
|
||||
@@ -236,7 +239,10 @@
|
||||
if("ai-callshuttle2" in href_list)
|
||||
if(!computer.radio.subspace)
|
||||
return
|
||||
call_shuttle_proc(usr)
|
||||
var/input = stripped_input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
if(!input || ..(href, href_list))
|
||||
return
|
||||
call_shuttle_proc(usr, input)
|
||||
aistate = STATE_DEFAULT
|
||||
if("ai-messagelist" in href_list)
|
||||
aicurrmsg = 0
|
||||
|
||||
@@ -23,7 +23,7 @@ log transactions
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
var/obj/machinery/account_database/linked_db
|
||||
var/obj/machinery/computer/account_database/linked_db
|
||||
var/datum/money_account/authenticated_account
|
||||
var/number_incorrect_tries = 0
|
||||
var/previous_account_number = 0
|
||||
@@ -80,7 +80,7 @@ log transactions
|
||||
authenticated_account.charge(-amount,null,"Credit deposit",terminal_id=machine_id,dest_name = "Terminal")
|
||||
|
||||
/obj/machinery/atm/proc/reconnect_database()
|
||||
for(var/obj/machinery/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
|
||||
for(var/obj/machinery/computer/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
|
||||
if( DB.z == src.z && !(DB.stat & NOPOWER) && DB.activated )
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
@@ -3,7 +3,7 @@ var/global/num_financial_terminals = 1
|
||||
var/global/datum/money_account/station_account
|
||||
var/global/list/datum/money_account/department_accounts = list()
|
||||
var/global/next_account_number = 0
|
||||
var/global/obj/machinery/account_database/centcomm_account_db
|
||||
var/global/obj/machinery/computer/account_database/centcomm_account_db
|
||||
var/global/datum/money_account/vendor_account
|
||||
var/global/list/all_money_accounts = list()
|
||||
|
||||
@@ -57,7 +57,7 @@ var/global/list/all_money_accounts = list()
|
||||
//the current ingame time (hh:mm) can be obtained by calling:
|
||||
//worldtime2text()
|
||||
|
||||
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/account_database/source_db)
|
||||
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/computer/account_database/source_db)
|
||||
|
||||
//create a new account
|
||||
var/datum/money_account/M = new()
|
||||
@@ -336,7 +336,7 @@ var/global/list/all_money_accounts = list()
|
||||
|
||||
src.attack_hand(usr)
|
||||
*/
|
||||
/obj/machinery/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
/obj/machinery/computer/account_database/proc/charge_to_account(var/attempt_account_number, var/source_name, var/purpose, var/terminal_id, var/amount)
|
||||
if(!activated)
|
||||
return 0
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
@@ -367,7 +367,7 @@ var/global/list/all_money_accounts = list()
|
||||
if( D.security_level <= security_level_passed && (!D.security_level || D.remote_access_pin == attempt_pin_number || !pin_needed) )
|
||||
return D
|
||||
|
||||
/obj/machinery/account_database/proc/get_account(var/account_number)
|
||||
/obj/machinery/computer/account_database/proc/get_account(var/account_number)
|
||||
for(var/datum/money_account/D in all_money_accounts)
|
||||
if(D.account_number == account_number)
|
||||
return D
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
|
||||
/obj/machinery/account_database
|
||||
name = "Accounts uplink terminal"
|
||||
/obj/machinery/computer/account_database
|
||||
name = "Accounts Uplink Terminal"
|
||||
desc = "Access transaction logs, account data and all kinds of other financial records."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "aiupload"
|
||||
icon_screen = "accounts"
|
||||
density = 1
|
||||
req_one_access = list(access_hop, access_captain, access_cent_commander)
|
||||
var/receipt_num
|
||||
@@ -12,34 +11,38 @@
|
||||
var/datum/money_account/detailed_account_view
|
||||
var/creating_new_account = 0
|
||||
var/activated = 1
|
||||
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
proc/get_access_level()
|
||||
if (!held_card)
|
||||
return 0
|
||||
if(access_cent_commander in held_card.access)
|
||||
return 2
|
||||
else if(access_hop in held_card.access || access_captain in held_card.access)
|
||||
return 1
|
||||
/obj/machinery/computer/account_database/proc/get_access_level(user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 2
|
||||
if (!held_card)
|
||||
return 0
|
||||
if(access_cent_commander in held_card.access)
|
||||
return 2
|
||||
else if(access_hop in held_card.access || access_captain in held_card.access)
|
||||
return 1
|
||||
|
||||
proc/create_transation(target, reason, amount)
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = target
|
||||
T.purpose = reason
|
||||
T.amount = amount
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = machine_id
|
||||
return T
|
||||
/obj/machinery/computer/account_database/proc/create_transation(target, reason, amount)
|
||||
var/datum/transaction/T = new()
|
||||
T.target_name = target
|
||||
T.purpose = reason
|
||||
T.amount = amount
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.source_terminal = machine_id
|
||||
return T
|
||||
|
||||
proc/accounting_letterhead(report_name)
|
||||
return {"
|
||||
<center><h1><b>[report_name]</b></h1></center>
|
||||
<center><small><i>[station_name()] Accounting Report</i></small></center>
|
||||
<hr>
|
||||
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
|
||||
"}
|
||||
/obj/machinery/computer/account_database/proc/accounting_letterhead(report_name)
|
||||
return {"
|
||||
<center><h1><b>[report_name]</b></h1></center>
|
||||
<center><small><i>[station_name()] Accounting Report</i></small></center>
|
||||
<hr>
|
||||
<u>Generated By:</u> [held_card.registered_name], [held_card.assignment]<br>
|
||||
"}
|
||||
|
||||
/obj/machinery/account_database/New()
|
||||
/obj/machinery/computer/account_database/New()
|
||||
if(!station_account)
|
||||
create_station_account()
|
||||
|
||||
@@ -56,7 +59,7 @@
|
||||
machine_id = "[station_name()] Acc. DB #[num_financial_terminals++]"
|
||||
..()
|
||||
|
||||
/obj/machinery/account_database/attackby(obj/O, mob/user, params)
|
||||
/obj/machinery/computer/account_database/attackby(obj/O, mob/user, params)
|
||||
if(!istype(O, /obj/item/weapon/card/id))
|
||||
return ..()
|
||||
|
||||
@@ -69,18 +72,17 @@
|
||||
|
||||
attack_hand(user)
|
||||
|
||||
/obj/machinery/account_database/attack_hand(mob/user as mob)
|
||||
if(stat & (NOPOWER|BROKEN)) return
|
||||
/obj/machinery/computer/account_database/attack_hand(mob/user as mob)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/account_database/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
/obj/machinery/computer/account_database/ui_interact(mob/user, ui_key="main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/data[0]
|
||||
data["src"] = "\ref[src]"
|
||||
data["id_inserted"] = !!held_card
|
||||
data["id_card"] = held_card ? text("[held_card.registered_name], [held_card.assignment]") : "-----"
|
||||
data["access_level"] = get_access_level()
|
||||
data["access_level"] = get_access_level(user)
|
||||
data["machine_id"] = machine_id
|
||||
data["creating_new_account"] = creating_new_account
|
||||
data["detailed_account_view"] = !!detailed_account_view
|
||||
@@ -124,10 +126,29 @@
|
||||
ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/account_database/Topic(href, href_list)
|
||||
|
||||
/obj/machinery/computer/account_database/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if("insert_card")
|
||||
if(held_card)
|
||||
held_card.loc = src.loc
|
||||
|
||||
if(ishuman(usr) && !usr.get_active_hand())
|
||||
usr.put_in_hands(held_card)
|
||||
held_card = null
|
||||
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
usr.drop_item()
|
||||
C.loc = src
|
||||
held_card = C
|
||||
|
||||
if(!get_access_level(usr))
|
||||
return 1
|
||||
|
||||
var/datum/nanoui/ui = nanomanager.get_open_ui(usr, src, "main")
|
||||
|
||||
@@ -167,21 +188,6 @@
|
||||
ui.close()
|
||||
|
||||
creating_new_account = 0
|
||||
if("insert_card")
|
||||
if(held_card)
|
||||
held_card.loc = src.loc
|
||||
|
||||
if(ishuman(usr) && !usr.get_active_hand())
|
||||
usr.put_in_hands(held_card)
|
||||
held_card = null
|
||||
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/C = I
|
||||
usr.drop_item()
|
||||
C.loc = src
|
||||
held_card = C
|
||||
|
||||
if("view_account_detail")
|
||||
var/index = text2num(href_list["account_index"])
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/transaction_amount = 0
|
||||
var/transaction_purpose = "Default charge"
|
||||
var/access_code = 0
|
||||
var/obj/machinery/account_database/linked_db
|
||||
var/obj/machinery/computer/account_database/linked_db
|
||||
var/datum/money_account/linked_account
|
||||
|
||||
/obj/item/device/eftpos/New()
|
||||
@@ -53,7 +53,7 @@
|
||||
if(!location)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
|
||||
for(var/obj/machinery/computer/account_database/DB in world) //Hotfix until someone finds out why it isn't in 'machines'
|
||||
if(DB.z == location.z)
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
////////////////////////
|
||||
|
||||
/proc/get_money_account(var/account_number, var/from_z=-1)
|
||||
for(var/obj/machinery/account_database/DB in world)
|
||||
for(var/obj/machinery/computer/account_database/DB in world)
|
||||
if(from_z > -1 && DB.z != from_z) continue
|
||||
if((DB.stat & NOPOWER) || !DB.activated ) continue
|
||||
var/datum/money_account/acct = DB.get_account(account_number)
|
||||
|
||||
@@ -329,20 +329,21 @@ var/list/ai_verbs_default = list(
|
||||
set name = "Call Emergency Shuttle"
|
||||
set category = "AI Commands"
|
||||
|
||||
if(src.stat == 2)
|
||||
src << "You can't call the shuttle because you are dead!"
|
||||
if(src.stat == DEAD)
|
||||
src << "<span class='warning'>You can't call the shuttle because you are dead!</span>"
|
||||
return
|
||||
|
||||
if(check_unable(AI_CHECK_WIRELESS))
|
||||
return
|
||||
|
||||
var/confirm = alert("Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "Yes", "No")
|
||||
var/input = stripped_input(usr, "Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","") as text|null
|
||||
if(!input || stat)
|
||||
return
|
||||
|
||||
if(check_unable(AI_CHECK_WIRELESS))
|
||||
return
|
||||
|
||||
if(confirm == "Yes")
|
||||
call_shuttle_proc(src)
|
||||
call_shuttle_proc(src, input)
|
||||
|
||||
// hack to display shuttle timer
|
||||
if(emergency_shuttle.online())
|
||||
|
||||
+15
-21
@@ -750,7 +750,7 @@
|
||||
return
|
||||
|
||||
var/list/data = list(
|
||||
"locked" = locked,
|
||||
"locked" = is_locked(user),
|
||||
"isOperating" = operating,
|
||||
"externalPower" = main_status,
|
||||
"powerCellStatus" = cell ? cell.percent() : null,
|
||||
@@ -799,7 +799,7 @@
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
// the ui does not exist, so we'll create a new one
|
||||
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 500, data["siliconUser"] ? 465 : 390)
|
||||
ui = new(user, src, ui_key, "apc.tmpl", "[area.name] - APC", 510, data["siliconUser"] ? 465 : 390)
|
||||
// When the UI is first opened this is the data it will use
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
@@ -834,25 +834,9 @@
|
||||
|
||||
|
||||
/obj/machinery/power/apc/proc/can_use(mob/user as mob, var/loud = 0) //used by attack_hand() and Topic()
|
||||
if (user.stat && !isobserver(user))
|
||||
user << "<span class='warning'>You must be conscious to use this [src]!</span>"
|
||||
return 0
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0
|
||||
if(!user.client)
|
||||
return 0
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
if ( ! (istype(user, /mob/living/carbon/human) || \
|
||||
istype(user, /mob/living/silicon)))
|
||||
user << "<span class='warning'>You don't have the dexterity to use this [src]!</span>"
|
||||
return 0
|
||||
if(user.restrained())
|
||||
user << "<span class='warning'>You must have free hands to use this [src]</span>"
|
||||
return 0
|
||||
if(user.lying)
|
||||
user << "<span class='warning'>You must stand to use this [src]!</span>"
|
||||
return 0
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 1
|
||||
|
||||
autoflag = 5
|
||||
if (istype(user, /mob/living/silicon))
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
@@ -886,10 +870,20 @@
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/apc/proc/is_authenticated(mob/user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 1
|
||||
if(isAI(user) || isrobot(user))
|
||||
return 1
|
||||
else
|
||||
return !locked
|
||||
|
||||
/obj/machinery/power/apc/proc/is_locked(mob/user as mob)
|
||||
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
|
||||
return 0
|
||||
if(isAI(user) || isrobot(user))
|
||||
return 0
|
||||
else
|
||||
return locked
|
||||
|
||||
/obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 1)
|
||||
if(..())
|
||||
|
||||
@@ -155,8 +155,8 @@
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/chem_dispenser/Topic(href, href_list)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return 0 // don't update UIs attached to this object
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["amount"])
|
||||
amount = round(text2num(href_list["amount"]), 5) // round to nearest 5
|
||||
@@ -245,6 +245,9 @@
|
||||
|
||||
/obj/machinery/chem_dispenser/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_dispenser/attack_ghost(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_dispenser/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
@@ -444,9 +447,8 @@
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/Topic(href, href_list)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
if(!in_range(src, usr)) return
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
usr.set_machine(src)
|
||||
@@ -457,7 +459,8 @@
|
||||
loaded_pill_bottle.loc = src.loc
|
||||
loaded_pill_bottle = null
|
||||
else if(href_list["close"])
|
||||
usr << browse(null, "window=chemmaster")
|
||||
usr << browse(null, "window=chem_master")
|
||||
onclose(usr, "chem_master")
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
@@ -636,6 +639,9 @@
|
||||
|
||||
/obj/machinery/chem_master/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_ghost(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "disposal_bin.tmpl", "Waste Disposal Unit", 375, 250)
|
||||
ui = new(user, src, ui_key, "disposal_bin.tmpl", "Waste Disposal Unit", 395, 250)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
if(..(user))
|
||||
return
|
||||
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied."
|
||||
if(!allowed(user) && !isobserver(user))
|
||||
user << "<span class='warning'>Access Denied.</span>"
|
||||
return 1
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
@@ -56,8 +56,8 @@
|
||||
if(..(user))
|
||||
return 1
|
||||
|
||||
if(!allowed(user))
|
||||
user << "\red Access Denied."
|
||||
if(!allowed(user) && !isobserver(user))
|
||||
user << "<span class='warning'>Access Denied.</span>"
|
||||
return 1
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
@@ -22,7 +22,7 @@ var/global/datum/store/centcomm_store=new
|
||||
var/list/datum/storeitem/items=list()
|
||||
var/list/datum/storeorder/orders=list()
|
||||
|
||||
var/obj/machinery/account_database/linked_db
|
||||
var/obj/machinery/computer/account_database/linked_db
|
||||
|
||||
/datum/store/New()
|
||||
for(var/itempath in subtypesof(/datum/storeitem))
|
||||
@@ -47,7 +47,7 @@ var/global/datum/store/centcomm_store=new
|
||||
return 1
|
||||
|
||||
/datum/store/proc/reconnect_database()
|
||||
for(var/obj/machinery/account_database/DB in world)
|
||||
for(var/obj/machinery/computer/account_database/DB in world)
|
||||
if((DB.z in config.station_levels))
|
||||
linked_db = DB
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user