From d23b7580066440baec48d4fe4a42095ab30cd953 Mon Sep 17 00:00:00 2001 From: Whitellama Date: Sat, 15 Jun 2013 16:09:23 -0700 Subject: [PATCH 1/9] WIP: Implementing space ninja gamemode --- baystation12.dme | 1 + .../game/gamemodes/autotraitor/autotraitor.dm | 2 +- code/game/gamemodes/events/space_ninja.dm | 6 +-- code/game/gamemodes/game_mode.dm | 4 +- code/game/gamemodes/ninja/ninja.dm | 41 +++++++++++++++++++ code/game/gamemodes/wizard/wizard.dm | 1 - code/game/objects/effects/landmarks.dm | 4 ++ code/global.dm | 2 + 8 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 code/game/gamemodes/ninja/ninja.dm diff --git a/baystation12.dme b/baystation12.dme index f002ef969d2..e68d87a85f3 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -252,6 +252,7 @@ #include "code\game\gamemodes\malfunction\malfunction.dm" #include "code\game\gamemodes\meteor\meteor.dm" #include "code\game\gamemodes\meteor\meteors.dm" +#include "code\game\gamemodes\ninja\ninja.dm" #include "code\game\gamemodes\nuclear\nuclear.dm" #include "code\game\gamemodes\nuclear\nuclearbomb.dm" #include "code\game\gamemodes\nuclear\pinpointer.dm" diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index c5b159dd1a9..f5ddfdfb366 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -11,7 +11,7 @@ /datum/game_mode/traitor/autotraitor/announce() ..() - world << "Game mode is AutoTraitor. Traitors will be added to the round automagically as needed.
Expect bugs.
" + world << "Game mode is AutoTraitor. Traitors will be added to the round automagically as needed." /datum/game_mode/traitor/autotraitor/pre_setup() diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 2314f382588..55012d30e25 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -211,7 +211,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp ninja_selection_active = 0 //The ninja will be created on the right spawn point or at late join. - var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin )) + var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(ninjastart)) new_ninja.key = ninja_key new_ninja.wear_suit:randomize_param()//Give them a random set of suit parameters. new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess. @@ -491,8 +491,8 @@ As such, it's hard-coded for now. No reason for it not to be, really. //=======//NINJA CREATION PROCS//=======// -/proc/create_space_ninja(obj/spawn_point) - var/mob/living/carbon/human/new_ninja = new(spawn_point.loc) +/proc/create_space_ninja(var/loc/spawnpoint) + var/mob/living/carbon/human/new_ninja = new(spawnpoint) var/ninja_title = pick(ninja_titles) var/ninja_name = pick(ninja_names) new_ninja.gender = pick(MALE, FEMALE) diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index e1fbf5dfb4f..c0dfd4fb7c3 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -261,7 +261,7 @@ Implants; set_security_level(SEC_LEVEL_BLUE)*/ -/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=1) +/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=0) var/list/players = list() var/list/candidates = list() var/list/drafted = list() @@ -275,7 +275,7 @@ Implants; if(BE_WIZARD) roletext="wizard" if(BE_REV) roletext="revolutionary" if(BE_CULTIST) roletext="cultist" - + if(BE_NINJA) roletext="ninja" // Ultimate randomizing code right here for(var/mob/new_player/player in player_list) diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm new file mode 100644 index 00000000000..1f5e7e5c9fa --- /dev/null +++ b/code/game/gamemodes/ninja/ninja.dm @@ -0,0 +1,41 @@ +/datum/game_mode + var/list/datum/mind/ninjas = list() + +/datum/game_mode/ninja + name = "ninja" + config_tag = "ninja" + required_players = 2 + required_players_secret = 10 + required_enemies = 1 + recommended_enemies = 1 + +/datum/game_mode/ninja/announce() + world << "The current game mode is Ninja!" + +/datum/game_mode/ninja/can_start() + if(!..()) + return 0 + var/list/datum/mind/possible_ninjas = get_players_for_role(BE_NINJA) + if(possible_ninjas.len==0) + return 0 + var/datum/mind/ninja = pick(possible_ninjas) + ninjas += ninja + modePlayer += ninja + ninja.assigned_role = "MODE" //So they aren't chosen for other jobs. + ninja.special_role = "Ninja" + ninja.original = ninja.current + if(ninjastart.len == 0) + ninja.current << "\red A proper starting location for you could not be found, please report this bug!" + ninja.current << "\red Attempting to place at a carpspawn." + for(var/obj/effect/landmark/L in landmarks_list) + if(L.name == "carpspawn") + ninjastart.Add(L) + if(ninjastart.len == 0) + ninja.current << "\red Still no spawneable locations could be found. Aborting." + return 0 + return 1 + +/datum/game_mode/ninja/pre_setup() + ninja.current.loc = pick(ninjastart) + ninja.current = create_space_ninja(pick(ninjastart)) + return 1 \ No newline at end of file diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index e1b19a287b6..ba5700b1df3 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -45,7 +45,6 @@ /datum/game_mode/wizard/pre_setup() for(var/datum/mind/wizard in wizards) wizard.current.loc = pick(wizardstart) - return 1 diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index b72dafb4c30..ae155f32ade 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -69,6 +69,10 @@ xeno_spawn += loc del(src) + if("ninjastart") + ninjastart += loc + del(src) + landmarks_list += src return 1 diff --git a/code/global.dm b/code/global.dm index cd6e374a94f..d656197df85 100644 --- a/code/global.dm +++ b/code/global.dm @@ -133,6 +133,8 @@ var/list/tdomeadmin = list() var/list/prisonsecuritywarp = list() //prison security goes to these var/list/prisonwarped = list() //list of players already warped var/list/blobstart = list() +var/list/carpspawn = list() +var/list/ninjastart = list() // list/traitors = list() //traitor list var/list/cardinal = list( NORTH, SOUTH, EAST, WEST ) var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST) From 424c9a016140167b557ba94e99bbf21368f7765c Mon Sep 17 00:00:00 2001 From: Whitellama Date: Sat, 22 Jun 2013 00:19:32 -0700 Subject: [PATCH 2/9] Space Ninja Gamemode Implementation --- code/game/gamemodes/events/space_ninja.dm | 15 +++++--------- code/game/gamemodes/ninja/ninja.dm | 25 ++++++++++++++++------- code/global.dm | 1 - 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 55012d30e25..da85edd4123 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -140,15 +140,10 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp */ //Here we pick a location and spawn the ninja. - var/list/spawn_list = list() - for(var/obj/effect/landmark/L in landmarks_list) - if(L.name == "ninjaspawn") - spawn_list.Add(L) - - if(!spawn_list.len) + if(ninjastart.len == 0) for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "carpspawn") - spawn_list.Add(L) + ninjastart.Add(L) var/ninja_key = null var/mob/candidate_mob @@ -211,7 +206,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp ninja_selection_active = 0 //The ninja will be created on the right spawn point or at late join. - var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(ninjastart)) + var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(ninjastart.len ? ninjastart : latejoin)) new_ninja.key = ninja_key new_ninja.wear_suit:randomize_param()//Give them a random set of suit parameters. new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess. @@ -491,8 +486,8 @@ As such, it's hard-coded for now. No reason for it not to be, really. //=======//NINJA CREATION PROCS//=======// -/proc/create_space_ninja(var/loc/spawnpoint) - var/mob/living/carbon/human/new_ninja = new(spawnpoint) +/proc/create_space_ninja(obj/spawn_point) + var/mob/living/carbon/human/new_ninja = new(spawn_point.loc) var/ninja_title = pick(ninja_titles) var/ninja_name = pick(ninja_names) new_ninja.gender = pick(MALE, FEMALE) diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index 1f5e7e5c9fa..6f9994a8e0a 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -4,8 +4,8 @@ /datum/game_mode/ninja name = "ninja" config_tag = "ninja" - required_players = 2 - required_players_secret = 10 + required_players = 1 //CHANGE DEBUG + required_players_secret = 1 //CHANGE DEBUG required_enemies = 1 recommended_enemies = 1 @@ -30,12 +30,23 @@ for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "carpspawn") ninjastart.Add(L) - if(ninjastart.len == 0) - ninja.current << "\red Still no spawneable locations could be found. Aborting." - return 0 + if(ninjastart.len == 0 && latejoin.len > 0) + ninja.current << "\red Still no spawneable locations could be found. Defaulting to latejoin." + return 1 + else if (ninjastart.len == 0) + ninja.current << "\red Still no spawneable locations could be found. Aborting." + return 0 return 1 /datum/game_mode/ninja/pre_setup() - ninja.current.loc = pick(ninjastart) - ninja.current = create_space_ninja(pick(ninjastart)) + for(var/datum/mind/ninja in ninjas) + ninja.current = create_space_ninja(pick(ninjastart.len ? ninjastart : latejoin)) + ninja.current.ckey = ninja.key + return 1 + +/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 diff --git a/code/global.dm b/code/global.dm index d656197df85..348cc8702fa 100644 --- a/code/global.dm +++ b/code/global.dm @@ -133,7 +133,6 @@ var/list/tdomeadmin = list() var/list/prisonsecuritywarp = list() //prison security goes to these var/list/prisonwarped = list() //list of players already warped var/list/blobstart = list() -var/list/carpspawn = list() var/list/ninjastart = list() // list/traitors = list() //traitor list var/list/cardinal = list( NORTH, SOUTH, EAST, WEST ) From bf953679c75e3b27eb4d39fa1c5b46c2181ff516 Mon Sep 17 00:00:00 2001 From: Whitellama Date: Tue, 25 Jun 2013 16:49:53 -0700 Subject: [PATCH 3/9] 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 From 90eaca1e53b7d975ea56c80c1bffd354c2ae1878 Mon Sep 17 00:00:00 2001 From: Whitellama Date: Wed, 26 Jun 2013 16:30:24 -0700 Subject: [PATCH 4/9] WIP Ninja GM junk --- code/game/gamemodes/events/ninja_equipment.dm | 4 +- code/game/gamemodes/events/space_ninja.dm | 41 +++++-- code/game/gamemodes/ninja/ninja.dm | 115 +++++++++++++++++- code/game/gamemodes/objective.dm | 3 + code/modules/admin/player_panel.dm | 12 ++ code/modules/admin/verbs/randomverbs.dm | 21 ++-- code/modules/client/preferences.dm | 2 +- code/modules/mob/living/carbon/human/death.dm | 4 +- config/names/ninjaname.txt | 5 +- config/names/ninjatitle.txt | 4 +- 10 files changed, 178 insertions(+), 33 deletions(-) diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm index 853f1509747..45bc487eefa 100644 --- a/code/game/gamemodes/events/ninja_equipment.dm +++ b/code/game/gamemodes/events/ninja_equipment.dm @@ -243,7 +243,7 @@ ________________________________________________________________________________ var/mob/living/silicon/ai/A = AI var/display_to = s_control ? U : A//Who do we want to display certain messages to? - var/dat = "SpiderOS" + var/dat = "SpiderOS" dat += " Refresh" if(spideros) dat += " | Return" @@ -1209,7 +1209,7 @@ ________________________________________________________________________________ U.client.images += image(tempHud,target,"hudoperative") if("Death Commando") U.client.images += image(tempHud,target,"huddeathsquad") - if("Space Ninja") + if("Ninja") U.client.images += image(tempHud,target,"hudninja") else//If we don't know what role they have but they have one. U.client.images += image(tempHud,target,"hudunknown1") diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index 78bd4ccedd5..8a0cff26132 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -52,7 +52,7 @@ ________________________________________________________________________________ How to do that: Make sure your character has a mind. Change their assigned_role to "MODE", no quotes. Otherwise, the suit won't initialize. - Change their special_role to "Space Ninja", no quotes. Otherwise, the character will be gibbed. + Change their special_role to "Ninja", no quotes. Otherwise, the character will be gibbed. Spawn ninja gear, put it on, hit initialize. Let the suit do the rest. You are now a space ninja. I don't recommend messing with suit variables unless you really know what you're doing. @@ -236,8 +236,8 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp if(xeno_queen_list.len&&side=="face")//If there are queen about and the probability is 50. for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_queen_list) var/datum/objective/assassinate/ninja_objective = new - //We'll do some manual overrides to properly set it up. ninja_objective.owner = ninja_mind + //We'll do some manual overrides to properly set it up. ninja_objective.target = xeno_queen.mind ninja_objective.explanation_text = "Kill \the [xeno_queen]." ninja_mind.objectives += ninja_objective @@ -302,6 +302,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp hostile_targets -= current_mind//Remove them from the list. if(2)//Steal var/datum/objective/steal/ninja_objective = new + ninja_objective.owner = ninja_mind var/target_item = pick(ninja_objective.possible_items_special) ninja_objective.set_target(target_item) ninja_mind.objectives += ninja_objective @@ -337,12 +338,14 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp hostile_targets -= current_mind//Remove them from the list. if(5)//Download research var/datum/objective/download/ninja_objective = new + ninja_objective.owner = ninja_mind ninja_objective.gen_amount_goal() ninja_mind.objectives += ninja_objective objective_list -= 5 if(6)//Capture var/datum/objective/capture/ninja_objective = new + ninja_objective.owner = ninja_mind ninja_objective.gen_amount_goal() ninja_mind.objectives += ninja_objective @@ -389,17 +392,17 @@ As such, it's hard-coded for now. No reason for it not to be, really. */ /proc/generate_ninja_directive(side) var/directive = "[side=="face"?"Nanotrasen":"The Syndicate"] is your employer. "//Let them know which side they're on. - switch(rand(1,13)) + switch(rand(1,19)) if(1) - directive += "The Spider Clan must not be linked to this operation. Remain as hidden and covert as possible." + directive += "The Spider Clan must not be linked to this operation. Remain hidden and covert when possible." if(2) - directive += "[station_name] is financed by an enemy of the Spider Clan. Cause as much structural damage as possible." + directive += "[station_name] is financed by an enemy of the Spider Clan. Cause as much structural damage as desired." if(3) directive += "A wealthy animal rights activist has made a request we cannot refuse. Prioritize saving animal lives whenever possible." if(4) - directive += "The Spider Clan absolutely cannot be linked to this operation. Eliminate all witnesses using most extreme prejudice." + directive += "The Spider Clan absolutely cannot be linked to this operation. Eliminate witnesses at your discretion." if(5) - directive += "We are currently negotiating with Nanotrasen command. Prioritize saving human lives over ending them." + directive += "We are currently negotiating with NanoTrasen Central Command. Prioritize saving human lives over ending them." if(6) directive += "We are engaged in a legal dispute over [station_name]. If a laywer is present on board, force their cooperation in the matter." if(7) @@ -409,11 +412,24 @@ As such, it's hard-coded for now. No reason for it not to be, really. if(9) directive += "A free agent has proposed a lucrative business deal. Implicate Nanotrasen involvement in the operation." if(10) - directive += "Our reputation is on the line. Harm as few civilians or innocents as possible." + directive += "Our reputation is on the line. Harm as few civilians and innocents as possible." if(11) directive += "Our honor is on the line. Utilize only honorable tactics when dealing with opponents." if(12) - directive += "We are currently negotiating with a Syndicate leader. Disguise assassinations as suicide or another natural cause." + directive += "We are currently negotiating with a Syndicate leader. Disguise assassinations as suicide or other natural causes." + if(13) + directive += "Some disgruntled NanoTrasen employees have been supportive of our operations. Be wary of any mistreatment by command staff." + if(14) + var/xenorace = pick("Unathi","Tajaran", "Skrellian") + directive += "A group of [xenorace] radicals have been loyal supporters of the Spider Clan. Favor [xenorace] crew whenever possible." + if(15) + directive += "The Spider Clan has recently been accused of religious insensitivity. Attempt to speak with the Chaplain and prove these accusations false." + if(16) + directive += "The Spider Clan has been bargaining with a competing prosthetics manufacturer. Try to shine NanoTrasen prosthetics in a bad light." + if(17) + directive += "The Spider Clan has recently begun recruiting outsiders. Consider suitable candidates and assess their behavior amongst the crew." + if(18) + directive += "A cyborg liberation group has expressed interest in our serves. Prove the Spider Clan merciful towards law-bound synthetics." else directive += "There are no special supplemental instructions at this time." return directive @@ -503,10 +519,9 @@ As such, it's hard-coded for now. No reason for it not to be, really. /mob/living/carbon/human/proc/create_mind_space_ninja() mind_initialize() mind.assigned_role = "MODE" - mind.special_role = "Space Ninja" + mind.special_role = "Ninja" - //Adds them to current traitor list. Which is really the extra antagonist list. - ticker.mode.traitors |= mind + ticker.mode.ninjas |= mind return 1 /mob/living/carbon/human/proc/equip_space_ninja(safety=0)//Safety in case you need to unequip stuff for existing characters. @@ -554,7 +569,7 @@ As such, it's hard-coded for now. No reason for it not to be, really. U:gloves.icon_state = "s-ninjan" U:gloves.item_state = "s-ninjan" else - if(U.mind.special_role!="Space Ninja") + if(U.mind.special_role!="Ninja") U << "\red fÄTaL ÈÈRRoR: 382200-*#00CÖDE RED\nUNAU†HORIZED USÈ DETÈC†††eD\nCoMMÈNCING SUB-R0U†IN3 13...\nTÈRMInATING U-U-USÈR..." U.gib() return 0 diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index 70029762fc8..5ea8f2c5a05 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -1,5 +1,5 @@ /datum/game_mode/var/list/datum/mind/ninjas = list() - +// Keep in mind ninja-procs that aren't here will be where the event's defined /datum/game_mode/ninja name = "ninja" config_tag = "ninja" @@ -15,6 +15,7 @@ world << "The current game mode is Ninja!" /datum/game_mode/ninja/can_start() + world << "CAN START CALLED" if(!..()) return 0 var/list/datum/mind/possible_ninjas = get_players_for_role(BE_NINJA) @@ -41,21 +42,25 @@ return 1 /datum/game_mode/ninja/pre_setup() + world << "PRE SETUP CALLED" for(var/datum/mind/ninja in ninjas) + ninja.current << browse(null, "window=playersetup") ninja.current = create_space_ninja(pick(ninjastart.len ? ninjastart : latejoin)) ninja.current.ckey = ninja.key return 1 /datum/game_mode/ninja/post_setup() + world << "POST SETUP CALLED" for(var/datum/mind/ninja in ninjas) if(ninja.current && !(istype(ninja.current,/mob/living/carbon/human))) return 0 + forge_ninja_objectives(ninja) 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) + S:ninitialize(3, N) spawn (rand(waittime_l, waittime_h)) send_intercept() return ..() @@ -74,4 +79,108 @@ return ..() else finished = 1 - return 1 \ No newline at end of file + return 1 + +/datum/game_mode/ninja/proc/forge_ninja_objectives(var/datum/mind/ninja) + world << "NINJA OBJECTIVES FORGED" + var/objective_list[] = list(1,2,3,4,5) + for(var/i=rand(2,4),i>0,i--) + switch(pick(objective_list)) + if(1)//Kill + var/datum/objective/assassinate/ninja_objective = new + ninja_objective.owner = ninja + ninja_objective.target = ninja_objective.find_target() + if(ninja_objective.target != "Free Objective") + ninja.objectives += ninja_objective + else + i++ + objective_list -= 1 // No more than one kill objective + if(2)//Steal + var/datum/objective/steal/ninja_objective = new + ninja_objective.owner = ninja + ninja_objective.target = ninja_objective.find_target() + ninja.objectives += ninja_objective + if(3)//Protect + var/datum/objective/protect/ninja_objective = new + ninja_objective.owner = ninja + ninja_objective.target = ninja_objective.find_target() + if(ninja_objective.target != "Free Objective") + ninja.objectives += ninja_objective + else + i++ + objective_list -= 3 + if(4)//Download + var/datum/objective/download/ninja_objective = new + ninja_objective.owner = ninja + ninja_objective.gen_amount_goal() + ninja.objectives += ninja_objective + objective_list -= 4 + if(5)//Harm + var/datum/objective/harm/ninja_objective = new + ninja_objective.owner = ninja + ninja_objective.target = ninja_objective.find_target() + if(ninja_objective.target != "Free Objective") + ninja.objectives += ninja_objective + else + i++ + objective_list -= 5 + + var/datum/objective/survive/ninja_objective = new + ninja_objective.owner = ninja + ninja.objectives += ninja_objective + + var/directive = generate_ninja_directive("heel")//Only hired by antags, not NT + ninja.current << "You are an elite mercenary assassin of the Spider Clan, [ninja.current.real_name]. You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor.\nYour current directive is: \red [directive]\n \blue Try your best to adhere to this." + ninja.store_memory("Directive: \red [directive]
") + + var/obj_count = 1 + ninja.current << "\blue Your current objectives:" + for(var/datum/objective/objective in ninja.objectives) + ninja.current << "Objective #[obj_count]: [objective.explanation_text]" + obj_count++ + +/datum/game_mode/proc/auto_declare_completion_ninja() + if(ninjas.len) + var/text = "The ninjas were:" + for(var/datum/mind/ninja in ninjas) + var/ninjawin = 1 + + text += "
[ninja.key] was [ninja.name] (" + if(ninja.current) + if(ninja.current.stat == DEAD) + text += "died" + else + text += "survived" + if(ninja.current.real_name != ninja.name) + text += " as [ninja.current.real_name]" + else + text += "body destroyed" + text += ")" + + if(ninja.objectives.len)//If the ninja had no objectives, don't need to process this. + var/count = 1 + for(var/datum/objective/objective in ninja.objectives) + if(objective.check_completion()) + text += "
Objective #[count]: [objective.explanation_text] Success!" + feedback_add_details("traitor_objective","[objective.type]|SUCCESS") + else + text += "
Objective #[count]: [objective.explanation_text] Fail." + feedback_add_details("traitor_objective","[objective.type]|FAIL") + ninjawin = 0 + count++ + + var/special_role_text + if(ninja.special_role) + special_role_text = lowertext(ninja.special_role) + else + special_role_text = "antagonist" + + if(ninjawin) + text += "
The [special_role_text] was successful!" + feedback_add_details("traitor_success","SUCCESS") + else + text += "
The [special_role_text] has failed!" + feedback_add_details("traitor_success","FAIL") + + world << text + return 1 \ No newline at end of file diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index f323e26a1c4..6963f20a903 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -569,6 +569,9 @@ datum/objective/steal for(var/mob/living/silicon/ai/M in C) if(istype(M, /mob/living/silicon/ai) && M.stat != 2) //See if any AI's are alive inside that card. return 1 + for(var/obj/item/clothing/suit/space/space_ninja/S in all_items) //Let an AI downloaded into a space ninja suit count + if(S.AI && S.AI.stat != 2) + return 1 for(var/mob/living/silicon/ai/ai in world) if(istype(ai.loc, /turf)) var/area/check_area = get_area(ai) diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 097540fa588..cea125b7e17 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -469,6 +469,18 @@ dat += "Wizard not found!" dat += "" + if(ticker.mode.ninjas.len > 0) + dat += "
" + for(var/datum/mind/ninja in ticker.mode.ninjas) + var/mob/M = ninja.current + if(M) + dat += "" + dat += "" + dat += "" + else + dat += "" + dat += "
Ninjas
[M.real_name][M.client ? "" : " (logged out)"][M.stat == 2 ? " (DEAD)" : ""]PMShow Objective
Ninja not found!
" + if(ticker.mode.cult.len) dat += "
" for(var/datum/mind/N in ticker.mode.cult) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index cbdde7cca87..f5ead1fa839 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -357,17 +357,22 @@ Traitors and the like can also be revived with the previous role mostly intact. if(synd_spawn) new_character.loc = get_turf(synd_spawn) call(/datum/game_mode/proc/equip_syndicate)(new_character) - if("Space Ninja") - var/ninja_spawn[] = list() - for(var/obj/effect/landmark/L in landmarks_list) - if(L.name=="carpspawn") - ninja_spawn += L + if("Ninja") new_character.equip_space_ninja() new_character.internal = new_character.s_store new_character.internals.icon_state = "internal1" - if(ninja_spawn.len) - var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn) - new_character.loc = ninja_spawn_here.loc + if(ninjastart.len == 0) + new_character << "\red A proper starting location for you could not be found, please report this bug!" + new_character << "\red Attempting to place at a carpspawn." + for(var/obj/effect/landmark/L in landmarks_list) + if(L.name == "carpspawn") + ninjastart.Add(L) + if(ninjastart.len == 0 && latejoin.len > 0) + new_character << "\red Still no spawneable locations could be found. Defaulting to latejoin." + new_character.loc = pick(latejoin) + else if (ninjastart.len == 0) + new_character << "\red Still no spawneable locations could be found. Aborting." + if("Death Commando")//Leaves them at late-join spawn. new_character.equip_death_commando() new_character.internal = new_character.s_store diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index e6a76d88e8e..8c1af417ec6 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -14,7 +14,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set "pAI candidate" = 1, // -- TLE // 7 "cultist" = IS_MODE_COMPILED("cult"), // 8 "infested monkey" = IS_MODE_COMPILED("monkey"), // 9 - "space ninja" = "true", // 10 + "ninja" = "true", // 10 ) var/const/MAX_SAVE_SLOTS = 10 diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 65e44caefe4..4c61f2e60b0 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -57,11 +57,11 @@ if(!gibbed) emote("deathgasp") //let the world KNOW WE ARE DEAD - //For ninjas exploding when they die./N + //For ninjas exploding when they die. if( istype(wear_suit, /obj/item/clothing/suit/space/space_ninja) && wear_suit:s_initialized ) src << browse(null, "window=spideros")//Just in case. var/location = loc - explosion(location, 1, 2, 3, 4) + explosion(location, 0, 0, 3, 4) update_canmove() if(client) blind.layer = 0 diff --git a/config/names/ninjaname.txt b/config/names/ninjaname.txt index b41271dbe10..24d5d6879ef 100644 --- a/config/names/ninjaname.txt +++ b/config/names/ninjaname.txt @@ -6,9 +6,12 @@ Scorpion Zero Ermac Saibot +Sun +Moon Cyrax Raphael Michaelangelo +Cloud Donatello Leonardo Splinter @@ -20,7 +23,6 @@ Ryu Hayabusa Midnight Seven -McNinja Hanzo Blood Iga @@ -32,7 +34,6 @@ Baki Ogre Daemon Goemon -McAwesome Throat Death Aria diff --git a/config/names/ninjatitle.txt b/config/names/ninjatitle.txt index 2c7f9e7f73c..966204bb4dc 100644 --- a/config/names/ninjatitle.txt +++ b/config/names/ninjatitle.txt @@ -24,7 +24,6 @@ Slayer Awesome Ender Dr. -Noob Night Crimson Grappler @@ -43,4 +42,5 @@ Steel Nickel Silver Singing -Snake \ No newline at end of file +Snake +Acid \ No newline at end of file From ca74c8ab4478401cbeadc0cf1a6a5743d2d4651a Mon Sep 17 00:00:00 2001 From: Whitellama Date: Wed, 26 Jun 2013 17:08:08 -0700 Subject: [PATCH 5/9] Raised required players of ninja gamemode (no longer 1, for debug) --- code/game/gamemodes/ninja/ninja.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index 5ea8f2c5a05..64219efd3b0 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -3,8 +3,8 @@ /datum/game_mode/ninja name = "ninja" config_tag = "ninja" - required_players = 1 //CHANGE DEBUG - required_players_secret = 1 //CHANGE DEBUG + required_players = 10 //Can be adjusted later, should suffice for now. + required_players_secret = 10 required_enemies = 1 recommended_enemies = 1 var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) @@ -183,4 +183,4 @@ feedback_add_details("traitor_success","FAIL") world << text - return 1 \ No newline at end of file + return 1 From 9ec3996cf465333912d3904b25579183ec70664f Mon Sep 17 00:00:00 2001 From: Whitellama Date: Wed, 26 Jun 2013 17:30:32 -0700 Subject: [PATCH 6/9] Updated changelog with space ninja gamemode changes --- html/changelog.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/html/changelog.html b/html/changelog.html index 93e16139fb9..b028485130a 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -57,6 +57,22 @@ Stuff which is in development and not yet visible to players or just code relate (ie. code improvements for expandability, etc.) should not be listed here. They should be listed in the changelog upon commit though. Thanks. --> +
+

June 26th, 2013

+

Whitellama updated:

+
    +
  • One-antag rounds (like wizard/ninja) no longer end automatically upon death
  • +
  • Space ninja has been implemented as a voteable gamemode
  • +
  • Space ninja spawn landmarks have been implemented (but not yet placed on the map), still spawn at carps-pawns instead. (The code will warn you about this and ask you to report it, it's a known issue.)
  • +
  • Five new space ninja directives have been added, old directives have been reworded to be less harsh
  • +
  • Space ninjas have been given their own list as antagonists, and are no longer bundled up with traitors
  • +
  • Space ninjas with a "steal a functional AI" objective will now succeed by downloading one into their suits
  • +
  • Space ninja suits' exploding on death has been nerfed, so as not to cause breaches
  • +
  • A few space ninja titles/names have been added and removed to be slightly more believable
  • +
  • The antagonist selector no longer chooses jobbanned players when it runs out of willing options
  • +
+
+

23.06.2013

Segrain updated:

From f9b01a09cca9d59803fa31e0dd03a1998e1b59de Mon Sep 17 00:00:00 2001 From: Whitellama Date: Thu, 27 Jun 2013 18:52:00 -0700 Subject: [PATCH 7/9] Removed debug outputs and fixed double-forging of ninja objectives --- code/game/gamemodes/ninja/ninja.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index 64219efd3b0..fb15deb3712 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -53,14 +53,13 @@ world << "POST SETUP CALLED" for(var/datum/mind/ninja in ninjas) if(ninja.current && !(istype(ninja.current,/mob/living/carbon/human))) return 0 - forge_ninja_objectives(ninja) + //forge_ninja_objectives(ninja) 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(3, N) spawn (rand(waittime_l, waittime_h)) send_intercept() return ..() From e49a80d822193041fd800b5f9f927386886d0a1f Mon Sep 17 00:00:00 2001 From: Whitellama Date: Sun, 30 Jun 2013 13:59:24 -0700 Subject: [PATCH 8/9] Fixed changelog conflicts --- html/changelog.html | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/html/changelog.html b/html/changelog.html index b028485130a..f79db2c571d 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -57,6 +57,20 @@ Stuff which is in development and not yet visible to players or just code relate (ie. code improvements for expandability, etc.) should not be listed here. They should be listed in the changelog upon commit though. Thanks. --> +
+

June 28th, 2013

+

Segrain updated:

+
    +
  • AIs are now able to examine what they see.
  • +
+
+
+

June 27th, 2013

+

Segrain updated:

+
    +
  • ID cards properly setup bloodtype, DNA and fingerprints again.
  • +
+

June 26th, 2013

Whitellama updated:

@@ -71,10 +85,14 @@ should be listed in the changelog upon commit though. Thanks. -->
  • A few space ninja titles/names have been added and removed to be slightly more believable
  • The antagonist selector no longer chooses jobbanned players when it runs out of willing options
  • -
    - -
    -

    23.06.2013

    +
    +

    June 26th, 2013

    +

    Segrain updated:

    +
      +
    • Autopsy scanner properly displays time of wound infliction and death.
    • +
    • Autopsy scanner properly displays wounds by projectile weapons.
    • +
    +

    June 23rd, 2013

    Segrain updated:

    • Airlocks of various models can be constructed again.
    • @@ -82,13 +100,18 @@ should be listed in the changelog upon commit though. Thanks. -->
    -

    June 23, 2013

    +

    June 23rd, 2013

    faux updated:

    • There has been a complete medbay renovation spearheaded by Vetinarix. http://baystation12.net/forums/viewtopic.php?f=20&t=7847 <-- Please put any commentary good or bad, here.
    • Some maintenance doors within RnD and Medbay have had their accesses changed. Maintenance doors in the joint areas (leading to the research shuttle, virology, and xenobiology) are now zero access. Which means anyone in those joints can enter the maintenance tunnels. This was done to add additional evacuation locations during radiation storms. Additional maintenance doors were added to the tunnels in these areas to prevent docs and scientists from running about.
    • Starboard emergency storage isn't gone now, it's simply located in the escape wing.
    • An engineering training room has been added to engineering. This location was previously where surgery was located. If you are new to engineering or need to brush up on your skills, please use this area for testing.
    • +

      26.06.2013

      +

      Segrain updated:

      +
        +
      • Autopsy scanner properly displays time of wound infliction and death.
      • +
      • Autopsy scanner properly displays wounds by projectile weapons.
    From 99a317cf079f3b72dd974c5293531b294cf3f8c5 Mon Sep 17 00:00:00 2001 From: Whitellama Date: Sun, 30 Jun 2013 20:08:46 -0700 Subject: [PATCH 9/9] Removed debug outputs --- code/game/gamemodes/ninja/ninja.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/game/gamemodes/ninja/ninja.dm b/code/game/gamemodes/ninja/ninja.dm index fb15deb3712..8dd3c45e19d 100644 --- a/code/game/gamemodes/ninja/ninja.dm +++ b/code/game/gamemodes/ninja/ninja.dm @@ -15,7 +15,6 @@ world << "The current game mode is Ninja!" /datum/game_mode/ninja/can_start() - world << "CAN START CALLED" if(!..()) return 0 var/list/datum/mind/possible_ninjas = get_players_for_role(BE_NINJA) @@ -42,7 +41,6 @@ return 1 /datum/game_mode/ninja/pre_setup() - world << "PRE SETUP CALLED" for(var/datum/mind/ninja in ninjas) ninja.current << browse(null, "window=playersetup") ninja.current = create_space_ninja(pick(ninjastart.len ? ninjastart : latejoin)) @@ -50,7 +48,6 @@ return 1 /datum/game_mode/ninja/post_setup() - world << "POST SETUP CALLED" for(var/datum/mind/ninja in ninjas) if(ninja.current && !(istype(ninja.current,/mob/living/carbon/human))) return 0 //forge_ninja_objectives(ninja) @@ -81,7 +78,6 @@ return 1 /datum/game_mode/ninja/proc/forge_ninja_objectives(var/datum/mind/ninja) - world << "NINJA OBJECTIVES FORGED" var/objective_list[] = list(1,2,3,4,5) for(var/i=rand(2,4),i>0,i--) switch(pick(objective_list))
    Cultists