From 2be28a16a6f3311adf24f9325013f6f04c2cd193 Mon Sep 17 00:00:00 2001 From: SamCroswell Date: Sat, 28 Dec 2013 17:09:25 -0500 Subject: [PATCH] More Ninja Tweaks --- code/game/gamemodes/events/ninja_equipment.dm | 6 +-- code/game/gamemodes/events/space_ninja.dm | 39 +++++++++++++------ code/modules/clothing/spacesuits/ninja.dm | 1 + 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm index a3b6545fed7..d2dfcffa930 100644 --- a/code/game/gamemodes/events/ninja_equipment.dm +++ b/code/game/gamemodes/events/ninja_equipment.dm @@ -492,9 +492,9 @@ ________________________________________________________________________________ U << browse(null, "window=spideros")//Closes the window. return - if(k_unlock!=7&&href_list["choice"]!="Return") - var/u1=text2num(href_list["choice"]) // Get the number of the choice - var/u2=(u1?abs(abs(k_unlock-u1)-2):1) //If u1 is not 0, get the absoloute value of(absoloute value of K_unlock-u1)-2, otherwise return 1 + if(k_unlock!=7&&href_list["choice"]!="Return") + var/u1=text2num(href_list["choice"]) + var/u2=(u1?abs(abs(k_unlock-u1)-2):1) k_unlock=(!u2? k_unlock+1:0) if(k_unlock==7) U << "Anonymous Messenger blinks." diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index c1f820323be..427788f41d6 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -482,20 +482,26 @@ As such, it's hard-coded for now. No reason for it not to be, really. if(alert("Are you sure you want to send in a space ninja?",,"Yes","No")=="No") return - var/mission - while(!mission) - mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) - if(!mission) - if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") - return + if(alert("Would you like random or custom paramaters?",,"Random","Custom")=="Custom") + var/mission + while(!mission) + mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN) + if(!mission) + if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes") + return - var/input = ckey(input("Pick character to spawn as the Space Ninja", "Key", "")) - if(!input) - return - space_ninja_arrival(input, mission) + var/input = ckey(input("Pick character to spawn as the Space Ninja", "Key", "")) + if(!input) + return - message_admins("\blue [key_name_admin(key)] has spawned [input] as a Space Ninja.\nTheir mission is: [mission]") + space_ninja_arrival(input, mission) + + message_admins("\blue [key_name_admin(key)] has spawned [input] as a Space Ninja.\nTheir mission is: [mission]") + + else + space_ninja_arrival() + message_admins("\blue [key_name_admin(key)] has spawned a random player as a Space Ninja.") log_admin("[key] used Spawn Space Ninja.") return @@ -575,6 +581,9 @@ As such, it's hard-coded for now. No reason for it not to be, really. 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 + if(!istype(U:wear_suit, /obj/item/clothing/suit/space/space_ninja)) // Because previously players could activate the suit successfully while holding the suit + U << "\red ERROR: 100113 \black UNABLE TO LOCATE USER\nABORTING..." + return 0 if(!istype(U:head, /obj/item/clothing/head/helmet/space/space_ninja)) U << "\red ERROR: 100113 \black UNABLE TO LOCATE HEAD GEAR\nABORTING..." return 0 @@ -584,7 +593,9 @@ As such, it's hard-coded for now. No reason for it not to be, really. if(!istype(U:gloves, /obj/item/clothing/gloves/space_ninja)) U << "\red ERROR: 110223 \black UNABLE TO LOCATE HAND GEAR\nABORTING..." return 0 - + if(!istype(U:wear_mask, /obj/item/clothing/mask/gas/voice/space_ninja)) + U << "\red ERROR: 110223 \black UNABLE TO LOCATE MASK\nABORTING..." + return 0 affecting = U canremove = 0 slowdown = 0 @@ -595,6 +606,8 @@ As such, it's hard-coded for now. No reason for it not to be, really. n_shoes.slowdown-- n_gloves = U:gloves n_gloves.canremove=0 + n_mask = U:wear_mask + n_mask.canremove=0 return 1 @@ -615,6 +628,8 @@ As such, it's hard-coded for now. No reason for it not to be, really. n_gloves.canremove=1 n_gloves.candrain=0 n_gloves.draining=0 + if(n_mask) + n_mask.canremove=1 //Allows the mob to grab a stealth icon. /mob/proc/NinjaStealthActive(atom/A)//A is the atom which we are using as the overlay. diff --git a/code/modules/clothing/spacesuits/ninja.dm b/code/modules/clothing/spacesuits/ninja.dm index a2eb1d2dd6c..b94526eb1d3 100644 --- a/code/modules/clothing/spacesuits/ninja.dm +++ b/code/modules/clothing/spacesuits/ninja.dm @@ -30,6 +30,7 @@ var/obj/item/clothing/head/helmet/space/space_ninja/n_hood var/obj/item/clothing/shoes/space_ninja/n_shoes var/obj/item/clothing/gloves/space_ninja/n_gloves + var/obj/item/clothing/mask/gas/voice/space_ninja/n_mask //Main function variables. var/s_initialized = 0//Suit starts off.