From 926ec66dfd6ffc3811a4d9b77b715ffbda9d4d03 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Sun, 29 Apr 2012 18:45:11 +0100 Subject: [PATCH] Adds an admin verb that fully sets up the singlo (for testing/debugging msotly) Fixes the tensioner occasionally attempting to turn cyborgs into malf AIs. Adds checks to space ninja during its objective creation. Fixes that fucking message when you're carrying the disk in outer space Nuke disk now respawns in all rounds. Adds the abiity to turn off the tensioner for the entire round. Pinpointers now show the remaining time until a nuke goes off if it's been armed when examined Nuclear bombs now have a minimum detonation time of one minute. - Instead of z-level transition happening when you reach the edge of the map, it will now happen 7 tiles away from the edge. This means that you will no longer see the black edge, transition will likely happen without you even noticing. - The distance from the edge that defines this is in setup.dm, the variable is called TRANSITIONEDGE and is currently set to 7 (the view range). Revision: r3312 & r3464 Author: VivianFoxfoot & baloh.matevz --- code/game/events/EventProcs/space_ninja.dm | 28 +++++---- code/game/gamemodes/nuclear/nuclearbomb.dm | 9 ++- code/game/turf.dm | 70 +++++++++------------- 3 files changed, 51 insertions(+), 56 deletions(-) diff --git a/code/game/events/EventProcs/space_ninja.dm b/code/game/events/EventProcs/space_ninja.dm index 28bd1088c42..c600efd4057 100644 --- a/code/game/events/EventProcs/space_ninja.dm +++ b/code/game/events/EventProcs/space_ninja.dm @@ -109,9 +109,9 @@ When I already created about 4 new objectives, this doesn't seem terribly import var/commando_list[] = list()//Commandos. //We want the ninja to appear only in certain modes. - var/acceptable_modes_list[] = list("traitor","revolution","cult","wizard","changeling","traitorchan","nuclear","malfunction","monkey") - if(!(current_mode.config_tag in acceptable_modes_list)) - return +// var/acceptable_modes_list[] = list("traitor","revolution","cult","wizard","changeling","traitorchan","nuclear","malfunction","monkey") // Commented out for both testing and ninjas +// if(!(current_mode.config_tag in acceptable_modes_list)) +// return /*No longer need to determine what mode it is since bad guys are basically universal. And there is now a mode with two types of bad guys.*/ @@ -187,7 +187,7 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp if(sent_strike_team&&side=="heel"&&antagonist_list.len)//If a strike team was sent, murder them all like a champ. for(current_mind in antagonist_list)//Search and destroy. Since we already have an antagonist list, they should appear there. - if(current_mind.special_role=="Death Commando") + if(current_mind && current_mind.special_role=="Death Commando") commando_list += current_mind if(commando_list.len)//If there are living commandos still in play. for(var/mob/living/carbon/human/commando in commando_list) @@ -230,8 +230,7 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob objective_list -= 3 switch(pick(objective_list)) if(1)//kill - while (!isnull(current_mind) && hostile_targets.len) - current_mind = pick(hostile_targets) + current_mind = pick(hostile_targets) if(current_mind) var/datum/objective/assassinate/ninja_objective = new @@ -239,6 +238,9 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))//If they have a special role, use that instead to find em. ninja_mind.objectives += ninja_objective + else + i++ + hostile_targets -= current_mind//Remove them from the list. if(2)//Steal var/list/datum/objective/theft = GenerateTheft(ninja_mind.assigned_role,ninja_mind) @@ -247,26 +249,32 @@ In either case, it's a good idea to spawn the ninja with a semi-random set of ob objective_list -= 2 if(3)//Protect. Keeping people alive can be pretty difficult. - while (!isnull(current_mind) && friendly_targets.len) - current_mind = pick(friendly_targets) + current_mind = pick(friendly_targets) if(current_mind) + var/datum/objective/protection/ninja_objective = new ninja_objective.owner = ninja_mind ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0)) ninja_mind.objectives += ninja_objective + else + i++ + friendly_targets -= current_mind if(4)//Debrain - while (!isnull(current_mind) && hostile_targets.len) - current_mind = pick(hostile_targets) + current_mind = pick(hostile_targets) if(current_mind) + var/datum/objective/debrain/ninja_objective = new ninja_objective.owner = ninja_mind ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0)) ninja_mind.objectives += ninja_objective + else + i++ + hostile_targets -= current_mind//Remove them from the list. if(5)//Download research var/datum/objective/download/ninja_objective = new diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index e13d4cd37a2..e351f3d82a3 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -227,9 +227,8 @@ /obj/item/weapon/disk/nuclear/Del() - if (ticker.mode && ticker.mode.name == "nuclear emergency") - if(blobstart.len > 0) - var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart)) - message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") - log_game("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") + if(blobstart.len > 0) + var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart)) + message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") + log_game("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") ..() diff --git a/code/game/turf.dm b/code/game/turf.dm index effb872f879..7e749b94760 100644 --- a/code/game/turf.dm +++ b/code/game/turf.dm @@ -1283,59 +1283,47 @@ turf/simulated/floor/return_siding_icon_state() // Okay, so let's make it so that people can travel z levels but not nuke disks! // if(ticker.mode.name == "nuclear emergency") return + if (src.x <= TRANSITIONEDGE || A.x >= (world.maxx - TRANSITIONEDGE - 1) || src.y <= TRANSITIONEDGE || A.y >= (world.maxy - TRANSITIONEDGE - 1)) + if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) + del(A) + return + if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels ... And moving this shit down here so it only fires when they're actually trying to change z-level. + del(A) //The disk's Del() proc ensures a new one is created + return - if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels - return + if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear))) + if(istype(A, /mob/living)) + var/mob/living/MM = A + if(MM.client) + MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is." + return -// else if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") Sandbox_Spacemove(A) + var/move_to_z_str = pickweight(accessable_z_levels) - else - if (src.x <= 2 || A.x >= (world.maxx - 1) || src.y <= 2 || A.y >= (world.maxy - 1)) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return + var/move_to_z = text2num(move_to_z_str) - if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear))) - if(istype(A, /mob/living)) - var/mob/living/MM = A - if(MM.client) - MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is." - return + if(!move_to_z) + return + A.z = move_to_z + if(src.x <= TRANSITIONEDGE) + A.x = world.maxx - TRANSITIONEDGE - 2 - var/move_to_z_str = pickweight(accessable_z_levels) + else if (A.x >= (world.maxx - TRANSITIONEDGE - 1)) + A.x = TRANSITIONEDGE + 1 - var/move_to_z = text2num(move_to_z_str) + else if (src.y <= TRANSITIONEDGE) + A.y = world.maxy - TRANSITIONEDGE -2 - if(!move_to_z) - return + else if (A.y >= (world.maxy - TRANSITIONEDGE - 1)) + A.y = TRANSITIONEDGE +1 + spawn (0) + if ((A && A.loc)) + A.loc.Entered(A) - - A.z = move_to_z - - - if(src.x <= 2) - A.x = world.maxx - 2 - - else if (A.x >= (world.maxx - 1)) - A.x = 3 - - else if (src.y <= 2) - A.y = world.maxy - 2 - - else if (A.y >= (world.maxy - 1)) - A.y = 3 - - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - -// if(istype(A, /obj/structure/closet/coffin)) -// coffinhandler.Add(A) -/* /turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj) var/cur_x var/cur_y