mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 19:43:16 +00:00
shuttle_controller now uses a shuttle datum
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
|
||||
var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All")
|
||||
|
||||
if(age == "All")
|
||||
if(age == "All")
|
||||
age = 9999999
|
||||
else
|
||||
age = text2num(age)
|
||||
@@ -91,7 +91,7 @@
|
||||
continue
|
||||
if(C.player_age < age)
|
||||
msg += "[key_name(C, 1, 1, highlight_special_characters)]: account is [C.player_age] days old<br>"
|
||||
|
||||
|
||||
if(missing_ages)
|
||||
src << "Some accounts did not have proper ages set in their clients. This function requires database to be present"
|
||||
|
||||
@@ -264,7 +264,7 @@ Ccomp's first proc.
|
||||
|
||||
/client/proc/get_ghosts(var/notify = 0,var/what = 2)
|
||||
// what = 1, return ghosts ass list.
|
||||
// what = 2, return mob list
|
||||
// what = 2, return mob list
|
||||
|
||||
var/list/mobs = list()
|
||||
var/list/ghosts = list()
|
||||
@@ -300,22 +300,22 @@ Ccomp's first proc.
|
||||
src << "Hrm, appears you didn't select a ghost" // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.
|
||||
return
|
||||
|
||||
var/mob/dead/observer/G = ghosts[target]
|
||||
if(G.has_enabled_antagHUD && config.antag_hud_restricted)
|
||||
var/mob/dead/observer/G = ghosts[target]
|
||||
if(G.has_enabled_antagHUD && config.antag_hud_restricted)
|
||||
var/response = alert(src, "Are you sure you wish to allow this individual to play?","Ghost has used AntagHUD","Yes","No")
|
||||
if(response == "No") return
|
||||
if(response == "No") return
|
||||
G.timeofdeath=-19999 /* time of death is checked in /mob/verb/abandon_mob() which is the Respawn verb.
|
||||
timeofdeath is used for bodies on autopsy but since we're messing with a ghost I'm pretty sure
|
||||
there won't be an autopsy.
|
||||
*/
|
||||
G.has_enabled_antagHUD = 2
|
||||
G.has_enabled_antagHUD = 2
|
||||
G.can_reenter_corpse = 1
|
||||
|
||||
G:show_message(text("\blue <B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B>"), 1)
|
||||
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the 30 minute respawn limit")
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the 30 minute respawn limit", 1)
|
||||
|
||||
|
||||
|
||||
/client/proc/toggle_antagHUD_use()
|
||||
set category = "Server"
|
||||
set name = "Toggle antagHUD usage"
|
||||
@@ -331,7 +331,7 @@ Ccomp's first proc.
|
||||
if(g.antagHUD)
|
||||
g.antagHUD = 0 // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
g << "\red <B>The Administrator has disabled AntagHUD </B>"
|
||||
g << "\red <B>The Administrator has disabled AntagHUD </B>"
|
||||
config.antag_hud_allowed = 0
|
||||
src << "\red <B>AntagHUD usage has been disabled</B>"
|
||||
action = "disabled"
|
||||
@@ -343,8 +343,8 @@ Ccomp's first proc.
|
||||
config.antag_hud_allowed = 1
|
||||
action = "enabled"
|
||||
src << "\blue <B>AntagHUD usage has been enabled</B>"
|
||||
|
||||
|
||||
|
||||
|
||||
log_admin("[key_name(usr)] has [action] antagHUD usage for observers")
|
||||
message_admins("Admin [key_name_admin(usr)] has [action] antagHUD usage for observers", 1)
|
||||
|
||||
@@ -361,7 +361,7 @@ Ccomp's first proc.
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
g << "\blue <B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B>"
|
||||
action = "lifted restrictions"
|
||||
config.antag_hud_restricted = 0
|
||||
config.antag_hud_restricted = 0
|
||||
src << "\blue <B>AntagHUD restrictions have been lifted</B>"
|
||||
else
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
@@ -375,7 +375,7 @@ Ccomp's first proc.
|
||||
|
||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
|
||||
message_admins("Admin [key_name_admin(usr)] has [action] on joining the round if they use AntagHUD", 1)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Admin"
|
||||
set name = "Call Shuttle"
|
||||
|
||||
if ((!( ticker ) || emergency_shuttle.location))
|
||||
if ((!( ticker ) || emergency_shuttle.location()))
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
@@ -891,16 +891,21 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
|
||||
var/choice
|
||||
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction")
|
||||
var/choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
|
||||
choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
|
||||
if(choice == "Confirm")
|
||||
emergency_shuttle.fake_recall = rand(300,500)
|
||||
emergency_shuttle.auto_recall = 1 //enable auto-recall
|
||||
else
|
||||
return
|
||||
|
||||
emergency_shuttle.incall()
|
||||
captain_announce("The emergency shuttle has been called. It will arrive in [round(emergency_shuttle.timeleft()/60)] minutes.")
|
||||
world << sound('sound/AI/shuttlecalled.ogg')
|
||||
choice = input("Is this an emergency evacuation or a crew transfer?") in list("Emergency", "Crew Transfer")
|
||||
if (choice == "Emergency")
|
||||
emergency_shuttle.call_evac()
|
||||
else
|
||||
emergency_shuttle.call_transfer()
|
||||
|
||||
|
||||
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.")
|
||||
message_admins("\blue [key_name_admin(usr)] admin-called the emergency shuttle.", 1)
|
||||
@@ -914,7 +919,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
|
||||
|
||||
if(!ticker || emergency_shuttle.location || emergency_shuttle.direction == 0)
|
||||
if(!ticker || !emergency_shuttle.can_recall())
|
||||
return
|
||||
|
||||
emergency_shuttle.recall()
|
||||
|
||||
@@ -30,7 +30,7 @@ var/global/sent_strike_team = 0
|
||||
|
||||
sent_strike_team = 1
|
||||
|
||||
if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1)
|
||||
if (emergency_shuttle.can_recall())
|
||||
emergency_shuttle.recall()
|
||||
|
||||
var/commando_number = commandos_possible //for selecting a leader
|
||||
|
||||
@@ -35,8 +35,8 @@ var/global/sent_syndicate_strike_team = 0
|
||||
|
||||
sent_syndicate_strike_team = 1
|
||||
|
||||
if (emergency_shuttle.direction == 1 && emergency_shuttle.online == 1)
|
||||
emergency_shuttle.recall()
|
||||
//if (emergency_shuttle.can_recall())
|
||||
// emergency_shuttle.recall() //why, exactly? Admins can do this themselves.
|
||||
|
||||
var/syndicate_commando_number = syndicate_commandos_possible //for selecting a leader
|
||||
var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned.
|
||||
|
||||
Reference in New Issue
Block a user