diff --git a/code/datums/action.dm b/code/datums/action.dm index 10cb2a239f..8e32e8968f 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -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 diff --git a/code/datums/antagonists/ninja.dm b/code/datums/antagonists/ninja.dm index bd7bb13a1d..230a4d64e4 100644 --- a/code/datums/antagonists/ninja.dm +++ b/code/datums/antagonists/ninja.dm @@ -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) 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 index 76cacc00ef..270e1f106f 100644 --- a/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm +++ b/code/modules/ninja/suit/n_suit_verbs/energy_net_nets.dm @@ -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, "You hear a grunt.", 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!", "You hear a grunt.") + if(!QDELETED(master))//As long as they still exist. to_chat(master, "ERROR: 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, "ERROR: 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, "You appear in a strange place!") - - if(!isnull(master))//As long as they still exist. - to_chat(master, "SUCCESS: transport procedure of \the [affecting] complete.") - 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, "You are free of the net!") - 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, "You appear in a strange place!") + if(!QDELETED(master))//As long as they still exist. + to_chat(master, "SUCCESS: transport procedure of [affecting] complete.") + 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 diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm index 71f8166339..6c0dddf88b 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_adrenaline.dm @@ -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, "You are beginning to feel the after-effect of the injection.") + H.stuttering = 0 + H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) a_boost-- to_chat(H, "There are [a_boost] adrenaline boosts remaining.") 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, "You are beginning to feel the after-effect of the injection.") 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 index 1d728084b3..12fea51815 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_cost_check.dm @@ -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, "You must be conscious and solid to do this.") - return 1 - var/actualCost = cost*10 if(cost && cell.charge < actualCost) to_chat(H, "Not enough energy.") diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm index 18682e87eb..81d731b110 100644 --- a/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm +++ b/code/modules/ninja/suit/n_suit_verbs/ninja_net.dm @@ -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, "You may not use an energy net through solid obstacles!") - 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("[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 - to_chat(H, "[C.p_they(TRUE)] are already trapped inside an energy net!") - else - to_chat(H, "[C.p_they(TRUE)] will bring no honor to your Clan!") + 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, "[C.p_they(TRUE)] will bring no honor to your Clan!") + 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, "[C.p_they(TRUE)] are already trapped inside an energy net!") + 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, "You may not use an energy net through solid obstacles!") + 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("[H] caught [C] with an energy net!","You caught [C] with an energy net!") + + 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) diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm index 7cf355fde6..40d18951e6 100644 --- a/code/modules/ninja/suit/suit.dm +++ b/code/modules/ninja/suit/suit.dm @@ -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 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...") + to_chat(H, "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 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: [cell.charge].") + to_chat(user, "All systems operational. Current energy capacity: [DisplayPower(cell.charge)].") to_chat(user, "The CLOAK-tech device is [s_active?"active":"inactive"].") to_chat(user, "There are [s_bombs] smoke bomb\s remaining.") to_chat(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 index 23f2ac4b9e..1db76bc971 100644 --- a/code/modules/ninja/suit/suit_attackby.dm +++ b/code/modules/ninja/suit/suit_attackby.dm @@ -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)=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, "There are now [a_boost] adrenaline boosts remaining.") 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, "Higher maximum capacity detected.\nUpgrading...") - 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, "Upgrade complete. Maximum capacity: [round(cell.maxcharge/100)]%") - else - to_chat(U, "Procedure interrupted. Protocol terminated.") - 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, "Data analyzed and updated. Disk erased.") - else - to_chat(U, "ERROR: 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, "Higher maximum capacity detected.\nUpgrading...") + 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, "Upgrade complete. Maximum capacity: [round(cell.maxcharge/100)]%") else - I.loc = src - t_disk = I - to_chat(U, "You slot \the [I] into \the [src].") - return - ..() \ No newline at end of file + to_chat(U, "Procedure interrupted. Protocol terminated.") + 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, "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, "Data analyzed and updated. Disk erased.") + + else + to_chat(U, "ERROR: Procedure interrupted. Process terminated.") + else + to_chat(U, "No research information detected.") + return + return ..() diff --git a/code/modules/ninja/suit/suit_initialisation.dm b/code/modules/ninja/suit/suit_initialisation.dm index 5fb3fe8a62..0084ff1995 100644 --- a/code/modules/ninja/suit/suit_initialisation.dm +++ b/code/modules/ninja/suit/suit_initialisation.dm @@ -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, "Now initializing...") 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, "FĆAL �Rr�R: 344--93#�&&21 BR��N |/|/aV� PATT$RN RED\nA-A-aB�rT�NG...") + if(U.stat == DEAD|| U.health <= 0) + to_chat(U, "FÄ?AL �Rr�R: 344--93#�&&21 BR��N |/|/aV� PATT$RN RED\nA-A-aB�rT�NG...") 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, "Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [cell.charge].") + to_chat(U, "Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [DisplayPower(cell.charge)].") 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, "All systems operational. Welcome to SpiderOS, [U.real_name].") - 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, "Now de-initializing...") - 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, "Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: FINISHED.") - remove_equip_verbs() + unlock_suit() U.regenerate_icons() + s_initialized = FALSE s_busy = FALSE diff --git a/tgstation.dme b/tgstation.dme index 1e1c153493..dbd48407ad 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -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"