#Fixed ninja teleporting. It will not blackscreen when Phase Jaunting near the map edge.

#Phase Shift will no-longer show up in the Ninja verb panel. You can right-click on turfs only to use it.
#Ninjas can now spawn a sword in their active hand. Besides killing dudes, it's also useful for slicing through doors, lockers, walls, and so on. It'll disappear if dropped or thrown, and it cannot be placed in containers.
#Ninja mask now works differently when mimicking voice. You start out as "Unknown" and when toggling the voice changer it will randomly change your name with some variations.
#If you switch the name back to "Unknown" you will re-active voice masking which is much less silly this time. The only way for someone to determine your true name is to remove the mask. Postmodern Space Bushido demands that you only reveal your identity in honorable combat!
#Slightly updated sprites for ninja suit and accessories. Or as I'd like to call them, the Tron suit. Probably wip until I get enough motivation to redo it from scratch.

#People that respawn as death commandos are now manually chosen by an admin.
#Death commandos use the new suit sprites.
#Added a global proc for animations. Currently only used by ninjas.
#Moved around suit icons so they are grouped better.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1433 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-04-10 22:41:23 +00:00
parent ae1d99ee73
commit 7b280b791a
28 changed files with 295 additions and 127 deletions

View File

@@ -792,6 +792,8 @@ var/showadminmessages = 1
removed_paths += dirty_path
else if (ispath(path, /obj/item/weapon/gun/energy/pulse_rifle) && !(src.rank in list("Game Admin", "Game Master")))
removed_paths += dirty_path
else if (ispath(path, /obj/item/weapon/blade))//Not an item one should be able to spawn./N
removed_paths += dirty_path
else if (ispath(path, /obj/bhole) && !(src.rank in list("Game Admin", "Game Master")))
removed_paths += dirty_path
else if (ispath(path, /mob) && !(src.rank in list("Badmin", "Game Admin", "Game Master")))

View File

@@ -20,7 +20,7 @@ var/global/sent_strike_team = 0
return
if(alert("Do you want to send in the CentCom death squad? Once enabled, this is irreversible.",,"Yes","No")=="No")
return
alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's task is recommended from there.")
alert("This 'mode' will go on until everyone is dead or the station is destroyed. You may also admin-call the evac shuttle when appropriate. Spawned commandos have internals cameras which are viewable through a monitor inside the Spec. Ops. Office. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.")
TRYAGAIN
@@ -40,8 +40,22 @@ var/global/sent_strike_team = 0
//Code for spawning a nuke auth code.
var/nuke_code = "[rand(10000, 99999.0)]"
//Spawns commandos and equips them.
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
var/mob/dead/observer/G
var/list/commandos = list()//actual commando ghosts as picked by the user.
var/list/candidates = list()//candidates for being a commando out of all the active ghosts in world.
for(G in world)
if(G.client)
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list.
// if(((G.client.inactivity/10)/60) <= 5) //Removing it allows even the caller to jump in. Good for testing.
candidates.Add(G)
var/p=1
while(candidates.len&&p<=commandos_possible)
G = input("Pick characters to spawn as the commandos. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players", G) in candidates//It will auto-pick a person when there is only one candidate.
commandos.Add(G)
p++
//Spawns commandos and equips them.
for (var/obj/landmark/STARTLOC in world)
if (STARTLOC.name == "Commando")
var/mob/living/carbon/human/new_commando = new(STARTLOC.loc)
@@ -63,7 +77,8 @@ var/global/sent_strike_team = 0
//Creates mind stuff.
new_commando.mind = new
new_commando.mind.current = new_commando
new_commando.mind.assigned_role = "Death Commando"
new_commando.mind.assigned_role = "Centcom Contractor"
new_commando.mind.special_role = "Death Commando"
new_commando.mind.store_memory("<B>Nuke Code:</B> \red [nuke_code].")//So they don't forget their code or mission.
new_commando.mind.store_memory("<B>Mission:</B> \red [input].")
new_commando.resistances += "alien_embryo"
@@ -119,21 +134,16 @@ Useful for copy pasta since I'm lazy.*/
W.registered = new_commando.real_name
new_commando.equip_if_possible(W, new_commando.slot_wear_id)
var/list/candidates = list() // Picks a random ghost for the role. Mostly a copy of alien burst code.
for(var/mob/dead/observer/G in world)
if(G.client)
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5) //Whoever called/has the proc won't be added to the list.
// if(((G.client.inactivity/10)/60) <= 5) //Removing it allows even the caller to jump in. Good for testing.
candidates.Add(G)
if(candidates.len)
var/mob/dead/observer/G = pick(candidates)
if(commandos.len)
G = pick(commandos)
new_commando.mind.key = G.key//For mind stuff.
new_commando.client = G.client
del(G)
else
new_commando.key = "null"
new_commando.mind.key = new_commando.key
commando_number = commando_number-1
commando_number--
if (leader_selected == 0)
new_commando << "\blue \nYou are a Special Ops. commando in the service of Central Command. Check the table ahead for detailed instructions.\nYour current mission is: \red<B>[input]</B>"
@@ -150,7 +160,7 @@ Useful for copy pasta since I'm lazy.*/
if (MANUAL.name == "Commando_Manual")
new /obj/item/weapon/gun/energy/pulse_rifle(MANUAL.loc)
var/obj/item/weapon/paper/PAPER = new(MANUAL.loc)
PAPER.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Cent. Com will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code]</b></p><p><b>Good luck, soldier!</b></p>"
PAPER.info = "<p><b>Good morning soldier!</b>. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow:<br>#1 Work as a team.<br>#2 Accomplish your objective at all costs.<br>#3 Leave no witnesses.<br>You are fully equipped and stocked for your mission--before departing on the Spec. Ops. Shuttle due South, make sure that all operatives are ready. Actual mission objective will be relayed to you by Central Command through your headsets.<br>If deemed appropriate, Central Command will also allow members of your team to equip assault power-armor for the mission. You will find the armor storage due West of your position. Once you are ready to leave, utilize the Special Operations shuttle console and toggle the hull doors via the other console.</p><p>In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations <b>LEADER</b> is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination.</p><p>Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device.<br>First and foremost, <b>DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.</b> Pressing any button on the compacted bomb will cause it to extend and bolt itself into place. If this is done to unbolt it one must completely log in which at this time may not be possible.<br>To make the device functional:<br>#1 Place bomb in designated detonation zone<br> #2 Extend and anchor bomb (attack with hand).<br>#3 Insert Nuclear Auth. Disk into slot.<br>#4 Type numeric code into keypad ([nuke_code]).<br>Note: If you make a mistake press R to reset the device.<br>#5 Press the E button to log onto the device.<br>You now have activated the device. To deactivate the buttons at anytime, for example when you have already prepped the bomb for detonation, remove the authentication disk OR press the R on the keypad. Now the bomb CAN ONLY be detonated using the timer. A manual detonation is not an option.<br>Note: Toggle off the <b>SAFETY</b>.<br>Use the - - and + + to set a detonation time between 5 seconds and 10 minutes. Then press the timer toggle button to start the countdown. Now remove the authentication disk so that the buttons deactivate.<br>Note: <b>THE BOMB IS STILL SET AND WILL DETONATE</b><br>Now before you remove the disk if you need to move the bomb you can: Toggle off the anchor, move it, and re-anchor.</p><p>The nuclear authorization code is: <b>[nuke_code]</b></p><p><b>Good luck, soldier!</b></p>"
PAPER.name = "Spec. Ops. Manual"
for (var/obj/landmark/BOMB in world)
@@ -170,7 +180,7 @@ Useful for copy pasta since I'm lazy.*/
if(!src.authenticated || !src.holder)
src << "Only administrators may use this command."
return
if(!ticker)
if(!ticker.mode)//Apparently, this doesn't actually prevent anything. Huh
alert("The game hasn't started yet!")
return
@@ -212,23 +222,12 @@ Useful for copy pasta since I'm lazy.*/
new_ninja.equip_if_possible(new /obj/item/clothing/gloves/space_ninja(new_ninja), new_ninja.slot_gloves)
new_ninja.equip_if_possible(new /obj/item/clothing/head/helmet/space/space_ninja(new_ninja), new_ninja.slot_head)
new_ninja.equip_if_possible(new /obj/item/clothing/mask/gas/space_ninja(new_ninja), new_ninja.slot_wear_mask)
// new_ninja.equip_if_possible(new /obj/item/clothing/glasses/thermal(new_ninja), new_ninja.slot_glasses) //No longer necessary.
new_ninja.equip_if_possible(new /obj/item/device/flashlight(new_ninja), new_ninja.slot_belt)
new_ninja.equip_if_possible(new /obj/item/weapon/plastique(new_ninja), new_ninja.slot_r_store)
new_ninja.equip_if_possible(new /obj/item/weapon/plastique(new_ninja), new_ninja.slot_l_store)
var/obj/item/weapon/tank/emergency_oxygen/OXYTANK = new /obj/item/weapon/tank/emergency_oxygen(new_ninja)
new_ninja.equip_if_possible(OXYTANK, new_ninja.slot_s_store)
/* You know, I'm not really sure why space ninjas would need an ID card.
Running around as an unknown is badass and makes you manly
var/obj/item/weapon/card/id/W = new(new_ninja)
W.name = "[new_ninja.real_name]'s ID Card"
W.access = access_maint_tunnels
W.assignment = "Space Ninja"
W.registered = new_ninja.real_name
new_ninja.equip_if_possible(W, new_ninja.slot_wear_id)
*/
var/admin_name = src//In case admins want to spawn themselves as ninjas. Badmins
var/mob/dead/observer/G
@@ -256,10 +255,12 @@ Running around as an unknown is badass and makes you manly
new_ninja.verbs += /mob/proc/ninjajaunt
new_ninja.verbs += /mob/proc/ninjasmoke
new_ninja.verbs += /mob/proc/ninjapulse
new_ninja.verbs += /mob/proc/ninjablade
new_ninja.mind.special_verbs += /mob/proc/ninjashift
new_ninja.mind.special_verbs += /mob/proc/ninjajaunt
new_ninja.mind.special_verbs += /mob/proc/ninjasmoke
new_ninja.mind.special_verbs += /mob/proc/ninjapulse
new_ninja.mind.special_verbs += /mob/proc/ninjablade
message_admins("\blue [admin_name] has spawned [new_ninja.key] as a Space Ninja. Hide yo children!", 1)
log_admin("[admin_name] used Spawn Space Ninja.")
@@ -267,6 +268,7 @@ Running around as an unknown is badass and makes you manly
//SPACE NINJA ABILITIES
/*
// src << "\red Something has gone awry and you are missing one or more pieces of equipment."
@@ -329,8 +331,8 @@ Running around as an unknown is badass and makes you manly
//X the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx-4 || T.x<4) continue
if(T.y>world.maxy-4 || T.y<4) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((T.y-mobloc.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue
turfs += T
if(SOUTH)
@@ -338,8 +340,8 @@ Running around as an unknown is badass and makes you manly
//X the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx-4 || T.x<4) continue
if(T.y>world.maxy-4 || T.y<4) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((mobloc.y-T.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue
turfs += T
if(EAST)
@@ -347,8 +349,8 @@ Running around as an unknown is badass and makes you manly
//Y the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx-4 || T.x<4) continue
if(T.y>world.maxy-4 || T.y<4) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((T.x-mobloc.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue
turfs += T
if(WEST)
@@ -356,36 +358,23 @@ Running around as an unknown is badass and makes you manly
//Y the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx-4 || T.x<4) continue
if(T.y>world.maxy-4 || T.y<4) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((mobloc.x-T.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue
turfs += T
else
return
if(!turfs.len) turfs += pick(/turf in orange(10))//Teleports randomly if there is no proper turf in a line.
if(!turfs.len)//Cancels the teleportation if no valid turf is found. Usually when teleporting near map edge.
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
picked = pick(turfs)
spawn(0)
var/atom/movable/overlay/animation = new(mobloc)
animation.icon = 'mob.dmi'
animation.icon_state = "blank"
animation.layer = src.layer + 1
animation.master = mobloc
flick("phaseout", animation)
sleep(15)
del(animation)
anim(mobloc,'mob.dmi',src,"phaseout")
src.loc = picked
spawn(0)
var/atom/movable/overlay/animation = new(src.loc)
animation.icon = 'mob.dmi'
animation.icon_state = "blank"
animation.layer = src.layer + 1
animation.master = src
flick("phasein", animation)
sleep(15)
del(animation)
anim(src.loc,'mob.dmi',src,"phasein")
spawn(0) //Any living mobs in teleport area are gibbed.
for(var/mob/living/M in picked)
@@ -398,7 +387,7 @@ Running around as an unknown is badass and makes you manly
/mob/proc/ninjashift(var/turf/T in oview())
set name = "Phase Shift"
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
set category = "Ninja"
set category = null//So it does not show up on the panel can still be right-clicked.
if(src.stat)
src << "\red You must be conscious to do this."
@@ -412,26 +401,12 @@ Running around as an unknown is badass and makes you manly
var/turf/mobloc = get_turf(src.loc)
spawn(0)
var/atom/movable/overlay/animation = new(mobloc)
animation.icon = 'mob.dmi'
animation.icon_state = "blank"
animation.layer = src.layer + 1
animation.master = mobloc
flick("phaseout", animation)
sleep(15)
del(animation)
anim(mobloc,'mob.dmi',src,"phaseout")
src.loc = T
spawn(0)
var/atom/movable/overlay/animation = new(src.loc)
animation.icon = 'mob.dmi'
animation.icon_state = "blank"
animation.layer = src.layer + 1
animation.master = src
flick("phasein", animation)
sleep(15)
del(animation)
anim(src.loc,'mob.dmi',src,"phasein")
spawn(0) //Any living mobs in teleport area are gibbed.
for(var/mob/living/M in T)
@@ -456,12 +431,23 @@ Running around as an unknown is badass and makes you manly
//subtract cost(25)
/*
/mob/proc/ninjablade()
//Summon Energy Blade
//Summons a blade of energy in active hand.
name = ""
tab = "ninja"
desc = ""
cost = 0
*/
set name = "Energy Blade"
set desc = "Create a focused beam of energy in your active hand."
set category = "Ninja"
if(src.stat)
src << "\red You must be conscious to do this."
return
//add energy cost check
//add warning message for low energy
if(!src.get_active_hand()&&!istype(src.get_inactive_hand(), /obj/item/weapon/blade))
var/obj/item/weapon/blade/W = new()
src.put_in_hand(W)
/*
/mob/proc/ninjastar(var/mob/living/M in oview())
*/