mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Adds "Min Days" option to VV->Offer Control To Ghosts
This commit is contained in:
@@ -418,7 +418,7 @@
|
||||
/proc/SecondsToTicks(var/seconds)
|
||||
return seconds * 10
|
||||
|
||||
proc/pollCandidates(var/Question, var/be_special_type, var/antag_age_check = 0, var/poll_time = 300, var/ignore_respawnability = 0)
|
||||
proc/pollCandidates(var/Question, var/be_special_type, var/antag_age_check = 0, var/poll_time = 300, var/ignore_respawnability = 0, var/min_days = 0)
|
||||
var/roletext = be_special_type ? get_roletext(be_special_type) : null
|
||||
var/list/mob/dead/observer/candidates = list()
|
||||
var/time_passed = world.time
|
||||
@@ -437,6 +437,9 @@ proc/pollCandidates(var/Question, var/be_special_type, var/antag_age_check = 0,
|
||||
if(roletext)
|
||||
if(jobban_isbanned(G, roletext) || jobban_isbanned(G, "Syndicate"))
|
||||
continue
|
||||
if(min_days)
|
||||
if(G.client.player_age < min_days)
|
||||
continue
|
||||
if(G.has_enabled_antagHUD)
|
||||
continue
|
||||
spawn(0)
|
||||
|
||||
@@ -617,7 +617,8 @@ body
|
||||
to_chat(M, "Control of your mob has been offered to dead players.")
|
||||
log_admin("[key_name(usr)] has offered control of ([key_name(M)]) to ghosts.")
|
||||
message_admins("[key_name_admin(usr)] has offered control of ([key_name_admin(M)]) to ghosts")
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [M.real_name]?", poll_time = 100)
|
||||
var/mindays = input(usr, "Minimum days required to play [M]?", "Set Min Days", 30) as num
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [M.real_name]?", poll_time = 100, min_days = mindays)
|
||||
var/mob/dead/observer/theghost = null
|
||||
|
||||
if(candidates.len)
|
||||
|
||||
Reference in New Issue
Block a user