mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 22:47:59 +01:00
Merge branch 'master' into rsiksfluffitem
This commit is contained in:
@@ -68,9 +68,11 @@
|
||||
#define INIT_ORDER_OVERLAY -6
|
||||
#define INIT_ORDER_XKEYSCORE -10
|
||||
#define INIT_ORDER_STICKY_BAN -10
|
||||
#define INIT_ORDER_TICKETS -10
|
||||
#define INIT_ORDER_LIGHTING -20
|
||||
#define INIT_ORDER_SHUTTLE -21
|
||||
#define INIT_ORDER_NIGHTSHIFT -22
|
||||
#define INIT_ORDER_NANOMOB -23
|
||||
#define INIT_ORDER_SQUEAK -40
|
||||
#define INIT_ORDER_PATH -50
|
||||
#define INIT_ORDER_PERSISTENCE -100
|
||||
@@ -78,9 +80,11 @@
|
||||
// Subsystem fire priority, from lowest to highest priority
|
||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||
|
||||
#define FIRE_PRIORITY_NANOMOB 10
|
||||
#define FIRE_PRIORITY_NIGHTSHIFT 10
|
||||
#define FIRE_PRIORITY_IDLE_NPC 10
|
||||
#define FIRE_PRIORITY_SERVER_MAINT 10
|
||||
#define FIRE_PRIORITY_TICKETS 10
|
||||
#define FIRE_PRIORITY_RESEARCH 10
|
||||
#define FIRE_PRIORITY_GARBAGE 15
|
||||
#define FIRE_PRIORITY_WET_FLOORS 20
|
||||
|
||||
+16
-21
@@ -1,6 +1,7 @@
|
||||
var/global/datum/controller/process/mob_hunt/mob_hunt_server
|
||||
|
||||
/datum/controller/process/mob_hunt
|
||||
SUBSYSTEM_DEF(mob_hunt)
|
||||
name = "Nano-Mob Hunter GO Server"
|
||||
init_order = INIT_ORDER_NANOMOB
|
||||
priority = FIRE_PRIORITY_NANOMOB // Low priority, no need for MC_TICK_CHECK due to extremely low performance impact.
|
||||
var/max_normal_spawns = 15 //change this to adjust the number of normal spawns that can exist at one time. trapped spawns (from traitors) don't count towards this
|
||||
var/list/normal_spawns = list()
|
||||
var/max_trap_spawns = 15 //change this to adjust the number of trap spawns that can exist at one time. traps spawned beyond this point clear the oldest traps
|
||||
@@ -12,11 +13,7 @@ var/global/datum/controller/process/mob_hunt/mob_hunt_server
|
||||
var/obj/machinery/computer/mob_battle_terminal/blue_terminal
|
||||
var/battle_turn = null
|
||||
|
||||
/datum/controller/process/mob_hunt/setup()
|
||||
name = "Nano-Mob Hunter GO Server"
|
||||
start_delay = 20
|
||||
|
||||
/datum/controller/process/mob_hunt/doWork()
|
||||
/datum/controller/subsystem/mob_hunt/fire(resumed = FALSE)
|
||||
if(reset_cooldown) //if reset_cooldown is set (we are on cooldown, duh), reduce the remaining cooldown every cycle
|
||||
reset_cooldown--
|
||||
if(!server_status)
|
||||
@@ -25,10 +22,8 @@ var/global/datum/controller/process/mob_hunt/mob_hunt_server
|
||||
if(normal_spawns.len < max_normal_spawns)
|
||||
spawn_mob()
|
||||
|
||||
DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
|
||||
//leaving this here in case admins want to use it for a random mini-event or something
|
||||
/datum/controller/process/mob_hunt/proc/server_crash(recover_time = 3000)
|
||||
/datum/controller/subsystem/mob_hunt/proc/server_crash(recover_time = 3000)
|
||||
server_status = 0
|
||||
for(var/datum/data/pda/app/mob_hunter_game/client in connected_clients)
|
||||
client.disconnect("Server Crash")
|
||||
@@ -46,7 +41,7 @@ DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
//set a timer to automatically recover after recover_time has passed (can be manually restarted if you get impatient too)
|
||||
addtimer(CALLBACK(src, .proc/auto_recover), recover_time, TIMER_UNIQUE)
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/client_mob_update()
|
||||
/datum/controller/subsystem/mob_hunt/proc/client_mob_update()
|
||||
var/list/ex_players = list()
|
||||
for(var/datum/data/pda/app/mob_hunter_game/client in connected_clients)
|
||||
var/mob/living/carbon/human/H = client.get_player()
|
||||
@@ -58,14 +53,14 @@ DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
for(var/obj/effect/nanomob/N in (normal_spawns + trap_spawns))
|
||||
N.conceal(ex_players)
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/auto_recover()
|
||||
/datum/controller/subsystem/mob_hunt/proc/auto_recover()
|
||||
if(server_status != 0)
|
||||
return
|
||||
server_status = 1
|
||||
while(normal_spawns.len < max_normal_spawns) //repopulate the server's spawns completely if we auto-recover from crash
|
||||
spawn_mob()
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/manual_reboot()
|
||||
/datum/controller/subsystem/mob_hunt/proc/manual_reboot()
|
||||
if(server_status && reset_cooldown)
|
||||
return 0
|
||||
for(var/obj/effect/nanomob/N in trap_spawns)
|
||||
@@ -76,12 +71,12 @@ DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
reset_cooldown = 25 //25 controller cycle cooldown for manual restarts
|
||||
return 1
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/spawn_mob()
|
||||
/datum/controller/subsystem/mob_hunt/proc/spawn_mob()
|
||||
var/list/nanomob_types = subtypesof(/datum/mob_hunt)
|
||||
var/datum/mob_hunt/mob_info = pick(nanomob_types)
|
||||
new mob_info()
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/register_spawn(datum/mob_hunt/mob_info)
|
||||
/datum/controller/subsystem/mob_hunt/proc/register_spawn(datum/mob_hunt/mob_info)
|
||||
if(!mob_info)
|
||||
return 0
|
||||
var/obj/effect/nanomob/new_mob = new /obj/effect/nanomob(mob_info.spawn_point, mob_info)
|
||||
@@ -89,7 +84,7 @@ DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
new_mob.reveal()
|
||||
return 1
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/register_trap(datum/mob_hunt/mob_info)
|
||||
/datum/controller/subsystem/mob_hunt/proc/register_trap(datum/mob_hunt/mob_info)
|
||||
if(!mob_info)
|
||||
return 0
|
||||
if(!mob_info.is_trap)
|
||||
@@ -102,7 +97,7 @@ DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
old_trap.despawn()
|
||||
return 1
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/start_check()
|
||||
/datum/controller/subsystem/mob_hunt/proc/start_check()
|
||||
if(battle_turn) //somehow we got called mid-battle, so lets just stop now
|
||||
return
|
||||
if(red_terminal && red_terminal.ready && blue_terminal && blue_terminal.ready)
|
||||
@@ -114,7 +109,7 @@ DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
else if(battle_turn == "Blue")
|
||||
blue_terminal.audible_message("Blue Player's Turn!", null, 5)
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/launch_attack(team, raw_damage, datum/mob_type/attack_type)
|
||||
/datum/controller/subsystem/mob_hunt/proc/launch_attack(team, raw_damage, datum/mob_type/attack_type)
|
||||
if(!team || !raw_damage)
|
||||
return
|
||||
var/obj/machinery/computer/mob_battle_terminal/target = null
|
||||
@@ -126,7 +121,7 @@ DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
return
|
||||
target.receive_attack(raw_damage, attack_type)
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/end_battle(loser, surrender = 0)
|
||||
/datum/controller/subsystem/mob_hunt/proc/end_battle(loser, surrender = 0)
|
||||
var/obj/machinery/computer/mob_battle_terminal/winner_terminal = null
|
||||
var/obj/machinery/computer/mob_battle_terminal/loser_terminal = null
|
||||
if(loser == "Red")
|
||||
@@ -145,7 +140,7 @@ DECLARE_GLOBAL_CONTROLLER(mob_hunt, mob_hunt_server)
|
||||
winner_terminal.audible_message("[winner_terminal.team] Player wins!", null, 5)
|
||||
winner_terminal.audible_message(progress_message, null, 2)
|
||||
|
||||
/datum/controller/process/mob_hunt/proc/end_turn()
|
||||
/datum/controller/subsystem/mob_hunt/proc/end_turn()
|
||||
red_terminal.updateUsrDialog()
|
||||
blue_terminal.updateUsrDialog()
|
||||
if(!battle_turn)
|
||||
@@ -1,8 +1,11 @@
|
||||
var/datum/controller/process/shuttle/shuttle_master
|
||||
#define CALL_SHUTTLE_REASON_LENGTH 12
|
||||
|
||||
var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
|
||||
/datum/controller/process/shuttle
|
||||
SUBSYSTEM_DEF(shuttle)
|
||||
name = "Shuttle"
|
||||
wait = 10
|
||||
init_order = INIT_ORDER_SHUTTLE
|
||||
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME
|
||||
var/list/mobile = list()
|
||||
var/list/stationary = list()
|
||||
var/list/transit = list()
|
||||
@@ -37,15 +40,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
var/datum/round_event/shuttle_loan/shuttle_loan
|
||||
var/sold_atoms = ""
|
||||
|
||||
/datum/controller/process/shuttle/setup()
|
||||
name = "shuttle"
|
||||
schedule_interval = 20
|
||||
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Initializing shuttle docks...")
|
||||
initialize_docks()
|
||||
var/count = mobile.len + stationary.len + transit.len
|
||||
log_startup_progress(" Initialized [count] docks in [stop_watch(watch)]s.")
|
||||
/datum/controller/subsystem/shuttle/Initialize(start_timeofday)
|
||||
ordernum = rand(1,9000)
|
||||
|
||||
if(!emergency)
|
||||
WARNING("No /obj/docking_port/mobile/emergency placed on the map!")
|
||||
@@ -53,8 +49,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
WARNING("No /obj/docking_port/mobile/emergency/backup placed on the map!")
|
||||
if(!supply)
|
||||
WARNING("No /obj/docking_port/mobile/supply placed on the map!")
|
||||
|
||||
ordernum = rand(1,9000)
|
||||
|
||||
initial_load()
|
||||
|
||||
for(var/typepath in subtypesof(/datum/supply_packs))
|
||||
var/datum/supply_packs/P = new typepath()
|
||||
@@ -62,36 +58,39 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
|
||||
supply_packs["[P.type]"] = P
|
||||
initial_move()
|
||||
|
||||
/datum/controller/process/shuttle/doWork()
|
||||
points += points_per_decisecond * schedule_interval
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/shuttle/stat_entry(msg)
|
||||
..("M:[mobile.len] S:[stationary.len] T:[transit.len]")
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/initial_load()
|
||||
for(var/obj/docking_port/D in world)
|
||||
D.register()
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/shuttle/fire(resumed = FALSE)
|
||||
points += points_per_decisecond * wait
|
||||
for(var/thing in mobile)
|
||||
if(thing)
|
||||
var/obj/docking_port/mobile/P = thing
|
||||
P.check()
|
||||
continue
|
||||
CHECK_TICK
|
||||
mobile.Remove(thing)
|
||||
|
||||
|
||||
DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master)
|
||||
|
||||
/datum/controller/process/shuttle/proc/initialize_docks()
|
||||
for(var/obj/docking_port/D in world)
|
||||
D.register()
|
||||
|
||||
|
||||
/datum/controller/process/shuttle/proc/getShuttle(id)
|
||||
/datum/controller/subsystem/shuttle/proc/getShuttle(id)
|
||||
for(var/obj/docking_port/mobile/M in mobile)
|
||||
if(M.id == id)
|
||||
return M
|
||||
WARNING("couldn't find shuttle with id: [id]")
|
||||
|
||||
/datum/controller/process/shuttle/proc/getDock(id)
|
||||
/datum/controller/subsystem/shuttle/proc/getDock(id)
|
||||
for(var/obj/docking_port/stationary/S in stationary)
|
||||
if(S.id == id)
|
||||
return S
|
||||
WARNING("couldn't find dock with id: [id]")
|
||||
|
||||
/datum/controller/process/shuttle/proc/requestEvac(mob/user, call_reason)
|
||||
/datum/controller/subsystem/shuttle/proc/requestEvac(mob/user, call_reason)
|
||||
if(!emergency)
|
||||
WARNING("requestEvac(): There is no emergency shuttle, but the shuttle was called. Using the backup shuttle instead.")
|
||||
if(!backup_shuttle)
|
||||
@@ -151,19 +150,19 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master)
|
||||
|
||||
// Called when an emergency shuttle mobile docking port is
|
||||
// destroyed, which will only happen with admin intervention
|
||||
/datum/controller/process/shuttle/proc/emergencyDeregister()
|
||||
/datum/controller/subsystem/shuttle/proc/emergencyDeregister()
|
||||
// When a new emergency shuttle is created, it will override the
|
||||
// backup shuttle.
|
||||
emergency = backup_shuttle
|
||||
|
||||
/datum/controller/process/shuttle/proc/cancelEvac(mob/user)
|
||||
/datum/controller/subsystem/shuttle/proc/cancelEvac(mob/user)
|
||||
if(canRecall())
|
||||
emergency.cancel(get_area(user))
|
||||
log_game("[key_name(user)] has recalled the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has recalled the shuttle.")
|
||||
return 1
|
||||
|
||||
/datum/controller/process/shuttle/proc/canRecall()
|
||||
/datum/controller/subsystem/shuttle/proc/canRecall()
|
||||
if(emergency.mode != SHUTTLE_CALL)
|
||||
return
|
||||
if(!emergency.canRecall)
|
||||
@@ -178,7 +177,7 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master)
|
||||
return
|
||||
return 1
|
||||
|
||||
/datum/controller/process/shuttle/proc/autoEvac()
|
||||
/datum/controller/subsystem/shuttle/proc/autoEvac()
|
||||
var/callShuttle = 1
|
||||
|
||||
for(var/thing in shuttle_caller_list)
|
||||
@@ -205,7 +204,7 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master)
|
||||
message_admins("All the communications consoles were destroyed and all AIs are inactive. Shuttle called.")
|
||||
|
||||
//try to move/request to dockHome if possible, otherwise dockAway. Mainly used for admin buttons
|
||||
/datum/controller/process/shuttle/proc/toggleShuttle(shuttleId, dockHome, dockAway, timed)
|
||||
/datum/controller/subsystem/shuttle/proc/toggleShuttle(shuttleId, dockHome, dockAway, timed)
|
||||
var/obj/docking_port/mobile/M = getShuttle(shuttleId)
|
||||
if(!M)
|
||||
return 1
|
||||
@@ -222,7 +221,7 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master)
|
||||
return 0 //dock successful
|
||||
|
||||
|
||||
/datum/controller/process/shuttle/proc/moveShuttle(shuttleId, dockId, timed)
|
||||
/datum/controller/subsystem/shuttle/proc/moveShuttle(shuttleId, dockId, timed)
|
||||
var/obj/docking_port/mobile/M = getShuttle(shuttleId)
|
||||
var/obj/docking_port/stationary/D = getDock(dockId)
|
||||
if(!M)
|
||||
@@ -235,8 +234,29 @@ DECLARE_GLOBAL_CONTROLLER(shuttle, shuttle_master)
|
||||
return 2
|
||||
return 0 //dock successful
|
||||
|
||||
/datum/controller/process/shuttle/proc/initial_move()
|
||||
/datum/controller/subsystem/shuttle/proc/initial_move()
|
||||
for(var/obj/docking_port/mobile/M in mobile)
|
||||
if(!M.roundstart_move)
|
||||
continue
|
||||
M.dockRoundstart()
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/generateSupplyOrder(packId, _orderedby, _orderedbyRank, _comment, _crates)
|
||||
if(!packId)
|
||||
return
|
||||
var/datum/supply_packs/P = supply_packs["[packId]"]
|
||||
if(!P)
|
||||
return
|
||||
|
||||
var/datum/supply_order/O = new()
|
||||
O.ordernum = ordernum++
|
||||
O.object = P
|
||||
O.orderedby = _orderedby
|
||||
O.orderedbyRank = _orderedbyRank
|
||||
O.comment = _comment
|
||||
O.crates = _crates
|
||||
|
||||
requestlist += O
|
||||
|
||||
return O
|
||||
|
||||
#undef CALL_SHUTTLE_REASON_LENGTH
|
||||
@@ -0,0 +1,380 @@
|
||||
//Defines
|
||||
//Deciseconds until ticket becomes stale if unanswered. Alerts admins.
|
||||
#define ADMIN_TICKET_TIMEOUT 6000 // 10 minutes
|
||||
//Decisecions before the user is allowed to open another ticket while their existing one is open.
|
||||
#define ADMIN_TICKET_DUPLICATE_COOLDOWN 3000 // 5 minutes
|
||||
|
||||
//Status defines
|
||||
#define ADMIN_TICKET_OPEN 1
|
||||
#define ADMIN_TICKET_CLOSED 2
|
||||
#define ADMIN_TICKET_RESOLVED 3
|
||||
#define ADMIN_TICKET_STALE 4
|
||||
|
||||
SUBSYSTEM_DEF(tickets)
|
||||
name = "Tickets"
|
||||
init_order = INIT_ORDER_TICKETS
|
||||
wait = 300
|
||||
priority = FIRE_PRIORITY_TICKETS
|
||||
|
||||
flags = SS_BACKGROUND
|
||||
|
||||
var/list/allTickets
|
||||
|
||||
var/ticketCounter = 1
|
||||
|
||||
/datum/controller/subsystem/tickets/Initialize()
|
||||
LAZYINITLIST(allTickets)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/tickets/fire()
|
||||
var/stales = checkStaleness()
|
||||
if(LAZYLEN(stales))
|
||||
var/report
|
||||
for(var/num in stales)
|
||||
report += "[num], "
|
||||
message_adminTicket("<span class='adminticket'>Tickets [report] have been open for over [ADMIN_TICKET_TIMEOUT / 600] minutes. Changing status to stale.</span>")
|
||||
|
||||
/datum/controller/subsystem/tickets/stat_entry()
|
||||
..("Tickets: [allTickets.len]")
|
||||
|
||||
/datum/controller/subsystem/tickets/proc/checkStaleness()
|
||||
var/stales = list()
|
||||
for(var/T in allTickets)
|
||||
var/datum/admin_ticket/ticket = T
|
||||
if(!(ticket.ticketState == ADMIN_TICKET_OPEN))
|
||||
continue
|
||||
if(world.time > ticket.timeUntilStale && (!ticket.lastAdminResponse || !ticket.adminAssigned))
|
||||
var/id = ticket.makeStale()
|
||||
stales += id
|
||||
return stales
|
||||
|
||||
//Return the current ticket number ready to be called off.
|
||||
/datum/controller/subsystem/tickets/proc/getTicketCounter()
|
||||
return ticketCounter
|
||||
|
||||
//Return the ticket counter and increment
|
||||
/datum/controller/subsystem/tickets/proc/getTicketCounterAndInc()
|
||||
. = ticketCounter
|
||||
ticketCounter++
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/tickets/proc/resolveAllOpenTickets() // Resolve all open tickets
|
||||
for(var/i in allTickets)
|
||||
var/datum/admin_ticket/T = i
|
||||
resolveTicket(T.ticketNum)
|
||||
|
||||
//Open a new ticket and populate details then add to the list of open tickets
|
||||
/datum/controller/subsystem/tickets/proc/newTicket(client/C, passedContent, title)
|
||||
if(!C || !passedContent)
|
||||
return
|
||||
|
||||
//Check if the user has an open ticket already within the cooldown period, if so we don't create a new one and re-set the cooldown period
|
||||
var/datum/admin_ticket/existingTicket = checkForOpenTicket(C)
|
||||
if(existingTicket)
|
||||
existingTicket.setCooldownPeriod()
|
||||
to_chat(C.mob, "<span class='adminticket'>Your ticket #[existingTicket.ticketNum] remains open! Visit \"My tickets\" under the Admin Tab to view it.</span>")
|
||||
return
|
||||
|
||||
if(!title)
|
||||
title = passedContent
|
||||
|
||||
var/datum/admin_ticket/T = new(title, passedContent)
|
||||
T.clientName = C
|
||||
T.locationSent = C.mob.loc.name
|
||||
T.mobControlled = C.mob
|
||||
|
||||
//Inform the user that they have opened a ticket
|
||||
to_chat(C, "<span class='adminticket'>You have opened admin ticket number #[(SStickets.getTicketCounter() - 1)]! Please be patient and we will help you soon!</span>")
|
||||
|
||||
//Set ticket state with key N to open
|
||||
/datum/controller/subsystem/tickets/proc/openTicket(N)
|
||||
var/datum/admin_ticket/T = SStickets.allTickets[N]
|
||||
if(T.ticketState != ADMIN_TICKET_OPEN)
|
||||
T.ticketState = ADMIN_TICKET_OPEN
|
||||
return TRUE
|
||||
|
||||
//Set ticket state with key N to resolved
|
||||
/datum/controller/subsystem/tickets/proc/resolveTicket(N)
|
||||
var/datum/admin_ticket/T = SStickets.allTickets[N]
|
||||
if(T.ticketState != ADMIN_TICKET_RESOLVED)
|
||||
T.ticketState = ADMIN_TICKET_RESOLVED
|
||||
return TRUE
|
||||
|
||||
//Set ticket state with key N to closed
|
||||
/datum/controller/subsystem/tickets/proc/closeTicket(N)
|
||||
var/datum/admin_ticket/T = SStickets.allTickets[N]
|
||||
if(T.ticketState != ADMIN_TICKET_CLOSED)
|
||||
T.ticketState = ADMIN_TICKET_CLOSED
|
||||
return TRUE
|
||||
|
||||
//Check if the user already has a ticket open and within the cooldown period.
|
||||
/datum/controller/subsystem/tickets/proc/checkForOpenTicket(client/C)
|
||||
for(var/datum/admin_ticket/T in allTickets)
|
||||
if(T.clientName == C && T.ticketState == ADMIN_TICKET_OPEN && (T.ticketCooldown > world.time))
|
||||
return T
|
||||
return FALSE
|
||||
|
||||
//Check if the user has ANY ticket not resolved or closed.
|
||||
/datum/controller/subsystem/tickets/proc/checkForTicket(client/C)
|
||||
var/list/tickets = list()
|
||||
for(var/datum/admin_ticket/T in allTickets)
|
||||
if(T.clientName == C && (T.ticketState == ADMIN_TICKET_OPEN || T.ticketState == ADMIN_TICKET_STALE))
|
||||
tickets += T
|
||||
if(tickets.len)
|
||||
return tickets
|
||||
return FALSE
|
||||
|
||||
//return the client of a ticket number
|
||||
/datum/controller/subsystem/tickets/proc/returnClient(N)
|
||||
var/datum/admin_ticket/T = SStickets.allTickets[N]
|
||||
return T.clientName
|
||||
|
||||
/datum/controller/subsystem/tickets/proc/assignAdminToTicket(client/C, var/N)
|
||||
var/datum/admin_ticket/T = SStickets.allTickets[N]
|
||||
T.assignAdmin(C)
|
||||
return TRUE
|
||||
|
||||
//Single admin ticket
|
||||
|
||||
/datum/admin_ticket
|
||||
var/ticketNum // Ticket number
|
||||
var/clientName // Client which opened the ticket
|
||||
var/timeOpened // Time the ticket was opened
|
||||
var/title //The initial message with links
|
||||
var/list/content // content of the admin help
|
||||
var/lastAdminResponse // Last admin who responded
|
||||
var/lastResponseTime // When the admin last responded
|
||||
var/locationSent // Location the player was when they send the ticket
|
||||
var/mobControlled // Mob they were controlling
|
||||
var/ticketState // State of the ticket, open, closed, resolved etc
|
||||
var/timeUntilStale // When the ticket goes stale
|
||||
var/ticketCooldown // Cooldown before allowing the user to open another ticket.
|
||||
var/adminAssigned // Admin who has assigned themselves to this ticket
|
||||
|
||||
/datum/admin_ticket/New(tit, cont)
|
||||
title = tit
|
||||
content = list()
|
||||
content += cont
|
||||
timeOpened = worldtime2text()
|
||||
timeUntilStale = world.time + ADMIN_TICKET_TIMEOUT
|
||||
setCooldownPeriod()
|
||||
ticketNum = SStickets.getTicketCounterAndInc()
|
||||
ticketState = ADMIN_TICKET_OPEN
|
||||
SStickets.allTickets += src
|
||||
|
||||
//Set the cooldown period for the ticket. The time when it's created plus the defined cooldown time.
|
||||
/datum/admin_ticket/proc/setCooldownPeriod()
|
||||
ticketCooldown = world.time + ADMIN_TICKET_DUPLICATE_COOLDOWN
|
||||
|
||||
//Set the last admin who responded as the client passed as an arguement.
|
||||
/datum/admin_ticket/proc/setLastAdminResponse(client/C)
|
||||
lastAdminResponse = C
|
||||
lastResponseTime = worldtime2text()
|
||||
|
||||
//Return the ticket state as a colour coded text string.
|
||||
/datum/admin_ticket/proc/state2text()
|
||||
switch(ticketState)
|
||||
if(ADMIN_TICKET_OPEN)
|
||||
return "<font color='green'>OPEN</font>"
|
||||
if(ADMIN_TICKET_RESOLVED)
|
||||
return "<font color='blue'>RESOLVED</font>"
|
||||
if(ADMIN_TICKET_CLOSED)
|
||||
return "<font color='red'>CLOSED</font>"
|
||||
if(ADMIN_TICKET_STALE)
|
||||
return "<font color='orange'>STALE</font>"
|
||||
|
||||
//Assign the client passed to var/adminAsssigned
|
||||
/datum/admin_ticket/proc/assignAdmin(client/C)
|
||||
if(!C)
|
||||
return
|
||||
adminAssigned = C
|
||||
return TRUE
|
||||
|
||||
/datum/admin_ticket/proc/addResponse(client/C, msg)
|
||||
if(C.holder)
|
||||
setLastAdminResponse(C)
|
||||
msg = "[C]: [msg]"
|
||||
content += msg
|
||||
|
||||
/datum/admin_ticket/proc/makeStale()
|
||||
ticketState = ADMIN_TICKET_STALE
|
||||
return ticketNum
|
||||
|
||||
/*
|
||||
|
||||
UI STUFF
|
||||
|
||||
*/
|
||||
|
||||
/datum/controller/subsystem/tickets/proc/returnUI(tab = ADMIN_TICKET_OPEN)
|
||||
set name = "Open Ticket Interface"
|
||||
set category = "Tickets"
|
||||
|
||||
//dat
|
||||
var/trStyle = "border-top:2px solid; border-bottom:2px solid; padding-top: 5px; padding-bottom: 5px;"
|
||||
var/tdStyleleft = "border-top:2px solid; border-bottom:2px solid; width:150px; text-align:center;"
|
||||
var/tdStyle = "border-top:2px solid; border-bottom:2px solid;"
|
||||
var/datum/admin_ticket/ticket
|
||||
var/dat
|
||||
dat += "<head><style>.adminticket{border:2px solid}</style></head>"
|
||||
dat += "<body><h1>Admin Tickets</h1>"
|
||||
|
||||
dat +="<a href='?src=[UID()];refresh=1'>Refresh</a><br /><a href='?src=[UID()];showopen=1'>Open Tickets</a><a href='?src=[UID()];showresolved=1'>Resolved Tickets</a><a href='?src=[UID()];showclosed=1'>Closed Tickets</a>"
|
||||
if(tab == ADMIN_TICKET_OPEN)
|
||||
dat += "<h2>Open Tickets</h2>"
|
||||
dat += "<table style='width:1300px; border: 3px solid;'>"
|
||||
dat +="<tr style='[trStyle]'><th style='[tdStyleleft]'>Control</th><th style='[tdStyle]'>Ticket</th></tr>"
|
||||
if(tab == ADMIN_TICKET_OPEN)
|
||||
for(var/T in allTickets)
|
||||
ticket = T
|
||||
if(ticket.ticketState == ADMIN_TICKET_OPEN || ticket.ticketState == ADMIN_TICKET_STALE)
|
||||
dat += "<tr style='[trStyle]'><td style ='[tdStyleleft]'><a href='?src=[UID()];resolve=[ticket.ticketNum]'>Resolve</a><a href='?src=[UID()];details=[ticket.ticketNum]'>Details</a> <br /> #[ticket.ticketNum] ([ticket.timeOpened]) [ticket.ticketState == ADMIN_TICKET_STALE ? "<font color='red'><b>STALE</font>" : ""] </td><td style='[tdStyle]'><b>[ticket.title]</td></tr>"
|
||||
else
|
||||
continue
|
||||
else if(tab == ADMIN_TICKET_RESOLVED)
|
||||
dat += "<h2>Resolved Tickets</h2>"
|
||||
for(var/T in allTickets)
|
||||
ticket = T
|
||||
if(ticket.ticketState == ADMIN_TICKET_RESOLVED)
|
||||
dat += "<tr style='[trStyle]'><td style ='[tdStyleleft]'><a href='?src=[UID()];resolve=[ticket.ticketNum]'>Resolve</a><a href='?src=[UID()];details=[ticket.ticketNum]'>Details</a> <br /> #[ticket.ticketNum] ([ticket.timeOpened]) </td><td style='[tdStyle]'><b>[ticket.title]</td></tr>"
|
||||
else
|
||||
continue
|
||||
else if(tab == ADMIN_TICKET_CLOSED)
|
||||
dat += "<h2>Closed Tickets</h2>"
|
||||
for(var/T in allTickets)
|
||||
ticket = T
|
||||
if(ticket.ticketState == ADMIN_TICKET_CLOSED)
|
||||
dat += "<tr style='[trStyle]'><td style ='[tdStyleleft]'><a href='?src=[UID()];resolve=[ticket.ticketNum]'>Resolve</a><a href='?src=[UID()];details=[ticket.ticketNum]'>Details</a> <br /> #[ticket.ticketNum] ([ticket.timeOpened]) </td><td style='[tdStyle]'><b>[ticket.title]</td></tr>"
|
||||
else
|
||||
continue
|
||||
|
||||
dat += "</table></body>"
|
||||
|
||||
return dat
|
||||
|
||||
/datum/controller/subsystem/tickets/proc/showUI(mob/user, tab)
|
||||
var/dat = null
|
||||
dat = returnUI(tab)
|
||||
var/datum/browser/popup = new(user, "admintickets", "Admin Tickets", 1400, 600)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/controller/subsystem/tickets/proc/showDetailUI(mob/user, ticketID)
|
||||
var/datum/admin_ticket/T = SStickets.allTickets[ticketID]
|
||||
var/status = "[T.state2text()]"
|
||||
|
||||
var/dat = "<h1>Admin Tickets</h1>"
|
||||
|
||||
dat +="<a href='?src=[UID()];refresh=1'>Show All</a><a href='?src=[UID()];refreshdetail=[T.ticketNum]'>Refresh</a>"
|
||||
|
||||
dat += "<h2>Ticket #[T.ticketNum]</h2>"
|
||||
|
||||
dat += "<h3>[T.clientName] / [T.mobControlled] opened this ticket at [T.timeOpened] at location [T.locationSent]</h3>"
|
||||
dat += "<h4>Ticket Status: <font color='red'>[status]</font>"
|
||||
dat += "<table style='width:950px; border: 3px solid;'>"
|
||||
dat += "<tr><td>[T.title]</td></tr>"
|
||||
|
||||
if(T.content.len > 1)
|
||||
for(var/i = 2, i <= T.content.len, i++)
|
||||
dat += "<tr><td>[T.content[i]]</td></tr>"
|
||||
|
||||
dat += "</table><br /><br />"
|
||||
dat += "<a href='?src=[UID()];detailreopen=[T.ticketNum]'>Re-Open</a><a href='?src=[UID()];detailresolve=[T.ticketNum]'>Resolve</a><br /><br />"
|
||||
|
||||
if(!T.adminAssigned)
|
||||
dat += "No admin assigned to this ticket - <a href='?src=[UID()];assignadmin=[T.ticketNum]'>Take Ticket</a><br />"
|
||||
else
|
||||
dat += "[T.adminAssigned] is assigned to this Ticket. - <a href='?src=[UID()];assignadmin=[T.ticketNum]'>Take Ticket</a><br />"
|
||||
|
||||
if(T.lastAdminResponse)
|
||||
dat += "<b>Last Admin Response:</b> [T.lastAdminResponse] at [T.lastResponseTime]"
|
||||
else
|
||||
dat +="<font color='red'>No Admin Response</font>"
|
||||
|
||||
dat += "<br /><br />"
|
||||
|
||||
dat += "<a href='?src=[UID()];detailclose=[T.ticketNum]'>Close Ticket</a>"
|
||||
|
||||
var/datum/browser/popup = new(user, "adminticketsdetail", "Admin Ticket #[T.ticketNum]", 1000, 600)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/controller/subsystem/tickets/proc/userDetailUI(mob/user)
|
||||
//dat
|
||||
var/tickets = checkForTicket(user.client)
|
||||
var/dat
|
||||
dat += "<h1>Your open tickets</h1>"
|
||||
dat += "<table>"
|
||||
for(var/datum/admin_ticket/T in tickets)
|
||||
dat += "<tr><td><h2>Ticket #[T.ticketNum]</h2></td></tr>"
|
||||
for(var/i = 1, i <= T.content.len, i++)
|
||||
dat += "<tr><td>[T.content[i]]</td></tr>"
|
||||
dat += "</table>"
|
||||
|
||||
var/datum/browser/popup = new(user, "userticketsdetail", "Tickets", 1000, 600)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/controller/subsystem/tickets/Topic(href, href_list)
|
||||
|
||||
if(href_list["refresh"])
|
||||
showUI(usr)
|
||||
return
|
||||
|
||||
if(href_list["refreshdetail"])
|
||||
var/indexNum = text2num(href_list["refreshdetail"])
|
||||
showDetailUI(usr, indexNum)
|
||||
return
|
||||
|
||||
if(href_list["showopen"])
|
||||
showUI(usr, ADMIN_TICKET_OPEN)
|
||||
return
|
||||
if(href_list["showresolved"])
|
||||
showUI(usr, ADMIN_TICKET_RESOLVED)
|
||||
return
|
||||
if(href_list["showclosed"])
|
||||
showUI(usr, ADMIN_TICKET_CLOSED)
|
||||
return
|
||||
|
||||
if(href_list["details"])
|
||||
var/indexNum = text2num(href_list["details"])
|
||||
showDetailUI(usr, indexNum)
|
||||
return
|
||||
|
||||
if(href_list["resolve"])
|
||||
var/indexNum = text2num(href_list["resolve"])
|
||||
if(SStickets.resolveTicket(indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) resolved admin ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your admin ticket has now been resolved.</span>")
|
||||
showUI(usr)
|
||||
|
||||
if(href_list["detailresolve"])
|
||||
var/indexNum = text2num(href_list["detailresolve"])
|
||||
if(SStickets.resolveTicket(indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) resolved admin ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your admin ticket has now been resolved.</span>")
|
||||
showDetailUI(usr, indexNum)
|
||||
|
||||
if(href_list["detailclose"])
|
||||
var/indexNum = text2num(href_list["detailclose"])
|
||||
if(alert("Are you sure? This will send a negative message.",,"Yes","No") != "Yes")
|
||||
return
|
||||
if(SStickets.closeTicket(indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) closed admin ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>")
|
||||
to_chat(returnClient(indexNum), "<span class='boldmessage'>Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking.</span>")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your ticket has now been closed.</span>")
|
||||
showDetailUI(usr, indexNum)
|
||||
|
||||
if(href_list["detailreopen"])
|
||||
var/indexNum = text2num(href_list["detailreopen"])
|
||||
if(SStickets.openTicket(indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) re-opened admin ticket number [indexNum]")
|
||||
showDetailUI(usr, indexNum)
|
||||
|
||||
if(href_list["assignadmin"])
|
||||
var/indexNum = text2num(href_list["assignadmin"])
|
||||
if(SStickets.assignAdminToTicket(usr.client, indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) has taken ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your ticket is being handled by [usr.client].")
|
||||
showDetailUI(usr, indexNum)
|
||||
@@ -88,7 +88,7 @@
|
||||
debug_variables(npcai_master)
|
||||
feedback_add_details("admin_verb","DNPCAI")
|
||||
if("Shuttle")
|
||||
debug_variables(shuttle_master)
|
||||
debug_variables(SSshuttle)
|
||||
feedback_add_details("admin_verb","DShuttle")
|
||||
if("Timer")
|
||||
debug_variables(SStimer)
|
||||
@@ -100,7 +100,7 @@
|
||||
debug_variables(space_manager)
|
||||
feedback_add_details("admin_verb","DSpace")
|
||||
if("Mob Hunt Server")
|
||||
debug_variables(mob_hunt_server)
|
||||
debug_variables(SSmob_hunt)
|
||||
feedback_add_details("admin_verb","DMobHuntServer")
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@
|
||||
|
||||
//check for centcomm shuttles
|
||||
for(var/centcom_shuttle in list("emergency", "pod1", "pod2", "pod3", "pod4", "ferry"))
|
||||
var/obj/docking_port/mobile/M = shuttle_master.getShuttle(centcom_shuttle)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(centcom_shuttle)
|
||||
if(T in M.areaInstance)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
/datum/game_mode/traitor/autotraitor/proc/traitorcheckloop()
|
||||
spawn(9000)
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
return
|
||||
//message_admins("Performing AutoTraitor Check")
|
||||
var/playercount = 0
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
/datum/game_mode/traitor/autotraitor/latespawn(mob/living/carbon/human/character)
|
||||
..()
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
return
|
||||
//message_admins("Late Join Check")
|
||||
if(character.client && (ROLE_TRAITOR in character.client.prefs.be_special) && !jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, "Syndicate"))
|
||||
|
||||
@@ -145,8 +145,8 @@ var/list/blob_nodes = list()
|
||||
for(var/datum/mind/blob in infected_crew)
|
||||
greet_blob(blob)
|
||||
|
||||
if(shuttle_master)
|
||||
shuttle_master.emergencyNoEscape = 1
|
||||
if(SSshuttle)
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
|
||||
spawn(0)
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ var/global/list/all_cults = list()
|
||||
var/area/A = get_area(cult_mind.current )
|
||||
if( is_type_in_list(A, centcom_areas))
|
||||
acolytes_survived++
|
||||
else if(A == shuttle_master.emergency.areaInstance && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) //snowflaked into objectives because shitty bay shuttles had areas to auto-determine this
|
||||
else if(A == SSshuttle.emergency.areaInstance && SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) //snowflaked into objectives because shitty bay shuttles had areas to auto-determine this
|
||||
acolytes_survived++
|
||||
|
||||
if(acolytes_survived>=acolytes_needed)
|
||||
|
||||
@@ -251,10 +251,10 @@
|
||||
to_chat(user, "<span class='warning'>Nar-Sie or his avatars are already on this plane, there is no delaying the end of all things.</span>")
|
||||
return
|
||||
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
|
||||
var/cursetime = 1800
|
||||
var/timer = shuttle_master.emergency.timeLeft(1) + cursetime
|
||||
shuttle_master.emergency.setTimer(timer)
|
||||
var/timer = SSshuttle.emergency.timeLeft(1) + cursetime
|
||||
SSshuttle.emergency.setTimer(timer)
|
||||
to_chat(user,"<span class='danger'>You shatter the orb! A dark essence spirals into the air, then disappears.</span>")
|
||||
playsound(user.loc, 'sound/effects/Glassbr1.ogg', 50, 1)
|
||||
qdel(src)
|
||||
|
||||
@@ -626,8 +626,8 @@ var/list/teleport_runes = list()
|
||||
new /mob/living/simple_animal/slaughter/cult(T, pick(NORTH, EAST, SOUTH, WEST))
|
||||
new /mob/living/simple_animal/slaughter/cult(T, pick(NORTHEAST, SOUTHEAST, NORTHWEST, SOUTHWEST))
|
||||
cult_mode.demons_summoned = 1
|
||||
shuttle_master.emergency.request(null, 0.5,null)
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.request(null, 0.5,null)
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
cult_mode.third_phase()
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
break
|
||||
|
||||
/datum/game_mode/proc/check_finished() //to be called by ticker
|
||||
if((shuttle_master.emergency && shuttle_master.emergency.mode >= SHUTTLE_ENDGAME) || station_was_nuked)
|
||||
if((SSshuttle.emergency && SSshuttle.emergency.mode >= SHUTTLE_ENDGAME) || station_was_nuked)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
var/list/area/escape_locations = list(/area/shuttle/escape, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom)
|
||||
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME) //shuttle didn't get to centcom
|
||||
if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME) //shuttle didn't get to centcom
|
||||
escape_locations -= /area/shuttle/escape
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
@@ -206,7 +206,7 @@
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations)
|
||||
escaped_total++
|
||||
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == shuttle_master.emergency.areaInstance.type && shuttle_master.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == SSshuttle.emergency.areaInstance.type && SSshuttle.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
escaped_on_shuttle++
|
||||
|
||||
if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod1/centcom)
|
||||
|
||||
@@ -387,7 +387,7 @@ var/round_start_time = 0
|
||||
|
||||
//emergency_shuttle.process() DONE THROUGH PROCESS SCHEDULER
|
||||
|
||||
var/game_finished = shuttle_master.emergency.mode >= SHUTTLE_ENDGAME || mode.station_was_nuked
|
||||
var/game_finished = SSshuttle.emergency.mode >= SHUTTLE_ENDGAME || mode.station_was_nuked
|
||||
if(config.continuous_rounds)
|
||||
mode.check_finished() // some modes contain var-changing code in here, so call even if we don't uses result
|
||||
else
|
||||
|
||||
@@ -57,10 +57,10 @@
|
||||
|
||||
/obj/machinery/doomsday_device/Destroy()
|
||||
fast_processing -= src
|
||||
shuttle_master.emergencyNoEscape = 0
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_STRANDED)
|
||||
shuttle_master.emergency.mode = SHUTTLE_DOCKED
|
||||
shuttle_master.emergency.timer = world.time
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
SSshuttle.emergency.timer = world.time
|
||||
priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
|
||||
return ..()
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
detonation_timer = world.time + default_timer
|
||||
timing = 1
|
||||
fast_processing += src
|
||||
shuttle_master.emergencyNoEscape = 1
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
|
||||
/obj/machinery/doomsday_device/proc/seconds_remaining()
|
||||
. = max(0, (round(detonation_timer - world.time) / 10))
|
||||
@@ -77,10 +77,10 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T || !is_station_level(T.z))
|
||||
minor_announcement.Announce("DOOMSDAY DEVICE OUT OF STATION RANGE, ABORTING", "ERROR ER0RR $R0RRO$!R41.%%!!(%$^^__+ @#F0E4", 'sound/misc/notice1.ogg')
|
||||
shuttle_master.emergencyNoEscape = 0
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_STRANDED)
|
||||
shuttle_master.emergency.mode = SHUTTLE_DOCKED
|
||||
shuttle_master.emergency.timer = world.time
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
SSshuttle.emergency.timer = world.time
|
||||
priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
|
||||
qdel(src)
|
||||
if(!timing)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
var/turf/location = get_turf(player.loc)
|
||||
if(!location) continue
|
||||
|
||||
if(location.loc.type == shuttle_master.emergency.areaInstance.type) //didn't work in the switch for some reason
|
||||
if(location.loc.type == SSshuttle.emergency.areaInstance.type) //didn't work in the switch for some reason
|
||||
text += "<br><b><font size=2>[player.real_name] escaped on the emergency shuttle</font></b>"
|
||||
|
||||
else
|
||||
|
||||
@@ -176,8 +176,8 @@
|
||||
var/obj/machinery/abductor/console/con = get_team_console(team_number)
|
||||
var/datum/objective/objective = team_objectives[team_number]
|
||||
if(con.experiment.points >= objective.target_amount)
|
||||
shuttle_master.emergency.request(null, 0.5)
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.request(null, 0.5)
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
finished = 1
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -300,7 +300,7 @@ proc/issyndicate(mob/living/M as mob)
|
||||
if(!D.onCentcom())
|
||||
disk_rescued = 0
|
||||
break
|
||||
var/crew_evacuated = (shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
var/crew_evacuated = (SSshuttle.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
//var/operatives_are_dead = is_operatives_are_dead()
|
||||
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ var/bomb_set
|
||||
|
||||
if(ticker)
|
||||
if(ticker.mode && ticker.mode.name == "nuclear emergency")
|
||||
var/obj/docking_port/mobile/syndie_shuttle = shuttle_master.getShuttle("syndicate")
|
||||
var/obj/docking_port/mobile/syndie_shuttle = SSshuttle.getShuttle("syndicate")
|
||||
if(syndie_shuttle)
|
||||
ticker.mode:syndies_didnt_escape = is_station_level(syndie_shuttle.z)
|
||||
ticker.mode:nuke_off_station = off_station
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
visible_message("<span class='notice'>Authentication Disk Locator mode actived.</span>")
|
||||
return
|
||||
if(!home)
|
||||
home = shuttle_master.getShuttle("syndicate")
|
||||
home = SSshuttle.getShuttle("syndicate")
|
||||
if(!home)
|
||||
icon_state = icon_null
|
||||
return
|
||||
|
||||
@@ -177,16 +177,16 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu
|
||||
/datum/objective/hijack/check_completion()
|
||||
if(!owner.current || owner.current.stat)
|
||||
return 0
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
|
||||
if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
if(issilicon(owner.current))
|
||||
return 0
|
||||
|
||||
var/area/A = get_area(owner.current)
|
||||
if(shuttle_master.emergency.areaInstance != A)
|
||||
if(SSshuttle.emergency.areaInstance != A)
|
||||
return 0
|
||||
|
||||
return shuttle_master.emergency.is_hijacked()
|
||||
return SSshuttle.emergency.is_hijacked()
|
||||
|
||||
/datum/objective/hijackclone
|
||||
explanation_text = "Hijack the shuttle by ensuring only you (or your copies) escape."
|
||||
@@ -195,10 +195,10 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu
|
||||
/datum/objective/hijackclone/check_completion()
|
||||
if(!owner.current)
|
||||
return 0
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
|
||||
if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
|
||||
var/area/A = shuttle_master.emergency.areaInstance
|
||||
var/area/A = SSshuttle.emergency.areaInstance
|
||||
|
||||
for(var/mob/living/player in player_list) //Make sure nobody else is onboard
|
||||
if(player.mind && player.mind != owner)
|
||||
@@ -226,12 +226,12 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu
|
||||
/datum/objective/block/check_completion()
|
||||
if(!istype(owner.current, /mob/living/silicon))
|
||||
return 0
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
|
||||
if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
if(!owner.current)
|
||||
return 0
|
||||
|
||||
var/area/A = shuttle_master.emergency.areaInstance
|
||||
var/area/A = SSshuttle.emergency.areaInstance
|
||||
var/list/protected_mobs = list(/mob/living/silicon/ai, /mob/living/silicon/pai, /mob/living/silicon/robot)
|
||||
|
||||
for(var/mob/living/player in player_list)
|
||||
@@ -258,7 +258,7 @@ var/list/potential_theft_objectives = subtypesof(/datum/theft_objective) - /datu
|
||||
return 1
|
||||
if(ticker.mode.station_was_nuked) //If they escaped the blast somehow, let them win
|
||||
return 1
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_ENDGAME)
|
||||
if(SSshuttle.emergency.mode < SHUTTLE_ENDGAME)
|
||||
return 0
|
||||
var/turf/location = get_turf(owner.current)
|
||||
if(!location)
|
||||
|
||||
@@ -80,8 +80,8 @@
|
||||
for(var/datum/mind/rev_mind in head_revolutionaries)
|
||||
greet_revolutionary(rev_mind)
|
||||
modePlayer += head_revolutionaries
|
||||
if(shuttle_master)
|
||||
shuttle_master.emergencyNoEscape = 1
|
||||
if(SSshuttle)
|
||||
SSshuttle.emergencyNoEscape = 1
|
||||
..()
|
||||
|
||||
|
||||
@@ -216,10 +216,10 @@
|
||||
/datum/game_mode/revolution/check_finished()
|
||||
if(config.continuous_rounds)
|
||||
if(finished != 0)
|
||||
shuttle_master.emergencyNoEscape = 0
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_STRANDED)
|
||||
shuttle_master.emergency.mode = SHUTTLE_DOCKED
|
||||
shuttle_master.emergency.timer = world.time
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
SSshuttle.emergency.timer = world.time
|
||||
command_announcement.Announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg')
|
||||
return ..()
|
||||
if(finished != 0)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if(I.stat == DEAD && is_station_level(I.z))
|
||||
score_deadcrew++
|
||||
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
for(var/mob/living/player in mob_list)
|
||||
if(player.client)
|
||||
if(player.stat != DEAD)
|
||||
@@ -43,12 +43,12 @@
|
||||
var/cash_score = 0
|
||||
var/dmg_score = 0
|
||||
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_ENDGAME)
|
||||
for(var/mob/living/carbon/human/E in mob_list)
|
||||
cash_score = 0
|
||||
dmg_score = 0
|
||||
var/turf/location = get_turf(E.loc)
|
||||
var/area/escape_zone = shuttle_master.emergency.areaInstance
|
||||
var/area/escape_zone = SSshuttle.emergency.areaInstance
|
||||
|
||||
if(E.stat != DEAD && location in escape_zone) // Escapee Scores
|
||||
cash_score = get_score_container_worth(E)
|
||||
@@ -183,7 +183,7 @@
|
||||
<b>Ore Mined:</b> [score_oremined] ([score_oremined * 2] Points)<br>
|
||||
<b>Refreshments Prepared:</b> [score_meals] ([score_meals * 5] Points)<br>
|
||||
<b>Research Completed:</b> [score_researchdone] ([score_researchdone * 30] Points)<br>"}
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_ENDGAME) dat += "<b>Shuttle Escapees:</b> [score_escapees] ([score_escapees * 25] Points)<br>"
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_ENDGAME) dat += "<b>Shuttle Escapees:</b> [score_escapees] ([score_escapees * 25] Points)<br>"
|
||||
dat += {"<b>Random Events Endured:</b> [score_eventsendured] ([score_eventsendured * 50] Points)<br>
|
||||
<b>Whole Station Powered:</b> [score_powerbonus ? "Yes" : "No"] ([score_powerbonus * 2500] Points)<br>
|
||||
<b>Ultra-Clean Station:</b> [score_mess ? "No" : "Yes"] ([score_messbonus * 3000] Points)<br><br>
|
||||
@@ -203,7 +203,7 @@
|
||||
dat += {"<b>Richest Escapee:</b> [score_richestname], [score_richestjob]: $[num2text(score_richestcash,50)] ([score_richestkey])<br>
|
||||
<b>Most Battered Escapee:</b> [score_dmgestname], [score_dmgestjob]: [score_dmgestdamage] damage ([score_dmgestkey])<br>"}
|
||||
else
|
||||
if(shuttle_master.emergency.mode <= SHUTTLE_STRANDED)
|
||||
if(SSshuttle.emergency.mode <= SHUTTLE_STRANDED)
|
||||
dat += "The station wasn't evacuated!<br>"
|
||||
else
|
||||
dat += "No-one escaped!<br>"
|
||||
|
||||
@@ -255,11 +255,11 @@ Made by Xhuis
|
||||
|
||||
|
||||
/datum/game_mode/shadowling/declare_completion()
|
||||
if(check_shadow_victory() && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE) //Doesn't end instantly - this is hacky and I don't know of a better way ~X
|
||||
if(check_shadow_victory() && SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) //Doesn't end instantly - this is hacky and I don't know of a better way ~X
|
||||
to_chat(world, "<span class='greentext'><b>The shadowlings have ascended and taken over the station!</b></span>")
|
||||
else if(shadowling_dead && !check_shadow_victory()) //If the shadowlings have ascended, they can not lose the round
|
||||
to_chat(world, "<span class='redtext'><b>The shadowlings have been killed by the crew!</b></span>")
|
||||
else if(!check_shadow_victory() && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
else if(!check_shadow_victory() && SSshuttle.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
to_chat(world, "<span class='redtext'><b>The crew escaped the station before the shadowlings could ascend!</b></span>")
|
||||
else
|
||||
to_chat(world, "<span class='redtext'><b>The shadowlings have failed!</b></span>")
|
||||
|
||||
@@ -706,7 +706,7 @@
|
||||
to_chat(user, "<span class='warning'>[target] must be a thrall.</span>")
|
||||
charge_counter = charge_max
|
||||
return
|
||||
if(shuttle_master.emergency.mode != SHUTTLE_CALL)
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_CALL)
|
||||
to_chat(user, "<span class='warning'>The shuttle must be inbound only to the station.</span>")
|
||||
charge_counter = charge_max
|
||||
return
|
||||
@@ -723,13 +723,13 @@
|
||||
M.visible_message("<span class='warning'>[M]'s eyes suddenly flare red. They proceed to collapse on the floor, not breathing.</span>", \
|
||||
"<span class='warning'><b>...speeding by... ...pretty blue glow... ...touch it... ...no glow now... ...no light... ...nothing at all...</span>")
|
||||
M.death()
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_CALL)
|
||||
var/more_minutes = 9000
|
||||
var/timer = shuttle_master.emergency.timeLeft()
|
||||
var/timer = SSshuttle.emergency.timeLeft()
|
||||
timer += more_minutes
|
||||
event_announcement.Announce("Major system failure aboard the emergency shuttle. This will extend its arrival time by approximately 15 minutes and the shuttle is unable to be recalled.", "System Failure", 'sound/misc/notice1.ogg')
|
||||
shuttle_master.emergency.setTimer(timer)
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.setTimer(timer)
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
user.mind.spell_list.Remove(src) //Can only be used once!
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -178,8 +178,8 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
|
||||
H.loc = A
|
||||
sleep(50)
|
||||
if(!ticker.mode.shadowling_ascended)
|
||||
shuttle_master.emergency.request(null, 0.3)
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.request(null, 0.3)
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
ticker.mode.shadowling_ascended = 1
|
||||
A.mind.RemoveSpell(src)
|
||||
qdel(H)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
/datum/game_mode/wizard/raginmages/proc/make_more_mages()
|
||||
|
||||
if(making_mage || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
if(making_mage || SSshuttle.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
return 0
|
||||
making_mage = 1
|
||||
var/list/candidates = list()
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
return desc
|
||||
|
||||
/datum/job_objective/maximize_research/check_for_completion()
|
||||
for(var/tech in shuttle_master.techLevels)
|
||||
if(shuttle_master.techLevels[tech] > 0)
|
||||
for(var/tech in SSshuttle.techLevels)
|
||||
if(SSshuttle.techLevels[tech] > 0)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
return
|
||||
|
||||
call_shuttle_proc(usr, input)
|
||||
if(shuttle_master.emergency.timer)
|
||||
if(SSshuttle.emergency.timer)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
cancel_call_proc(usr)
|
||||
if(shuttle_master.emergency.timer)
|
||||
if(SSshuttle.emergency.timer)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
@@ -288,8 +288,8 @@
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("RestartNanoMob")
|
||||
if(mob_hunt_server)
|
||||
if(mob_hunt_server.manual_reboot())
|
||||
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")
|
||||
@@ -392,16 +392,16 @@
|
||||
data["current_message"] = data["is_ai"] ? messagetext[aicurrmsg] : messagetext[currmsg]
|
||||
data["current_message_title"] = data["is_ai"] ? messagetitle[aicurrmsg] : messagetitle[currmsg]
|
||||
|
||||
data["lastCallLoc"] = shuttle_master.emergencyLastCallLoc ? format_text(shuttle_master.emergencyLastCallLoc.name) : null
|
||||
data["lastCallLoc"] = SSshuttle.emergencyLastCallLoc ? format_text(SSshuttle.emergencyLastCallLoc.name) : null
|
||||
|
||||
var/shuttle[0]
|
||||
switch(shuttle_master.emergency.mode)
|
||||
switch(SSshuttle.emergency.mode)
|
||||
if(SHUTTLE_IDLE, SHUTTLE_RECALL)
|
||||
shuttle["callStatus"] = 2 //#define
|
||||
else
|
||||
shuttle["callStatus"] = 1
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
|
||||
var/timeleft = shuttle_master.emergency.timeLeft()
|
||||
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
|
||||
@@ -447,11 +447,11 @@
|
||||
to_chat(user, "<span class='warning'>Central Command will not allow the shuttle to be called. Consider all contracts terminated.</span>")
|
||||
return
|
||||
|
||||
if(shuttle_master.emergencyNoEscape)
|
||||
if(SSshuttle.emergencyNoEscape)
|
||||
to_chat(user, "<span class='warning'>The emergency shuttle may not be sent at this time. Please try again later.</span>")
|
||||
return
|
||||
|
||||
if(shuttle_master.emergency.mode > SHUTTLE_ESCAPE)
|
||||
if(SSshuttle.emergency.mode > SHUTTLE_ESCAPE)
|
||||
to_chat(user, "<span class='warning'>The emergency shuttle may not be called while returning to Central Command.</span>")
|
||||
return
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
to_chat(user, "<span class='warning'>Under directive 7-10, [station_name()] is quarantined until further notice.</span>")
|
||||
return
|
||||
|
||||
shuttle_master.requestEvac(user, reason)
|
||||
SSshuttle.requestEvac(user, reason)
|
||||
log_game("[key_name(user)] has called the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has called the shuttle.", 1)
|
||||
|
||||
@@ -468,7 +468,7 @@
|
||||
/proc/init_shift_change(var/mob/user, var/force = 0)
|
||||
// if force is 0, some things may stop the shuttle call
|
||||
if(!force)
|
||||
if(shuttle_master.emergencyNoEscape)
|
||||
if(SSshuttle.emergencyNoEscape)
|
||||
to_chat(user, "Central Command does not currently have a shuttle available in your sector. Please try again later.")
|
||||
return
|
||||
|
||||
@@ -485,11 +485,11 @@
|
||||
return
|
||||
|
||||
if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED) // There is a serious threat we gotta move no time to give them five minutes.
|
||||
shuttle_master.emergency.request(null, 0.5, null, " Automatic Crew Transfer", 1)
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.request(null, 0.5, null, " Automatic Crew Transfer", 1)
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
else
|
||||
shuttle_master.emergency.request(null, 1, null, " Automatic Crew Transfer", 0)
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.request(null, 1, null, " Automatic Crew Transfer", 0)
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
if(user)
|
||||
log_game("[key_name(user)] has called the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has called the shuttle - [formatJumpTo(user)].", 1)
|
||||
@@ -500,7 +500,7 @@
|
||||
if(ticker.mode.name == "meteor")
|
||||
return
|
||||
|
||||
if(shuttle_master.cancelEvac(user))
|
||||
if(SSshuttle.cancelEvac(user))
|
||||
log_game("[key_name(user)] has recalled the shuttle.")
|
||||
message_admins("[key_name_admin(user)] has recalled the shuttle - [ADMIN_FLW(user)].", 1)
|
||||
else
|
||||
@@ -534,7 +534,7 @@
|
||||
|
||||
/obj/machinery/computer/communications/Destroy()
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
SSshuttle.autoEvac()
|
||||
return ..()
|
||||
|
||||
/obj/item/circuitboard/communications/New()
|
||||
@@ -543,7 +543,7 @@
|
||||
|
||||
/obj/item/circuitboard/communications/Destroy()
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
SSshuttle.autoEvac()
|
||||
return ..()
|
||||
|
||||
/proc/print_command_report(text = "", title = "Central Command Update")
|
||||
|
||||
@@ -89,10 +89,10 @@
|
||||
return 1
|
||||
if(STATUS_DISPLAY_TRANSFER_SHUTTLE_TIME) //emergency shuttle timer
|
||||
var/use_warn = 0
|
||||
if(shuttle_master.emergency && shuttle_master.emergency.timer)
|
||||
if(SSshuttle.emergency && SSshuttle.emergency.timer)
|
||||
use_warn = 1
|
||||
message1 = "-[shuttle_master.emergency.getModeStr()]-"
|
||||
message2 = shuttle_master.emergency.getTimerStr()
|
||||
message1 = "-[SSshuttle.emergency.getModeStr()]-"
|
||||
message2 = SSshuttle.emergency.getTimerStr()
|
||||
|
||||
if(length(message2) > CHARS_PER_LINE)
|
||||
message2 = "Error!"
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
/obj/machinery/status_display/supply_display/update()
|
||||
if(!..() && mode == STATUS_DISPLAY_CUSTOM)
|
||||
if(shuttle_master.supply.mode == SHUTTLE_IDLE)
|
||||
if(is_station_level(shuttle_master.supply.z))
|
||||
if(SSshuttle.supply.mode == SHUTTLE_IDLE)
|
||||
if(is_station_level(SSshuttle.supply.z))
|
||||
message1 = "CARGO"
|
||||
message2 = "Docked"
|
||||
else
|
||||
@@ -13,7 +13,7 @@
|
||||
message2 = station_time_timestamp("hh:mm")
|
||||
else
|
||||
message1 = "CARGO"
|
||||
message2 = shuttle_master.supply.getTimerStr()
|
||||
message2 = SSshuttle.supply.getTimerStr()
|
||||
if(lentext(message2) > CHARS_PER_LINE)
|
||||
message2 = "Error"
|
||||
|
||||
|
||||
@@ -268,3 +268,20 @@
|
||||
ruin_landmarks -= src
|
||||
ruin_template = null
|
||||
. = ..()
|
||||
|
||||
// Damage tiles
|
||||
/obj/effect/landmark/damageturf
|
||||
icon_state = "damaged"
|
||||
|
||||
/obj/effect/landmark/damageturf/New()
|
||||
..()
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
T.break_tile()
|
||||
|
||||
/obj/effect/landmark/burnturf
|
||||
icon_state = "burned"
|
||||
|
||||
/obj/effect/landmark/burnturf/New()
|
||||
..()
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
T.burn_tile()
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
levelupdate()
|
||||
visibilityChanged()
|
||||
|
||||
/turf/simulated/proc/break_tile()
|
||||
|
||||
/turf/simulated/proc/burn_tile()
|
||||
|
||||
/turf/simulated/proc/MakeSlippery(wet_setting = TURF_WET_WATER) // 1 = Water, 2 = Lube, 3 = Ice
|
||||
|
||||
@@ -25,10 +25,11 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
var/lava = 0
|
||||
var/broken = 0
|
||||
var/burnt = 0
|
||||
var/current_overlay = null
|
||||
var/floor_tile = null //tile that this floor drops
|
||||
var/obj/item/stack/tile/builtin_tile = null //needed for performance reasons when the singularity rips off floor tiles
|
||||
var/list/broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
|
||||
var/list/burnt_states = list()
|
||||
var/list/burnt_states = list("floorscorched1", "floorscorched2")
|
||||
|
||||
|
||||
/turf/simulated/floor/New()
|
||||
@@ -89,6 +90,9 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
/turf/simulated/floor/proc/update_icon()
|
||||
if(air)
|
||||
update_visuals()
|
||||
overlays -= current_overlay
|
||||
if(current_overlay)
|
||||
overlays.Add(current_overlay)
|
||||
return 1
|
||||
|
||||
/turf/simulated/floor/proc/gets_drilled()
|
||||
@@ -98,20 +102,19 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
var/turf/simulated/floor/plating/T = make_plating()
|
||||
T.break_tile()
|
||||
|
||||
/turf/simulated/floor/proc/break_tile()
|
||||
/turf/simulated/floor/break_tile()
|
||||
if(broken)
|
||||
return
|
||||
icon_state = pick(broken_states)
|
||||
broken = 1
|
||||
current_overlay = pick(broken_states)
|
||||
broken = TRUE
|
||||
update_icon()
|
||||
|
||||
/turf/simulated/floor/burn_tile()
|
||||
if(broken || burnt)
|
||||
if(burnt)
|
||||
return
|
||||
if(burnt_states.len)
|
||||
icon_state = pick(burnt_states)
|
||||
else
|
||||
icon_state = pick(broken_states)
|
||||
burnt = 1
|
||||
current_overlay = pick(burnt_states)
|
||||
burnt = TRUE
|
||||
update_icon()
|
||||
|
||||
/turf/simulated/floor/proc/make_plating()
|
||||
return ChangeTurf(/turf/simulated/floor/plating)
|
||||
@@ -187,6 +190,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
if(broken || burnt)
|
||||
broken = 0
|
||||
burnt = 0
|
||||
current_overlay = null
|
||||
if(user && !silent)
|
||||
to_chat(user, "<span class='danger'>You remove the broken plating.</span>")
|
||||
else
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
icon_state = "plating"
|
||||
intact = 0
|
||||
floor_tile = null
|
||||
broken_states = list("platingdmg1", "platingdmg2", "platingdmg3")
|
||||
burnt_states = list("panelscorched")
|
||||
broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
|
||||
burnt_states = list("floorscorched1", "floorscorched2")
|
||||
|
||||
footstep_sounds = list(
|
||||
"human" = list('sound/effects/footstep/plating_human.ogg'),
|
||||
@@ -60,9 +60,10 @@
|
||||
if(welder.remove_fuel(0,user))
|
||||
to_chat(user, "<span class='danger'>You fix some dents on the broken plating.</span>")
|
||||
playsound(src, welder.usesound, 80, 1)
|
||||
icon_state = icon_plating
|
||||
current_overlay = null
|
||||
burnt = 0
|
||||
broken = 0
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/turf/simulated/floor/plating/airless
|
||||
|
||||
+3
-3
@@ -126,11 +126,11 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
s["security_level"] = get_security_level()
|
||||
s["ticker_state"] = ticker.current_state
|
||||
|
||||
if(shuttle_master && shuttle_master.emergency)
|
||||
if(SSshuttle && SSshuttle.emergency)
|
||||
// Shuttle status, see /__DEFINES/stat.dm
|
||||
s["shuttle_mode"] = shuttle_master.emergency.mode
|
||||
s["shuttle_mode"] = SSshuttle.emergency.mode
|
||||
// Shuttle timer, in seconds
|
||||
s["shuttle_timer"] = shuttle_master.emergency.timeLeft()
|
||||
s["shuttle_timer"] = SSshuttle.emergency.timeLeft()
|
||||
|
||||
for(var/i in 1 to admins.len)
|
||||
var/list/A = admins[i]
|
||||
|
||||
@@ -170,7 +170,6 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/admin_serialize,
|
||||
/client/proc/jump_to_ruin,
|
||||
/client/proc/toggle_medal_disable,
|
||||
/client/proc/startadmintickets,
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
|
||||
@@ -407,11 +407,11 @@
|
||||
dat += "Current Game Mode: <B>[ticker.mode.name]</B><BR>"
|
||||
dat += "Round Duration: <B>[round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)]:[add_zero(num2text(ROUND_TIME / 10 % 60), 2)]</B><BR>"
|
||||
dat += "<B>Emergency shuttle</B><BR>"
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_CALL)
|
||||
if(SSshuttle.emergency.mode < SHUTTLE_CALL)
|
||||
dat += "<a href='?src=[UID()];call_shuttle=1'>Call Shuttle</a><br>"
|
||||
else
|
||||
var/timeleft = shuttle_master.emergency.timeLeft()
|
||||
if(shuttle_master.emergency.mode < SHUTTLE_DOCKED)
|
||||
var/timeleft = SSshuttle.emergency.timeLeft()
|
||||
if(SSshuttle.emergency.mode < SHUTTLE_DOCKED)
|
||||
dat += "ETA: <a href='?_src_=holder;edit_shuttle_time=1'>[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]</a><BR>"
|
||||
dat += "<a href='?_src_=holder;call_shuttle=2'>Send Back</a><br>"
|
||||
else
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
/*
|
||||
Admin ticket system by Birdtalon
|
||||
*/
|
||||
//Global holder
|
||||
|
||||
var/global/datum/adminTicketHolder/globAdminTicketHolder = new /datum/adminTicketHolder
|
||||
|
||||
//Defines
|
||||
//Deciseconds until ticket becomes stale if unanswered. Alerts admins.
|
||||
#define ADMIN_TICKET_TIMEOUT 6000 // 10 minutes
|
||||
//Decisecions before the user is allowed to open another ticket while their existing one is open.
|
||||
#define ADMIN_TICKET_DUPLICATE_COOLDOWN 3000 // 5 minutes
|
||||
|
||||
//Status defines
|
||||
#define ADMIN_TICKET_OPEN 1
|
||||
#define ADMIN_TICKET_CLOSED 2
|
||||
#define ADMIN_TICKET_RESOLVED 3
|
||||
#define ADMIN_TICKET_STALE 4
|
||||
|
||||
//Datum holding all tickets
|
||||
/datum/adminTicketHolder
|
||||
var/ticketCounter = 1 // Counts the tickets and used to assign the id number
|
||||
var/list/allTickets = list()
|
||||
|
||||
//Return the current ticket number ready to be called off.
|
||||
/datum/adminTicketHolder/proc/getTicketCounter()
|
||||
return ticketCounter
|
||||
|
||||
//Return the ticket counter and increment
|
||||
/datum/adminTicketHolder/proc/getTicketCounterAndInc()
|
||||
. = ticketCounter
|
||||
ticketCounter++
|
||||
return
|
||||
|
||||
/datum/adminTicketHolder/proc/resolveAllOpenTickets() // Resolve all open tickets
|
||||
for(var/i in allTickets)
|
||||
var/datum/admin_ticket/T = i
|
||||
resolveTicket(T.ticketNum)
|
||||
|
||||
//Open a new ticket and populate details then add to the list of open tickets
|
||||
/datum/adminTicketHolder/proc/newTicket(var/client/C, var/passedContent, var/title)
|
||||
if(!C || !passedContent)
|
||||
return
|
||||
|
||||
//Check if the user has an open ticket already within the cooldown period, if so we don't create a new one and re-set the cooldown period
|
||||
var/datum/admin_ticket/existingTicket = checkForOpenTicket(C)
|
||||
if(existingTicket)
|
||||
existingTicket.setCooldownPeriod()
|
||||
to_chat(C, "<span class='adminticket'>Your ticket #[existingTicket.ticketNum] remains open! Visit \"My tickets\" under the Admin Tab to view it.</span>")
|
||||
return
|
||||
|
||||
if(!title)
|
||||
title = passedContent
|
||||
|
||||
var/datum/admin_ticket/T = new /datum/admin_ticket
|
||||
T.clientName = C
|
||||
T.timeOpened = worldtime2text()
|
||||
T.title = title
|
||||
T.content += passedContent
|
||||
T.locationSent = C.mob.loc.loc.name
|
||||
T.mobControlled = C.mob
|
||||
T.ticketState = ADMIN_TICKET_OPEN
|
||||
T.timeUntilStale = world.time + ADMIN_TICKET_TIMEOUT
|
||||
T.setCooldownPeriod()
|
||||
T.ticketNum = getTicketCounterAndInc()
|
||||
allTickets += T
|
||||
|
||||
//Inform the user that they have opened a ticket
|
||||
to_chat(C, "<span class='adminticket'>You have opened admin ticket number #[(globAdminTicketHolder.getTicketCounter() - 1)]! Please be patient and we will help you soon!</span>")
|
||||
|
||||
//Begin the stale count for this ticket.
|
||||
spawn(0)
|
||||
T.beginStaleCount()
|
||||
|
||||
//Set ticket state with key N to open
|
||||
/datum/adminTicketHolder/proc/openTicket(var/N)
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.allTickets[N]
|
||||
if(T.ticketState != ADMIN_TICKET_OPEN)
|
||||
T.ticketState = ADMIN_TICKET_OPEN
|
||||
return TRUE
|
||||
|
||||
//Set ticket state with key N to resolved
|
||||
/datum/adminTicketHolder/proc/resolveTicket(var/N)
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.allTickets[N]
|
||||
if(T.ticketState != ADMIN_TICKET_RESOLVED)
|
||||
T.ticketState = ADMIN_TICKET_RESOLVED
|
||||
return TRUE
|
||||
|
||||
//Set ticket state with key N to closed
|
||||
/datum/adminTicketHolder/proc/closeTicket(var/N)
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.allTickets[N]
|
||||
if(T.ticketState != ADMIN_TICKET_CLOSED)
|
||||
T.ticketState = ADMIN_TICKET_CLOSED
|
||||
return TRUE
|
||||
|
||||
//Check if the user already has a ticket open and within the cooldown period.
|
||||
/datum/adminTicketHolder/proc/checkForOpenTicket(var/client/C)
|
||||
for(var/datum/admin_ticket/T in allTickets)
|
||||
if(T.clientName == C && T.ticketState == ADMIN_TICKET_OPEN && (T.ticketCooldown > world.time))
|
||||
return T
|
||||
return FALSE
|
||||
|
||||
//Check if the user has ANY ticket not resolved or closed.
|
||||
/datum/adminTicketHolder/proc/checkForTicket(var/client/C)
|
||||
var/list/tickets = list()
|
||||
for(var/datum/admin_ticket/T in allTickets)
|
||||
if(T.clientName == C && (T.ticketState == ADMIN_TICKET_OPEN || T.ticketState == ADMIN_TICKET_STALE))
|
||||
tickets += T
|
||||
if(tickets.len)
|
||||
return tickets
|
||||
return FALSE
|
||||
|
||||
//return the client of a ticket number
|
||||
/datum/adminTicketHolder/proc/returnClient(var/N)
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.allTickets[N]
|
||||
return T.clientName
|
||||
|
||||
/datum/adminTicketHolder/proc/assignAdminToTicket(var/client/C, var/N)
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.allTickets[N]
|
||||
T.assignAdmin(C)
|
||||
return TRUE
|
||||
|
||||
//Single admin ticket
|
||||
|
||||
/datum/admin_ticket
|
||||
var/ticketNum // Ticket number
|
||||
var/clientName // Client which opened the ticket
|
||||
var/timeOpened // Time the ticket was opened
|
||||
var/title //The initial message with links
|
||||
var/list/content = list() // content of the admin help
|
||||
var/lastAdminResponse // Last admin who responded
|
||||
var/lastResponseTime // When the admin last responded
|
||||
var/locationSent // Location the player was when they send the ticket
|
||||
var/mobControlled // Mob they were controlling
|
||||
var/ticketState // State of the ticket, open, closed, resolved etc
|
||||
var/timeUntilStale // When the ticket goes stale
|
||||
var/ticketCooldown // Cooldown before allowing the user to open another ticket.
|
||||
var/adminAssigned // Admin who has assigned themselves to this ticket
|
||||
|
||||
//Ticker called when a ticket is created, checks for stale-ness.
|
||||
/datum/admin_ticket/proc/beginStaleCount()
|
||||
while(world.time < timeUntilStale || !lastAdminResponse || !adminAssigned) // While within the stale period OR no admin responded OR no admin assigned.
|
||||
|
||||
if(!src)
|
||||
return
|
||||
|
||||
sleep(200) // Check every 20 seconds.
|
||||
if(ticketState == ADMIN_TICKET_OPEN && world.time > timeUntilStale)
|
||||
message_adminTicket("<span class='adminticket'>Ticket #[ticketNum] has been open for [ADMIN_TICKET_TIMEOUT * 0.1] seconds. Changing status to stale.</span>")
|
||||
ticketState = ADMIN_TICKET_STALE
|
||||
break
|
||||
|
||||
//Set the cooldown period for the ticket. The time when it's created plus the defined cooldown time.
|
||||
/datum/admin_ticket/proc/setCooldownPeriod()
|
||||
ticketCooldown = world.time + ADMIN_TICKET_DUPLICATE_COOLDOWN
|
||||
|
||||
//Set the last admin who responded as the client passed as an arguement.
|
||||
/datum/admin_ticket/proc/setLastAdminResponse(var/client/C)
|
||||
lastAdminResponse = C
|
||||
lastResponseTime = worldtime2text()
|
||||
|
||||
//Return the ticket state as a colour coded text string.
|
||||
/datum/admin_ticket/proc/state2text()
|
||||
switch(ticketState)
|
||||
if(ADMIN_TICKET_OPEN)
|
||||
return "<font color='green'>OPEN</font>"
|
||||
if(ADMIN_TICKET_RESOLVED)
|
||||
return "<font color='blue'>RESOLVED</font>"
|
||||
if(ADMIN_TICKET_CLOSED)
|
||||
return "<font color='red'>CLOSED</font>"
|
||||
if(ADMIN_TICKET_STALE)
|
||||
return "<font color='orange'>STALE</font>"
|
||||
|
||||
//Assign the client passed to var/adminAsssigned
|
||||
/datum/admin_ticket/proc/assignAdmin(var/client/C, var/N)
|
||||
if(!C)
|
||||
return
|
||||
adminAssigned = C
|
||||
return TRUE
|
||||
|
||||
/datum/admin_ticket/proc/addResponse(var/client/C, var/M as text)
|
||||
if(C.holder)
|
||||
setLastAdminResponse(C)
|
||||
M = "[C]: [M]"
|
||||
content += M
|
||||
@@ -1,172 +0,0 @@
|
||||
/datum/adminTicketHolder/proc/returnUI(var/tab = ADMIN_TICKET_OPEN)
|
||||
set name = "Open Ticket Interface"
|
||||
set category = "Tickets"
|
||||
|
||||
//dat
|
||||
var/trStyle = "border-top:2px solid; border-bottom:2px solid; padding-top: 5px; padding-bottom: 5px;"
|
||||
var/tdStyleleft = "border-top:2px solid; border-bottom:2px solid; width:150px; text-align:center;"
|
||||
var/tdStyle = "border-top:2px solid; border-bottom:2px solid;"
|
||||
var/datum/admin_ticket/ticket
|
||||
var/dat
|
||||
dat += "<head><style>.adminticket{border:2px solid}</style></head>"
|
||||
dat += "<body><h1>Admin Tickets</h1>"
|
||||
|
||||
dat +="<a href='?src=[UID()];refresh=1'>Refresh</a><br /><a href='?src=[UID()];showopen=1'>Open Tickets</a><a href='?src=[UID()];showresolved=1'>Resolved Tickets</a><a href='?src=[UID()];showclosed=1'>Closed Tickets</a>"
|
||||
if(tab == ADMIN_TICKET_OPEN)
|
||||
dat += "<h2>Open Tickets</h2>"
|
||||
dat += "<table style='width:1300px; border: 3px solid;'>"
|
||||
dat +="<tr style='[trStyle]'><th style='[tdStyleleft]'>Control</th><th style='[tdStyle]'>Ticket</th></tr>"
|
||||
if(tab == ADMIN_TICKET_OPEN)
|
||||
for(var/T in allTickets)
|
||||
ticket = T
|
||||
if(ticket.ticketState == ADMIN_TICKET_OPEN || ticket.ticketState == ADMIN_TICKET_STALE)
|
||||
dat += "<tr style='[trStyle]'><td style ='[tdStyleleft]'><a href='?src=[UID()];resolve=[ticket.ticketNum]'>Resolve</a><a href='?src=[UID()];details=[ticket.ticketNum]'>Details</a> <br /> #[ticket.ticketNum] ([ticket.timeOpened]) [ticket.ticketState == ADMIN_TICKET_STALE ? "<font color='red'><b>STALE</font>" : ""] </td><td style='[tdStyle]'><b>[ticket.title]</td></tr>"
|
||||
else
|
||||
continue
|
||||
else if(tab == ADMIN_TICKET_RESOLVED)
|
||||
dat += "<h2>Resolved Tickets</h2>"
|
||||
for(var/T in allTickets)
|
||||
ticket = T
|
||||
if(ticket.ticketState == ADMIN_TICKET_RESOLVED)
|
||||
dat += "<tr style='[trStyle]'><td style ='[tdStyleleft]'><a href='?src=[UID()];resolve=[ticket.ticketNum]'>Resolve</a><a href='?src=[UID()];details=[ticket.ticketNum]'>Details</a> <br /> #[ticket.ticketNum] ([ticket.timeOpened]) </td><td style='[tdStyle]'><b>[ticket.title]</td></tr>"
|
||||
else
|
||||
continue
|
||||
else if(tab == ADMIN_TICKET_CLOSED)
|
||||
dat += "<h2>Closed Tickets</h2>"
|
||||
for(var/T in allTickets)
|
||||
ticket = T
|
||||
if(ticket.ticketState == ADMIN_TICKET_CLOSED)
|
||||
dat += "<tr style='[trStyle]'><td style ='[tdStyleleft]'><a href='?src=[UID()];resolve=[ticket.ticketNum]'>Resolve</a><a href='?src=[UID()];details=[ticket.ticketNum]'>Details</a> <br /> #[ticket.ticketNum] ([ticket.timeOpened]) </td><td style='[tdStyle]'><b>[ticket.title]</td></tr>"
|
||||
else
|
||||
continue
|
||||
|
||||
dat += "</table></body>"
|
||||
|
||||
return dat
|
||||
|
||||
/datum/adminTicketHolder/proc/showUI(mob/user, var/tab)
|
||||
var/dat = null
|
||||
dat = returnUI(tab)
|
||||
var/datum/browser/popup = new(user, "admintickets", "Admin Tickets", 1400, 600)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/adminTicketHolder/proc/showDetailUI(mob/user, var/ticketID)
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.allTickets[ticketID]
|
||||
var/status = "[T.state2text()]"
|
||||
|
||||
var/dat = "<h1>Admin Tickets</h1>"
|
||||
|
||||
dat +="<a href='?src=[UID()];refresh=1'>Show All</a><a href='?src=[UID()];refreshdetail=[T.ticketNum]'>Refresh</a>"
|
||||
|
||||
dat += "<h2>Ticket #[T.ticketNum]</h2>"
|
||||
|
||||
dat += "<h3>[T.clientName] / [T.mobControlled] opened this ticket at [T.timeOpened] at location [T.locationSent]</h3>"
|
||||
dat += "<h4>Ticket Status: <font color='red'>[status]</font>"
|
||||
dat += "<table style='width:950px; border: 3px solid;'>"
|
||||
dat += "<tr><td>[T.title]</td></tr>"
|
||||
|
||||
if(T.content.len > 1)
|
||||
for(var/i = 2, i <= T.content.len, i++)
|
||||
dat += "<tr><td>[T.content[i]]</td></tr>"
|
||||
|
||||
dat += "</table><br /><br />"
|
||||
dat += "<a href='?src=[UID()];detailreopen=[T.ticketNum]'>Re-Open</a><a href='?src=[UID()];detailresolve=[T.ticketNum]'>Resolve</a><br /><br />"
|
||||
|
||||
if(!T.adminAssigned)
|
||||
dat += "No admin assigned to this ticket - <a href='?src=[UID()];assignadmin=[T.ticketNum]'>Take Ticket</a><br />"
|
||||
else
|
||||
dat += "[T.adminAssigned] is assigned to this Ticket. - <a href='?src=[UID()];assignadmin=[T.ticketNum]'>Take Ticket</a><br />"
|
||||
|
||||
if(T.lastAdminResponse)
|
||||
dat += "<b>Last Admin Response:</b> [T.lastAdminResponse] at [T.lastResponseTime]"
|
||||
else
|
||||
dat +="<font color='red'>No Admin Response</font>"
|
||||
|
||||
dat += "<br /><br />"
|
||||
|
||||
dat += "<a href='?src=[UID()];detailclose=[T.ticketNum]'>Close Ticket</a>"
|
||||
|
||||
var/datum/browser/popup = new(user, "adminticketsdetail", "Admin Ticket #[T.ticketNum]", 1000, 600)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/adminTicketHolder/proc/userDetailUI(mob/user)
|
||||
//dat
|
||||
var/tickets = checkForTicket(user.client)
|
||||
var/dat
|
||||
dat += "<h1>Your open tickets</h1>"
|
||||
dat += "<table>"
|
||||
for(var/datum/admin_ticket/T in tickets)
|
||||
dat += "<tr><td><h2>Ticket #[T.ticketNum]</h2></td></tr>"
|
||||
for(var/i = 1, i <= T.content.len, i++)
|
||||
dat += "<tr><td>[T.content[i]]</td></tr>"
|
||||
dat += "</table>"
|
||||
|
||||
var/datum/browser/popup = new(user, "userticketsdetail", "Tickets", 1000, 600)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/adminTicketHolder/Topic(href, href_list)
|
||||
|
||||
if(href_list["refresh"])
|
||||
showUI(usr)
|
||||
return
|
||||
|
||||
if(href_list["refreshdetail"])
|
||||
var/indexNum = text2num(href_list["refreshdetail"])
|
||||
showDetailUI(usr, indexNum)
|
||||
return
|
||||
|
||||
if(href_list["showopen"])
|
||||
showUI(usr, ADMIN_TICKET_OPEN)
|
||||
return
|
||||
if(href_list["showresolved"])
|
||||
showUI(usr, ADMIN_TICKET_RESOLVED)
|
||||
return
|
||||
if(href_list["showclosed"])
|
||||
showUI(usr, ADMIN_TICKET_CLOSED)
|
||||
return
|
||||
|
||||
if(href_list["details"])
|
||||
var/indexNum = text2num(href_list["details"])
|
||||
showDetailUI(usr, indexNum)
|
||||
return
|
||||
|
||||
if(href_list["resolve"])
|
||||
var/indexNum = text2num(href_list["resolve"])
|
||||
if(globAdminTicketHolder.resolveTicket(indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) resolved admin ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your admin ticket has now been resolved.</span>")
|
||||
showUI(usr)
|
||||
|
||||
if(href_list["detailresolve"])
|
||||
var/indexNum = text2num(href_list["detailresolve"])
|
||||
if(globAdminTicketHolder.resolveTicket(indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) resolved admin ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your admin ticket has now been resolved.</span>")
|
||||
showDetailUI(usr, indexNum)
|
||||
|
||||
if(href_list["detailclose"])
|
||||
var/indexNum = text2num(href_list["detailclose"])
|
||||
if(alert("Are you sure? This will send a negative message.",,"Yes","No") != "Yes")
|
||||
return
|
||||
if(globAdminTicketHolder.closeTicket(indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) closed admin ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<font color='red' size='4'><b>- AdminHelp Rejected! -</b></font>")
|
||||
to_chat(returnClient(indexNum), "<span class='boldmessage'>Please try to be calm, clear, and descriptive in admin helps, do not assume the admin has seen any related events, and clearly state the names of anybody you are reporting. If you asked a question, please ensure it was clear what you were asking.</span>")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your ticket has now been closed.</span>")
|
||||
showDetailUI(usr, indexNum)
|
||||
|
||||
if(href_list["detailreopen"])
|
||||
var/indexNum = text2num(href_list["detailreopen"])
|
||||
if(globAdminTicketHolder.openTicket(indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) re-opened admin ticket number [indexNum]")
|
||||
showDetailUI(usr, indexNum)
|
||||
|
||||
if(href_list["assignadmin"])
|
||||
var/indexNum = text2num(href_list["assignadmin"])
|
||||
if(globAdminTicketHolder.assignAdminToTicket(usr.client, indexNum))
|
||||
message_adminTicket("[usr.client] / ([usr]) has taken ticket number [indexNum]")
|
||||
to_chat(returnClient(indexNum), "<span class='adminticket'>Your ticket is being handled by [usr.client].")
|
||||
showDetailUI(usr, indexNum)
|
||||
@@ -1,51 +1,33 @@
|
||||
//Verbs
|
||||
|
||||
/client/proc/startadmintickets()
|
||||
set name = "Restart Admin Ticket System"
|
||||
set category = "Debug"
|
||||
|
||||
if(!holder && !check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
if(!globAdminTicketHolder)
|
||||
var/global/datum/adminTicketHolder/globAdminTicketHolder = new /datum/adminTicketHolder
|
||||
else
|
||||
if(alert("Are you sure you want to reboot the admin ticket system?","Reboot Admin Tickets?","Yes","No") != "Yes")
|
||||
return
|
||||
message_admins("<span class='admintickets'>Restarting Admin Ticket System!</span>")
|
||||
globAdminTicketHolder = new /datum/adminTicketHolder
|
||||
message_admins("<span class='admintickets'>Admin Ticket System Restarted!</span>")
|
||||
|
||||
/client/proc/openTicketUI()
|
||||
|
||||
set name = "Open Ticket Interface"
|
||||
set category = "Admin"
|
||||
|
||||
if(!holder && !check_rights(R_ADMIN))
|
||||
if(!holder || !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
globAdminTicketHolder.showUI(usr)
|
||||
SStickets.showUI(usr)
|
||||
|
||||
/client/proc/resolveAllTickets()
|
||||
set name = "Resolve All Open Tickets"
|
||||
set category = "Admin"
|
||||
|
||||
if(!holder && !check_rights(R_ADMIN))
|
||||
if(!holder || !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(alert("Are you sure you want to resolve ALL open tickets?","Resolve all open tickets?","Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
globAdminTicketHolder.resolveAllOpenTickets()
|
||||
|
||||
|
||||
SStickets.resolveAllOpenTickets()
|
||||
|
||||
/client/proc/openUserUI()
|
||||
|
||||
set name = "My Tickets"
|
||||
set category = "Admin"
|
||||
|
||||
if(!holder && !check_rights(R_ADMIN))
|
||||
if(!holder || !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
globAdminTicketHolder.userDetailUI(usr)
|
||||
SStickets.userDetailUI(usr)
|
||||
|
||||
+13
-13
@@ -30,7 +30,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/ticketID = text2num(href_list["openadminticket"])
|
||||
globAdminTicketHolder.showDetailUI(usr, ticketID)
|
||||
SStickets.showDetailUI(usr, ticketID)
|
||||
|
||||
if(href_list["stickyban"])
|
||||
stickyban(href_list["stickyban"],href_list)
|
||||
@@ -274,22 +274,22 @@
|
||||
|
||||
switch(href_list["call_shuttle"])
|
||||
if("1")
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
|
||||
return
|
||||
shuttle_master.emergency.request()
|
||||
SSshuttle.emergency.request()
|
||||
log_admin("[key_name(usr)] called the Emergency Shuttle")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
|
||||
|
||||
if("2")
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
|
||||
return
|
||||
switch(shuttle_master.emergency.mode)
|
||||
switch(SSshuttle.emergency.mode)
|
||||
if(SHUTTLE_CALL)
|
||||
shuttle_master.emergency.cancel()
|
||||
SSshuttle.emergency.cancel()
|
||||
log_admin("[key_name(usr)] sent the Emergency Shuttle back")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] sent the Emergency Shuttle back</span>")
|
||||
else
|
||||
shuttle_master.emergency.cancel()
|
||||
SSshuttle.emergency.cancel()
|
||||
log_admin("[key_name(usr)] called the Emergency Shuttle")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station</span>")
|
||||
|
||||
@@ -299,10 +299,10 @@
|
||||
else if(href_list["edit_shuttle_time"])
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", shuttle_master.emergency.timeLeft() ) as num
|
||||
shuttle_master.emergency.setTimer(timer*10)
|
||||
var/timer = input("Enter new shuttle duration (seconds):","Edit Shuttle Timeleft", SSshuttle.emergency.timeLeft() ) as num
|
||||
SSshuttle.emergency.setTimer(timer*10)
|
||||
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds")
|
||||
minor_announcement.Announce("The emergency shuttle will reach its destination in [round(shuttle_master.emergency.timeLeft(600))] minutes.")
|
||||
minor_announcement.Announce("The emergency shuttle will reach its destination in [round(SSshuttle.emergency.timeLeft(600))] minutes.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds</span>")
|
||||
href_list["secrets"] = "check_antagonist"
|
||||
|
||||
@@ -2859,21 +2859,21 @@
|
||||
if("moveminingshuttle")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ShM")
|
||||
if(!shuttle_master.toggleShuttle("mining","mining_home","mining_away"))
|
||||
if(!SSshuttle.toggleShuttle("mining","mining_home","mining_away"))
|
||||
message_admins("[key_name_admin(usr)] moved mining shuttle")
|
||||
log_admin("[key_name(usr)] moved the mining shuttle")
|
||||
|
||||
if("movelaborshuttle")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ShL")
|
||||
if(!shuttle_master.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away"))
|
||||
if(!SSshuttle.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away"))
|
||||
message_admins("[key_name_admin(usr)] moved labor shuttle")
|
||||
log_admin("[key_name(usr)] moved the labor shuttle")
|
||||
|
||||
if("moveferry")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ShF")
|
||||
if(!shuttle_master.toggleShuttle("ferry","ferry_home","ferry_away"))
|
||||
if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away"))
|
||||
message_admins("[key_name_admin(usr)] moved the centcom ferry")
|
||||
log_admin("[key_name(usr)] moved the centcom ferry")
|
||||
|
||||
|
||||
@@ -117,15 +117,15 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if("Adminhelp")
|
||||
var/ticketNum // Holder for the ticket number
|
||||
var/prunedmsg ="[usr.client]: [msg]" // Message without links
|
||||
if(globAdminTicketHolder.checkForOpenTicket(usr.client)) // If user already has an open ticket
|
||||
var/datum/admin_ticket/T = globAdminTicketHolder.checkForOpenTicket(usr.client) // Make T equal to the ticket they have open
|
||||
if(SStickets.checkForOpenTicket(usr)) // If user already has an open ticket
|
||||
var/datum/admin_ticket/T = SStickets.checkForOpenTicket(usr) // Make T equal to the ticket they have open
|
||||
ticketNum = T.ticketNum // ticketNum is the number of their ticket.
|
||||
T.addResponse(usr.client, msg)
|
||||
else
|
||||
ticketNum = globAdminTicketHolder.getTicketCounter() // ticketNum is the ticket ready to be assigned.
|
||||
ticketNum = SStickets.getTicketCounter() // ticketNum is the ticket ready to be assigned.
|
||||
msg = "<span class='adminhelp'>[selected_type]: </span><span class='boldnotice'>[key_name(src, TRUE, selected_type)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[mob.UID()]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) ([admin_jump_link(mob)]) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) (<A HREF='?_src_=holder;openadminticket=[ticketNum]'>TICKET</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""](<A HREF='?_src_=holder;take_question=[mob.UID()]'>TAKE</A>) :</span> <span class='adminhelp'>[msg]</span>"
|
||||
//Open a new adminticket and inform the user.
|
||||
globAdminTicketHolder.newTicket(src, prunedmsg, msg)
|
||||
SStickets.newTicket(src, prunedmsg, msg)
|
||||
for(var/client/X in modholders + adminholders)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
@@ -187,15 +187,15 @@
|
||||
return
|
||||
//Check if the mob being PM'd has any open admin tickets.
|
||||
var/tickets = list()
|
||||
tickets = globAdminTicketHolder.checkForTicket(C)
|
||||
tickets = SStickets.checkForTicket(C)
|
||||
if(tickets)
|
||||
for(var/datum/admin_ticket/i in tickets)
|
||||
i.addResponse(src, msg) // Add this response to their open tickets.
|
||||
return
|
||||
|
||||
tickets = globAdminTicketHolder.checkForTicket(src)
|
||||
tickets = SStickets.checkForTicket(C)
|
||||
if(check_rights(R_ADMIN|R_MOD, 0, C.mob)) //Is the person being pm'd an admin? If so we check if the pm'er has open tickets
|
||||
tickets = globAdminTicketHolder.checkForTicket(src)
|
||||
tickets = SStickets.checkForTicket(C)
|
||||
if(tickets)
|
||||
for(var/datum/admin_ticket/i in tickets)
|
||||
i.addResponse(src, msg)
|
||||
|
||||
@@ -796,7 +796,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Admin"
|
||||
set name = "Call Shuttle"
|
||||
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -806,11 +806,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(confirm != "Yes") return
|
||||
|
||||
if(alert("Set Shuttle Recallable (Select Yes unless you know what this does)", "Recallable?", "Yes", "No") == "Yes")
|
||||
shuttle_master.emergency.canRecall = TRUE
|
||||
SSshuttle.emergency.canRecall = TRUE
|
||||
else
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
|
||||
shuttle_master.emergency.request()
|
||||
SSshuttle.emergency.request()
|
||||
|
||||
feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
|
||||
@@ -825,20 +825,20 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
return
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
|
||||
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_DOCKED)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
|
||||
return
|
||||
|
||||
if(shuttle_master.emergency.canRecall == FALSE)
|
||||
if(SSshuttle.emergency.canRecall == FALSE)
|
||||
if(alert("Shuttle is currently set to be nonrecallable. Recalling may break things. Respect Recall Status?", "Override Recall Status?", "Yes", "No") == "Yes")
|
||||
return
|
||||
else
|
||||
var/keepStatus = alert("Maintain recall status on future shuttle calls?", "Maintain Status?", "Yes", "No") == "Yes" //Keeps or drops recallability
|
||||
shuttle_master.emergency.canRecall = TRUE // must be true for cancel proc to work
|
||||
shuttle_master.emergency.cancel()
|
||||
SSshuttle.emergency.canRecall = TRUE // must be true for cancel proc to work
|
||||
SSshuttle.emergency.cancel()
|
||||
if(keepStatus)
|
||||
shuttle_master.emergency.canRecall = FALSE // restores original status
|
||||
SSshuttle.emergency.canRecall = FALSE // restores original status
|
||||
else
|
||||
shuttle_master.emergency.cancel()
|
||||
SSshuttle.emergency.cancel()
|
||||
|
||||
feedback_add_details("admin_verb","CCSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
|
||||
@@ -855,11 +855,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(shuttle_master)
|
||||
shuttle_master.emergencyNoEscape = !shuttle_master.emergencyNoEscape
|
||||
if(SSshuttle)
|
||||
SSshuttle.emergencyNoEscape = !SSshuttle.emergencyNoEscape
|
||||
|
||||
log_admin("[key_name(src)] has [shuttle_master.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
|
||||
message_admins("[key_name_admin(usr)] has [shuttle_master.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
|
||||
log_admin("[key_name(src)] has [SSshuttle.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
|
||||
message_admins("[key_name_admin(usr)] has [SSshuttle.emergencyNoEscape ? "denied" : "allowed"] the shuttle to be called.")
|
||||
|
||||
/client/proc/cmd_admin_attack_log(mob/M as mob in mob_list)
|
||||
set category = "Admin"
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
|
||||
/obj/machinery/computer/mob_battle_terminal/Destroy()
|
||||
eject_card(1)
|
||||
if(mob_hunt_server)
|
||||
if(mob_hunt_server.battle_turn)
|
||||
mob_hunt_server.battle_turn = null
|
||||
if(mob_hunt_server.red_terminal == src)
|
||||
mob_hunt_server.red_terminal = null
|
||||
if(mob_hunt_server.blue_terminal == src)
|
||||
mob_hunt_server.blue_terminal = null
|
||||
if(SSmob_hunt)
|
||||
if(SSmob_hunt.battle_turn)
|
||||
SSmob_hunt.battle_turn = null
|
||||
if(SSmob_hunt.red_terminal == src)
|
||||
SSmob_hunt.red_terminal = null
|
||||
if(SSmob_hunt.blue_terminal == src)
|
||||
SSmob_hunt.blue_terminal = null
|
||||
QDEL_NULL(avatar)
|
||||
return ..()
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/obj/machinery/computer/mob_battle_terminal/proc/eject_card(override = 0)
|
||||
if(!override)
|
||||
if(ready && mob_hunt_server.battle_turn != team)
|
||||
if(ready && SSmob_hunt.battle_turn != team)
|
||||
audible_message("You can't recall on your rival's turn!", null, 2)
|
||||
return
|
||||
card.mob_data = mob_info
|
||||
@@ -126,7 +126,7 @@
|
||||
dat += "<h1>No Nano-Mob card loaded.</h1>"
|
||||
dat += "</td>"
|
||||
dat += "</tr>"
|
||||
if(ready && mob_hunt_server.battle_turn) //offer the surrender option if they are in a battle (ready), but don't have a card loaded
|
||||
if(ready && SSmob_hunt.battle_turn) //offer the surrender option if they are in a battle (ready), but don't have a card loaded
|
||||
dat += "<tr>"
|
||||
dat += "<td><a href='?src=[UID()];surrender=1'>Surrender!</a></td>"
|
||||
dat += "</tr>"
|
||||
@@ -170,7 +170,7 @@
|
||||
dat += "<tr>"
|
||||
dat += "<td><a href='?src=[UID()];ready=1'>Battle!</a></td>"
|
||||
dat += "</tr>"
|
||||
if(ready && !mob_hunt_server.battle_turn)
|
||||
if(ready && !SSmob_hunt.battle_turn)
|
||||
dat += "<tr>"
|
||||
dat += "<td><a href='?src=[UID()];ready=2'>Cancel Battle!</a></td>"
|
||||
dat += "</tr>"
|
||||
@@ -205,23 +205,23 @@
|
||||
|
||||
/obj/machinery/computer/mob_battle_terminal/proc/check_connection()
|
||||
if(team == "Red")
|
||||
if(mob_hunt_server && !mob_hunt_server.red_terminal)
|
||||
mob_hunt_server.red_terminal = src
|
||||
if(SSmob_hunt && !SSmob_hunt.red_terminal)
|
||||
SSmob_hunt.red_terminal = src
|
||||
else if(team == "Blue")
|
||||
if(mob_hunt_server && !mob_hunt_server.blue_terminal)
|
||||
mob_hunt_server.blue_terminal = src
|
||||
if(SSmob_hunt && !SSmob_hunt.blue_terminal)
|
||||
SSmob_hunt.blue_terminal = src
|
||||
|
||||
/obj/machinery/computer/mob_battle_terminal/proc/do_attack()
|
||||
if(!ready) //no attacking if you arent ready to fight (duh)
|
||||
return
|
||||
if(!mob_hunt_server || team != mob_hunt_server.battle_turn) //don't attack unless it is actually our turn
|
||||
if(!SSmob_hunt || team != SSmob_hunt.battle_turn) //don't attack unless it is actually our turn
|
||||
return
|
||||
else
|
||||
var/message = "[mob_info.mob_name] attacks!"
|
||||
if(mob_info.nickname)
|
||||
message = "[mob_info.nickname] attacks!"
|
||||
audible_message(message, null, 5)
|
||||
mob_hunt_server.launch_attack(team, mob_info.get_raw_damage(), mob_info.get_attack_type())
|
||||
SSmob_hunt.launch_attack(team, mob_info.get_raw_damage(), mob_info.get_attack_type())
|
||||
|
||||
/obj/machinery/computer/mob_battle_terminal/proc/start_battle()
|
||||
if(ready) //don't do anything if we are still ready
|
||||
@@ -230,20 +230,20 @@
|
||||
return
|
||||
ready = 1
|
||||
audible_message("[team] Player is ready for battle! Waiting for rival...", null, 5)
|
||||
mob_hunt_server.start_check()
|
||||
SSmob_hunt.start_check()
|
||||
|
||||
/obj/machinery/computer/mob_battle_terminal/proc/receive_attack(raw_damage, datum/mob_type/attack_type)
|
||||
var/message = mob_info.take_damage(raw_damage, attack_type)
|
||||
avatar.audible_message(message, null, 5)
|
||||
if(!mob_info.cur_health)
|
||||
mob_hunt_server.end_battle(team)
|
||||
SSmob_hunt.end_battle(team)
|
||||
eject_card(1) //force the card out, they were defeated
|
||||
else
|
||||
mob_hunt_server.end_turn()
|
||||
SSmob_hunt.end_turn()
|
||||
|
||||
/obj/machinery/computer/mob_battle_terminal/proc/surrender()
|
||||
audible_message("[team] Player surrenders the battle!", null, 5)
|
||||
mob_hunt_server.end_battle(team, 1)
|
||||
SSmob_hunt.end_battle(team, 1)
|
||||
|
||||
//////////////////////////////
|
||||
// Mob Healing Terminal //
|
||||
|
||||
@@ -94,33 +94,33 @@
|
||||
P.audible_message(message, null, 4)
|
||||
|
||||
/obj/effect/nanomob/proc/despawn()
|
||||
if(mob_hunt_server)
|
||||
if(SSmob_hunt)
|
||||
if(mob_info.is_trap)
|
||||
mob_hunt_server.trap_spawns -= src
|
||||
SSmob_hunt.trap_spawns -= src
|
||||
else
|
||||
mob_hunt_server.normal_spawns -= src
|
||||
SSmob_hunt.normal_spawns -= src
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/nanomob/proc/reveal()
|
||||
if(!mob_hunt_server)
|
||||
if(!SSmob_hunt)
|
||||
return
|
||||
var/list/show_to = list()
|
||||
for(var/A in mob_hunt_server.connected_clients)
|
||||
if((A in clients_encountered) || !mob_hunt_server.connected_clients[A])
|
||||
for(var/A in SSmob_hunt.connected_clients)
|
||||
if((A in clients_encountered) || !SSmob_hunt.connected_clients[A])
|
||||
continue
|
||||
show_to |= mob_hunt_server.connected_clients[A]
|
||||
show_to |= SSmob_hunt.connected_clients[A]
|
||||
display_alt_appearance("nanomob_avatar", show_to)
|
||||
|
||||
/obj/effect/nanomob/proc/conceal(list/hide_from)
|
||||
if(!mob_hunt_server)
|
||||
if(!SSmob_hunt)
|
||||
return
|
||||
var/list/hiding_from = list()
|
||||
if(hide_from)
|
||||
hiding_from = hide_from
|
||||
else
|
||||
for(var/A in mob_hunt_server.connected_clients)
|
||||
if((A in clients_encountered) && mob_hunt_server.connected_clients[A])
|
||||
hiding_from |= mob_hunt_server.connected_clients[A]
|
||||
for(var/A in SSmob_hunt.connected_clients)
|
||||
if((A in clients_encountered) && SSmob_hunt.connected_clients[A])
|
||||
hiding_from |= SSmob_hunt.connected_clients[A]
|
||||
hide_alt_appearance("nanomob_avatar", hiding_from)
|
||||
|
||||
// BATTLE MOB AVATARS
|
||||
|
||||
@@ -72,12 +72,12 @@
|
||||
secondary_type = new secondary_type()
|
||||
if(no_register) //for booster pack cards
|
||||
return
|
||||
if(mob_hunt_server)
|
||||
if(SSmob_hunt)
|
||||
if(set_trap)
|
||||
if(mob_hunt_server.register_trap(src))
|
||||
if(SSmob_hunt.register_trap(src))
|
||||
return
|
||||
else if(select_spawn())
|
||||
if(mob_hunt_server.register_spawn(src))
|
||||
if(SSmob_hunt.register_spawn(src))
|
||||
return
|
||||
qdel(src) //if you reach this, the datum is just pure clutter, so delete it
|
||||
|
||||
|
||||
@@ -206,9 +206,9 @@
|
||||
|
||||
"halt" = "HALT! HALT! HALT! HALT!",
|
||||
"bobby" = "Stop in the name of the Law.",
|
||||
"compliance" = "Compliance is in your best ineterest.",
|
||||
"compliance" = "Compliance is in your best interest.",
|
||||
"justice" = "Prepare for justice!",
|
||||
"running" = "Running will only increase your sentence",
|
||||
"running" = "Running will only increase your sentence.",
|
||||
"dontmove" = "Don't move, Creep!",
|
||||
"floor" = "Down on the floor, Creep!",
|
||||
"robocop" = "Dead or alive you're coming with me.",
|
||||
@@ -216,7 +216,7 @@
|
||||
"freeze" = "Freeze, Scum Bag!",
|
||||
"imperial" = "Stop right there, criminal scum!",
|
||||
"bash" = "Stop or I'll bash you.",
|
||||
"harry" = "Go ahead, make my day",
|
||||
"harry" = "Go ahead, make my day.",
|
||||
"asshole" = "Stop breaking the law, asshole.",
|
||||
"stfu" = "You have the right to shut the fuck up",
|
||||
"shutup" = "Shut up crime!",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "It's a high visibility jumpsuit given to those engineers insane enough to achieve the rank of \"Chief engineer\". It has minor radiation shielding."
|
||||
name = "chief engineer's jumpsuit"
|
||||
icon_state = "chiefengineer"
|
||||
item_state = "g_suit"
|
||||
item_state = "chief"
|
||||
item_color = "chief"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 10)
|
||||
flags_size = ONESIZEFITSALL
|
||||
|
||||
@@ -1207,6 +1207,15 @@
|
||||
flags = BLOCKHAIR
|
||||
flags_inv = HIDEFACE
|
||||
|
||||
|
||||
/obj/item/clothing/shoes/fluff/arachno_boots
|
||||
name = "Arachno-Man boots"
|
||||
desc = "These boots were made for crawlin'"
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "superior_boots"
|
||||
item_state = "superior_boots"
|
||||
|
||||
|
||||
/obj/item/nullrod/fluff/chronx //chronx100: Hughe O'Splash
|
||||
fluff_transformations = list(/obj/item/nullrod/fluff/chronx/scythe)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/machinery/computer/shuttle/labor/one_way/Topic(href, href_list)
|
||||
if(href_list["move"])
|
||||
var/obj/docking_port/mobile/M = shuttle_master.getShuttle("laborcamp")
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle("laborcamp")
|
||||
if(!M)
|
||||
to_chat(usr, "<span class='warning'>Cannot locate shuttle!</span>")
|
||||
return 0
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
if(!alone_in_area(get_area(src), usr))
|
||||
to_chat(usr, "<span class='warning'>Prisoners are only allowed to be released while alone.</span>")
|
||||
else
|
||||
switch(shuttle_master.moveShuttle("laborcamp","laborcamp_home"))
|
||||
switch(SSshuttle.moveShuttle("laborcamp","laborcamp_home"))
|
||||
if(1)
|
||||
to_chat(usr, "<span class='notice'>Shuttle not found</span>")
|
||||
if(2)
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
if(href_list["choice"] == "release")
|
||||
if(alone_in_area(get_area(loc), usr))
|
||||
var/obj/docking_port/stationary/S = shuttle_master.getDock("laborcamp_home")
|
||||
var/obj/docking_port/stationary/S = SSshuttle.getDock("laborcamp_home")
|
||||
if(S && S.get_docked())
|
||||
if(release_door && release_door.density)
|
||||
release_door.open()
|
||||
|
||||
@@ -265,7 +265,7 @@ var/list/ai_verbs_default = list(
|
||||
/mob/living/silicon/ai/Destroy()
|
||||
ai_list -= src
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
SSshuttle.autoEvac()
|
||||
QDEL_NULL(eyeobj) // No AI, no Eye
|
||||
if(malfhacking)
|
||||
deltimer(malfhacking)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
SSshuttle.autoEvac()
|
||||
|
||||
if(nuking)
|
||||
set_security_level("red")
|
||||
@@ -26,10 +26,10 @@
|
||||
|
||||
if(doomsday_device)
|
||||
doomsday_device.timing = 0
|
||||
shuttle_master.emergencyNoEscape = 0
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_STRANDED)
|
||||
shuttle_master.emergency.mode = SHUTTLE_DOCKED
|
||||
shuttle_master.emergency.timer = world.time
|
||||
SSshuttle.emergencyNoEscape = 0
|
||||
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
|
||||
SSshuttle.emergency.mode = SHUTTLE_DOCKED
|
||||
SSshuttle.emergency.timer = world.time
|
||||
priority_announcement.Announce("Hostile environment resolved. You have 3 minutes to board the Emergency Shuttle.", "Priority Announcement", 'sound/AI/shuttledock.ogg')
|
||||
qdel(doomsday_device)
|
||||
|
||||
|
||||
@@ -995,9 +995,9 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
// this function displays the shuttles ETA in the status panel if the shuttle has been called
|
||||
/mob/proc/show_stat_emergency_shuttle_eta()
|
||||
var/ETA = shuttle_master.emergency.getModeStr()
|
||||
var/ETA = SSshuttle.emergency.getModeStr()
|
||||
if(ETA)
|
||||
stat(null, "[ETA] [shuttle_master.emergency.getTimerStr()]")
|
||||
stat(null, "[ETA] [SSshuttle.emergency.getTimerStr()]")
|
||||
|
||||
/mob/proc/show_stat_turf_contents()
|
||||
if(listed_turf && client)
|
||||
|
||||
@@ -433,9 +433,9 @@
|
||||
var/dat = "<html><body><center>"
|
||||
dat += "Round Duration: [round(hours)]h [round(mins)]m<br>"
|
||||
|
||||
if(shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
if(SSshuttle.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
dat += "<font color='red'><b>The station has been evacuated.</b></font><br>"
|
||||
else if(shuttle_master.emergency.mode >= SHUTTLE_CALL)
|
||||
else if(SSshuttle.emergency.mode >= SHUTTLE_CALL)
|
||||
dat += "<font color='red'>The station is currently undergoing evacuation procedures.</font><br>"
|
||||
|
||||
if(length(job_master.prioritized_jobs))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
/datum/computer_file/program/comm/Destroy()
|
||||
shuttle_caller_list -= src
|
||||
shuttle_master.autoEvac()
|
||||
SSshuttle.autoEvac()
|
||||
return ..()
|
||||
|
||||
/datum/computer_file/program/comm/proc/is_authenticated(mob/user, loud = 1)
|
||||
@@ -145,16 +145,16 @@
|
||||
data["current_message"] = data["is_ai"] ? messagetext[aicurrmsg] : messagetext[currmsg]
|
||||
data["current_message_title"] = data["is_ai"] ? messagetitle[aicurrmsg] : messagetitle[currmsg]
|
||||
|
||||
data["lastCallLoc"] = shuttle_master.emergencyLastCallLoc ? format_text(shuttle_master.emergencyLastCallLoc.name) : null
|
||||
data["lastCallLoc"] = SSshuttle.emergencyLastCallLoc ? format_text(SSshuttle.emergencyLastCallLoc.name) : null
|
||||
|
||||
var/shuttle[0]
|
||||
switch(shuttle_master.emergency.mode)
|
||||
switch(SSshuttle.emergency.mode)
|
||||
if(SHUTTLE_IDLE, SHUTTLE_RECALL)
|
||||
shuttle["callStatus"] = 2 //#define
|
||||
else
|
||||
shuttle["callStatus"] = 1
|
||||
if(shuttle_master.emergency.mode == SHUTTLE_CALL)
|
||||
var/timeleft = shuttle_master.emergency.timeLeft()
|
||||
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
|
||||
@@ -257,7 +257,7 @@
|
||||
return 1
|
||||
|
||||
call_shuttle_proc(usr, input)
|
||||
if(shuttle_master.emergency.timer)
|
||||
if(SSshuttle.emergency.timer)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
var/response = alert("Are you sure you wish to recall the shuttle?", "Confirm", "Yes", "No")
|
||||
if(response == "Yes")
|
||||
cancel_call_proc(usr)
|
||||
if(shuttle_master.emergency.timer)
|
||||
if(SSshuttle.emergency.timer)
|
||||
post_status("shuttle")
|
||||
setMenuState(usr, COMM_SCREEN_MAIN)
|
||||
|
||||
@@ -376,8 +376,8 @@
|
||||
setMenuState(usr,COMM_SCREEN_MAIN)
|
||||
|
||||
if("RestartNanoMob")
|
||||
if(mob_hunt_server)
|
||||
if(mob_hunt_server.manual_reboot())
|
||||
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")
|
||||
|
||||
@@ -313,19 +313,19 @@
|
||||
/datum/data/pda/app/supply/update_ui(mob/user as mob, list/data)
|
||||
var/supplyData[0]
|
||||
|
||||
if(shuttle_master.supply.mode == SHUTTLE_CALL)
|
||||
if(SSshuttle.supply.mode == SHUTTLE_CALL)
|
||||
supplyData["shuttle_moving"] = 1
|
||||
|
||||
if(!is_station_level(shuttle_master.supply.z))
|
||||
if(!is_station_level(SSshuttle.supply.z))
|
||||
supplyData["shuttle_loc"] = "station"
|
||||
else
|
||||
supplyData["shuttle_loc"] = "centcom"
|
||||
|
||||
supplyData["shuttle_time"] = "([shuttle_master.supply.timeLeft(600)] Mins)"
|
||||
supplyData["shuttle_time"] = "([SSshuttle.supply.timeLeft(600)] Mins)"
|
||||
|
||||
var/supplyOrderCount = 0
|
||||
var/supplyOrderData[0]
|
||||
for(var/S in shuttle_master.shoppinglist)
|
||||
for(var/S in SSshuttle.shoppinglist)
|
||||
var/datum/supply_order/SO = S
|
||||
supplyOrderCount++
|
||||
supplyOrderData[++supplyOrderData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "ApprovedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
|
||||
@@ -338,7 +338,7 @@
|
||||
|
||||
var/requestCount = 0
|
||||
var/requestData[0]
|
||||
for(var/S in shuttle_master.requestlist)
|
||||
for(var/S in SSshuttle.requestlist)
|
||||
var/datum/supply_order/SO = S
|
||||
requestCount++
|
||||
requestData[++requestData.len] = list("Number" = SO.ordernum, "Name" = html_encode(SO.object.name), "OrderedBy" = SO.orderedby, "Comment" = html_encode(SO.comment))
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
processing_objects.Remove(pda)
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/scan_nearby()
|
||||
if(!mob_hunt_server || !connected)
|
||||
if(!SSmob_hunt || !connected)
|
||||
return
|
||||
for(var/turf/T in range(scan_range, get_turf(pda)))
|
||||
for(var/obj/effect/nanomob/N in T.contents)
|
||||
@@ -41,10 +41,10 @@
|
||||
N.reveal()
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/reconnect()
|
||||
if(!mob_hunt_server || !mob_hunt_server.server_status || connected)
|
||||
if(!SSmob_hunt || !SSmob_hunt.server_status || connected)
|
||||
//show a message about the server being unavailable (because it doesn't exist / didn't get set to the global var / is offline)
|
||||
return 0
|
||||
mob_hunt_server.connected_clients += src
|
||||
SSmob_hunt.connected_clients += src
|
||||
connected = 1
|
||||
if(pda)
|
||||
pda.audible_message("[bicon(pda)] Connection established. Capture all of the mobs, [pda.owner ? pda.owner : "hunter"]!", null, 2)
|
||||
@@ -59,10 +59,10 @@
|
||||
return null
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/proc/disconnect(reason = null)
|
||||
if(!mob_hunt_server || !connected)
|
||||
if(!SSmob_hunt || !connected)
|
||||
return
|
||||
mob_hunt_server.connected_clients -= src
|
||||
for(var/obj/effect/nanomob/N in (mob_hunt_server.normal_spawns + mob_hunt_server.trap_spawns))
|
||||
SSmob_hunt.connected_clients -= src
|
||||
for(var/obj/effect/nanomob/N in (SSmob_hunt.normal_spawns + SSmob_hunt.trap_spawns))
|
||||
N.conceal(list(get_player()))
|
||||
connected = 0
|
||||
//show a disconnect message if we were disconnected involuntarily (reason argument provided)
|
||||
@@ -70,7 +70,7 @@
|
||||
pda.audible_message("[bicon(pda)] Disconnected from server. Reason: [reason].", null, 2)
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/program_process()
|
||||
if(!mob_hunt_server || !connected)
|
||||
if(!SSmob_hunt || !connected)
|
||||
return
|
||||
scan_nearby()
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
return 1
|
||||
|
||||
/datum/data/pda/app/mob_hunter_game/update_ui(mob/user, list/data)
|
||||
if(!mob_hunt_server || !(src in mob_hunt_server.connected_clients))
|
||||
if(!SSmob_hunt || !(src in SSmob_hunt.connected_clients))
|
||||
data["connected"] = 0
|
||||
else
|
||||
data["connected"] = 1
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
narsie_spawn_animation()
|
||||
|
||||
sleep(70)
|
||||
shuttle_master.emergency.request(null, 0.3) // Cannot recall
|
||||
shuttle_master.emergency.canRecall = FALSE
|
||||
SSshuttle.emergency.request(null, 0.3) // Cannot recall
|
||||
SSshuttle.emergency.canRecall = FALSE
|
||||
|
||||
/obj/singularity/narsie/large/attack_ghost(mob/dead/observer/user as mob)
|
||||
makeNewConstruct(/mob/living/simple_animal/hostile/construct/harvester, user, null, 1)
|
||||
|
||||
@@ -187,24 +187,22 @@
|
||||
update()
|
||||
return
|
||||
|
||||
var/obj/structure/disposalpipe/CP = locate() in T
|
||||
|
||||
if(ptype in list(PIPE_DISPOSALS_BIN, PIPE_DISPOSALS_OUTLET, PIPE_DISPOSALS_CHUTE)) // Disposal or outlet
|
||||
if(CP) // There's something there
|
||||
if(!istype(CP,/obj/structure/disposalpipe/trunk))
|
||||
to_chat(user, "The [nicetype] requires a trunk underneath it in order to work.")
|
||||
return
|
||||
else // Nothing under, fuck.
|
||||
var/obj/structure/disposalpipe/trunk/CP = locate() in T
|
||||
if(!CP) // There's no trunk
|
||||
to_chat(user, "The [nicetype] requires a trunk underneath it in order to work.")
|
||||
return
|
||||
else
|
||||
if(CP)
|
||||
update()
|
||||
var/pdir = CP.dpdir
|
||||
if(istype(CP, /obj/structure/disposalpipe/broken))
|
||||
pdir = CP.dir
|
||||
if(pdir & dpdir)
|
||||
to_chat(user, "There is already a [nicetype] at that location.")
|
||||
return
|
||||
for(var/obj/structure/disposalpipe/CP in T)
|
||||
if(CP)
|
||||
update()
|
||||
var/pdir = CP.dpdir
|
||||
if(istype(CP, /obj/structure/disposalpipe/broken))
|
||||
pdir = CP.dir
|
||||
if(pdir & dpdir)
|
||||
to_chat(user, "There is already a [nicetype] at that location.")
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
if(anchored)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level)
|
||||
if(level >= SEC_LEVEL_RED && security_level < SEC_LEVEL_RED)
|
||||
// Mark down this time to prevent shuttle cheese
|
||||
shuttle_master.emergency_sec_level_time = world.time
|
||||
SSshuttle.emergency_sec_level_time = world.time
|
||||
|
||||
switch(level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
- [Initialization](#initialization)
|
||||
<!-- /TOC -->
|
||||
|
||||
# Important note:
|
||||
The following readme was last updated during Late 2015. The changes between Paradise & TG's shuttle system has diverged greatly since then. Do not take the documentation here's description of differences between tg & paradise seriously without double checking.
|
||||
|
||||
# Shuttle system
|
||||
## Introduction
|
||||
This folder belongs to the "shuttle" system. The shuttle system is used to control the
|
||||
@@ -121,11 +124,6 @@ direction as the "Stationary" docking port.
|
||||
There are three main differences between -tg-station13's shuttle system and the one in
|
||||
use on Paradise, and none are very complex.
|
||||
|
||||
### Shuttle Controller
|
||||
This is a very simple change. On -tg-station13, the shuttle controller is referenced by a
|
||||
variable named `SSShuttle`. On Paradise, due to controller naming conventions, it is
|
||||
instead named `shuttle_master`.
|
||||
|
||||
### Airlocks
|
||||
The biggest modification comes in the form of how docking ports interact with airlocks.
|
||||
With -tg-station13's base code, any door on the shuttle will be closed, and any door
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
return
|
||||
if(!istype(W, /obj/item/card))
|
||||
return
|
||||
if(shuttle_master.emergency.mode != SHUTTLE_DOCKED)
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_DOCKED)
|
||||
return
|
||||
if(!user)
|
||||
return
|
||||
if(shuttle_master.emergency.timeLeft() < 11)
|
||||
if(SSshuttle.emergency.timeLeft() < 11)
|
||||
return
|
||||
if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda))
|
||||
if(istype(W, /obj/item/pda))
|
||||
@@ -35,10 +35,10 @@
|
||||
return 0
|
||||
|
||||
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
|
||||
if(shuttle_master.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != W)
|
||||
if(SSshuttle.emergency.mode != SHUTTLE_DOCKED || user.get_active_hand() != W)
|
||||
return 0
|
||||
|
||||
var/seconds = shuttle_master.emergency.timeLeft()
|
||||
var/seconds = SSshuttle.emergency.timeLeft()
|
||||
if(seconds <= 10)
|
||||
return 0
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
message_admins("[key_name_admin(user)] has launched the emergency shuttle [seconds] seconds before launch.")
|
||||
log_game("[key_name(user)] has launched the emergency shuttle in ([x], [y], [z]) [seconds] seconds before launch.")
|
||||
minor_announcement.Announce("The emergency shuttle will launch in 10 seconds")
|
||||
shuttle_master.emergency.setTimer(100)
|
||||
SSshuttle.emergency.setTimer(100)
|
||||
|
||||
if("Repeal")
|
||||
if(authorized.Remove(W:registered_name))
|
||||
@@ -66,12 +66,12 @@
|
||||
authorized.Cut()
|
||||
|
||||
/obj/machinery/computer/emergency_shuttle/emag_act(mob/user)
|
||||
if(!emagged && shuttle_master.emergency.mode == SHUTTLE_DOCKED)
|
||||
var/time = shuttle_master.emergency.timeLeft()
|
||||
if(!emagged && SSshuttle.emergency.mode == SHUTTLE_DOCKED)
|
||||
var/time = SSshuttle.emergency.timeLeft()
|
||||
message_admins("[key_name_admin(user)] has emagged the emergency shuttle: [time] seconds before launch.")
|
||||
log_game("[key_name(user)] has emagged the emergency shuttle in ([x], [y], [z]): [time] seconds before launch.")
|
||||
minor_announcement.Announce("The emergency shuttle will launch in 10 seconds", "SYSTEM ERROR:")
|
||||
shuttle_master.emergency.setTimer(100)
|
||||
SSshuttle.emergency.setTimer(100)
|
||||
emagged = 1
|
||||
|
||||
|
||||
@@ -98,15 +98,15 @@
|
||||
if(!..())
|
||||
return 0 //shuttle master not initialized
|
||||
|
||||
shuttle_master.emergency = src
|
||||
SSshuttle.emergency = src
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile/emergency/Destroy(force)
|
||||
if(force)
|
||||
// This'll make the shuttle subsystem use the backup shuttle.
|
||||
if(shuttle_master.emergency == src)
|
||||
if(SSshuttle.emergency == src)
|
||||
// If we're the selected emergency shuttle
|
||||
shuttle_master.emergencyDeregister()
|
||||
SSshuttle.emergencyDeregister()
|
||||
|
||||
|
||||
return ..()
|
||||
@@ -115,21 +115,21 @@
|
||||
if(divisor <= 0)
|
||||
divisor = 10
|
||||
if(!timer)
|
||||
return round(shuttle_master.emergencyCallTime/divisor, 1)
|
||||
return round(SSshuttle.emergencyCallTime/divisor, 1)
|
||||
|
||||
var/dtime = world.time - timer
|
||||
switch(mode)
|
||||
if(SHUTTLE_ESCAPE)
|
||||
dtime = max(shuttle_master.emergencyEscapeTime - dtime, 0)
|
||||
dtime = max(SSshuttle.emergencyEscapeTime - dtime, 0)
|
||||
if(SHUTTLE_DOCKED)
|
||||
dtime = max(shuttle_master.emergencyDockTime - dtime, 0)
|
||||
dtime = max(SSshuttle.emergencyDockTime - dtime, 0)
|
||||
else
|
||||
|
||||
dtime = max(shuttle_master.emergencyCallTime - dtime, 0)
|
||||
dtime = max(SSshuttle.emergencyCallTime - dtime, 0)
|
||||
return round(dtime/divisor, 1)
|
||||
|
||||
/obj/docking_port/mobile/emergency/request(obj/docking_port/stationary/S, coefficient=1, area/signalOrigin, reason, redAlert)
|
||||
shuttle_master.emergencyCallTime = initial(shuttle_master.emergencyCallTime) * coefficient
|
||||
SSshuttle.emergencyCallTime = initial(SSshuttle.emergencyCallTime) * coefficient
|
||||
switch(mode)
|
||||
if(SHUTTLE_RECALL)
|
||||
mode = SHUTTLE_CALL
|
||||
@@ -144,11 +144,11 @@
|
||||
return
|
||||
|
||||
if(prob(70))
|
||||
shuttle_master.emergencyLastCallLoc = signalOrigin
|
||||
SSshuttle.emergencyLastCallLoc = signalOrigin
|
||||
else
|
||||
shuttle_master.emergencyLastCallLoc = null
|
||||
SSshuttle.emergencyLastCallLoc = null
|
||||
|
||||
emergency_shuttle_called.Announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][shuttle_master.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]")
|
||||
emergency_shuttle_called.Announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ]")
|
||||
|
||||
if(reason == "Automatic Crew Transfer" && signalOrigin == null) // Best way we have to check that it's actually a crew transfer and not just a player using the same message- any other calls to this proc should have a signalOrigin.
|
||||
atc.shift_ending()
|
||||
@@ -167,10 +167,10 @@
|
||||
mode = SHUTTLE_RECALL
|
||||
|
||||
if(prob(70))
|
||||
shuttle_master.emergencyLastCallLoc = signalOrigin
|
||||
SSshuttle.emergencyLastCallLoc = signalOrigin
|
||||
else
|
||||
shuttle_master.emergencyLastCallLoc = null
|
||||
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.[shuttle_master.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]")
|
||||
SSshuttle.emergencyLastCallLoc = null
|
||||
emergency_shuttle_recalled.Announce("The emergency shuttle has been recalled.[SSshuttle.emergencyLastCallLoc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]")
|
||||
|
||||
/obj/docking_port/mobile/emergency/proc/is_hijacked()
|
||||
for(var/mob/living/player in player_list)
|
||||
@@ -215,9 +215,9 @@
|
||||
if(!ripples.len && (time_left <= SHUTTLE_RIPPLE_TIME) && ((mode == SHUTTLE_CALL) || (mode == SHUTTLE_ESCAPE)))
|
||||
var/destination
|
||||
if(mode == SHUTTLE_CALL)
|
||||
destination = shuttle_master.getDock("emergency_home")
|
||||
destination = SSshuttle.getDock("emergency_home")
|
||||
else if(mode == SHUTTLE_ESCAPE)
|
||||
destination = shuttle_master.getDock("emergency_away")
|
||||
destination = SSshuttle.getDock("emergency_away")
|
||||
create_ripples(destination)
|
||||
|
||||
switch(mode)
|
||||
@@ -228,7 +228,7 @@
|
||||
if(SHUTTLE_CALL)
|
||||
if(time_left <= 0)
|
||||
//move emergency shuttle to station
|
||||
if(dock(shuttle_master.getDock("emergency_home")))
|
||||
if(dock(SSshuttle.getDock("emergency_home")))
|
||||
setTimer(20)
|
||||
return
|
||||
mode = SHUTTLE_DOCKED
|
||||
@@ -246,7 +246,7 @@
|
||||
*/
|
||||
if(SHUTTLE_DOCKED)
|
||||
|
||||
if(time_left <= 0 && shuttle_master.emergencyNoEscape)
|
||||
if(time_left <= 0 && SSshuttle.emergencyNoEscape)
|
||||
priority_announcement.Announce("Hostile environment detected. Departure has been postponed indefinitely pending conflict resolution.")
|
||||
sound_played = 0
|
||||
mode = SHUTTLE_STRANDED
|
||||
@@ -256,9 +256,9 @@
|
||||
for(var/area/shuttle/escape/E in world)
|
||||
E << 'sound/effects/hyperspace_begin.ogg'
|
||||
|
||||
if(time_left <= 0 && !shuttle_master.emergencyNoEscape)
|
||||
if(time_left <= 0 && !SSshuttle.emergencyNoEscape)
|
||||
//move each escape pod to its corresponding transit dock
|
||||
for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile)
|
||||
for(var/obj/docking_port/mobile/pod/M in SSshuttle.mobile)
|
||||
if(is_station_level(M.z)) //Will not launch from the mine/planet
|
||||
M.enterTransit()
|
||||
//now move the actual emergency shuttle to its transit dock
|
||||
@@ -275,8 +275,8 @@
|
||||
if(SHUTTLE_ESCAPE)
|
||||
if(time_left <= 0)
|
||||
//move each escape pod to its corresponding escape dock
|
||||
for(var/obj/docking_port/mobile/pod/M in shuttle_master.mobile)
|
||||
M.dock(shuttle_master.getDock("[M.id]_away"))
|
||||
for(var/obj/docking_port/mobile/pod/M in SSshuttle.mobile)
|
||||
M.dock(SSshuttle.getDock("[M.id]_away"))
|
||||
|
||||
for(var/area/shuttle/escape/E in world)
|
||||
E << 'sound/effects/hyperspace_end.ogg'
|
||||
@@ -321,7 +321,7 @@
|
||||
|
||||
/*
|
||||
findTransitDock()
|
||||
. = shuttle_master.getDock("[id]_transit")
|
||||
. = SSshuttle.getDock("[id]_transit")
|
||||
if(.) return .
|
||||
return ..()
|
||||
*/
|
||||
@@ -368,7 +368,7 @@
|
||||
roundstart_move = "backup_away"
|
||||
|
||||
/obj/docking_port/mobile/emergency/backup/register()
|
||||
var/current_emergency = shuttle_master.emergency
|
||||
var/current_emergency = SSshuttle.emergency
|
||||
..()
|
||||
shuttle_master.emergency = current_emergency
|
||||
shuttle_master.backup_shuttle = src
|
||||
SSshuttle.emergency = current_emergency
|
||||
SSshuttle.backup_shuttle = src
|
||||
|
||||
@@ -154,15 +154,15 @@
|
||||
var/lock_shuttle_doors = 0
|
||||
|
||||
/obj/docking_port/stationary/register()
|
||||
if(!shuttle_master)
|
||||
if(!SSshuttle)
|
||||
throw EXCEPTION("docking port [src] could not initialize.")
|
||||
return 0
|
||||
|
||||
shuttle_master.stationary += src
|
||||
SSshuttle.stationary += src
|
||||
if(!id)
|
||||
id = "[shuttle_master.stationary.len]"
|
||||
id = "[SSshuttle.stationary.len]"
|
||||
if(name == "dock")
|
||||
name = "dock[shuttle_master.stationary.len]"
|
||||
name = "dock[SSshuttle.stationary.len]"
|
||||
|
||||
#ifdef DOCKING_PORT_HIGHLIGHT
|
||||
highlight("#f00")
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
name = "In transit" //This looks weird, but- it means that the on-map instances can be named something actually usable to search for, but still appear correctly in terminals.
|
||||
|
||||
shuttle_master.transit += src
|
||||
SSshuttle.transit += src
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile
|
||||
@@ -236,22 +236,22 @@
|
||||
..()
|
||||
|
||||
/obj/docking_port/mobile/register()
|
||||
if(!shuttle_master)
|
||||
if(!SSshuttle)
|
||||
throw EXCEPTION("docking port [src] could not initialize.")
|
||||
return 0
|
||||
|
||||
shuttle_master.mobile += src
|
||||
SSshuttle.mobile += src
|
||||
|
||||
if(!id)
|
||||
id = "[shuttle_master.mobile.len]"
|
||||
id = "[SSshuttle.mobile.len]"
|
||||
if(name == "shuttle")
|
||||
name = "shuttle[shuttle_master.mobile.len]"
|
||||
name = "shuttle[SSshuttle.mobile.len]"
|
||||
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile/Destroy(force)
|
||||
if(force)
|
||||
shuttle_master.mobile -= src
|
||||
SSshuttle.mobile -= src
|
||||
areaInstance = null
|
||||
destination = null
|
||||
previous = null
|
||||
@@ -517,14 +517,14 @@
|
||||
|
||||
|
||||
/obj/docking_port/mobile/proc/findTransitDock()
|
||||
var/obj/docking_port/stationary/transit/T = shuttle_master.getDock("[id]_transit")
|
||||
var/obj/docking_port/stationary/transit/T = SSshuttle.getDock("[id]_transit")
|
||||
if(T && check_dock(T))
|
||||
return T
|
||||
|
||||
|
||||
/obj/docking_port/mobile/proc/findRoundstartDock()
|
||||
var/obj/docking_port/stationary/D
|
||||
D = shuttle_master.getDock(roundstart_move)
|
||||
D = SSshuttle.getDock(roundstart_move)
|
||||
|
||||
if(D)
|
||||
return D
|
||||
@@ -536,7 +536,7 @@
|
||||
. = dock_id(roundstart_move)
|
||||
|
||||
/obj/docking_port/mobile/proc/dock_id(id)
|
||||
var/port = shuttle_master.getDock(id)
|
||||
var/port = SSshuttle.getDock(id)
|
||||
if(port)
|
||||
. = dock(port)
|
||||
else
|
||||
@@ -707,20 +707,20 @@
|
||||
var/obj/docking_port/mobile/M
|
||||
if(!shuttleId)
|
||||
// find close shuttle that is ok to mess with
|
||||
if(!shuttle_master) //intentionally mapping shuttle consoles without actual shuttles IS POSSIBLE OH MY GOD WHO KNEW *glare*
|
||||
if(!SSshuttle) //intentionally mapping shuttle consoles without actual shuttles IS POSSIBLE OH MY GOD WHO KNEW *glare*
|
||||
return
|
||||
for(var/obj/docking_port/mobile/D in shuttle_master.mobile)
|
||||
for(var/obj/docking_port/mobile/D in SSshuttle.mobile)
|
||||
if(get_dist(src, D) <= max_connect_range && D.rebuildable)
|
||||
M = D
|
||||
shuttleId = M.id
|
||||
break
|
||||
else if(!possible_destinations && shuttle_master) //possible destinations should **not** always exist; so, if it's specifically set to null, don't make it exist
|
||||
M = shuttle_master.getShuttle(shuttleId)
|
||||
else if(!possible_destinations && SSshuttle) //possible destinations should **not** always exist; so, if it's specifically set to null, don't make it exist
|
||||
M = SSshuttle.getShuttle(shuttleId)
|
||||
|
||||
if(M && !possible_destinations)
|
||||
// find perfect fits
|
||||
possible_destinations = ""
|
||||
for(var/obj/docking_port/stationary/S in shuttle_master.stationary)
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!istype(S, /obj/docking_port/stationary/transit) && S.width == M.width && S.height == M.height && S.dwidth == M.dwidth && S.dheight == M.dheight && findtext(S.id, M.id))
|
||||
possible_destinations += "[possible_destinations ? ";" : ""][S.id]"
|
||||
|
||||
@@ -734,7 +734,7 @@
|
||||
ui_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 = shuttle_master.getShuttle(shuttleId)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
ui = SSnanoui.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)
|
||||
@@ -742,14 +742,14 @@
|
||||
|
||||
/obj/machinery/computer/shuttle/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
|
||||
var/data[0]
|
||||
var/obj/docking_port/mobile/M = shuttle_master.getShuttle(shuttleId)
|
||||
var/obj/docking_port/mobile/M = SSshuttle.getShuttle(shuttleId)
|
||||
data["status"] = M ? M.getStatusText() : null
|
||||
if(M)
|
||||
data["shuttle"] = 1
|
||||
var/list/docking_ports = list()
|
||||
data["docking_ports"] = docking_ports
|
||||
var/list/options = params2list(possible_destinations)
|
||||
for(var/obj/docking_port/stationary/S in shuttle_master.stationary)
|
||||
for(var/obj/docking_port/stationary/S in SSshuttle.stationary)
|
||||
if(!options.Find(S.id))
|
||||
continue
|
||||
if(!M.check_dock(S))
|
||||
@@ -775,7 +775,7 @@
|
||||
// Seriously, though, NEVER trust a Topic with something like this. Ever.
|
||||
message_admins("move HREF ([src] attempted to move to: [href_list["move"]]) exploit attempted by [key_name_admin(usr)] on [src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
|
||||
return
|
||||
switch(shuttle_master.moveShuttle(shuttleId, href_list["move"], 1))
|
||||
switch(SSshuttle.moveShuttle(shuttleId, href_list["move"], 1))
|
||||
if(0)
|
||||
to_chat(usr, "<span class='notice'>Shuttle received message and will be sent shortly.</span>")
|
||||
if(1)
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
data["templates_tabs"] += S.port_id
|
||||
// The first found shuttle type will be our default
|
||||
if(!existing_shuttle)
|
||||
existing_shuttle = shuttle_master.getShuttle(S.port_id)
|
||||
existing_shuttle = SSshuttle.getShuttle(S.port_id)
|
||||
templates[S.port_id] = list(
|
||||
"port_id" = S.port_id,
|
||||
"templates" = list()
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
// Status panel
|
||||
data["shuttles"] = list()
|
||||
for(var/i in shuttle_master.mobile)
|
||||
for(var/i in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = i
|
||||
var/list/L = list()
|
||||
L["name"] = M.name
|
||||
@@ -148,19 +148,19 @@
|
||||
if(href_list["select_template_category"])
|
||||
var/chosen_shuttle_id = href_list["select_template_category"]
|
||||
selected = null
|
||||
existing_shuttle = shuttle_master.getShuttle(chosen_shuttle_id)
|
||||
existing_shuttle = SSshuttle.getShuttle(chosen_shuttle_id)
|
||||
return 1
|
||||
|
||||
if(href_list["select_template"])
|
||||
if(S)
|
||||
existing_shuttle = shuttle_master.getShuttle(S.port_id)
|
||||
existing_shuttle = SSshuttle.getShuttle(S.port_id)
|
||||
selected = S
|
||||
. = TRUE
|
||||
|
||||
if(href_list["jump_to"])
|
||||
|
||||
if(href_list["type"] == "mobile")
|
||||
for(var/i in shuttle_master.mobile)
|
||||
for(var/i in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = i
|
||||
if(M.id == href_list["id"])
|
||||
user.forceMove(get_turf(M))
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
if(href_list["fast_travel"])
|
||||
|
||||
for(var/i in shuttle_master.mobile)
|
||||
for(var/i in SSshuttle.mobile)
|
||||
var/obj/docking_port/mobile/M = i
|
||||
if(M.id == href_list["id"] && M.timer && M.timeLeft() >= 50)
|
||||
M.setTimer(50)
|
||||
@@ -192,7 +192,7 @@
|
||||
user.forceMove(get_turf(preview_shuttle))
|
||||
|
||||
if(href_list["load"])
|
||||
if(existing_shuttle == shuttle_master.backup_shuttle)
|
||||
if(existing_shuttle == SSshuttle.backup_shuttle)
|
||||
// TODO make the load button disabled
|
||||
WARNING("The shuttle that the selected shuttle will replace \
|
||||
is the backup shuttle. Backup shuttle is required to be \
|
||||
|
||||
+89
-108
@@ -24,7 +24,7 @@
|
||||
/obj/docking_port/mobile/supply/register()
|
||||
if(!..())
|
||||
return 0
|
||||
shuttle_master.supply = src
|
||||
SSshuttle.supply = src
|
||||
return 1
|
||||
|
||||
/obj/docking_port/mobile/supply/canMove()
|
||||
@@ -48,7 +48,7 @@
|
||||
if(!is_station_level(z)) //we only buy when we are -at- the station
|
||||
return 1
|
||||
|
||||
if(!shuttle_master.shoppinglist.len)
|
||||
if(!SSshuttle.shoppinglist.len)
|
||||
return 2
|
||||
|
||||
var/list/emptyTurfs = list()
|
||||
@@ -71,14 +71,14 @@
|
||||
|
||||
emptyTurfs += T
|
||||
|
||||
for(var/datum/supply_order/SO in shuttle_master.shoppinglist)
|
||||
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
|
||||
if(!SO.object)
|
||||
throw EXCEPTION("Supply Order [SO] has no object associated with it.")
|
||||
continue
|
||||
|
||||
var/turf/T = pick_n_take(emptyTurfs) //turf we will place it in
|
||||
if(!T)
|
||||
shuttle_master.shoppinglist.Cut(1, shuttle_master.shoppinglist.Find(SO))
|
||||
SSshuttle.shoppinglist.Cut(1, SSshuttle.shoppinglist.Find(SO))
|
||||
return
|
||||
|
||||
var/errors = 0
|
||||
@@ -90,7 +90,7 @@
|
||||
errors |= MANIFEST_ERROR_ITEM
|
||||
SO.createObject(T, errors)
|
||||
|
||||
shuttle_master.shoppinglist.Cut()
|
||||
SSshuttle.shoppinglist.Cut()
|
||||
|
||||
/obj/docking_port/mobile/supply/proc/sell()
|
||||
if(z != level_name_to_num(CENTCOMM)) //we only sell when we are -at- centcomm
|
||||
@@ -105,19 +105,19 @@
|
||||
|
||||
for(var/atom/movable/MA in areaInstance)
|
||||
if(MA.anchored) continue
|
||||
shuttle_master.sold_atoms += " [MA.name]"
|
||||
SSshuttle.sold_atoms += " [MA.name]"
|
||||
|
||||
// Must be in a crate (or a critter crate)!
|
||||
if(istype(MA,/obj/structure/closet/crate) || istype(MA,/obj/structure/closet/critter))
|
||||
shuttle_master.sold_atoms += ":"
|
||||
SSshuttle.sold_atoms += ":"
|
||||
if(!MA.contents.len)
|
||||
shuttle_master.sold_atoms += " (empty)"
|
||||
SSshuttle.sold_atoms += " (empty)"
|
||||
++crate_count
|
||||
|
||||
var/find_slip = 1
|
||||
for(var/thing in MA)
|
||||
// Sell manifests
|
||||
shuttle_master.sold_atoms += " [thing:name]"
|
||||
SSshuttle.sold_atoms += " [thing:name]"
|
||||
if(find_slip && istype(thing,/obj/item/paper/manifest))
|
||||
var/obj/item/paper/manifest/slip = thing
|
||||
// TODO: Check for a signature, too.
|
||||
@@ -128,8 +128,8 @@
|
||||
if(slip.stamped[i] == /obj/item/stamp/denied)
|
||||
denied = 1
|
||||
if(slip.erroneous && denied) // Caught a mistake by Centcom (IDEA: maybe Centcom rarely gets offended by this)
|
||||
pointsEarned = slip.points - shuttle_master.points_per_crate
|
||||
shuttle_master.points += pointsEarned // For now, give a full refund for paying attention (minus the crate cost)
|
||||
pointsEarned = slip.points - SSshuttle.points_per_crate
|
||||
SSshuttle.points += pointsEarned // For now, give a full refund for paying attention (minus the crate cost)
|
||||
msg += "<span class='good'>+[pointsEarned]</span>: Station correctly denied package [slip.ordernumber]: "
|
||||
if(slip.erroneous & MANIFEST_ERROR_NAME)
|
||||
msg += "Destination station incorrect. "
|
||||
@@ -139,8 +139,8 @@
|
||||
msg += "Package incomplete. "
|
||||
msg += "Points refunded.<br>"
|
||||
else if(!slip.erroneous && !denied) // Approving a proper order awards the relatively tiny points_per_slip
|
||||
shuttle_master.points += shuttle_master.points_per_slip
|
||||
msg += "<span class='good'>+[shuttle_master.points_per_slip]</span>: Package [slip.ordernumber] accorded.<br>"
|
||||
SSshuttle.points += SSshuttle.points_per_slip
|
||||
msg += "<span class='good'>+[SSshuttle.points_per_slip]</span>: Package [slip.ordernumber] accorded.<br>"
|
||||
else // You done goofed.
|
||||
if(slip.erroneous)
|
||||
msg += "<span class='good'>+0</span>: Station approved package [slip.ordernumber] despite error: "
|
||||
@@ -152,8 +152,8 @@
|
||||
msg += "We found unshipped items on our dock."
|
||||
msg += " Be more vigilant.<br>"
|
||||
else
|
||||
pointsEarned = round(shuttle_master.points_per_crate - slip.points)
|
||||
shuttle_master.points += pointsEarned
|
||||
pointsEarned = round(SSshuttle.points_per_crate - slip.points)
|
||||
SSshuttle.points += pointsEarned
|
||||
msg += "<span class='bad'>[pointsEarned]</span>: Station denied package [slip.ordernumber]. Our records show no fault on our part.<br>"
|
||||
find_slip = 0
|
||||
continue
|
||||
@@ -173,10 +173,10 @@
|
||||
if(!disk.stored) continue
|
||||
var/datum/tech/tech = disk.stored
|
||||
|
||||
var/cost = tech.getCost(shuttle_master.techLevels[tech.id])
|
||||
var/cost = tech.getCost(SSshuttle.techLevels[tech.id])
|
||||
if(cost)
|
||||
shuttle_master.techLevels[tech.id] = tech.level
|
||||
shuttle_master.points += cost
|
||||
SSshuttle.techLevels[tech.id] = tech.level
|
||||
SSshuttle.points += cost
|
||||
for(var/mob/M in player_list)
|
||||
if(M.mind)
|
||||
for(var/datum/job_objective/further_research/objective in M.mind.job_objectives)
|
||||
@@ -189,48 +189,48 @@
|
||||
if(!disk.blueprint)
|
||||
continue
|
||||
var/datum/design/design = disk.blueprint
|
||||
if(design.id in shuttle_master.researchDesigns)
|
||||
if(design.id in SSshuttle.researchDesigns)
|
||||
continue
|
||||
shuttle_master.points += shuttle_master.points_per_design
|
||||
shuttle_master.researchDesigns += design.id
|
||||
msg += "<span class='good'>+[shuttle_master.points_per_design]</span>: [design.name] design.<br>"
|
||||
SSshuttle.points += SSshuttle.points_per_design
|
||||
SSshuttle.researchDesigns += design.id
|
||||
msg += "<span class='good'>+[SSshuttle.points_per_design]</span>: [design.name] design.<br>"
|
||||
|
||||
// Sell exotic plants
|
||||
if(istype(thing, /obj/item/seeds))
|
||||
var/obj/item/seeds/S = thing
|
||||
if(S.rarity == 0) // Mundane species
|
||||
msg += "<span class='bad'>+0</span>: We don't need samples of mundane species \"[capitalize(S.species)]\".<br>"
|
||||
else if(shuttle_master.discoveredPlants[S.type]) // This species has already been sent to CentComm
|
||||
var/potDiff = S.potency - shuttle_master.discoveredPlants[S.type] // Compare it to the previous best
|
||||
else if(SSshuttle.discoveredPlants[S.type]) // This species has already been sent to CentComm
|
||||
var/potDiff = S.potency - SSshuttle.discoveredPlants[S.type] // Compare it to the previous best
|
||||
if(potDiff > 0) // This sample is better
|
||||
shuttle_master.discoveredPlants[S.type] = S.potency
|
||||
SSshuttle.discoveredPlants[S.type] = S.potency
|
||||
msg += "<span class='good'>+[potDiff]</span>: New sample of \"[capitalize(S.species)]\" is superior. Good work.<br>"
|
||||
shuttle_master.points += potDiff
|
||||
SSshuttle.points += potDiff
|
||||
else // This sample is worthless
|
||||
msg += "<span class='bad'>+0</span>: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([shuttle_master.discoveredPlants[S.type]] potency).<br>"
|
||||
msg += "<span class='bad'>+0</span>: New sample of \"[capitalize(S.species)]\" is not more potent than existing sample ([SSshuttle.discoveredPlants[S.type]] potency).<br>"
|
||||
else // This is a new discovery!
|
||||
shuttle_master.discoveredPlants[S.type] = S.potency
|
||||
SSshuttle.discoveredPlants[S.type] = S.potency
|
||||
msg += "<span class='good'>[S.rarity]</span>: New species discovered: \"[capitalize(S.species)]\". Excellent work.<br>"
|
||||
shuttle_master.points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
|
||||
SSshuttle.points += S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later
|
||||
qdel(MA)
|
||||
shuttle_master.sold_atoms += "."
|
||||
SSshuttle.sold_atoms += "."
|
||||
|
||||
if(plasma_count > 0)
|
||||
pointsEarned = round(plasma_count * shuttle_master.points_per_plasma)
|
||||
pointsEarned = round(plasma_count * SSshuttle.points_per_plasma)
|
||||
msg += "<span class='good'>+[pointsEarned]</span>: Received [plasma_count] unit(s) of exotic material.<br>"
|
||||
shuttle_master.points += pointsEarned
|
||||
SSshuttle.points += pointsEarned
|
||||
|
||||
if(intel_count > 0)
|
||||
pointsEarned = round(intel_count * shuttle_master.points_per_intel)
|
||||
pointsEarned = round(intel_count * SSshuttle.points_per_intel)
|
||||
msg += "<span class='good'>+[pointsEarned]</span>: Received [intel_count] article(s) of enemy intelligence.<br>"
|
||||
shuttle_master.points += pointsEarned
|
||||
SSshuttle.points += pointsEarned
|
||||
|
||||
if(crate_count > 0)
|
||||
pointsEarned = round(crate_count * shuttle_master.points_per_crate)
|
||||
pointsEarned = round(crate_count * SSshuttle.points_per_crate)
|
||||
msg += "<span class='good'>+[pointsEarned]</span>: Received [crate_count] crate(s).<br>"
|
||||
shuttle_master.points += pointsEarned
|
||||
SSshuttle.points += pointsEarned
|
||||
|
||||
shuttle_master.centcom_message = msg
|
||||
SSshuttle.centcom_message = msg
|
||||
|
||||
/proc/forbidden_atoms_check(atom/A)
|
||||
var/list/blacklist = list(
|
||||
@@ -271,25 +271,6 @@
|
||||
var/comment = null
|
||||
var/crates
|
||||
|
||||
/datum/controller/process/shuttle/proc/generateSupplyOrder(packId, _orderedby, _orderedbyRank, _comment, _crates)
|
||||
if(!packId)
|
||||
return
|
||||
var/datum/supply_packs/P = supply_packs["[packId]"]
|
||||
if(!P)
|
||||
return
|
||||
|
||||
var/datum/supply_order/O = new()
|
||||
O.ordernum = ordernum++
|
||||
O.object = P
|
||||
O.orderedby = _orderedby
|
||||
O.orderedbyRank = _orderedbyRank
|
||||
O.comment = _comment
|
||||
O.crates = _crates
|
||||
|
||||
requestlist += O
|
||||
|
||||
return O
|
||||
|
||||
/datum/supply_order/proc/generateRequisition(atom/_loc)
|
||||
if(!object)
|
||||
return
|
||||
@@ -298,7 +279,7 @@
|
||||
playsound(_loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
|
||||
reqform.name = "Requisition Form - [crates] '[object.name]' for [orderedby]"
|
||||
reqform.info += "<h3>[station_name()] Supply Requisition Form</h3><hr>"
|
||||
reqform.info += "INDEX: #[shuttle_master.ordernum]<br>"
|
||||
reqform.info += "INDEX: #[SSshuttle.ordernum]<br>"
|
||||
reqform.info += "REQUESTED BY: [orderedby]<br>"
|
||||
reqform.info += "RANK: [orderedbyRank]<br>"
|
||||
reqform.info += "REASON: [comment]<br>"
|
||||
@@ -331,7 +312,7 @@
|
||||
slip.ordernumber = ordernum
|
||||
|
||||
var/stationName = (errors & MANIFEST_ERROR_NAME) ? new_station_name() : station_name()
|
||||
var/packagesAmt = shuttle_master.shoppinglist.len + ((errors & MANIFEST_ERROR_COUNT) ? rand(1,2) : 0)
|
||||
var/packagesAmt = SSshuttle.shoppinglist.len + ((errors & MANIFEST_ERROR_COUNT) ? rand(1,2) : 0)
|
||||
|
||||
slip.name = "Shipping Manifest - '[object.name]' for [orderedby]"
|
||||
slip.info = "<h3>[command_name()] Shipping Manifest</h3><hr><br>"
|
||||
@@ -444,8 +425,8 @@
|
||||
|
||||
var/cat = text2num(last_viewed_group)
|
||||
var/packs_list[0]
|
||||
for(var/set_name in shuttle_master.supply_packs)
|
||||
var/datum/supply_packs/pack = shuttle_master.supply_packs[set_name]
|
||||
for(var/set_name in SSshuttle.supply_packs)
|
||||
var/datum/supply_packs/pack = SSshuttle.supply_packs[set_name]
|
||||
if(!pack.contraband && !pack.hidden && !pack.special && pack.group == cat)
|
||||
// 0/1 after the pack name (set_name) is a boolean for ordering multiple crates
|
||||
packs_list.Add(list(list("name" = pack.name, "amount" = pack.amount, "cost" = pack.cost, "command1" = list("doorder" = "[set_name]0"), "command2" = list("doorder" = "[set_name]1"), "command3" = list("contents" = set_name))))
|
||||
@@ -458,7 +439,7 @@
|
||||
data["contents_access"] = content_pack.access ? get_access_desc(content_pack.access) : "None"
|
||||
|
||||
var/requests_list[0]
|
||||
for(var/set_name in shuttle_master.requestlist)
|
||||
for(var/set_name in SSshuttle.requestlist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
// Check if the user owns the request, so they can cancel requests
|
||||
@@ -470,18 +451,18 @@
|
||||
data["requests"] = requests_list
|
||||
|
||||
var/orders_list[0]
|
||||
for(var/set_name in shuttle_master.shoppinglist)
|
||||
for(var/set_name in SSshuttle.shoppinglist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
orders_list.Add(list(list("ordernum" = SO.ordernum, "supply_type" = SO.object.name, "orderedby" = SO.orderedby)))
|
||||
data["orders"] = orders_list
|
||||
|
||||
data["points"] = round(shuttle_master.points)
|
||||
data["points"] = round(SSshuttle.points)
|
||||
data["send"] = list("send" = 1)
|
||||
|
||||
data["moving"] = shuttle_master.supply.mode != SHUTTLE_IDLE
|
||||
data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = shuttle_master.supply.timeLeft(600)
|
||||
data["moving"] = SSshuttle.supply.mode != SHUTTLE_IDLE
|
||||
data["at_station"] = SSshuttle.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = SSshuttle.supply.timeLeft(600)
|
||||
|
||||
return data
|
||||
|
||||
@@ -499,7 +480,7 @@
|
||||
var/multi = text2num(copytext(href_list["doorder"], -1))
|
||||
if(!isnum(multi))
|
||||
return 1
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs[index]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs[index]
|
||||
if(!istype(P))
|
||||
return 1
|
||||
var/crates = 1
|
||||
@@ -528,7 +509,7 @@
|
||||
|
||||
//make our supply_order datums
|
||||
for(var/i = 1; i <= crates; i++)
|
||||
var/datum/supply_order/O = shuttle_master.generateSupplyOrder(index, idname, idrank, reason, crates)
|
||||
var/datum/supply_order/O = SSshuttle.generateSupplyOrder(index, idname, idrank, reason, crates)
|
||||
if(!O) return
|
||||
if(i == 1)
|
||||
O.generateRequisition(loc)
|
||||
@@ -536,10 +517,10 @@
|
||||
else if(href_list["rreq"])
|
||||
var/ordernum = text2num(href_list["rreq"])
|
||||
var/obj/item/card/id/I = usr.get_id_card()
|
||||
for(var/i=1, i<=shuttle_master.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = shuttle_master.requestlist[i]
|
||||
for(var/i=1, i<=SSshuttle.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = SSshuttle.requestlist[i]
|
||||
if(SO.ordernum == ordernum && (I && SO.orderedby == I.registered_name))
|
||||
shuttle_master.requestlist.Cut(i,i+1)
|
||||
SSshuttle.requestlist.Cut(i,i+1)
|
||||
break
|
||||
|
||||
else if(href_list["last_viewed_group"])
|
||||
@@ -551,7 +532,7 @@
|
||||
if(topic == 1)
|
||||
content_pack = null
|
||||
else
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs[topic]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs[topic]
|
||||
content_pack = P
|
||||
|
||||
add_fingerprint(usr)
|
||||
@@ -593,8 +574,8 @@
|
||||
|
||||
var/cat = text2num(last_viewed_group)
|
||||
var/packs_list[0]
|
||||
for(var/set_name in shuttle_master.supply_packs)
|
||||
var/datum/supply_packs/pack = shuttle_master.supply_packs[set_name]
|
||||
for(var/set_name in SSshuttle.supply_packs)
|
||||
var/datum/supply_packs/pack = SSshuttle.supply_packs[set_name]
|
||||
if((pack.hidden && hacked) || (pack.contraband && can_order_contraband) || (pack.special && pack.special_enabled) || (!pack.contraband && !pack.hidden && !pack.special))
|
||||
if(pack.group == cat)
|
||||
// 0/1 after the pack name (set_name) is a boolean for ordering multiple crates
|
||||
@@ -608,7 +589,7 @@
|
||||
data["contents_access"] = content_pack.access ? get_access_desc(content_pack.access) : "None"
|
||||
|
||||
var/requests_list[0]
|
||||
for(var/set_name in shuttle_master.requestlist)
|
||||
for(var/set_name in SSshuttle.requestlist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
if(!SO.comment)
|
||||
@@ -617,21 +598,21 @@
|
||||
data["requests"] = requests_list
|
||||
|
||||
var/orders_list[0]
|
||||
for(var/set_name in shuttle_master.shoppinglist)
|
||||
for(var/set_name in SSshuttle.shoppinglist)
|
||||
var/datum/supply_order/SO = set_name
|
||||
if(SO)
|
||||
orders_list.Add(list(list("ordernum" = SO.ordernum, "supply_type" = SO.object.name, "orderedby" = SO.orderedby, "comment" = SO.comment)))
|
||||
data["orders"] = orders_list
|
||||
|
||||
data["canapprove"] = (shuttle_master.supply.getDockedId() == "supply_away") && !(shuttle_master.supply.mode != SHUTTLE_IDLE)
|
||||
data["points"] = round(shuttle_master.points)
|
||||
data["canapprove"] = (SSshuttle.supply.getDockedId() == "supply_away") && !(SSshuttle.supply.mode != SHUTTLE_IDLE)
|
||||
data["points"] = round(SSshuttle.points)
|
||||
data["send"] = list("send" = 1)
|
||||
data["message"] = shuttle_master.centcom_message ? shuttle_master.centcom_message : "Remember to stamp and send back the supply manifests."
|
||||
data["message"] = SSshuttle.centcom_message ? SSshuttle.centcom_message : "Remember to stamp and send back the supply manifests."
|
||||
|
||||
data["moving"] = shuttle_master.supply.mode != SHUTTLE_IDLE
|
||||
data["at_station"] = shuttle_master.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = shuttle_master.supply.timeLeft(600)
|
||||
data["can_launch"] = !shuttle_master.supply.canMove()
|
||||
data["moving"] = SSshuttle.supply.mode != SHUTTLE_IDLE
|
||||
data["at_station"] = SSshuttle.supply.getDockedId() == "supply_home"
|
||||
data["timeleft"] = SSshuttle.supply.timeLeft(600)
|
||||
data["can_launch"] = !SSshuttle.supply.canMove()
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/supplycomp/proc/is_authorized(mob/user)
|
||||
@@ -650,24 +631,24 @@
|
||||
if(!is_authorized(usr))
|
||||
return 1
|
||||
|
||||
if(!shuttle_master)
|
||||
log_runtime(EXCEPTION("The shuttle_master controller datum is missing somehow."), src)
|
||||
if(!SSshuttle)
|
||||
log_runtime(EXCEPTION("The SSshuttle controller datum is missing somehow."), src)
|
||||
return 1
|
||||
|
||||
if(href_list["send"])
|
||||
if(shuttle_master.supply.canMove())
|
||||
if(SSshuttle.supply.canMove())
|
||||
to_chat(usr, "<span class='warning'>For safety reasons the automated supply shuttle cannot transport live organisms, classified nuclear weaponry or homing beacons.</span>")
|
||||
else if(shuttle_master.supply.getDockedId() == "supply_home")
|
||||
shuttle_master.toggleShuttle("supply", "supply_home", "supply_away", 1)
|
||||
investigate_log("[key_name(usr)] has sent the supply shuttle away. Remaining points: [shuttle_master.points]. Shuttle contents: [shuttle_master.sold_atoms]", "cargo")
|
||||
else if(!shuttle_master.supply.request(shuttle_master.getDock("supply_home")))
|
||||
else if(SSshuttle.supply.getDockedId() == "supply_home")
|
||||
SSshuttle.toggleShuttle("supply", "supply_home", "supply_away", 1)
|
||||
investigate_log("[key_name(usr)] has sent the supply shuttle away. Remaining points: [SSshuttle.points]. Shuttle contents: [SSshuttle.sold_atoms]", "cargo")
|
||||
else if(!SSshuttle.supply.request(SSshuttle.getDock("supply_home")))
|
||||
post_signal("supply")
|
||||
if(LAZYLEN(shuttle_master.shoppinglist) && prob(10))
|
||||
if(LAZYLEN(SSshuttle.shoppinglist) && prob(10))
|
||||
var/datum/supply_order/O = new /datum/supply_order()
|
||||
O.ordernum = shuttle_master.ordernum
|
||||
O.object = shuttle_master.supply_packs[pick(shuttle_master.supply_packs)]
|
||||
O.ordernum = SSshuttle.ordernum
|
||||
O.object = SSshuttle.supply_packs[pick(SSshuttle.supply_packs)]
|
||||
O.orderedby = random_name(pick(MALE,FEMALE), species = "Human")
|
||||
shuttle_master.shoppinglist += O
|
||||
SSshuttle.shoppinglist += O
|
||||
investigate_log("Random [O.object] crate added to supply shuttle")
|
||||
|
||||
else if(href_list["doorder"])
|
||||
@@ -680,7 +661,7 @@
|
||||
var/multi = text2num(copytext(href_list["doorder"], -1))
|
||||
if(!isnum(multi))
|
||||
return 1
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs[index]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs[index]
|
||||
if(!istype(P))
|
||||
return 1
|
||||
var/crates = 1
|
||||
@@ -708,37 +689,37 @@
|
||||
|
||||
//make our supply_order datums
|
||||
for(var/i = 1; i <= crates; i++)
|
||||
var/datum/supply_order/O = shuttle_master.generateSupplyOrder(index, idname, idrank, reason, crates)
|
||||
var/datum/supply_order/O = SSshuttle.generateSupplyOrder(index, idname, idrank, reason, crates)
|
||||
if(!O) return 1
|
||||
if(i == 1)
|
||||
O.generateRequisition(loc)
|
||||
|
||||
else if(href_list["confirmorder"])
|
||||
if(shuttle_master.supply.getDockedId() != "supply_away" || shuttle_master.supply.mode != SHUTTLE_IDLE)
|
||||
if(SSshuttle.supply.getDockedId() != "supply_away" || SSshuttle.supply.mode != SHUTTLE_IDLE)
|
||||
return 1
|
||||
var/ordernum = text2num(href_list["confirmorder"])
|
||||
var/datum/supply_order/O
|
||||
var/datum/supply_packs/P
|
||||
for(var/i=1, i<=shuttle_master.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = shuttle_master.requestlist[i]
|
||||
for(var/i=1, i<=SSshuttle.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = SSshuttle.requestlist[i]
|
||||
if(SO.ordernum == ordernum)
|
||||
O = SO
|
||||
P = O.object
|
||||
if(shuttle_master.points >= P.cost)
|
||||
shuttle_master.requestlist.Cut(i,i+1)
|
||||
shuttle_master.points -= P.cost
|
||||
shuttle_master.shoppinglist += O
|
||||
investigate_log("[key_name(usr)] has authorized an order for [P.name]. Remaining points: [shuttle_master.points].", "cargo")
|
||||
if(SSshuttle.points >= P.cost)
|
||||
SSshuttle.requestlist.Cut(i,i+1)
|
||||
SSshuttle.points -= P.cost
|
||||
SSshuttle.shoppinglist += O
|
||||
investigate_log("[key_name(usr)] has authorized an order for [P.name]. Remaining points: [SSshuttle.points].", "cargo")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>There are insufficient supply points for this request.</span>")
|
||||
break
|
||||
|
||||
else if(href_list["rreq"])
|
||||
var/ordernum = text2num(href_list["rreq"])
|
||||
for(var/i=1, i<=shuttle_master.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = shuttle_master.requestlist[i]
|
||||
for(var/i=1, i<=SSshuttle.requestlist.len, i++)
|
||||
var/datum/supply_order/SO = SSshuttle.requestlist[i]
|
||||
if(SO.ordernum == ordernum)
|
||||
shuttle_master.requestlist.Cut(i,i+1)
|
||||
SSshuttle.requestlist.Cut(i,i+1)
|
||||
break
|
||||
|
||||
else if(href_list["last_viewed_group"])
|
||||
@@ -750,7 +731,7 @@
|
||||
if(topic == 1)
|
||||
content_pack = null
|
||||
else
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs[topic]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs[topic]
|
||||
content_pack = P
|
||||
|
||||
add_fingerprint(usr)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/datum/station_goal/bluespace_cannon/on_report()
|
||||
//Unlock BSA parts
|
||||
var/datum/supply_packs/misc/bsa/P = shuttle_master.supply_packs["[/datum/supply_packs/misc/bsa]"]
|
||||
var/datum/supply_packs/misc/bsa/P = SSshuttle.supply_packs["[/datum/supply_packs/misc/bsa]"]
|
||||
P.special_enabled = TRUE
|
||||
|
||||
/datum/station_goal/bluespace_cannon/check_completion()
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
The base vault parts should be available for shipping by your cargo shuttle."}
|
||||
|
||||
/datum/station_goal/dna_vault/on_report()
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs["[/datum/supply_packs/misc/dna_vault]"]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs["[/datum/supply_packs/misc/dna_vault]"]
|
||||
P.special_enabled = TRUE
|
||||
|
||||
P = shuttle_master.supply_packs["[/datum/supply_packs/misc/dna_probes]"]
|
||||
P = SSshuttle.supply_packs["[/datum/supply_packs/misc/dna_probes]"]
|
||||
P.special_enabled = TRUE
|
||||
|
||||
/datum/station_goal/dna_vault/check_completion()
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
/datum/station_goal/station_shield/on_report()
|
||||
//Unlock
|
||||
var/datum/supply_packs/P = shuttle_master.supply_packs["[/datum/supply_packs/misc/shield_sat]"]
|
||||
var/datum/supply_packs/P = SSshuttle.supply_packs["[/datum/supply_packs/misc/shield_sat]"]
|
||||
P.special_enabled = TRUE
|
||||
|
||||
P = shuttle_master.supply_packs["[/datum/supply_packs/misc/shield_sat_control]"]
|
||||
P = SSshuttle.supply_packs["[/datum/supply_packs/misc/shield_sat_control]"]
|
||||
P.special_enabled = TRUE
|
||||
|
||||
/datum/station_goal/station_shield/check_completion()
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
// Polycrystals, aka stacks
|
||||
|
||||
var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/stack_recipe("Breakdown into bluespace crystal", /obj/item/ore/bluespace_crystal/refined, 1, one_per_turf = 0, on_floor = 1))
|
||||
var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/stack_recipe("Breakdown into bluespace crystal", /obj/item/ore/bluespace_crystal/refined, 1))
|
||||
|
||||
/obj/item/stack/sheet/bluespace_crystal
|
||||
name = "bluespace polycrystal"
|
||||
|
||||
Reference in New Issue
Block a user