diff --git a/baystation12.dme b/baystation12.dme index 95f10ff394d..56c94b3febe 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -273,6 +273,7 @@ #include "code\game\gamemodes\vox\heist\heist.dm" #include "code\game\gamemodes\vox\trade\trade.dm" #include "code\game\gamemodes\wizard\artefact.dm" +#include "code\game\gamemodes\wizard\raginmages.dm" #include "code\game\gamemodes\wizard\rightandwrong.dm" #include "code\game\gamemodes\wizard\soulstone.dm" #include "code\game\gamemodes\wizard\spellbook.dm" diff --git a/code/game/gamemodes/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm new file mode 100644 index 00000000000..714eb22b3aa --- /dev/null +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -0,0 +1,116 @@ +/datum/game_mode/wizard/raginmages + name = "Ragin' Mages" + config_tag = "raginmages" + required_players = 15 + required_players_secret = 15 + var/max_mages = 0 + var/making_mage = 0 + var/mages_made = 1 + var/time_checked = 0 +/datum/game_mode/wizard/announce() + world << "The current game mode is - Ragin' Mages!" + world << "The \red Space Wizard Federation\black is pissed, help defeat all the space wizards!" + +/datum/game_mode/wizard/raginmages/post_setup() + var/playercount = 0 + ..() + if(!max_mages) + for(var/mob/living/player in mob_list) + if (player.client && player.stat != 2) + playercount += 1 + max_mages = round(playercount / 5) + +/datum/game_mode/wizard/raginmages/greet_wizard(var/datum/mind/wizard, var/you_are=1) + if (you_are) + wizard.current << "\red You are the Space Wizard!" + wizard.current << "The Space Wizards Federation has given you the following tasks:" + + var/obj_count = 1 + for(var/datum/objective/objective in wizard.objectives) + wizard.current << "Objective #[obj_count]: [objective.explanation_text]" + obj_count++ + wizard.current << "Objective Alpha: Make sure the station pays for its actions against our diplomats" + return + +/datum/game_mode/wizard/raginmages/check_finished() + var/wizards_alive = 0 + for(var/datum/mind/wizard in wizards) + if(!istype(wizard.current,/mob/living/carbon)) + continue + if(istype(wizard.current,/mob/living/carbon/brain)) + continue + if(wizard.current.stat==2) + continue + if(wizard.current.stat==1) + if(wizard.current.health < 0) + wizard.current << "\red The Space Wizard Federation is upset with your performance and have terminated your employment." + wizard.current.stat = 2 + continue + wizards_alive++ + + if (wizards_alive) + if(world.time > time_checked + rand(3000, 6000)) + time_checked = world.time + make_more_mages() + else + if(wizards.len >= max_mages) + finished = 1 + return 1 + else + make_more_mages() + return 0 + +/datum/game_mode/wizard/raginmages/proc/make_more_mages() + + if(making_mage || emergency_shuttle.departed) + return 0 + + making_mage = 1 + mages_made++ + var/list/mob/dead/observer/candidates = list() + var/mob/dead/observer/theghost = null + spawn(rand(200, 600)) + message_admins("SWF is still pissed, sending another wizard - [max_mages - mages_made] left.") + for(var/mob/dead/observer/G in player_list) + if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate") && G.client && !G.client.is_afk() && G.client.prefs && G.client.prefs.be_special & BE_WIZARD) + candidates += G + if(!candidates.len) + message_admins("No applicable ghosts for the next ragin' mage, asking ghosts instead.") + var/time_passed = world.time + for(var/mob/dead/observer/G in player_list) + if(!jobban_isbanned(G, "wizard") && !jobban_isbanned(G, "Syndicate")) + spawn(0) + switch(alert(G, "Do you wish to be considered for the position of Space Wizard Foundation 'diplomat'?","Please answer in 30 seconds!","Yes","No")) + if("Yes") + if((world.time-time_passed)>300)//If more than 30 game seconds passed. + continue + candidates += G + if("No") + continue + + sleep(300) + if(!candidates.len) + message_admins("This is awkward, sleeping until another mage check...") + making_mage = 0 + mages_made-- + return + if(candidates.len) + shuffle(candidates) + for(var/mob/i in candidates) + if(!i || !i.client) continue //Dont bother removing them from the list since we only grab one wizard + + theghost = i + break + + if(theghost) + var/mob/living/carbon/human/new_character= makeBody(theghost) + new_character.mind.make_Wizard() + making_mage = 0 + return 1 + +/datum/game_mode/wizard/raginmages/declare_completion() + if(finished) + feedback_set_details("round_end_result","loss - wizard killed") + world << "\red The crew has managed to hold off the wizard attack! The Space Wizards Federation has been taught a lesson they will not soon forget!" + ..() + return 1 \ No newline at end of file diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 055cfc1e59c..f09c464c887 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -382,7 +382,7 @@ client/proc/one_click_antag() return 1 -/datum/admins/proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character +/proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character if(!G_found || !G_found.key) return //First we spawn a dude. diff --git a/config-example/config.txt b/config-example/config.txt new file mode 100644 index 00000000000..fc25230f97e --- /dev/null +++ b/config-example/config.txt @@ -0,0 +1,250 @@ +## Server name: This appears at the top of the screen in-game. In this case it will read "tgstation: station_name" where station_name is the randomly generated name of the station for the round. Remove the # infront of SERVERNAME and replace 'tgstation' with the name of your choice +# SERVERNAME tgstation + +## Alert levels +ALERT_GREEN All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced. +ALERT_BLUE_UPTO The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted. +ALERT_BLUE_DOWNTO The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed. +ALERT_RED_UPTO There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised. +ALERT_RED_DOWNTO The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised. +ALERT_DELTA The station's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill. + +## Add a # infront of this if you want to use the SQL based admin system, the legacy system uses admins.txt. You need to set up your database to use the SQL based system. +ADMIN_LEGACY_SYSTEM + +## Add a # infront of this if you want to use the SQL based banning system. The legacy systems use the files in the data folder. You need to set up your database to use the SQL based system. +BAN_LEGACY_SYSTEM + +## Add a # here if you wish to use the setup where jobs have more access. This is intended for servers with low populations - where there are not enough players to fill all roles, so players need to do more than just one job. Also for servers where they don't want people to hide in their own departments. +JOBS_HAVE_MINIMAL_ACCESS + +## Unhash this entry to have certain jobs require your account to be at least a certain number of days old to select. You can configure the exact age requirement for different jobs by editing +## the minimal_player_age variable in the files in folder /code/game/jobs/job/.. for the job you want to edit. Set minimal_player_age to 0 to disable age requirement for that job. +## REQUIRES the database set up to work. Keep it hashed if you don't have a database set up. +## NOTE: If you have just set-up the database keep this DISABLED, as player age is determined from the first time they connect to the server with the database up. If you just set it up, it means +## you have noone older than 0 days, since noone has been logged yet. Only turn this on once you have had the database up for 30 days. +#USE_AGE_RESTRICTION_FOR_JOBS + +## Unhash this to use recursive explosions, keep it hashed to use circle explosions. Recursive explosions react to walls, airlocks and blast doors, making them look a lot cooler than the boring old circular explosions. They require more CPU and are (as of january 2013) experimental +#USE_RECURSIVE_EXPLOSIONS + +## log OOC channel +LOG_OOC + +## log client Say +LOG_SAY + +## log admin actions +LOG_ADMIN + +## log client access (logon/logoff) +LOG_ACCESS + +## log game actions (start of round, results, etc.) +LOG_GAME + +## log player votes +LOG_VOTE + +## log client Whisper +LOG_WHISPER + +## log emotes +LOG_EMOTE + +## log attack messages +LOG_ATTACK + +## log pda messages +LOG_PDA + +## log all Topic() calls (for use by coders in tracking down Topic issues) +# LOG_HREFS + +## log admin warning messages +##LOG_ADMINWARN ## Also duplicates a bunch of other messages. + +## log world.log and runtime errors to a file +# LOG_RUNTIMES + +## sql switching +# SQL_ENABLED + +## disconnect players who did nothing during 10 minutes +# KICK_INACTIVE + +## probablities for game modes chosen in "secret" and "random" modes +## +## default probablity is 1, increase to make that mode more likely to be picked +## set to 0 to disable that mode +## Cult mode is in alpha test, enable at your own risk +PROBABILITY EXTENDED 0 +PROBABILITY TRAITOR 2 +PROBABILITY METEOR 0 +PROBABILITY MALFUNCTION 2 +PROBABILITY BLOB 2 +PROBABILITY NUCLEAR 0 +PROBABILITY SANDBOX 0 +PROBABILITY WIZARD 0 +PROBABILITY RESTRUCTURING 0 +PROBABILITY REVOLUTION 5 +PROBABILITY CHANGELING 0 +PROBABILITY CULT 1 +PROBABILITY MONKEY 0 +PROBABILITY TRAITORCHAN 0 +PROBABILITY EXTEND-A-TRAITORMONGOUS 0 +PROBABILITY EPIDEMIC 1 +PROBABILITY MEME 0 +PROBABILITY HEIST 0 +PROBABILITY MIXED 0 +PROBABILITY RAGINMAGES 0 + +## Hash out to disable random events during the round. +ALLOW_RANDOM_EVENTS + +## if amount of traitors scales or not +TRAITOR_SCALING + +## If security is prohibited from being most antagonists +#PROTECT_ROLES_FROM_ANTAGONIST + +## Comment this out to stop admins being able to choose their personal ooccolor +ALLOW_ADMIN_OOCCOLOR + +## If metadata is supported +# ALLOW_METADATA + +## allow players to initiate a restart vote +#ALLOW_VOTE_RESTART + +## allow players to initate a mode-change start +#ALLOW_VOTE_MODE + +## min delay (deciseconds) between voting sessions (default 10 minutes) +VOTE_DELAY 6000 + +## time period (deciseconds) which voting session will last (default 1 minute) +VOTE_PERIOD 600 + +## prevents dead players from voting or starting votes +# NO_DEAD_VOTE + +## players' votes default to "No vote" (otherwise, default to "No change") +DEFAULT_NO_VOTE + +## allow AI job +ALLOW_AI + + +## disable abandon mob +# NORESPAWN + +## disables calling del(src) on newmobs if they logout before spawnin in +# DONT_DEL_NEWMOB + +## set a hosted by name for unix platforms +HOSTEDBY Yournamehere + +## Set to jobban "Guest-" accounts from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions. +## Set to 1 to jobban them from those positions, set to 0 to allow them. +GUEST_JOBBAN + +## Uncomment this to stop people connecting to your server without a registered ckey. (i.e. guest-* are all blocked from connecting) +GUEST_BAN +## Set to jobban everyone who's key is not listed in data/whitelist.txt from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions. +## Uncomment to 1 to jobban, leave commented out to allow these positions for everyone (but see GUEST_JOBBAN above and regular jobbans) +# USEWHITELIST + +## set a server location for world reboot. Don't include the byond://, just give the address and port. +# SERVER ss13.example.com:2506 + +## forum address +# FORUMURL http://example.com + +## Wiki address +# WIKIURL http://example.com + +## Ban appeals URL - usually for a forum or wherever people should go to contact your admins. +# BANAPPEALS http://example.com + +## In-game features +## spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard +# FEATURE_OBJECT_SPELL_SYSTEM + +##Toggle for having jobs load up from the .txt +# LOAD_JOBS_FROM_TXT + +##Remove the # mark infront of this to forbid admins from posssessing the singularity. +#FORBID_SINGULO_POSSESSION + +## Remove the # to show a popup 'reply to' window to every non-admin that recieves an adminPM. +## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off) +#POPUP_ADMIN_PM + +## Remove the # to allow special 'Easter-egg' events on special holidays such as seasonal holidays and stuff like 'Talk Like a Pirate Day' :3 YAARRR +ALLOW_HOLIDAYS +##Defines the ticklag for the world. 0.9 is the normal one, 0.5 is smoother. +TICKLAG 0.9 + +## Defines if Tick Compensation is used. It results in a minor slowdown of movement of all mobs, but attempts to result in a level movement speed across all ticks. Recommended if tickrate is lowered. +TICKCOMP 0 + +## Whether the server will talk to other processes through socket_talk +SOCKET_TALK 0 + +## Uncomment this to ban use of ToR +#TOR_BAN + +## Comment this out to disable automuting +#AUTOMUTE_ON + +## How long the delay is before the Away Mission gate opens. Default is half an hour. +GATEWAY_DELAY 18000 + +## Remove the # to give assistants maint access. +#ASSISTANT_MAINT + +## Remove the # to enable assistant limiting. +#ASSISTANT_LIMIT + +## If you enabled assistant limiting set the ratio of assistants to security members default is 2 assistants to 1 officer +ASSISTANT_RATIO 2 + +## Remove the # to make rounds which end instantly (Rev, Wizard, Malf) to continue until the shuttle is called or the station is nuked. +## Malf and Rev will let the shuttle be called when the antags/protags are dead. +#CONTINUOUS_ROUNDS + +## Uncomment to restrict non-admins from using humanoid alien races +USEALIENWHITELIST + +## Comment this to unrestrict the number of alien players allowed in the round. The number represents the number of alien players for every human player. +#ALIEN_PLAYER_RATIO 0.2 + +## Comment this to disallow respawning as a MoMMI from MoMMI fabricators. +RESPAWN_AS_MOMMI + +## Uncomment this to disallow spawning as a mouse. +#NO_RESPAWN_AS_MOUSE + +##Remove the # to let ghosts spin chairs +#GHOST_INTERACTION + +## Uncomment to enable sending data to the IRC bot. +#USE_IRC_BOT + +## Password used for authorizing ircbot and other external tools. +#COMMS_PASSWORD + +## Host where the IRC bot is hosted. +#IRC_BOT_HOST localhost + +## Port used for communications. Default: 45678 +#IRC_BOT_PORT 45678 + +## ID tag used to identify the server in the channel +#IRC_BOT_SERVER_ID Server 1 + +## Copy logs to a location on server startup? +## IPs are automatically removed. +## Default: Don't copy logs. +#COPY_LOGS data/cleaned_logs \ No newline at end of file