diff --git a/code/WorkInProgress/recycling/disposal.dm b/code/WorkInProgress/recycling/disposal.dm index 12571988314..ddf7be65fd3 100644 --- a/code/WorkInProgress/recycling/disposal.dm +++ b/code/WorkInProgress/recycling/disposal.dm @@ -402,9 +402,9 @@ overlays = null if( !(stat & BROKEN) ) if(flush) - overlays += image('disposal.dmi',src,"toilet-handle",,dir) + overlays += image('disposal.dmi',"toilet-handle",,dir) if( !(stat & NOPOWER) ) - overlays += image('disposal.dmi',src,"toilet-ready",,dir) + overlays += image('disposal.dmi',"toilet-ready",,dir) else icon_state = "toilet-broken" mode = 0 diff --git a/code/defines/obj/clothing/suit.dm b/code/defines/obj/clothing/suit.dm index 57dab3ae0e8..68e8f6979b6 100644 --- a/code/defines/obj/clothing/suit.dm +++ b/code/defines/obj/clothing/suit.dm @@ -374,14 +374,14 @@ var/affecting = null var/active = 0//Stealth off. var/kamikaze = 0//Kamikaze on or off. - var/charge = 9000.0//Starts at 90% of normal capacity. - var/maxcharge = 30000.0//I want the suit upgradable if the ninja is able to find the parts but for now this'll do. + var/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using new proc. var/initialize = 0//Suit starts off. 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/unlock = 0 var/sbombs = 10.0//Number of starting ninja smoke bombs. var/aboost = 3.0//Number of adrenaline boosters. - var/amount_per_transfer_from_this = 20//How much reagent is transferred. + var/transfera = 20//How much reagent is transferred. + var/coold = 0//If the suit is on cooldown. Could be useful to attach different cooldowns to abilities I guess. It ticks down every second. var/datum/effects/system/spark_spread/spark_system slowdown = 1 diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index dc9a37834ac..daec3e75b7c 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -1446,11 +1446,17 @@ Total SMES charging rate should not exceed total power generation rate, or an ov g_amt = 60 /obj/item/weapon/cell/super - name = "super-capcity power cell" + name = "super-capacity power cell" origin_tech = "powerstorage=3" maxcharge = 20000 g_amt = 70 +/obj/item/weapon/cell/hyper + name = "hyper-capacity power cell" + origin_tech = "powerstorage=6" + maxcharge = 30000 + g_amt = 80 + /*/obj/item/weapon/cell/potato name = "Potato Battery" desc = "A rechargable starch based power cell." diff --git a/code/game/gamemodes/extra/ninja_abilities.dm b/code/game/gamemodes/extra/ninja_abilities.dm index 1df647d1218..a9d58f76d1e 100644 --- a/code/game/gamemodes/extra/ninja_abilities.dm +++ b/code/game/gamemodes/extra/ninja_abilities.dm @@ -5,25 +5,27 @@ All the procs here assume that the character is wearing the ninja suit if they a 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. */ + +//Cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down. /mob/proc/ninjacost(var/C as num,var/X as num) var/mob/living/carbon/human/U = src var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit if(U.stat||U.incorporeal_move) U << "\red You must be conscious and solid to do this." - return 0 - else if(C&&S.charge[S.sbombs] smoke bombs remaining." @@ -41,61 +43,23 @@ In the case that they are not, I imagine the game will run-time error like crazy smoke.set_up(10, 0, loc) smoke.start() playsound(loc, 'bamf.ogg', 50, 2) + S.coold = 1 return //9-10 Tile Teleport //Click to to teleport 9-10 tiles in direction facing. /mob/proc/ninjajaunt() - set name = "Phase Jaunt" + set name = "Phase Jaunt (10E)" set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing." set category = "Ninja" var/C = 100 - if(ninjacost(C,1)) + if(!ninjacost(C,1)) var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/list/turfs = new/list() var/turf/picked var/turf/mobloc = get_turf(loc) var/safety = 0 -/* switch(dir)//This can be done better but really isn't worth it in my opinion. - if(NORTH) - //highest Y - //X the same - for(var/turf/T in orange(10)) - if(T.density) continue - if(T.x>world.maxx || T.x<1) continue - if(T.y>world.maxy || T.y<1) continue - if((T.y-mobloc.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue - turfs += T - if(SOUTH) - //lowest Y - //X the same - for(var/turf/T in orange(10)) - if(T.density) continue - if(T.x>world.maxx || T.x<1) continue - if(T.y>world.maxy || T.y<1) continue - if((mobloc.y-T.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue - turfs += T - if(EAST) - //highest X - //Y the same - for(var/turf/T in orange(10)) - if(T.density) continue - if(T.x>world.maxx || T.x<1) continue - if(T.y>world.maxy || T.y<1) continue - if((T.x-mobloc.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue - turfs += T - if(WEST) - //lowest X - //Y the same - for(var/turf/T in orange(10)) - if(T.density) continue - if(T.x>world.maxx || T.x<1) continue - if(T.y>world.maxy || T.y<1) continue - if((mobloc.x-T.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue - turfs += T - else - safety = 1*/ var/locx var/locy switch(dir)//Gets rectengular range for target. @@ -151,7 +115,8 @@ In the case that they are not, I imagine the game will run-time error like crazy for(var/mob/living/M in picked) if(M==src) continue M.gib() - S.charge-=(C*10) + S.coold = 1 + S.cell.charge-=(C*10) else src << "\red The VOID-shift device is malfunctioning, teleportation failed." return @@ -159,12 +124,12 @@ In the case that they are not, I imagine the game will run-time error like crazy //Right Click Teleport //Right click to teleport somewhere, almost exactly like admin jump to turf. /mob/proc/ninjashift(var/turf/T in oview()) - set name = "Phase Shift" + 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. var/C = 200 - if(ninjacost(C,1)) + if(!ninjacost(C,1)) var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit if(!T.density) var/turf/mobloc = get_turf(loc) @@ -184,7 +149,8 @@ In the case that they are not, I imagine the game will run-time error like crazy for(var/mob/living/M in T) if(M==src) continue M.gib() - S.charge-=(C*10) + S.coold = 1 + S.cell.charge-=(C*10) else src << "\red You cannot teleport into solid walls." return @@ -192,27 +158,28 @@ In the case that they are not, I imagine the game will run-time error like crazy //EMP Pulse //Disables nearby tech equipment. /mob/proc/ninjapulse() - set name = "EM Burst" + set name = "EM Burst (25E)" set desc = "Disable any nearby technology with a electro-magnetic pulse." set category = "Ninja" var/C = 250 - if(ninjacost(C,1)) + if(!ninjacost(C,1)) var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit playsound(loc, 'EMPulse.ogg', 60, 2) empulse(src, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch. - S.charge-=(C*10) + S.coold = 2 + S.cell.charge-=(C*10) return //Summon Energy Blade //Summons a blade of energy in active hand. /mob/proc/ninjablade() - set name = "Energy Blade" + set name = "Energy Blade (5E)" set desc = "Create a focused beam of energy in your active hand." set category = "Ninja" var/C = 50 - if(ninjacost(C)) + if(!ninjacost(C)) var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit if(!S.kamikaze) if(!get_active_hand()&&!istype(get_inactive_hand(), /obj/item/weapon/blade)) @@ -220,7 +187,7 @@ In the case that they are not, I imagine the game will run-time error like crazy W.spark_system.start() playsound(loc, "sparks", 50, 1) put_in_hand(W) - S.charge-=(C*10) + S.cell.charge-=(C*10) else src << "\red You can only summon one blade. Try dropping an item first." else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains. @@ -232,18 +199,19 @@ In the case that they are not, I imagine the game will run-time error like crazy put_in_inactive_hand(W) S.spark_system.start() playsound(loc, "sparks", 50, 1) + S.coold = 1 return //Shoot Ninja Stars //Shoots ninja stars at random people. //This could be a lot better but I'm too tired atm. /mob/proc/ninjastar() - set name = "Energy Star" + set name = "Energy Star (3E)" set desc = "Launches an energy star at a random living target." set category = "Ninja" var/C = 30 - if(ninjacost(C)) + if(!ninjacost(C)) var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/targets[]//So yo can shoot while yo throw dawg targets = new() @@ -263,12 +231,25 @@ In the case that they are not, I imagine the game will run-time error like crazy A.current = curloc A.yo = targloc.y - curloc.y A.xo = targloc.x - curloc.x - S.charge-=(C*10) + S.cell.charge-=(C*10) A.process() else src << "\red There are no targets in view." return +/* +//Energy Net +//Allows the ninja to capture people, I guess. +/mob/proc/ninjanet() + set name = "Energy Net" + set desc = "Captures a fallen opponent in a net of energy." + set category = "Ninja" + var/C = 200 + if(!ninjacost(C)) + var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit + S.cell.charge-=(C*10) + 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. @@ -277,7 +258,7 @@ In the case that they are not, I imagine the game will run-time error like crazy set desc = "Inject a secret chemical that will counteract all movement-impairing effects." set category = "Ninja" - if(ninjacost(,3)) + if(!ninjacost(,3)) var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit //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. @@ -288,11 +269,13 @@ In the case that they are not, I imagine the game will run-time error like crazy say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!")) spawn(70) S.reagents.reaction(src, 2) - S.reagents.trans_id_to(src, "radium", S.amount_per_transfer_from_this) + S.reagents.trans_id_to(src, "radium", S.transfera) src << "\red You are beginning to feal the after-effects of the injection." S.aboost-- + S.coold = 3 return + //KAMIKAZE============================= //Or otherwise known as anime mode. Which also happens to be ridiculously powerful. @@ -321,7 +304,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/ set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line." set category = "Ninja" - if(ninjacost()) + if(!ninjacost()) var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/locx var/locy @@ -352,7 +335,6 @@ Allows to gib up to five squares in a straight line. Seriously.*/ else safety = 1 if(!safety)//Cancels the teleportation if no valid turf is found. Usually when teleporting near map edge. say("Ai Satsugai!") - verbs -= /mob/proc/ninjaslayer var/turf/picked = locate(locx,locy,mobloc.z) spawn(0) playsound(loc, "sparks", 50, 1) @@ -376,8 +358,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/ playsound(loc, 'Deconstruct.ogg', 50, 1) playsound(loc, "sparks", 50, 1) anim(loc,'mob.dmi',src,"phasein") - spawn(10) - verbs += /mob/proc/ninjaslayer + S.coold = 1 else src << "\red The VOID-shift device is malfunctioning, teleportation failed." return @@ -389,7 +370,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/ set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target." set category = "Ninja" - if(ninjacost())//Simply checks for stat. + if(!ninjacost())//Simply checks for stat. var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit var/targets[] targets = new() @@ -427,7 +408,6 @@ Allows to gib up to five squares in a straight line. Seriously.*/ if(!safety) say("Kumo no Shinkiro!") - verbs -= /mob/proc/ninjamirage var/turf/picked = locate(locx,locy,mobloc.z) spawn(0) playsound(loc, "sparks", 50, 1) @@ -450,11 +430,30 @@ Allows to gib up to five squares in a straight line. Seriously.*/ playsound(loc, 'Deconstruct.ogg', 50, 1) playsound(loc, "sparks", 50, 1) anim(loc,'mob.dmi',src,"phasein") - - spawn(10) - verbs += /mob/proc/ninjamirage + S.coold = 1 else src << "\red The VOID-shift device is malfunctioning, teleportation failed." else src << "\red There are no targets in view." - return \ No newline at end of file + return + +/* +/mob/verb/TestNinjaShadow() + set name = "Test Ninja Ability" + set category = "Ninja" + + if(client) + var/safety = 4 + for(var/turf/T in oview(5)) + if(prob(20)) + var/current_clone = image('mob.dmi',T,"s-ninja",dir) + safety-- + spawn(0) + src << current_clone + spawn(300) + del(current_clone) + spawn while(!isnull(current_clone)) + step_to(current_clone,src,1) + sleep(5) + if(safety<=0) break + return */ \ No newline at end of file diff --git a/code/game/gamemodes/extra/ninja_equipment.dm b/code/game/gamemodes/extra/ninja_equipment.dm index daefb9a5477..5cf2a754cc7 100644 --- a/code/game/gamemodes/extra/ninja_equipment.dm +++ b/code/game/gamemodes/extra/ninja_equipment.dm @@ -17,21 +17,24 @@ reagents.add_reagent("anti_toxin", 80) reagents.add_reagent("radium", 80) reagents.add_reagent("nutriment", 80) + cell = new/obj/item/weapon/cell/high + cell.charge = 9000 /obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob) set hidden = 1 set background = 1 - spawn while(initialize&&charge>=0)//Suit on and has power. + spawn while(initialize&&cell.charge>=0)//Suit on and has power. if(!initialize) return//When turned off the proc stops. + if(coold) coold--//Checks for ability cooldown. var/A = 5//Energy cost each tick. if(!kamikaze) if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check. - if(charge<=0)//If no charge left. + if(cell.charge<=0)//If no charge left. U.drop_item()//Sword is dropped from active hand (and deleted). else A += 20//Otherwise, more energy consumption. else if(istype(U.get_inactive_hand(), /obj/item/weapon/blade)) - if(charge<=0) + if(cell.charge<=0) U.swap_hand()//swap hand U.drop_item()//drop sword else A += 20 @@ -41,13 +44,13 @@ if(prob(25)) U.bruteloss += 1 A = 200 - charge-=A - if(charge<0) + cell.charge-=A + if(cell.charge<0) if(kamikaze) U.say("I DIE TO LIVE AGAIN!") U.death() return - charge=0 + cell.charge=0 active=0 sleep(10)//Checks every second. @@ -90,11 +93,15 @@ canremove=1 verbs += /obj/item/clothing/suit/space/space_ninja/proc/init return + icon_state = "s-ninjan" + U.gloves.icon_state = "s-ninjan" + U.gloves.item_state = "s-ninjan" + U.update_clothing() U << "\blue Linking neural-net interface...\nPattern \green GREEN\blue, continuing operation." sleep(40) U << "\blue VOID-shift device status: ONLINE.\nCLOAK-tech device status: ONLINE." sleep(40) - U << "\blue Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [src.charge]." + U << "\blue Primary system status: ONLINE.\nBackup system status: ONLINE.\nCurrent energy capacity: [cell.charge]." sleep(40) U << "\blue All systems operational. Welcome to SpiderOS, [U.real_name]." U.verbs += /mob/proc/ninjashift @@ -157,7 +164,6 @@ unlock = 0 U.incorporeal_move = 0 U.density = 1 - icon_state = "s-ninja" spideros = 0 sleep(40) U.verbs -= /mob/proc/ninjashift @@ -210,6 +216,7 @@ U.gloves:draining=0 U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled + icon_state = "s-ninja" U.update_clothing() if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check. U.drop_item() @@ -231,8 +238,6 @@ var/mob/living/carbon/human/U = usr var/dat = "SpiderOS" - /*Here is where you would create a link for the cartridge used if the item has one. - As noted below, it's not worth the effort to make the cartridge removable unless it's done from the hub.*/ if(spideros==0) dat += " Refresh" else @@ -244,16 +249,12 @@ dat += "Welcome, [U.real_name].
" dat += "
" dat += " Current Time: [round(world.time / 36000)+12]:[(world.time / 600 % 60) < 10 ? add_zero(world.time / 600 % 60, 1) : world.time / 600 % 60]
" - dat += " Battery Life: [round(charge/100)]%
" + dat += " Battery Life: [round(cell.charge/100)]%
" dat += " Smoke Bombs: [sbombs]
" dat += "
" switch(spideros) if(0) - /* - For items that use cartridges (PDAs), simply switch() their hub function based on the cartridge inserted. - For ease of use, allow the removal of the cartidge only on the hub. - */ dat += "

Available Functions:

" dat += "