Bluespace artillery computer update, accounts database computer update, ghost machinery interaction update

This commit is contained in:
Markolie
2015-08-14 06:26:40 +02:00
parent eea1921897
commit 5e95ae82b4
23 changed files with 228 additions and 175 deletions
+13 -4
View File
@@ -190,8 +190,8 @@ var/bomb_set
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
@@ -208,7 +208,7 @@ var/bomb_set
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"] = "*****"
@@ -233,6 +233,7 @@ var/bomb_set
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"
@@ -250,6 +251,14 @@ var/bomb_set
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 1
@@ -307,7 +316,7 @@ var/bomb_set
usr.drop_item()
I.loc = src
src.auth = I
if (src.auth)
if (is_auth(usr))
if (href_list["type"])
if (href_list["type"] == "E")
if (src.code == src.r_code)
+19 -7
View File
@@ -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,11 +825,23 @@
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))
return 0
else
return locked
/obj/machinery/alarm/proc/is_auth_rcon(href_list)
if(href_list["remote_connection"] && href_list["remote_access"])
return 1
+15 -11
View File
@@ -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)
+4 -1
View File
@@ -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))
+54 -54
View File
@@ -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)*/
+2 -2
View File
@@ -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
+4 -4
View File
@@ -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
+56 -50
View File
@@ -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"])
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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)
+16 -22
View File
@@ -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(isAI(user) || isrobot(user))
if(isobserver(user) && check_rights(R_ADMIN, 0, user))
return 1
if(isAI(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))
return 0
else
return locked
/obj/machinery/power/apc/Topic(href, href_list, var/usingUI = 1)
if(..())
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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)
+2 -2
View File
@@ -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)
+2 -2
View File
@@ -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