/* * GAMEMODES (by Rastaf0) * * In the new mode system all special roles are fully supported. * You can have proper wizards/traitors/changelings/cultists during any mode. * Only two things really depends on gamemode: * 1. Starting roles, equipment and preparations * 2. Conditions of finishing the round. * */ /datum/game_mode var name = "invalid" config_tag = null intercept_hacked = 0 votable = 1 probability = 1 station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm explosion_in_progress = 0 //sit back and relax list/datum/mind/modePlayer = new list/restricted_jobs = list() required_players = 0 required_enemies = 0 /datum/game_mode/proc/announce() //to be calles when round starts world << "Notice: [src] did not define announce()" ///can_start() ///Checks to see if the game can be setup and ran with the current number of players or whatnot. /datum/game_mode/proc/can_start() var/playerC = 0 for(var/mob/new_player/player in world) if((player.client)&&(player.ready)) playerC++ if(playerC >= required_players) return 1 return 0 ///pre_setup() ///Attempts to select players for special roles the mode might have. /datum/game_mode/proc/pre_setup() return 1 ///post_setup() ///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things /datum/game_mode/proc/post_setup() feedback_set_details("round_start","[time2text(world.realtime)]") if(ticker && ticker.mode) feedback_set_details("game_mode","[ticker.mode]") if(revdata) feedback_set_details("revision","[revdata.revision]") feedback_set_details("server_ip","[world.internet_address]") return 1 ///process() ///Called by the gameticker /datum/game_mode/proc/process() return 0 /datum/game_mode/proc/check_finished() //to be called by ticker if(emergency_shuttle.location==2 || station_was_nuked) return 1 return 0 /datum/game_mode/proc/declare_completion() var/clients = 0 var/surviving_humans = 0 var/surviving_total = 0 var/ghosts = 0 var/escaped_humans = 0 var/escaped_total = 0 var/escaped_on_pod_1 = 0 var/escaped_on_pod_2 = 0 var/escaped_on_pod_3 = 0 var/escaped_on_pod_5 = 0 var/escaped_on_shuttle = 0 var/list/area/escape_locations = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom) for(var/mob/M in world) if(M.client) clients++ if(ishuman(M)) if(!M.stat) surviving_humans++ if(M.loc && M.loc.loc && M.loc.loc.type in escape_locations) escaped_humans++ if(!M.stat) surviving_total++ 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 == /area/shuttle/escape/centcom) escaped_on_shuttle++ if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod1/centcom) escaped_on_pod_1++ if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod2/centcom) escaped_on_pod_2++ if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod3/centcom) escaped_on_pod_3++ if(M.loc && M.loc.loc && M.loc.loc.type == /area/shuttle/escape_pod5/centcom) escaped_on_pod_5++ if(isobserver(M)) ghosts++ if(clients > 0) feedback_set("round_end_clients",clients) if(ghosts > 0) feedback_set("round_end_ghosts",ghosts) if(surviving_humans > 0) feedback_set("survived_human",surviving_humans) if(surviving_total > 0) feedback_set("survived_total",surviving_total) if(escaped_humans > 0) feedback_set("escaped_human",escaped_humans) if(escaped_total > 0) feedback_set("escaped_total",escaped_total) if(escaped_on_shuttle > 0) feedback_set("escaped_on_shuttle",escaped_on_shuttle) if(escaped_on_pod_1 > 0) feedback_set("escaped_on_pod_1",escaped_on_pod_1) if(escaped_on_pod_2 > 0) feedback_set("escaped_on_pod_2",escaped_on_pod_2) if(escaped_on_pod_3 > 0) feedback_set("escaped_on_pod_3",escaped_on_pod_3) if(escaped_on_pod_5 > 0) feedback_set("escaped_on_pod_5",escaped_on_pod_5) return 0 /datum/game_mode/proc/check_win() //universal trigger to be called at mob death, nuke explosion, etc. To be called from everywhere. return 0 /datum/game_mode/proc/send_intercept() var/intercepttext = "Cent. Com. Update Requested staus information: