mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Remove all gamemodes except Dynamic (#58470)
Removes all /datum/game_mode except dynamic. Eventually, all of mode and game_mode will be removed, and Dynamic will become an ingrained system. Every single other gamemode was unmaintained at best and poisoned other code at worst. Currently all tg servers run 24/7 Dynamic, so the time to act is now. * Remove gamemode references from age checks * Monkey * Remove heretics * Remove BBs * Refactor uplinks and remove clown ops * Remove nuke ops * Removes and refactors cult * Remove extended * Remove and move out meteors * Removes wizard * Remove sandbox * Remove changelings * Remove traitors * Remove revs * Remove gangs * Remove changing mode and voting for new gamemodes * get_candidates signature fix * Summon ERT and NERD in their own panel * Remove some old unneeded age_check stuff * Fix old signatures of get_uplink_items * Use Extended like config for dynamic.json * Fix discounted gear
This commit is contained in:
@@ -1,245 +1,6 @@
|
||||
/// If we spawn an ERT with the "choose experienced leader" option, select the leader from the top X playtimes
|
||||
#define ERT_EXPERIENCED_LEADER_CHOOSE_TOP 3
|
||||
|
||||
/client/proc/one_click_antag()
|
||||
set name = "Create Antagonist"
|
||||
set desc = "Auto-create an antagonist of your choice"
|
||||
set category = "Admin.Events"
|
||||
|
||||
if(holder)
|
||||
holder.one_click_antag()
|
||||
return
|
||||
|
||||
|
||||
/datum/admins/proc/one_click_antag()
|
||||
var/dat = {"
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=traitors'>Make Traitors</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=changelings'>Make Changelings</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=revs'>Make Revs</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=cult'>Make Cult</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=blob'>Make Blob</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=wizard'>Make Wizard (Requires Ghosts)</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=nukeops'>Make Nuke Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=centcom'>Make CentCom Response Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=abductors'>Make Abductor Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=revenant'>Make Revenant (Requires Ghost)</a><br>
|
||||
<a href='?src=[REF(src)];[HrefToken()];makeAntag=nerd'>Make N.E.R.D. (Requires Ghost)</a><br>
|
||||
"}
|
||||
|
||||
var/datum/browser/popup = new(usr, "oneclickantag", "Quick-Create Antagonist", 400, 400)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/datum/admins/proc/isReadytoRumble(mob/living/carbon/human/applicant, targetrole, onstation = TRUE, conscious = TRUE)
|
||||
if(applicant.mind.special_role)
|
||||
return FALSE
|
||||
if(!(targetrole in applicant.client.prefs.be_special))
|
||||
return FALSE
|
||||
if(onstation)
|
||||
var/turf/T = get_turf(applicant)
|
||||
if(!is_station_level(T.z))
|
||||
return FALSE
|
||||
if(conscious && applicant.stat) //incase you don't care about a certain antag being unconcious when made, ie if they have selfhealing abilities.
|
||||
return FALSE
|
||||
if(!considered_alive(applicant.mind) || considered_afk(applicant.mind)) //makes sure the player isn't a zombie, brain, or just afk all together
|
||||
return FALSE
|
||||
return !is_banned_from(applicant.ckey, list(targetrole, ROLE_SYNDICATE))
|
||||
|
||||
|
||||
/datum/admins/proc/makeTraitors(maxCount = 3)
|
||||
var/datum/game_mode/traitor/temp = new
|
||||
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
temp.restricted_jobs += "Assistant"
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(isReadytoRumble(applicant, ROLE_TRAITOR))
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numTraitors = min(candidates.len, maxCount)
|
||||
|
||||
for(var/i = 0, i<numTraitors, i++)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Traitor()
|
||||
candidates.Remove(H)
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/admins/proc/makeChangelings(maxCount = 3)
|
||||
|
||||
var/datum/game_mode/changeling/temp = new
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
temp.restricted_jobs += "Assistant"
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(isReadytoRumble(applicant, ROLE_CHANGELING))
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numChangelings = min(candidates.len, maxCount)
|
||||
|
||||
for(var/i = 0, i<numChangelings, i++)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Changeling()
|
||||
candidates.Remove(H)
|
||||
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/datum/admins/proc/makeRevs(maxCount = 3)
|
||||
|
||||
var/datum/game_mode/revolution/temp = new
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
temp.restricted_jobs += "Assistant"
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(isReadytoRumble(applicant, ROLE_REV))
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numRevs = min(candidates.len, maxCount)
|
||||
|
||||
for(var/i = 0, i<numRevs, i++)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Rev()
|
||||
candidates.Remove(H)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/datum/admins/proc/makeWizard()
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", ROLE_WIZARD, null)
|
||||
|
||||
var/mob/dead/observer/selected = pick_n_take(candidates)
|
||||
|
||||
var/mob/living/carbon/human/new_character = makeBody(selected)
|
||||
new_character.mind.make_Wizard()
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/admins/proc/makeCult(maxCount = 4)
|
||||
var/datum/game_mode/cult/temp = new
|
||||
if(CONFIG_GET(flag/protect_roles_from_antagonist))
|
||||
temp.restricted_jobs += temp.protected_jobs
|
||||
|
||||
if(CONFIG_GET(flag/protect_assistant_from_antagonist))
|
||||
temp.restricted_jobs += "Assistant"
|
||||
|
||||
var/list/mob/living/carbon/human/candidates = list()
|
||||
var/mob/living/carbon/human/H = null
|
||||
|
||||
for(var/mob/living/carbon/human/applicant in GLOB.player_list)
|
||||
if(isReadytoRumble(applicant, ROLE_CULTIST))
|
||||
if(temp.age_check(applicant.client))
|
||||
if(!(applicant.job in temp.restricted_jobs))
|
||||
candidates += applicant
|
||||
|
||||
if(candidates.len)
|
||||
var/numCultists = min(candidates.len, maxCount)
|
||||
|
||||
for(var/i = 0, i<numCultists, i++)
|
||||
H = pick(candidates)
|
||||
H.mind.make_Cultist()
|
||||
candidates.Remove(H)
|
||||
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
/datum/admins/proc/makeNukeTeam(maxCount = 5)
|
||||
var/datum/game_mode/nuclear/temp = new
|
||||
var/list/mob/dead/observer/candidates = pollGhostCandidates("Do you wish to be considered for a nuke team being sent in?", ROLE_OPERATIVE, temp)
|
||||
var/list/mob/dead/observer/chosen = list()
|
||||
var/mob/dead/observer/theghost = null
|
||||
|
||||
if(candidates.len)
|
||||
var/numagents = maxCount
|
||||
var/agentcount = 0
|
||||
|
||||
for(var/i = 0, i<numagents,i++)
|
||||
shuffle_inplace(candidates) //More shuffles means more randoms
|
||||
for(var/mob/j in candidates)
|
||||
if(!j || !j.client)
|
||||
candidates.Remove(j)
|
||||
continue
|
||||
|
||||
theghost = j
|
||||
candidates.Remove(theghost)
|
||||
chosen += theghost
|
||||
agentcount++
|
||||
break
|
||||
//Making sure we have atleast 3 Nuke agents, because less than that is kinda bad
|
||||
if(agentcount < 3)
|
||||
return FALSE
|
||||
|
||||
//Let's find the spawn locations
|
||||
var/leader_chosen = FALSE
|
||||
var/datum/team/nuclear/nuke_team
|
||||
for(var/mob/c in chosen)
|
||||
var/mob/living/carbon/human/new_character=makeBody(c)
|
||||
if(!leader_chosen)
|
||||
leader_chosen = TRUE
|
||||
var/datum/antagonist/nukeop/N = new_character.mind.add_antag_datum(/datum/antagonist/nukeop/leader)
|
||||
nuke_team = N.nuke_team
|
||||
else
|
||||
new_character.mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/admins/proc/makeAliens()
|
||||
var/datum/round_event/ghost_role/alien_infestation/E = new(FALSE)
|
||||
E.spawncount = 3
|
||||
// TODO The fact we have to do this rather than just have events start
|
||||
// when we ask them to, is bad.
|
||||
E.processing = TRUE
|
||||
return TRUE
|
||||
|
||||
/datum/admins/proc/makeSpaceNinja()
|
||||
new /datum/round_event/ghost_role/space_ninja()
|
||||
return TRUE
|
||||
|
||||
// DEATH SQUADS
|
||||
/datum/admins/proc/makeDeathsquad()
|
||||
return makeEmergencyresponseteam(/datum/ert/deathsquad)
|
||||
|
||||
// CENTCOM RESPONSE TEAM
|
||||
|
||||
/datum/admins/proc/makeERTTemplateModified(list/settings)
|
||||
@@ -452,40 +213,17 @@
|
||||
|
||||
return
|
||||
|
||||
//Abductors
|
||||
/datum/admins/proc/makeAbductorTeam()
|
||||
new /datum/round_event/ghost_role/abductor
|
||||
return TRUE
|
||||
/client/proc/summon_ert()
|
||||
set category = "Admin.Fun"
|
||||
set name = "Summon ERT"
|
||||
set desc = "Summons an emergency response team"
|
||||
|
||||
/datum/admins/proc/makeRevenant()
|
||||
new /datum/round_event/ghost_role/revenant(TRUE, TRUE)
|
||||
return TRUE
|
||||
|
||||
/datum/admins/proc/makeNerd()
|
||||
var/spawnpoint = pick(GLOB.blobstart)
|
||||
var/list/mob/dead/observer/candidates
|
||||
var/mob/dead/observer/chosen_candidate
|
||||
var/mob/living/simple_animal/drone/nerd
|
||||
var/teamsize
|
||||
|
||||
teamsize = input(usr, "How many drones?", "N.E.R.D. team size", 2) as num|null
|
||||
|
||||
if(teamsize <= 0)
|
||||
return FALSE
|
||||
|
||||
candidates = pollGhostCandidates("Do you wish to be considered for a Nanotrasen emergency response drone?", "Drone")
|
||||
|
||||
if(length(candidates) == 0)
|
||||
return FALSE
|
||||
|
||||
while(length(candidates) && teamsize)
|
||||
chosen_candidate = pick(candidates)
|
||||
candidates -= chosen_candidate
|
||||
nerd = new /mob/living/simple_animal/drone/classic(spawnpoint)
|
||||
nerd.key = chosen_candidate.key
|
||||
log_game("[key_name(nerd)] has been selected as a Nanotrasen emergency response drone")
|
||||
teamsize--
|
||||
|
||||
return TRUE
|
||||
message_admins("[key_name(usr)] is creating a CentCom response team...")
|
||||
if(holder?.makeEmergencyresponseteam())
|
||||
message_admins("[key_name(usr)] created a CentCom response team.")
|
||||
log_admin("[key_name(usr)] created a CentCom response team.")
|
||||
else
|
||||
message_admins("[key_name_admin(usr)] tried to create a CentCom response team. Unfortunately, there were not enough candidates available.")
|
||||
log_admin("[key_name(usr)] failed to create a CentCom response team.")
|
||||
|
||||
#undef ERT_EXPERIENCED_LEADER_CHOOSE_TOP
|
||||
@@ -27,7 +27,7 @@
|
||||
prayer_type = "CHAPLAIN PRAYER"
|
||||
if(GLOB.deity)
|
||||
deity = GLOB.deity
|
||||
else if(iscultist(usr))
|
||||
else if(IS_CULTIST(usr))
|
||||
cross.icon_state = "tome"
|
||||
font_color = "red"
|
||||
prayer_type = "CULTIST PRAYER"
|
||||
|
||||
@@ -557,6 +557,32 @@
|
||||
message_admins("[key_name_admin(holder)] has Un-Fully Immersed \
|
||||
everyone!")
|
||||
log_admin("[key_name(holder)] has Un-Fully Immersed everyone.")
|
||||
if("makeNerd")
|
||||
var/spawnpoint = pick(GLOB.blobstart)
|
||||
var/list/mob/dead/observer/candidates
|
||||
var/mob/dead/observer/chosen_candidate
|
||||
var/mob/living/simple_animal/drone/nerd
|
||||
var/teamsize
|
||||
|
||||
teamsize = input(usr, "How many drones?", "N.E.R.D. team size", 2) as num|null
|
||||
|
||||
if(teamsize <= 0)
|
||||
return FALSE
|
||||
|
||||
candidates = pollGhostCandidates("Do you wish to be considered for a Nanotrasen emergency response drone?", "Drone")
|
||||
|
||||
if(length(candidates) == 0)
|
||||
return FALSE
|
||||
|
||||
while(length(candidates) && teamsize)
|
||||
chosen_candidate = pick(candidates)
|
||||
candidates -= chosen_candidate
|
||||
nerd = new /mob/living/simple_animal/drone/classic(spawnpoint)
|
||||
nerd.key = chosen_candidate.key
|
||||
log_game("[key_name(nerd)] has been selected as a Nanotrasen emergency response drone")
|
||||
teamsize--
|
||||
|
||||
return TRUE
|
||||
if(E)
|
||||
E.processing = FALSE
|
||||
if(E.announceWhen>0)
|
||||
|
||||
Reference in New Issue
Block a user