mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
Merge pull request #5627 from Fox-McCloud/game-mode-cleanup
Removes Unused Gamemodes
This commit is contained in:
@@ -1,159 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
|
||||
// TOTALLY NOT COPY-PASTA FROM meme.dm
|
||||
|
||||
/datum/game_mode/var/list/borers = list()
|
||||
|
||||
/datum/game_mode/borer
|
||||
name = "corticalborers"
|
||||
config_tag = "borer"
|
||||
required_players = 10
|
||||
restricted_jobs = list("AI", "Cyborg", "Mobile MMI")
|
||||
recommended_enemies = 2 // need at least a borer and a host
|
||||
votable = 0 // temporarily disable this mode for voting
|
||||
|
||||
var/var/list/datum/mind/first_hosts = list()
|
||||
var/var/list/assigned_hosts = list()
|
||||
|
||||
var/list/found_vents = list()
|
||||
|
||||
/datum/game_mode/borer/announce()
|
||||
to_chat(world, "<B>The current game mode is - Cortical Borer!</B>")
|
||||
to_chat(world, "<B>An unknown creature has infested the mind of a crew member. Find and destroy it by any means necessary.</B>")
|
||||
|
||||
/datum/game_mode/borer/can_start()
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
// for every 10 players, get 1 borer, and for each borer, get a host
|
||||
// also make sure that there's at least one borer and one host
|
||||
recommended_enemies = max(src.num_players() / 20 * 2, 2)
|
||||
|
||||
var/list/datum/mind/possible_borers = get_players_for_role(ROLE_BORER)
|
||||
|
||||
if(possible_borers.len < 2)
|
||||
log_admin("MODE FAILURE: BORER. NOT ENOUGH BORER CANDIDATES.")
|
||||
return 0 // not enough candidates for borer
|
||||
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
|
||||
if(!v.welded && is_station_level(v.z))
|
||||
found_vents.Add(v)
|
||||
|
||||
// for each 2 possible borers, add one borer and one host
|
||||
while(possible_borers.len >= 2)
|
||||
var/datum/mind/borer = pick(possible_borers)
|
||||
possible_borers.Remove(borer)
|
||||
|
||||
var/datum/mind/first_host = pick(possible_borers)
|
||||
possible_borers.Remove(first_host)
|
||||
|
||||
modePlayer += borer
|
||||
modePlayer += first_host
|
||||
borers += borer
|
||||
first_hosts += first_host
|
||||
|
||||
// so that we can later know which host belongs to which borer
|
||||
assigned_hosts[borer.key] = first_host
|
||||
|
||||
borer.assigned_role = "MODE" //So they aren't chosen for other jobs.
|
||||
borer.special_role = SPECIAL_ROLE_BORER
|
||||
|
||||
return 1
|
||||
|
||||
/datum/game_mode/borer/pre_setup()
|
||||
return 1
|
||||
|
||||
|
||||
/datum/game_mode/borer/post_setup()
|
||||
// create a borer and enter it
|
||||
for(var/datum/mind/borer in borers)
|
||||
// Pick a backup location to spawn at if we can't infest.
|
||||
var/spawn_loc
|
||||
if(found_vents.len)
|
||||
var/vent = pick(found_vents)
|
||||
found_vents.Remove(vent)
|
||||
spawn_loc=get_turf(vent)
|
||||
else
|
||||
spawn_loc=pick(xeno_spawn)
|
||||
|
||||
var/mob/living/simple_animal/borer/M = new(spawn_loc,1) // loc, by_gamemode=0
|
||||
var/mob/original = borer.current
|
||||
borer.transfer_to(M)
|
||||
//M.clearHUD()
|
||||
|
||||
// get the host for this borer
|
||||
var/datum/mind/first_host = assigned_hosts[borer.key]
|
||||
// this is a redundant check, but I don't think the above works..
|
||||
// if picking hosts works with this method, remove the method above
|
||||
if(!first_host)
|
||||
first_host = pick(first_hosts)
|
||||
first_hosts.Remove(first_host)
|
||||
M.perform_infestation(first_host.current)
|
||||
forge_borer_objectives(borer, first_host)
|
||||
|
||||
qdel(original)
|
||||
|
||||
log_admin("Created [borers.len] borers.")
|
||||
|
||||
..()
|
||||
|
||||
/datum/game_mode/proc/greet_borer(var/datum/mind/borer, var/you_are=1)
|
||||
if(you_are)
|
||||
to_chat(borer.current, "<span class='danger'>You are a Cortical Borer!</span>")
|
||||
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in borer.objectives)
|
||||
to_chat(borer.current, "<B>Objective #[obj_count]</B>: [objective.explanation_text]")
|
||||
obj_count++
|
||||
return
|
||||
|
||||
/datum/game_mode/borer/check_finished()
|
||||
var/borers_alive = 0
|
||||
for(var/datum/mind/borer in borers)
|
||||
if(!istype(borer.current,/mob/living))
|
||||
continue
|
||||
if(borer.current.stat==2)
|
||||
continue
|
||||
borers_alive++
|
||||
|
||||
if(borers_alive)
|
||||
return ..()
|
||||
else
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_borer()
|
||||
for(var/datum/mind/borer in borers)
|
||||
var/borerwin = 1
|
||||
if((borer.current) && istype(borer.current,/mob/living/simple_animal/borer))
|
||||
to_chat(world, "<B>The borer was [borer.current.key].</B>")
|
||||
to_chat(world, "<B>The last host was [borer.current:host.key].</B>")
|
||||
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in borer.objectives)
|
||||
if(objective.check_completion())
|
||||
to_chat(world, "<B>Objective #[count]</B>: [objective.explanation_text] \green <B>Success</B>")
|
||||
feedback_add_details("borer_objective","[objective.type]|SUCCESS")
|
||||
else
|
||||
to_chat(world, "<B>Objective #[count]</B>: [objective.explanation_text] \red Failed")
|
||||
feedback_add_details("borer_objective","[objective.type]|FAIL")
|
||||
borerwin = 0
|
||||
count++
|
||||
|
||||
else
|
||||
borerwin = 0
|
||||
|
||||
if(borerwin)
|
||||
to_chat(world, "<B>The borer was successful!<B>")
|
||||
feedback_add_details("borer_success","SUCCESS")
|
||||
else
|
||||
to_chat(world, "<B>The borer has failed!<B>")
|
||||
feedback_add_details("borer_success","FAIL")
|
||||
return 1
|
||||
|
||||
/datum/game_mode/proc/forge_borer_objectives(var/datum/mind/borer, var/datum/mind/first_host)
|
||||
var/datum/objective/survive/survive_objective = new
|
||||
survive_objective.owner = borer
|
||||
borer.objectives += survive_objective
|
||||
|
||||
greet_borer(borer)
|
||||
|
||||
return
|
||||
@@ -35,6 +35,7 @@
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
var/list/player_draft_log = list()
|
||||
var/list/datum/mind/xenos = list()
|
||||
|
||||
/datum/game_mode/proc/announce() //to be calles when round starts
|
||||
to_chat(world, "<B>Notice</B>: [src] did not define announce()")
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
/datum/game_mode
|
||||
var/list/datum/mind/xenos = list()
|
||||
|
||||
|
||||
/datum/game_mode/xenos
|
||||
name = "xenos"
|
||||
config_tag = "xenos"
|
||||
required_players = 30
|
||||
required_enemies = 3
|
||||
var/result = 0
|
||||
var/checkwin_counter = 0
|
||||
var/xenos_list = list()
|
||||
var/gammacalled = 0
|
||||
|
||||
var/gammaratio = 4 //At what alien to human ratio will the Gamma security level be called and the nuke be made available?
|
||||
|
||||
/datum/game_mode/xenos/announce()
|
||||
to_chat(world, "<B>The current game mode is - Xenos!</B>")
|
||||
to_chat(world, "<B>There is an Xenomorph attack on the station.<BR>Aliens - Kill or infect the crew. Protect the Queen. <BR>Crew - Protect the station. Exterminate all aliens.</B>")
|
||||
|
||||
/datum/game_mode/xenos/can_start()
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
var/list/candidates = get_players_for_role(ROLE_ALIEN)
|
||||
var/playersready = 0
|
||||
var/xenos_num = required_enemies
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if((player.client)&&(player.ready))
|
||||
playersready += 1
|
||||
|
||||
//Check that we have enough alien candidates
|
||||
if(candidates.len < required_enemies)
|
||||
return 0
|
||||
|
||||
//Grab candidates randomly until we have enough.
|
||||
while(xenos_num > 0)
|
||||
var/datum/mind/new_xenos = pick(candidates)
|
||||
xenos += new_xenos
|
||||
candidates -= new_xenos
|
||||
xenos_num--
|
||||
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
xeno.assigned_role = "MODE"
|
||||
xeno.special_role = SPECIAL_ROLE_XENOMORPH
|
||||
set_antag_hud(xeno, "hudalien")//like this is needed...
|
||||
return 1
|
||||
|
||||
/datum/game_mode/xenos/pre_setup()
|
||||
return 1
|
||||
|
||||
/datum/game_mode/xenos/post_setup()
|
||||
|
||||
var/list/turf/xenos_spawn = list()
|
||||
|
||||
for(var/obj/effect/landmark/A in landmarks_list)
|
||||
if(A.name == "Xenos-Spawn")
|
||||
xenos_spawn += get_turf(A)
|
||||
qdel(A)
|
||||
continue
|
||||
|
||||
var/xenoqueen_selected = 0
|
||||
var/spawnpos = 1
|
||||
|
||||
for(var/datum/mind/xeno_mind in xenos)
|
||||
if(spawnpos > xenos_spawn.len)
|
||||
spawnpos = 1
|
||||
//XenoQueen Selection
|
||||
if(!xenoqueen_selected)
|
||||
var/mob/living/carbon/alien/humanoid/queen/O = new(xenos_spawn[spawnpos])
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
xeno_mind.name = O.name
|
||||
//qdel(xeno_mind)
|
||||
xenoqueen_selected = 1
|
||||
spawnpos++
|
||||
continue
|
||||
//Additional larvas if playercount > 20
|
||||
else
|
||||
var/mob/living/carbon/alien/larva/O = new(xenos_spawn[spawnpos])
|
||||
if(xeno_mind.current)
|
||||
xeno_mind.transfer_to(O)
|
||||
else
|
||||
O.key = xeno_mind.current.key
|
||||
xeno_mind.name = O.name
|
||||
//qdel(xeno_mind)
|
||||
spawnpos++
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/xenos/process()
|
||||
checkwin_counter++
|
||||
if(checkwin_counter >= 5)
|
||||
if(!result)
|
||||
ticker.mode.check_win()
|
||||
checkwin_counter = 0
|
||||
return 0
|
||||
|
||||
|
||||
/datum/game_mode/xenos/check_win()
|
||||
var/xenosalive = xenos_alive()
|
||||
var/playersalive = players_alive()
|
||||
var/playeralienratio = 0
|
||||
if(playersalive)
|
||||
playeralienratio = xenosalive / playersalive
|
||||
if(shuttle_master && shuttle_master.emergency.mode >= SHUTTLE_ESCAPE)
|
||||
return ..()
|
||||
if(!xenosalive)
|
||||
result = 1
|
||||
return 1
|
||||
else if(!playersalive)
|
||||
result = 2
|
||||
return 1
|
||||
else if(station_was_nuked)
|
||||
result = 3
|
||||
return 1
|
||||
else
|
||||
if(playeralienratio >= gammaratio && !gammacalled)
|
||||
gammacalled = 1
|
||||
command_announcement.Announce("The aliens have nearly succeeded in capturing the station and exterminating the crew. Activate the nuclear failsafe to stop the alien threat once and for all. The Nuclear Authentication Code is [get_nuke_code()] ", "Alien Lifeform Alert")
|
||||
set_security_level("gamma")
|
||||
var/obj/machinery/door/airlock/vault/V = locate(/obj/machinery/door/airlock/vault) in world
|
||||
if(V && is_station_level(V.z))
|
||||
V.locked = 0
|
||||
V.update_icon()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/xenos/check_finished()
|
||||
return result != 0
|
||||
|
||||
/datum/game_mode/xenos/proc/xenos_alive()
|
||||
var/list/livingxenos = list()
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
if((xeno) && (xeno.current) && (xeno.current.stat != 2) && (xeno.current.client))
|
||||
if(istype(xeno.current,/mob/living/carbon/alien))
|
||||
livingxenos += xeno
|
||||
return livingxenos.len
|
||||
|
||||
/datum/game_mode/xenos/proc/players_alive()
|
||||
var/list/livingplayers = list()
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if((M) && (M.stat != DEAD) && M.client && T && (is_station_level(T.z) || shuttle_master.emergency.mode >= SHUTTLE_ESCAPE && is_secure_level(T.z)))
|
||||
if(ishuman(M))
|
||||
livingplayers += 1
|
||||
return livingplayers.len
|
||||
|
||||
/datum/game_mode/xenos/declare_completion()
|
||||
if(station_was_nuked)
|
||||
feedback_set_details("round_end_result","win - xenos nuked")
|
||||
to_chat(world, "<FONT size = 3><B>Crew Victory</B></FONT>")
|
||||
to_chat(world, "<B>The station was destroyed in a nuclear explosion, preventing the aliens from overrunning it!</B>")
|
||||
else if(result == 1)
|
||||
feedback_set_details("round_end_result","win - xenos killed")
|
||||
to_chat(world, "<FONT size = 3><B>Crew Victory</B></FONT>")
|
||||
to_chat(world, "<B>The aliens did not succeed and were exterminated by the crew!</B>")
|
||||
else if(result == 2)
|
||||
feedback_set_details("round_end_result","win - crew killed")
|
||||
to_chat(world, "<FONT size = 3><B>Alien Victory</B></FONT>")
|
||||
to_chat(world, "<B>The aliens were successful and slaughtered the crew!</B>")
|
||||
else
|
||||
feedback_set_details("round_end_result","win - crew escaped")
|
||||
to_chat(world, "<FONT size = 3><B>Draw</B></FONT>")
|
||||
to_chat(world, "<B>The crew has escaped from the aliens but did not exterminate them, allowing them to overrun the station.</B>")
|
||||
|
||||
var/text = "<br><FONT size=3><B>There were [xenos.len] aliens.</B></FONT>"
|
||||
text += "<br><FONT size=3><B>The aliens were:</B></FONT>"
|
||||
for(var/datum/mind/xeno in xenos)
|
||||
text += "<br><b>[xeno.key]</b> was <b>[xeno.name]</b> ("
|
||||
if(xeno.current)
|
||||
if(xeno.current.stat == DEAD)
|
||||
text += "died"
|
||||
else if(!xeno.current.client)
|
||||
text += "SSD"
|
||||
else
|
||||
text += "survived"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
to_chat(world, text)
|
||||
|
||||
..()
|
||||
return 1
|
||||
@@ -72,7 +72,7 @@ KICK_INACTIVE
|
||||
## set to 0 to disable that mode
|
||||
PROBABILITY EXTENDED 2
|
||||
PROBABILITY NUCLEAR 3
|
||||
PROBABILITY ABDUCTION 2
|
||||
PROBABILITY ABDUCTION 0
|
||||
PROBABILITY CHANGELING 3
|
||||
PROBABILITY CULT 4
|
||||
PROBABILITY EXTEND-A-TRAITORMONGOUS 5
|
||||
@@ -84,8 +84,6 @@ PROBABILITY HEIST 1
|
||||
PROBABILITY WIZARD 2
|
||||
PROBABILITY VAMPIRE 3
|
||||
PROBABILITY RAGINMAGES 0
|
||||
PROBABILITY BORER 0
|
||||
PROBABILITY XENOS 0
|
||||
PROBABILITY METEOR 0
|
||||
PROBABILITY TRAITOR 0
|
||||
PROBABILITY SHADOWLING 2
|
||||
|
||||
@@ -381,7 +381,6 @@
|
||||
#include "code\game\gamemodes\blob\blobs\resource.dm"
|
||||
#include "code\game\gamemodes\blob\blobs\shield.dm"
|
||||
#include "code\game\gamemodes\blob\blobs\storage.dm"
|
||||
#include "code\game\gamemodes\borer\borer.dm"
|
||||
#include "code\game\gamemodes\changeling\changeling.dm"
|
||||
#include "code\game\gamemodes\changeling\changeling_power.dm"
|
||||
#include "code\game\gamemodes\changeling\evolution_menu.dm"
|
||||
@@ -463,7 +462,6 @@
|
||||
#include "code\game\gamemodes\wizard\soulstone.dm"
|
||||
#include "code\game\gamemodes\wizard\spellbook.dm"
|
||||
#include "code\game\gamemodes\wizard\wizard.dm"
|
||||
#include "code\game\gamemodes\xenos\xenos.dm"
|
||||
#include "code\game\jobs\access.dm"
|
||||
#include "code\game\jobs\job_controller.dm"
|
||||
#include "code\game\jobs\job_objective.dm"
|
||||
|
||||
Reference in New Issue
Block a user