mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into pr/Kyep/14200
This commit is contained in:
@@ -624,11 +624,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/beepsound = input(usr, "What sound should the announcement make?", "Announcement Sound", "") as anything in MsgSound
|
||||
|
||||
GLOB.command_announcement.Announce(input, customname, MsgSound[beepsound], , , type)
|
||||
print_command_report(input, "[command_name()] Update")
|
||||
print_command_report(input, customname)
|
||||
if("No")
|
||||
//same thing as the blob stuff - it's not public, so it's classified, dammit
|
||||
GLOB.command_announcer.autosay("A classified message has been printed out at all communication consoles.")
|
||||
print_command_report(input, "Classified [command_name()] Update")
|
||||
print_command_report(input, "Classified: [customname]")
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
var/death = TRUE //Kill the mob
|
||||
var/roundstart = TRUE //fires on initialize
|
||||
var/instant = FALSE //fires on New
|
||||
var/flavour_text = "The mapper forgot to set this!"
|
||||
var/flavour_text = "" //flavour/fluff about the role, optional.
|
||||
var/description = "A description for this has not been set. This is either an oversight or an admin-spawned spawner not in normal use." //intended as OOC info about the role
|
||||
var/important_info = "" //important info such as rules that apply to you, etc. Optional.
|
||||
var/faction = null
|
||||
var/permanent = FALSE //If true, the spawner will not disappear upon running out of uses.
|
||||
var/random = FALSE //Don't set a name or gender, just go random
|
||||
@@ -336,7 +338,7 @@
|
||||
name = "sleeper"
|
||||
icon = 'icons/obj/cryogenic2.dmi'
|
||||
icon_state = "sleeper"
|
||||
flavour_text = "<span class='big bold'>You are a space doctor!</span>"
|
||||
flavour_text = "You are a space doctor!"
|
||||
assignedrole = "Space Doctor"
|
||||
|
||||
/obj/effect/mob_spawn/human/doctor/alive/equip(mob/living/carbon/human/H)
|
||||
@@ -470,11 +472,14 @@
|
||||
name = "bartender sleeper"
|
||||
icon = 'icons/obj/cryogenic2.dmi'
|
||||
icon_state = "sleeper"
|
||||
flavour_text = "<span class='big bold'>You are a space bartender!</span><b> Time to mix drinks and change lives.</b>"
|
||||
description = "Stuck on Lavaland, you could try getting back to civilisation...or serve drinks to those that wander by."
|
||||
flavour_text = "You are a space bartender! Time to mix drinks and change lives. Wait, where did your bar just get transported to?"
|
||||
assignedrole = "Space Bartender"
|
||||
|
||||
/obj/effect/mob_spawn/human/beach/alive/lifeguard
|
||||
flavour_text = "<span class='big bold'>You're a spunky lifeguard!</span><b> It's up to you to make sure nobody drowns or gets eaten by sharks and stuff.</b>"
|
||||
flavour_text = "You're a spunky lifeguard! It's up to you to make sure nobody drowns or gets eaten by sharks and stuff. Then suddenly your entire beach was transported to this strange hell.\
|
||||
You aren't trained for this, but you'll still keep your guests alive!"
|
||||
description = "Try to survive on lavaland with the pitiful equipment of a lifeguard. Or hide in your biodome."
|
||||
mob_gender = "female"
|
||||
name = "lifeguard sleeper"
|
||||
id_job = "Lifeguard"
|
||||
@@ -502,7 +507,8 @@
|
||||
name = "beach bum sleeper"
|
||||
icon = 'icons/obj/cryogenic2.dmi'
|
||||
icon_state = "sleeper"
|
||||
flavour_text = "You are a beach bum!"
|
||||
flavour_text = "You are a beach bum! You think something just happened to the beach but you don't really pay too much attention."
|
||||
description = "Try to survive on lavaland or just enjoy the beach, waiting for visitors."
|
||||
assignedrole = "Beach Bum"
|
||||
|
||||
/datum/outfit/beachbum
|
||||
@@ -523,6 +529,7 @@
|
||||
roundstart = FALSE
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "remains"
|
||||
description = "Be a spooky scary skeleton." //not mapped in anywhere so admin spawner, who knows what they'll use this for.
|
||||
flavour_text = "By unknown powers, your skeletal remains have been reanimated! Walk this mortal plain and terrorize all living adventurers who dare cross your path."
|
||||
assignedrole = "Skeleton"
|
||||
|
||||
|
||||
@@ -64,9 +64,11 @@
|
||||
var/has_owner = FALSE
|
||||
var/can_transfer = TRUE //if golems can switch bodies to this new shell
|
||||
var/mob/living/owner = null //golem's owner if it has one
|
||||
flavour_text = "<span class='big bold'>You are a Free Golem.</span><b> Your family worships <span class='danger'>The Liberator</span>. In his infinite and divine wisdom, he set your clan free to \
|
||||
important_info = "You are not an antag. Do not mess with the station or create AIs."
|
||||
description = "As a Free Golem on lavaland, you are unable to use most weapons, but you can mine, research and make more of your kind. Earn enough mining points and you can even move your shuttle out of there."
|
||||
flavour_text = "You are a Free Golem. Your family worships The Liberator. In his infinite and divine wisdom, he set your clan free to \
|
||||
travel the stars with a single declaration: \"Yeah go do whatever.\" Though you are bound to the one who created you, it is customary in your society to repeat those same words to newborn \
|
||||
golems, so that no golem may ever be forced to serve again.</b>"
|
||||
golems, so that no golem may ever be forced to serve again."
|
||||
|
||||
/obj/effect/mob_spawn/human/golem/Initialize(mapload, datum/species/golem/species = null, mob/creator = null)
|
||||
if(species) //spawners list uses object name to register so this goes before ..()
|
||||
@@ -77,8 +79,10 @@
|
||||
if(!mapload && A)
|
||||
notify_ghosts("\A [initial(species.prefix)] golem shell has been completed in [A.name].", source = src)
|
||||
if(has_owner && creator)
|
||||
flavour_text = "<span class='big bold'>You are a Golem.</span><b> You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. \
|
||||
Serve [creator], and assist [creator.p_them()] in completing [creator.p_their()] goals at any cost.</b>"
|
||||
important_info = "Serve your creator, even if they are an antag."
|
||||
flavour_text = "You are a golem created to serve your creator."
|
||||
description = "You are a Golem. You move slowly, but are highly resistant to heat and cold as well as blunt trauma. You are unable to wear clothes, but can still use most tools. \
|
||||
Serve [creator], and assist [creator.p_them()] in completing [creator.p_their()] goals at any cost."
|
||||
owner = creator
|
||||
|
||||
/obj/effect/mob_spawn/human/golem/special(mob/living/new_spawn, name)
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
flavour_text = "<span class='big bold'>You are a security officer working for Nanotrasen,</span><b> stationed onboard a state of the art research station. You vaguely recall rushing into a \
|
||||
description = "Work as a team with your fellow survivors aboard a ruined, ancient space station."
|
||||
important_info = ""
|
||||
flavour_text = "You are a security officer working for Nanotrasen, stationed onboard a state of the art research station. You vaguely recall rushing into a \
|
||||
cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artificial Program telling you that you would only be asleep for eight hours. As you open \
|
||||
your eyes, everything seems rusted and broken, a dark feeling swells in your gut as you climb out of your pod. \
|
||||
Work as a team with your fellow survivors and do not abandon them.</b>"
|
||||
your eyes, everything seems rusted and broken, a dark feeling swells in your gut as you climb out of your pod."
|
||||
uniform = /obj/item/clothing/under/retro/security
|
||||
shoes = /obj/item/clothing/shoes/jackboots
|
||||
id = /obj/item/card/id/away/old/sec
|
||||
@@ -35,10 +36,11 @@
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
flavour_text = "<span class='big bold'>You are a medical working for Nanotrasen,</span><b> stationed onboard a state of the art research station. You vaguely recall rushing into a \
|
||||
description = "Work as a team with your fellow survivors aboard a ruined, ancient space station."
|
||||
important_info = ""
|
||||
flavour_text = "You are a medical doctor working for Nanotrasen, stationed onboard a state of the art research station. You vaguely recall rushing into a \
|
||||
cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artificial Program telling you that you would only be asleep for eight hours. As you open \
|
||||
your eyes, everything seems rusted and broken, a dark feeling swells in your gut as you climb out of your pod. \
|
||||
Work as a team with your fellow survivors and do not abandon them.</b>"
|
||||
your eyes, everything seems rusted and broken, a dark feeling swells in your gut as you climb out of your pod."
|
||||
uniform = /obj/item/clothing/under/retro/medical
|
||||
shoes = /obj/item/clothing/shoes/black
|
||||
id = /obj/item/card/id/away/old/med
|
||||
@@ -60,10 +62,11 @@
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
flavour_text = "<span class='big bold'>You are an engineer working for Nanotrasen,</span><b> stationed onboard a state of the art research station. You vaguely recall rushing into a \
|
||||
description = "Work as a team with your fellow survivors aboard a ruined, ancient space station."
|
||||
important_info = ""
|
||||
flavour_text = "You are an engineer working for Nanotrasen, stationed onboard a state of the art research station. You vaguely recall rushing into a \
|
||||
cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artificial Program telling you that you would only be asleep for eight hours. As you open \
|
||||
your eyes, everything seems rusted and broken, a dark feeling swells in your gut as you climb out of your pod. \
|
||||
Work as a team with your fellow survivors and do not abandon them.</b>"
|
||||
your eyes, everything seems rusted and broken, a dark feeling swells in your gut as you climb out of your pod."
|
||||
uniform = /obj/item/clothing/under/retro/engineering
|
||||
shoes = /obj/item/clothing/shoes/workboots
|
||||
id = /obj/item/card/id/away/old/eng
|
||||
@@ -85,10 +88,11 @@
|
||||
death = FALSE
|
||||
random = TRUE
|
||||
mob_species = /datum/species/human
|
||||
flavour_text = "<span class='big bold'>You are a scientist working for Nanotrasen,</span><b> stationed onboard a state of the art research station. You vaguely recall rushing into a \
|
||||
description = "Work as a team with your fellow survivors aboard a ruined, ancient space station."
|
||||
important_info = ""
|
||||
flavour_text = "You are a scientist working for Nanotrasen, stationed onboard a state of the art research station. You vaguely recall rushing into a \
|
||||
cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artificial Program telling you that you would only be asleep for eight hours. As you open \
|
||||
your eyes, everything seems rusted and broken, a dark feeling swells in your gut as you climb out of your pod. \
|
||||
Work as a team with your fellow survivors and do not abandon them.</b>"
|
||||
your eyes, everything seems rusted and broken, a dark feeling swells in your gut as you climb out of your pod."
|
||||
uniform = /obj/item/clothing/under/retro/science
|
||||
shoes = /obj/item/clothing/shoes/laceup
|
||||
id = /obj/item/card/id/away/old/sci
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
SA.health = SA.maxHealth
|
||||
SA.del_on_death = FALSE
|
||||
greet_sentient(SA)
|
||||
print_command_report(sentience_report, "[command_name()] Update")
|
||||
print_command_report(sentience_report, "[command_name()] Update", FALSE)
|
||||
processing = TRUE // Let it naturally end, if it runs successfully
|
||||
|
||||
/datum/event/sentience/proc/greet_sentient(var/mob/living/carbon/human/M)
|
||||
|
||||
@@ -13,15 +13,3 @@
|
||||
possible_destinations = "laborcamp_away"
|
||||
circuit = /obj/item/circuitboard/labor_shuttle/one_way
|
||||
req_access = list( )
|
||||
|
||||
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
|
||||
if(!M)
|
||||
to_chat(usr, "<span class='warning'>Cannot locate shuttle!</span>")
|
||||
return 0
|
||||
var/obj/docking_port/stationary/S = M.get_docked()
|
||||
if(S && S.name == "laborcamp_away")
|
||||
to_chat(usr, "<span class='warning'>Shuttle is already at the outpost!</span>")
|
||||
return 0
|
||||
..()
|
||||
|
||||
@@ -780,4 +780,4 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
|
||||
var/datum/spawners_menu/menu = new /datum/spawners_menu(src)
|
||||
menu.ui_interact(src)
|
||||
menu.tgui_interact(src)
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = cpu.all_components[MC_HDD]
|
||||
hard_drive.store_file(new/datum/computer_file/program/chatclient())
|
||||
hard_drive.store_file(new/datum/computer_file/program/card_mod())
|
||||
hard_drive.store_file(new/datum/computer_file/program/comm())
|
||||
|
||||
// ===== CIVILIAN CONSOLE =====
|
||||
/obj/machinery/modular_computer/console/preset/civilian
|
||||
|
||||
@@ -1,385 +0,0 @@
|
||||
/datum/computer_file/program/comm
|
||||
filename = "comm"
|
||||
filedesc = "Command and communications"
|
||||
program_icon_state = "comm"
|
||||
extended_desc = "Used to command and control the station. Can relay long-range communications. This program can not be run on tablet computers."
|
||||
required_access = ACCESS_HEADS
|
||||
requires_ntnet = 1
|
||||
size = 12
|
||||
usage_flags = PROGRAM_CONSOLE | PROGRAM_LAPTOP
|
||||
network_destination = "station long-range communication array"
|
||||
|
||||
var/authenticated = COMM_AUTHENTICATION_NONE
|
||||
var/list/messagetitle = list()
|
||||
var/list/messagetext = list()
|
||||
var/currmsg = 0
|
||||
var/aicurrmsg = 0
|
||||
var/menu_state = COMM_SCREEN_MAIN
|
||||
var/ai_menu_state = COMM_SCREEN_MAIN
|
||||
var/message_cooldown = 0
|
||||
var/centcomm_message_cooldown = 0
|
||||
var/tmp_alertlevel = 0
|
||||
|
||||
var/stat_msg1
|
||||
var/stat_msg2
|
||||
var/display_type="blank"
|
||||
|
||||
var/datum/announcement/priority/crew_announcement = new
|
||||
|
||||
/datum/computer_file/program/comm/New()
|
||||
GLOB.shuttle_caller_list += src
|
||||
..()
|
||||
crew_announcement.newscast = 0
|
||||
|
||||
/datum/computer_file/program/comm/Destroy()
|
||||
GLOB.shuttle_caller_list -= src
|
||||
SSshuttle.autoEvac()
|
||||
return ..()
|
||||
|
||||
/datum/computer_file/program/comm/proc/is_authenticated(mob/user, loud = 1)
|
||||
if(authenticated == COMM_AUTHENTICATION_MAX)
|
||||
return COMM_AUTHENTICATION_MAX
|
||||
else if(user.can_admin_interact())
|
||||
return COMM_AUTHENTICATION_MAX
|
||||
else if(authenticated)
|
||||
return COMM_AUTHENTICATION_MIN
|
||||
else
|
||||
if(loud)
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
return COMM_AUTHENTICATION_NONE
|
||||
|
||||
/datum/computer_file/program/comm/proc/change_security_level(mob/user, new_level)
|
||||
tmp_alertlevel = new_level
|
||||
var/old_level = GLOB.security_level
|
||||
if(!tmp_alertlevel)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel < SEC_LEVEL_GREEN)
|
||||
tmp_alertlevel = SEC_LEVEL_GREEN
|
||||
if(tmp_alertlevel > SEC_LEVEL_BLUE)
|
||||
tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
|
||||
set_security_level(tmp_alertlevel)
|
||||
if(GLOB.security_level != old_level)
|
||||
log_game("[key_name(user)] has changed the security level to [get_security_level()].")
|
||||
message_admins("[key_name_admin(user)] has changed the security level to [get_security_level()].")
|
||||
switch(GLOB.security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
feedback_inc("alert_comms_green", 1)
|
||||
if(SEC_LEVEL_BLUE)
|
||||
feedback_inc("alert_comms_blue", 1)
|
||||
tmp_alertlevel = 0
|
||||
|
||||
/datum/computer_file/program/comm/proc/setCurrentMessage(mob/user, value)
|
||||
if(isAI(user) || isrobot(user))
|
||||
aicurrmsg = value
|
||||
else
|
||||
currmsg = value
|
||||
|
||||
/datum/computer_file/program/comm/proc/getCurrentMessage(mob/user)
|
||||
if(isAI(user) || isrobot(user))
|
||||
return aicurrmsg
|
||||
else
|
||||
return currmsg
|
||||
|
||||
/datum/computer_file/program/comm/proc/setMenuState(mob/user, value)
|
||||
if(isAI(user) || isrobot(user))
|
||||
ai_menu_state=value
|
||||
else
|
||||
menu_state=value
|
||||
|
||||
/datum/computer_file/program/comm/proc/getMenuState(mob/user)
|
||||
if(isAI(user) || isrobot(user))
|
||||
return ai_menu_state
|
||||
else
|
||||
return menu_state
|
||||
|
||||
/datum/computer_file/program/comm/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui)
|
||||
if(!ui)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/headers)
|
||||
assets.send(user)
|
||||
ui = new(user, src, ui_key, "comm_program.tmpl", "Command and communications program", 575, 500)
|
||||
ui.set_layout_key("program")
|
||||
ui.open()
|
||||
|
||||
/datum/computer_file/program/comm/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
|
||||
var/list/data = get_header_data()
|
||||
data["is_ai"] = isAI(user) || isrobot(user)
|
||||
data["menu_state"] = data["is_ai"] ? ai_menu_state : menu_state
|
||||
data["emagged"] = computer ? computer.emagged : null
|
||||
data["authenticated"] = is_authenticated(user, 0)
|
||||
data["screen"] = getMenuState(usr)
|
||||
|
||||
data["stat_display"] = list(
|
||||
"type" = display_type,
|
||||
"line_1" = (stat_msg1 ? stat_msg1 : "-----"),
|
||||
"line_2" = (stat_msg2 ? stat_msg2 : "-----"),
|
||||
|
||||
"presets" = list(
|
||||
list("name" = "blank", "label" = "Clear", "desc" = "Blank slate"),
|
||||
list("name" = "shuttle", "label" = "Shuttle ETA", "desc" = "Display how much time is left."),
|
||||
list("name" = "message", "label" = "Message", "desc" = "A custom message.")
|
||||
),
|
||||
|
||||
"alerts"=list(
|
||||
list("alert" = "default", "label" = "Nanotrasen", "desc" = "Oh god."),
|
||||
list("alert" = "redalert", "label" = "Red Alert", "desc" = "Nothing to do with communists."),
|
||||
list("alert" = "lockdown", "label" = "Lockdown", "desc" = "Let everyone know they're on lockdown."),
|
||||
list("alert" = "biohazard", "label" = "Biohazard", "desc" = "Great for virus outbreaks and parties."),
|
||||
)
|
||||
)
|
||||
|
||||
data["security_level"] = GLOB.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"),
|
||||
)
|
||||
|
||||
var/list/msg_data = list()
|
||||
for(var/i = 1; i <= messagetext.len; i++)
|
||||
msg_data.Add(list(list("title" = messagetitle[i], "body" = messagetext[i], "id" = i)))
|
||||
|
||||
data["messages"] = msg_data
|
||||
if((data["is_ai"] && aicurrmsg) || (!data["is_ai"] && currmsg))
|
||||
data["current_message"] = data["is_ai"] ? messagetext[aicurrmsg] : messagetext[currmsg]
|
||||
data["current_message_title"] = data["is_ai"] ? messagetitle[aicurrmsg] : messagetitle[currmsg]
|
||||
|
||||
data["lastCallLoc"] = SSshuttle.emergencyLastCallLoc ? format_text(SSshuttle.emergencyLastCallLoc.name) : null
|
||||
|
||||
var/shuttle[0]
|
||||
switch(SSshuttle.emergency.mode)
|
||||
if(SHUTTLE_IDLE, SHUTTLE_RECALL)
|
||||
shuttle["callStatus"] = 2 //#define
|
||||
else
|
||||
shuttle["callStatus"] = 1
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
|
||||
var/timeleft = SSshuttle.emergency.timeLeft()
|
||||
shuttle["eta"] = "[timeleft / 60 % 60]:[add_zero(num2text(timeleft % 60), 2)]"
|
||||
|
||||
data["shuttle"] = shuttle
|
||||
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/comm/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
var/turf/T = get_turf(computer)
|
||||
if(!is_secure_level(T.z))
|
||||
to_chat(usr, "<span class='warning'>Unable to establish a connection: You're too far away from the station!</span>")
|
||||
return 1
|
||||
|
||||
if(href_list["PRG_login"])
|
||||
if(!ishuman(usr))
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
|
||||
var/list/access = usr.get_access()
|
||||
if(ACCESS_HEADS in access)
|
||||
authenticated = COMM_AUTHENTICATION_MIN
|
||||
|
||||
if(ACCESS_CAPTAIN in access)
|
||||
authenticated = COMM_AUTHENTICATION_MAX
|
||||
var/mob/living/carbon/human/H = usr
|
||||
var/obj/item/card/id = H.get_idcard(TRUE)
|
||||
if(istype(id))
|
||||
crew_announcement.announcer = GetNameAndAssignmentFromId(id)
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
|
||||
if(href_list["PRG_logout"])
|
||||
authenticated = COMM_AUTHENTICATION_NONE
|
||||
crew_announcement.announcer = ""
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
|
||||
if(is_authenticated(usr))
|
||||
switch(href_list["PRG_operation"])
|
||||
if("main")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
|
||||
if("changeseclevel")
|
||||
setMenuState(usr,COMM_SCREEN_SECLEVEL)
|
||||
|
||||
if("newalertlevel")
|
||||
if(isAI(usr) || isrobot(usr))
|
||||
to_chat(usr, "<span class='warning'>Firewalls prevent you from changing the alert level.</span>")
|
||||
return 1
|
||||
else if(usr.can_admin_interact())
|
||||
change_security_level(usr, text2num(href_list["level"]))
|
||||
return 1
|
||||
else if(!ishuman(usr))
|
||||
to_chat(usr, "<span class='warning'>Security measures prevent you from changing the alert level.</span>")
|
||||
return 1
|
||||
|
||||
var/mob/living/carbon/human/L = usr
|
||||
var/obj/item/card = L.get_active_hand()
|
||||
var/obj/item/card/id/I = (card && card.GetID()) || L.wear_id || L.wear_pda
|
||||
if(istype(I, /obj/item/pda))
|
||||
var/obj/item/pda/pda = I
|
||||
I = pda.id
|
||||
if(I && istype(I))
|
||||
if(ACCESS_CAPTAIN in I.access)
|
||||
change_security_level(usr, text2num(href_list["level"]))
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You are not authorized to do this.</span>")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>You need to swipe your ID.</span>")
|
||||
|
||||
if("announce")
|
||||
if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)
|
||||
if(message_cooldown)
|
||||
to_chat(usr, "<span class='warning'>Please allow at least one minute to pass between announcements.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
var/input = input(usr, "Please write a message to announce to the station crew.", "Priority Announcement")
|
||||
if(!input || message_cooldown || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
crew_announcement.Announce(input)
|
||||
message_cooldown = 1
|
||||
spawn(600)//One minute cooldown
|
||||
message_cooldown = 0
|
||||
|
||||
if("callshuttle")
|
||||
var/input = clean_input("Please enter the reason for calling the shuttle.", "Shuttle Call Reason.","")
|
||||
if(!input || ..() || !is_authenticated(usr))
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
|
||||
call_shuttle_proc(usr, input)
|
||||
if(SSshuttle.emergency.timer)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
|
||||
if("cancelshuttle")
|
||||
if(isAI(usr) || isrobot(usr))
|
||||
to_chat(usr, "<span class='warning'>Firewalls prevent you from recalling the shuttle.</span>")
|
||||
SSnanoui.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(SSshuttle.emergency.timer)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
|
||||
if("messagelist")
|
||||
currmsg = 0
|
||||
if(href_list["msgid"])
|
||||
setCurrentMessage(usr, text2num(href_list["msgid"]))
|
||||
setMenuState(usr,COMM_SCREEN_MESSAGES)
|
||||
|
||||
if("delmessage")
|
||||
if(href_list["msgid"])
|
||||
currmsg = text2num(href_list["msgid"])
|
||||
var/response = alert("Are you sure you wish to delete this message?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
if(currmsg)
|
||||
var/id = getCurrentMessage()
|
||||
var/title = messagetitle[id]
|
||||
var/text = messagetext[id]
|
||||
messagetitle.Remove(title)
|
||||
messagetext.Remove(text)
|
||||
if(currmsg == id)
|
||||
currmsg = 0
|
||||
if(aicurrmsg == id)
|
||||
aicurrmsg = 0
|
||||
setMenuState(usr,COMM_SCREEN_MESSAGES)
|
||||
|
||||
if("status")
|
||||
setMenuState(usr,COMM_SCREEN_STAT)
|
||||
|
||||
// Status display stuff
|
||||
if("setstat")
|
||||
display_type=href_list["statdisp"]
|
||||
switch(display_type)
|
||||
if("message")
|
||||
post_status("message", stat_msg1, stat_msg2, usr)
|
||||
if("alert")
|
||||
post_status("alert", href_list["alert"], user = usr)
|
||||
else
|
||||
post_status(href_list["statdisp"], user = usr)
|
||||
setMenuState(usr, COMM_SCREEN_STAT)
|
||||
|
||||
if("setmsg1")
|
||||
stat_msg1 = clean_input("Line 1", "Enter Message Text", stat_msg1)
|
||||
setMenuState(usr, COMM_SCREEN_STAT)
|
||||
|
||||
if("setmsg2")
|
||||
stat_msg2 = clean_input("Line 2", "Enter Message Text", stat_msg2)
|
||||
setMenuState(usr, COMM_SCREEN_STAT)
|
||||
|
||||
if("nukerequest")
|
||||
if(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)
|
||||
if(centcomm_message_cooldown)
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
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.","")
|
||||
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
Nuke_request(input, usr)
|
||||
to_chat(usr, "<span class='notice'>Request sent.</span>")
|
||||
log_game("[key_name(usr)] has requested the nuclear codes from Centcomm")
|
||||
GLOB.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) == COMM_AUTHENTICATION_MAX)
|
||||
if(centcomm_message_cooldown)
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
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.", "")
|
||||
if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
Centcomm_announce(input, usr)
|
||||
to_chat(usr, "Message transmitted.")
|
||||
log_game("[key_name(usr)] has made a Centcomm announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
// OMG SYNDICATE ...LETTERHEAD
|
||||
if("MessageSyndicate")
|
||||
if((is_authenticated(usr) == COMM_AUTHENTICATION_MAX) && (computer && computer.emagged))
|
||||
if(centcomm_message_cooldown)
|
||||
to_chat(usr, "Arrays recycling. Please stand by.")
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
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 || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX))
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
Syndicate_announce(input, usr)
|
||||
to_chat(usr, "Message transmitted.")
|
||||
log_game("[key_name(usr)] has made a Syndicate announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
spawn(6000)//10 minute cooldown
|
||||
centcomm_message_cooldown = 0
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("RestartNanoMob")
|
||||
if(SSmob_hunt)
|
||||
if(SSmob_hunt.manual_reboot())
|
||||
var/loading_msg = pick("Respawning spawns", "Reticulating splines", "Flipping hat",
|
||||
"Capturing all of them", "Fixing minor text issues", "Being the very best",
|
||||
"Nerfing this", "Not communicating with playerbase", "Coding a ripoff in a 2D spaceman game")
|
||||
to_chat(usr, "<span class='notice'>Restarting Nano-Mob Hunter GO! game server. [loading_msg]...</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Nano-Mob Hunter GO! game server reboot failed due to recent restart. Please wait before re-attempting.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>Nano-Mob Hunter GO! game server is offline for extended maintenance. Contact your Central Command administrators for more info if desired.</span>")
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
return 1
|
||||
@@ -1,105 +0,0 @@
|
||||
/datum/nano_module/ert_manager
|
||||
name = "ERT Manager"
|
||||
var/ert_type = "Code Red"
|
||||
var/commander_slots = 1
|
||||
var/security_slots = 3
|
||||
var/medical_slots = 3
|
||||
var/engineering_slots = 3
|
||||
var/janitor_slots = 0
|
||||
var/paranormal_slots = 0
|
||||
var/cyborg_slots = 0
|
||||
var/autoclose = 0
|
||||
|
||||
|
||||
/datum/nano_module/ert_manager/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = GLOB.admin_state)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(ui && autoclose)
|
||||
ui.close()
|
||||
return 0
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "ert_config.tmpl", "ERT Panel", 600, 600, state = state)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/datum/nano_module/ert_manager/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(href_list["set_code"])
|
||||
ert_type = href_list["set_code"]
|
||||
|
||||
if(href_list["set_com"])
|
||||
commander_slots = text2num(href_list["set_com"])
|
||||
|
||||
if(href_list["set_sec"])
|
||||
security_slots = text2num(href_list["set_sec"])
|
||||
|
||||
if(href_list["set_med"])
|
||||
medical_slots = text2num(href_list["set_med"])
|
||||
|
||||
if(href_list["set_eng"])
|
||||
engineering_slots = text2num(href_list["set_eng"])
|
||||
|
||||
if(href_list["set_jan"])
|
||||
janitor_slots = text2num(href_list["set_jan"])
|
||||
|
||||
if(href_list["set_par"])
|
||||
paranormal_slots = text2num(href_list["set_par"])
|
||||
|
||||
if(href_list["set_cyb"])
|
||||
cyborg_slots = text2num(href_list["set_cyb"])
|
||||
|
||||
if(href_list["dispatch_ert"])
|
||||
GLOB.ert_request_answered = TRUE
|
||||
var/slots_list = list()
|
||||
if(commander_slots > 0)
|
||||
slots_list += "commander: [commander_slots]"
|
||||
if(security_slots > 0)
|
||||
slots_list += "security: [security_slots]"
|
||||
if(medical_slots > 0)
|
||||
slots_list += "medical: [medical_slots]"
|
||||
if(engineering_slots > 0)
|
||||
slots_list += "engineering: [engineering_slots]"
|
||||
if(janitor_slots > 0)
|
||||
slots_list += "janitor: [janitor_slots]"
|
||||
if(paranormal_slots > 0)
|
||||
slots_list += "paranormal: [paranormal_slots]"
|
||||
if(cyborg_slots > 0)
|
||||
slots_list += "cyborg: [cyborg_slots]"
|
||||
var/slot_text = jointext(slots_list, ", ")
|
||||
notify_ghosts("An ERT is being dispatched. Open positions: [slot_text]")
|
||||
message_admins("[key_name_admin(usr)] dispatched a [ert_type] ERT. Slots: [slot_text]", 1)
|
||||
log_admin("[key_name(usr)] dispatched a [ert_type] ERT. Slots: [slot_text]")
|
||||
GLOB.event_announcement.Announce("Attention, [station_name()]. We are attempting to assemble an ERT. Standby.", "ERT Protocol Activated")
|
||||
autoclose = 1
|
||||
ui_interact(usr)
|
||||
trigger_armed_response_team(convert_ert_string(ert_type), commander_slots, security_slots, medical_slots, engineering_slots, janitor_slots, paranormal_slots, cyborg_slots)
|
||||
return 0
|
||||
|
||||
ui_interact(usr)
|
||||
|
||||
|
||||
/proc/convert_ert_string(thestring)
|
||||
switch(thestring)
|
||||
if("Code Amber")
|
||||
return new /datum/response_team/amber
|
||||
if("Code Red")
|
||||
return new /datum/response_team/red
|
||||
if("Code Gamma")
|
||||
return new /datum/response_team/gamma
|
||||
|
||||
|
||||
/datum/nano_module/ert_manager/ui_data()
|
||||
var/data[0]
|
||||
data["alert_level"] = get_security_level()
|
||||
data["ert_type"] = ert_type
|
||||
data["com"] = commander_slots
|
||||
data["sec"] = security_slots
|
||||
data["med"] = medical_slots
|
||||
data["eng"] = engineering_slots
|
||||
data["jan"] = janitor_slots
|
||||
data["par"] = paranormal_slots
|
||||
data["cyb"] = cyborg_slots
|
||||
|
||||
return data
|
||||
|
||||
@@ -12,24 +12,32 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
insert_anim = "faxsend"
|
||||
pass_flags = PASSTABLE
|
||||
var/fax_network = "Local Fax Network"
|
||||
var/syndie_restricted = FALSE //is it a syndicate base fax restricted from contacting NT assets?
|
||||
/// If true, prevents fax machine from sending messages to NT machines
|
||||
var/syndie_restricted = FALSE
|
||||
|
||||
var/long_range_enabled = 0 // Can we send messages off the station?
|
||||
/// Can we send messages off-station?
|
||||
var/long_range_enabled = FALSE
|
||||
req_one_access = list(ACCESS_LAWYER, ACCESS_HEADS, ACCESS_ARMORY)
|
||||
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 30
|
||||
active_power_usage = 200
|
||||
|
||||
var/obj/item/card/id/scan = null // identification
|
||||
/// ID card inserted into the machine, used to log in with
|
||||
var/obj/item/card/id/scan = null
|
||||
|
||||
var/authenticated = 0
|
||||
var/sendcooldown = 0 // to avoid spamming fax messages
|
||||
/// Whether the machine is "logged in" or not
|
||||
var/authenticated = FALSE
|
||||
/// Next world.time at which this fax machine can send a message to CC/syndicate
|
||||
var/sendcooldown = 0
|
||||
/// After sending a message to CC/syndicate, cannot send another to them for this many deciseconds
|
||||
var/cooldown_time = 1800
|
||||
|
||||
var/department = "Unknown" // our department
|
||||
/// Our department, determines whether this machine gets faxes sent to a department
|
||||
var/department = "Unknown"
|
||||
|
||||
var/destination = "Not Selected" // the department we're sending to
|
||||
/// Target department to send outgoing faxes to
|
||||
var/destination
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/New()
|
||||
..()
|
||||
@@ -44,7 +52,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
/obj/machinery/photocopier/faxmachine/longrange
|
||||
name = "long range fax machine"
|
||||
fax_network = "Central Command Quantum Entanglement Network"
|
||||
long_range_enabled = 1
|
||||
long_range_enabled = TRUE
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/longrange/syndie
|
||||
name = "syndicate long range fax machine"
|
||||
@@ -58,17 +66,17 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
GLOB.hidden_departments |= department
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/attack_hand(mob/user)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/attackby(obj/item/item, mob/user, params)
|
||||
if(istype(item,/obj/item/card/id) && !scan)
|
||||
scan(item)
|
||||
else if(istype(item, /obj/item/paper) || istype(item, /obj/item/photo) || istype(item, /obj/item/paper_bundle))
|
||||
..()
|
||||
SSnanoui.update_uis(src)
|
||||
SStgui.update_uis(src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -80,42 +88,6 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You swipe the card through [src], but nothing happens.</span>")
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "faxmachine.tmpl", "Fax Machine UI", 540, 450)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
|
||||
var/data[0]
|
||||
var/is_authenticated = is_authenticated(user)
|
||||
|
||||
if(scan)
|
||||
data["scan_name"] = scan.name
|
||||
else
|
||||
data["scan_name"] = "-----"
|
||||
data["authenticated"] = is_authenticated
|
||||
if(!is_authenticated)
|
||||
data["network"] = "Disconnected"
|
||||
else if(!emagged)
|
||||
data["network"] = fax_network
|
||||
else
|
||||
data["network"] = "ERR*?*%!*"
|
||||
if(copyitem)
|
||||
data["paper"] = copyitem.name
|
||||
data["paperinserted"] = 1
|
||||
else
|
||||
data["paper"] = "-----"
|
||||
data["paperinserted"] = 0
|
||||
data["destination"] = destination
|
||||
data["cooldown"] = sendcooldown
|
||||
if((destination in GLOB.admin_departments) || (destination in GLOB.hidden_admin_departments))
|
||||
data["respectcooldown"] = 1
|
||||
else
|
||||
data["respectcooldown"] = 0
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/is_authenticated(mob/user)
|
||||
if(authenticated)
|
||||
return TRUE
|
||||
@@ -123,87 +95,134 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
/obj/machinery/photocopier/faxmachine/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "FaxMachine", name, 540, 300, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["authenticated"] = is_authenticated(user)
|
||||
data["scan_name"] = scan ? scan.name : FALSE
|
||||
if(!data["authenticated"])
|
||||
data["network"] = "Disconnected"
|
||||
else if(!emagged)
|
||||
data["network"] = fax_network
|
||||
else
|
||||
data["network"] = "ERR*?*%!*"
|
||||
data["paper"] = copyitem ? copyitem.name : FALSE
|
||||
data["paperinserted"] = copyitem ? TRUE : FALSE
|
||||
data["destination"] = destination ? destination : FALSE
|
||||
data["sendError"] = FALSE
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
data["sendError"] = "No Power"
|
||||
else if(!data["authenticated"])
|
||||
data["sendError"] = "Not Logged In"
|
||||
else if(!data["paper"])
|
||||
data["sendError"] = "Nothing Inserted"
|
||||
else if(!data["destination"])
|
||||
data["sendError"] = "Destination Not Set"
|
||||
else if((destination in GLOB.admin_departments) || (destination in GLOB.hidden_admin_departments))
|
||||
var/cooldown_seconds = cooldown_seconds()
|
||||
if(cooldown_seconds)
|
||||
data["sendError"] = "Re-aligning in [cooldown_seconds] seconds..."
|
||||
return data
|
||||
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/tgui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
var/is_authenticated = is_authenticated(usr)
|
||||
if(href_list["send"])
|
||||
if(copyitem && is_authenticated)
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("scan") // insert/remove your ID card
|
||||
scan()
|
||||
if("auth") // log in/out
|
||||
if(!is_authenticated && scan)
|
||||
if(scan.registered_name in GLOB.fax_blacklist)
|
||||
to_chat(usr, "<span class='warning'>Login rejected: individual is blacklisted from fax network.</span>")
|
||||
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
. = FALSE
|
||||
else if(check_access(scan))
|
||||
authenticated = TRUE
|
||||
else // ID doesn't have access to this machine
|
||||
to_chat(usr, "<span class='warning'>Login rejected: ID card does not have required access.</span>")
|
||||
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
. = FALSE
|
||||
else if(is_authenticated)
|
||||
authenticated = FALSE
|
||||
if("paper") // insert/eject paper/paperbundle/photo
|
||||
if(copyitem)
|
||||
copyitem.forceMove(get_turf(src))
|
||||
if(ishuman(usr))
|
||||
if(!usr.get_active_hand() && Adjacent(usr))
|
||||
usr.put_in_hands(copyitem)
|
||||
to_chat(usr, "<span class='notice'>You eject [copyitem] from [src].</span>")
|
||||
copyitem = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(istype(I, /obj/item/paper) || istype(I, /obj/item/photo) || istype(I, /obj/item/paper_bundle))
|
||||
usr.drop_item()
|
||||
copyitem = I
|
||||
I.forceMove(src)
|
||||
to_chat(usr, "<span class='notice'>You insert [I] into [src].</span>")
|
||||
flick(insert_anim, src)
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>[src] only accepts paper, paper bundles, and photos.</span>")
|
||||
. = FALSE
|
||||
if("rename") // rename the item that is currently in the fax machine
|
||||
if(copyitem)
|
||||
var/n_name = sanitize(copytext(input(usr, "What would you like to label the fax?", "Fax Labelling", copyitem.name) as text, 1, MAX_MESSAGE_LEN))
|
||||
if((copyitem && copyitem.loc == src && usr.stat == 0))
|
||||
if(istype(copyitem, /obj/item/paper))
|
||||
copyitem.name = "[(n_name ? text("[n_name]") : initial(copyitem.name))]"
|
||||
copyitem.desc = "This is a paper titled '" + copyitem.name + "'."
|
||||
else if(istype(copyitem, /obj/item/photo))
|
||||
copyitem.name = "[(n_name ? text("[n_name]") : "photo")]"
|
||||
else if(istype(copyitem, /obj/item/paper_bundle))
|
||||
copyitem.name = "[(n_name ? text("[n_name]") : "paper")]"
|
||||
else
|
||||
. = FALSE
|
||||
else
|
||||
. = FALSE
|
||||
else
|
||||
. = FALSE
|
||||
if("dept") // choose which department receives the fax
|
||||
if(is_authenticated)
|
||||
var/lastdestination = destination
|
||||
var/list/combineddepartments = GLOB.alldepartments.Copy()
|
||||
if(long_range_enabled)
|
||||
combineddepartments += GLOB.admin_departments.Copy()
|
||||
if(emagged)
|
||||
combineddepartments += GLOB.hidden_admin_departments.Copy()
|
||||
combineddepartments += GLOB.hidden_departments.Copy()
|
||||
if(syndie_restricted)
|
||||
combineddepartments = GLOB.hidden_admin_departments.Copy()
|
||||
combineddepartments += GLOB.hidden_departments.Copy()
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes)
|
||||
if(F.emagged)//we can contact emagged faxes on the station
|
||||
combineddepartments |= F.department
|
||||
destination = input(usr, "To which department?", "Choose a department", "") as null|anything in combineddepartments
|
||||
if(!destination)
|
||||
destination = lastdestination
|
||||
if("send") // actually send the fax
|
||||
if(!copyitem || !is_authenticated || !destination)
|
||||
return
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if((destination in GLOB.admin_departments) || (destination in GLOB.hidden_admin_departments))
|
||||
var/cooldown_seconds = cooldown_seconds()
|
||||
if(cooldown_seconds > 0)
|
||||
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
to_chat(usr, "<span class='warning'>[src] is not ready for another [cooldown_seconds] seconds.</span>")
|
||||
return
|
||||
send_admin_fax(usr, destination)
|
||||
sendcooldown = world.time + cooldown_time
|
||||
else
|
||||
sendfax(destination, usr)
|
||||
|
||||
if(sendcooldown)
|
||||
spawn(sendcooldown) // cooldown time
|
||||
sendcooldown = 0
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
if(href_list["paper"])
|
||||
if(copyitem)
|
||||
copyitem.forceMove(get_turf(src))
|
||||
if(ishuman(usr))
|
||||
if(!usr.get_active_hand() && Adjacent(usr))
|
||||
usr.put_in_hands(copyitem)
|
||||
to_chat(usr, "<span class='notice'>You eject \the [copyitem] from \the [src].</span>")
|
||||
copyitem = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(istype(I, /obj/item/paper) || istype(I, /obj/item/photo) || istype(I, /obj/item/paper_bundle))
|
||||
usr.drop_item()
|
||||
copyitem = I
|
||||
I.forceMove(src)
|
||||
to_chat(usr, "<span class='notice'>You insert \the [I] into \the [src].</span>")
|
||||
flick(insert_anim, src)
|
||||
|
||||
if(href_list["scan"])
|
||||
scan()
|
||||
|
||||
if(href_list["dept"])
|
||||
if(is_authenticated)
|
||||
var/lastdestination = destination
|
||||
var/list/combineddepartments = GLOB.alldepartments.Copy()
|
||||
if(long_range_enabled)
|
||||
combineddepartments += GLOB.admin_departments.Copy()
|
||||
|
||||
if(emagged)
|
||||
combineddepartments += GLOB.hidden_admin_departments.Copy()
|
||||
combineddepartments += GLOB.hidden_departments.Copy()
|
||||
|
||||
if(syndie_restricted)
|
||||
combineddepartments = GLOB.hidden_admin_departments.Copy()
|
||||
combineddepartments += GLOB.hidden_departments.Copy()
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes)
|
||||
if(F.emagged)//we can contact emagged faxes on the station
|
||||
combineddepartments |= F.department
|
||||
|
||||
destination = input(usr, "To which department?", "Choose a department", "") as null|anything in combineddepartments
|
||||
if(!destination)
|
||||
destination = lastdestination
|
||||
|
||||
if(href_list["auth"])
|
||||
if(!is_authenticated && scan)
|
||||
if(scan.registered_name in GLOB.fax_blacklist)
|
||||
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
else if(check_access(scan))
|
||||
authenticated = 1
|
||||
else if(is_authenticated)
|
||||
authenticated = 0
|
||||
|
||||
if(href_list["rename"])
|
||||
if(copyitem)
|
||||
var/n_name = sanitize(copytext(input(usr, "What would you like to label the fax?", "Fax Labelling", copyitem.name) as text, 1, MAX_MESSAGE_LEN))
|
||||
if((copyitem && copyitem.loc == src && usr.stat == 0))
|
||||
if(istype(copyitem, /obj/item/paper))
|
||||
copyitem.name = "[(n_name ? text("[n_name]") : initial(copyitem.name))]"
|
||||
copyitem.desc = "This is a paper titled '" + copyitem.name + "'."
|
||||
else if(istype(copyitem, /obj/item/photo))
|
||||
copyitem.name = "[(n_name ? text("[n_name]") : "photo")]"
|
||||
else if(istype(copyitem, /obj/item/paper_bundle))
|
||||
copyitem.name = "[(n_name ? text("[n_name]") : "paper")]"
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
if(.)
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/scan(var/obj/item/card/id/card = null)
|
||||
if(scan) // Card is in machine
|
||||
@@ -226,7 +245,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
usr.drop_item()
|
||||
card.forceMove(src)
|
||||
scan = card
|
||||
SSnanoui.update_uis(src)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/verb/eject_id()
|
||||
set category = null
|
||||
@@ -237,25 +256,20 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
return
|
||||
|
||||
if(scan)
|
||||
to_chat(usr, "You remove \the [scan] from \the [src].")
|
||||
to_chat(usr, "You remove [scan] from [src].")
|
||||
scan.forceMove(get_turf(src))
|
||||
if(!usr.get_active_hand() && Adjacent(usr))
|
||||
usr.put_in_hands(scan)
|
||||
scan = null
|
||||
else
|
||||
to_chat(usr, "There is nothing to remove from \the [src].")
|
||||
to_chat(usr, "There is nothing to remove from [src].")
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination,var/mob/sender)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
use_power(200)
|
||||
|
||||
use_power(active_power_usage)
|
||||
var/success = 0
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes)
|
||||
if(F.department == destination)
|
||||
success = F.receivefax(copyitem)
|
||||
|
||||
if(success)
|
||||
var/datum/fax/F = new /datum/fax()
|
||||
F.name = copyitem.name
|
||||
@@ -272,10 +286,10 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/receivefax(var/obj/item/incoming)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(department == "Unknown")
|
||||
return 0 //You can't send faxes to "Unknown"
|
||||
return FALSE //You can't send faxes to "Unknown"
|
||||
|
||||
flick("faxreceive", src)
|
||||
|
||||
@@ -291,19 +305,13 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
else if(istype(incoming, /obj/item/paper_bundle))
|
||||
bundlecopy(incoming)
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
use_power(active_power_usage)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/send_admin_fax(var/mob/sender, var/destination)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
if(sendcooldown)
|
||||
return
|
||||
|
||||
use_power(200)
|
||||
use_power(active_power_usage)
|
||||
|
||||
if(!(istype(copyitem, /obj/item/paper) || istype(copyitem, /obj/item/paper_bundle) || istype(copyitem, /obj/item/photo)))
|
||||
visible_message("[src] beeps, \"Error transmitting message.\"")
|
||||
@@ -327,10 +335,12 @@ GLOBAL_LIST_EMPTY(fax_blacklist)
|
||||
for(var/obj/machinery/photocopier/faxmachine/F in GLOB.allfaxes)
|
||||
if(F.department == destination)
|
||||
F.receivefax(copyitem)
|
||||
sendcooldown = cooldown_time
|
||||
spawn(50)
|
||||
visible_message("[src] beeps, \"Message transmitted successfully.\"")
|
||||
visible_message("[src] beeps, \"Message transmitted successfully.\"")
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/cooldown_seconds()
|
||||
if(sendcooldown < world.time)
|
||||
return 0
|
||||
return round((sendcooldown - world.time) / 10)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/faxtype, var/obj/item/sent, font_colour="#9A04D1")
|
||||
var/msg = "<span class='boldnotice'><font color='[font_colour]'>[faxname]: </font> [key_name_admin(sender)] | REPLY: (<A HREF='?_src_=holder;[faxname == "SYNDICATE FAX" ? "SyndicateReply" : "CentcommReply"]=[sender.UID()]'>RADIO</A>) (<a href='?_src_=holder;AdminFaxCreate=\ref[sender];originfax=\ref[src];faxtype=[faxtype];replyto=\ref[sent]'>FAX</a>) ([ADMIN_SM(sender,"SM")]) | REJECT: (<A HREF='?_src_=holder;FaxReplyTemplate=[sender.UID()];originfax=\ref[src]'>TEMPLATE</A>) ([ADMIN_BSA(sender,"BSA")]) (<A HREF='?_src_=holder;EvilFax=[sender.UID()];originfax=\ref[src]'>EVILFAX</A>) </span>: Receiving '[sent.name]' via secure connection... <a href='?_src_=holder;AdminFaxView=\ref[sent]'>view message</a>"
|
||||
|
||||
+76
-72
@@ -227,8 +227,8 @@
|
||||
if(terminal)
|
||||
terminal.master = null
|
||||
terminal = null
|
||||
return 1
|
||||
return 0
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/power/smes/proc/make_terminal(user, tempDir, tempLoc)
|
||||
// create a terminal object at the same position as original turf loc
|
||||
@@ -339,89 +339,91 @@
|
||||
|
||||
/obj/machinery/power/smes/attack_ai(mob/user)
|
||||
add_hiddenprint(user)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/power/smes/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/power/smes/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/power/smes/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
/obj/machinery/power/smes/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "smes.tmpl", "SMES Power Storage Unit", 540, 380)
|
||||
// open the new ui window
|
||||
ui = new(user, src, ui_key, "Smes", name, 340, 350, master_ui, state)
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/power/smes/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
|
||||
var/data[0]
|
||||
|
||||
data["nameTag"] = name_tag
|
||||
data["storedCapacity"] = round(100.0*charge/capacity, 0.1)
|
||||
data["charging"] = inputting
|
||||
data["chargeMode"] = input_attempt
|
||||
data["chargeLevel"] = input_level
|
||||
data["chargeMax"] = input_level_max
|
||||
data["outputOnline"] = output_attempt
|
||||
data["outputLevel"] = output_level
|
||||
data["outputMax"] = output_level_max
|
||||
data["outputLoad"] = round(output_used)
|
||||
|
||||
if(outputting)
|
||||
data["outputting"] = 2 // smes is outputting
|
||||
else if(!outputting && output_attempt)
|
||||
data["outputting"] = 1 // smes is online but not outputting because it's charge level is too low
|
||||
else
|
||||
data["outputting"] = 0 // smes is not outputting
|
||||
|
||||
/obj/machinery/power/smes/tgui_data(mob/user)
|
||||
var/list/data = list(
|
||||
"capacity" = capacity,
|
||||
"capacityPercent" = round(100*charge/capacity, 0.1),
|
||||
"charge" = charge,
|
||||
"inputAttempt" = input_attempt,
|
||||
"inputting" = inputting,
|
||||
"inputLevel" = input_level,
|
||||
"inputLevel_text" = DisplayPower(input_level),
|
||||
"inputLevelMax" = input_level_max,
|
||||
"inputAvailable" = input_available,
|
||||
"outputAttempt" = output_attempt,
|
||||
"outputting" = outputting,
|
||||
"outputLevel" = output_level,
|
||||
"outputLevel_text" = DisplayPower(output_level),
|
||||
"outputLevelMax" = output_level_max,
|
||||
"outputUsed" = round(output_used),
|
||||
)
|
||||
return data
|
||||
|
||||
/obj/machinery/power/smes/Topic(href, href_list)
|
||||
/obj/machinery/power/smes/tgui_act(action, params)
|
||||
if(..())
|
||||
return 1
|
||||
return
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("tryinput")
|
||||
inputting(!input_attempt)
|
||||
update_icon()
|
||||
if("tryoutput")
|
||||
outputting(!output_attempt)
|
||||
update_icon()
|
||||
if("input")
|
||||
var/target = params["target"]
|
||||
var/adjust = text2num(params["adjust"])
|
||||
if(target == "min")
|
||||
target = 0
|
||||
else if(target == "max")
|
||||
target = input_level_max
|
||||
else if(adjust)
|
||||
target = input_level + adjust
|
||||
else if(text2num(target) != null)
|
||||
target = text2num(target)
|
||||
else
|
||||
. = FALSE
|
||||
if(.)
|
||||
input_level = clamp(target, 0, input_level_max)
|
||||
if("output")
|
||||
var/target = params["target"]
|
||||
var/adjust = text2num(params["adjust"])
|
||||
if(target == "min")
|
||||
target = 0
|
||||
else if(target == "max")
|
||||
target = output_level_max
|
||||
else if(adjust)
|
||||
target = output_level + adjust
|
||||
else if(text2num(target) != null)
|
||||
target = text2num(target)
|
||||
else
|
||||
. = FALSE
|
||||
if(.)
|
||||
output_level = clamp(target, 0, output_level_max)
|
||||
else
|
||||
. = FALSE
|
||||
if(.)
|
||||
log_smes(usr)
|
||||
|
||||
if( href_list["cmode"] )
|
||||
inputting(!input_attempt)
|
||||
update_icon()
|
||||
|
||||
else if( href_list["online"] )
|
||||
outputting(!output_attempt)
|
||||
update_icon()
|
||||
|
||||
else if( href_list["input"] )
|
||||
switch( href_list["input"] )
|
||||
if("min")
|
||||
input_level = 0
|
||||
if("max")
|
||||
input_level = input_level_max
|
||||
if("set")
|
||||
input_level = input(usr, "Enter new input level (0-[input_level_max])", "SMES Input Power Control", input_level) as num
|
||||
input_level = max(0, min(input_level_max, input_level)) // clamp to range
|
||||
|
||||
else if( href_list["output"] )
|
||||
switch( href_list["output"] )
|
||||
if("min")
|
||||
output_level = 0
|
||||
if("max")
|
||||
output_level = output_level_max
|
||||
if("set")
|
||||
output_level = input(usr, "Enter new output level (0-[output_level_max])", "SMES Output Power Control", output_level) as num
|
||||
output_level = max(0, min(output_level_max, output_level)) // clamp to range
|
||||
|
||||
investigate_log("input/output; [input_level>output_level?"<font color='green'>":"<font color='red'>"][input_level]/[output_level]</font> | Output-mode: [output_attempt?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [input_attempt?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
|
||||
|
||||
return 1
|
||||
/obj/machinery/power/smes/proc/log_smes(mob/user)
|
||||
investigate_log("input/output; [input_level>output_level?"<font color='green'>":"<font color='red'>"][input_level]/[output_level]</font> | Charge: [charge] | Output-mode: [output_attempt?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [input_attempt?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [user ? key_name(user) : "outside forces"]", "singulo")
|
||||
|
||||
/obj/machinery/power/smes/proc/ion_act()
|
||||
if(is_station_level(src.z))
|
||||
@@ -448,6 +450,7 @@
|
||||
smoke.attach(src)
|
||||
smoke.start()
|
||||
|
||||
|
||||
/obj/machinery/power/smes/proc/inputting(var/do_input)
|
||||
input_attempt = do_input
|
||||
if(!input_attempt)
|
||||
@@ -459,14 +462,15 @@
|
||||
outputting = 0
|
||||
|
||||
/obj/machinery/power/smes/emp_act(severity)
|
||||
inputting(rand(0,1))
|
||||
outputting(rand(0,1))
|
||||
inputting(rand(0, 1))
|
||||
outputting(rand(0, 1))
|
||||
output_level = rand(0, output_level_max)
|
||||
input_level = rand(0, input_level_max)
|
||||
charge -= 1e6/severity
|
||||
if(charge < 0)
|
||||
charge = 0
|
||||
update_icon()
|
||||
log_smes()
|
||||
..()
|
||||
|
||||
/obj/machinery/power/smes/engineering
|
||||
|
||||
@@ -33,8 +33,8 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE)
|
||||
to_chat(usr, "<span class='warning'>Central Command has already dispatched an emergency response team!</span>")
|
||||
return
|
||||
|
||||
var/datum/nano_module/ert_manager/E = new()
|
||||
E.ui_interact(usr)
|
||||
var/datum/tgui_module/ert_manager/E = new()
|
||||
E.tgui_interact(usr)
|
||||
|
||||
|
||||
/mob/dead/observer/proc/JoinResponseTeam()
|
||||
@@ -209,7 +209,7 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE)
|
||||
var/paranormal_outfit
|
||||
var/borg_path = /mob/living/silicon/robot/ert
|
||||
|
||||
/datum/response_team/proc/setSlots(com=1, sec=3, med=3, eng=3, jan=0, par=0, cyb=0)
|
||||
/datum/response_team/proc/setSlots(com=1, sec=4, med=0, eng=0, jan=0, par=0, cyb=0)
|
||||
slots["Commander"] = com
|
||||
slots["Security"] = sec
|
||||
slots["Medic"] = med
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
name = "broken rejuvenation pod"
|
||||
desc = "A small sleeper typically used to instantly restore minor wounds. This one seems broken, and its occupant is comatose."
|
||||
mob_name = "a translocated vet"
|
||||
flavour_text = "<span class='big bold'>What...?</span><b> Where are you? Where are the others? This is still the animal hospital - you should know, you've been an intern here for weeks - but \
|
||||
description = "You are an intern working in an animal hospital that suddenly got transported to lavaland. Good luck."
|
||||
flavour_text = "What...? Where are you? Where are the others? This is still the animal hospital - you should know, you've been an intern here for weeks - but \
|
||||
everyone's gone. One of the cats scratched you just a few minutes ago. That's why you were in the pod - to heal the scratch. The scabs are still fresh; you see them right now. So where is \
|
||||
everyone? Where did they go? What happened to the hospital? And is that <i>smoke</i> you smell? You need to find someone else. Maybe they can tell you what happened.</b>"
|
||||
everyone? Where did they go? What happened to the hospital? And is that smoke you smell? You need to find someone else. Maybe they can tell you what happened."
|
||||
assignedrole = "Translocated Vet"
|
||||
allow_species_pick = TRUE
|
||||
|
||||
|
||||
@@ -67,9 +67,10 @@
|
||||
anchored = FALSE
|
||||
move_resist = MOVE_FORCE_NORMAL
|
||||
density = FALSE
|
||||
flavour_text = "<span class='big bold'>You are an ash walker.</span><b> Your tribe worships <span class='danger'>the Necropolis</span>. The wastes are sacred ground, its monsters a blessed bounty. \
|
||||
You have seen lights in the distance... they foreshadow the arrival of outsiders that seek to tear apart the Necropolis and its domain. Fresh sacrifices for your nest. \
|
||||
<br><i>You are free to attack miners and other outsiders. <font size=6>DO NOT</font> leave Lavaland without admin permission! <font size=6>DO NOT</font> attack the mining outpost without being provoked.</b></i>"
|
||||
important_info = "Do not leave Lavaland without admin permission. Do not attack the mining outpost without being provoked."
|
||||
description = "You are an ashwalker, a native inhabitant of Lavaland. Try to survive with nothing but spears and other tribal technology. Bring dead bodies back to your tendril to create more of your kind. You are free to attack miners and other outsiders."
|
||||
flavour_text = "Your tribe worships the Necropolis. The wastes are sacred ground, its monsters a blessed bounty. \
|
||||
You have seen lights in the distance... they foreshadow the arrival of outsiders that seek to tear apart the Necropolis and its domain. Fresh sacrifices for your nest."
|
||||
assignedrole = "Ash Walker"
|
||||
|
||||
/obj/effect/mob_spawn/human/ash_walker/special(mob/living/carbon/human/new_spawn)
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
random = TRUE
|
||||
allow_species_pick = TRUE
|
||||
mob_species = /datum/species/human
|
||||
flavour_text = "<span class='big bold'>You've been stranded in this godless prison of a planet for longer than you can remember.</span><b> Each day you barely scrape by, and between the terrible \
|
||||
description = "You are a single survivor stranded on lavaland in a makeshift shelter. Try to survive with barely any equipment. For when miner is just too boring."
|
||||
flavour_text = "You've been stranded in this godless prison of a planet for longer than you can remember. Each day you barely scrape by, and between the terrible \
|
||||
conditions of your makeshift shelter, the hostile creatures, and the ash drakes swooping down from the cloudless skies, all you can wish for is the feel of soft grass between your toes and \
|
||||
the fresh air of Earth. These thoughts are dispelled by yet another recollection of how you got here... "
|
||||
assignedrole = "Hermit"
|
||||
@@ -22,28 +23,28 @@
|
||||
if(1)
|
||||
flavour_text += "you were a [pick("arms dealer", "shipwright", "docking manager")]'s assistant on a small trading station several sectors from here. Raiders attacked, and there was \
|
||||
only one pod left when you got to the escape bay. You took it and launched it alone, and the crowd of terrified faces crowding at the airlock door as your pod's engines burst to \
|
||||
life and sent you to this hell are forever branded into your memory.</b>"
|
||||
life and sent you to this hell are forever branded into your memory."
|
||||
outfit.uniform = /obj/item/clothing/under/assistantformal
|
||||
outfit.shoes = /obj/item/clothing/shoes/black
|
||||
outfit.back = /obj/item/storage/backpack
|
||||
if(2)
|
||||
flavour_text += "you're an exile from the Tiger Cooperative. Their technological fanaticism drove you to question the power and beliefs of the Exolitics, and they saw you as a \
|
||||
heretic and subjected you to hours of horrible torture. You were hours away from execution when a high-ranking friend of yours in the Cooperative managed to secure you a pod, \
|
||||
scrambled its destination's coordinates, and launched it. You awoke from stasis when you landed and have been surviving - barely - ever since.</b>"
|
||||
scrambled its destination's coordinates, and launched it. You awoke from stasis when you landed and have been surviving - barely - ever since."
|
||||
outfit.uniform = /obj/item/clothing/under/color/orange
|
||||
outfit.shoes = /obj/item/clothing/shoes/orange
|
||||
outfit.back = /obj/item/storage/backpack
|
||||
if(3)
|
||||
flavour_text += "you were a doctor on one of Nanotrasen's space stations, but you left behind that damn corporation's tyranny and everything it stood for. From a metaphorical hell \
|
||||
to a literal one, you find yourself nonetheless missing the recycled air and warm floors of what you left behind... but you'd still rather be here than there.</b>"
|
||||
to a literal one, you find yourself nonetheless missing the recycled air and warm floors of what you left behind... but you'd still rather be here than there."
|
||||
outfit.uniform = /obj/item/clothing/under/rank/medical
|
||||
outfit.suit = /obj/item/clothing/suit/storage/labcoat
|
||||
outfit.back = /obj/item/storage/backpack/medic
|
||||
outfit.shoes = /obj/item/clothing/shoes/black
|
||||
if(4)
|
||||
flavour_text += "you were always joked about by your friends for \"not playing with a full deck\", as they so <i>kindly</i> put it. It seems that they were right when you, on a tour \
|
||||
flavour_text += "you were always joked about by your friends for \"not playing with a full deck\", as they so kindly put it. It seems that they were right when you, on a tour \
|
||||
at one of Nanotrasen's state-of-the-art research facilities, were in one of the escape pods alone and saw the red button. It was big and shiny, and it caught your eye. You pressed \
|
||||
it, and after a terrifying and fast ride for days, you landed here. You've had time to wisen up since then, and you think that your old friends wouldn't be laughing now.</b>"
|
||||
it, and after a terrifying and fast ride for days, you landed here. You've had time to wisen up since then, and you think that your old friends wouldn't be laughing now."
|
||||
outfit.uniform = /obj/item/clothing/under/color/grey/glorf
|
||||
outfit.shoes = /obj/item/clothing/shoes/black
|
||||
outfit.back = /obj/item/storage/backpack
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
roundstart = FALSE
|
||||
death = FALSE
|
||||
mob_species = /datum/species/diona/pod
|
||||
flavour_text = "<span class='big bold'>You are a sentient ecosystem,</span><b> an example of the mastery over life that your creators possessed. Your masters, benevolent as they were, created uncounted \
|
||||
description = "You are a diona on Lavaland with access to a full botany setup. Perfect to mess around with plants in peace."
|
||||
flavour_text = "You are a sentient ecosystem, an example of the mastery over life that your creators possessed. Your masters, benevolent as they were, created uncounted \
|
||||
seed vaults and spread them across the universe to every planet they could chart. You are in one such seed vault. Your goal is to cultivate and spread life wherever it will go while waiting \
|
||||
for contact from your creators. Estimated time of last contact: Deployment, 5x10^3 millennia ago.</b>"
|
||||
for contact from your creators. Estimated time of last contact: Deployment, 5x10^3 millennia ago."
|
||||
assignedrole = "Lifebringer"
|
||||
|
||||
/obj/effect/mob_spawn/human/seed_vault/special(mob/living/new_spawn)
|
||||
|
||||
@@ -28,8 +28,10 @@
|
||||
death = FALSE
|
||||
icon = 'icons/obj/cryogenic2.dmi'
|
||||
icon_state = "sleeper_s"
|
||||
flavour_text = "<span class='big bold'>You are a syndicate agent,</span><b> employed in a top secret research facility developing biological weapons. Unfortunately, your hated enemy, Nanotrasen, has begun mining in this sector. <b>Continue your research as best you can, and try to keep a low profile. The base is rigged with explosives, do not abandon it or let it fall into enemy hands!</b> \
|
||||
<br><i>You are free to attack anyone not aligned with the Syndicate in the vicinity of your base. <font size=6>DO NOT</font> work against Syndicate personnel (such as traitors or nuclear operatives). You may work with or against non-Syndicate antagonists on a case-by-case basis. <font size=6>DO NOT</font> leave your base without admin permission.</i>"
|
||||
important_info = "Do not work against Syndicate personnel (such as traitors or nuclear operatives). You may work with or against non-Syndicate antagonists on a case-by-case basis. Do not leave your base without admin permission."
|
||||
description = "Experiment with deadly chems and viruses in peace or help any visiting Syndicate Agent."
|
||||
flavour_text = "You are a syndicate agent, employed in a top secret research facility developing biological weapons. Unfortunately, your hated enemy, Nanotrasen, has begun mining in this sector. Continue your research as best you can, and try to keep a low profile. The base is rigged with explosives, do not abandon it or let it fall into enemy hands!\
|
||||
It's been made clear to you that the Syndicate will make you regret it if you disappoint them."
|
||||
outfit = /datum/outfit/lavaland_syndicate
|
||||
assignedrole = "Lavaland Syndicate"
|
||||
del_types = list() // Necessary to prevent del_types from removing radio!
|
||||
@@ -59,13 +61,13 @@
|
||||
/obj/effect/mob_spawn/human/lavaland_syndicate/comms
|
||||
name = "Syndicate Comms Agent sleeper"
|
||||
mob_name = "Syndicate Comms Agent"
|
||||
flavour_text = "<span class='big bold'>You are a syndicate agent,</span><b> employed in a top secret research facility developing biological weapons. Unfortunately, your hated enemy, Nanotrasen, has begun mining in this sector. <b>Monitor enemy activity as best you can, and try to keep a low profile. Do not abandon the base.</b> Use the communication equipment to provide support to any field agents, and sow disinformation to throw Nanotrasen off your trail. Do not let the base fall into enemy hands!</b> \
|
||||
<br><i>You are free to attack anyone not aligned with the Syndicate in the vicinity of your base. <font size=6>DO NOT</font> work against Syndicate personnel (such as traitors or nuclear operatives). You may work with or against non-Syndicate antagonists on a case-by-case basis. <font size=6>DO NOT</font> leave your base without admin permission.</i>"
|
||||
important_info = "Do not work against Syndicate personnel (such as traitors or nuclear operatives). You may work with or against non-Syndicate antagonists on a case-by-case basis. Do not leave your base without admin permission. Do not reveal the existence of yourself to NT."
|
||||
description = "Monitor comms and cameras and try to assist any agents on station while keeping your existence a secret."
|
||||
flavour_text = "You are a syndicate agent, employed in a top secret research facility developing biological weapons. Unfortunately, your hated enemy, Nanotrasen, has begun mining in this sector. Monitor enemy activity as best you can, and try to keep a low profile."
|
||||
outfit = /datum/outfit/lavaland_syndicate/comms
|
||||
|
||||
/obj/effect/mob_spawn/human/lavaland_syndicate/comms/space
|
||||
flavour_text = "<span class='big bold'>You are a syndicate agent,</span><b> assigned to a small listening post station situated near your hated enemy's top secret research facility: Space Station 13. <b>Monitor enemy activity as best you can, and try to keep a low profile. Do not abandon the base.</b> Use the communication equipment to provide support to any field agents, and sow disinformation to throw Nanotrasen off your trail. Do not let the base fall into enemy hands!</b> \
|
||||
<br><i>You are free to attack anyone not aligned with the Syndicate in the vicinity of your base. <font size=6>DO NOT</font> work against Syndicate personnel (such as traitors or nuclear operatives). You may work with or against non-Syndicate antagonists on a case-by-case basis. <font size=6>DO NOT</font> leave your base without admin permission.</i>"
|
||||
flavour_text = "You are a syndicate agent, employed in a small listening outpost. You'd be bored to death if you couldn't listen in on those NT idiots mess up all the time."
|
||||
|
||||
/obj/effect/mob_spawn/human/lavaland_syndicate/comms/space/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "auth_off"
|
||||
|
||||
var/active = 0 //This gets set to 1 on all devices except the one where the initial request was made.
|
||||
var/event = ""
|
||||
var/screen = 1
|
||||
var/active = FALSE // This gets set to TRUE on all devices except the one where the initial request was made.
|
||||
var/event
|
||||
var/swiping = FALSE // on swiping screen?
|
||||
var/list/ert_chosen = list()
|
||||
var/confirmed = 0 //This variable is set by the device that confirms the request.
|
||||
var/confirm_delay = 20 //(2 seconds)
|
||||
var/busy = 0 //Busy when waiting for authentication or an event request has been sent from this device.
|
||||
var/confirmed = FALSE // This variable is set by the device that confirms the request.
|
||||
var/confirm_delay = 5 SECONDS // time allowed for a second person to confirm a swipe.
|
||||
var/busy = FALSE // Busy when waiting for authentication or an event request has been sent from this device.
|
||||
var/obj/machinery/keycard_auth/event_source
|
||||
var/mob/event_triggered_by
|
||||
var/mob/event_confirmed_by
|
||||
var/ert_reason = "Reason for ERT"
|
||||
var/ert_reason
|
||||
|
||||
anchored = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
@@ -35,16 +35,19 @@
|
||||
return
|
||||
if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))
|
||||
if(check_access(W))
|
||||
if(active == 1)
|
||||
if(active)
|
||||
//This is not the device that made the initial request. It is the device confirming the request.
|
||||
if(event_source)
|
||||
event_source.confirmed = 1
|
||||
event_source.confirmed = TRUE
|
||||
event_source.event_confirmed_by = usr
|
||||
else if(screen == 2)
|
||||
if(event == "Emergency Response Team" && ert_reason == "Reason for ERT")
|
||||
to_chat(user, "<span class='notice'>Supply a reason for calling the ERT first!</span>")
|
||||
SStgui.update_uis(event_source)
|
||||
SStgui.update_uis(src)
|
||||
else if(swiping)
|
||||
if(event == "Emergency Response Team" && !ert_reason)
|
||||
to_chat(user, "<span class='warning'>Supply a reason for calling the ERT first!</span>")
|
||||
return
|
||||
event_triggered_by = usr
|
||||
SStgui.update_uis(src)
|
||||
broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
@@ -59,57 +62,58 @@
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/keycard_auth/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/keycard_auth/attack_hand(mob/user as mob)
|
||||
/obj/machinery/keycard_auth/attack_hand(mob/user)
|
||||
if(..())
|
||||
return 1
|
||||
ui_interact(user)
|
||||
return TRUE
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/keycard_auth/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
if(busy)
|
||||
to_chat(user, "This device is busy.")
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/machinery/keycard_auth/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "keycard_auth.tmpl", "Keycard Authentication Device UI", 540, 320)
|
||||
ui = new(user, src, ui_key, "KeycardAuth", name, 540, 300, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/keycard_auth/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
|
||||
var/data[0]
|
||||
data["screen"] = screen
|
||||
data["event"] = event
|
||||
data["ertreason"] = ert_reason
|
||||
|
||||
/obj/machinery/keycard_auth/tgui_data()
|
||||
var/list/data = list()
|
||||
data["redAvailable"] = GLOB.security_level == SEC_LEVEL_RED ? FALSE : TRUE
|
||||
data["swiping"] = swiping
|
||||
data["busy"] = busy
|
||||
data["event"] = active && event_source && event_source.event ? event_source.event : event
|
||||
data["ertreason"] = active && event_source && event_source.ert_reason ? event_source.ert_reason : ert_reason
|
||||
data["isRemote"] = active ? TRUE : FALSE
|
||||
data["hasSwiped"] = event_triggered_by ? TRUE : FALSE
|
||||
data["hasConfirm"] = event_confirmed_by || (active && event_source && event_source.event_confirmed_by) ? TRUE : FALSE
|
||||
return data
|
||||
|
||||
/obj/machinery/keycard_auth/Topic(href, href_list)
|
||||
/obj/machinery/keycard_auth/tgui_act(action, params)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(busy)
|
||||
to_chat(usr, "This device is busy.")
|
||||
return
|
||||
if(busy)
|
||||
to_chat(usr, "<span class='warning'>This device is busy.</span>")
|
||||
return
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("ert")
|
||||
ert_reason = stripped_input(usr, "Reason for ERT Call:", "", "")
|
||||
if("reset")
|
||||
reset()
|
||||
if("triggerevent")
|
||||
event = params["triggerevent"]
|
||||
swiping = TRUE
|
||||
|
||||
if(href_list["triggerevent"])
|
||||
event = href_list["triggerevent"]
|
||||
screen = 2
|
||||
if(href_list["reset"])
|
||||
reset()
|
||||
if(href_list["ert"])
|
||||
ert_reason = stripped_input(usr, "Reason for ERT Call:", "", "")
|
||||
|
||||
SSnanoui.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/keycard_auth/proc/reset()
|
||||
active = 0
|
||||
event = ""
|
||||
screen = 1
|
||||
confirmed = 0
|
||||
active = FALSE
|
||||
event = null
|
||||
swiping = FALSE
|
||||
confirmed = FALSE
|
||||
event_source = null
|
||||
icon_state = "auth_off"
|
||||
event_triggered_by = null
|
||||
@@ -125,7 +129,7 @@
|
||||
|
||||
sleep(confirm_delay)
|
||||
if(confirmed)
|
||||
confirmed = 0
|
||||
confirmed = FALSE
|
||||
trigger_event(event)
|
||||
log_game("[key_name(event_triggered_by)] triggered and [key_name(event_confirmed_by)] confirmed event [event]")
|
||||
message_admins("[key_name_admin(event_triggered_by)] triggered and [key_name_admin(event_confirmed_by)] confirmed event [event]", 1)
|
||||
@@ -135,16 +139,17 @@
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
event_source = source
|
||||
busy = 1
|
||||
active = 1
|
||||
busy = TRUE
|
||||
active = TRUE
|
||||
SStgui.update_uis(src)
|
||||
icon_state = "auth_on"
|
||||
|
||||
sleep(confirm_delay)
|
||||
|
||||
event_source = null
|
||||
icon_state = "auth_off"
|
||||
active = 0
|
||||
busy = 0
|
||||
active = FALSE
|
||||
busy = FALSE
|
||||
|
||||
/obj/machinery/keycard_auth/proc/trigger_event()
|
||||
switch(event)
|
||||
@@ -178,7 +183,7 @@
|
||||
if(fullmin_count)
|
||||
GLOB.ert_request_answered = TRUE
|
||||
ERT_Announce(ert_reason , event_triggered_by, 0)
|
||||
ert_reason = "Reason for ERT"
|
||||
ert_reason = null
|
||||
feedback_inc("alert_keycard_auth_ert",1)
|
||||
spawn(3000)
|
||||
if(!GLOB.ert_request_answered)
|
||||
|
||||
@@ -6,13 +6,12 @@
|
||||
resistance_flags = INDESTRUCTIBLE
|
||||
flags = NODECONSTRUCT
|
||||
|
||||
/obj/machinery/computer/shuttle/ert/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
/obj/machinery/computer/shuttle/ert/can_call_shuttle(mob/user, action)
|
||||
if(action == "move")
|
||||
var/authorized_roles = list(SPECIAL_ROLE_ERT, SPECIAL_ROLE_DEATHSQUAD)
|
||||
if(!((usr.mind?.assigned_role in authorized_roles) || is_admin(usr)))
|
||||
message_admins("Potential ERT shuttle hijack, ERT shuttle moved by unauthorized user: [key_name_admin(usr)]")
|
||||
..()
|
||||
|
||||
if(!((user.mind?.assigned_role in authorized_roles) || is_admin(user)))
|
||||
message_admins("Potential ERT shuttle hijack, ERT shuttle moved by unauthorized user: [key_name_admin(user)]")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/camera_advanced/shuttle_docker/ert
|
||||
name = "specops navigation computer"
|
||||
|
||||
@@ -727,13 +727,13 @@
|
||||
name = "Shuttle Console"
|
||||
icon_screen = "shuttle"
|
||||
icon_keyboard = "tech_key"
|
||||
req_access = list( )
|
||||
req_access = list()
|
||||
circuit = /obj/item/circuitboard/shuttle
|
||||
var/shuttleId
|
||||
var/possible_destinations = ""
|
||||
var/admin_controlled
|
||||
var/max_connect_range = 7
|
||||
var/docking_request = 0
|
||||
var/moved = FALSE //workaround for nukie shuttle, hope I find a better way to do this...
|
||||
|
||||
/obj/machinery/computer/shuttle/New(location, obj/item/circuitboard/shuttle/C)
|
||||
..()
|
||||
@@ -773,21 +773,20 @@
|
||||
return
|
||||
connect()
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/machinery/computer/shuttle/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/machinery/computer/shuttle/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "shuttle_console.tmpl", M ? M.name : "shuttle", 300, 200)
|
||||
ui = new(user, src, ui_key, "ShuttleConsole", name, 350, 150, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/shuttle/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
|
||||
var/data[0]
|
||||
/obj/machinery/computer/shuttle/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
data["status"] = M ? M.getStatusText() : null
|
||||
if(M)
|
||||
data["shuttle"] = 1
|
||||
data["shuttle"] = TRUE //this should just be boolean, right?
|
||||
var/list/docking_ports = list()
|
||||
data["docking_ports"] = docking_ports
|
||||
var/list/options = params2list(possible_destinations)
|
||||
@@ -799,34 +798,35 @@
|
||||
docking_ports[++docking_ports.len] = list("name" = S.name, "id" = S.id)
|
||||
data["docking_ports_len"] = docking_ports.len
|
||||
data["admin_controlled"] = admin_controlled
|
||||
data["docking_request"] = docking_request
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/shuttle/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/shuttle/tgui_act(action, params)
|
||||
if(..()) //we can't actually interact, so no action
|
||||
return TRUE
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
return TRUE
|
||||
if(!can_call_shuttle(usr, action))
|
||||
return TRUE
|
||||
var/list/options = params2list(possible_destinations)
|
||||
if(href_list["move"])
|
||||
if(!options.Find(href_list["move"])) //I see you're trying Href exploits, I see you're failing, I SEE ADMIN WARNING.
|
||||
// Seriously, though, NEVER trust a Topic with something like this. Ever.
|
||||
// Sidenote for whoever did this last. Why did you set it to echo whatever the user entered to admin chat? You solved one exploit and created another.
|
||||
if(action == "move")
|
||||
var/destination = params["move"]
|
||||
if(!options.Find(destination))//figure out if this translation works
|
||||
message_admins("<span class='boldannounce'>EXPLOIT:</span> [ADMIN_LOOKUPFLW(usr)] attempted to move [src] to an invalid location! [ADMIN_COORDJMP(src)]")
|
||||
return
|
||||
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1, usr))
|
||||
switch(SSshuttle.moveShuttle(shuttleId, destination, TRUE, usr))
|
||||
if(0)
|
||||
atom_say("Shuttle departing! Please stand away from the doors.")
|
||||
usr.create_log(MISC_LOG, "used [src] to call the [shuttleId] shuttle")
|
||||
if(!moved)
|
||||
moved = TRUE
|
||||
add_fingerprint(usr)
|
||||
return TRUE
|
||||
if(1)
|
||||
to_chat(usr, "<span class='warning'>Invalid shuttle requested.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>Unable to comply.</span>")
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/emag_act(mob/user)
|
||||
if(!emagged)
|
||||
@@ -834,6 +834,10 @@
|
||||
emagged = 1
|
||||
to_chat(user, "<span class='notice'>You fried the consoles ID checking system.</span>")
|
||||
|
||||
//for restricting when the computer can be used, needed for some console subtypes.
|
||||
/obj/machinery/computer/shuttle/proc/can_call_shuttle(mob/user, action)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/shuttle/ferry
|
||||
name = "transport ferry console"
|
||||
circuit = /obj/item/circuitboard/ferry
|
||||
@@ -844,25 +848,23 @@
|
||||
/obj/machinery/computer/shuttle/ferry/request
|
||||
name = "ferry console"
|
||||
circuit = /obj/item/circuitboard/ferry/request
|
||||
var/cooldown //prevents spamming admins
|
||||
var/next_request //to prevent spamming admins
|
||||
possible_destinations = "ferry_home"
|
||||
admin_controlled = 1
|
||||
admin_controlled = TRUE
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/machinery/computer/shuttle/ferry/request/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["request"])
|
||||
if(cooldown)
|
||||
/obj/machinery/computer/shuttle/ferry/request/tgui_act(action, params)
|
||||
if(..()) // Note that the parent handels normal shuttle movement on top of security checks
|
||||
return
|
||||
if(action == "request")
|
||||
if(world.time < next_request)
|
||||
return
|
||||
cooldown = 1
|
||||
next_request = world.time + 60 SECONDS //1 minute cooldown
|
||||
to_chat(usr, "<span class='notice'>Your request has been recieved by Centcom.</span>")
|
||||
log_admin("[key_name(usr)] requested to move the transport ferry to Centcom.")
|
||||
message_admins("<b>FERRY: <font color='blue'>[key_name_admin(usr)] (<A HREF='?_src_=holder;secretsfun=moveferry'>Move Ferry</a>)</b> is requesting to move the transport ferry to Centcom.</font>")
|
||||
. = 1
|
||||
SSnanoui.update_uis(src)
|
||||
spawn(600) //One minute cooldown
|
||||
cooldown = 0
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/computer/shuttle/white_ship
|
||||
name = "White Ship Console"
|
||||
|
||||
@@ -11,20 +11,18 @@
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
flags = NODECONSTRUCT
|
||||
var/challenge = FALSE
|
||||
var/moved = FALSE
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/recall
|
||||
name = "syndicate shuttle recall terminal"
|
||||
circuit = /obj/item/circuitboard/shuttle/syndicate/recall
|
||||
possible_destinations = "syndicate_away"
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
/obj/machinery/computer/shuttle/syndicate/can_call_shuttle(user, action)
|
||||
if(action == "move")
|
||||
if(challenge && world.time < SYNDICATE_CHALLENGE_TIMER)
|
||||
to_chat(usr, "<span class='warning'>You've issued a combat challenge to the station! You've got to give them at least [round(((SYNDICATE_CHALLENGE_TIMER - world.time) / 10) / 60)] more minutes to allow them to prepare.</span>")
|
||||
return 0
|
||||
moved = TRUE
|
||||
..()
|
||||
to_chat(user, "<span class='warning'>You've issued a combat challenge to the station! You've got to give them at least [round(((SYNDICATE_CHALLENGE_TIMER - world.time) / 10) / 60)] more minutes to allow them to prepare.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod
|
||||
name = "syndicate assault pod control"
|
||||
@@ -35,11 +33,11 @@
|
||||
shuttleId = "steel_rain"
|
||||
possible_destinations = null
|
||||
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
/obj/machinery/computer/shuttle/syndicate/drop_pod/can_call_shuttle(user, action)
|
||||
if(action == "move")
|
||||
if(z != level_name_to_num(CENTCOMM))
|
||||
to_chat(usr, "<span class='warning'>Pods are one way!</span>")
|
||||
return 0
|
||||
to_chat(user, "<span class='warning'>Pods are one way!</span>")
|
||||
return FALSE
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/shuttle/sst
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/datum/station_goal/proc/send_report()
|
||||
GLOB.priority_announcement.Announce("Priority Nanotrasen directive received. Project \"[name]\" details inbound.", "Incoming Priority Message", 'sound/AI/commandreport.ogg')
|
||||
print_command_report(get_report(), "Nanotrasen Directive [pick(GLOB.phonetic_alphabet)] \Roman[rand(1,50)]")
|
||||
print_command_report(get_report(), "Nanotrasen Directive [pick(GLOB.phonetic_alphabet)] \Roman[rand(1,50)]", FALSE)
|
||||
on_report()
|
||||
|
||||
/datum/station_goal/proc/on_report()
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/datum/tgui_module/ert_manager
|
||||
name = "ERT Manager"
|
||||
var/ert_type = "Red"
|
||||
var/commander_slots = 1 // defaults for open slots
|
||||
var/security_slots = 4
|
||||
var/medical_slots = 0
|
||||
var/engineering_slots = 0
|
||||
var/janitor_slots = 0
|
||||
var/paranormal_slots = 0
|
||||
var/cyborg_slots = 0
|
||||
|
||||
/datum/tgui_module/ert_manager/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_admin_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "ERTManager", name, 350, 430, master_ui, state)
|
||||
ui.autoupdate = TRUE
|
||||
ui.open()
|
||||
|
||||
/datum/tgui_module/ert_manager/tgui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["str_security_level"] = capitalize(get_security_level())
|
||||
switch(GLOB.security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
data["security_level_color"] = "green"
|
||||
if(SEC_LEVEL_BLUE)
|
||||
data["security_level_color"] = "blue"
|
||||
if(SEC_LEVEL_RED)
|
||||
data["security_level_color"] = "red"
|
||||
else
|
||||
data["security_level_color"] = "purple"
|
||||
data["ert_type"] = ert_type
|
||||
data["com"] = commander_slots
|
||||
data["sec"] = security_slots
|
||||
data["med"] = medical_slots
|
||||
data["eng"] = engineering_slots
|
||||
data["jan"] = janitor_slots
|
||||
data["par"] = paranormal_slots
|
||||
data["cyb"] = cyborg_slots
|
||||
data["total"] = commander_slots + security_slots + medical_slots + engineering_slots + janitor_slots + paranormal_slots + cyborg_slots
|
||||
data["spawnpoints"] = GLOB.emergencyresponseteamspawn.len
|
||||
return data
|
||||
|
||||
/datum/tgui_module/ert_manager/tgui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
. = TRUE
|
||||
switch(action)
|
||||
if("ert_type")
|
||||
ert_type = params["ert_type"]
|
||||
if("toggle_com")
|
||||
commander_slots = commander_slots ? 0 : 1
|
||||
if("set_sec")
|
||||
security_slots = text2num(params["set_sec"])
|
||||
if("set_med")
|
||||
medical_slots = text2num(params["set_med"])
|
||||
if("set_eng")
|
||||
engineering_slots = text2num(params["set_eng"])
|
||||
if("set_jan")
|
||||
janitor_slots = text2num(params["set_jan"])
|
||||
if("set_par")
|
||||
paranormal_slots = text2num(params["set_par"])
|
||||
if("set_cyb")
|
||||
cyborg_slots = text2num(params["set_cyb"])
|
||||
if("dispatch_ert")
|
||||
var/datum/response_team/D
|
||||
switch(ert_type)
|
||||
if("Amber")
|
||||
D = new /datum/response_team/amber
|
||||
if("Red")
|
||||
D = new /datum/response_team/red
|
||||
if("Gamma")
|
||||
D = new /datum/response_team/gamma
|
||||
else
|
||||
to_chat(usr, "<span class='userdanger'>Invalid ERT type.</span>")
|
||||
return
|
||||
GLOB.ert_request_answered = TRUE
|
||||
var/slots_list = list()
|
||||
if(commander_slots > 0)
|
||||
slots_list += "commander: [commander_slots]"
|
||||
if(security_slots > 0)
|
||||
slots_list += "security: [security_slots]"
|
||||
if(medical_slots > 0)
|
||||
slots_list += "medical: [medical_slots]"
|
||||
if(engineering_slots > 0)
|
||||
slots_list += "engineering: [engineering_slots]"
|
||||
if(janitor_slots > 0)
|
||||
slots_list += "janitor: [janitor_slots]"
|
||||
if(paranormal_slots > 0)
|
||||
slots_list += "paranormal: [paranormal_slots]"
|
||||
if(cyborg_slots > 0)
|
||||
slots_list += "cyborg: [cyborg_slots]"
|
||||
var/slot_text = english_list(slots_list)
|
||||
notify_ghosts("An ERT is being dispatched. Open positions: [slot_text]")
|
||||
message_admins("[key_name_admin(usr)] dispatched a [ert_type] ERT. Slots: [slot_text]", 1)
|
||||
log_admin("[key_name(usr)] dispatched a [ert_type] ERT. Slots: [slot_text]")
|
||||
GLOB.event_announcement.Announce("Attention, [station_name()]. We are attempting to assemble an ERT. Standby.", "ERT Protocol Activated")
|
||||
trigger_armed_response_team(D, commander_slots, security_slots, medical_slots, engineering_slots, janitor_slots, paranormal_slots, cyborg_slots)
|
||||
else
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user