Merge pull request #2578 from Citadel-Station-13/upstream-merge-30102

[MIRROR] Various Ninja Fixes
This commit is contained in:
LetterJay
2017-09-01 10:29:55 -05:00
committed by GitHub
10 changed files with 156 additions and 205 deletions

View File

@@ -172,6 +172,7 @@
/datum/action/item_action/rcl
name = "Change Cable Color"
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "rcl_rainbow"
/datum/action/item_action/startchainsaw
@@ -405,27 +406,24 @@
/datum/action/item_action/initialize_ninja_suit
name = "Toggle ninja suit"
/datum/action/item_action/ninjajaunt
name = "Phase Jaunt (10E)"
desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "ninja_phase"
/datum/action/item_action/ninjasmoke
name = "Smoke Bomb"
desc = "Blind your enemies momentarily with a well-placed smoke bomb."
button_icon_state = "smoke"
icon_icon = 'icons/mob/actions/actions_spells.dmi'
/datum/action/item_action/ninjaboost
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_CONSCIOUS
check_flags = NONE
name = "Adrenaline Boost"
desc = "Inject a secret chemical that will counteract all movement-impairing effect."
button_icon_state = "repulse"
icon_icon = 'icons/mob/actions/actions_spells.dmi'
/datum/action/item_action/ninjapulse
name = "EM Burst (25E)"
desc = "Disable any nearby technology with a electro-magnetic pulse."
button_icon_state = "emp"
icon_icon = 'icons/mob/actions/actions_spells.dmi'
/datum/action/item_action/ninjastar
name = "Create Throwing Stars (1E)"
@@ -448,8 +446,8 @@
/datum/action/item_action/ninja_stealth
name = "Toggle Stealth"
desc = "Toggles stealth mode on and off."
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "ninja_cloak"
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
/datum/action/item_action/toggle_glove
name = "Toggle interaction"
@@ -491,7 +489,7 @@
S.action = src
name = S.name
desc = S.desc
button_icon = S.action_icon
icon_icon = S.action_icon
button_icon_state = S.action_icon_state
background_icon_state = S.action_background_icon_state
button.name = name

View File

@@ -41,7 +41,6 @@
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/space_ninja(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(H), slot_glasses)
H.equip_to_slot_or_del(EK, slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/flashlight(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/grenade/plastic/x4(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/tank/internals/emergency_oxygen(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/tank/jetpack/carbondioxide(H), slot_back)

View File

@@ -12,90 +12,72 @@ It is possible to destroy the net by the occupant or someone else.
density = TRUE//Can't pass through.
opacity = 0//Can see through.
mouse_opacity = MOUSE_OPACITY_ICON//So you can hit it with stuff.
anchored = TRUE//Can't drag/grab the trapped mob.
anchored = TRUE//Can't drag/grab the net.
layer = ABOVE_ALL_MOB_LAYER
max_integrity = 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.
can_buckle = 1
buckle_lying = 0
buckle_prevents_pull = TRUE
var/mob/living/carbon/affecting//Who it is currently affecting, if anyone.
var/mob/living/carbon/master//Who shot web. Will let this person know if the net was successful or failed.
var/check = 15//30 seconds before teleportation. Could be extended I guess.
var/success = FALSE
/obj/structure/energy_net/play_attack_sound(damage, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
playsound(src, 'sound/weapons/slash.ogg', 80, 1)
if(BURN)
playsound(src.loc, 'sound/weapons/slash.ogg', 80, 1)
playsound(src, 'sound/weapons/slash.ogg', 80, 1)
/obj/structure/energy_net/Destroy()
if(affecting)
var/mob/living/carbon/M = affecting
M.anchored = FALSE
for(var/mob/O in viewers(src, 3))
O.show_message("[M.name] was recovered from the energy net!", 1, "<span class='italics'>You hear a grunt.</span>", 2)
if(master)//As long as they still exist.
if(!success)
if(!QDELETED(affecting))
affecting.visible_message("[affecting.name] was recovered from the energy net!", "You were recovered from the energy net!", "<span class='italics'>You hear a grunt.</span>")
if(!QDELETED(master))//As long as they still exist.
to_chat(master, "<span class='userdanger'>ERROR</span>: unable to initiate transport protocol. Procedure terminated.")
return ..()
/obj/structure/energy_net/process(mob/living/carbon/M)
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.
M.notransform = 1 //No moving for you!
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.
to_chat(master, "<span class='userdanger'>ERROR</span>: unable to locate \the [mob_name]. Procedure terminated.")
/obj/structure/energy_net/process()
if(QDELETED(affecting)||affecting.loc!=loc)
qdel(src)//Get rid of the net.
M.notransform = 0
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.
if(check>0)
check--
return
density = FALSE//Make the net pass-through.
invisibility = INVISIBILITY_ABSTRACT//Make the net invisible so all the animations can play out.
resistance_flags |= INDESTRUCTIBLE //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(ishuman(M))
var/mob/living/carbon/human/H = M
if(W == H.w_uniform)
continue//So all they're left with are shoes and uniform.
if(W == H.shoes)
continue
M.dropItemToGround(W)
success = TRUE
qdel(src)
if(ishuman(affecting))
var/mob/living/carbon/human/H = affecting
for(var/obj/item/W in H)
if(W == H.w_uniform)
continue//So all they're left with are shoes and uniform.
if(W == H.shoes)
continue
H.dropItemToGround(W)
playsound(M.loc, 'sound/effects/sparks4.ogg', 50, 1)
new /obj/effect/temp_visual/dir_setting/ninja/phase/out(get_turf(M), M.dir)
visible_message("[M] suddenly vanishes!")
M.forceMove(pick(GLOB.holdingfacility)) //Throw mob in to the holding facility.
to_chat(M, "<span class='danger'>You appear in a strange place!</span>")
if(!isnull(master))//As long as they still exist.
to_chat(master, "<span class='notice'><b>SUCCESS</b>: transport procedure of \the [affecting] complete.</span>")
M.notransform = 0
var/datum/effect_system/spark_spread/spark_system = new /datum/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)
new /obj/effect/temp_visual/dir_setting/ninja/phase(get_turf(M), M.dir)
qdel(src)
else//And they are free.
to_chat(M, "<span class='notice'>You are free of the net!</span>")
M.notransform = 0
return
playsound(affecting, 'sound/effects/sparks4.ogg', 50, 1)
new /obj/effect/temp_visual/dir_setting/ninja/phase/out(affecting.drop_location(), affecting.dir)
visible_message("[affecting] suddenly vanishes!")
affecting.forceMove(pick(GLOB.holdingfacility)) //Throw mob in to the holding facility.
to_chat(affecting, "<span class='danger'>You appear in a strange place!</span>")
if(!QDELETED(master))//As long as they still exist.
to_chat(master, "<span class='notice'><b>SUCCESS</b>: transport procedure of [affecting] complete.</span>")
do_sparks(5, FALSE, affecting)
playsound(affecting, 'sound/effects/phasein.ogg', 25, 1)
playsound(affecting, 'sound/effects/sparks2.ogg', 50, 1)
new /obj/effect/temp_visual/dir_setting/ninja/phase(affecting.drop_location(), affecting.dir)
/obj/structure/energy_net/attack_paw(mob/user)
return attack_hand()
/obj/structure/energy_net/user_buckle_mob(mob/living/M, mob/living/user)
return//We only want our target to be buckled
/obj/structure/energy_net/user_unbuckle_mob(mob/living/buckled_mob, mob/living/user)
return//The net must be destroyed to free the target

View File

@@ -2,20 +2,19 @@
//Movement impairing would indicate drugs and the like.
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
if(!ninjacost(0,N_ADRENALINE))//Have to make sure stat is not counted for this ability.
if(!ninjacost(0,N_ADRENALINE))
var/mob/living/carbon/human/H = affecting
H.SetUnconscious(0)
H.SetStun(0)
H.SetKnockdown(0)
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)
if(reagents.total_volume)
var/fraction = min(a_transfer/reagents.total_volume, 1)
reagents.reaction(H, INJECT, fraction)
reagents.trans_id_to(H, "radium", a_transfer)
to_chat(H, "<span class='danger'>You are beginning to feel the after-effect of the injection.</span>")
H.stuttering = 0
H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
a_boost--
to_chat(H, "<span class='notice'>There are <B>[a_boost]</B> adrenaline boosts remaining.</span>")
s_coold = 3
addtimer(CALLBACK(src, .proc/ninjaboost_after), 70)
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost_after()
var/mob/living/carbon/human/H = affecting
H.reagents.add_reagent("radium", a_transfer)
to_chat(H, "<span class='danger'>You are beginning to feel the after-effect of the injection.</span>")

View File

@@ -3,10 +3,6 @@
//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.
to_chat(H, "<span class='danger'>You must be conscious and solid to do this.</span>")
return 1
var/actualCost = cost*10
if(cost && cell.charge < actualCost)
to_chat(H, "<span class='danger'>Not enough energy.</span>")

View File

@@ -1,24 +1,33 @@
//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.
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet()
var/mob/living/carbon/human/H = affecting
var/mob/living/carbon/C = input("Select who to capture:","Capture who?",null) as null|mob in oview(H)
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/structure/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.
to_chat(H, "<span class='warning'>You may not use an energy net through solid obstacles!</span>")
return
H.Beam(C,"n_beam",time=15)
H.say("Get over here!")
var/obj/structure/energy_net/E = new /obj/structure/energy_net(C.loc)
H.visible_message("<span class='danger'>[H] caught [C] with an energy net!</span>","<span class='notice'>You caught [C] with an energy net!</span>")
E.affecting = C
E.master = H
spawn(0)//Parallel processing.
E.process(C)
else
to_chat(H, "<span class='warning'>[C.p_they(TRUE)] are already trapped inside an energy net!</span>")
else
to_chat(H, "<span class='warning'>[C.p_they(TRUE)] will bring no honor to your Clan!</span>")
if(QDELETED(C)||!(C in oview(H)))
return 0
if(!C.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
to_chat(H, "<span class='warning'>[C.p_they(TRUE)] will bring no honor to your Clan!</span>")
return
if(locate(/obj/structure/energy_net) in get_turf(C))//Check if they are already being affected by an energy net.
to_chat(H, "<span class='warning'>[C.p_they(TRUE)] are already trapped inside an energy net!</span>")
return
for(var/turf/T in getline(get_turf(H), get_turf(C)))
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
to_chat(H, "<span class='warning'>You may not use an energy net through solid obstacles!</span>")
return
if(!ninjacost(200,N_STEALTH_CANCEL))
H.Beam(C,"n_beam",time=15)
H.say("Get over here!")
var/obj/structure/energy_net/E = new /obj/structure/energy_net(C.drop_location())
E.affecting = C
E.master = H
H.visible_message("<span class='danger'>[H] caught [C] with an energy net!</span>","<span class='notice'>You caught [C] with an energy net!</span>")
if(C.buckled)
C.buckled.unbuckle_mob(affecting,TRUE)
E.buckle_mob(C, TRUE) //No moving for you!
//The person can still try and attack the net when inside.
START_PROCESSING(SSobj, E)

View File

@@ -17,7 +17,7 @@ Contents:
icon_state = "s-ninja"
item_state = "s-ninja_suit"
allowed = list(/obj/item/gun, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/melee/baton, /obj/item/restraints/handcuffs, /obj/item/tank/internals, /obj/item/stock_parts/cell)
slowdown = 0
slowdown = 1
resistance_flags = LAVA_PROOF | ACID_PROOF
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30, fire = 100, acid = 100)
strip_delay = 12
@@ -28,7 +28,6 @@ Contents:
var/mob/living/carbon/human/affecting = null
var/obj/item/stock_parts/cell/cell
var/datum/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/disk/tech_disk/t_disk//To copy design onto disk.
var/obj/item/dash/energy_katana/energyKatana //For teleporting the katana back to the ninja (It's an ability)
@@ -44,11 +43,10 @@ Contents:
var/s_cost = 5//Base energy cost each ntick.
var/s_acost = 25//Additional cost for additional powers active.
var/s_delay = 40//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability.
var/a_transfer = 20//How much reagent is transferred when injecting.
var/r_maxamount = 80//How much reagent in total there is.
var/a_transfer = 20//How much radium is used per adrenaline boost.
var/a_maxamount = 7//Maximum number of adrenaline boosts.
//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 = FALSE//Is the suit busy with a process? Like AI hacking. Used for safety functions.
@@ -73,28 +71,12 @@ Contents:
for(var/T in subtypesof(/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/stock_parts/cell/high
cell.charge = 9000
cell.name = "black power cell"
cell.icon_state = "bscell"
/obj/item/clothing/suit/space/space_ninja/Destroy()
if(affecting)
affecting << browse(null, "window=hack spideros")
return ..()
//Simply deletes all the attachments and self, killing all related procs.
/obj/item/clothing/suit/space/space_ninja/proc/terminate()
qdel(n_hood)
@@ -117,7 +99,7 @@ Contents:
if(!istype(H))
return 0
if(!is_ninja(H))
to_chat(H, "\red <B>fÄTaL ÈÈRRoR</B>: 382200-*#00CÖDE <B>RED</B>\nUNAU†HORIZED USÈ DETÈC†††eD\nCoMMÈNCING SUB-R0U†IN3 13...\nTÈRMInATING U-U-USÈR...")
to_chat(H, "<span class='danger'><B>fÄTaL ÈÈRRoR</B>: 382200-*#00CÖDE <B>RED</B>\nUNAU?HORIZED USÈ DETÈC???eD\nCoMMÈNCING SUB-R0U?IN3 13...\nTÈRMInATING U-U-USÈR...</span>")
H.gib()
return FALSE
if(!istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja))
@@ -131,7 +113,7 @@ Contents:
return FALSE
affecting = H
flags_1 |= NODROP_1 //colons make me go all |=
slowdown = FALSE
slowdown = 0
n_hood = H.head
n_hood.flags_1 |= NODROP_1
n_shoes = H.shoes
@@ -170,7 +152,7 @@ Contents:
..()
if(s_initialized)
if(user == affecting)
to_chat(user, "All systems operational. Current energy capacity: <B>[cell.charge]</B>.")
to_chat(user, "All systems operational. Current energy capacity: <B>[DisplayPower(cell.charge)]</B>.")
to_chat(user, "The CLOAK-tech device is <B>[s_active?"active":"inactive"]</B>.")
to_chat(user, "There are <B>[s_bombs]</B> smoke bomb\s remaining.")
to_chat(user, "There are <B>[a_boost]</B> adrenaline booster\s remaining.")

View File

@@ -1,70 +1,60 @@
/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(U!=affecting)//Safety, in case you try doing this without wearing the suit/being the person with the suit.
return ..()
if(istype(I, /obj/item/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)<r_maxamount+(reagent_id == "radium"?(a_boost*a_transfer):0)&&R.volume>=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.
to_chat(U, "Added [amount_to_transfer] units of [R.name].")
I.reagents.update_total()//Now we manually update the total to make sure everything is properly shoved under the rug.
to_chat(U, "Replenished a total of [total_reagent_transfer ? total_reagent_transfer : "zero"] chemical units.")
if(istype(I, /obj/item/reagent_containers/glass))//If it's a glass beaker.
if(I.reagents.has_reagent("radium", a_transfer) && a_boost < a_maxamount)
I.reagents.remove_reagent("radium", a_transfer)
a_boost++;
to_chat(U, "<span class='notice'>There are now [a_boost] adrenaline boosts remaining.</notice>")
return
else if(istype(I, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/CELL = I
if(CELL.maxcharge > cell.maxcharge && n_gloves && n_gloves.candrain)
to_chat(U, "<span class='notice'>Higher maximum capacity detected.\nUpgrading...</span>")
if (n_gloves && n_gloves.candrain && do_after(U,s_delay, target = src))
U.drop_item()
CELL.loc = src
CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge)
var/obj/item/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.update_icon()
cell = CELL
to_chat(U, "<span class='notice'>Upgrade complete. Maximum capacity: <b>[round(cell.maxcharge/100)]</b>%</span>")
else
to_chat(U, "<span class='danger'>Procedure interrupted. Protocol terminated.</span>")
return
else if(istype(I, /obj/item/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit.
var/obj/item/disk/tech_disk/TD = I
var/has_research = 0
for(var/V in TD.tech_stored)
if(V)
has_research = 1
break
if(has_research)//If it has something on it.
to_chat(U, "Research information detected, processing...")
if(do_after(U,s_delay, target = src))
for(var/V1 in 1 to TD.max_tech_stored)
var/datum/tech/new_data = TD.tech_stored[V1]
TD.tech_stored[V1] = null
if(!new_data)
continue
for(var/V2 in stored_research)
var/datum/tech/current_data = V2
if(current_data.id == new_data.id)
current_data.level = max(current_data.level, new_data.level)
break
to_chat(U, "<span class='notice'>Data analyzed and updated. Disk erased.</span>")
else
to_chat(U, "<span class='userdanger'>ERROR</span>: Procedure interrupted. Process terminated.")
else if(istype(I, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/CELL = I
if(CELL.maxcharge > cell.maxcharge && n_gloves && n_gloves.candrain)
to_chat(U, "<span class='notice'>Higher maximum capacity detected.\nUpgrading...</span>")
if (n_gloves && n_gloves.candrain && do_after(U,s_delay, target = src))
U.transferItemToLoc(CELL, src)
CELL.charge = min(CELL.charge+cell.charge, CELL.maxcharge)
var/obj/item/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.update_icon()
cell = CELL
to_chat(U, "<span class='notice'>Upgrade complete. Maximum capacity: <b>[round(cell.maxcharge/100)]</b>%</span>")
else
I.loc = src
t_disk = I
to_chat(U, "<span class='notice'>You slot \the [I] into \the [src].</span>")
return
..()
to_chat(U, "<span class='danger'>Procedure interrupted. Protocol terminated.</span>")
return
else if(istype(I, /obj/item/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit.
var/obj/item/disk/tech_disk/TD = I
var/has_research = FALSE
for(var/V in TD.tech_stored)
if(V)
has_research = TRUE
break
if(has_research)//If it has something on it.
to_chat(U, "<span class='notice'>Research information detected, processing...</span>")
if(do_after(U,s_delay, target = src))
for(var/V1 in 1 to TD.max_tech_stored)
var/datum/tech/new_data = TD.tech_stored[V1]
TD.tech_stored[V1] = null
if(!new_data)
continue
for(var/V2 in stored_research)
var/datum/tech/current_data = V2
if(current_data.id == new_data.id)
current_data.level = max(current_data.level, new_data.level)
break
to_chat(U, "<span class='notice'>Data analyzed and updated. Disk erased.</span>")
else
to_chat(U, "<span class='userdanger'>ERROR</span>: Procedure interrupted. Process terminated.")
else
to_chat(U, "<span class='notice'>No research information detected.</span>")
return
return ..()

View File

@@ -11,9 +11,6 @@
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize(delay = s_delay, mob/living/carbon/human/U = loc)
if(!U.mind)
return //Not sure how this could happen.
if(!is_ninja(U))
to_chat(U, "You do not understand how this suit functions. Where the heck did it even come from?")
return
s_busy = TRUE
to_chat(U, "<span class='notice'>Now initializing...</span>")
addtimer(CALLBACK(src, .proc/ninitialize_two, delay, U), delay)
@@ -30,9 +27,10 @@
addtimer(CALLBACK(src, .proc/ninitialize_four, delay, U), delay)
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_four(delay, mob/living/carbon/human/U)
if(U.stat==2||U.health<=0)
to_chat(U, "<span class='danger'><B>FĆAL �Rr�R</B>: 344--93#�&&21 BR��N |/|/aV� PATT$RN <B>RED</B>\nA-A-aB�rT�NG...</span>")
if(U.stat == DEAD|| U.health <= 0)
to_chat(U, "<span class='danger'><B>FÄ?AL �Rr�R</B>: 344--93#�&&21 BR��N |/|/aV� PATT$RN <B>RED</B>\nA-A-aB�rT�NG...</span>")
unlock_suit()
s_busy = FALSE
return
lockIcons(U)//Check for icons.
U.regenerate_icons()
@@ -44,13 +42,12 @@
addtimer(CALLBACK(src, .proc/ninitialize_six, delay, U), delay)
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_six(delay, mob/living/carbon/human/U)
to_chat(U, "<span class='notice'>Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[cell.charge]</B>.</span>")
to_chat(U, "<span class='notice'>Primary system status: <B>ONLINE</B>.\nBackup system status: <B>ONLINE</B>.\nCurrent energy capacity: <B>[DisplayPower(cell.charge)]</B>.</span>")
addtimer(CALLBACK(src, .proc/ninitialize_seven, delay, U), delay)
/obj/item/clothing/suit/space/space_ninja/proc/ninitialize_seven(delay, mob/living/carbon/human/U)
to_chat(U, "<span class='notice'>All systems operational. Welcome to <B>SpiderOS</B>, [U.real_name].</span>")
grant_ninja_verbs()
grant_equip_verbs()
s_initialized = TRUE
ntick()
s_busy = FALSE
@@ -66,7 +63,6 @@
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_two(delay, mob/living/carbon/human/U)
to_chat(U, "<span class='notice'>Now de-initializing...</span>")
spideros = 0//Spideros resets.
addtimer(CALLBACK(src, .proc/deinitialize_three, delay, U), delay)
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_three(delay, mob/living/carbon/human/U)
@@ -92,6 +88,7 @@
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_eight(delay, mob/living/carbon/human/U)
to_chat(U, "<span class='notice'>Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>.</span>")
remove_equip_verbs()
unlock_suit()
U.regenerate_icons()
s_initialized = FALSE
s_busy = FALSE

View File

@@ -1896,7 +1896,6 @@
#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"