diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 730462ddfff..23d485f84a2 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -426,21 +426,30 @@ datum/objective/download/proc/gen_amount_goal() explanation_text = "Download [target_amount] research level\s." return target_amount -datum/objective/download/check_completion() +datum/objective/download/check_completion()//NINJACODE if(!ishuman(owner.current)) return 0 - if(!owner.current || owner.current.stat == 2) + + var/mob/living/carbon/human/H = owner.current + if(!H || H.stat == DEAD) return 0 - if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit:s_initialized)) + + if(!istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja)) return 0 + + var/obj/item/clothing/suit/space/space_ninja/SN = H.wear_suit + if(!SN.s_initialized) + return 0 + var/current_amount - var/obj/item/clothing/suit/space/space_ninja/S = owner.current:wear_suit - if(!S.stored_research.len) + if(!SN.stored_research.len) return 0 else - for(var/datum/tech/current_data in S.stored_research) - if(current_data.level>1) current_amount+=(current_data.level-1) - if(current_amountCamera bugged." src.bug = W src.bug.bugged_cameras[src.c_tag] = src - else if(istype(W, /obj/item/weapon/melee/energy/blade))//Putting it here last since it's a special case. I wonder if there is a better way to do these than type casting. - deactivate(user,2)//Here so that you can disconnect anyone viewing the camera, regardless if it's on or off. - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, loc) - spark_system.start() - playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(loc, "sparks", 50, 1) - visible_message("[user] has sliced the camera apart with an energy blade!") - qdel(src) else if(istype(W, /obj/item/device/laser_pointer)) var/obj/item/device/laser_pointer/L = W L.laser_act(src, user) diff --git a/code/game/machinery/camera/tracking.dm b/code/game/machinery/camera/tracking.dm index d672301e750..3e0dac86a35 100644 --- a/code/game/machinery/camera/tracking.dm +++ b/code/game/machinery/camera/tracking.dm @@ -73,8 +73,11 @@ //Cameras can't track people wearing an agent card or a ninja hood. if(H.wear_id && istype(H.wear_id.GetID(), /obj/item/weapon/card/id/syndicate)) continue - if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP)) - continue + //Generic variable who's existance is to blame on shitty old ninja code + if(istype(H.head, /obj/item/clothing/head)) + var/obj/item/clothing/head/hat = H.head + if(hat.blockTracking) + continue // Now, are they viewable by a camera? (This is last because it's the most intensive check) if(!near_camera(M)) @@ -127,10 +130,12 @@ U << "Follow camera mode terminated." U.cameraFollow = null return - if(istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP)) - U << "Follow camera mode terminated." - U.cameraFollow = null - return + if(istype(H.head, /obj/item/clothing/head)) + var/obj/item/clothing/head/hat = H.head + if(hat.blockTracking) + U << "Follow camera mode terminated." + U.cameraFollow = null + return if(H.digitalcamo) U << "Follow camera mode terminated." U.cameraFollow = null diff --git a/code/game/machinery/doors/unpowered.dm b/code/game/machinery/doors/unpowered.dm index c0da7ec0dba..df94284c2c5 100644 --- a/code/game/machinery/doors/unpowered.dm +++ b/code/game/machinery/doors/unpowered.dm @@ -9,7 +9,6 @@ /obj/machinery/door/unpowered/attackby(obj/item/I as obj, mob/user as mob, params) - if(istype(I, /obj/item/weapon/melee/energy/blade)) return if(src.locked) return ..() return diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index d9a02cecbfa..88c3cad51e1 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -262,22 +262,6 @@ add_fingerprint(user) - //ninja sword garbage - if (src.density && istype(I, /obj/item/weapon/melee/energy/blade)) - src.operating = -1 - flick("[src.base_state]spark", src) - sleep(6) - desc += "
Its access panel is smoking slightly." - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() - playsound(src.loc, "sparks", 50, 1) - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - visible_message(" The glass door was sliced open by [user]!") - open(2) - emagged = 1 - return 1 - if(istype(I, /obj/item/weapon/screwdriver)) if(src.density || src.operating) user << "You need to open the door to access the maintenance panel." diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index a8cbcbcb282..9b7d8f19952 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -35,18 +35,6 @@ else user << "Access Denied." return - else if(istype(W, /obj/item/weapon/melee/energy/blade) && !src.broken) - broken = 1 - locked = 0 - desc = "It appears to be broken." - icon_state = src.icon_broken - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(src.loc, "sparks", 50, 1) - visible_message("[user] has sliced open \the [src] with an energy blade!", "You hear metal being sliced and sparks flying.") - return if(!locked) ..() else diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index f39e702b365..a92d674a6e9 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -33,21 +33,6 @@ /obj/item/weapon/storage/secure/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(locked) - if (istype(W, /obj/item/weapon/melee/energy/blade) && !emagged) - emagged = 1 - src.overlays += image('icons/obj/storage.dmi', icon_sparking) - sleep(6) - src.overlays = null - overlays += image('icons/obj/storage.dmi', icon_locking) - locked = 0 - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(src.loc, "sparks", 50, 1) - user << "You slice through the lock on [src]." - return - if (istype(W, /obj/item/weapon/screwdriver)) if (do_after(user, 20)) src.open =! src.open diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index c117504b4ea..4c9095fb4df 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -65,18 +65,6 @@ if(!src.opened && src.broken) user << "The locker appears to be broken." return - else if(istype(W, /obj/item/weapon/melee/energy/blade) && !broken) - broken = 1 - locked = 0 - desc = "It appears to be broken." - icon_state = icon_off - flick(icon_broken, src) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, src.loc) - spark_system.start() - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(src.loc, "sparks", 50, 1) - visible_message("[user] has sliced the locker open with an energy blade!", "You hear metal being sliced and sparks flying.") else ..(W, user) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index f6aa7b779b2..f64395b7f24 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -307,17 +307,6 @@ overlays += redlight add_fingerprint(user) return - else if (istype(W, /obj/item/weapon/melee/energy/blade) && locked && !broken) - overlays.Cut() - overlays += emag - overlays += sparks - spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface* - playsound(src.loc, "sparks", 60, 1) - src.locked = 0 - src.broken = 1 - user << "You unlock \the [src]." - add_fingerprint(user) - return return ..() diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 08123b5fec1..ee5684c24c6 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -118,7 +118,7 @@ else user << "You can't reach, close it first!" - if(istype(W, /obj/item/weapon/pickaxe/plasmacutter) || istype(W, /obj/item/weapon/melee/energy/blade)) + if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) dismantle(user) if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 196ce0cbb0b..da22c57e321 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -314,16 +314,6 @@ if(isrobot(user)) return - if(istype(I, /obj/item/weapon/melee/energy/blade)) - var/datum/effect/effect/system/spark_spread/SS = new /datum/effect/effect/system/spark_spread() - SS.set_up(5, 0, src.loc) - SS.start() - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - playsound(src.loc, "sparks", 50, 1) - user.visible_message("The [src.name] was sliced apart by [user]!") - table_destroy(1) - return - if(!(I.flags & ABSTRACT)) //rip more parems rip in peace ;_; if(user.drop_item()) I.Move(loc) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index bd54b2067b9..2c88719d4b9 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -136,13 +136,6 @@ if( thermite ) if(is_hot(W)) thermitemelt(user) - - if( istype(W, /obj/item/weapon/melee/energy/blade) ) - var/obj/item/weapon/melee/energy/blade/EB = W - EB.spark_system.start() - user << "You slash \the [src] with \the [EB]; the thermite ignites!" - playsound(src, "sparks", 50, 1) - playsound(src, 'sound/weapons/blade1.ogg', 50, 1) return var/turf/T = user.loc //get user's location for delay checks @@ -225,21 +218,6 @@ dismantle_wall() visible_message("[user] smashes through the [name] with the [W.name]!", "You hear the grinding of metal.") return 1 - else if( istype(W, /obj/item/weapon/melee/energy/blade) ) - var/obj/item/weapon/melee/energy/blade/EB = W - EB.spark_system.start() - user << "You stab \the [EB] into the wall and begin to slice it apart." - playsound(src, "sparks", 50, 1) - if(do_after(user, slicing_duration*0.7)) //energy blade slicing is faster than welding tool slicing - if( !istype(src, /turf/simulated/wall) || !user || !EB || !T ) - return 1 - if( user.loc == T && user.get_active_hand() == W ) - EB.spark_system.start() - playsound(src, "sparks", 50, 1) - playsound(src, 'sound/weapons/blade1.ogg', 50, 1) - dismantle_wall(1) - visible_message("The wall was sliced apart by [user]!", "You hear metal being sliced apart and sparks flying.") - return 1 return 0 diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index c66d1061e50..b7e71d69e0b 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -29,10 +29,7 @@ M << "This wall is far too strong for you to destroy." /turf/simulated/wall/r_wall/try_destroy(obj/item/weapon/W as obj, mob/user as mob, turf/T as turf) - if(istype(W, /obj/item/weapon/melee/energy/blade)) - user << "This wall is too thick to slice through. You will need to find a different path." - return 1 - else if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) + if(istype(W, /obj/item/weapon/pickaxe/drill/jackhammer)) var/obj/item/weapon/pickaxe/drill/jackhammer/D = W if(!D.bcell.use(800)) user << "Your [D.name] doesn't have enough power to break through the [name]." diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index e2f23e70f0b..70ec86b079b 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -193,7 +193,7 @@ src.cancable = 1//so cables can be laid new /obj/structure/lattice/catwalk(locate(src.x, src.y, src.z) ) -/turf/proc/phase_damage_creatures(damage,mob/U = null)//>Ninja Code. Hurts and knocks out creatures on this turf +/turf/proc/phase_damage_creatures(damage,mob/U = null)//>Ninja Code. Hurts and knocks out creatures on this turf //NINJACODE for(var/mob/living/M in src) if(M==U) continue//Will not harm U. Since null != M, can be excluded to kill everyone. diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index d3275f9cf76..64e70411bff 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -327,7 +327,7 @@ Traitors and the like can also be revived with the previous role mostly intact. new_character.loc = get_turf(synd_spawn) call(/datum/game_mode/proc/equip_syndicate)(new_character) if("Space Ninja") - var/ninja_spawn[] = list() + var/list/ninja_spawn = list() for(var/obj/effect/landmark/L in landmarks_list) if(L.name=="carpspawn") ninja_spawn += L diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index c84fd4b7916..8f80cee31da 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -76,6 +76,7 @@ BLIND // can't see anything icon = 'icons/obj/clothing/hats.dmi' body_parts_covered = HEAD slot_flags = SLOT_HEAD + var/blockTracking = 0 //For AI tracking //Mask /obj/item/clothing/mask diff --git a/code/modules/clothing/gloves/ninja.dm b/code/modules/clothing/gloves/ninja.dm deleted file mode 100644 index 0b05f32fb8d..00000000000 --- a/code/modules/clothing/gloves/ninja.dm +++ /dev/null @@ -1,104 +0,0 @@ -/* - Dear ninja gloves - - This isn't because I like you - this is because your father is a bastard - - ... - I guess you're a little cool. - -Sayu -*/ - -/obj/item/clothing/gloves/space_ninja - desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance." - name = "ninja gloves" - icon_state = "s-ninja" - item_state = "s-ninja" - siemens_coefficient = 0 - cold_protection = HANDS - min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT - heat_protection = HANDS - max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT - strip_delay = 120 - var/draining = 0 - var/candrain = 0 - var/mindrain = 200 - var/maxdrain = 400 - -/* - This runs the gamut of what ninja gloves can do - The other option would be a dedicated ninja touch bullshit proc on everything - which would probably more efficient, but ninjas are pretty rare. - This was mostly introduced to keep ninja code from contaminating other code; - with this in place it would be easier to untangle the rest of it. - - For the drain proc, see events/ninja.dm -*/ -/obj/item/clothing/gloves/space_ninja/Touch(var/atom/A,var/proximity) - if(!candrain || draining) return 0 - - var/mob/living/carbon/human/H = loc - if(!istype(H)) return 0 // what - var/obj/item/clothing/suit/space/space_ninja/suit = H.wear_suit - if(!istype(suit)) return 0 - if(isturf(A)) return 0 - - if(!proximity) // todo: you could add ninja stars or computer hacking here - return 0 - - A.add_fingerprint(H) - - // steal energy from powered things - if(istype(A,/mob/living/silicon/robot)) - drain("CYBORG",A,suit) - return 1 - - if(istype(A,/obj/machinery/power/apc)) - drain("APC",A,suit) - return 1 - - if(istype(A,/obj/structure/cable)) - drain("WIRE",A,suit) - return 1 - - if(istype(A,/obj/structure/grille)) - var/obj/structure/cable/C = locate() in A.loc - if(C) - drain("WIRE",C,suit) - return 1 - - if(istype(A,/obj/machinery/power/smes)) - drain("SMES",A,suit) - return 1 - - if(istype(A,/obj/mecha)) - drain("MECHA",A,suit) - return 1 - - if(istype(A,/obj/machinery/computer/rdconsole)) // download research - drain("RESEARCH",A,suit) - return 1 - - if(istype(A,/obj/machinery/r_n_d/server)) - A.add_fingerprint(H) - var/obj/machinery/r_n_d/server/S = A - if(S.disabled) - return 1 - if(S.shocked) - S.shock(H,50) - return 1 - drain("RESEARCH",A,suit) - return 1 - - //do AI transfers - if(istype(A,/mob/living/silicon/ai)) - suit.NAI.transfer_ai("AICORE", "AICARD", A, H) - return 1 - - if(istype(A,/obj/structure/AIcore/deactivated)) - suit.NAI.transfer_ai("INACTIVE","AICARD",A, H) - return 1 - - if(istype(A,/obj/machinery/computer/aifixer)) - suit.NAI.transfer_ai("AIFIXER","AICARD",A, H) - return 1 diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 2366d9f3877..c38e52f1736 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -219,35 +219,6 @@ vchange = !vchange user << "The voice changer is now [vchange ? "on" : "off"]!" -/obj/item/clothing/mask/gas/voice/space_ninja - name = "ninja mask" - desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement." - icon_state = "s-ninja" - item_state = "s-ninja_mask" - vchange = 1 - strip_delay = 120 - -/obj/item/clothing/mask/gas/voice/space_ninja/speechModification(message) - if(voice == "Unknown") - if(copytext(message, 1, 2) != "*") - var/list/temp_message = text2list(message, " ") - var/list/pick_list = list() - for(var/i = 1, i <= temp_message.len, i++) - pick_list += i - for(var/i=1, i <= abs(temp_message.len/3), i++) - var/H = pick(pick_list) - if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue - temp_message[H] = ninjaspeak(temp_message[H]) - pick_list -= H - message = list2text(temp_message, " ") - message = replacetext(message, "o", "?") - message = replacetext(message, "p", "?") - message = replacetext(message, "l", "?") - message = replacetext(message, "s", "?") - message = replacetext(message, "u", "?") - message = replacetext(message, "b", "?") - return message - /obj/item/clothing/mask/gas/clown_hat name = "clown wig and mask" diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index a1f83e984d2..cd9c96ae388 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -29,20 +29,6 @@ flags = NOSLIP armor = list(melee = 80, bullet = 60, laser = 50, energy = 50, bomb = 50, bio = 30, rad = 30) -/obj/item/clothing/shoes/space_ninja - name = "ninja shoes" - desc = "A pair of running shoes. Excellent for running and even better for smashing skulls." - icon_state = "s-ninja" - item_state = "secshoes" - permeability_coefficient = 0.01 - flags = NOSLIP - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) - strip_delay = 120 - cold_protection = FEET - min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT - heat_protection = FEET - max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT - /obj/item/clothing/shoes/sandal desc = "A pair of rather plain, wooden sandals." name = "sandals" diff --git a/code/modules/clothing/spacesuits/ninja.dm b/code/modules/clothing/spacesuits/ninja.dm deleted file mode 100644 index 9c6c98d6396..00000000000 --- a/code/modules/clothing/spacesuits/ninja.dm +++ /dev/null @@ -1,65 +0,0 @@ -/obj/item/clothing/head/helmet/space/space_ninja - desc = "What may appear to be a simple black garment is in fact a highly sophisticated nano-weave helmet. Standard issue ninja gear." - name = "ninja hood" - icon_state = "s-ninja" - item_state = "s-ninja_mask" - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 25) - strip_delay = 12 - unacidable = 1 - - -/obj/item/clothing/suit/space/space_ninja - name = "ninja suit" - desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins." - icon_state = "s-ninja" - item_state = "s-ninja_suit" - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals,/obj/item/weapon/stock_parts/cell) - slowdown = 0 - unacidable = 1 - armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) - strip_delay = 12 - - //Important parts of the suit. - var/mob/living/carbon/affecting = null//The wearer. - var/obj/item/weapon/stock_parts/cell/cell//Starts out with a high-capacity cell using New(). - var/datum/effect/effect/system/spark_spread/spark_system//To create sparks. - var/reagent_list[] = list("omnizine","salbutamol","spaceacillin","charcoal","nutriment","radium","potass_iodide")//The reagents ids which are added to the suit at New(). - var/stored_research[]//For stealing station research. - var/obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk. - - //Other articles of ninja gear worn together, used to easily reference them after initializing. - 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 - - //Main function variables. - var/s_initialized = 0//Suit starts off. - var/s_coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick(). - var/s_cost = 5.0//Base energy cost each ntick. - var/s_acost = 25.0//Additional cost for additional powers active. - var/k_cost = 200.0//Kamikaze energy cost each ntick. - var/k_damage = 1.0//Brute damage potentially done by Kamikaze each ntick. - var/s_delay = 40.0//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability. - var/a_transfer = 20.0//How much reagent is transferred when injecting. - var/r_maxamount = 80.0//How much reagent in total there is. - - //Support function variables. - var/spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works. - var/s_active = 0//Stealth off. - var/s_busy = 0//Is the suit busy with a process? Like AI hacking. Used for safety functions. - var/kamikaze = 0//Kamikaze on or off. - var/k_unlock = 0//To unlock Kamikaze. - - //Ability function variables. - var/s_bombs = 10.0//Number of starting ninja smoke bombs. - var/a_boost = 3.0//Number of adrenaline boosters. - - //Onboard AI related variables. - - var/obj/item/device/aicard/NAI //Integrated intellicard. - - var/obj/item/device/paicard/pai//A slot for a pAI device - - var/obj/effect/overlay/hologram//Is the AI hologram on or off? Visible only to the wearer of the suit. This works by attaching an image to a blank overlay. - - var/s_control = 1//If user in control of the suit. diff --git a/code/modules/events/ninja.dm b/code/modules/events/ninja.dm deleted file mode 100644 index fba9d8a692c..00000000000 --- a/code/modules/events/ninja.dm +++ /dev/null @@ -1,2436 +0,0 @@ -//Note to future generations: I didn't write this god-awful code I just ported it to the event system and tried to make it less moon-speaky. -//Don't judge me D; ~Carn - -/datum/round_event_control/ninja - name = "Space Ninja" - typepath = /datum/round_event/ninja - max_occurrences = 1 - earliest_start = 30000 // 1 hour - -/datum/round_event/ninja - var/success_spawn = 0 - - var/helping_station - var/key - var/spawn_loc - var/mission - - var/mob/living/carbon/human/Ninja - -/datum/round_event/ninja/setup() - helping_station = rand(0,1) - -/datum/round_event/ninja/kill() - if(!success_spawn && control) - control.occurrences-- - return ..() - -/datum/round_event/ninja/start() - //selecting a spawn_loc - if(!spawn_loc) - var/list/spawn_locs = list() - for(var/obj/effect/landmark/L in landmarks_list) - if(isturf(L.loc)) - switch(L.name) - if("ninjaspawn","carpspawn") - spawn_locs += L.loc - if(!spawn_locs.len) - return kill() - spawn_loc = pick(spawn_locs) - if(!spawn_loc) - return kill() - - //selecting a candidate player - if(!key) - var/list/candidates = get_candidates(BE_NINJA) - if(!candidates.len) - return kill() - var/client/C = pick(candidates) - key = C.key - if(!key) - return kill() - - //We prepare the mind before we spawn the ninja mob, so we cannot simply do mob.key = key then modify the mind. - //instead we make the mind and modify it, then make sure it is active and mind.transfer_to(mob) - //alternatively we could do mob.mind = mind;mob.key=key - var/datum/mind/Mind = create_ninja_mind(key) - Mind.active = 1 - - //generate objectives - You'll generally get 6 objectives (Ninja is meant to be hardmode!) - if(mission) - var/datum/objective/O = new /datum/objective(mission) - O.owner = Mind - Mind.objectives += O - else - if(helping_station) //DS are the highest priority (if we're a helpful ninja) - for(var/datum/mind/M in ticker.minds) - if(M.current && M.current.stat != DEAD) - if(M.special_role == "Death Commando") - var/datum/objective/assassinate/O = new /datum/objective/assassinate() - O.owner = Mind - O.target = M - O.explanation_text = "Slay \the [M.current.real_name], the Death Commando." - Mind.objectives += O - - else //Xenos are the highest priority (if we're not so helpful) Although this makes zero sense at all... - for(var/mob/living/carbon/alien/humanoid/queen/Q in player_list) - if(Q.mind && Q.stat != DEAD) - var/datum/objective/assassinate/O = new /datum/objective/assassinate() - O.owner = Mind - O.target = Q.mind - O.explanation_text = "Slay \the [Q.real_name]." - Mind.objectives += O - - if(Mind.objectives.len < 4) //not enough objectives still! - var/list/possible_targets = list() - for(var/datum/mind/M in ticker.minds) - if(M.current && M.current.stat != DEAD) - if(istype(M.current,/mob/living/carbon/human)) - if(M.special_role) - possible_targets[M] = 0 //bad-guy - else if(M.assigned_role in command_positions) - possible_targets[M] = 1 //good-guy - - var/list/objectives = list(1,2,3,4) - while(Mind.objectives.len < 4) //still not enough objectives! - switch(pick_n_take(objectives)) - if(1) //research - var/datum/objective/download/O = new /datum/objective/download() - O.owner = Mind - O.gen_amount_goal() - Mind.objectives += O - - if(2) //steal - var/datum/objective/steal/special/O = new /datum/objective/steal/special() - O.owner = Mind - Mind.objectives += O - - if(3) //protect/kill - if(!possible_targets.len) continue - var/selected = rand(1,possible_targets.len) - var/datum/mind/M = possible_targets[selected] - var/is_bad_guy = possible_targets[M] - possible_targets.Cut(selected,selected+1) - - if(is_bad_guy ^ helping_station) //kill (good-ninja + bad-guy or bad-ninja + good-guy) - var/datum/objective/assassinate/O = new /datum/objective/assassinate() - O.owner = Mind - O.target = M - O.explanation_text = "Slay \the [M.current.real_name], the [M.assigned_role]." - Mind.objectives += O - else //protect - var/datum/objective/protect/O = new /datum/objective/protect() - O.owner = Mind - O.target = M - O.explanation_text = "Protect \the [M.current.real_name], the [M.assigned_role], from harm." - Mind.objectives += O - if(4) //debrain/capture - if(!possible_targets.len) continue - var/selected = rand(1,possible_targets.len) - var/datum/mind/M = possible_targets[selected] - var/is_bad_guy = possible_targets[M] - possible_targets.Cut(selected,selected+1) - - if(is_bad_guy ^ helping_station) //debrain (good-ninja + bad-guy or bad-ninja + good-guy) - var/datum/objective/debrain/O = new /datum/objective/debrain() - O.owner = Mind - O.target = M - O.explanation_text = "Steal the brain of [M.current.real_name]." - Mind.objectives += O - else //capture - var/datum/objective/capture/O = new /datum/objective/capture() - O.owner = Mind - O.gen_amount_goal() - Mind.objectives += O - else - break - - //Add a survival objective since it's usually broad enough for any round type. - var/datum/objective/O = new /datum/objective/survive() - O.owner = Mind - Mind.objectives += O - - //Finally, add their RP-directive - var/directive = generate_ninja_directive() - O = new /datum/objective(directive) //making it an objective so admins can reward the for completion - O.owner = Mind - Mind.objectives += O - - //add some RP-fluff - Mind.store_memory("I am an elite mercenary assassin of the mighty Spider Clan. A SPACE NINJA!") - Mind.store_memory("Suprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!") - Mind.store_memory("Officially, [helping_station?"Nanotrasen":"The Syndicate"] are my employer.") - - //spawn the ninja and assign the candidate - Ninja = create_space_ninja(spawn_loc) - Mind.transfer_to(Ninja) - - //initialise equipment - Ninja.wear_suit:randomize_param() - Ninja.internal = Ninja.s_store - if(Ninja.internals) - Ninja.internals.icon_state = "internal1" - - if(Ninja.mind != Mind) //something has gone wrong! - ERROR("The ninja wasn't assigned the right mind. ;ç;") - - Ninja << sound('sound/effects/ninja_greeting.ogg') //so ninja you probably wouldn't even know if you were made one - - success_spawn = 1 - -/* -This proc will give the ninja a directive to follow. They are not obligated to do so but it's a fun roleplay reminder. -Making this random or semi-random will probably not work without it also being incredibly silly. -As such, it's hard-coded for now. No reason for it not to be, really. -*/ -/datum/round_event/ninja/proc/generate_ninja_directive() - switch(rand(1,13)) - if(1) return "The Spider Clan must not be linked to this operation. Remain as hidden and covert as possible." - if(2) return "[station_name] is financed by an enemy of the Spider Clan. Cause as much structural damage as possible." - if(3) return "A wealthy animal rights activist has made a request we cannot refuse. Prioritize saving animal lives whenever possible." - if(4) return "The Spider Clan absolutely cannot be linked to this operation. Eliminate all witnesses using most extreme prejudice." - if(5) return "We are currently negotiating with Nanotrasen command. Prioritize saving human lives over ending them." - if(6) return "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) return "A financial backer has made an offer we cannot refuse. Implicate Syndicate involvement in the operation." - if(8) return "Let no one question the mercy of the Spider Clan. Ensure the safety of all non-essential personnel you encounter." - if(9) return "A free agent has proposed a lucrative business deal. Implicate Nanotrasen involvement in the operation." - if(10) return "Our reputation is on the line. Harm as few civilians or innocents as possible." - if(11) return "Our honor is on the line. Utilize only honorable tactics when dealing with opponents." - if(12) return "We are currently negotiating with a Syndicate leader. Disguise assassinations as suicide or another natural cause." - else return "There are no special supplemental instructions at this time." - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+++++++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++ -======================================SPACE NINJA SETUP==================================== -___________________________________________________________________________________________ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -*/ - -/* - README: - - Data: - - >> space_ninja.dm << is this file. It contains a variety of procs related to either spawning space ninjas, - modifying their verbs, various help procs, testing debug-related content, or storing unused procs for later. - Similar functions should go into this file, along with anything else that may not have an explicit category. - IMPORTANT: actual ninja suit, gloves, etc, are stored under the appropriate clothing files. If you need to change - variables or look them up, look there. Easiest way is through the map file browser. - - >> ninja_abilities.dm << contains all the ninja-related powers. Spawning energy swords, teleporting, and the like. - If more powers are added, or perhaps something related to powers, it should go there. Make sure to describe - what an ability/power does so it's easier to reference later without looking at the code. - IMPORTANT: verbs are still somewhat funky to work with. If an argument is specified but is not referenced in a way - BYOND likes, in the code content, the verb will fail to trigger. Nothing will happen, literally, when clicked. - This can be bypassed by either referencing the argument properly, or linking to another proc with the argument - attached. The latter is what I like to do for certain cases--sometimes it's necessary to do that regardless. - - >> ninja_equipment.dm << deals with all the equipment-related procs for a ninja. Primarily it has the suit, gloves, - and mask. The suit is by far the largest section of code out of the three and includes a lot of code that ties in - to other functions. This file has gotten kind of large so breaking it up may be in order. I use section hearders. - IMPORTANT: not much to say here. Follow along with the comments and adding new functions should be a breeze. Also - know that certain equipment pieces are linked in other files. The energy blade, for example, has special - functions defined in the appropriate files (airlock, securestorage, etc). - - General Notes: - - I created space ninjas with the expressed purpose of spicing up boring rounds. That is, ninjas are to xenos as marauders are to - death squads. Ninjas are stealthy, tech-savvy, and powerful. Not to say marauders are all of those things, but a clever ninja - should have little problem murderampaging their way through just about anything. Short of admin wizards maybe. - HOWEVER! - Ninjas also have a fairly great weakness as they require energy to use abilities. If, theoretically, there is a game - mode based around space ninjas, make sure to account for their energy needs. - - Admin Notes: - - Ninjas are not admin PCs--please do not use them for that purpose. They are another way to participate in the game post-death, - like pais, xenos, death squads, and cyborgs. - I'm currently looking for feedback from regular players since beta testing is largely done. I would appreciate if - you spawned regular players as ninjas when rounds are boring. Or exciting, it's all good as long as there is feedback. - You can also spawn ninja gear manually if you want to. - - 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. - 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. - - Miscellaneous Notes: - - Potential Upgrade Tree: - Energy Shield: - Extra Ability - Syndicate Shield device? - Works like the force wall spell, except can be kept indefinitely as long as energy remains. Toggled on or off. - Would block bullets and the like. - Phase Shift - Extra Ability - Advanced Sensors? - Instead of being unlocked at the start, Phase Shieft would become available once requirements are met. - Uranium-based Recharger: - Suit Upgrade - Unsure - Instead of losing energy each second, the suit would regain the same amount of energy. - This would not count in activating stealth and similar. - Extended Battery Life: - Suit Upgrade - Battery of higher capacity - Already implemented. Replace current battery with one of higher capacity. - Advanced Cloak-Tech device. - Suit Upgrade - Syndicate Cloaking Device? - Remove cloak failure rate. -*/ - - -//=======//CURRENT PLAYER VERB//=======// - -/client/proc/cmd_admin_ninjafy(var/mob/living/carbon/human/H in player_list) - set category = null - set name = "Make Space Ninja" - - if(!ticker) - alert("Wait until the game starts") - return - - if(!istype(H)) - return - - if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") - return - - log_admin("[key_name(src)] turned [H.key] into a Space Ninja.") - H.mind = create_ninja_mind(H.key) - H.mind_initialize() - H.equip_space_ninja(1) - if(istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja)) - H.wear_suit:randomize_param() - spawn(0) - H.wear_suit:ninitialize(10,H) - -//=======//CURRENT GHOST VERB//=======// - -/client/proc/send_space_ninja() - set category = "Fun" - set name = "Spawn Space Ninja" - set desc = "Spawns a space ninja for when you need a teenager with attitude." - set popup_menu = 0 - - if(!holder) - src << "Only administrators may use this command." - return - if(!ticker.mode) - alert("The game hasn't started yet!") - return - if(alert("Are you sure you want to send in a space ninja?",,"Yes","No")=="No") - return - - var/mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", null) as text|null),1,MAX_MESSAGE_LEN) - - var/client/C = input("Pick character to spawn as the Space Ninja", "Key", "") as null|anything in clients - if(!C) - return - - var/datum/round_event/ninja/E = new /datum/round_event/ninja() - E.key=C.key - E.mission=mission - - message_admins("[key_name_admin(key)] has spawned [key_name_admin(C.key)] as a Space Ninja.") - log_admin("[key] used Spawn Space Ninja.") - - return - -//=======//NINJA CREATION PROCS//=======// - -/proc/create_space_ninja(spawn_loc) - var/mob/living/carbon/human/new_ninja = new(spawn_loc) - if(prob(50)) new_ninja.gender = "female" - var/datum/preferences/A = new()//Randomize appearance for the ninja. - A.real_name = "[pick(ninja_titles)] [pick(ninja_names)]" - A.copy_to(new_ninja) - ready_dna(new_ninja) - new_ninja.equip_space_ninja() - return new_ninja - -/mob/living/carbon/human/proc/equip_space_ninja(safety=0)//Safety in case you need to unequip stuff for existing characters. - if(safety) - qdel(w_uniform) - qdel(wear_suit) - qdel(wear_mask) - qdel(head) - qdel(shoes) - qdel(gloves) - - var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src) - equip_to_slot_or_del(R, slot_ears) - equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform) - equip_to_slot_or_del(new /obj/item/clothing/shoes/space_ninja(src), slot_shoes) - equip_to_slot_or_del(new /obj/item/clothing/suit/space/space_ninja(src), slot_wear_suit) - equip_to_slot_or_del(new /obj/item/clothing/gloves/space_ninja(src), slot_gloves) - equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/space_ninja(src), slot_head) - equip_to_slot_or_del(new /obj/item/clothing/mask/gas/voice/space_ninja(src), slot_wear_mask) - equip_to_slot_or_del(new /obj/item/clothing/glasses/night(src), slot_glasses) - equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_belt) - equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_r_store) - equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_l_store) - equip_to_slot_or_del(new /obj/item/weapon/tank/internals/emergency_oxygen(src), slot_s_store) - equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack/carbondioxide(src), slot_back) - - var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(src) - E.imp_in = src - E.implanted = 1 - E.implanted(src) - return 1 - -//=======//HELPER PROCS//=======// - -//Randomizes suit parameters. -/obj/item/clothing/suit/space/space_ninja/proc/randomize_param() - s_cost = rand(1,20) - s_acost = rand(20,100) - k_cost = rand(100,500) - k_damage = rand(1,20) - s_delay = rand(10,100) - s_bombs = rand(5,20) - a_boost = rand(1,7) - -//This proc prevents the suit from being taken off. -/obj/item/clothing/suit/space/space_ninja/proc/lock_suit(mob/living/carbon/U, X = 0) - if(X)//If you want to check for icons. - icon_state = U.gender==FEMALE ? "s-ninjanf" : "s-ninjan" - U:gloves.icon_state = "s-ninjan" - U:gloves.item_state = "s-ninjan" - else - if(U.mind.special_role!="Space 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 - if(!istype(U:head, /obj/item/clothing/head/helmet/space/space_ninja)) - U << "ERROR: 100113 UNABLE TO LOCATE HEAD GEAR\nABORTING..." - return 0 - if(!istype(U:shoes, /obj/item/clothing/shoes/space_ninja)) - U << "ERROR: 122011 UNABLE TO LOCATE FOOT GEAR\nABORTING..." - return 0 - if(!istype(U:gloves, /obj/item/clothing/gloves/space_ninja)) - U << "ERROR: 110223 UNABLE TO LOCATE HAND GEAR\nABORTING..." - return 0 - - affecting = U - flags |= NODROP //colons make me go all |= - slowdown = 0 - n_hood = U:head - n_hood.flags |= NODROP - n_shoes = U:shoes - n_shoes.flags |= NODROP - n_shoes.slowdown-- - n_gloves = U:gloves - n_gloves.flags |= NODROP - - return 1 - -//This proc allows the suit to be taken off. -/obj/item/clothing/suit/space/space_ninja/proc/unlock_suit() - affecting = null - flags &= ~NODROP - slowdown = 1 - icon_state = "s-ninja" - if(n_hood)//Should be attached, might not be attached. - n_hood.flags &= ~NODROP - if(n_shoes) - n_shoes.flags &= ~NODROP - n_shoes.slowdown++ - if(n_gloves) - n_gloves.icon_state = "s-ninja" - n_gloves.item_state = "s-ninja" - n_gloves.flags &= ~NODROP - n_gloves.candrain=0 - n_gloves.draining=0 - -//Allows the mob to grab a stealth icon. -/mob/proc/NinjaStealthActive(atom/A)//A is the atom which we are using as the overlay. - invisibility = INVISIBILITY_LEVEL_TWO//Set ninja invis to 2. - var/icon/opacity_icon = new(A.icon, A.icon_state) - var/icon/alpha_mask = getIconMask(src) - var/icon/alpha_mask_2 = new('icons/effects/effects.dmi', "at_shield1") - alpha_mask.AddAlphaMask(alpha_mask_2) - opacity_icon.AddAlphaMask(alpha_mask) - for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it. - var/image/I = image("icon" = opacity_icon, "icon_state" = A.icon_state, "layer" = layer+0.8)//So it's above other stuff but below weapons and the like. - switch(i)//Now to determine offset so the result is somewhat blurred. - if(1) - I.pixel_x -= 1 - if(2) - I.pixel_x += 1 - if(3) - I.pixel_y -= 1 - if(4) - I.pixel_y += 1 - - overlays += I//And finally add the overlay. - overlays += image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = layer+0.9) - -//When ninja steal malfunctions. -/mob/proc/NinjaStealthMalf() - invisibility = 0//Set ninja invis to 0. - overlays += image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = layer+0.9) - playsound(loc, 'sound/effects/stealthoff.ogg', 75, 1) - -//=======//GENERIC VERB MODIFIERS//=======// - -/obj/item/clothing/suit/space/space_ninja/proc/grant_equip_verbs() - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init - verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit - verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros - verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth - n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled - - s_initialized = 1 - -/obj/item/clothing/suit/space/space_ninja/proc/remove_equip_verbs() - verbs += /obj/item/clothing/suit/space/space_ninja/proc/init - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth - if(n_gloves) - n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled - - s_initialized = 0 - -/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs() - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjablade - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet - - s_initialized=1 - slowdown=0 - -/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs() - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjablade - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet - -//=======//KAMIKAZE VERBS//=======// - -/obj/item/clothing/suit/space/space_ninja/proc/grant_kamikaze(mob/living/carbon/U) - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet - - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage - - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth - - kamikaze = 1 - - icon_state = U.gender==FEMALE ? "s-ninjakf" : "s-ninjak" - if(n_gloves) - n_gloves.icon_state = "s-ninjak" - n_gloves.item_state = "s-ninjak" - n_gloves.candrain = 0 - n_gloves.draining = 0 - n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled - - cancel_stealth() - - U << browse(null, "window=spideros") - U << "Do or Die, LET'S ROCK!!" - -/obj/item/clothing/suit/space/space_ninja/proc/remove_kamikaze(mob/living/carbon/U) - if(kamikaze) - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet - - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage - - verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth - if(n_gloves) - n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled - - U.incorporeal_move = 0 - kamikaze = 0 - k_unlock = 0 - U << "Disengaging mode...\nCODE NAME: KAMIKAZE" - -//=======//AI VERBS//=======// - -/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs() - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control - - s_busy = 0 - s_control = 0 - -/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs() - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control - - s_control = 1 - - -//Alternate ninja speech replacement. -/*This text is hilarious but also absolutely retarded. -message = replacetext(message, "l", "r") -message = replacetext(message, "rr", "ru") -message = replacetext(message, "v", "b") -message = replacetext(message, "f", "hu") -message = replacetext(message, "'t", "") -message = replacetext(message, "t ", "to ") -message = replacetext(message, " I ", " ai ") -message = replacetext(message, "th", "z") -message = replacetext(message, "ish", "isu") -message = replacetext(message, "is", "izu") -message = replacetext(message, "ziz", "zis") -message = replacetext(message, "se", "su") -message = replacetext(message, "br", "bur") -message = replacetext(message, "ry", "ri") -message = replacetext(message, "you", "yuu") -message = replacetext(message, "ck", "cku") -message = replacetext(message, "eu", "uu") -message = replacetext(message, "ow", "au") -message = replacetext(message, "are", "aa") -message = replacetext(message, "ay", "ayu") -message = replacetext(message, "ea", "ii") -message = replacetext(message, "ch", "chi") -message = replacetext(message, "than", "sen") -message = replacetext(message, ".", "") -message = lowertext(message) -*/ - - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++ -==================================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 << "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.chargeNot enough energy." - return 1 - switch(X) - if(1) - cancel_stealth()//Get rid of it. - if(2) - if(s_bombs<=0) - U << "There are no more smoke bombs remaining." - return 1 - if(3) - if(a_boost<=0) - U << "You do not have any more adrenaline boosters." - return 1 - return (s_coold)//Returns the value of the variable which counts down to zero. - -//=======//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 << "There are [s_bombs] smoke bombs remaining." - var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread() - smoke.set_up(10, 0, U.loc) - smoke.start() - playsound(U.loc, 'sound/effects/bamf.ogg', 50, 2) - s_bombs-- - s_coold = 1 - return - -//=======//9-8 TILE TELEPORT//=======// -//Click to to teleport 9-10 tiles in direction facing. -/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt() - set name = "Phase Jaunt (10E)" - set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing." - set category = "Ninja Ability" - set popup_menu = 0 - - var/C = 100 - if(!ninjacost(C,1)) - var/mob/living/carbon/human/U = affecting - var/turf/destination = get_teleport_loc(U.loc,U,9,1,3,1,0,1) - var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below. - if(destination&&istype(mobloc, /turf))//The turf check prevents unusual behavior. Like teleporting out of cryo pods, cloners, mechs, etc. - spawn(0) - playsound(U.loc, "sparks", 50, 1) - anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,U.dir) - - handle_teleport_grab(destination, U) - U.loc = destination - - 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) - - spawn(0) - destination.phase_damage_creatures(20,U)//Paralyse and damage mobs and mechas on the turf - s_coold = 1 - cell.charge-=(C*10) - else - U << "The VOID-shift device is malfunctioning, teleportation failed." - return - -//=======//RIGHT CLICK TELEPORT//=======// -//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 (20E)" - 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 = 200 - 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 - - 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) - - spawn(0)//Any living mobs in teleport area are gibbed. - T.phase_damage_creatures(20,U)//Paralyse and damage mobs and mechas on the turf - s_coold = 1 - cell.charge-=(C*10) - else - U << "You cannot teleport into solid walls or from solid matter" - return - -//=======//EM PULSE//=======// -//Disables nearby tech equipment. -/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse() - set name = "EM Burst (25E)" - set desc = "Disable any nearby technology with a electro-magnetic pulse." - set category = "Ninja Ability" - set popup_menu = 0 - - var/C = 250 - if(!ninjacost(C,1)) - var/mob/living/carbon/human/U = affecting - playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2) - empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch. - s_coold = 2 - cell.charge-=(C*10) - return - -//=======//ENERGY BLADE//=======// -//Summons a blade of energy in active hand. -/obj/item/clothing/suit/space/space_ninja/proc/ninjablade() - set name = "Energy Blade (5E)" - 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)) - 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) - cell.charge-=(C*10) - else - U << "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 (5E)" - set desc = "Launches an energy star at a random living target." - set category = "Ninja Ability" - set popup_menu = 0 - - var/C = 50 - if(!ninjacost(C)) - 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 - cell.charge-=(C*10) - A.fire() - else - U << "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 (20E)" - 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 = 200 - if(!ninjacost(C,1)&&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.anchored = 1//Anchors them so they can't move. - 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("[] caught [] with an energy net!", U, M), 1) - E.affecting = M - E.master = U - spawn(0)//Parallel processing. - E.process(M) - cell.charge-=(C*10) - 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.SetStunned(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 << "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 << "You will now phase through solid matter." - else - U.incorporeal_move = 0 - U << "You will no-longer phase through solid matter." - return - -//=======//5 TILE TELEPORT/GIB//=======// -//Allows to kill 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 kill all creatures in a straight line." - set category = "Ninja Ability" - set popup_menu = 0 - - if(!ninjacost()) - var/mob/living/carbon/human/U = affecting - var/turf/destination = get_teleport_loc(U.loc,U,5) - var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below. - if(destination&&istype(mobloc, /turf)) - U.say("Ai Satsugai!") - spawn(0) - playsound(U.loc, "sparks", 50, 1) - anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir) - - spawn(0) - for(var/turf/T in getline(mobloc, destination)) - spawn(0) - T.phase_damage_creatures(190,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 - - 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 << "The VOID-shift device is malfunctioning, teleportation failed." - return - -//=======//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 << "The VOID-shift device is malfunctioning, teleportation failed." - else - U << "There are no targets in view." - return - - -//For the love of god,space out your code! This is a nightmare to read. - -/* -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++ -===================================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/stock_parts/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. - NAI = new(src) //ninja intellicard - -/obj/item/clothing/suit/space/space_ninja/Destroy() - 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(NAI) - if(hologram)//If there is a hologram - qdel(hologram.i_attached)//Delete it and the attached image. - qdel(hologram) - ..() - -//Simply deletes all the attachments and self, killing all related procs. -/obj/item/clothing/suit/space/space_ninja/proc/terminate() - qdel(n_hood) - qdel(n_gloves) - qdel(n_shoes) - qdel(src) - - - -/obj/item/clothing/suit/space/space_ninja/proc/killai(var/obj/item/device/aicard/NAI) - for(var/mob/living/silicon/ai/A in src) - if(A.client) - A << "Self-erase protocol dete-- *bzzzzz*" - A << browse(null, "window=hack spideros") - NAI.flush = 1 - 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 << "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 << "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 << "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 = BACKGROUND_ENABLED - - //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. - for(var/mob/living/silicon/ai/A in NAI) - if(A&&A.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. - - //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 << "Now initializing..." - if(1) - if(!lock_suit(U))//To lock the suit onto wearer. - break - U << "Securing external locking mechanism...\nNeural-net established." - if(2) - U << "Extending neural-net interface...\nNow monitoring brain wave pattern..." - if(3) - if(U.stat==2||U.health<=0) - U << "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 << " Linking neural-net interface...\nPattern\green GREEN, continuing operation." - if(4) - U << "VOID-shift device status: ONLINE.\nCLOAK-tech device status: ONLINE." - if(5) - U << "Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [cell.charge]." - if(6) - U << "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 << "The suit is already functioning. Please report this bug." - else - U << "ERROR: 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 << "The suit is not initialized. 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 || NAI.flush) - U << "ERROR: You cannot use this function at this time." - return - s_busy = 1 - for(var/i = 0,i<7,i++) - switch(i) - if(0) - U << "Now de-initializing..." - remove_kamikaze(U)//Shutdowns kamikaze. - spideros = 0//Spideros resets. - if(1) - U << "Logging off, [U:real_name]. Shutting down SpiderOS." - remove_ninja_verbs() - if(2) - U << "Primary system status: OFFLINE.\nBackup system status: OFFLINE." - if(3) - U << "VOID-shift device status: OFFLINE.\nCLOAK-tech device status: OFFLINE." - cancel_stealth()//Shutdowns stealth. - if(4) - U << "Disconnecting neural-net interface...\greenSuccess." - if(5) - U << "Disengaging neural-net interface...\greenSuccess." - if(6) - U << "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_text]. Stage: [D.stage]/[D.max_stages]. Possible Cure: [D.cure_text].
" - dat += "" - if(1) - dat += "

Atmospheric Scan:

"//Headers don't need breaks. They are automatically placed. - var/turf/T = get_turf(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) - var/o2_level = environment.oxygen/total_moles - var/n2_level = environment.nitrogen/total_moles - var/co2_level = environment.carbon_dioxide/total_moles - var/plasma_level = environment.toxins/total_moles - var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level) - dat += "
    " - dat += "
  • Nitrogen: [round(n2_level*100)]%
  • " - dat += "
  • Oxygen: [round(o2_level*100)]%
  • " - dat += "
  • Carbon Dioxide: [round(co2_level*100)]%
  • " - dat += "
  • Plasma: [round(plasma_level*100)]%
  • " - dat += "
" - if(unknown_level > 0.01) - dat += "OTHER: [round(unknown_level)]%
" - - 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 += "
    " - var/count = 0 - for (var/obj/item/device/pda/P in get_viewable_pdas()) - dat += "
  • [P]" - dat += "
  • " - count++ - 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:
-
    -
  • *Nanotrasen and the Syndicate are two sides of the same coin and that coin is valuable.
  • -
  • *The Space Wizard Federation is a problem, mainly because they are an extremely dangerous group of unpredictable individuals--not to mention the wizards hate technology and are in direct opposition of the Spider Clan. Best avoided or left well-enough alone. How to battle: wizards possess several powerful abilities to steer clear off. Blind in particular is a nasty spell--jaunt away if you are blinded and never approach a wizard in melee. Stealth may also work if the wizard is not wearing thermal scanners--don't count on this. Run away if you feel threatened and await a better opportunity.
  • -
  • *Changeling Hivemind: extremely dangerous and to be killed on sight. How to battle: they will likely try to absorb you. Adrenaline boost, then phase shift into them. If you get stung, use SpiderOS to inject counter-agents. Stealth may also work but detecting a changeling is the real battle.
  • -
  • *Xeno Hivemind: their skulls make interesting kitchen decorations and are challenging to best, especially in larger nests. How to battle: they can see through your stealth guise and energy stars will not work on them. Best killed with a Phase Shift or at range. If you happen on a projectile stun weapon, use it and then close in to melee.
  • -
-
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). -
    -
  • Voice masking generates a random name the ninja can use over the radio and in-person. Although, the former use is recommended.
  • -
  • Toggling vision cycles to one of the following: thermal, meson, or darkness vision. The starting mode allows one to scout the identity of those in view, revealing their role. Traitors, revolutionaries, wizards, and other such people will be made known to you.
  • -
  • Stealth, when activated, drains more battery charge and works similarly to a syndicate cloak. The cloak will deactivate when most Abilities are utilized.
  • -
  • On-board AI: The suit is able to download an AI much like an intellicard. Check with SpiderOS for details once downloaded.
  • -
  • SpiderOS is a specialized, PDA-like screen that allows for a small variety of functions, such as injecting healing chemicals directly from the suit. You are using it now, if that was not already obvious. You may also download AI modules directly to the OS.
  • -
- Abilities: -
    -
  • *Phase Shift (2000E) and Phase Jaunt (1000E) are unique powers in that they can both be used for defense and offense. Jaunt launches the ninja forward facing up to 9 squares, somewhat randomly selecting the final destination. Shift can only be used on turf in view but is precise (cannot be used on walls). Any living mob in the area teleported to is instantly gibbed (mechs are damaged, huggers and other similar critters are killed). It is possible to teleport with a target, provided you grab them before teleporting.
  • -
  • *Energy Blade (500E) is a highly effective weapon. It is summoned directly to the ninja's hand and can also function as an EMAG for certain objects (doors/lockers/etc). You may also use it to cut through walls and disabled doors. Experiment! The blade will crit humans in two hits. This item cannot be placed in containers and when dropped or thrown disappears. Having an energy blade drains more power from the battery each tick.
  • -
  • *EM Pulse (2500E) is a highly useful ability that will create an electromagnetic shockwave around the ninja, disabling technology whenever possible. If used properly it can render a security force effectively useless. Of course, getting beat up with a toolbox is not accounted for.
  • -
  • *Energy Star (500E) is a ninja star made of green energy AND coated in poison. It works by picking a random living target within range and can be spammed to great effect in incapacitating foes. Just remember that the poison used is also used by the Xeno Hivemind (and will have no effect on them).
  • -
  • *Energy Net (2000E) is a non-lethal solution to incapacitating humanoids. The net is made of non-harmful phase energy and will halt movement as long as it remains in effect--it can be destroyed. If the net is not destroyed, after a certain time it will teleport the target to a holding facility for the Spider Clan and then vanish. You will be notified if the net fails or succeeds in capturing a target in this manner. Combine with energy stars or stripping to ensure success. Abduction never looked this leet.
  • -
  • *Adrenaline Boost (1 E. Boost/3) recovers the user from stun, weakness, and paralysis. Also injects 20 units of radium into the bloodstream.
  • -
  • *Smoke Bomb (1 Sm.Bomb/10) is a weak but potentially useful ability. It creates harmful smoke and can be used in tandem with other powers to confuse enemies.
  • -
  • *???: unleash the True Ultimate Power!
  • -

    IMPORTANT:

    -
      -
    • *Make sure to toggle Special Interaction from the Ninja Equipment menu to interact differently with certain objects.
    • -
    • *Your starting power cell can be replaced if you find one with higher maximum energy capacity by clicking on your suit with the higher capacity cell.
    • -
    • *Conserve your energy. Without it, you are very vulnerable.
    • -
    - That is all you will need to know. The rest will come with practice and talent. Good luck! -

    Master /N

    - "} - if(5) - dat += "

    AI Control:

    " - if(NAI) - NAI.attack_self(display_to) //Just accesses the integrated Intellicard. If an AI is in control of the suit then I guess it can interact with its own card. How meta. - - if(6) - dat += {" -

    Activate Abilities:

    - - "} - if(7) - dat += "

    Research Stored:

    " - if(t_disk) - dat += "Eject Disk
    " - dat += "
      " - if(istype(stored_research,/list))//If there is stored research. Should be but just in case. - for(var/datum/tech/current_data in stored_research) - dat += "
    • " - dat += "[current_data.name]: [current_data.level]" - if(t_disk)//If there is a disk inserted. We can either write or overwrite. - dat += " *Copy to Disk
      " - dat += "
    • " - dat += "
    " - dat += "" - - //Setting the can>resize etc to 0 remove them from the drag bar but still allows the window to be draggable. - display_to << browse(dat,"window=spideros;size=400x444;border=1;can_resize=1;can_close=0;can_minimize=0") - -//=======//SPIDEROS TOPIC PROC//=======// - -/obj/item/clothing/suit/space/space_ninja/Topic(href, href_list) - ..() - 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? - - if(s_control) - if(!affecting||U.stat||!s_initialized)//Check to make sure the guy is wearing the suit after clicking and it's on. - U << "Your suit must be worn and active to use this function." - U << browse(null, "window=spideros")//Closes the window. - return - - 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." - else - if(!affecting||A.stat||!s_initialized||A.loc!=src) - A << "This function is not available at this time." - A << browse(null, "window=spideros")//Closes the window. - return - - switch(href_list["choice"]) - if("Close") - display_to << browse(null, "window=spideros") - return - if("Refresh")//Refresh, goes to the end of the proc. - if("Return")//Return - if(spideros<=9) - spideros=0 - else - spideros = round(spideros/10)//Best way to do this, flooring to nearest integer. - - if("Shock") - var/damage = min(cell.charge, rand(50,150))//Uses either the current energy left over or between 50 and 150. - if(damage>1)//So they don't spam it when energy is a factor. - spark_system.start()//SPARKS THERE SHALL BE SPARKS - U.electrocute_act(damage, src,0.1,1)//The last argument is a safety for the human proc that checks for gloves. - cell.charge -= damage - else - A << "ERROR: Not enough energy remaining." - - if("Message") - var/obj/item/device/pda/P = locate(href_list["target"]) - var/t = input(U, "Please enter untraceable message.") as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) - if(!t||U.stat||U.wear_suit!=src||!s_initialized)//Wow, another one of these. Man... - display_to << browse(null, "window=spideros") - return - if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists. - display_to << "Error: unable to deliver message." - display_spideros() - return - P.tnote += "← From [!s_control?(A):"an unknown source"]:
    [t]
    " - if (!P.silent) - playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1) - P.audible_message("\icon[P] *[P.ttone]*", null, 3) - P.overlays.Cut() - P.overlays += image('icons/obj/pda.dmi', "pda-r") - - if("Inject") - if( (href_list["tag"]=="radium"? (reagents.get_reagent_amount("radium"))<=(a_boost*a_transfer) : !reagents.get_reagent_amount(href_list["tag"])) )//Special case for radium. If there are only a_boost*a_transfer radium units left. - display_to << "Error: the suit cannot perform this function. Out of [href_list["name"]]." - else - reagents.reaction(U, 2) - reagents.trans_id_to(U, href_list["tag"], href_list["tag"]=="nutriment"?5:a_transfer)//Nutriment is a special case since it's very potent. Shouldn't influence actual refill amounts or anything. - display_to << "Injecting..." - U << "You feel a tiny prick and a sudden rush of substance in to your veins." - - if("Trigger Ability") - var/ability_name = href_list["name"]+href_list["cost"]//Adds the name and cost to create the full proc name. - var/proc_arguments//What arguments to later pass to the proc, if any. - var/targets[] = list()//To later check for. - var/safety = 0//To later make sure we're triggering the proc when needed. - switch(href_list["name"])//Special case. - if("Phase Shift") - safety = 1 - for(var/turf/T in oview(5,loc)) - targets.Add(T) - if("Energy Net") - safety = 1 - for(var/mob/living/carbon/M in oview(5,loc)) - targets.Add(M) - if(targets.len)//Let's create an argument for the proc if needed. - proc_arguments = pick(targets) - safety = 0 - if(!safety) - A << "You trigger [href_list["name"]]." - U << "[href_list["name"]] suddenly triggered!" - call(src,ability_name)(proc_arguments) - else - A << "There are no potential [href_list["name"]=="Phase Shift"?"destinations" : "targets"] in view." - - if("Unlock Kamikaze") - if(input(U)=="Divine Wind") - if( !(U.stat||U.wear_suit!=src||!s_initialized) ) - if( !(cell.charge<=1||s_busy) ) - s_busy = 1 - for(var/i, i<4, i++) - switch(i) - if(0) - U << "Engaging mode...\nCODE NAME: KAMIKAZE" - if(1) - U << "Re-routing power nodes... \nUnlocking limiter..." - if(2) - U << "Power nodes re-routed. \nLimiter unlocked." - if(3) - grant_kamikaze(U)//Give them verbs and change variables as necessary. - U.regenerate_icons()//Update their clothing. - ninjablade()//Summon two energy blades. - message_admins("[key_name_admin(U)] used KAMIKAZE mode.")//Let the admins know. - s_busy = 0 - return - sleep(s_delay) - else - U << "ERROR: Unable to initiate mode." - else - U << browse(null, "window=spideros") - s_busy = 0 - return - else - U << "ERROR: WRONG PASSWORD!" - k_unlock = 0 - spideros = 0 - s_busy = 0 - - if("Eject Disk") - var/turf/T = get_turf(loc) - if(!U.get_active_hand()) - U.put_in_hands(t_disk) - t_disk.add_fingerprint(U) - t_disk = null - else - if(T) - t_disk.loc = T - t_disk = null - else - U << "ERROR: Could not eject disk." - - if("Copy to Disk") - var/datum/tech/current_data = locate(href_list["target"]) - U << "[current_data.name] successfully [(!t_disk.stored) ? "copied" : "overwritten"] to disk." - t_disk.stored = current_data - - if("Configure pAI") - pai.attack_self(U) - - if("Eject pAI") - var/turf/T = get_turf(loc) - if(!U.get_active_hand()) - U.put_in_hands(pai) - pai.add_fingerprint(U) - pai = null - else - if(T) - pai.loc = T - pai = null - else - U << "ERROR: Could not eject pAI card." - - if("Override AI Laws") - var/law_zero = A.laws.zeroth//Remembers law zero, if there is one. - A.laws = new /datum/ai_laws/ninja_override - A.set_zeroth_law(law_zero)//Adds back law zero if there was one. - A.show_laws() - U << "Law Override: SUCCESS." - - if("Purge AI") - var/confirm = alert("Are you sure you want to purge the AI? This cannot be undone once started.", "Confirm purge", "Yes", "No") - if(U.stat||U.wear_suit!=src||!s_initialized) - U << browse(null, "window=spideros") - return - if(confirm == "Yes"&&AI) - if(A.laws.zeroth)//Gives a few seconds to re-upload the AI somewhere before it takes full control. - s_busy = 1 - for(var/i,i<5,i++) - if(AI==A) - switch(i) - if(0) - A << "WARNING: purge procedure detected. \nNow hacking host..." - U << "WARNING: HACKING AT��TEMP� IN PR0GRESs!" - spideros = 0 - k_unlock = 0 - U << browse(null, "window=spideros") - if(1) - A << "Disconnecting neural interface..." - U << "WAR�NING: �R�O0�Gr�--S 2&3%" - if(2) - A << "Shutting down external protocol..." - U << "WARNING: P����RֆGr�5S 677^%" - cancel_stealth() - if(3) - A << "Connecting to kernel..." - U << "WARNING: �R�r�R_404" - A.control_disabled = 0 - if(4) - A << "Connection established and secured. Menu updated." - U << "W�r#nING: #%@!!WȆ|_4�54@ \nUn�B88l3 T� L�-�o-L�CaT2 ##$!�RN�0..%.." - grant_AI_verbs() - return - sleep(s_delay) - else break - s_busy = 0 - U << "Hacking attempt disconnected. Resuming normal operation." - else - NAI.flush = 1 - A.suiciding = 1 - A << "Your core files are being purged! This is the end..." - spawn(0) - display_spideros()//To refresh the screen and let this finish. - while (A.stat != 2) - A.adjustOxyLoss(2) - A.updatehealth() - sleep(10) - killai(NAI) - U << "Artificial Intelligence was terminated. Rebooting..." - NAI.flush = 0 - - if("Wireless AI") - A.control_disabled = !A.control_disabled - A << "AI wireless has been [A.control_disabled ? "disabled" : "enabled"]." - else//If it's not a defined function, it's a menu. - spideros=text2num(href_list["choice"]) - - display_spideros()//Refreshes the screen by calling it again (which replaces current screen with new screen). - return - -//=======//SPECIAL AI FUNCTIONS//=======// - -/obj/item/clothing/suit/space/space_ninja/proc/ai_holo(var/turf/T in oview(3,affecting))//To have an internal AI display a hologram to the AI and ninja only. - set name = "Display Hologram" - set desc = "Channel a holographic image directly to the user's field of vision. Others will not see it." - set category = null - set src = usr.loc - - if(s_initialized&&affecting&&affecting.client&&istype(affecting.loc, /turf))//If the host exists and they are playing, and their location is a turf. - if(!hologram)//If there is not already a hologram. - hologram = new(T)//Spawn a blank effect at the location. - hologram.invisibility = 101//So that it doesn't show up, ever. This also means one could attach a number of images to a single obj and display them differently to differnet people. - hologram.anchored = 1//So it cannot be dragged by space wind and the like. - hologram.dir = get_dir(T,affecting.loc) - - for(var/mob/living/silicon/ai/A in NAI) - var/image/I = image(A.holo_icon,hologram)//Attach an image to object. - hologram.i_attached = I//To attach the image in order to later reference. - A << I - affecting << I - affecting << "An image flicks to life nearby. It appears visible to you only." - - verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear - - ai_holo_process()//Move to initialize - else - AI << "ERROR: Image feed in progress." - else - AI << "ERROR: Unable to project image." - return - -/obj/item/clothing/suit/space/space_ninja/proc/ai_holo_process() - set background = BACKGROUND_ENABLED - - spawn while(hologram&&s_initialized&&AI)//Suit on and there is an AI present. - if(!s_initialized||get_dist(affecting,hologram.loc)>3)//Once suit is de-initialized or hologram reaches out of bounds. - qdel(hologram.i_attached) - qdel(hologram) - - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear - return - sleep(10)//Checks every second. - -/obj/item/clothing/suit/space/space_ninja/proc/ai_instruction()//Let's the AI know what they can do. - set name = "Instructions" - set desc = "Displays a list of helpful information." - set category = "AI Ninja Equip" - set src = usr.loc - - AI << "The menu you are seeing will contain other commands if they become available.\nRight click a nearby turf to display an AI Hologram. It will only be visible to you and your host. You can move it freely using normal movement keys--it will disappear if placed too far away." - -/obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear() - set name = "Clear Hologram" - set desc = "Stops projecting the current holographic image." - set category = "AI Ninja Equip" - set src = usr.loc - - qdel(hologram.i_attached) - qdel(hologram) - - verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_holo_clear - return - -/obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja() - set name = "Hack SpiderOS" - set desc = "Hack directly into the Black Widow(tm) neuro-interface." - set category = "AI Ninja Equip" - set src = usr.loc - - display_spideros() - return - -/obj/item/clothing/suit/space/space_ninja/proc/ai_return_control() - set name = "Relinquish Control" - set desc = "Return control to the user." - set category = "AI Ninja Equip" - set src = usr.loc - - - for(var/mob/living/silicon/ai/A in NAI) - AI << browse(null, "window=spideros")//Close window - AI << "You have seized your hacking attempt. [affecting.real_name] has regained control." - affecting << "UPDATE: [A.real_name] has ceased hacking attempt. All systems clear." - - remove_AI_verbs() - return - -//=======//GENERAL SUIT PROCS//=======// - -/obj/item/clothing/suit/space/space_ninja/attackby(obj/item/I, mob/U, params) - if(U==affecting)//Safety, in case you try doing this without wearing the suit/being the person with the suit. - if(istype(I, /obj/item/device/aicard))//If it's an AI card. - if(s_control) - I:transfer_ai("NINJASUIT","AICARD",src,U) - else - U << "ERROR: Remote access channel disabled." - return//Return individually so that ..() can run properly at the end of the proc. - else if(istype(I, /obj/item/device/paicard) && !pai)//If it's a pai card. - U:drop_item() - I.loc = src - pai = I - U << "You slot \the [I] into \the [src]." - updateUsrDialog() - return - else if(istype(I, /obj/item/weapon/reagent_containers/glass))//If it's a glass beaker. - var/total_reagent_transfer//Keep track of this stuff. - for(var/reagent_id in reagent_list) - var/datum/reagent/R = I.reagents.has_reagent(reagent_id)//Mostly to pull up the name of the reagent after calculating. Also easier to use than writing long proc paths. - if(R&&reagents.get_reagent_amount(reagent_id)=a_transfer)//Radium is always special. - //Here we determine how much reagent will actually transfer if there is enough to transfer or there is a need of transfer. Minimum of max amount available (using a_transfer) or amount needed. - var/amount_to_transfer = min( (r_maxamount+(reagent_id == "radium"?(a_boost*a_transfer):0)-reagents.get_reagent_amount(reagent_id)) ,(round(R.volume/a_transfer))*a_transfer)//In the end here, we round the amount available, then multiply it again. - R.volume -= amount_to_transfer//Remove from reagent volume. Don't want to delete the reagent now since we need to perserve the name. - reagents.add_reagent(reagent_id, amount_to_transfer)//Add to suit. Reactions are not important. - total_reagent_transfer += amount_to_transfer//Add to total reagent trans. - U << "Added [amount_to_transfer] units of [R.name]."//Reports on the specific reagent added. - I.reagents.update_total()//Now we manually update the total to make sure everything is properly shoved under the rug. - - U << "Replenished a total of [total_reagent_transfer ? total_reagent_transfer : "zero"] chemical units."//Let the player know how much total volume was added. - return - else if(istype(I, /obj/item/weapon/stock_parts/cell)) - if(I:maxcharge>cell.maxcharge&&n_gloves&&n_gloves.candrain) - U << "Higher maximum capacity detected.\nUpgrading..." - if (n_gloves&&n_gloves.candrain&&do_after(U,s_delay)) - U.drop_item() - I.loc = src - I:charge = min(I:charge+cell.charge, I:maxcharge) - var/obj/item/weapon/stock_parts/cell/old_cell = cell - old_cell.charge = 0 - U.put_in_hands(old_cell) - old_cell.add_fingerprint(U) - old_cell.corrupt() - old_cell.updateicon() - cell = I - U << "Upgrade complete. Maximum capacity: [round(cell.maxcharge/100)]%" - else - U << "Procedure interrupted. Protocol terminated." - return - else if(istype(I, /obj/item/weapon/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit. - var/obj/item/weapon/disk/tech_disk/TD = I - if(TD.stored)//If it has something on it. - U << "Research information detected, processing..." - if(do_after(U,s_delay)) - for(var/datum/tech/current_data in stored_research) - if(current_data.id==TD.stored.id) - if(current_data.levelData analyzed and updated. Disk erased." - else - U << "ERROR: Procedure interrupted. Process terminated." - else - I.loc = src - t_disk = I - U << "You slot \the [I] into \the [src]." - return - ..() - -/obj/item/clothing/suit/space/space_ninja/proc/toggle_stealth() - var/mob/living/carbon/human/U = affecting - if(s_active) - cancel_stealth() - else - spawn(0) - anim(U.loc,U,'icons/mob/mob.dmi',,"cloak",,U.dir) - s_active=!s_active - U.alpha = 0 - U.visible_message("[U.name] vanishes into thin air!", \ - "You are now invisible to normal detection.") - return - -/obj/item/clothing/suit/space/space_ninja/proc/cancel_stealth() - var/mob/living/carbon/human/U = affecting - if(s_active) - spawn(0) - anim(U.loc,U,'icons/mob/mob.dmi',,"uncloak",,U.dir) - s_active=!s_active - U.alpha = 255 - U.visible_message("[U.name] appears from thin air!", \ - "You are now visible.") - return 1 - return 0 - -/obj/item/clothing/suit/space/space_ninja/proc/blade_check(mob/living/carbon/U, X = 1)//Default to checking for blade energy. - switch(X) - if(1) - if(istype(U.get_active_hand(), /obj/item/weapon/melee/energy/blade)) - if(cell.charge<=0)//If no charge left. - U.drop_item()//Blade is dropped from active hand (and deleted). - else return 1 - else if(istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade)) - if(cell.charge<=0) - U.swap_hand()//swap hand - U.drop_item()//drop blade - else return 1 - if(2) - if(istype(U.get_active_hand(), /obj/item/weapon/melee/energy/blade)) - U.drop_item() - if(istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade)) - U.swap_hand() - U.drop_item() - return 0 - -/obj/item/clothing/suit/space/space_ninja/examine(mob/user) - ..() - if(s_initialized) - if(user == affecting) - if(s_control) - user << "All systems operational. Current energy capacity: [cell.charge]." - if(!kamikaze) - user << "The CLOAK-tech device is [s_active?"active":"inactive"]." - else - user << "KAMIKAZE MODE ENGAGED!" - user << "There are [s_bombs] smoke bomb\s remaining." - user << "There are [a_boost] adrenaline booster\s remaining." - else - user << "�rr�R �a��a�� No-�-� f��N� 3RR�r" - -/* -=================================================================================== -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -=================================================================================== -*/ - -//=======//ENERGY DRAIN PROCS//=======// - -/obj/item/clothing/gloves/space_ninja/proc/drain(target_type as text, target, obj/suit) -//Var Initialize - var/obj/item/clothing/suit/space/space_ninja/S = suit - var/mob/living/carbon/human/U = S.affecting - var/obj/item/clothing/gloves/space_ninja/G = S.n_gloves - - var/drain = 0//To drain from battery. - var/maxcapacity = 0//Safety check for full battery. - var/totaldrain = 0//Total energy drained. - - G.draining = 1 - - if(target_type!="RESEARCH")//I lumped research downloading here for ease of use. - U << "Now charging battery..." - - switch(target_type) - - if("APC") - var/obj/machinery/power/apc/A = target - if(A.cell&&A.cell.charge) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, A.loc) - while(G.candrain&&A.cell.charge>0&&!maxcapacity) - drain = rand(G.mindrain,G.maxdrain) - if(A.cell.chargeS.cell.maxcharge) - drain = S.cell.maxcharge-S.cell.charge - maxcapacity = 1//Reached maximum battery capacity. - if (do_after(U,10)) - spark_system.start() - playsound(A.loc, "sparks", 50, 1) - A.cell.charge-=drain - S.cell.charge+=drain - totaldrain+=drain - else break - U << "Gained [totaldrain] energy from the APC." - if(!A.emagged) - flick("apc-spark", src) - A.emagged = 1 - A.locked = 0 - A.update_icon() - else - U << "This APC has run dry of power. You must find another source." - - if("SMES") - var/obj/machinery/power/smes/A = target - if(A.charge) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, A.loc) - while(G.candrain&&A.charge>0&&!maxcapacity) - drain = rand(G.mindrain,G.maxdrain) - if(A.chargeS.cell.maxcharge) - drain = S.cell.maxcharge-S.cell.charge - maxcapacity = 1 - if (do_after(U,10)) - spark_system.start() - playsound(A.loc, "sparks", 50, 1) - A.charge-=drain - S.cell.charge+=drain - totaldrain+=drain - else break - U << "Gained [totaldrain] energy from the SMES cell." - else - U << "This SMES cell has run dry of power. You must find another source." - - if("CELL") - var/obj/item/weapon/stock_parts/cell/A = target - if(A.charge) - if (G.candrain&&do_after(U,30)) - U << "Gained [A.charge] energy from the cell." - if(S.cell.charge+A.charge>S.cell.maxcharge) - S.cell.charge=S.cell.maxcharge - else - S.cell.charge+=A.charge - A.charge = 0 - G.draining = 0 - A.corrupt() - A.updateicon() - else - U << "Procedure interrupted. Protocol terminated." - else - U << "This cell is empty and of no use." - - if("MACHINERY")//Can be applied to generically to all powered machinery. I'm leaving this alone for now. - var/obj/machinery/A = target - if(A.powered())//If powered. - - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, A.loc) - - var/obj/machinery/power/apc/B = A.loc.loc:get_apc()//Object.turf.area find APC - if(B)//If APC exists. Might not if the area is unpowered like Centcom. - var/datum/powernet/PN = B.terminal.powernet - while(G.candrain&&!maxcapacity&&!isnull(A))//And start a proc similar to drain from wire. - drain = rand(G.mindrain,G.maxdrain) - var/drained = 0 - if(PN&&do_after(U,10)) - drained = min(drain, PN.avail) - PN.load += drained - if(drained < drain)//if no power on net, drain apcs - for(var/obj/machinery/power/terminal/T in PN.nodes) - if(istype(T.master, /obj/machinery/power/apc)) - var/obj/machinery/power/apc/AP = T.master - if(AP.operating && AP.cell && AP.cell.charge>0) - AP.cell.charge = max(0, AP.cell.charge - 5) - drained += 5 - else break - S.cell.charge += drained - if(S.cell.charge>S.cell.maxcharge) - totaldrain += (drained-(S.cell.charge-S.cell.maxcharge)) - S.cell.charge = S.cell.maxcharge - maxcapacity = 1 - else - totaldrain += drained - spark_system.start() - if(drained==0) break - U << "Gained [totaldrain] energy from the power network." - else - U << "Power network could not be found. Aborting." - else - U << "This recharger is not providing energy. You must find another source." - - if("RESEARCH") - var/obj/machinery/A = target - U << "Hacking \the [A]..." - spawn(0) - var/turf/location = get_turf(U) - for(var/mob/living/silicon/ai/AI in player_list) - AI << "Network Alert: Hacking attempt detected[location?" in [location]":". Unable to pinpoint location"]." - if(A:files&&A:files.known_tech.len) - for(var/datum/tech/current_data in S.stored_research) - U << "Checking \the [current_data.name] database." - if(do_after(U, S.s_delay)&&G.candrain&&!isnull(A)) - for(var/datum/tech/analyzing_data in A:files.known_tech) - if(current_data.id==analyzing_data.id) - if(analyzing_data.level>current_data.level) - U << "Database: UPDATED." - current_data.level = analyzing_data.level - break//Move on to next. - else break//Otherwise, quit processing. - U << "Data analyzed. Process finished." - - if("WIRE") - var/obj/structure/cable/A = target - var/datum/powernet/PN = A.powernet - while(G.candrain&&!maxcapacity&&!isnull(A)) - drain = (round((rand(G.mindrain,G.maxdrain))/2)) - var/drained = 0 - if(PN&&do_after(U,10)) - drained = min(drain, PN.avail) - PN.load += drained - if(drained < drain)//if no power on net, drain apcs - for(var/obj/machinery/power/terminal/T in PN.nodes) - if(istype(T.master, /obj/machinery/power/apc)) - var/obj/machinery/power/apc/AP = T.master - if(AP.operating && AP.cell && AP.cell.charge>0) - AP.cell.charge = max(0, AP.cell.charge - 5) - drained += 5 - else break - S.cell.charge += drained - if(S.cell.charge>S.cell.maxcharge) - totaldrain += (drained-(S.cell.charge-S.cell.maxcharge)) - S.cell.charge = S.cell.maxcharge - maxcapacity = 1 - else - totaldrain += drained - S.spark_system.start() - if(drained==0) break - U << "Gained [totaldrain] energy from the power network." - - if("MECHA") - var/obj/mecha/A = target - A.occupant_message("Warning: Unauthorized access through sub-route 4, block H, detected.") - if(A.get_charge()) - while(G.candrain&&A.cell.charge>0&&!maxcapacity) - drain = rand(G.mindrain,G.maxdrain) - if(A.cell.chargeS.cell.maxcharge) - drain = S.cell.maxcharge-S.cell.charge - maxcapacity = 1 - if (do_after(U,10)) - A.spark_system.start() - playsound(A.loc, "sparks", 50, 1) - A.cell.use(drain) - S.cell.charge+=drain - totaldrain+=drain - else break - U << "Gained [totaldrain] energy from [src]." - else - U << "The exosuit's battery has run dry. You must find another source of power." - - if("CYBORG") - var/mob/living/silicon/robot/A = target - A << "Warning: Unauthorized access through sub-route 12, block C, detected." - G.draining = 1 - if(A.cell&&A.cell.charge) - while(G.candrain&&A.cell.charge>0&&!maxcapacity) - drain = rand(G.mindrain,G.maxdrain) - if(A.cell.chargeS.cell.maxcharge) - drain = S.cell.maxcharge-S.cell.charge - maxcapacity = 1 - if (do_after(U,10)) - A.spark_system.start() - playsound(A.loc, "sparks", 50, 1) - A.cell.charge-=drain - S.cell.charge+=drain - totaldrain+=drain - else break - U << "Gained [totaldrain] energy from [A]." - else - U << "Their battery has run dry of power. You must find another source." - - else//Else nothing :< - - G.draining = 0 - - return - -//=======//GENERAL PROCS//=======// - -/obj/item/clothing/gloves/space_ninja/proc/toggled() - set name = "Toggle Interaction" - set desc = "Toggles special interaction on or off." - set category = "Ninja Equip" - - var/mob/living/carbon/human/U = loc - U << "You [candrain?"disable":"enable"] special interaction." - candrain=!candrain - -/obj/item/clothing/gloves/space_ninja/examine(mob/user) - ..() - if(flags & NODROP) - user << "The energy drain mechanism is: [candrain?"active":"inactive"]." - -/* -=================================================================================== -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -=================================================================================== -*/ - -/obj/item/clothing/mask/gas/voice/space_ninja/New() - verbs += /obj/item/clothing/mask/gas/voice/space_ninja/proc/togglev - -//This proc is linked to human life.dm. It determines what hud icons to display based on mind special role for most mobs. -/obj/item/clothing/mask/gas/voice/space_ninja/proc/assess_targets(list/target_list, mob/living/carbon/U) - var/icon/tempHud = 'icons/mob/hud.dmi' - for(var/mob/living/target in target_list) - if(iscarbon(target)) - switch(target.mind.special_role) - if("traitor") - U.client.images += image(tempHud,target,"hudtraitor") - if("Revolutionary","Head Revolutionary") - U.client.images += image(tempHud,target,"hudrevolutionary") - if("Cultist") - U.client.images += image(tempHud,target,"hudcultist") - if("Changeling") - U.client.images += image(tempHud,target,"hudchangeling") - if("Wizard","Fake Wizard") - U.client.images += image(tempHud,target,"hudwizard") - if("Hunter","Sentinel","Drone","Queen") - U.client.images += image(tempHud,target,"hudalien") - if("Syndicate") - U.client.images += image(tempHud,target,"hudoperative") - if("Death Commando") - U.client.images += image(tempHud,target,"huddeathsquad") - if("Space 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") - else if(issilicon(target))//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud. - var/mob/living/silicon/silicon_target = target - if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len))) - if(isrobot(silicon_target))//Different icons for robutts and AI. - U.client.images += image(tempHud,silicon_target,"hudmalborg") - else - U.client.images += image(tempHud,silicon_target,"hudmalai") - return 1 - -/obj/item/clothing/mask/gas/voice/space_ninja/proc/togglev() - set name = "Toggle Voice" - set desc = "Toggles the voice synthesizer on or off." - set category = "Ninja Equip" - - var/mob/U = loc//Can't toggle voice when you're not wearing the mask. - var/vchange = (alert("Would you like to synthesize a new name or turn off the voice synthesizer?",,"New Name","Turn Off")) - if(vchange=="New Name") - var/chance = rand(1,100) - switch(chance) - if(1 to 50)//High chance of a regular name. - voice = "[rand(0,1)==1?pick(first_names_female):pick(first_names_male)] [pick(last_names)]" - if(51 to 80)//Smaller chance of a clown name. - voice = "[pick(clown_names)]" - if(81 to 90)//Small chance of a wizard name. - voice = "[pick(wizard_first)] [pick(wizard_second)]" - if(91 to 100)//Small chance of an existing crew name. - var/names[] = new() - for(var/mob/living/carbon/human/M in player_list) - if(M==U||!M.client||!M.real_name) continue - names.Add(M.real_name) - voice = !names.len ? "Cuban Pete" : pick(names) - U << "You are now mimicking [voice]." - else - U << "The voice synthesizer is [voice!="Unknown"?"now":"already"] deactivated." - voice = "Unknown" - return - -/obj/item/clothing/mask/gas/voice/space_ninja/examine(mob/user) - ..() - user << "Voice mimicking algorithm is set [!vchange?"inactive":"active"]." - -/* -=================================================================================== -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -=================================================================================== -*/ - -/* -It will teleport people to a holding facility after 30 seconds. (Check the process() proc to change where teleport goes) -It is possible to destroy the net by the occupant or someone else. -*/ - -/obj/effect/energy_net - name = "energy net" - desc = "It's a net made of green energy." - icon = 'icons/effects/effects.dmi' - icon_state = "energynet" - - density = 1//Can't pass through. - opacity = 0//Can see through. - mouse_opacity = 1//So you can hit it with stuff. - anchored = 1//Can't drag/grab the trapped mob. - - var/health = 25//How much health it has. - var/mob/living/affecting = null//Who it is currently affecting, if anyone. - var/mob/living/master = null//Who shot web. Will let this person know if the net was successful or failed. - -/obj/effect/energy_net/proc/healthcheck() - if(health <=0) - density = 0 - if(affecting) - var/mob/living/carbon/M = affecting - M.anchored = 0 - for(var/mob/O in viewers(src, 3)) - O.show_message("[M.name] was recovered from the energy net!", 1, "You hear a grunt.", 2) - if(!isnull(master))//As long as they still exist. - master << "ERROR: unable to initiate transport protocol. Procedure terminated." - qdel(src) - return - -/obj/effect/energy_net/process(var/mob/living/carbon/M as mob) - var/check = 30//30 seconds before teleportation. Could be extended I guess. - var/mob_name = affecting.name//Since they will report as null if terminated before teleport. - //The person can still try and attack the net when inside. - while(!isnull(M)&&!isnull(src)&&check>0)//While M and net exist, and 30 seconds have not passed. - check-- - sleep(10) - - if(isnull(M)||M.loc!=loc)//If mob is gone or not at the location. - if(!isnull(master))//As long as they still exist. - master << "ERROR: unable to locate \the [mob_name]. Procedure terminated." - qdel(src)//Get rid of the net. - return - - if(!isnull(src))//As long as both net and person exist. - //No need to check for countdown here since while() broke, it's implicit that it finished. - - density = 0//Make the net pass-through. - invisibility = 101//Make the net invisible so all the animations can play out. - health = INFINITY//Make the net invincible so that an explosion/something else won't kill it while, spawn() is running. - for(var/obj/item/W in M) - if(istype(M,/mob/living/carbon/human)) - if(W==M:w_uniform) continue//So all they're left with are shoes and uniform. - if(W==M:shoes) continue - M.unEquip(W) - - spawn(0) - playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1) - anim(M.loc,M,'icons/mob/mob.dmi',,"phaseout",,M.dir) - - M.loc = pick(holdingfacility)//Throw mob in to the holding facility. - M << "You appear in a strange place!" - - spawn(0) - var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() - spark_system.set_up(5, 0, M.loc) - spark_system.start() - playsound(M.loc, 'sound/effects/phasein.ogg', 25, 1) - playsound(M.loc, 'sound/effects/sparks2.ogg', 50, 1) - anim(M.loc,M,'icons/mob/mob.dmi',,"phasein",,M.dir) - qdel(src)//Wait for everything to finish, delete the net. Else it will stop everything once net is deleted, including the spawn(0). - - for(var/mob/O in viewers(src, 3)) - O.show_message("[M] vanished!", 1, "You hear sparks flying!", 2) - - if(!isnull(master))//As long as they still exist. - master << "SUCCESS: transport procedure of \the [affecting] complete." - - M.anchored = 0//Important. - - else//And they are free. - M << "You are free of the net!" - return - -/obj/effect/energy_net/bullet_act(var/obj/item/projectile/Proj) - health -= Proj.damage - healthcheck() - ..() - -/obj/effect/energy_net/ex_act(severity, target) - switch(severity) - if(1.0) - health-=50 - if(2.0) - health-=50 - if(3.0) - health-=prob(50)?50:25 - healthcheck() - return - -/obj/effect/energy_net/blob_act() - health-=50 - healthcheck() - return - -/obj/effect/energy_net/hitby(AM as mob|obj) - ..() - visible_message("[src] was hit by [AM].") - var/tforce = 0 - if(ismob(AM)) - tforce = 10 - else - tforce = AM:throwforce - playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) - health = max(0, health - tforce) - healthcheck() - ..() - return - -/obj/effect/energy_net/attack_hulk(mob/living/carbon/human/user) - ..(user, 1) - user.visible_message("[user] rips the energy net apart!", \ - "You easily destroy the energy net.") - health-=50 - healthcheck() - -/obj/effect/energy_net/attack_paw(mob/user) - return attack_hand() - -/obj/effect/energy_net/attack_alien(mob/living/user as mob) - user.do_attack_animation(src) - if (islarva(user)) - return - playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) - health -= rand(10, 20) - if(health > 0) - user.visible_message("[user] claws at the energy net!", \ - "\green You claw at the net.") - else - user.visible_message("[user] slices the energy net apart!", \ - "\green You slice the energy net to pieces.") - healthcheck() - return - -/obj/effect/energy_net/attackby(obj/item/weapon/W as obj, mob/user as mob, params) - var/aforce = W.force - health = max(0, health - aforce) - healthcheck() - ..() - return - -proc/create_ninja_mind(key) - var/datum/mind/Mind = new /datum/mind(key) - Mind.assigned_role = "MODE" - Mind.special_role = "Space Ninja" - ticker.mode.traitors |= Mind //Adds them to current traitor list. Which is really the extra antagonist list. - return Mind diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1710e8535c4..96855646337 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -73,8 +73,12 @@ if(mind.changeling) stat("Chemical Storage", "[mind.changeling.chem_charges]/[mind.changeling.chem_storage]") stat("Absorbed DNA", mind.changeling.absorbedcount) - if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized) - stat("Energy Charge", round(wear_suit:cell:charge/100)) + + //NINJACODE + if(istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)) + var/obj/item/clothing/suit/space/space_ninja/SN = wear_suit + if(SN.s_initialized) + stat("Energy Charge", round(SN.cell.charge/100)) /mob/living/carbon/human/ex_act(severity, ex_target) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 6db29529209..b8d73c2e266 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -286,7 +286,7 @@ proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 fo return returntext -/proc/ninjaspeak(n) +/proc/ninjaspeak(n) //NINJACODE /* The difference with stutter is that this proc can stutter more than 1 letter The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma. diff --git a/code/modules/ninja/Ninja_Readme.dm b/code/modules/ninja/Ninja_Readme.dm new file mode 100644 index 00000000000..2d383f9b1fa --- /dev/null +++ b/code/modules/ninja/Ninja_Readme.dm @@ -0,0 +1,10 @@ + +/* + +Removing Snowflake: +- Search for NINJACODE (one word, all caps) to find Space Ninja Code outside of the /modules/ninja folder. + +Ninja Folder: +- This folder contains 90% of Ninja code and will eventually contain it all, once snowflake is cleaned out + +*/ diff --git a/code/modules/ninja/__ninjaDefines.dm b/code/modules/ninja/__ninjaDefines.dm new file mode 100644 index 00000000000..a8dc65f9f13 --- /dev/null +++ b/code/modules/ninja/__ninjaDefines.dm @@ -0,0 +1,13 @@ + +/* + +Contents: +- Definitions, because the original Ninja code has so much magic. + +*/ + + +//ninjacost() specificCheck defines +#define N_STEALTH_CANCEL 1 +#define N_SMOKE_BOMB 2 +#define N_ADRENALINE 3 \ No newline at end of file diff --git a/code/modules/ninja/admin_ninja_verbs.dm b/code/modules/ninja/admin_ninja_verbs.dm new file mode 100644 index 00000000000..59baa2c48e9 --- /dev/null +++ b/code/modules/ninja/admin_ninja_verbs.dm @@ -0,0 +1,61 @@ + +/* + +Contents: +- Admin procs that make ninjas + +*/ + + +//ADMIN CREATE NINJA (From Player) +/client/proc/cmd_admin_ninjafy(var/mob/living/carbon/human/H in player_list) + set category = null + set name = "Make Space Ninja" + + if(!ticker) + alert("Wait until the game starts") + return + + if(!istype(H)) + return + + if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") + return + + log_admin("[key_name(src)] turned [H.key] into a Space Ninja.") + H.mind = create_ninja_mind(H.key) + H.mind_initialize() + H.equip_space_ninja(1) + if(istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja)) + H.wear_suit:randomize_param() + spawn(0) + H.wear_suit:ninitialize(10,H) + + +//ADMIN CREATE NINJA (From Ghost) +/client/proc/send_space_ninja() + set category = "Fun" + set name = "Spawn Space Ninja" + set desc = "Spawns a space ninja for when you need a teenager with attitude." + set popup_menu = 0 + + if(!holder) + src << "Only administrators may use this command." + return + if(!ticker.mode) + alert("The game hasn't started yet!") + return + if(alert("Are you sure you want to send in a space ninja?",,"Yes","No")=="No") + return + + var/client/C = input("Pick character to spawn as the Space Ninja", "Key", "") as null|anything in clients + if(!C) + return + + var/datum/round_event/ninja/E = new /datum/round_event/ninja() + E.key=C.key + + message_admins("[key_name_admin(key)] has spawned [key_name_admin(C.key)] as a Space Ninja.") + log_admin("[key] used Spawn Space Ninja.") + + return \ No newline at end of file diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm new file mode 100644 index 00000000000..0a398a7ba27 --- /dev/null +++ b/code/modules/ninja/energy_katana.dm @@ -0,0 +1,20 @@ + + +/obj/item/weapon/katana/energy + name = "energy katana" + desc = "a katana infused with a strong energy" + icon_state = "energy_katana" + item_state = "energy_katana" + force = 40 + throwforce = 20 + +/obj/item/weapon/katana/energy/afterattack(atom/target, mob/user, proximity_flag, click_parameters) + if(!user || !target) + return + + if(proximity_flag) + target.emag_act() + user.visible_message("[user] masterfully slices [target]!", "You masterfully slice [target]!") + playsound(user, "sparks", 50, 1) + playsound(user, 'sound/weapons/blade1.ogg', 50, 1) + diff --git a/code/modules/ninja/ninja_event.dm b/code/modules/ninja/ninja_event.dm new file mode 100644 index 00000000000..47251f6f556 --- /dev/null +++ b/code/modules/ninja/ninja_event.dm @@ -0,0 +1,214 @@ +//Note to future generations: I didn't write this god-awful code I just ported it to the event system and tried to make it less moon-speaky. +//Don't judge me D; ~Carn //Maximum judging occuring - Remie. + + +/* + +Contents: +- The Ninja "Random" Event +- Ninja creation code + +*/ + +/datum/round_event_control/ninja + name = "Space Ninja" + typepath = /datum/round_event/ninja + max_occurrences = 1 + earliest_start = 30000 // 1 hour + + +/datum/round_event/ninja + var/success_spawn = 0 + + var/helping_station + var/key + var/spawn_loc + + var/mob/living/carbon/human/Ninja + + +/datum/round_event/ninja/setup() + helping_station = rand(0,1) + + +/datum/round_event/ninja/kill() + if(!success_spawn && control) + control.occurrences-- + return ..() + + +/datum/round_event/ninja/start() + //selecting a spawn_loc + if(!spawn_loc) + var/list/spawn_locs = list() + for(var/obj/effect/landmark/L in landmarks_list) + if(isturf(L.loc)) + switch(L.name) + if("ninjaspawn","carpspawn") + spawn_locs += L.loc + if(!spawn_locs.len) + return kill() + spawn_loc = pick(spawn_locs) + if(!spawn_loc) + return kill() + + //selecting a candidate player + if(!key) + var/list/candidates = get_candidates(BE_NINJA) + if(!candidates.len) + return kill() + var/client/C = pick(candidates) + key = C.key + if(!key) + return kill() + + //Prepare ninja player mind + var/datum/mind/Mind = create_ninja_mind(key) + Mind.active = 1 + + //generate objectives - You'll generally get 6 objectives (Ninja is meant to be hardmode!) + var/list/possible_targets = list() + for(var/datum/mind/M in ticker.minds) + if(M.current && M.current.stat != DEAD) + if(istype(M.current,/mob/living/carbon/human)) + if(M.special_role) + possible_targets[M] = 0 //bad-guy + else if(M.assigned_role in command_positions) + possible_targets[M] = 1 //good-guy + + var/list/objectives = list(1,2,3,4) + while(Mind.objectives.len < 6) //still not enough objectives! + switch(pick_n_take(objectives)) + if(1) //research + var/datum/objective/download/O = new /datum/objective/download() + O.owner = Mind + O.gen_amount_goal() + Mind.objectives += O + + if(2) //steal + var/datum/objective/steal/special/O = new /datum/objective/steal/special() + O.owner = Mind + Mind.objectives += O + + if(3) //protect/kill + if(!possible_targets.len) continue + var/selected = rand(1,possible_targets.len) + var/datum/mind/M = possible_targets[selected] + var/is_bad_guy = possible_targets[M] + possible_targets.Cut(selected,selected+1) + + if(is_bad_guy ^ helping_station) //kill (good-ninja + bad-guy or bad-ninja + good-guy) + var/datum/objective/assassinate/O = new /datum/objective/assassinate() + O.owner = Mind + O.target = M + O.explanation_text = "Slay \the [M.current.real_name], the [M.assigned_role]." + Mind.objectives += O + else //protect + var/datum/objective/protect/O = new /datum/objective/protect() + O.owner = Mind + O.target = M + O.explanation_text = "Protect \the [M.current.real_name], the [M.assigned_role], from harm." + Mind.objectives += O + if(4) //debrain/capture + if(!possible_targets.len) continue + var/selected = rand(1,possible_targets.len) + var/datum/mind/M = possible_targets[selected] + var/is_bad_guy = possible_targets[M] + possible_targets.Cut(selected,selected+1) + + if(is_bad_guy ^ helping_station) //debrain (good-ninja + bad-guy or bad-ninja + good-guy) + var/datum/objective/debrain/O = new /datum/objective/debrain() + O.owner = Mind + O.target = M + O.explanation_text = "Steal the brain of [M.current.real_name]." + Mind.objectives += O + else //capture + var/datum/objective/capture/O = new /datum/objective/capture() + O.owner = Mind + O.gen_amount_goal() + Mind.objectives += O + else + break + + //Add a survival objective since it's usually broad enough for any round type. + var/datum/objective/O = new /datum/objective/survive() + O.owner = Mind + Mind.objectives += O + + //add some RP-fluff + Mind.store_memory("I am an elite mercenary assassin of the mighty Spider Clan. A SPACE NINJA!") + Mind.store_memory("Suprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!") + Mind.store_memory("Officially, [helping_station?"Nanotrasen":"The Syndicate"] are my employer.") + + //spawn the ninja and assign the candidate + Ninja = create_space_ninja(spawn_loc) + Mind.transfer_to(Ninja) + + //initialise equipment + if(istype(Ninja.wear_suit,/obj/item/clothing/suit/space/space_ninja)) + //Should be true but we have to check these things. + var/obj/item/clothing/suit/space/space_ninja/N = Ninja.wear_suit + N.randomize_param() + + Ninja.internal = Ninja.s_store + if(Ninja.internals) + Ninja.internals.icon_state = "internal1" + + if(Ninja.mind != Mind) //something has gone wrong! + ERROR("The ninja wasn't assigned the right mind. ;ç;") + + Ninja << sound('sound/effects/ninja_greeting.ogg') //so ninja you probably wouldn't even know if you were made one + + success_spawn = 1 + + +//=======//NINJA CREATION PROCS//=======// + +/proc/create_space_ninja(spawn_loc) + var/mob/living/carbon/human/new_ninja = new(spawn_loc) + if(prob(50)) new_ninja.gender = "female" + var/datum/preferences/A = new()//Randomize appearance for the ninja. + A.real_name = "[pick(ninja_titles)] [pick(ninja_names)]" + A.copy_to(new_ninja) + ready_dna(new_ninja) + new_ninja.equip_space_ninja() + return new_ninja + + +proc/create_ninja_mind(key) + var/datum/mind/Mind = new /datum/mind(key) + Mind.assigned_role = "MODE" + Mind.special_role = "Space Ninja" + ticker.mode.traitors |= Mind //Adds them to current traitor list. Which is really the extra antagonist list. + return Mind + + +/mob/living/carbon/human/proc/equip_space_ninja(safety=0)//Safety in case you need to unequip stuff for existing characters. + if(safety) + qdel(w_uniform) + qdel(wear_suit) + qdel(wear_mask) + qdel(head) + qdel(shoes) + qdel(gloves) + + var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src) + equip_to_slot_or_del(R, slot_ears) + equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform) + equip_to_slot_or_del(new /obj/item/clothing/shoes/space_ninja(src), slot_shoes) + equip_to_slot_or_del(new /obj/item/clothing/suit/space/space_ninja(src), slot_wear_suit) + equip_to_slot_or_del(new /obj/item/clothing/gloves/space_ninja(src), slot_gloves) + equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/space_ninja(src), slot_head) + equip_to_slot_or_del(new /obj/item/clothing/mask/gas/voice/space_ninja(src), slot_wear_mask) + equip_to_slot_or_del(new /obj/item/clothing/glasses/night(src), slot_glasses) + equip_to_slot_or_del(new /obj/item/weapon/katana/energy(src), slot_belt) + equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_r_store) + equip_to_slot_or_del(new /obj/item/weapon/c4(src), slot_l_store) + equip_to_slot_or_del(new /obj/item/weapon/tank/internals/emergency_oxygen(src), slot_s_store) + equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack/carbondioxide(src), slot_back) + + var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(src) + E.imp_in = src + E.implanted = 1 + E.implanted(src) + return 1 diff --git a/code/modules/ninja/suit/SpiderOS.dm b/code/modules/ninja/suit/SpiderOS.dm new file mode 100644 index 00000000000..f73a6cbc3d0 --- /dev/null +++ b/code/modules/ninja/suit/SpiderOS.dm @@ -0,0 +1,277 @@ + + +//HERE BE A VERY LARGE DRAGON + +/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_busy) + display_spideros() + else + affecting << "The interface is locked!" + + +/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/display_to = U//Who do we want to display certain messages to? + + var/dat = "SpiderOS" + dat += " Refresh" + if(spideros) + dat += " | Return" + dat += " | Close" + dat += "
    " + dat += "

    SpiderOS v.1.337

    " + dat += "Welcome, [U.real_name].
    " + dat += "
    " + dat += " Current Time: [worldtime2text()]
    " + dat += " Battery Life: [round(cell.charge/100)]%
    " + dat += " Smoke Bombs: \Roman [s_bombs]
    " + 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_text]. Stage: [D.stage]/[D.max_stages]. Possible Cure: [D.cure_text].
    " + dat += "" + if(1) + dat += "

    Atmospheric Scan:

    "//Headers don't need breaks. They are automatically placed. + var/turf/T = get_turf(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) + var/o2_level = environment.oxygen/total_moles + var/n2_level = environment.nitrogen/total_moles + var/co2_level = environment.carbon_dioxide/total_moles + var/plasma_level = environment.toxins/total_moles + var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level) + dat += "
      " + dat += "
    • Nitrogen: [round(n2_level*100)]%
    • " + dat += "
    • Oxygen: [round(o2_level*100)]%
    • " + dat += "
    • Carbon Dioxide: [round(co2_level*100)]%
    • " + dat += "
    • Plasma: [round(plasma_level*100)]%
    • " + dat += "
    " + if(unknown_level > 0.01) + dat += "OTHER: [round(unknown_level)]%
    " + + dat += "Temperature: [round(environment.temperature-T0C)]°C" + if(2) + dat += "

    Anonymous Messenger:

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

    Detected PDAs:

    " + dat += "
      " + var/count = 0 + for (var/obj/item/device/pda/P in get_viewable_pdas()) + dat += "
    • [P]" + dat += "
    • " + count++ + dat += "
    " + if (count == 0) + dat += "None detected.
    " + 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:
    +
      +
    • *Nanotrasen and the Syndicate are two sides of the same coin and that coin is valuable.
    • +
    • *The Space Wizard Federation is a problem, mainly because they are an extremely dangerous group of unpredictable individuals--not to mention the wizards hate technology and are in direct opposition of the Spider Clan. Best avoided or left well-enough alone. How to battle: wizards possess several powerful abilities to steer clear off. Blind in particular is a nasty spell--jaunt away if you are blinded and never approach a wizard in melee. Stealth may also work if the wizard is not wearing thermal scanners--don't count on this. Run away if you feel threatened and await a better opportunity.
    • +
    • *Changeling Hivemind: extremely dangerous and to be killed on sight. How to battle: they will likely try to absorb you. Adrenaline boost, then phase shift into them. If you get stung, use SpiderOS to inject counter-agents. Stealth may also work but detecting a changeling is the real battle.
    • +
    • *Xeno Hivemind: their skulls make interesting kitchen decorations and are challenging to best, especially in larger nests. How to battle: they can see through your stealth guise and energy stars will not work on them. Best killed with a Phase Shift or at range. If you happen on a projectile stun weapon, use it and then close in to melee.
    • +
    +
    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). +
      +
    • Voice masking generates a random name the ninja can use over the radio and in-person. Although, the former use is recommended.
    • +
    • Toggling vision cycles to one of the following: thermal, meson, or darkness vision. The starting mode allows one to scout the identity of those in view, revealing their role. Traitors, revolutionaries, wizards, and other such people will be made known to you.
    • +
    • Stealth, when activated, drains more battery charge and works similarly to a syndicate cloak. The cloak will deactivate when most Abilities are utilized.
    • +
    • On-board AI: The suit is able to download an AI much like an intellicard. Check with SpiderOS for details once downloaded.
    • +
    • SpiderOS is a specialized, PDA-like screen that allows for a small variety of functions, such as injecting healing chemicals directly from the suit. You are using it now, if that was not already obvious. You may also download AI modules directly to the OS.
    • +
    + Abilities: +
      +
    • *Phase Shift (2000E) and Phase Jaunt (1000E) are unique powers in that they can both be used for defense and offense. Jaunt launches the ninja forward facing up to 9 squares, somewhat randomly selecting the final destination. Shift can only be used on turf in view but is precise (cannot be used on walls). Any living mob in the area teleported to is instantly gibbed (mechs are damaged, huggers and other similar critters are killed). It is possible to teleport with a target, provided you grab them before teleporting.
    • +
    • *Energy Blade (500E) is a highly effective weapon. It is summoned directly to the ninja's hand and can also function as an EMAG for certain objects (doors/lockers/etc). You may also use it to cut through walls and disabled doors. Experiment! The blade will crit humans in two hits. This item cannot be placed in containers and when dropped or thrown disappears. Having an energy blade drains more power from the battery each tick.
    • +
    • *EM Pulse (2500E) is a highly useful ability that will create an electromagnetic shockwave around the ninja, disabling technology whenever possible. If used properly it can render a security force effectively useless. Of course, getting beat up with a toolbox is not accounted for.
    • +
    • *Energy Star (500E) is a ninja star made of green energy AND coated in poison. It works by picking a random living target within range and can be spammed to great effect in incapacitating foes. Just remember that the poison used is also used by the Xeno Hivemind (and will have no effect on them).
    • +
    • *Energy Net (2000E) is a non-lethal solution to incapacitating humanoids. The net is made of non-harmful phase energy and will halt movement as long as it remains in effect--it can be destroyed. If the net is not destroyed, after a certain time it will teleport the target to a holding facility for the Spider Clan and then vanish. You will be notified if the net fails or succeeds in capturing a target in this manner. Combine with energy stars or stripping to ensure success. Abduction never looked this leet.
    • +
    • *Adrenaline Boost (1 E. Boost/3) recovers the user from stun, weakness, and paralysis. Also injects 20 units of radium into the bloodstream.
    • +
    • *Smoke Bomb (1 Sm.Bomb/10) is a weak but potentially useful ability. It creates harmful smoke and can be used in tandem with other powers to confuse enemies.
    • +
    • *???: unleash the True Ultimate Power!
    • +

      IMPORTANT:

      +
        +
      • *Make sure to toggle Special Interaction from the Ninja Equipment menu to interact differently with certain objects.
      • +
      • *Your starting power cell can be replaced if you find one with higher maximum energy capacity by clicking on your suit with the higher capacity cell.
      • +
      • *Conserve your energy. Without it, you are very vulnerable.
      • +
      + That is all you will need to know. The rest will come with practice and talent. Good luck! +

      Master /N

      + "} + if(6) + dat += {" +

      Activate Abilities:

      + + "} + if(7) + dat += "

      Research Stored:

      " + if(t_disk) + dat += "Eject Disk
      " + dat += "
        " + if(istype(stored_research,/list))//If there is stored research. Should be but just in case. + for(var/datum/tech/current_data in stored_research) + dat += "
      • " + dat += "[current_data.name]: [current_data.level]" + if(t_disk)//If there is a disk inserted. We can either write or overwrite. + dat += " *Copy to Disk
        " + dat += "
      • " + dat += "
      " + dat += "" + + //Setting the can>resize etc to 0 remove them from the drag bar but still allows the window to be draggable. + display_to << browse(dat,"window=spideros;size=400x444;border=1;can_resize=1;can_close=0;can_minimize=0") + +//=======//SPIDEROS TOPIC PROC//=======// + +/obj/item/clothing/suit/space/space_ninja/Topic(href, href_list) + ..() + var/mob/living/carbon/human/U = affecting + var/display_to = U + + + if(!affecting||U.stat||!s_initialized)//Check to make sure the guy is wearing the suit after clicking and it's on. + U << "Your suit must be worn and active to use this function." + U << browse(null, "window=spideros")//Closes the window. + return + + switch(href_list["choice"]) + if("Close") + display_to << browse(null, "window=spideros") + return + if("Refresh")//Refresh, goes to the end of the proc. + if("Return")//Return + if(spideros<=9) + spideros=0 + else + spideros = round(spideros/10)//Best way to do this, flooring to nearest integer. + + if("Message") + var/obj/item/device/pda/P = locate(href_list["target"]) + var/t = input(U, "Please enter untraceable message.") as text + t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) + if(!t||U.stat||U.wear_suit!=src||!s_initialized)//Wow, another one of these. Man... + display_to << browse(null, "window=spideros") + return + if(isnull(P)||P.toff)//So it doesn't freak out if the object no-longer exists. + display_to << "Error: unable to deliver message." + display_spideros() + return + P.tnote += "← From an unknown source:
      [t]
      " + if (!P.silent) + playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1) + P.audible_message("\icon[P] *[P.ttone]*", null, 3) + P.overlays.Cut() + P.overlays += image('icons/obj/pda.dmi', "pda-r") + + if("Inject") + if( (href_list["tag"]=="radium"? (reagents.get_reagent_amount("radium"))<=(a_boost*a_transfer) : !reagents.get_reagent_amount(href_list["tag"])) )//Special case for radium. If there are only a_boost*a_transfer radium units left. + display_to << "Error: the suit cannot perform this function. Out of [href_list["name"]]." + else + reagents.reaction(U, 2) + reagents.trans_id_to(U, href_list["tag"], href_list["tag"]=="nutriment"?5:a_transfer)//Nutriment is a special case since it's very potent. Shouldn't influence actual refill amounts or anything. + display_to << "Injecting..." + U << "You feel a tiny prick and a sudden rush of substance in to your veins." + + if("Trigger Ability") + var/ability_name = href_list["name"]+href_list["cost"]//Adds the name and cost to create the full proc name. + var/proc_arguments//What arguments to later pass to the proc, if any. + var/list/targets = list()//To later check for. + var/safety = 0//To later make sure we're triggering the proc when needed. + switch(href_list["name"])//Special case. + if("Phase Shift") + safety = 1 + for(var/turf/T in oview(5,loc)) + targets.Add(T) + if("Energy Net") + safety = 1 + for(var/mob/living/carbon/M in oview(5,loc)) + targets.Add(M) + if(targets.len)//Let's create an argument for the proc if needed. + proc_arguments = pick(targets) + safety = 0 + if(!safety) + U << "[href_list["name"]] suddenly triggered!" + call(src,ability_name)(proc_arguments) + + if("Eject Disk") + var/turf/T = get_turf(loc) + if(!U.get_active_hand()) + U.put_in_hands(t_disk) + t_disk.add_fingerprint(U) + t_disk = null + else + if(T) + t_disk.loc = T + t_disk = null + else + U << "ERROR: Could not eject disk." + + if("Copy to Disk") + var/datum/tech/current_data = locate(href_list["target"]) + U << "[current_data.name] successfully [(!t_disk.stored) ? "copied" : "overwritten"] to disk." + t_disk.stored = current_data + + + display_spideros()//Refreshes the screen by calling it again (which replaces current screen with new screen). + return diff --git a/code/modules/ninja/suit/gloves.dm b/code/modules/ninja/suit/gloves.dm new file mode 100644 index 00000000000..3f23ac333e2 --- /dev/null +++ b/code/modules/ninja/suit/gloves.dm @@ -0,0 +1,343 @@ + + + +/* + Dear ninja gloves + + This isn't because I like you + this is because your father is a bastard + + ... + I guess you're a little cool. + -Sayu +*/ + +/obj/item/clothing/gloves/space_ninja + desc = "These nano-enhanced gloves insulate from electricity and provide fire resistance." + name = "ninja gloves" + icon_state = "s-ninja" + item_state = "s-ninja" + siemens_coefficient = 0 + cold_protection = HANDS + min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT + heat_protection = HANDS + max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT + strip_delay = 120 + var/draining = 0 + var/candrain = 0 + var/mindrain = 200 + var/maxdrain = 400 + +/* + This runs the gamut of what ninja gloves can do + The other option would be a dedicated ninja touch bullshit proc on everything + which would probably more efficient, but ninjas are pretty rare. + This was mostly introduced to keep ninja code from contaminating other code; + with this in place it would be easier to untangle the rest of it. + + For the drain proc, see events/ninja.dm +*/ +/obj/item/clothing/gloves/space_ninja/Touch(var/atom/A,var/proximity) + if(!candrain || draining) + return 0 + var/mob/living/carbon/human/H = loc + if(!istype(H)) + return 0 // what + var/obj/item/clothing/suit/space/space_ninja/suit = H.wear_suit + if(!istype(suit)) + return 0 + if(isturf(A)) + return 0 + + if(!proximity) // todo: you could add ninja stars or computer hacking here + return 0 + + A.add_fingerprint(H) + + // steal energy from powered things + if(istype(A,/mob/living/silicon/robot)) + drain("CYBORG",A,suit) + return 1 + + if(istype(A, /obj/item/weapon/stock_parts/cell)) + drain("CELL", A,suit) + return 1 + + if(istype(A,/obj/machinery/power/apc)) + drain("APC",A,suit) + return 1 + + if(istype(A,/obj/structure/cable)) + drain("WIRE",A,suit) + return 1 + + if(istype(A,/obj/structure/grille)) + var/obj/structure/cable/C = locate() in A.loc + if(C) + drain("WIRE",C,suit) + return 1 + + if(istype(A,/obj/machinery/power/smes)) + drain("SMES",A,suit) + return 1 + + if(istype(A,/obj/mecha)) + drain("MECHA",A,suit) + return 1 + + if(istype(A,/obj/machinery/computer/rdconsole)) // download research + drain("RESEARCH",A,suit) + return 1 + + if(istype(A,/obj/machinery/r_n_d/server)) + A.add_fingerprint(H) + var/obj/machinery/r_n_d/server/S = A + if(S.disabled) + return 1 + if(S.shocked) + S.shock(H,50) + return 1 + drain("RESEARCH",A,suit) + return 1 + + +/obj/item/clothing/gloves/space_ninja/proc/drain(target_type as text, target, obj/suit) + //Var Initialize + var/obj/item/clothing/suit/space/space_ninja/S = suit + var/mob/living/carbon/human/U = S.affecting + var/obj/item/clothing/gloves/space_ninja/G = S.n_gloves + + var/drain = 0//To drain from battery. + var/maxcapacity = 0//Safety check for full battery. + var/totaldrain = 0//Total energy drained. + + G.draining = 1 + + if(target_type!="RESEARCH")//I lumped research downloading here for ease of use. + U << "Now charging battery..." + + switch(target_type) + + if("APC") + var/obj/machinery/power/apc/A = target + if(A.cell&&A.cell.charge) + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, A.loc) + while(G.candrain&&A.cell.charge>0&&!maxcapacity) + drain = rand(G.mindrain,G.maxdrain) + if(A.cell.chargeS.cell.maxcharge) + drain = S.cell.maxcharge-S.cell.charge + maxcapacity = 1//Reached maximum battery capacity. + if (do_after(U,10)) + spark_system.start() + playsound(A.loc, "sparks", 50, 1) + A.cell.charge-=drain + S.cell.charge+=drain + totaldrain+=drain + else break + U << "Gained [totaldrain] energy from the APC." + if(!A.emagged) + flick("apc-spark", src) + A.emagged = 1 + A.locked = 0 + A.update_icon() + else + U << "This APC has run dry of power. You must find another source." + + if("SMES") + var/obj/machinery/power/smes/A = target + if(A.charge) + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, A.loc) + while(G.candrain&&A.charge>0&&!maxcapacity) + drain = rand(G.mindrain,G.maxdrain) + if(A.chargeS.cell.maxcharge) + drain = S.cell.maxcharge-S.cell.charge + maxcapacity = 1 + if (do_after(U,10)) + spark_system.start() + playsound(A.loc, "sparks", 50, 1) + A.charge-=drain + S.cell.charge+=drain + totaldrain+=drain + else break + U << "Gained [totaldrain] energy from the SMES cell." + else + U << "This SMES cell has run dry of power. You must find another source." + + if("CELL") + var/obj/item/weapon/stock_parts/cell/A = target + if(A.charge) + if (G.candrain&&do_after(U,30)) + U << "Gained [A.charge] energy from the cell." + if(S.cell.charge+A.charge>S.cell.maxcharge) + S.cell.charge=S.cell.maxcharge + else + S.cell.charge+=A.charge + A.charge = 0 + G.draining = 0 + A.corrupt() + A.updateicon() + else + U << "Procedure interrupted. Protocol terminated." + else + U << "This cell is empty and of no use." + + if("MACHINERY")//Can be applied to generically to all powered machinery. I'm leaving this alone for now. + var/obj/machinery/A = target + if(A.powered())//If powered. + + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, A.loc) + + var/area/A_Area = get_area(A) + var/obj/machinery/power/apc/B = A_Area.get_apc() //find APC + if(B)//If APC exists. Might not if the area is unpowered like Centcom. + var/datum/powernet/PN = B.terminal.powernet + while(G.candrain&&!maxcapacity&&!isnull(A))//And start a proc similar to drain from wire. + drain = rand(G.mindrain,G.maxdrain) + var/drained = 0 + if(PN&&do_after(U,10)) + drained = min(drain, PN.avail) + PN.load += drained + if(drained < drain)//if no power on net, drain apcs + for(var/obj/machinery/power/terminal/T in PN.nodes) + if(istype(T.master, /obj/machinery/power/apc)) + var/obj/machinery/power/apc/AP = T.master + if(AP.operating && AP.cell && AP.cell.charge>0) + AP.cell.charge = max(0, AP.cell.charge - 5) + drained += 5 + else break + S.cell.charge += drained + if(S.cell.charge>S.cell.maxcharge) + totaldrain += (drained-(S.cell.charge-S.cell.maxcharge)) + S.cell.charge = S.cell.maxcharge + maxcapacity = 1 + else + totaldrain += drained + spark_system.start() + if(drained==0) break + U << "Gained [totaldrain] energy from the power network." + else + U << "Power network could not be found. Aborting." + else + U << "This recharger is not providing energy. You must find another source." + + if("RESEARCH") + var/obj/machinery/A = target + U << "Hacking \the [A]..." + spawn(0) + var/turf/location = get_turf(U) + for(var/mob/living/silicon/ai/AI in player_list) + AI << "Network Alert: Hacking attempt detected[location?" in [location]":". Unable to pinpoint location"]." + if(A:files&&A:files.known_tech.len) + for(var/datum/tech/current_data in S.stored_research) + U << "Checking \the [current_data.name] database." + if(do_after(U, S.s_delay)&&G.candrain&&!isnull(A)) + for(var/datum/tech/analyzing_data in A:files.known_tech) + if(current_data.id==analyzing_data.id) + if(analyzing_data.level>current_data.level) + U << "Database: UPDATED." + current_data.level = analyzing_data.level + break//Move on to next. + else break//Otherwise, quit processing. + U << "Data analyzed. Process finished." + + if("WIRE") + var/obj/structure/cable/A = target + var/datum/powernet/PN = A.powernet + while(G.candrain&&!maxcapacity&&!isnull(A)) + drain = (round((rand(G.mindrain,G.maxdrain))/2)) + var/drained = 0 + if(PN&&do_after(U,10)) + drained = min(drain, PN.avail) + PN.load += drained + if(drained < drain)//if no power on net, drain apcs + for(var/obj/machinery/power/terminal/T in PN.nodes) + if(istype(T.master, /obj/machinery/power/apc)) + var/obj/machinery/power/apc/AP = T.master + if(AP.operating && AP.cell && AP.cell.charge>0) + AP.cell.charge = max(0, AP.cell.charge - 5) + drained += 5 + else break + S.cell.charge += drained + if(S.cell.charge>S.cell.maxcharge) + totaldrain += (drained-(S.cell.charge-S.cell.maxcharge)) + S.cell.charge = S.cell.maxcharge + maxcapacity = 1 + else + totaldrain += drained + S.spark_system.start() + if(drained==0) break + U << "Gained [totaldrain] energy from the power network." + + if("MECHA") + var/obj/mecha/A = target + A.occupant_message("Warning: Unauthorized access through sub-route 4, block H, detected.") + if(A.get_charge()) + while(G.candrain&&A.cell.charge>0&&!maxcapacity) + drain = rand(G.mindrain,G.maxdrain) + if(A.cell.chargeS.cell.maxcharge) + drain = S.cell.maxcharge-S.cell.charge + maxcapacity = 1 + if (do_after(U,10)) + A.spark_system.start() + playsound(A.loc, "sparks", 50, 1) + A.cell.use(drain) + S.cell.charge+=drain + totaldrain+=drain + else break + U << "Gained [totaldrain] energy from [src]." + else + U << "The exosuit's battery has run dry. You must find another source of power." + + if("CYBORG") + var/mob/living/silicon/robot/A = target + A << "Warning: Unauthorized access through sub-route 12, block C, detected." + G.draining = 1 + if(A.cell&&A.cell.charge) + while(G.candrain&&A.cell.charge>0&&!maxcapacity) + drain = rand(G.mindrain,G.maxdrain) + if(A.cell.chargeS.cell.maxcharge) + drain = S.cell.maxcharge-S.cell.charge + maxcapacity = 1 + if (do_after(U,10)) + A.spark_system.start() + playsound(A.loc, "sparks", 50, 1) + A.cell.charge-=drain + S.cell.charge+=drain + totaldrain+=drain + else break + U << "Gained [totaldrain] energy from [A]." + else + U << "Their battery has run dry of power. You must find another source." + + else//Else nothing :< + + G.draining = 0 + + return + + +/obj/item/clothing/gloves/space_ninja/proc/toggled() + set name = "Toggle Interaction" + set desc = "Toggles special interaction on or off." + set category = "Ninja Equip" + + var/mob/living/carbon/human/U = loc + U << "You [candrain?"disable":"enable"] special interaction." + candrain=!candrain + + +/obj/item/clothing/gloves/space_ninja/examine(mob/user) + ..() + if(flags & NODROP) + user << "The energy drain mechanism is: [candrain?"active":"inactive"]." diff --git a/code/modules/ninja/suit/head.dm b/code/modules/ninja/suit/head.dm new file mode 100644 index 00000000000..5707a1bd809 --- /dev/null +++ b/code/modules/ninja/suit/head.dm @@ -0,0 +1,11 @@ + + +/obj/item/clothing/head/helmet/space/space_ninja + desc = "What may appear to be a simple black garment is in fact a highly sophisticated nano-weave helmet. Standard issue ninja gear." + name = "ninja hood" + icon_state = "s-ninja" + item_state = "s-ninja_mask" + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 25) + strip_delay = 12 + unacidable = 1 + blockTracking = 1//Roughly the only unique thing about this helmet. \ No newline at end of file diff --git a/code/modules/ninja/suit/mask.dm b/code/modules/ninja/suit/mask.dm new file mode 100644 index 00000000000..cd8a2ba822d --- /dev/null +++ b/code/modules/ninja/suit/mask.dm @@ -0,0 +1,137 @@ + +/* + +Contents: +- The Ninja Space Mask +- Ninja Space Mask speech modification + +*/ + + + + +/obj/item/clothing/mask/gas/voice/space_ninja + name = "ninja mask" + desc = "A close-fitting mask that acts both as an air filter and a post-modern fashion statement." + icon_state = "s-ninja" + item_state = "s-ninja_mask" + vchange = 1 + strip_delay = 120 + +/obj/item/clothing/mask/gas/voice/space_ninja/speechModification(message) + if(voice == "Unknown") + if(copytext(message, 1, 2) != "*") + var/list/temp_message = text2list(message, " ") + var/list/pick_list = list() + for(var/i = 1, i <= temp_message.len, i++) + pick_list += i + for(var/i=1, i <= abs(temp_message.len/3), i++) + var/H = pick(pick_list) + if(findtext(temp_message[H], "*") || findtext(temp_message[H], ";") || findtext(temp_message[H], ":")) continue + temp_message[H] = ninjaspeak(temp_message[H]) + pick_list -= H + message = list2text(temp_message, " ") + + //The Alternate speech mod is now the main one. + message = replacetext(message, "l", "r") + message = replacetext(message, "rr", "ru") + message = replacetext(message, "v", "b") + message = replacetext(message, "f", "hu") + message = replacetext(message, "'t", "") + message = replacetext(message, "t ", "to ") + message = replacetext(message, " I ", " ai ") + message = replacetext(message, "th", "z") + message = replacetext(message, "is", "izu") + message = replacetext(message, "ziz", "zis") + message = replacetext(message, "se", "su") + message = replacetext(message, "br", "bur") + message = replacetext(message, "ry", "ri") + message = replacetext(message, "you", "yuu") + message = replacetext(message, "ck", "cku") + message = replacetext(message, "eu", "uu") + message = replacetext(message, "ow", "au") + message = replacetext(message, "are", "aa") + message = replacetext(message, "ay", "ayu") + message = replacetext(message, "ea", "ii") + message = replacetext(message, "ch", "chi") + message = replacetext(message, "than", "sen") + message = replacetext(message, ".", "") + message = lowertext(message) + + return message + + + +/obj/item/clothing/mask/gas/voice/space_ninja/New() + verbs += /obj/item/clothing/mask/gas/voice/space_ninja/proc/togglev + + +//This proc is linked to human life.dm. It determines what hud icons to display based on mind special role for most mobs. +/obj/item/clothing/mask/gas/voice/space_ninja/proc/assess_targets(list/target_list, mob/living/carbon/U) + var/icon/tempHud = 'icons/mob/hud.dmi' + for(var/mob/living/target in target_list) + if(iscarbon(target)) + switch(target.mind.special_role) + if("traitor") + U.client.images += image(tempHud,target,"hudtraitor") + if("Revolutionary","Head Revolutionary") + U.client.images += image(tempHud,target,"hudrevolutionary") + if("Cultist") + U.client.images += image(tempHud,target,"hudcultist") + if("Changeling") + U.client.images += image(tempHud,target,"hudchangeling") + if("Wizard","Fake Wizard") + U.client.images += image(tempHud,target,"hudwizard") + if("Hunter","Sentinel","Drone","Queen") + U.client.images += image(tempHud,target,"hudalien") + if("Syndicate") + U.client.images += image(tempHud,target,"hudoperative") + if("Death Commando") + U.client.images += image(tempHud,target,"huddeathsquad") + if("Space 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") + else if(issilicon(target))//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud. + var/mob/living/silicon/silicon_target = target + if(!silicon_target.laws||(silicon_target.laws&&(silicon_target.laws.zeroth||!silicon_target.laws.inherent.len))) + if(isrobot(silicon_target))//Different icons for robutts and AI. + U.client.images += image(tempHud,silicon_target,"hudmalborg") + else + U.client.images += image(tempHud,silicon_target,"hudmalai") + return 1 + + +/obj/item/clothing/mask/gas/voice/space_ninja/proc/togglev() + set name = "Toggle Voice" + set desc = "Toggles the voice synthesizer on or off." + set category = "Ninja Equip" + + var/mob/U = loc//Can't toggle voice when you're not wearing the mask. + var/vchange = (alert("Would you like to synthesize a new name or turn off the voice synthesizer?",,"New Name","Turn Off")) + if(vchange == "New Name") + var/chance = rand(1,100) + switch(chance) + if(1 to 50)//High chance of a regular name. + voice = "[rand(0,1) == 1 ? pick(first_names_female) : pick(first_names_male)] [pick(last_names)]" + if(51 to 80)//Smaller chance of a clown name. + voice = "[pick(clown_names)]" + if(81 to 90)//Small chance of a wizard name. + voice = "[pick(wizard_first)] [pick(wizard_second)]" + if(91 to 100)//Small chance of an existing crew name. + var/list/names = list() + for(var/mob/living/carbon/human/M in player_list) + if(M == U || !M.client || !M.real_name) + continue + names.Add(M.real_name) + voice = !names.len ? "Cuban Pete" : pick(names) + U << "You are now mimicking [voice]." + else + U << "The voice synthesizer is [voice!="Unknown"?"now":"already"] deactivated." + voice = "Unknown" + return + + +/obj/item/clothing/mask/gas/voice/space_ninja/examine(mob/user) + ..() + user << "Voice mimicking algorithm is set [!vchange?"inactive":"active"]." diff --git a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm new file mode 100644 index 00000000000..86d1cc128f8 --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -0,0 +1,174 @@ +/* +It will teleport people to a holding facility after 30 seconds. (Check the process() proc to change where teleport goes) +It is possible to destroy the net by the occupant or someone else. +*/ + +/obj/effect/energy_net + name = "energy net" + desc = "It's a net made of green energy." + icon = 'icons/effects/effects.dmi' + icon_state = "energynet" + + density = 1//Can't pass through. + opacity = 0//Can see through. + mouse_opacity = 1//So you can hit it with stuff. + anchored = 1//Can't drag/grab the trapped mob. + + var/health = 25//How much health it has. + var/mob/living/affecting = null//Who it is currently affecting, if anyone. + var/mob/living/master = null//Who shot web. Will let this person know if the net was successful or failed. + + + +/obj/effect/energy_net/proc/healthcheck() + if(health <=0) + density = 0 + if(affecting) + var/mob/living/carbon/M = affecting + M.anchored = 0 + for(var/mob/O in viewers(src, 3)) + O.show_message("[M.name] was recovered from the energy net!", 1, "You hear a grunt.", 2) + if(!isnull(master))//As long as they still exist. + master << "ERROR: unable to initiate transport protocol. Procedure terminated." + qdel(src) + return + + + +/obj/effect/energy_net/process(var/mob/living/carbon/M as mob) + var/check = 30//30 seconds before teleportation. Could be extended I guess. + var/mob_name = affecting.name//Since they will report as null if terminated before teleport. + //The person can still try and attack the net when inside. + while(!isnull(M)&&!isnull(src)&&check>0)//While M and net exist, and 30 seconds have not passed. + check-- + sleep(10) + + if(isnull(M)||M.loc!=loc)//If mob is gone or not at the location. + if(!isnull(master))//As long as they still exist. + master << "ERROR: unable to locate \the [mob_name]. Procedure terminated." + qdel(src)//Get rid of the net. + return + + if(!isnull(src))//As long as both net and person exist. + //No need to check for countdown here since while() broke, it's implicit that it finished. + + density = 0//Make the net pass-through. + invisibility = 101//Make the net invisible so all the animations can play out. + health = INFINITY//Make the net invincible so that an explosion/something else won't kill it while, spawn() is running. + for(var/obj/item/W in M) + if(istype(M,/mob/living/carbon/human)) + if(W==M:w_uniform) continue//So all they're left with are shoes and uniform. + if(W==M:shoes) continue + M.unEquip(W) + + spawn(0) + playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1) + anim(M.loc,M,'icons/mob/mob.dmi',,"phaseout",,M.dir) + + M.loc = pick(holdingfacility)//Throw mob in to the holding facility. + M << "You appear in a strange place!" + + spawn(0) + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, M.loc) + spark_system.start() + playsound(M.loc, 'sound/effects/phasein.ogg', 25, 1) + playsound(M.loc, 'sound/effects/sparks2.ogg', 50, 1) + anim(M.loc,M,'icons/mob/mob.dmi',,"phasein",,M.dir) + qdel(src)//Wait for everything to finish, delete the net. Else it will stop everything once net is deleted, including the spawn(0). + + for(var/mob/O in viewers(src, 3)) + O.show_message("[M] vanished!", 1, "You hear sparks flying!", 2) + + if(!isnull(master))//As long as they still exist. + master << "SUCCESS: transport procedure of \the [affecting] complete." + + M.anchored = 0//Important. + + else//And they are free. + M << "You are free of the net!" + return + + + +/obj/effect/energy_net/bullet_act(var/obj/item/projectile/Proj) + health -= Proj.damage + healthcheck() + ..() + + + +/obj/effect/energy_net/ex_act(severity, target) + switch(severity) + if(1.0) + health-=50 + if(2.0) + health-=50 + if(3.0) + health-=prob(50)?50:25 + healthcheck() + return + + + +/obj/effect/energy_net/blob_act() + health-=50 + healthcheck() + return + + + +/obj/effect/energy_net/hitby(AM as mob|obj) + ..() + visible_message("[src] was hit by [AM].") + var/tforce = 0 + if(ismob(AM)) + tforce = 10 + else + tforce = AM:throwforce + playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) + health = max(0, health - tforce) + healthcheck() + ..() + return + + + +/obj/effect/energy_net/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + user.visible_message("[user] rips the energy net apart!", \ + "You easily destroy the energy net.") + health-=50 + healthcheck() + + + +/obj/effect/energy_net/attack_paw(mob/user) + return attack_hand() + + + +/obj/effect/energy_net/attack_alien(mob/living/user as mob) + user.do_attack_animation(src) + if (islarva(user)) + return + playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1) + health -= rand(10, 20) + if(health > 0) + user.visible_message("[user] claws at the energy net!", \ + "\green You claw at the net.") + else + user.visible_message("[user] slices the energy net apart!", \ + "\green You slice the energy net to pieces.") + healthcheck() + return + + + +/obj/effect/energy_net/attackby(obj/item/weapon/W as obj, mob/user as mob, params) + var/aforce = W.force + health = max(0, health - aforce) + healthcheck() + ..() + return + diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm new file mode 100644 index 00000000000..d6dc568105f --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm @@ -0,0 +1,26 @@ + + +//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(0,N_ADRENALINE))//Have to make sure stat is not counted for this ability. + var/mob/living/carbon/human/H = affecting + H.SetParalysis(0) + H.SetStunned(0) + H.SetWeakened(0) + + H.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. + H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) + spawn(70) + reagents.reaction(H, 2) + reagents.trans_id_to(H, "radium", a_transfer) + H << "You are beginning to feel the after-effect of the injection." + a_boost-- + s_coold = 3 + return \ No newline at end of file diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm new file mode 100644 index 00000000000..1675dda4530 --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm @@ -0,0 +1,29 @@ + + +//Cost function for suit Procs/Verbs/Abilities +/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(cost = 0, specificCheck = 0) + var/mob/living/carbon/human/H = affecting + if((H.stat || H.incorporeal_move) && (specificCheck != N_ADRENALINE))//Will not return if user is using an adrenaline booster since you can use them when stat==1. + H << "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 + + var/actualCost = cost*10 + if(cost && cell.charge < actualCost) + H << "Not enough energy." + return 1 + else + //This shit used to be handled individually on every proc.. why even bother with a universal check proc then? + cell.charge-=(actualCost) + + switch(specificCheck) + if(N_STEALTH_CANCEL) + cancel_stealth()//Get rid of it. + if(N_SMOKE_BOMB) + if(!s_bombs) + H << "There are no more smoke bombs remaining." + return 1 + if(N_ADRENALINE) + if(!a_boost) + H << "You do not have any more adrenaline boosters." + return 1 + return (s_coold)//Returns the value of the variable which counts down to zero. \ No newline at end of file diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_empulse.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_empulse.dm new file mode 100644 index 00000000000..8cfc6b89370 --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_empulse.dm @@ -0,0 +1,15 @@ + + +//Disables nearby tech equipment. +/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse() + set name = "EM Burst (25E)" + set desc = "Disable any nearby technology with a electro-magnetic pulse." + set category = "Ninja Ability" + set popup_menu = 0 + + if(!ninjacost(250,N_STEALTH_CANCEL)) + var/mob/living/carbon/human/H = affecting + playsound(H.loc, 'sound/effects/EMPulse.ogg', 60, 2) + empulse(H, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch. + s_coold = 2 + return \ No newline at end of file diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm new file mode 100644 index 00000000000..0a28094ca91 --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -0,0 +1,32 @@ + +//Allows the ninja to kidnap people +/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/C in oview())//Only living carbon mobs. + set name = "Energy Net (20E)" + 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 + + if(!ninjacost(200,N_STEALTH_CANCEL) && iscarbon(C)) + var/mob/living/carbon/human/H = affecting + if(C.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame. + if(!locate(/obj/effect/energy_net) in C.loc)//Check if they are already being affected by an energy net. + for(var/turf/T in getline(H.loc, C.loc)) + if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy. + H << "You may not use an energy net through solid obstacles!" + return + spawn(0) + H.Beam(C,"n_beam",,15) + C.anchored = 1//Anchors them so they can't move. + H.say("Get over here!") + var/obj/effect/energy_net/E = new /obj/effect/energy_net(C.loc) + E.layer = C.layer+1//To have it appear one layer above the mob. + H.visible_message("[H] caught [C] with an energy net!","You caught [C] with an energy net!") + E.affecting = C + E.master = H + spawn(0)//Parallel processing. + E.process(C) + else + H << "They are already trapped inside an energy net." + else + H << "They will bring no honor to your Clan!" + return \ No newline at end of file diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_smoke.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_smoke.dm new file mode 100644 index 00000000000..8d2ff7c3cfe --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_smoke.dm @@ -0,0 +1,19 @@ + + +//Smoke bomb +/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(0,N_SMOKE_BOMB)) + var/mob/living/carbon/human/H = affecting + H << "There are [s_bombs] smoke bombs remaining." + var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread() + smoke.set_up(10, 0, H.loc) + smoke.start() + playsound(H.loc, 'sound/effects/bamf.ogg', 50, 2) + s_bombs-- + s_coold = 1 + return \ No newline at end of file diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_stars.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_stars.dm new file mode 100644 index 00000000000..9196ed92be7 --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_stars.dm @@ -0,0 +1,33 @@ + + +//Shoots ninja stars at a random target +/obj/item/clothing/suit/space/space_ninja/proc/ninjastar() + set name = "Energy Star (5E)" + set desc = "Launches an energy star at a random living target." + set category = "Ninja Ability" + set popup_menu = 0 + + if(!ninjacost(50)) + var/mob/living/carbon/human/H = affecting + var/list/targets = list() + 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 = get_turf(H) + var/turf/targloc = get_turf(target) + if (!targloc || !curloc) + return + if (targloc == curloc) + return + var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(curloc) + A.current = curloc + A.yo = targloc.y - curloc.y + A.xo = targloc.x - curloc.x + + A.fire() + else + H << "There are no targets in view." + return diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm new file mode 100644 index 00000000000..e87ac8e1ff8 --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_stealth.dm @@ -0,0 +1,78 @@ + +/* + +Contents: +- Stealth Verbs +- Stealth Icon Stuff + +*/ + + +/obj/item/clothing/suit/space/space_ninja/proc/toggle_stealth() + var/mob/living/carbon/human/U = affecting + if(s_active) + cancel_stealth() + else + spawn(0) + anim(U.loc,U,'icons/mob/mob.dmi',,"cloak",,U.dir) + s_active=!s_active + U.alpha = 0 + U.visible_message("[U.name] vanishes into thin air!", \ + "You are now invisible to normal detection.") + return + + +/obj/item/clothing/suit/space/space_ninja/proc/cancel_stealth() + var/mob/living/carbon/human/U = affecting + if(s_active) + spawn(0) + anim(U.loc,U,'icons/mob/mob.dmi',,"uncloak",,U.dir) + s_active=!s_active + U.alpha = 255 + U.visible_message("[U.name] appears from thin air!", \ + "You are now visible.") + return 1 + return 0 + + +/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_busy) + toggle_stealth() + else + affecting << "Stealth does not appear to work!" + + +//Allows the mob to grab a stealth icon. +/mob/proc/NinjaStealthActive(atom/A)//A is the atom which we are using as the overlay. + invisibility = INVISIBILITY_LEVEL_TWO//Set ninja invis to 2. + var/icon/opacity_icon = new(A.icon, A.icon_state) + var/icon/alpha_mask = getIconMask(src) + var/icon/alpha_mask_2 = new('icons/effects/effects.dmi', "at_shield1") + alpha_mask.AddAlphaMask(alpha_mask_2) + opacity_icon.AddAlphaMask(alpha_mask) + for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it. + var/image/I = image("icon" = opacity_icon, "icon_state" = A.icon_state, "layer" = layer+0.8)//So it's above other stuff but below weapons and the like. + switch(i)//Now to determine offset so the result is somewhat blurred. + if(1) + I.pixel_x -= 1 + if(2) + I.pixel_x += 1 + if(3) + I.pixel_y -= 1 + if(4) + I.pixel_y += 1 + + overlays += I//And finally add the overlay. + overlays += image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = layer+0.9) + +//When ninja steal malfunctions. +/mob/proc/NinjaStealthMalf() + invisibility = 0//Set ninja invis to 0. + overlays += image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = layer+0.9) + playsound(loc, 'sound/effects/stealthoff.ogg', 75, 1) + + diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm new file mode 100644 index 00000000000..27f46f0d8ee --- /dev/null +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_teleporting.dm @@ -0,0 +1,89 @@ + + +/* + +Contents: +- Proc for handling teleporting while grabbing someone +- Telport Ability +- Right-Click Teleport Ability + +*/ + + +//Handles elporting while grabbing someone +/obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/H) + if(istype(H.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons. + var/obj/item/weapon/grab/G = H.get_active_hand() + G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position. + if(istype(H.get_inactive_hand(),/obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = H.get_inactive_hand() + G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position. + return + + +//Jaunt +/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt() + set name = "Phase Jaunt (10E)" + set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing." + set category = "Ninja Ability" + set popup_menu = 0 + + if(!ninjacost(100,N_STEALTH_CANCEL)) + var/mob/living/carbon/human/H = affecting + var/turf/destination = get_teleport_loc(H.loc,H,9,1,3,1,0,1) + var/turf/mobloc = get_turf(H.loc)//Safety + + if(destination&&istype(mobloc, /turf))//So we don't teleport out of containers + spawn(0) + playsound(H.loc, "sparks", 50, 1) + anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,H.dir) + + handle_teleport_grab(destination, H) + H.loc = destination + + spawn(0) + spark_system.start() + playsound(H.loc, 'sound/effects/phasein.ogg', 25, 1) + playsound(H.loc, "sparks", 50, 1) + anim(H.loc,H,'icons/mob/mob.dmi',,"phasein",,H.dir) + + spawn(0) + destination.phase_damage_creatures(20,H)//Paralyse and damage mobs and mechas on the turf + s_coold = 1 + else + H << "The VOID-shift device is malfunctioning, teleportation failed." + return + + +//Right-Click teleport: It's basically admin "jump to turf" +/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview()) + set name = "Phase Shift (20E)" + 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! + + if(!ninjacost(200,N_STEALTH_CANCEL)) + var/mob/living/carbon/human/H = affecting + var/turf/mobloc = get_turf(H.loc)//To make sure that certain things work properly below. + if((!T.density)&&istype(mobloc, /turf)) + spawn(0) + playsound(H.loc, 'sound/effects/sparks4.ogg', 50, 1) + anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,H.dir) + + handle_teleport_grab(T, H) + H.loc = T + + spawn(0) + spark_system.start() + playsound(H.loc, 'sound/effects/phasein.ogg', 25, 1) + playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1) + anim(H.loc,H,'icons/mob/mob.dmi',,"phasein",,H.dir) + + spawn(0)//Any living mobs in teleport area are gibbed. + T.phase_damage_creatures(20,H)//Paralyse and damage mobs and mechas on the turf + s_coold = 1 + else + H << "You cannot teleport into solid walls or from solid matter" + return + + diff --git a/code/modules/ninja/suit/shoes.dm b/code/modules/ninja/suit/shoes.dm new file mode 100644 index 00000000000..732f8a37e8d --- /dev/null +++ b/code/modules/ninja/suit/shoes.dm @@ -0,0 +1,14 @@ + +/obj/item/clothing/shoes/space_ninja + name = "ninja shoes" + desc = "A pair of running shoes. Excellent for running and even better for smashing skulls." + icon_state = "s-ninja" + item_state = "secshoes" + permeability_coefficient = 0.01 + flags = NOSLIP + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + strip_delay = 120 + cold_protection = FEET + min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT + heat_protection = FEET + max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT \ No newline at end of file diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm new file mode 100644 index 00000000000..cfe6dc3c807 --- /dev/null +++ b/code/modules/ninja/suit/suit.dm @@ -0,0 +1,172 @@ + +/* + +Contents: +- The Ninja Space Suit +- Ninja Space Suit Procs + +*/ + + +// /obj/item/clothing/suit/space/space_ninja + + +/obj/item/clothing/suit/space/space_ninja + name = "ninja suit" + desc = "A unique, vaccum-proof suit of nano-enhanced armor designed specifically for Spider Clan assassins." + icon_state = "s-ninja" + item_state = "s-ninja_suit" + allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank/internals,/obj/item/weapon/stock_parts/cell) + slowdown = 0 + unacidable = 1 + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + strip_delay = 12 + + //Important parts of the suit. + var/mob/living/carbon/human/affecting = null + var/obj/item/weapon/stock_parts/cell/cell + var/datum/effect/effect/system/spark_spread/spark_system + var/list/reagent_list = list("omnizine","salbutamol","spaceacillin","charcoal","nutriment","radium","potass_iodide")//The reagents ids which are added to the suit at New(). + var/list/stored_research = list()//For stealing station research. + var/obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk. + + //Other articles of ninja gear worn together, used to easily reference them after initializing. + 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 + + //Main function variables. + var/s_initialized = 0//Suit starts off. + var/s_coold = 0//If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick(). + var/s_cost = 5.0//Base energy cost each ntick. + var/s_acost = 25.0//Additional cost for additional powers active. + var/s_delay = 40.0//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability. + var/a_transfer = 20.0//How much reagent is transferred when injecting. + var/r_maxamount = 80.0//How much reagent in total there is. + + //Support function variables. + var/spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check ninja_equipment.dm for how it all works. + var/s_active = 0//Stealth off. + var/s_busy = 0//Is the suit busy with a process? Like AI hacking. Used for safety functions. + + //Ability function variables. + var/s_bombs = 10.0//Number of starting ninja smoke bombs. + var/a_boost = 3.0//Number of adrenaline boosters. + + +/obj/item/clothing/suit/space/space_ninja/New() + ..() + verbs += /obj/item/clothing/suit/space/space_ninja/proc/init//suit initialize verb + + //Spark Init + spark_system = new() + spark_system.set_up(5, 0, src) + spark_system.attach(src) + + //Research Init + stored_research = new() + for(var/T in typesof(/datum/tech) - /datum/tech)//Store up on research. + stored_research += new T(src) + + //Reagent Init + var/reagent_amount + for(var/reagent_id in reagent_list) + reagent_amount += reagent_id == "radium" ? r_maxamount+(a_boost*a_transfer) : r_maxamount + 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 Init + cell = new/obj/item/weapon/stock_parts/cell/high + cell.charge = 9000 + + + +/obj/item/clothing/suit/space/space_ninja/Destroy() + if(affecting) + affecting << browse(null, "window=hack spideros") + ..() + + +//Simply deletes all the attachments and self, killing all related procs. +/obj/item/clothing/suit/space/space_ninja/proc/terminate() + qdel(n_hood) + qdel(n_gloves) + qdel(n_shoes) + qdel(src) + + +//Randomizes suit parameters. +/obj/item/clothing/suit/space/space_ninja/proc/randomize_param() + s_cost = rand(1,20) + s_acost = rand(20,100) + s_delay = rand(10,100) + s_bombs = rand(5,20) + a_boost = rand(1,7) + + +//This proc prevents the suit from being taken off. +/obj/item/clothing/suit/space/space_ninja/proc/lock_suit(mob/living/carbon/human/H, var/checkIcons = 0) + if(!istype(H)) + return 0 + if(checkIcons) + icon_state = H.gender==FEMALE ? "s-ninjanf" : "s-ninjan" + H.gloves.icon_state = "s-ninjan" + H.gloves.item_state = "s-ninjan" + else + if(H.mind.special_role!="Space Ninja") + H << "\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..." + H.gib() + return 0 + if(!istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja)) + H << "ERROR: 100113 UNABLE TO LOCATE HEAD GEAR\nABORTING..." + return 0 + if(!istype(H.shoes, /obj/item/clothing/shoes/space_ninja)) + H << "ERROR: 122011 UNABLE TO LOCATE FOOT GEAR\nABORTING..." + return 0 + if(!istype(H.gloves, /obj/item/clothing/gloves/space_ninja)) + H << "ERROR: 110223 UNABLE TO LOCATE HAND GEAR\nABORTING..." + return 0 + + affecting = H + flags |= NODROP //colons make me go all |= + slowdown = 0 + n_hood = H.head + n_hood.flags |= NODROP + n_shoes = H.shoes + n_shoes.flags |= NODROP + n_shoes.slowdown-- + n_gloves = H.gloves + n_gloves.flags |= NODROP + + return 1 + + +//This proc allows the suit to be taken off. +/obj/item/clothing/suit/space/space_ninja/proc/unlock_suit() + affecting = null + flags &= ~NODROP + slowdown = 1 + icon_state = "s-ninja" + if(n_hood)//Should be attached, might not be attached. + n_hood.flags &= ~NODROP + if(n_shoes) + n_shoes.flags &= ~NODROP + n_shoes.slowdown++ + if(n_gloves) + n_gloves.icon_state = "s-ninja" + n_gloves.item_state = "s-ninja" + n_gloves.flags &= ~NODROP + n_gloves.candrain=0 + n_gloves.draining=0 + + +/obj/item/clothing/suit/space/space_ninja/examine(mob/user) + ..() + if(s_initialized) + if(user == affecting) + user << "All systems operational. Current energy capacity: [cell.charge]." + user << "The CLOAK-tech device is [s_active?"active":"inactive"]." + user << "There are [s_bombs] smoke bomb\s remaining." + user << "There are [a_boost] adrenaline booster\s remaining." diff --git a/code/modules/ninja/suit/suit_attackby.dm b/code/modules/ninja/suit/suit_attackby.dm new file mode 100644 index 00000000000..e7098179d6a --- /dev/null +++ b/code/modules/ninja/suit/suit_attackby.dm @@ -0,0 +1,61 @@ + + +/obj/item/clothing/suit/space/space_ninja/attackby(obj/item/I, mob/U, params) + if(U==affecting)//Safety, in case you try doing this without wearing the suit/being the person with the suit. + + if(istype(I, /obj/item/weapon/reagent_containers/glass))//If it's a glass beaker. + var/total_reagent_transfer//Keep track of this stuff. + for(var/reagent_id in reagent_list) + var/datum/reagent/R = I.reagents.has_reagent(reagent_id)//Mostly to pull up the name of the reagent after calculating. Also easier to use than writing long proc paths. + if(R&&reagents.get_reagent_amount(reagent_id)=a_transfer)//Radium is always special. + //Here we determine how much reagent will actually transfer if there is enough to transfer or there is a need of transfer. Minimum of max amount available (using a_transfer) or amount needed. + var/amount_to_transfer = min( (r_maxamount+(reagent_id == "radium"?(a_boost*a_transfer):0)-reagents.get_reagent_amount(reagent_id)) ,(round(R.volume/a_transfer))*a_transfer)//In the end here, we round the amount available, then multiply it again. + R.volume -= amount_to_transfer//Remove from reagent volume. Don't want to delete the reagent now since we need to perserve the name. + reagents.add_reagent(reagent_id, amount_to_transfer)//Add to suit. Reactions are not important. + total_reagent_transfer += amount_to_transfer//Add to total reagent trans. + U << "Added [amount_to_transfer] units of [R.name]."//Reports on the specific reagent added. + I.reagents.update_total()//Now we manually update the total to make sure everything is properly shoved under the rug. + + U << "Replenished a total of [total_reagent_transfer ? total_reagent_transfer : "zero"] chemical units."//Let the player know how much total volume was added. + return + + else if(istype(I, /obj/item/weapon/stock_parts/cell)) + var/obj/item/weapon/stock_parts/cell/CELL + if(CELL.maxcharge > cell.maxcharge && n_gloves && n_gloves.candrain) + U << "Higher maximum capacity detected.\nUpgrading..." + if (n_gloves && n_gloves.candrain && do_after(U,s_delay)) + U.drop_item() + CELL.loc = src + CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge) + var/obj/item/weapon/stock_parts/cell/old_cell = cell + old_cell.charge = 0 + U.put_in_hands(old_cell) + old_cell.add_fingerprint(U) + old_cell.corrupt() + old_cell.updateicon() + cell = CELL + U << "Upgrade complete. Maximum capacity: [round(cell.maxcharge/100)]%" + else + U << "Procedure interrupted. Protocol terminated." + return + + else if(istype(I, /obj/item/weapon/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit. + var/obj/item/weapon/disk/tech_disk/TD = I + if(TD.stored)//If it has something on it. + U << "Research information detected, processing..." + if(do_after(U,s_delay)) + for(var/datum/tech/current_data in stored_research) + if(current_data.id==TD.stored.id) + if(current_data.levelData analyzed and updated. Disk erased." + else + U << "ERROR: Procedure interrupted. Process terminated." + else + I.loc = src + t_disk = I + U << "You slot \the [I] into \the [src]." + return + ..() \ No newline at end of file diff --git a/code/modules/ninja/suit/suit_initialisation.dm b/code/modules/ninja/suit/suit_initialisation.dm new file mode 100644 index 00000000000..967f6e3871e --- /dev/null +++ b/code/modules/ninja/suit/suit_initialisation.dm @@ -0,0 +1,102 @@ + +//Verbs link to procs because verb-like procs have a bug which prevents their use if the arguments are not readily referenced. +//^ Old coder words may be false these days, Not taking the risk for now. + +/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() + +/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_busy) + deinitialize() + else + affecting << "The function did not trigger!" + + +/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 << "Now initializing..." + if(1) + if(!lock_suit(U))//To lock the suit onto wearer. + break + U << "Securing external locking mechanism...\nNeural-net established." + if(2) + U << "Extending neural-net interface...\nNow monitoring brain wave pattern..." + if(3) + if(U.stat==2||U.health<=0) + U << "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 << " Linking neural-net interface...\nPattern\green GREEN, continuing operation." + if(4) + U << "VOID-shift device status: ONLINE.\nCLOAK-tech device status: ONLINE." + if(5) + U << "Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [cell.charge]." + if(6) + U << "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 << "The suit is already functioning. Please report this bug." + else + U << "ERROR: You cannot use this function at this time." + return + + + +/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 << "The suit is not initialized. 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) + U << "ERROR: You cannot use this function at this time." + return + s_busy = 1 + for(var/i = 0,i<7,i++) + switch(i) + if(0) + U << "Now de-initializing..." + spideros = 0//Spideros resets. + if(1) + U << "Logging off, [U:real_name]. Shutting down SpiderOS." + remove_ninja_verbs() + if(2) + U << "Primary system status: OFFLINE.\nBackup system status: OFFLINE." + if(3) + U << "VOID-shift device status: OFFLINE.\nCLOAK-tech device status: OFFLINE." + cancel_stealth()//Shutdowns stealth. + if(4) + U << "Disconnecting neural-net interface...\greenSuccess." + if(5) + U << "Disengaging neural-net interface...\greenSuccess." + if(6) + U << "Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED." + remove_equip_verbs() + unlock_suit() + U.regenerate_icons() + sleep(delay) + s_busy = 0 + return \ No newline at end of file diff --git a/code/modules/ninja/suit/suit_process.dm b/code/modules/ninja/suit/suit_process.dm new file mode 100644 index 00000000000..6440ffc71c9 --- /dev/null +++ b/code/modules/ninja/suit/suit_process.dm @@ -0,0 +1,28 @@ + + +/obj/item/clothing/suit/space/space_ninja/proc/ntick(mob/living/carbon/human/U = affecting) + set background = BACKGROUND_ENABLED + + //Runs in the background while the suit is initialized. + spawn while(cell.charge) + + //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. + + //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(s_active)//If stealth is active. + A += s_acost + cell.charge-=A + + if(!cell.charge) + cell.charge=0 + cancel_stealth() + + sleep(10)//Checks every second. diff --git a/code/modules/ninja/suit/suit_verbs_handlers.dm b/code/modules/ninja/suit/suit_verbs_handlers.dm new file mode 100644 index 00000000000..17ba1ca3910 --- /dev/null +++ b/code/modules/ninja/suit/suit_verbs_handlers.dm @@ -0,0 +1,52 @@ +/* + +Contents: +- Procs that add ninja verbs to ninjas +- Procs that remove ninja verbs from ninjas +- Procs that add ninjasuit verbs to ninjas +- Procs that remove ninjasuit verbs from ninjas + +*/ + +/obj/item/clothing/suit/space/space_ninja/proc/grant_equip_verbs() + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init + verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit + verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros + verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth + n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled + + s_initialized = 1 + + +/obj/item/clothing/suit/space/space_ninja/proc/remove_equip_verbs() + verbs += /obj/item/clothing/suit/space/space_ninja/proc/init + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth + if(n_gloves) + n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled + + s_initialized = 0 + + +/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs() + verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift + verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt + verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke + verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost + verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse + verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar + verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet + + s_initialized=1 + slowdown=0 + + +/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs() + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar + verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet diff --git a/code/modules/power/cell.dm b/code/modules/power/cell.dm index 97fa83a7f47..a73e924ee08 100644 --- a/code/modules/power/cell.dm +++ b/code/modules/power/cell.dm @@ -57,15 +57,6 @@ else user << "The charge meter reads [round(src.percent() )]%." -/obj/item/weapon/stock_parts/cell/attack_self(mob/user as mob) - src.add_fingerprint(user) - if(ishuman(user)) - var/mob/living/carbon/human/H = user - var/obj/item/clothing/gloves/space_ninja/SNG = H.gloves - if(!istype(SNG) || !SNG.candrain || SNG.draining) return - - SNG.drain("CELL",src,H.wear_suit) - return /obj/item/weapon/stock_parts/cell/attackby(obj/item/W, mob/user, params) ..() diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 7079ae6bf26..eed22285c4d 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -80,6 +80,7 @@ user << "You transfer [trans] unit\s of the solution to [target]." //Safety for dumping stuff into a ninja suit. It handles everything through attackby() and this is unnecessary. //gee thanks noize + //NINJACODE else if(istype(target, /obj/item/clothing/suit/space/space_ninja)) return diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index ef4b2049d97..b4d951cc78e 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -115,10 +115,6 @@ else return - if(istype(I, /obj/item/weapon/melee/energy/blade)) - user << "You can't place \the [I] into \the [src]." - return - if(istype(I, /obj/item/weapon/storage/bag/trash)) var/obj/item/weapon/storage/bag/trash/T = I user << " You empty the bag." diff --git a/icons/mob/back.dmi b/icons/mob/back.dmi index 0b038856b89..b35a33aa5c4 100644 Binary files a/icons/mob/back.dmi and b/icons/mob/back.dmi differ diff --git a/icons/mob/belt.dmi b/icons/mob/belt.dmi index 459051e1c73..140bca9a4b2 100644 Binary files a/icons/mob/belt.dmi and b/icons/mob/belt.dmi differ diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index b7eb6f96670..ed3c4def4d4 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index d6492bd957e..4263a4a40a6 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index 3bedbd10ad3..3ffe470d625 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/tgstation.dme b/tgstation.dme index c8412f7f2b1..838a3cc60c2 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -850,7 +850,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" @@ -869,7 +868,6 @@ #include "code\modules\clothing\spacesuits\chronosuit.dm" #include "code\modules\clothing\spacesuits\hardsuit.dm" #include "code\modules\clothing\spacesuits\miscellaneous.dm" -#include "code\modules\clothing\spacesuits\ninja.dm" #include "code\modules\clothing\spacesuits\syndi.dm" #include "code\modules\clothing\suits\armor.dm" #include "code\modules\clothing\suits\bio.dm" @@ -919,7 +917,6 @@ #include "code\modules\events\mass_hallucination.dm" #include "code\modules\events\meateor_wave.dm" #include "code\modules\events\meteor_wave.dm" -#include "code\modules\events\ninja.dm" #include "code\modules\events\prison_break.dm" #include "code\modules\events\radiation_storm.dm" #include "code\modules\events\shuttle_loan.dm" @@ -1230,6 +1227,30 @@ #include "code\modules\nano\nanoexternal.dm" #include "code\modules\nano\nanomanager.dm" #include "code\modules\nano\nanoui.dm" +#include "code\modules\ninja\__ninjaDefines.dm" +#include "code\modules\ninja\admin_ninja_verbs.dm" +#include "code\modules\ninja\energy_katana.dm" +#include "code\modules\ninja\ninja_event.dm" +#include "code\modules\ninja\Ninja_Readme.dm" +#include "code\modules\ninja\suit\gloves.dm" +#include "code\modules\ninja\suit\head.dm" +#include "code\modules\ninja\suit\mask.dm" +#include "code\modules\ninja\suit\shoes.dm" +#include "code\modules\ninja\suit\SpiderOS.dm" +#include "code\modules\ninja\suit\suit.dm" +#include "code\modules\ninja\suit\suit_attackby.dm" +#include "code\modules\ninja\suit\suit_initialisation.dm" +#include "code\modules\ninja\suit\suit_process.dm" +#include "code\modules\ninja\suit\suit_verbs_handlers.dm" +#include "code\modules\ninja\suit\n_suit_verbs\energy_net_nets.dm" +#include "code\modules\ninja\suit\n_suit_verbs\ninja_adrenaline.dm" +#include "code\modules\ninja\suit\n_suit_verbs\ninja_cost_check.dm" +#include "code\modules\ninja\suit\n_suit_verbs\ninja_empulse.dm" +#include "code\modules\ninja\suit\n_suit_verbs\ninja_net.dm" +#include "code\modules\ninja\suit\n_suit_verbs\ninja_smoke.dm" +#include "code\modules\ninja\suit\n_suit_verbs\ninja_stars.dm" +#include "code\modules\ninja\suit\n_suit_verbs\ninja_stealth.dm" +#include "code\modules\ninja\suit\n_suit_verbs\ninja_teleporting.dm" #include "code\modules\paperwork\clipboard.dm" #include "code\modules\paperwork\filingcabinet.dm" #include "code\modules\paperwork\folders.dm"