diff --git a/baystation12.dme b/baystation12.dme index d13c553649..979d9cbbcc 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -234,8 +234,6 @@ #include "code\game\gamemodes\events\clang.dm" #include "code\game\gamemodes\events\dust.dm" #include "code\game\gamemodes\events\miniblob.dm" -#include "code\game\gamemodes\events\ninja_abilities.dm" -#include "code\game\gamemodes\events\ninja_equipment.dm" #include "code\game\gamemodes\events\power_failure.dm" #include "code\game\gamemodes\events\space_ninja.dm" #include "code\game\gamemodes\events\spacevines.dm" @@ -776,7 +774,6 @@ #include "code\modules\clothing\gloves\boxing.dm" #include "code\modules\clothing\gloves\color.dm" #include "code\modules\clothing\gloves\miscellaneous.dm" -#include "code\modules\clothing\gloves\ninja.dm" #include "code\modules\clothing\head\collectable.dm" #include "code\modules\clothing\head\hardhat.dm" #include "code\modules\clothing\head\helmet.dm" @@ -788,19 +785,35 @@ #include "code\modules\clothing\masks\breath.dm" #include "code\modules\clothing\masks\gasmask.dm" #include "code\modules\clothing\masks\miscellaneous.dm" +#include "code\modules\clothing\masks\voice.dm" #include "code\modules\clothing\shoes\colour.dm" #include "code\modules\clothing\shoes\magboots.dm" #include "code\modules\clothing\shoes\miscellaneous.dm" #include "code\modules\clothing\spacesuits\alien.dm" #include "code\modules\clothing\spacesuits\breaches.dm" #include "code\modules\clothing\spacesuits\captain.dm" -#include "code\modules\clothing\spacesuits\ert.dm" #include "code\modules\clothing\spacesuits\miscellaneous.dm" -#include "code\modules\clothing\spacesuits\ninja.dm" -#include "code\modules\clothing\spacesuits\rig.dm" #include "code\modules\clothing\spacesuits\spacesuits.dm" #include "code\modules\clothing\spacesuits\syndi.dm" -#include "code\modules\clothing\spacesuits\void.dm" +#include "code\modules\clothing\spacesuits\rig\rig.dm" +#include "code\modules\clothing\spacesuits\rig\rig_attackby.dm" +#include "code\modules\clothing\spacesuits\rig\rig_pieces.dm" +#include "code\modules\clothing\spacesuits\rig\rig_verbs.dm" +#include "code\modules\clothing\spacesuits\rig\modules\combat.dm" +#include "code\modules\clothing\spacesuits\rig\modules\computer.dm" +#include "code\modules\clothing\spacesuits\rig\modules\modules.dm" +#include "code\modules\clothing\spacesuits\rig\modules\ninja.dm" +#include "code\modules\clothing\spacesuits\rig\modules\utility.dm" +#include "code\modules\clothing\spacesuits\rig\modules\vision.dm" +#include "code\modules\clothing\spacesuits\rig\suits\ert.dm" +#include "code\modules\clothing\spacesuits\rig\suits\hacker.dm" +#include "code\modules\clothing\spacesuits\rig\suits\light.dm" +#include "code\modules\clothing\spacesuits\rig\suits\ninja.dm" +#include "code\modules\clothing\spacesuits\rig\suits\stealth.dm" +#include "code\modules\clothing\spacesuits\void\merc.dm" +#include "code\modules\clothing\spacesuits\void\station.dm" +#include "code\modules\clothing\spacesuits\void\void.dm" +#include "code\modules\clothing\spacesuits\void\wizard.dm" #include "code\modules\clothing\suits\alien.dm" #include "code\modules\clothing\suits\armor.dm" #include "code\modules\clothing\suits\bio.dm" diff --git a/code/WorkInProgress/computer3/component.dm b/code/WorkInProgress/computer3/component.dm index 501bbc973e..18cf2de1c7 100644 --- a/code/WorkInProgress/computer3/component.dm +++ b/code/WorkInProgress/computer3/component.dm @@ -50,20 +50,25 @@ var/mob/living/silicon/ai/occupant = null var/busy = 0 - // Ninja gloves check - attack_hand(mob/user as mob) - if(ishuman(user) && istype(user:gloves, /obj/item/clothing/gloves/space_ninja) && user:gloves:candrain && !user:gloves:draining) - if(user:wear_suit:s_control) - user:wear_suit.transfer_ai("AIFIXER","NINJASUIT",src,user) - else - user << "\red ERROR: \black Remote access channel disabled." - return - ..() - attackby(obj/I as obj,mob/user as mob) if(computer && !computer.stat) + if(istype(I, /obj/item/device/aicard)) - I:transfer_ai("AIFIXER","AICARD",src,user) + + var/obj/item/device/aicard/card = I + var/mob/living/silicon/ai/comp_ai = locate() in src + var/mob/living/silicon/ai/card_ai = locate() in card + + if(istype(comp_ai)) + if(busy) + user << "\red ERROR: \black Reconstruction in progress." + return + card.grab_ai(comp_ai, user) + if(!(locate(/mob/living/silicon/ai) in src)) occupant = null + else if(istype(card_ai)) + load_ai(card_ai,card,user) + occupant = locate(/mob/living/silicon/ai) in src + if(computer.program) computer.program.update_icon() computer.update_icon() @@ -71,6 +76,24 @@ ..() return +/obj/item/part/computer/ai_holder/proc/load_ai(var/mob/living/silicon/ai/transfer, var/obj/item/device/aicard/card, var/mob/user) + + if(!transfer) + return + + // Transfer over the AI. + transfer << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here." + user << "\blue Transfer successful: \black [transfer.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed." + + transfer.loc = src + transfer.cancel_camera() + transfer.control_disabled = 1 + occupant = transfer + + if(card) + card.clear() + + /* ID computer cardslot - reading and writing slots */ diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 586b262259..8395500ef7 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -208,9 +208,22 @@ */ /mob/proc/MiddleClickOn(var/atom/A) return + /mob/living/carbon/MiddleClickOn(var/atom/A) swap_hand() +/mob/living/carbon/human/MiddleClickOn(var/atom/A) + + if(back) + var/obj/item/weapon/storage/rig/rig = back + if(istype(rig) && rig.selected_module) + if(world.time <= next_move) return + next_move = world.time + 8 + rig.selected_module.engage(A) + return + + swap_hand() + // In case of use break glass /* /atom/proc/MiddleClick(var/mob/M as mob) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 8a10310b3d..afa5d9b141 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -267,8 +267,15 @@ if(C.internals) C.internals.icon_state = "internal0" else - if(!istype(C.wear_mask, /obj/item/clothing/mask)) - C << "You are not wearing a mask." + + var/no_mask + if(!(C.wear_mask && C.wear_mask.flags & AIRTIGHT)) + var/mob/living/carbon/human/H = C + if(!(H.head && H.head.flags & AIRTIGHT)) + C << "You are not wearing a mask." + no_mask = 1 + + if(no_mask) return 1 else var/list/nicename = null diff --git a/code/datums/spell.dm b/code/datums/spell.dm index 346ba7ce29..c7c12b097b 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -73,13 +73,13 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(!istype(usr, /mob/living/carbon/human)) usr << "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans." return 0 - if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/rig/wizard)) + if(!istype(usr:wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(user:wear_suit, /obj/item/clothing/suit/space/void/wizard)) usr << "I don't feel strong enough without my robe." return 0 if(!istype(usr:shoes, /obj/item/clothing/shoes/sandal)) usr << "I don't feel strong enough without my sandals." return 0 - if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/rig/wizard)) + if(!istype(usr:head, /obj/item/clothing/head/wizard) && !istype(user:head, /obj/item/clothing/head/helmet/space/void/wizard)) usr << "I don't feel strong enough without my hat." return 0 diff --git a/code/game/gamemodes/calamity/calamity.dm b/code/game/gamemodes/calamity/calamity.dm index 6ddd3d70a5..0d8b46b318 100644 --- a/code/game/gamemodes/calamity/calamity.dm +++ b/code/game/gamemodes/calamity/calamity.dm @@ -356,7 +356,6 @@ if(player.current && !(istype(player.current,/mob/living/carbon/human))) return 0 //Ninja intro crawl goes here. - if(!config.objectives_disabled) player.objectives += new /datum/objective/ninja_highlander() player.objectives += new /datum/objective/survive() @@ -369,9 +368,6 @@ var/mob/living/carbon/human/N = player.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() /datum/game_mode/calamity/proc/spawn_vox_raiders(var/list/candidates) diff --git a/code/game/gamemodes/events/ninja_abilities.dm b/code/game/gamemodes/events/ninja_abilities.dm deleted file mode 100644 index f80a056428..0000000000 --- a/code/game/gamemodes/events/ninja_abilities.dm +++ /dev/null @@ -1,404 +0,0 @@ -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++ -==================================SPACE NINJA ABILITIES==================================== -___________________________________________________________________________________________ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -//=======//SAFETY CHECK//=======// -/* -X is optional, tells the proc to check for specific stuff. C is also optional. -All the procs here assume that the character is wearing the ninja suit if they are using the procs. -They should, as I have made every effort for that to be the case. -In the case that they are not, I imagine the game will run-time error like crazy. -s_cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down. -*/ -/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0, X = 0) - var/mob/living/carbon/human/U = affecting - if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1. - U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die. - return 1 - else if(C&&cell.charge < C*10) - U << "\red Not enough energy." - return 1 - switch(X) - if(1) - cancel_stealth()//Get rid of it. - if(2) - if(s_bombs<=0) - U << "\red There are no more smoke bombs remaining." - return 1 - if(3) - if(a_boost<=0) - U << "\red You do not have any more adrenaline boosters." - return 1 - if(s_coold) - return s_coold - cell.use(C*10) - return 0 - -//=======//TELEPORT GRAB CHECK//=======// -/obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/U) - if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons. - var/obj/item/weapon/grab/G = U.get_active_hand() - G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position. - if(istype(U.get_inactive_hand(),/obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = U.get_inactive_hand() - G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position. - return - -//=======//SMOKE//=======// -/*Summons smoke in radius of user. -Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs.*/ -/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke() - set name = "Smoke Bomb" - set desc = "Blind your enemies momentarily with a well-placed smoke bomb." - set category = "Ninja Ability" - set popup_menu = 0//Will not see it when right clicking. - - if(!ninjacost(,2)) - var/mob/living/carbon/human/U = affecting - U << "\blue There are [s_bombs] smoke bombs remaining." - var/datum/effect/effect/system/smoke_spread/bad/smoke = new /datum/effect/effect/system/smoke_spread/bad() - smoke.set_up(10, 0, U.loc) - smoke.start() - playsound(U.loc, 'sound/effects/bamf.ogg', 50, 2) - s_bombs-- - s_coold = 1 - return - - -//=======//PHASE SHIFT//=======// -//Right click to teleport somewhere, almost exactly like admin jump to turf. -/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview()) - set name = "Phase Shift (400E)" - set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view." - set category = null//So it does not show up on the panel but can still be right-clicked. - set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide! - - var/C = 40 - if(!ninjacost(C,1)) - var/mob/living/carbon/human/U = affecting - var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below. - if((!T.density)&&istype(mobloc, /turf)) - spawn(0) - playsound(U.loc, 'sound/effects/sparks4.ogg', 50, 1) - anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,U.dir) - - handle_teleport_grab(T, U) - U.loc = T - s_coold = 1 - - spawn(0) - spark_system.start() - playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1) - playsound(U.loc, 'sound/effects/sparks2.ogg', 50, 1) - anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir) - else - U << "\red You cannot teleport into solid walls or from solid matter." - return - -//=======//PHASE JAUNT//=======// -/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt() - set name = "Phase Jaunt (250E)" - set desc = "Utilizes the internal VOID-shift device to rapidly transit to a random destination straight ahead." - set category = "Ninja Ability" - - straight_phase() - -//=======//EM PULSE//=======// -//Disables nearby tech equipment. -/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse() - set name = "EM Burst (2,000E)" - set desc = "Disable any nearby technology with a electro-magnetic pulse." - set category = "Ninja Ability" - set popup_menu = 0 - - var/C = 200 - if(!ninjacost(C,0)) // EMP's now cost 1,000Energy about 30% - var/mob/living/carbon/human/U = affecting - playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2) - empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch. - s_coold = 2 - return - -//=======//ENERGY BLADE//=======// -//Summons a blade of energy in active hand. -/obj/item/clothing/suit/space/space_ninja/proc/ninjablade() - set name = "Energy Blade (500E)" - set desc = "Create a focused beam of energy in your active hand." - set category = "Ninja Ability" - set popup_menu = 0 - - var/C = 50 - if(!ninjacost(C,0)) //Same spawn cost but higher upkeep cost - var/mob/living/carbon/human/U = affecting - if(!kamikaze) - if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade)) - var/obj/item/weapon/melee/energy/blade/W = new() - spark_system.start() - playsound(U.loc, "sparks", 50, 1) - U.put_in_hands(W) - else - U << "\red You can only summon one blade. Try dropping an item first." - else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains. - if(!U.get_active_hand()) - var/obj/item/weapon/melee/energy/blade/W = new() - U.put_in_hands(W) - if(!U.get_inactive_hand()) - var/obj/item/weapon/melee/energy/blade/W = new() - U.put_in_inactive_hand(W) - spark_system.start() - playsound(U.loc, "sparks", 50, 1) - s_coold = 1 - return - -//=======//NINJA STARS//=======// -/*Shoots ninja stars at random people. -This could be a lot better but I'm too tired atm.*/ -/obj/item/clothing/suit/space/space_ninja/proc/ninjastar() - set name = "Energy Star (800E)" - set desc = "Launches an energy star at a random living target." - set category = "Ninja Ability" - set popup_menu = 0 - - var/C = 80 - if(!ninjacost(C,1)) - var/mob/living/carbon/human/U = affecting - var/targets[] = list()//So yo can shoot while yo throw dawg - for(var/mob/living/M in oview(loc)) - if(M.stat) continue//Doesn't target corpses or paralyzed persons. - targets.Add(M) - if(targets.len) - var/mob/living/target=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at. - - var/turf/curloc = U.loc - var/atom/targloc = get_turf(target) - if (!targloc || !istype(targloc, /turf) || !curloc) - return - if (targloc == curloc) - return - var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(U.loc) - A.current = curloc - A.yo = targloc.y - curloc.y - A.xo = targloc.x - curloc.x - A.process() - else - U << "\red There are no targets in view." - return - -//=======//ENERGY NET//=======// -/*Allows the ninja to capture people, I guess. -Must right click on a mob to activate.*/ -/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs. - set name = "Energy Net (7,000E)" - set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds." - set category = null - set src = usr.contents - - var/C = 700 - if(!ninjacost(C,0)&&iscarbon(M)) - var/mob/living/carbon/human/U = affecting - if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. - //if(M)//DEBUG - if(!locate(/obj/effect/energy_net) in M.loc)//Check if they are already being affected by an energy net. - for(var/turf/T in getline(U.loc, M.loc)) - if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy. - U << "You may not use an energy net through solid obstacles!" - return - spawn(0) - U.Beam(M,"n_beam",,15) - M.captured = 1 - U.say("Get over here!") - var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc) - E.layer = M.layer+1//To have it appear one layer above the mob. - for(var/mob/O in viewers(U, 3)) - O.show_message(text("\red [] caught [] with an energy net!", U, M), 1) - E.affecting = M - E.master = U - spawn(0)//Parallel processing. - E.process(M) - else - U << "They are already trapped inside an energy net." - else - U << "They will bring no honor to your Clan!" - return - -//=======//ADRENALINE BOOST//=======// -/*Wakes the user so they are able to do their thing. Also injects a decent dose of radium. -Movement impairing would indicate drugs and the like.*/ -/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost() - set name = "Adrenaline Boost" - set desc = "Inject a secret chemical that will counteract all movement-impairing effect." - set category = "Ninja Ability" - set popup_menu = 0 - - if(!ninjacost(,3))//Have to make sure stat is not counted for this ability. - var/mob/living/carbon/human/U = affecting - //Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly. - //For now, adrenaline boosters ARE the miracle injection. Well, radium, really. - U.SetParalysis(0) - U.SetWeakened(0) - /* - Due to lag, it was possible to adrenaline boost but remain helpless while life.dm resets player stat. - This lead to me and others spamming adrenaline boosters because they failed to kick in on time. - It's technically possible to come back from crit with this but it is very temporary. - Life.dm will kick the player back into unconsciosness the next process loop. - */ - U.stat = 0//At least now you should be able to teleport away or shoot ninja stars. - spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up. - U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) - spawn(70) - reagents.reaction(U, 2) - reagents.trans_id_to(U, "radium", a_transfer) - U << "\red You are beginning to feel the after-effect of the injection." - a_boost-- - s_coold = 3 - return - -/* -=================================================================================== -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -=================================================================================== -Or otherwise known as anime mode. Which also happens to be ridiculously powerful. -*/ - -//=======//NINJA MOVEMENT//=======// -//Also makes you move like you're on crack. -/obj/item/clothing/suit/space/space_ninja/proc/ninjawalk() - set name = "Shadow Walk" - set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off." - set category = "Ninja Ability" - set popup_menu = 0 - - var/mob/living/carbon/human/U = affecting - if(!U.incorporeal_move) - U.incorporeal_move = 2 - U << "\blue You will now phase through solid matter." - else - U.incorporeal_move = 0 - U << "\blue You will no-longer phase through solid matter." - return - -//=======//5 TILE TELEPORT/GIB//=======// -//Allows to gib up to five squares in a straight line. Seriously. -/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer() - set name = "Phase Slayer" - set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line." - set category = "Ninja Ability" - set popup_menu = 0 - - if(straight_phase(1, 5, 5, 0)) - var/mob/living/carbon/human/U = affecting - U.say("Ai Satsugai!") - -//=======//TELEPORT BEHIND MOB//=======// -/*Appear behind a randomly chosen mob while a few decoy teleports appear. -This is so anime it hurts. But that's the point.*/ -/obj/item/clothing/suit/space/space_ninja/proc/ninjamirage() - set name = "Spider Mirage" - set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target." - set category = "Ninja Ability" - set popup_menu = 0 - - if(!ninjacost())//Simply checks for stat. - var/mob/living/carbon/human/U = affecting - var/targets[] - targets = new() - for(var/mob/living/M in oview(6)) - if(M.stat) continue//Doesn't target corpses or paralyzed people. - targets.Add(M) - if(targets.len) - var/mob/living/target=pick(targets) - var/locx - var/locy - var/turf/mobloc = get_turf(target.loc) - var/safety = 0 - switch(target.dir) - if(NORTH) - locx = mobloc.x - locy = (mobloc.y-1) - if(locy<1) - safety = 1 - if(SOUTH) - locx = mobloc.x - locy = (mobloc.y+1) - if(locy>world.maxy) - safety = 1 - if(EAST) - locy = mobloc.y - locx = (mobloc.x-1) - if(locx<1) - safety = 1 - if(WEST) - locy = mobloc.y - locx = (mobloc.x+1) - if(locx>world.maxx) - safety = 1 - else safety=1 - if(!safety&&istype(mobloc, /turf)) - U.say("Kumo no Shinkiro!") - var/turf/picked = locate(locx,locy,mobloc.z) - spawn(0) - playsound(U.loc, "sparks", 50, 1) - anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir) - - spawn(0) - var/limit = 4 - for(var/turf/T in oview(5)) - if(prob(20)) - spawn(0) - anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir) - limit-- - if(limit<=0) break - - handle_teleport_grab(picked, U) - U.loc = picked - U.dir = target.dir - - spawn(0) - spark_system.start() - playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1) - playsound(U.loc, "sparks", 50, 1) - anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir) - s_coold = 1 - else - U << "\red The VOID-shift device is malfunctioning, teleportation failed." - else - U << "\red There are no targets in view." - return - - -/obj/item/clothing/suit/space/space_ninja/proc/straight_phase(var/slay = 0, var/min_range=5, var/max_range = 9, var/cost = 25) - if(!ninjacost(cost,1)) - var/mob/living/carbon/human/U = affecting - var/turf/destination = get_teleport_loc(U.loc,U, rand(min_range, max_range)) - var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below. - if(destination && istype(mobloc, /turf)) - spawn(0) - playsound(U.loc, "sparks", 50, 1) - anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir) - - if(slay) - spawn(0) - for(var/turf/T in getline(mobloc, destination)) - spawn(0) - T.kill_creatures(U) - if(T==mobloc||T==destination) continue - spawn(0) - anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir) - - handle_teleport_grab(destination, U) - U.loc = destination - s_coold = slay - - spawn(0) - spark_system.start() - playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1) - playsound(U.loc, "sparks", 50, 1) - anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir) - return 1 - else - U << "\red The VOID-shift device is malfunctioning, teleportation failed." - return 0 diff --git a/code/game/gamemodes/events/ninja_equipment.dm b/code/game/gamemodes/events/ninja_equipment.dm deleted file mode 100644 index 99b127ec1b..0000000000 --- a/code/game/gamemodes/events/ninja_equipment.dm +++ /dev/null @@ -1,1484 +0,0 @@ -//For the love of god,space out your code! This is a nightmare to read. - -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++ -===================================SPACE NINJA EQUIPMENT=================================== -___________________________________________________________________________________________ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -/* -=================================================================================== -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -=================================================================================== -*/ - -//=======//NEW AND DEL//=======// - -/obj/item/clothing/suit/space/space_ninja/New() - ..() - verbs += /obj/item/clothing/suit/space/space_ninja/proc/init//suit initialize verb - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_instruction//for AIs - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_holo - //verbs += /obj/item/clothing/suit/space/space_ninja/proc/display_verb_procs//DEBUG. Doesn't work. - spark_system = new()//spark initialize - spark_system.set_up(5, 0, src) - spark_system.attach(src) - stored_research = new()//Stolen research initialize. - for(var/T in typesof(/datum/tech) - /datum/tech)//Store up on research. - stored_research += new T(src) - var/reagent_amount//reagent initialize - for(var/reagent_id in reagent_list) - reagent_amount += reagent_id == "radium" ? r_maxamount+(a_boost*a_transfer) : r_maxamount//AI can inject radium directly. - reagents = new(reagent_amount) - reagents.my_atom = src - for(var/reagent_id in reagent_list) - reagent_id == "radium" ? reagents.add_reagent(reagent_id, r_maxamount+(a_boost*a_transfer)) : reagents.add_reagent(reagent_id, r_maxamount)//It will take into account radium used for adrenaline boosting. - cell = new/obj/item/weapon/cell/high//The suit should *always* have a battery because so many things rely on it. - cell.charge = 9000//Starting charge should not be higher than maximum charge. It leads to problems with recharging. - -/obj/item/clothing/suit/space/space_ninja/Del() - if(affecting)//To make sure the window is closed. - affecting << browse(null, "window=hack spideros") - if(AI)//If there are AIs present when the ninja kicks the bucket. - killai() - if(hologram)//If there is a hologram - del(hologram.i_attached)//Delete it and the attached image. - del(hologram) - ..() - return - -//Simply deletes all the attachments and self, killing all related procs. -/obj/item/clothing/suit/space/space_ninja/proc/terminate() - del(n_hood) - del(n_gloves) - del(n_shoes) - del(src) - -/obj/item/clothing/suit/space/space_ninja/proc/killai(mob/living/silicon/ai/A = AI) - if(A.client) - A << "\red Self-erase protocol dete-- *bzzzzz*" - A << browse(null, "window=hack spideros") - AI = null - A.death(1)//Kill, deleting mob. - del(A) - return - -//=======//SUIT VERBS//=======// -//Verbs link to procs because verb-like procs have a bug which prevents their use if the arguments are not readily referenced. - -/obj/item/clothing/suit/space/space_ninja/proc/init() - set name = "Initialize Suit" - set desc = "Initializes the suit for field operation." - set category = "Ninja Equip" - - ninitialize() - return - -/obj/item/clothing/suit/space/space_ninja/proc/deinit() - set name = "De-Initialize Suit" - set desc = "Begins procedure to remove the suit." - set category = "Ninja Equip" - - if(s_control&&!s_busy) - deinitialize() - else - affecting << "\red The function did not trigger!" - return - -/obj/item/clothing/suit/space/space_ninja/proc/spideros() - set name = "Display SpiderOS" - set desc = "Utilize built-in computer system." - set category = "Ninja Equip" - - if(s_control&&!s_busy&&!kamikaze) - display_spideros() - else - affecting << "\red The interface is locked!" - return - -/obj/item/clothing/suit/space/space_ninja/proc/stealth() - set name = "Toggle Stealth" - set desc = "Utilize the internal CLOAK-tech device to activate or deactivate stealth-camo." - set category = "Ninja Equip" - - if(s_control&&!s_busy) - toggle_stealth() - else - affecting << "\red Stealth does not appear to work!" - return - -//=======//PROCESS PROCS//=======// - -/obj/item/clothing/suit/space/space_ninja/proc/ntick(mob/living/carbon/human/U = affecting) - set background = 1 - - //Runs in the background while the suit is initialized. - spawn while(cell.charge>=0) - - //Let's check for some safeties. - if(s_initialized&&!affecting) terminate()//Kills the suit and attached objects. - if(!s_initialized) return//When turned off the proc stops. - if(AI&&AI.stat==2)//If there is an AI and it's ded. Shouldn't happen without purging, could happen. - if(!s_control) - ai_return_control()//Return control to ninja if the AI was previously in control. - killai()//Delete AI. - - //Now let's do the normal processing. - if(s_coold) s_coold--//Checks for ability s_cooldown first. - var/A = s_cost//s_cost is the default energy cost each ntick, usually 5. - if(!kamikaze) - if(blade_check(U))//If there is a blade held in hand. - A += s_acost - if(s_active)//If stealth is active. - A += s_acost - else - if(prob(s_delay))//Suit delay is used as probability. May change later. - U.adjustBruteLoss(k_damage)//Default damage done, usually 1. - A = k_cost//kamikaze cost. - cell.charge-=A - if(cell.charge<=0) - if(kamikaze) - U.say("I DIE TO LIVE AGAIN!") - U << browse(null, "window=spideros")//Just in case. - U.death() - return - cell.charge=0 - cancel_stealth() - sleep(10)//Checks every second. - -//=======//INITIALIZE//=======// - -/obj/item/clothing/suit/space/space_ninja/proc/ninitialize(delay = s_delay, mob/living/carbon/human/U = loc) - if(U.mind && U.mind.assigned_role=="MODE" && !s_initialized && !s_busy)//Shouldn't be busy... but anything is possible I guess. - s_busy = 1 - for(var/i,i<7,i++) - switch(i) - if(0) - U << "\blue Now initializing..." - if(1) - if(!lock_suit(U))//To lock the suit onto wearer. - break - U << "\blue Securing external locking mechanism...\nNeural-net established." - if(2) - U << "\blue Extending neural-net interface...\nNow monitoring brain wave pattern..." - if(3) - if(U.stat==2||U.health<=0) - U << "\red FĆAL �Rr�R: 344--93#�&&21 BR��N |/|/aV� PATT$RN RED\nA-A-aB�rT�NG..." - unlock_suit() - break - lock_suit(U,1)//Check for icons. - U.regenerate_icons() - U << "\blue Linking neural-net interface...\nPattern \green GREEN\blue, continuing operation." - if(4) - U << "\blue VOID-shift device status: ONLINE.\nCLOAK-tech device status: ONLINE." - if(5) - U << "\blue Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [cell.charge]." - if(6) - U << "\blue All systems operational. Welcome to SpiderOS, [U.real_name]." - grant_ninja_verbs() - grant_equip_verbs() - ntick() - sleep(delay) - s_busy = 0 - else - if(!U.mind||U.mind.assigned_role!="MODE")//Your run of the mill persons shouldn't know what it is. Or how to turn it on. - U << "You do not understand how this suit functions. Where the heck did it even come from?" - else if(s_initialized) - U << "\red The suit is already functioning. \black Please report this bug." - else - U << "\red ERROR: \black You cannot use this function at this time." - return - -//=======//DEINITIALIZE//=======// - -/obj/item/clothing/suit/space/space_ninja/proc/deinitialize(delay = s_delay) - if(affecting==loc&&!s_busy) - var/mob/living/carbon/human/U = affecting - if(!s_initialized) - U << "\red The suit is not initialized. \black Please report this bug." - return - if(alert("Are you certain you wish to remove the suit? This will take time and remove all abilities.",,"Yes","No")=="No") - return - if(s_busy||flush) - U << "\red ERROR: \black You cannot use this function at this time." - return - s_busy = 1 - for(var/i = 0,i<7,i++) - switch(i) - if(0) - U << "\blue Now de-initializing..." - remove_kamikaze(U)//Shutdowns kamikaze. - spideros = 0//Spideros resets. - if(1) - U << "\blue Logging off, [U:real_name]. Shutting down SpiderOS." - remove_ninja_verbs() - if(2) - U << "\blue Primary system status: OFFLINE.\nBackup system status: OFFLINE." - if(3) - U << "\blue VOID-shift device status: OFFLINE.\nCLOAK-tech device status: OFFLINE." - cancel_stealth()//Shutdowns stealth. - if(4) - U << "\blue Disconnecting neural-net interface...\greenSuccess\blue." - if(5) - U << "\blue Disengaging neural-net interface...\greenSuccess\blue." - if(6) - U << "\blue Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED." - blade_check(U,2) - remove_equip_verbs() - unlock_suit() - U.regenerate_icons() - sleep(delay) - s_busy = 0 - return - -//=======//SPIDEROS PROC//=======// - -/obj/item/clothing/suit/space/space_ninja/proc/display_spideros() - if(!affecting) return//If no mob is wearing the suit. I almost forgot about this variable. - var/mob/living/carbon/human/U = affecting - 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" - dat += " Refresh" - if(spideros) - dat += " | Return" - dat += " | Close" - dat += "
" - if(s_control) - dat += "

SpiderOS v.1.337

" - dat += "Welcome, [U.real_name].
" - else - dat += "

SpiderOS v.ERR-RR00123

" - dat += "
" - dat += " Current Time: [worldtime2text()]
" - dat += " Battery Life: [round(cell.charge/100)]%
" - dat += " Smoke Bombs: \Roman [s_bombs]
" - dat += " pai Device: " - if(pai) - dat += "Configure" - dat += " | " - dat += "Eject" - else - dat += "None Detected" - dat += "

" - - switch(spideros) - if(0) - dat += "

Available Functions:

" - dat += "" - if(3) - dat += "

Medical Report:

" - if(U.dna) - dat += "Fingerprints: [md5(U.dna.uni_identity)]
" - dat += "Unique identity: [U.dna.unique_enzymes]
" - dat += "

Overall Status: [U.stat > 1 ? "dead" : "[U.health]% healthy"]

" - dat += "

Nutrition Status: [U.nutrition]

" - dat += "Oxygen loss: [U.getOxyLoss()]" - dat += " | Toxin levels: [U.getToxLoss()]
" - dat += "Burn severity: [U.getFireLoss()]" - dat += " | Brute trauma: [U.getBruteLoss()]
" - dat += "Radiation Level: [U.radiation] rad
" - dat += "Body Temperature: [U.bodytemperature-T0C]°C ([U.bodytemperature*1.8-459.67]°F)
" - - for(var/datum/disease/D in U.viruses) - dat += "Warning: Virus Detected. Name: [D.name].Type: [D.spread]. Stage: [D.stage]/[D.max_stages]. Possible Cure: [D.cure].
" - dat += "" - if(1) - dat += "

Atmospheric Scan:

"//Headers don't need breaks. They are automatically placed. - var/turf/T = get_turf_or_move(U.loc) - if (isnull(T)) - dat += "Unable to obtain a reading." - else - var/datum/gas_mixture/environment = T.return_air() - - var/pressure = environment.return_pressure() - var/total_moles = environment.total_moles - - dat += "Air Pressure: [round(pressure,0.1)] kPa" - - if (total_moles) - dat += "" - - dat += "Temperature: [round(environment.temperature-T0C)]°C" - if(2) - if(k_unlock==7||!s_control) - dat += " Hidden Menu" - dat += "

Anonymous Messenger:

"//Anonymous because the receiver will not know the sender's identity. - dat += "

Detected PDAs:

" - dat += "" - if (count == 0) - dat += "None detected.
" - if(32) - dat += "

Hidden Menu:

" - if(s_control) - dat += "Please input password: " - dat += "HERE
" - dat += "
" - dat += "Remember, you will not be able to recharge energy during this function. If energy runs out, the suit will auto self-destruct.
" - dat += "Use with caution. De-initialize the suit when energy is low." - else - //Only leaving this in for funnays. CAN'T LET YOU DO THAT STAR FOX - dat += "WARNING: Hostile runtime intrusion detected: operation locked. The Spider Clan is watching you, INTRUDER." - dat += "ERROR: TARANTULA.v.4.77.12 encryption algorithm detected. Unable to decrypt archive.
" - if(4) - dat += {" -

Ninja Manual:

-
Who they are:
- Space ninjas are a special type of ninja, specifically one of the space-faring type. The vast majority of space ninjas belong to the Spider Clan, a cult-like sect, which has existed for several hundred years. The Spider Clan practice a sort of augmentation of human flesh in order to achieve a more perfect state of being and follow Postmodern Space Bushido. They also kill people for money. Their leaders are chosen from the oldest of the grand-masters, people that have lived a lot longer than any mortal man should.
Being a sect of technology-loving fanatics, the Spider Clan have the very best to choose from in terms of hardware--cybernetic implants, exoskeleton rigs, hyper-capacity batteries, and you get the idea. Some believe that much of the Spider Clan equipment is based on reverse-engineered alien technology while others doubt such claims.
Whatever the case, their technology is absolutely superb. -
How they relate to other SS13 organizations:
- -
The reason they (you) are here:
- Space ninjas are renowned throughout the known controlled space as fearless spies, infiltrators, and assassins. They are sent on missions of varying nature by Nanotrasen, the Syndicate, and other shady organizations and people. To hire a space ninja means serious business. -
Their playstyle:
- A mix of traitor, changeling, and wizard. Ninjas rely on energy, or electricity to be precise, to keep their suits running (when out of energy, a suit hibernates). Suits gain energy from objects or creatures that contain electrical charge. APCs, cell batteries, rechargers, SMES batteries, cyborgs, mechs, and exposed wires are currently supported. Through energy ninjas gain access to special powers--while all powers are tied to the ninja suit, the most useful of them are verb activated--to help them in their mission.
It is a constant struggle for a ninja to remain hidden long enough to recharge the suit and accomplish their objective; despite their arsenal of abilities, ninjas can die like any other. Unlike wizards, ninjas do not possess good crowd control and are typically forced to play more subdued in order to achieve their goals. Some of their abilities are specifically designed to confuse and disorient others.
With that said, it should be perfectly possible to completely flip the fuck out and rampage as a ninja. -
Their powers:
- There are two primary types: Equipment and Abilties. Passive effect are always on. Active effect must be turned on and remain active only when there is energy to do so. Ability costs are listed next to them. - Equipment: cannot be tracked by AI (passive), faster speed (passive), stealth (active), vision switch (passive if toggled), voice masking (passive), SpiderOS (passive if toggled), energy drain (passive if toggled). - - Abilities: -