From bf953679c75e3b27eb4d39fa1c5b46c2181ff516 Mon Sep 17 00:00:00 2001 From: Whitellama Date: Tue, 25 Jun 2013 16:49:53 -0700 Subject: [PATCH] No more placeholder antags, and WIP space ninja gamemode stuff --- code/controllers/configuration.dm | 4 ++-- code/game/gamemodes/ninja/ninja.dm | 37 +++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 58dc3affe2a..3ad1eb04771 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -34,7 +34,7 @@ var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard var/traitor_scaling = 0 //if amount of traitors scales based on amount of players var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other - var/continous_rounds = 0 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. + var/continous_rounds = 1 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke. var/allow_Metadata = 0 // Metadata is supported. var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1. var/Ticklag = 0.9 @@ -167,7 +167,7 @@ switch (name) if ("resource_urls") config.resource_urls = stringsplit(value, " ") - + if ("admin_legacy_system") config.admin_legacy_system = 1 diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index 6f9994a8e0a..70029762fc8 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -1,5 +1,4 @@ -/datum/game_mode - var/list/datum/mind/ninjas = list() +/datum/game_mode/var/list/datum/mind/ninjas = list() /datum/game_mode/ninja name = "ninja" @@ -8,6 +7,9 @@ required_players_secret = 1 //CHANGE DEBUG required_enemies = 1 recommended_enemies = 1 + 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/finished = 0 /datum/game_mode/ninja/announce() world << "The current game mode is Ninja!" @@ -46,7 +48,30 @@ /datum/game_mode/ninja/post_setup() for(var/datum/mind/ninja in ninjas) - ninja.current.internal = ninja.current.s_store - ninja.current.internals.icon_state = "internal1" - ninja.current.wear_suit:randomize_param() - return 1 \ No newline at end of file + if(ninja.current && !(istype(ninja.current,/mob/living/carbon/human))) return 0 + var/mob/living/carbon/human/N = ninja.current + N.internal = N.s_store + N.internals.icon_state = "internal1" + if(N.wear_suit && istype(N.wear_suit,/obj/item/clothing/suit/space/space_ninja)) + var/obj/item/clothing/suit/space/space_ninja/S = N.wear_suit + S:randomize_param() + S:ninitialize(0, N) + spawn (rand(waittime_l, waittime_h)) + send_intercept() + return ..() + +/datum/game_mode/ninja/check_finished() + if(config.continous_rounds) + return ..() + var/ninjas_alive = 0 + for(var/datum/mind/ninja in ninjas) + if(!istype(ninja.current,/mob/living/carbon/human)) + continue + if(ninja.current.stat==2) + continue + ninjas_alive++ + if (ninjas_alive) + return ..() + else + finished = 1 + return 1 \ No newline at end of file