mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge branch 'master' of https://github.com/Markolie/Paradise
Conflicts: maps/cyberiad.dmm
This commit is contained in:
+21
-25
@@ -9,6 +9,7 @@ var/global/list/ghdel_profiling = list()
|
||||
var/list/fingerprintshidden
|
||||
var/fingerprintslast = null
|
||||
var/list/blood_DNA
|
||||
var/blood_color
|
||||
var/last_bumped = 0
|
||||
var/pass_flags = 0
|
||||
var/throwpass = 0
|
||||
@@ -376,30 +377,30 @@ its easier to just keep the beam vertical.
|
||||
|
||||
//returns 1 if made bloody, returns 0 otherwise
|
||||
/atom/proc/add_blood(mob/living/carbon/human/M as mob)
|
||||
if(flags & NOBLOODY) return 0
|
||||
.=1
|
||||
if (!( istype(M, /mob/living/carbon/human) ))
|
||||
|
||||
if(flags & NOBLOODY)
|
||||
return 0
|
||||
if (!istype(M.dna, /datum/dna))
|
||||
M.dna = new /datum/dna(null)
|
||||
M.dna.real_name = M.real_name
|
||||
M.check_dna()
|
||||
|
||||
if(!blood_DNA || !istype(blood_DNA, /list)) //if our list of DNA doesn't exist yet (or isn't a list) initialise it.
|
||||
blood_DNA = list()
|
||||
|
||||
//adding blood to humans
|
||||
else if (istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
//if this blood isn't already in the list, add it
|
||||
if(blood_DNA[H.dna.unique_enzymes])
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
|
||||
if(H.species.bloodflags & BLOOD_GREEN)
|
||||
H.update_inv_gloves(1,1)
|
||||
else
|
||||
H.update_inv_gloves(1,0) //handles bloody hands overlays and updating
|
||||
return 1 //we applied blood to the item
|
||||
return
|
||||
blood_color = "#A10808"
|
||||
if(istype(M))
|
||||
if (!istype(M.dna, /datum/dna))
|
||||
M.dna = new /datum/dna(null)
|
||||
M.dna.real_name = M.real_name
|
||||
M.check_dna()
|
||||
if (M.species)
|
||||
blood_color = M.species.blood_color
|
||||
. = 1
|
||||
return 1
|
||||
|
||||
|
||||
/atom/proc/clean_blood()
|
||||
src.germ_level = 0
|
||||
if(istype(blood_DNA, /list))
|
||||
del(blood_DNA)
|
||||
return 1
|
||||
|
||||
/atom/proc/add_vomit_floor(mob/living/carbon/M as mob, var/toxvomit = 0)
|
||||
if( istype(src, /turf/simulated) )
|
||||
@@ -413,11 +414,6 @@ its easier to just keep the beam vertical.
|
||||
if( istype(src, /turf/simulated) )
|
||||
new /obj/effect/decal/cleanable/poop(src)
|
||||
|
||||
/atom/proc/clean_blood()
|
||||
src.germ_level = 0
|
||||
if(istype(blood_DNA, /list))
|
||||
del(blood_DNA)
|
||||
return 1
|
||||
|
||||
/atom/proc/get_global_map_pos()
|
||||
if(!islist(global_map) || isemptylist(global_map)) return
|
||||
|
||||
@@ -1,447 +0,0 @@
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++
|
||||
==================================SPACE NINJA ABILITIES====================================
|
||||
___________________________________________________________________________________________
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
//=======//SAFETY CHECK//=======//
|
||||
/*
|
||||
X is optional, tells the proc to check for specific stuff. C is also optional.
|
||||
All the procs here assume that the character is wearing the ninja suit if they are using the procs.
|
||||
They should, as I have made every effort for that to be the case.
|
||||
In the case that they are not, I imagine the game will run-time error like crazy.
|
||||
s_cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
|
||||
*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0,X = 0)
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1.
|
||||
U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die.
|
||||
return 1
|
||||
else if(cell.charge<C)
|
||||
U << "\red Not enough energy."
|
||||
return 1
|
||||
switch(X)
|
||||
if(1)
|
||||
cancel_stealth()//Get rid of it.
|
||||
if(2)
|
||||
if(s_bombs<=0)
|
||||
U << "\red There are no more smoke bombs remaining."
|
||||
return 1
|
||||
if(3)
|
||||
if(a_boost<=0)
|
||||
U << "\red You do not have any more adrenaline boosters."
|
||||
return 1
|
||||
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 << "\blue There are <B>[s_bombs]</B> 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 (750E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 750
|
||||
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(mobloc.loc.name != "\improper SpiderClan Outpost")
|
||||
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.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
|
||||
s_coold = 1
|
||||
cell.charge-=(C)
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
else
|
||||
U<< "\red Your <b>NINJA HONOR</b> prevents you from teleporting here!"
|
||||
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 (1500E)"
|
||||
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 = 1500
|
||||
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(mobloc.loc.name != "\improper SpiderClan Outpost")
|
||||
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) // Commented out for now, possible implementation in a later upgrade tree.
|
||||
//T.kill_creatures(U)
|
||||
s_coold = 1
|
||||
cell.charge-=(C)
|
||||
else
|
||||
U << "\red You cannot teleport into solid walls or from solid matter"
|
||||
else
|
||||
U<< "\red Your <b>NINJA HONOR</b> prevents you from teleporting here!"
|
||||
return
|
||||
|
||||
//=======//EM PULSE//=======//
|
||||
//Disables nearby tech equipment.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
|
||||
set name = "EM Burst (2,000E)"
|
||||
set desc = "Disable any nearby technology with a electro-magnetic pulse."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 2000
|
||||
if(!ninjacost(C, 1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
emp_proof = 1 // This is a pretty crappy workaround, but the alternative was creating a special EMPulse proc just for Ninjas that doesn't trigger the act on their suits. - Dave
|
||||
empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
cell.charge-=(C)
|
||||
|
||||
spawn(3)
|
||||
emp_proof = 0
|
||||
return
|
||||
|
||||
//=======//ENERGY BLADE//=======//
|
||||
//Summons a blade of energy in active hand.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
|
||||
set name = "Energy Blade (500E)"
|
||||
set desc = "Create a focused beam of energy in your active hand."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 500
|
||||
if(!ninjacost(C, 1))
|
||||
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
|
||||
else
|
||||
U << "\red You can only summon one blade. Try dropping an item first."
|
||||
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
|
||||
if(!U.get_active_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_hands(W)
|
||||
if(!U.get_inactive_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_inactive_hand(W)
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
s_coold = 1
|
||||
return
|
||||
|
||||
//=======//NINJA STARS//=======//
|
||||
/*Shoots ninja stars at random people.
|
||||
This could be a lot better but I'm too tired atm.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
|
||||
set name = "Energy Star (500E)"
|
||||
set desc = "Launches an energy star at a random living target."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 500
|
||||
if(!ninjacost(C, 1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/targets[] = list()//So yo can shoot while yo throw dawg
|
||||
for(var/mob/living/M in oview(loc))
|
||||
if(M.stat) continue//Doesn't target corpses or paralyzed persons.
|
||||
targets.Add(M)
|
||||
if(targets.len)
|
||||
var/mob/living/target=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at.
|
||||
|
||||
var/turf/curloc = U.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(U.loc)
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
cell.charge-=(C)
|
||||
A.process()
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
|
||||
//=======//ENERGY NET//=======//
|
||||
/*Allows the ninja to capture people, I guess.
|
||||
Must right click on a mob to activate.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs.
|
||||
set name = "Energy Net (2,500E)"
|
||||
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 = 2500
|
||||
if(!ninjacost(C,1)&&iscarbon(M)) // Nets now cost 8,000
|
||||
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.
|
||||
var/obj/effect/stop/S
|
||||
S = new /obj/effect/stop
|
||||
S.victim = M
|
||||
S.loc = M.loc
|
||||
|
||||
var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc)
|
||||
E.layer = M.layer+1//To have it appear one layer above the mob.
|
||||
for(var/mob/O in viewers(U, 3))
|
||||
O.show_message(text("\red [] caught [] with an energy net!", U, M), 1)
|
||||
E.affecting = M
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
cell.charge-=(C)
|
||||
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 uranium.
|
||||
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, uranium, 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.
|
||||
if(U.said_last_words)
|
||||
U.said_last_words=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.
|
||||
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, "uranium", a_transfer)
|
||||
U << "\red You are beginning to feel the after-effect of the injection."
|
||||
a_boost--
|
||||
s_coold = 3
|
||||
return
|
||||
|
||||
/*
|
||||
===================================================================================
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<KAMIKAZE MODE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
===================================================================================
|
||||
Or otherwise known as anime mode. Which also happens to be ridiculously powerful.
|
||||
*/
|
||||
|
||||
//=======//NINJA MOVEMENT//=======//
|
||||
//Also makes you move like you're on crack.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjawalk()
|
||||
set name = "Shadow Walk"
|
||||
set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!U.incorporeal_move)
|
||||
U.incorporeal_move = 2
|
||||
U << "\blue You will now phase through solid matter."
|
||||
else
|
||||
U.incorporeal_move = 0
|
||||
U << "\blue You will no-longer phase through solid matter."
|
||||
return
|
||||
|
||||
//=======//5 TILE TELEPORT/GIB//=======//
|
||||
//Allows to gib up to five squares in a straight line. Seriously.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer()
|
||||
set name = "Phase Slayer"
|
||||
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
if(!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.kill_creatures(U)
|
||||
if(T==mobloc||T==destination) continue
|
||||
spawn(0)
|
||||
anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
|
||||
handle_teleport_grab(destination, U)
|
||||
U.loc = destination
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
s_coold = 1
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
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 << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1321,21 +1321,7 @@ datum
|
||||
|
||||
|
||||
check_completion()
|
||||
if(!ishuman(owner.current))
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == 2)
|
||||
return 0
|
||||
if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit: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)
|
||||
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_amount<target_amount) return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
debrain//I want braaaainssss
|
||||
@@ -1414,34 +1400,7 @@ datum
|
||||
|
||||
|
||||
check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
||||
var/captured_amount = 0
|
||||
var/area/ninja/holding/A = locate()
|
||||
for(var/mob/living/carbon/human/M in A)//Humans.
|
||||
if(M.stat==2)//Dead folks are worth less.
|
||||
captured_amount+=0.5
|
||||
continue
|
||||
captured_amount+=1
|
||||
for(var/mob/living/carbon/monkey/M in A)//Monkeys are almost worthless, you failure.
|
||||
captured_amount+=0.1
|
||||
for(var/mob/living/carbon/alien/larva/M in A)//Larva are important for research.
|
||||
if(M.stat==2)
|
||||
captured_amount+=0.5
|
||||
continue
|
||||
captured_amount+=1
|
||||
for(var/mob/living/carbon/alien/humanoid/M in A)//Aliens are worth twice as much as humans.
|
||||
if(istype(M, /mob/living/carbon/alien/humanoid/queen))//Queens are worth three times as much as humans.
|
||||
if(M.stat==2)
|
||||
captured_amount+=1.5
|
||||
else
|
||||
captured_amount+=3
|
||||
continue
|
||||
if(M.stat==2)
|
||||
captured_amount+=1
|
||||
continue
|
||||
captured_amount+=2
|
||||
if(captured_amount<target_amount)
|
||||
return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
datum/objective/silence
|
||||
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
/datum/game_mode/var/list/datum/mind/ninjas = list()
|
||||
// Keep in mind ninja-procs that aren't here will be where the event's defined
|
||||
/datum/game_mode/ninja
|
||||
name = "ninja"
|
||||
config_tag = "ninja"
|
||||
required_players = 10 //Can be adjusted later, should suffice for now.
|
||||
required_players_secret = 10
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
var/finished = 0
|
||||
|
||||
/datum/game_mode/ninja/announce()
|
||||
world << "<B>The current game mode is Ninja!</B>"
|
||||
|
||||
/datum/game_mode/ninja/can_start()
|
||||
if(!..())
|
||||
return 0
|
||||
var/list/datum/mind/possible_ninjas = get_players_for_role(BE_NINJA)
|
||||
if(possible_ninjas.len==0)
|
||||
return 0
|
||||
var/datum/mind/ninja = pick(possible_ninjas)
|
||||
ninjas += ninja
|
||||
modePlayer += ninja
|
||||
ninja.assigned_role = "MODE" //So they aren't chosen for other jobs.
|
||||
ninja.special_role = "Ninja"
|
||||
ninja.original = ninja.current
|
||||
if(ninjastart.len == 0)
|
||||
ninja.current << "<B>\red A proper starting location for you could not be found, please report this bug!</B>"
|
||||
ninja.current << "<B>\red Attempting to place at a carpspawn.</B>"
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "carpspawn")
|
||||
ninjastart.Add(L)
|
||||
if(ninjastart.len == 0 && latejoin.len > 0)
|
||||
ninja.current << "<B>\red Still no spawneable locations could be found. Defaulting to latejoin.</B>"
|
||||
return 1
|
||||
else if (ninjastart.len == 0)
|
||||
ninja.current << "<B>\red Still no spawneable locations could be found. Aborting.</B>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/game_mode/ninja/pre_setup()
|
||||
for(var/datum/mind/ninja in ninjas)
|
||||
ninja.current << browse(null, "window=playersetup")
|
||||
ninja.current = create_space_ninja(pick(ninjastart.len ? ninjastart : latejoin))
|
||||
ninja.current.ckey = ninja.key
|
||||
return 1
|
||||
|
||||
/datum/game_mode/ninja/post_setup()
|
||||
for(var/datum/mind/ninja in ninjas)
|
||||
if(ninja.current && !(istype(ninja.current,/mob/living/carbon/human))) return 0
|
||||
forge_ninja_objectives(ninja)
|
||||
var/mob/living/carbon/human/N = ninja.current
|
||||
N.internal = N.s_store
|
||||
N.internals.icon_state = "internal1"
|
||||
if(N.wear_suit && istype(N.wear_suit,/obj/item/clothing/suit/space/space_ninja))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = N.wear_suit
|
||||
S:randomize_param()
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/ninja/check_finished()
|
||||
if(config.continous_rounds)
|
||||
return ..()
|
||||
var/ninjas_alive = 0
|
||||
for(var/datum/mind/ninja in ninjas)
|
||||
if(!istype(ninja.current,/mob/living/carbon/human))
|
||||
continue
|
||||
if(ninja.current.stat==2)
|
||||
continue
|
||||
ninjas_alive++
|
||||
if (ninjas_alive)
|
||||
return ..()
|
||||
else
|
||||
finished = 1
|
||||
return 1
|
||||
|
||||
/datum/game_mode/ninja/proc/forge_ninja_objectives(var/datum/mind/ninja)
|
||||
var/objective_list[] = list(1,2,3,4,5)
|
||||
for(var/i=rand(2,4),i>0,i--)
|
||||
switch(pick(objective_list))
|
||||
if(1)//Kill
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.target = ninja_objective.find_target()
|
||||
if(ninja_objective.target != "Free Objective")
|
||||
ninja.objectives += ninja_objective
|
||||
else
|
||||
i++
|
||||
objective_list -= 1 // No more than one kill objective
|
||||
if(2)//Steal
|
||||
var/datum/objective/steal/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.target = ninja_objective.find_target()
|
||||
ninja.objectives += ninja_objective
|
||||
if(3)//Protect
|
||||
var/datum/objective/protect/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.target = ninja_objective.find_target()
|
||||
if(ninja_objective.target != "Free Objective")
|
||||
ninja.objectives += ninja_objective
|
||||
else
|
||||
i++
|
||||
objective_list -= 3
|
||||
if(4)//Download
|
||||
var/datum/objective/download/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.gen_amount_goal()
|
||||
ninja.objectives += ninja_objective
|
||||
objective_list -= 4
|
||||
if(5)//Harm
|
||||
var/datum/objective/harm/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.target = ninja_objective.find_target()
|
||||
if(ninja_objective.target != "Free Objective")
|
||||
ninja.objectives += ninja_objective
|
||||
else
|
||||
i++
|
||||
objective_list -= 5
|
||||
|
||||
var/datum/objective/survive/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja.objectives += ninja_objective
|
||||
ninja.current.mind = ninja
|
||||
|
||||
var/directive = generate_ninja_directive("heel")//Only hired by antags, not NT
|
||||
ninja.current << "You are an elite mercenary assassin of the Spider Clan, [ninja.current.real_name]. You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor.\nYour current directive is: \red <B>[directive]</B>\n \blue Try your best to adhere to this."
|
||||
ninja.store_memory("<B>Directive:</B> \red [directive]<br>")
|
||||
|
||||
var/obj_count = 1
|
||||
ninja.current << "\blue Your current objectives:"
|
||||
for(var/datum/objective/objective in ninja.objectives)
|
||||
ninja.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_ninja()
|
||||
if(ninjas.len)
|
||||
var/text = "<FONT size = 2><B>The ninjas were:</B></FONT>"
|
||||
for(var/datum/mind/ninja in ninjas)
|
||||
var/ninjawin = 1
|
||||
|
||||
text += "<br>[ninja.key] was [ninja.name] ("
|
||||
if(ninja.current)
|
||||
if(ninja.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
if(ninja.current.real_name != ninja.name)
|
||||
text += " as [ninja.current.real_name]"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
|
||||
if(ninja.objectives.len)//If the ninja had no objectives, don't need to process this.
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in ninja.objectives)
|
||||
if(objective.check_completion())
|
||||
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
|
||||
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
|
||||
else
|
||||
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
|
||||
feedback_add_details("traitor_objective","[objective.type]|FAIL")
|
||||
ninjawin = 0
|
||||
count++
|
||||
|
||||
var/special_role_text
|
||||
if(ninja.special_role)
|
||||
special_role_text = lowertext(ninja.special_role)
|
||||
else
|
||||
special_role_text = "antagonist"
|
||||
|
||||
if(ninjawin)
|
||||
text += "<br><font color='green'><B>The [special_role_text] was successful!</B></font>"
|
||||
feedback_add_details("traitor_success","SUCCESS")
|
||||
else
|
||||
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
|
||||
feedback_add_details("traitor_success","FAIL")
|
||||
|
||||
world << text
|
||||
return 1
|
||||
@@ -663,21 +663,7 @@ datum/objective/download
|
||||
|
||||
|
||||
check_completion()
|
||||
if(!ishuman(owner.current))
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == DEAD)
|
||||
return 0
|
||||
if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit: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)
|
||||
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_amount<target_amount) return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -689,34 +675,8 @@ datum/objective/capture
|
||||
|
||||
|
||||
check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
||||
var/captured_amount = 0
|
||||
var/area/ninja/holding/A = locate()
|
||||
for(var/mob/living/carbon/human/M in A)//Humans.
|
||||
if(M.stat == DEAD)//Dead folks are worth less.
|
||||
captured_amount+=0.5
|
||||
continue
|
||||
captured_amount+=1
|
||||
for(var/mob/living/carbon/monkey/M in A)//Monkeys are almost worthless, you failure.
|
||||
captured_amount+=0.1
|
||||
for(var/mob/living/carbon/alien/larva/M in A)//Larva are important for research.
|
||||
if(M.stat == DEAD)
|
||||
captured_amount+=0.5
|
||||
continue
|
||||
captured_amount+=1
|
||||
for(var/mob/living/carbon/alien/humanoid/M in A)//Aliens are worth twice as much as humans.
|
||||
if(istype(M, /mob/living/carbon/alien/humanoid/queen))//Queens are worth three times as much as humans.
|
||||
if(M.stat == DEAD)
|
||||
captured_amount+=1.5
|
||||
else
|
||||
captured_amount+=3
|
||||
continue
|
||||
if(M.stat == DEAD)
|
||||
captured_amount+=1
|
||||
continue
|
||||
captured_amount+=2
|
||||
if(captured_amount<target_amount)
|
||||
return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
visible_message("<span class='userdanger'>[user] has slashed [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
healthcheck()
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
visible_message("<span class='userdanger'>[M] has [M.attacktext] [src]!</span>")
|
||||
add_logs(M, src, "attacked", admin=0)
|
||||
if(prob(10))
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
healthcheck()
|
||||
|
||||
/obj/machinery/bot/Topic(href, href_list) //Master Topic to handle common functions.
|
||||
@@ -270,7 +270,7 @@
|
||||
/obj/machinery/bot/emag_act(user as mob)
|
||||
if (emagged < 2)
|
||||
Emag(user)
|
||||
|
||||
|
||||
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
health -= Proj.damage
|
||||
@@ -345,7 +345,7 @@
|
||||
if((!on) || (!message))
|
||||
return
|
||||
if(freqname)
|
||||
Radio.autosay(message, src.name, freqname, list(src.z))
|
||||
Radio.autosay(message, src.name, freqname, list(src.z))
|
||||
else
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("<span class='game say'><span class='name'>[src]</span> beeps, \"[message]\"</span>",2)
|
||||
@@ -791,4 +791,3 @@ obj/machinery/bot/proc/bot_summon()
|
||||
loc = Mb.loc
|
||||
frustration = 0
|
||||
return
|
||||
|
||||
@@ -206,10 +206,10 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
|
||||
/obj/machinery/bot/cleanbot/proc/get_targets()
|
||||
target_types = new/list()
|
||||
|
||||
target_types += /obj/effect/decal/cleanable/oil
|
||||
target_types += /obj/effect/decal/cleanable/blood/oil
|
||||
target_types += /obj/effect/decal/cleanable/vomit
|
||||
target_types += /obj/effect/decal/cleanable/poop
|
||||
target_types += /obj/effect/decal/cleanable/robot_debris
|
||||
target_types += /obj/effect/decal/cleanable/blood/gibs/robot
|
||||
target_types += /obj/effect/decal/cleanable/crayon
|
||||
target_types += /obj/effect/decal/cleanable/liquid_fuel
|
||||
target_types += /obj/effect/decal/cleanable/molten_item
|
||||
@@ -223,11 +223,10 @@ text("<A href='?src=\ref[src];power=1'>[on ? "On" : "Off"]</A>"))
|
||||
target_types += /obj/effect/decal/cleanable/mucus
|
||||
|
||||
if(blood)
|
||||
target_types += /obj/effect/decal/cleanable/xenoblood/
|
||||
target_types += /obj/effect/decal/cleanable/xenoblood/xgibs
|
||||
target_types += /obj/effect/decal/cleanable/blood/xeno/
|
||||
target_types += /obj/effect/decal/cleanable/blood/gibs/xeno
|
||||
target_types += /obj/effect/decal/cleanable/blood/
|
||||
target_types += /obj/effect/decal/cleanable/blood/gibs/
|
||||
target_types += /obj/effect/decal/cleanable/blood/green
|
||||
target_types += /obj/effect/decal/cleanable/blood/tracks
|
||||
target_types += /obj/effect/decal/cleanable/dirt
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ Auto Patrol[]"},
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/bot/ed209/proc/set_weapon() //used to update the projectile type and firing sound
|
||||
|
||||
@@ -139,7 +139,7 @@ var/global/mulebot_count = 0
|
||||
user << "<span class='notice'>You [locked ? "lock" : "unlock"] the mulebot's controls!</span>"
|
||||
flick("mulebot-emagged", src)
|
||||
playsound(loc, 'sound/effects/sparks1.ogg', 100, 0)
|
||||
|
||||
|
||||
/obj/machinery/bot/mulebot/ex_act(var/severity)
|
||||
unload(0)
|
||||
switch(severity)
|
||||
@@ -932,6 +932,6 @@ var/global/mulebot_count = 0
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
unload(0)
|
||||
qdel(src)
|
||||
|
||||
@@ -401,7 +401,7 @@ Auto Patrol: []"},
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
|
||||
new /obj/effect/decal/cleanable/oil(loc)
|
||||
new /obj/effect/decal/cleanable/blood/oil(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/bot/secbot/attack_alien(var/mob/living/carbon/alien/user as mob)
|
||||
|
||||
@@ -132,8 +132,6 @@
|
||||
//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
|
||||
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
|
||||
if(!near_camera(M))
|
||||
continue
|
||||
@@ -195,10 +193,6 @@
|
||||
if(H.digitalcamo)
|
||||
U.ai_cancel_tracking(1)
|
||||
return
|
||||
if(H.head && istype(H.head, /obj/item/clothing/head/helmet/space/space_ninja) && (H.head.flags & NODROP))
|
||||
U.ai_cancel_tracking(1)
|
||||
return
|
||||
|
||||
if(istype(target.loc,/obj/effect/dummy))
|
||||
U.ai_cancel_tracking()
|
||||
return
|
||||
|
||||
@@ -174,9 +174,9 @@
|
||||
icon_state = "ai-empty"
|
||||
anchored = 1
|
||||
state = 20//So it doesn't interact based on the above. Not really necessary.
|
||||
|
||||
|
||||
/obj/structure/AIcore/deactivated/Destroy()
|
||||
empty_playable_ai_cores -= src
|
||||
empty_playable_ai_cores -= src
|
||||
..()
|
||||
|
||||
/obj/structure/AIcore/deactivated/attackby(var/obj/item/W, var/mob/user, params)
|
||||
@@ -202,7 +202,7 @@
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/client/proc/empty_ai_core_toggle_latejoin()
|
||||
set name = "Toggle AI Core Latejoin"
|
||||
set category = "Admin"
|
||||
@@ -210,7 +210,7 @@
|
||||
var/list/cores = list()
|
||||
for(var/obj/structure/AIcore/deactivated/D in world)
|
||||
cores["[D] ([D.loc.loc])"] = D
|
||||
|
||||
|
||||
if(!cores.len)
|
||||
src << "No deactivated AI cores were found."
|
||||
|
||||
@@ -263,7 +263,7 @@ That prevents a few funky behaviors.
|
||||
T.cancel_camera()
|
||||
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
if("NINJASUIT")
|
||||
/*if("NINJASUIT")
|
||||
var/obj/item/clothing/suit/space/space_ninja/C = src
|
||||
if(C.AI)//If there is an AI on card.
|
||||
U << "\red <b>Transfer failed</b>: \black Existing AI found on this terminal. Remove existing AI to install a new one."
|
||||
@@ -284,7 +284,7 @@ That prevents a few funky behaviors.
|
||||
C.AI = T
|
||||
T.cancel_camera()
|
||||
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
|
||||
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
|
||||
U << "\blue <b>Transfer successful</b>: \black [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."*/
|
||||
|
||||
if("INACTIVE")//Inactive AI object.
|
||||
var/obj/structure/AIcore/deactivated/T = target
|
||||
@@ -302,7 +302,7 @@ That prevents a few funky behaviors.
|
||||
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||
U << "\blue <b>Transfer successful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
|
||||
del(T)
|
||||
if("NINJASUIT")
|
||||
/*if("NINJASUIT")
|
||||
var/obj/item/clothing/suit/space/space_ninja/C = src
|
||||
var/mob/living/silicon/ai/A = C.AI
|
||||
if(A)
|
||||
@@ -312,7 +312,7 @@ That prevents a few funky behaviors.
|
||||
A.cancel_camera()
|
||||
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
|
||||
U << "\blue <b>Transfer succesful</b>: \black [A.name] ([rand(1000,9999)].exe) installed and executed succesfully. Local copy has been removed."
|
||||
del(T)
|
||||
del(T)*/
|
||||
if("AIFIXER")//AI Fixer terminal.
|
||||
var/obj/machinery/computer/aifixer/T = target
|
||||
switch(interaction)
|
||||
@@ -357,7 +357,7 @@ That prevents a few funky behaviors.
|
||||
U << "\red <b>ERROR</b>: \black Reconstruction in progress."
|
||||
else if (!T.occupant)
|
||||
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
|
||||
if("NINJASUIT")
|
||||
/*if("NINJASUIT")
|
||||
var/obj/item/clothing/suit/space/space_ninja/C = src
|
||||
if(!T.contents.len)
|
||||
if (!C.AI)
|
||||
@@ -390,8 +390,8 @@ That prevents a few funky behaviors.
|
||||
else if (T.active)
|
||||
U << "\red <b>ERROR</b>: \black Reconstruction in progress."
|
||||
else if (!T.occupant)
|
||||
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."
|
||||
if("NINJASUIT")//Ninjasuit
|
||||
U << "\red <b>ERROR</b>: \black Unable to locate artificial intelligence."*/
|
||||
/*if("NINJASUIT")//Ninjasuit
|
||||
var/obj/item/clothing/suit/space/space_ninja/T = target
|
||||
switch(interaction)
|
||||
if("AICARD")
|
||||
@@ -426,7 +426,7 @@ That prevents a few funky behaviors.
|
||||
A_T << "You have been uploaded to a mobile storage device."
|
||||
U << "\blue <b>SUCCESS</b>: \black [A_T.name] ([rand(1000,9999)].exe) removed from local memory and installed to host."
|
||||
else if(A_T)//If the target AI is dead. Else just go to return since nothing would happen if both are empty.
|
||||
U << "\red <b>ERROR</b>: \black [A_T.name] data core is corrupted. Unable to install."
|
||||
U << "\red <b>ERROR</b>: \black [A_T.name] data core is corrupted. Unable to install."*/
|
||||
|
||||
else
|
||||
U << "\red <b>ERROR</b>: \black AI flush is in progress, cannot execute transfer protocol."
|
||||
|
||||
@@ -2,236 +2,130 @@
|
||||
|
||||
|
||||
/obj/machinery/computer/robotics
|
||||
name = "Robotics Control"
|
||||
name = "robotics control console"
|
||||
desc = "Used to remotely lockdown or detonate linked Cyborgs."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "robot"
|
||||
req_access = list(access_robotics)
|
||||
circuit = "/obj/item/weapon/circuitboard/robotics"
|
||||
|
||||
var/id = 0.0
|
||||
circuit = /obj/item/weapon/circuitboard/robotics
|
||||
var/temp = null
|
||||
var/status = 0
|
||||
var/timeleft = 60
|
||||
var/stop = 0.0
|
||||
var/screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text
|
||||
|
||||
l_color = "#CD00CD"
|
||||
|
||||
|
||||
/obj/machinery/computer/robotics/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/robotics/attack_paw(var/mob/user as mob)
|
||||
|
||||
return src.attack_hand(user)
|
||||
return
|
||||
/obj/machinery/computer/robotics/proc/can_control(var/mob/user, var/mob/living/silicon/robot/R)
|
||||
if(!istype(R))
|
||||
return 0
|
||||
if(istype(user, /mob/living/silicon/ai))
|
||||
if (R.connected_ai != user)
|
||||
return 0
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
if (R != user)
|
||||
return 0
|
||||
if(R.scrambledcodes)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/robotics/attack_hand(var/mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/computer/robotics/interact(var/mob/user as mob)
|
||||
if (src.z > 6)
|
||||
user << "\red <b>Unable to establish a connection</b>: \black You're too far away from the station!"
|
||||
user << "<span class='userdanger'>Unable to establish a connection</span>: \black You're too far away from the station!"
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = "<TT>[src.temp]</TT><BR><BR><A href='?src=\ref[src];temp=1'>Clear Screen</A>"
|
||||
else
|
||||
if(screen == 0)
|
||||
dat += "<h3>Cyborg Control Console</h3><BR>"
|
||||
dat += "<A href='?src=\ref[src];screen=1'>1. Cyborg Status</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];screen=2'>2. Emergency Full Destruct</A><BR>"
|
||||
if(screen == 1)
|
||||
for(var/mob/living/silicon/robot/R in mob_list)
|
||||
if(istype(R, /mob/living/silicon/robot/drone))
|
||||
continue //There's a specific console for drones.
|
||||
if(istype(user, /mob/living/silicon/ai))
|
||||
if (R.connected_ai != user)
|
||||
continue
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
if (R != user)
|
||||
continue
|
||||
if(R.scrambledcodes)
|
||||
continue
|
||||
var/robots = 0
|
||||
for(var/mob/living/silicon/robot/R in mob_list)
|
||||
if(!can_control(user, R))
|
||||
continue
|
||||
robots++
|
||||
dat += "[R.name] |"
|
||||
if(R.stat)
|
||||
dat += " Not Responding |"
|
||||
else if (!R.canmove)
|
||||
dat += " Locked Down |"
|
||||
else
|
||||
dat += " Operating Normally |"
|
||||
if (!R.canmove)
|
||||
else if(R.cell)
|
||||
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
|
||||
else
|
||||
dat += " No Cell Installed |"
|
||||
if(R.module)
|
||||
dat += " Module Installed ([R.module.name]) |"
|
||||
else
|
||||
dat += " No Module Installed |"
|
||||
if(R.connected_ai)
|
||||
dat += " Slaved to [R.connected_ai.name] |"
|
||||
else
|
||||
dat += " Independent from AI |"
|
||||
if (istype(user, /mob/living/silicon))
|
||||
if(issilicon(user) && is_special_character(user) && !R.emagged)
|
||||
dat += "<A href='?src=\ref[src];magbot=\ref[R]'>(<font color=blue><i>Hack</i></font>)</A> "
|
||||
dat += "<A href='?src=\ref[src];stopbot=\ref[R]'>(<font color=green><i>[R.canmove ? "Lockdown" : "Release"]</i></font>)</A> "
|
||||
dat += "<A href='?src=\ref[src];killbot=\ref[R]'>(<font color=red><i>Destroy</i></font>)</A>"
|
||||
dat += "<BR>"
|
||||
|
||||
dat += "[R.name] |"
|
||||
if(R.stat)
|
||||
dat += " Not Responding |"
|
||||
else if (!R.canmove)
|
||||
dat += " Locked Down |"
|
||||
else
|
||||
dat += " Operating Normally |"
|
||||
if (!R.canmove)
|
||||
else if(R.cell)
|
||||
dat += " Battery Installed ([R.cell.charge]/[R.cell.maxcharge]) |"
|
||||
else
|
||||
dat += " No Cell Installed |"
|
||||
if(R.module)
|
||||
dat += " Module Installed ([R.module.name]) |"
|
||||
else
|
||||
dat += " No Module Installed |"
|
||||
if(R.connected_ai)
|
||||
dat += " Slaved to [R.connected_ai.name] |"
|
||||
else
|
||||
dat += " Independent from AI |"
|
||||
if (istype(user, /mob/living/silicon))
|
||||
if((user.mind.special_role && user.mind.original == user) && !R.emagged)
|
||||
dat += "<A href='?src=\ref[src];magbot=\ref[R]'>(<font color=blue><i>Hack</i></font>)</A> "
|
||||
dat += "<A href='?src=\ref[src];stopbot=\ref[R]'>(<font color=green><i>[R.canmove ? "Lockdown" : "Release"]</i></font>)</A> "
|
||||
dat += "<A href='?src=\ref[src];killbot=\ref[R]'>(<font color=red><i>Destroy</i></font>)</A>"
|
||||
dat += "<BR>"
|
||||
dat += "<A href='?src=\ref[src];screen=0'>(Return to Main Menu)</A><BR>"
|
||||
if(screen == 2)
|
||||
if(!src.status)
|
||||
dat += {"<BR><B>Emergency Robot Self-Destruct</B><HR>\nStatus: Off<BR>
|
||||
\n<BR>
|
||||
\nCountdown: [src.timeleft]/60 <A href='?src=\ref[src];reset=1'>\[Reset\]</A><BR>
|
||||
\n<BR>
|
||||
\n<A href='?src=\ref[src];eject=1'>Start Sequence</A><BR>
|
||||
\n<BR>
|
||||
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
||||
else
|
||||
dat = {"<B>Emergency Robot Self-Destruct</B><HR>\nStatus: Activated<BR>
|
||||
\n<BR>
|
||||
\nCountdown: [src.timeleft]/60 \[Reset\]<BR>
|
||||
\n<BR>\n<A href='?src=\ref[src];stop=1'>Stop Sequence</A><BR>
|
||||
\n<BR>
|
||||
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
||||
dat += "<A href='?src=\ref[src];screen=0'>(Return to Main Menu)</A><BR>"
|
||||
if(!robots)
|
||||
dat += "No Cyborg Units detected within access parameters."
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
var/datum/browser/popup = new(user, "computer", "Cyborg Control Console", 400, 500)
|
||||
popup.set_content(dat)
|
||||
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/robotics/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
return
|
||||
|
||||
if (href_list["eject"])
|
||||
src.temp = {"Destroy Robots?<BR>
|
||||
<BR><B><A href='?src=\ref[src];eject2=1'>\[Swipe ID to initiate destruction sequence\]</A></B><BR>
|
||||
<A href='?src=\ref[src];temp=1'>Cancel</A>"}
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
|
||||
else if (href_list["eject2"])
|
||||
var/obj/item/weapon/card/id/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
if (istype(I))
|
||||
if(src.check_access(I))
|
||||
if (!status)
|
||||
msg_admin_attack("\blue [key_name_admin(usr)] has initiated the global cyborg killswitch!")
|
||||
log_game("\blue [key_name(usr)] has initiated the global cyborg killswitch!")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([usr.ckey]) has initiated the global cyborg killswitch!</font>")
|
||||
src.status = 1
|
||||
src.start_sequence()
|
||||
src.temp = null
|
||||
else if (href_list["killbot"])
|
||||
if(src.allowed(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["killbot"])
|
||||
if(can_control(usr, R))
|
||||
var/choice = input("Are you certain you wish to detonate [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm" && can_control(usr, R) && !..())
|
||||
if(R.mind && R.mind.special_role && R.emagged)
|
||||
R << "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered."
|
||||
R.ResetSecurityCodes()
|
||||
else
|
||||
message_admins("<span class='notice'>[key_name(usr, usr.client)](<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>) detonated [key_name(R, R.client)](<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[R.x];Y=[R.y];Z=[R.z]'>JMP</a>)!</span>")
|
||||
log_game("\<span class='notice'>[key_name(usr)] detonated [key_name(R)]!</span>")
|
||||
if(R.connected_ai)
|
||||
R.connected_ai << "<br><br><span class='alert'>ALERT - Cyborg detonation detected: [R.name]</span><br>"
|
||||
R.self_destruct()
|
||||
else
|
||||
usr << "<span class='danger'>Access Denied.</span>"
|
||||
|
||||
else
|
||||
usr << "\red Access Denied."
|
||||
else if (href_list["stopbot"])
|
||||
if(src.allowed(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["stopbot"])
|
||||
if(can_control(usr, R))
|
||||
var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm" && can_control(usr, R) && !..())
|
||||
message_admins("<span class='notice'>[key_name(usr, usr.client)](<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[usr.x];Y=[usr.y];Z=[usr.z]'>JMP</a>) [R.canmove ? "locked down" : "released"] [key_name(R, R.client)](<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[R.x];Y=[R.y];Z=[R.z]'>JMP</a>)!</span>")
|
||||
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [key_name(R)]!")
|
||||
R.SetLockdown(!R.lockcharge)
|
||||
R << "[!R.lockcharge ? "<span class='notice'>Your lockdown has been lifted!" : "<span class='alert'>You have been locked down!"]</span>"
|
||||
if(R.connected_ai)
|
||||
R.connected_ai << "[!R.lockcharge ? "<span class='notice'>NOTICE - Cyborg lockdown lifted" : "<span class='alert'>ALERT - Cyborg lockdown detected"]: <a href='byond://?src=\ref[R.connected_ai];track2=\ref[R.connected_ai];track=\ref[R]'>[R.name]</a></span><br>"
|
||||
|
||||
else if (href_list["stop"])
|
||||
src.temp = {"
|
||||
Stop Robot Destruction Sequence?<BR>
|
||||
<BR><A href='?src=\ref[src];stop2=1'>Yes</A><BR>
|
||||
<A href='?src=\ref[src];temp=1'>No</A>"}
|
||||
else
|
||||
usr << "<span class='danger'>Access Denied.</span>"
|
||||
|
||||
else if (href_list["stop2"])
|
||||
src.stop = 1
|
||||
src.temp = null
|
||||
src.status = 0
|
||||
else if (href_list["magbot"])
|
||||
if(issilicon(usr) && is_special_character(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["magbot"])
|
||||
if(istype(R) && !R.emagged && R.connected_ai == usr && !R.scrambledcodes && can_control(usr, R))
|
||||
log_game("[key_name(usr)] emagged [R.name] using robotic console!")
|
||||
R.emagged = 1
|
||||
if(R.mind.special_role)
|
||||
R.verbs += /mob/living/silicon/robot/proc/ResetSecurityCodes
|
||||
|
||||
else if (href_list["reset"])
|
||||
src.timeleft = 60
|
||||
|
||||
else if (href_list["temp"])
|
||||
src.temp = null
|
||||
else if (href_list["screen"])
|
||||
switch(href_list["screen"])
|
||||
if("0")
|
||||
screen = 0
|
||||
if("1")
|
||||
screen = 1
|
||||
if("2")
|
||||
screen = 2
|
||||
else if (href_list["killbot"])
|
||||
if(src.allowed(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["killbot"])
|
||||
if(R)
|
||||
var/choice = input("Are you certain you wish to detonate [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm")
|
||||
if(R && istype(R))
|
||||
if(R.mind && R.mind.special_role && R.emagged)
|
||||
R << "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered."
|
||||
R.ResetSecurityCodes()
|
||||
|
||||
else
|
||||
msg_admin_attack("\blue [key_name_admin(usr)] detonated [R.name]!")
|
||||
log_game("\blue [key_name_admin(usr)] detonated [R.name]!")
|
||||
use_log += text("\[[time_stamp()]\] <font color='red'>[usr.name] ([usr.ckey]) detonated [R.name] ([R.ckey])!</font>")
|
||||
R.self_destruct()
|
||||
else
|
||||
usr << "\red Access Denied."
|
||||
|
||||
else if (href_list["stopbot"])
|
||||
if(src.allowed(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["stopbot"])
|
||||
if(R && istype(R)) // Extra sancheck because of input var references
|
||||
var/choice = input("Are you certain you wish to [R.canmove ? "lock down" : "release"] [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm")
|
||||
if(R && istype(R))
|
||||
msg_admin_attack("\blue [key_name_admin(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
|
||||
log_game("[key_name(usr)] [R.canmove ? "locked down" : "released"] [R.name]!")
|
||||
R.canmove = !R.canmove
|
||||
if (R.lockcharge)
|
||||
// R.cell.charge = R.lockcharge
|
||||
R.lockcharge = !R.lockcharge
|
||||
R << "Your lockdown has been lifted!"
|
||||
else
|
||||
R.lockcharge = !R.lockcharge
|
||||
// R.cell.charge = 0
|
||||
R << "You have been locked down!"
|
||||
|
||||
else
|
||||
usr << "\red Access Denied."
|
||||
|
||||
else if (href_list["magbot"])
|
||||
if(src.allowed(usr))
|
||||
var/mob/living/silicon/robot/R = locate(href_list["magbot"])
|
||||
|
||||
// whatever weirdness this is supposed to be, but that is how the href gets added, so here it is again
|
||||
if(istype(R) && istype(usr, /mob/living/silicon) && usr.mind.special_role && (usr.mind.original == usr) && !R.emagged)
|
||||
|
||||
var/choice = input("Are you certain you wish to hack [R.name]?") in list("Confirm", "Abort")
|
||||
if(choice == "Confirm")
|
||||
if(R && istype(R))
|
||||
msg_admin_attack("\blue [key_name_admin(usr)] emagged [R.name] using robotic console!")
|
||||
log_game("[key_name(usr)] emagged [R.name] using robotic console!")
|
||||
R.emagged = 1
|
||||
if(R.hud_used)
|
||||
R.hud_used.update_robot_modules_display() //Shows/hides the emag item if the inventory screen is already open.
|
||||
if(R.mind.special_role)
|
||||
R.verbs += /mob/living/silicon/robot/proc/ResetSecurityCodes
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/robotics/proc/start_sequence()
|
||||
|
||||
do
|
||||
if(src.stop)
|
||||
src.stop = 0
|
||||
return
|
||||
src.timeleft--
|
||||
sleep(10)
|
||||
while(src.timeleft)
|
||||
|
||||
for(var/mob/living/silicon/robot/R in mob_list)
|
||||
if(!R.scrambledcodes && !istype(R, /mob/living/silicon/robot/drone))
|
||||
R.self_destruct()
|
||||
|
||||
return
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/dirty = 0 // Does it need cleaning?
|
||||
var/gibtime = 40 // Time from starting until meat appears
|
||||
var/mob/living/occupant // Mob who has been put inside
|
||||
var/locked = 0 //Used to prevent mobs from breaking the feedin anim
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 500
|
||||
@@ -66,6 +67,8 @@
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/gibber/relaymove(mob/user as mob)
|
||||
if(locked)
|
||||
return
|
||||
src.go_out()
|
||||
return
|
||||
|
||||
@@ -75,6 +78,9 @@
|
||||
if(operating)
|
||||
user << "\red It's locked and running"
|
||||
return
|
||||
if(locked)
|
||||
user << "\red Wait for [occupant.name] to finish being loaded!"
|
||||
return
|
||||
else
|
||||
src.startgibbing(user)
|
||||
|
||||
@@ -101,6 +107,7 @@
|
||||
src.occupant = M
|
||||
del(G)
|
||||
update_icon()
|
||||
feedinTopanim()
|
||||
|
||||
/obj/machinery/gibber/verb/eject()
|
||||
set category = "Object"
|
||||
@@ -116,6 +123,8 @@
|
||||
/obj/machinery/gibber/proc/go_out()
|
||||
if (!src.occupant)
|
||||
return
|
||||
if (locked)
|
||||
return
|
||||
for(var/obj/O in src)
|
||||
O.loc = src.loc
|
||||
if (src.occupant.client)
|
||||
@@ -126,6 +135,42 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/gibber/proc/feedinTopanim()
|
||||
if(!src.occupant)
|
||||
return
|
||||
|
||||
src.locked = 1
|
||||
|
||||
var/image/gibberoverlay = new
|
||||
gibberoverlay.icon = src.icon
|
||||
gibberoverlay.icon_state = "grinderoverlay"
|
||||
gibberoverlay.overlays += image('icons/obj/kitchen.dmi', "gridle")
|
||||
|
||||
var/image/feedee = new
|
||||
occupant.dir = 2
|
||||
feedee.icon = getFlatIcon(occupant, 2)
|
||||
feedee.pixel_y = 25
|
||||
feedee.pixel_x = 2
|
||||
overlays += feedee
|
||||
overlays += gibberoverlay
|
||||
|
||||
var/i //our counter
|
||||
for(i=0,i<30,i++)
|
||||
overlays -= gibberoverlay
|
||||
overlays -= feedee
|
||||
feedee.pixel_y--
|
||||
if(feedee.pixel_y == 16)
|
||||
feedee.icon += icon('icons/obj/kitchen.dmi', "footicon")
|
||||
continue
|
||||
if(feedee.pixel_y == -5)
|
||||
overlays -= feedee
|
||||
overlays -= gibberoverlay
|
||||
src.locked = 0
|
||||
break
|
||||
overlays += feedee
|
||||
overlays += gibberoverlay
|
||||
sleep(1)
|
||||
|
||||
|
||||
/obj/machinery/gibber/proc/startgibbing(mob/user as mob)
|
||||
if(src.operating)
|
||||
|
||||
@@ -458,10 +458,6 @@
|
||||
user.do_attack_animation(src)
|
||||
src.log_message("Attack by hand/paw. Attacker - [user].",1)
|
||||
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("MECHA",src,user:wear_suit)
|
||||
return
|
||||
|
||||
if ((HULK in user.mutations) && !prob(src.deflect_chance))
|
||||
src.take_damage(15)
|
||||
|
||||
@@ -1,55 +1,33 @@
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood
|
||||
/obj/effect/decal/cleanable/blood/xeno
|
||||
name = "xeno blood"
|
||||
desc = "It's green and acidic. It looks like... <i>blood?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
basecolor = "#05EE05"
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xsplatter
|
||||
random_icon_states = list("xgibbl1", "xgibbl2", "xgibbl3", "xgibbl4", "xgibbl5")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno
|
||||
name = "xeno gibs"
|
||||
desc = "Gnarly..."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "xgib1"
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
|
||||
basecolor = "#05EE05"
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/up
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/update_icon()
|
||||
color = "#FFFFFF"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/up
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibup1","xgibup1","xgibup1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/down
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/down
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6","xgibdown1","xgibdown1","xgibdown1")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/body
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/body
|
||||
random_icon_states = list("xgibhead", "xgibtorso")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/limb
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/limb
|
||||
random_icon_states = list("xgibleg", "xgibarm")
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/core
|
||||
/obj/effect/decal/cleanable/blood/gibs/xeno/core
|
||||
random_icon_states = list("xgibmid1", "xgibmid2", "xgibmid3")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/xtracks
|
||||
icon_state = "xtracks"
|
||||
random_icon_states = null
|
||||
basecolor = "#05EE05"
|
||||
@@ -1,27 +1,36 @@
|
||||
#define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var)
|
||||
#define DRYING_TIME 5 * 60*10 //for 1 unit of depth in puddle (amount var)
|
||||
|
||||
var/global/list/image/splatter_cache=list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood
|
||||
name = "blood"
|
||||
desc = "It's red and gooey. Perhaps it's the chef's cooking?"
|
||||
var/dryname = "dried blood"
|
||||
desc = "It's thick and gooey. Perhaps it's the chef's cooking?"
|
||||
var/drydesc = "It's dry and crusty. Someone is not doing their job."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
icon_state = "mfloor1"
|
||||
random_icon_states = list("mfloor1", "mfloor2", "mfloor3", "mfloor4", "mfloor5", "mfloor6", "mfloor7")
|
||||
var/base_icon = 'icons/effects/blood.dmi'
|
||||
var/list/viruses = list()
|
||||
blood_DNA = list()
|
||||
var/basecolor="#A10808" // Color when wet.
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/amount = 5
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Del()
|
||||
for(var/datum/disease2/disease/D in viruses)
|
||||
D.cure(0)
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/New()
|
||||
..()
|
||||
update_icon()
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/gibs))
|
||||
return
|
||||
if(istype(src, /obj/effect/decal/cleanable/blood/tracks))
|
||||
return // We handle our own drying.
|
||||
if(src.type == /obj/effect/decal/cleanable/blood)
|
||||
if(src.loc && isturf(src.loc))
|
||||
for(var/obj/effect/decal/cleanable/blood/B in src.loc)
|
||||
@@ -32,6 +41,10 @@
|
||||
spawn(DRYING_TIME * (amount+1))
|
||||
dry()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/update_icon()
|
||||
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
|
||||
color = basecolor
|
||||
|
||||
/obj/effect/decal/cleanable/blood/Crossed(mob/living/carbon/human/perp)
|
||||
if (!istype(perp))
|
||||
return
|
||||
@@ -44,16 +57,25 @@
|
||||
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
|
||||
hasfeet = 0
|
||||
if(perp.shoes && !perp.buckled)//Adding blood to shoes
|
||||
perp.shoes:track_blood = max(amount,perp.shoes:track_blood) //Adding blood to shoes
|
||||
if(!perp.shoes.blood_overlay)
|
||||
perp.shoes.generate_blood_overlay()
|
||||
if(!perp.shoes.blood_DNA)
|
||||
perp.shoes.blood_DNA = list()
|
||||
perp.shoes.overlays += perp.shoes.blood_overlay
|
||||
perp.update_inv_shoes(1,0)
|
||||
perp.shoes.blood_DNA |= blood_DNA.Copy()
|
||||
var/obj/item/clothing/shoes/S = perp.shoes
|
||||
if(istype(S))
|
||||
S.blood_color = basecolor
|
||||
S.track_blood = max(amount,S.track_blood)
|
||||
if(!S.blood_overlay)
|
||||
S.generate_blood_overlay()
|
||||
if(!S.blood_DNA)
|
||||
S.blood_DNA = list()
|
||||
S.blood_overlay.color = basecolor
|
||||
S.overlays += S.blood_overlay
|
||||
if(S.blood_overlay && S.blood_overlay.color != basecolor)
|
||||
S.blood_overlay.color = basecolor
|
||||
S.overlays.Cut()
|
||||
S.overlays += S.blood_overlay
|
||||
S.blood_DNA |= blood_DNA.Copy()
|
||||
|
||||
else if (hasfeet)//Or feet
|
||||
perp.track_blood = max(amount,perp.track_blood) //Or feet
|
||||
perp.feet_blood_color = basecolor
|
||||
perp.track_blood = max(amount,perp.track_blood)
|
||||
if(!perp.feet_blood_DNA)
|
||||
perp.feet_blood_DNA = list()
|
||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||
@@ -61,17 +83,14 @@
|
||||
var/obj/structure/stool/bed/chair/wheelchair/W = perp.buckled
|
||||
W.bloodiness = 4
|
||||
|
||||
perp.update_inv_shoes(1)
|
||||
amount--
|
||||
|
||||
/obj/effect/decal/cleanable/blood/proc/dry()
|
||||
name = "dried [src]"
|
||||
desc = "It's dark red and crusty. Someone is not doing their job."
|
||||
var/icon/I = icon(icon,icon_state)
|
||||
I.SetIntensity(0.7)
|
||||
icon = I
|
||||
name = dryname
|
||||
desc = drydesc
|
||||
color = adjust_brightness(color, -50)
|
||||
amount = 0
|
||||
spawn(DRYING_TIME)
|
||||
Destroy()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/attack_hand(mob/living/carbon/human/user)
|
||||
..()
|
||||
@@ -81,17 +100,33 @@
|
||||
return
|
||||
var/taken = rand(1,amount)
|
||||
amount -= taken
|
||||
user << "<span class='notice'>You get some blood on your hands.</span>"
|
||||
user << "<span class='notice'>You get some of \the [src] on your hands.</span>"
|
||||
if (!user.blood_DNA)
|
||||
user.blood_DNA = list()
|
||||
user.blood_DNA |= blood_DNA.Copy()
|
||||
user.bloody_hands += taken
|
||||
user.hand_blood_color = basecolor
|
||||
user.update_inv_gloves(1)
|
||||
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
|
||||
|
||||
/obj/effect/decal/cleanable/blood/splatter
|
||||
random_icon_states = list("gibbl1", "gibbl2", "gibbl3", "gibbl4", "gibbl5")
|
||||
amount = 2
|
||||
random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
|
||||
amount = 2
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip
|
||||
name = "drips of blood"
|
||||
desc = "It's red."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/drip.dmi'
|
||||
icon_state = "1"
|
||||
random_icon_states = list("1","2","3","4","5")
|
||||
amount = 0
|
||||
var/list/drips = list()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip/New()
|
||||
..()
|
||||
spawn(1)
|
||||
drips |= icon_state
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing
|
||||
icon_state = "tracks"
|
||||
@@ -103,236 +138,16 @@
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/New()
|
||||
..()
|
||||
for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
|
||||
random_icon_states.Remove(W.icon_state)
|
||||
icon_state = pick(random_icon_states)
|
||||
if(random_icon_states.len)
|
||||
for(var/obj/effect/decal/cleanable/blood/writing/W in loc)
|
||||
random_icon_states.Remove(W.icon_state)
|
||||
icon_state = pick(random_icon_states)
|
||||
else
|
||||
icon_state = "writing1"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/writing/examine()
|
||||
..()
|
||||
usr << "It reads: <font color='#600000'>\"[message]\"<font>"
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/green
|
||||
name = "green blood"
|
||||
desc = "It's green and gooey. Perhaps it's the chef's cooking?"
|
||||
icon_state = "xfloor1"
|
||||
random_icon_states = list("xfloor1", "xfloor2", "xfloor3", "xfloor4", "xfloor5", "xfloor6", "xfloor7")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/green/Crossed(mob/living/carbon/human/perp)
|
||||
if (!istype(perp))
|
||||
return
|
||||
if(amount < 1)
|
||||
return
|
||||
|
||||
var/datum/organ/external/l_foot = perp.get_organ("l_foot")
|
||||
var/datum/organ/external/r_foot = perp.get_organ("r_foot")
|
||||
var/hasfeet = 1
|
||||
if((!l_foot || l_foot.status & ORGAN_DESTROYED) && (!r_foot || r_foot.status & ORGAN_DESTROYED))
|
||||
hasfeet = 0
|
||||
if(perp.shoes && !perp.buckled)//Adding blood to shoes
|
||||
perp.shoes:track_blood_green= max(amount,perp.shoes:track_blood_green) //Adding blood to shoes
|
||||
if(!perp.shoes.blood_overlay)
|
||||
perp.shoes.blood_overlay_color = 1
|
||||
perp.shoes.generate_blood_overlay()
|
||||
if(!perp.shoes.blood_DNA)
|
||||
perp.shoes.blood_DNA = list()
|
||||
perp.shoes.overlays += perp.shoes.blood_overlay
|
||||
perp.update_inv_shoes(1,1)
|
||||
perp.shoes.blood_DNA |= blood_DNA.Copy()
|
||||
else if (hasfeet)//Or feet
|
||||
perp.track_blood_green = max(amount,perp.track_blood_green) //Or feet
|
||||
if(!perp.feet_blood_DNA)
|
||||
perp.feet_blood_DNA = list()
|
||||
perp.feet_blood_DNA |= blood_DNA.Copy()
|
||||
else if (perp.buckled && istype(perp.buckled, /obj/structure/stool/bed/chair/wheelchair))
|
||||
var/obj/structure/stool/bed/chair/wheelchair/W = perp.buckled
|
||||
W.bloodiness = 4
|
||||
|
||||
amount--
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip/green
|
||||
name = "drips of blood"
|
||||
desc = "It's green."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/drip.dmi'
|
||||
icon_state = "g1"
|
||||
amount = 0
|
||||
|
||||
// The idea is to have 4 bits for coming and 4 for going.
|
||||
#define TRACKS_COMING_NORTH 1
|
||||
#define TRACKS_COMING_SOUTH 2
|
||||
#define TRACKS_COMING_EAST 4
|
||||
#define TRACKS_COMING_WEST 8
|
||||
#define TRACKS_GOING_NORTH 16
|
||||
#define TRACKS_GOING_SOUTH 32
|
||||
#define TRACKS_GOING_EAST 64
|
||||
#define TRACKS_GOING_WEST 128
|
||||
// 5 seconds
|
||||
#define TRACKS_CRUSTIFY_TIME 50
|
||||
|
||||
// Footprints, tire trails...
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
amount = 0
|
||||
random_icon_states = null
|
||||
var/dirs=0
|
||||
icon='icons/effects/footprints.dmi'
|
||||
var/coming_state="blood1"
|
||||
var/going_state="blood2"
|
||||
|
||||
|
||||
var/newtracks=0 // Cleared after every icon_update
|
||||
var/crustytracks=0 // Cleared after every icon_update
|
||||
|
||||
// dir = last wetting
|
||||
var/list/wet=list(
|
||||
"1"=0,
|
||||
"2"=0,
|
||||
"4"=0,
|
||||
"8"=0,
|
||||
"16"=0,
|
||||
"32"=0,
|
||||
"64"=0,
|
||||
"128"=0
|
||||
)
|
||||
|
||||
/**
|
||||
* Add tracks to an existing trail.
|
||||
*
|
||||
* @param DNA bloodDNA to add to collection.
|
||||
* @param comingdir Direction tracks come from, or 0.
|
||||
* @param goingdir Direction tracks are going to (or 0).
|
||||
*/
|
||||
proc/AddTracks(var/mob/living/carbon/human/H, var/list/DNA, var/comingdir, var/goingdir,var/typepath)
|
||||
if(typepath == /obj/effect/decal/cleanable/blood/tracks/footprints)
|
||||
if(H.species.bodyflags & FEET_CLAWS)
|
||||
coming_state="bloodclaw1"
|
||||
going_state="bloodclaw2"
|
||||
if(H.species.bodyflags & FEET_PADDED)
|
||||
coming_state="bloodpaw1"
|
||||
going_state="bloodpaw2"
|
||||
if(typepath == /obj/effect/decal/cleanable/blood/tracks/footprints/green)
|
||||
if(H.species.bodyflags & FEET_CLAWS)
|
||||
coming_state="xenoclaw1"
|
||||
going_state="xenoclaw2"
|
||||
if(H.species.bodyflags & FEET_PADDED)
|
||||
coming_state="xenopaw1"
|
||||
going_state="xenopaw2"
|
||||
else
|
||||
coming_state="xeno1"
|
||||
going_state="xeno2"
|
||||
|
||||
|
||||
var/updated=0
|
||||
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
|
||||
var/realgoing=goingdir<<4
|
||||
|
||||
// Current bit
|
||||
var/b=0
|
||||
|
||||
// When tracks will start to dry out
|
||||
var/t=world.time + TRACKS_CRUSTIFY_TIME
|
||||
|
||||
// Process 4 bits
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
b=1<<bi
|
||||
// COMING BIT
|
||||
if(comingdir&b && wet["[b]"]!=t)
|
||||
if(!(dirs&b))
|
||||
newtracks|=b
|
||||
wet["[b]"]=t
|
||||
updated=1
|
||||
else
|
||||
if(wet["[b]"]<world.time && !(crustytracks&b))
|
||||
updated=1
|
||||
|
||||
// GOING BIT (shift up 4)
|
||||
b=b<<4
|
||||
if(realgoing&b && wet["[b]"]!=t)
|
||||
if(!(dirs&b))
|
||||
newtracks|=b
|
||||
wet["[b]"]=t
|
||||
updated=1
|
||||
else
|
||||
if(wet["[b]"]<world.time && !(crustytracks&b))
|
||||
updated=1
|
||||
|
||||
dirs |= comingdir|realgoing
|
||||
blood_DNA |= DNA.Copy()
|
||||
if(updated)
|
||||
update_icon()
|
||||
|
||||
process()
|
||||
return PROCESS_KILL // Do not process us or we'll lag like hell.
|
||||
|
||||
update_icon()
|
||||
// Clear everything.
|
||||
//overlays.Cut()
|
||||
var/b=0
|
||||
|
||||
var/t=world.time
|
||||
var/crusty=0
|
||||
// Clear out any images that have been wetted or have crustified.
|
||||
for(var/image/overlay in overlays)
|
||||
b=overlay.dir
|
||||
if(overlay.icon_state==going_state)
|
||||
b=b<<4
|
||||
if(wet["[b]"]<t && !(crustytracks&b)) // NEW crusty ones get special treatment
|
||||
crusty|=b
|
||||
if(wet["[b]"]>t || crusty&b) // Wet or crusty? Nuke'em either way.
|
||||
overlays.Remove(overlay)
|
||||
newtracks |= b // Mark as needing an update.
|
||||
|
||||
// Update ONLY the overlays that have changed.
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
// COMING
|
||||
b=1<<bi
|
||||
// New or crusty
|
||||
if(newtracks&b)
|
||||
var/icon/I= new /icon(icon, icon_state=coming_state, dir=num2dir(b))
|
||||
// If crusty, make them look crusty.
|
||||
if(crusty&b)
|
||||
I.SetIntensity(0.7)
|
||||
crustytracks |= b // Crusty? Don't update unless wetted again.
|
||||
else
|
||||
crustytracks &= ~b // Unmark as crusty.
|
||||
// Add to overlays
|
||||
overlays += I
|
||||
// GOING
|
||||
b=b<<4
|
||||
if(newtracks&b)
|
||||
var/icon/I= new /icon(icon, icon_state=going_state, dir=num2dir(b>>4))
|
||||
if(crusty&b)
|
||||
I.SetIntensity(0.7)
|
||||
crustytracks |= b // Crusty? Don't update unless wetted again.
|
||||
else
|
||||
crustytracks &= ~b // Unmark as crusty.
|
||||
overlays += I
|
||||
newtracks=0 // Clear our memory of updated tracks.
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints
|
||||
name = "bloody footprints"
|
||||
desc = "Whoops..."
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints/green
|
||||
name = "bloody green footprints"
|
||||
desc = "Whoops..."
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/wheels
|
||||
icon_state = "tracks"
|
||||
desc = "They look like tracks left by wheels."
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
amount = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/drip
|
||||
name = "drips of blood"
|
||||
desc = "It's red."
|
||||
gender = PLURAL
|
||||
icon = 'icons/effects/drip.dmi'
|
||||
icon_state = "1"
|
||||
amount = 0
|
||||
/obj/effect/decal/cleanable/blood/writing/examine(mob/user)
|
||||
..(user)
|
||||
user << "It reads: <font color='[basecolor]'>\"[message]\"<font>"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs
|
||||
name = "gibs"
|
||||
@@ -344,6 +159,22 @@
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "gibbl5"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6")
|
||||
var/fleshcolor = "#FFFFFF"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/update_icon()
|
||||
|
||||
var/image/giblets = new(base_icon, "[icon_state]_flesh", dir)
|
||||
if(!fleshcolor || fleshcolor == "rainbow")
|
||||
fleshcolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
|
||||
giblets.color = fleshcolor
|
||||
|
||||
var/icon/blood = new(base_icon,"[icon_state]",dir)
|
||||
if(basecolor == "rainbow") basecolor = "#[pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF"))]"
|
||||
blood.Blend(basecolor,ICON_MULTIPLY)
|
||||
|
||||
icon = blood
|
||||
overlays.Cut()
|
||||
overlays += giblets
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1")
|
||||
@@ -362,15 +193,20 @@
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
b.basecolor = src.basecolor
|
||||
b.update_icon()
|
||||
for(var/datum/disease2/disease/D in src.viruses)
|
||||
var/datum/disease2/disease/ND = D.getcopy()
|
||||
b.viruses += ND
|
||||
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/mucus
|
||||
@@ -383,6 +219,7 @@
|
||||
icon = 'icons/effects/blood.dmi'
|
||||
icon_state = "mucus"
|
||||
random_icon_states = list("mucus")
|
||||
|
||||
var/list/datum/disease2/disease/virus2 = list()
|
||||
var/dry=0 // Keeps the lag down
|
||||
|
||||
@@ -396,29 +233,4 @@
|
||||
// basecolor="#030303"
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/old
|
||||
name = "dried blood"
|
||||
desc = "Looks like it's been here a while. Eew."
|
||||
|
||||
/obj/effect/decal/cleanable/blood/old/New()
|
||||
..()
|
||||
icon_state += "-old"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/old
|
||||
name = "old rotting gibs"
|
||||
desc = "Oh god, why didn't anyone clean this up? It smells terrible."
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/old/New()
|
||||
..()
|
||||
icon_state += "-old"
|
||||
dir = pick(1,2,4,8)
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/old
|
||||
name = "crusty dried vomit"
|
||||
desc = "You try not to look at the chunks, and fail."
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/old/New()
|
||||
..()
|
||||
icon_state += "-old"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
@@ -1,25 +1,26 @@
|
||||
// Note: BYOND is object oriented. There is no reason for this to be copy/pasted blood code.
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot
|
||||
name = "robot debris"
|
||||
desc = "It's a useless heap of junk... <i>or is it?</i>"
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "gib1"
|
||||
basecolor="#030303"
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(var/list/directions)
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/update_icon()
|
||||
color = "#FFFFFF"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/dry() //pieces of robots do not dry up like
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/streak(var/list/directions)
|
||||
spawn (0)
|
||||
var/direction = pick(directions)
|
||||
for (var/i = 0, i < pick(1, 200; 2, 150; 3, 50; 4), i++)
|
||||
sleep(3)
|
||||
if (i > 0)
|
||||
if (prob(40))
|
||||
/*var/obj/effect/decal/cleanable/oil/o =*/
|
||||
new /obj/effect/decal/cleanable/oil/streak(src.loc)
|
||||
var/obj/effect/decal/cleanable/blood/oil/streak = new(src.loc)
|
||||
streak.update_icon()
|
||||
else if (prob(10))
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
@@ -27,26 +28,23 @@
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/limb
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/limb
|
||||
random_icon_states = list("gibarm", "gibleg")
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/up
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/up
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibup1","gibup1") //2:7 is close enough to 1:4
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/down
|
||||
/obj/effect/decal/cleanable/blood/gibs/robot/down
|
||||
random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6", "gib7","gibdown1","gibdown1") //2:7 is close enough to 1:4
|
||||
|
||||
/obj/effect/decal/cleanable/oil
|
||||
/obj/effect/decal/cleanable/blood/oil
|
||||
name = "motor oil"
|
||||
desc = "It's black and greasy. Looks like Beepsky made another mess."
|
||||
gender = PLURAL
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
icon_state = "floor1"
|
||||
random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7")
|
||||
basecolor="#030303"
|
||||
|
||||
/obj/effect/decal/cleanable/blood/oil/dry()
|
||||
return
|
||||
|
||||
/obj/effect/decal/cleanable/oil/streak
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
/obj/effect/decal/cleanable/blood/oil/streak
|
||||
random_icon_states = list("mgibbl1", "mgibbl2", "mgibbl3", "mgibbl4", "mgibbl5")
|
||||
amount = 2
|
||||
@@ -0,0 +1,165 @@
|
||||
// Stolen en masse from N3X15 of /vg/station with much gratitude.
|
||||
|
||||
// The idea is to have 4 bits for coming and 4 for going.
|
||||
#define TRACKS_COMING_NORTH 1
|
||||
#define TRACKS_COMING_SOUTH 2
|
||||
#define TRACKS_COMING_EAST 4
|
||||
#define TRACKS_COMING_WEST 8
|
||||
#define TRACKS_GOING_NORTH 16
|
||||
#define TRACKS_GOING_SOUTH 32
|
||||
#define TRACKS_GOING_EAST 64
|
||||
#define TRACKS_GOING_WEST 128
|
||||
|
||||
// 5 seconds
|
||||
#define TRACKS_CRUSTIFY_TIME 50
|
||||
|
||||
// color-dir-dry
|
||||
var/global/list/image/fluidtrack_cache=list()
|
||||
|
||||
/datum/fluidtrack
|
||||
var/direction=0
|
||||
var/basecolor="#A10808"
|
||||
var/wet=0
|
||||
var/fresh=1
|
||||
var/crusty=0
|
||||
var/image/overlay
|
||||
|
||||
New(_direction,_color,_wet)
|
||||
src.direction=_direction
|
||||
src.basecolor=_color
|
||||
src.wet=_wet
|
||||
|
||||
// Footprints, tire trails...
|
||||
/obj/effect/decal/cleanable/blood/tracks
|
||||
amount = 0
|
||||
random_icon_states = null
|
||||
var/dirs=0
|
||||
icon = 'icons/effects/fluidtracks.dmi'
|
||||
icon_state = ""
|
||||
var/coming_state="blood1"
|
||||
var/going_state="blood2"
|
||||
var/updatedtracks=0
|
||||
|
||||
// dir = id in stack
|
||||
var/list/setdirs=list(
|
||||
"1"=0,
|
||||
"2"=0,
|
||||
"4"=0,
|
||||
"8"=0,
|
||||
"16"=0,
|
||||
"32"=0,
|
||||
"64"=0,
|
||||
"128"=0
|
||||
)
|
||||
|
||||
// List of laid tracks and their colors.
|
||||
var/list/datum/fluidtrack/stack=list()
|
||||
|
||||
/**
|
||||
* Add tracks to an existing trail.
|
||||
*
|
||||
* @param DNA bloodDNA to add to collection.
|
||||
* @param comingdir Direction tracks come from, or 0.
|
||||
* @param goingdir Direction tracks are going to (or 0).
|
||||
* @param bloodcolor Color of the blood when wet.
|
||||
*/
|
||||
proc/AddTracks(var/list/DNA, var/comingdir, var/goingdir, var/bloodcolor="#A10808")
|
||||
var/updated=0
|
||||
// Shift our goingdir 4 spaces to the left so it's in the GOING bitblock.
|
||||
var/realgoing=goingdir<<4
|
||||
|
||||
// Current bit
|
||||
var/b=0
|
||||
|
||||
// When tracks will start to dry out
|
||||
var/t=world.time + TRACKS_CRUSTIFY_TIME
|
||||
|
||||
var/datum/fluidtrack/track
|
||||
|
||||
// Process 4 bits
|
||||
for(var/bi=0;bi<4;bi++)
|
||||
b=1<<bi
|
||||
// COMING BIT
|
||||
// If setting
|
||||
if(comingdir&b)
|
||||
// If not wet or not set
|
||||
if(dirs&b)
|
||||
var/sid=setdirs["[b]"]
|
||||
track=stack[sid]
|
||||
if(track.wet==t && track.basecolor==bloodcolor)
|
||||
continue
|
||||
// Remove existing stack entry
|
||||
stack.Remove(track)
|
||||
track=new /datum/fluidtrack(b,bloodcolor,t)
|
||||
stack.Add(track)
|
||||
setdirs["[b]"]=stack.Find(track)
|
||||
updatedtracks |= b
|
||||
updated=1
|
||||
|
||||
// GOING BIT (shift up 4)
|
||||
b=b<<4
|
||||
if(realgoing&b)
|
||||
// If not wet or not set
|
||||
if(dirs&b)
|
||||
var/sid=setdirs["[b]"]
|
||||
track=stack[sid]
|
||||
if(track.wet==t && track.basecolor==bloodcolor)
|
||||
continue
|
||||
// Remove existing stack entry
|
||||
stack.Remove(track)
|
||||
track=new /datum/fluidtrack(b,bloodcolor,t)
|
||||
stack.Add(track)
|
||||
setdirs["[b]"]=stack.Find(track)
|
||||
updatedtracks |= b
|
||||
updated=1
|
||||
|
||||
dirs |= comingdir|realgoing
|
||||
blood_DNA |= DNA.Copy()
|
||||
if(updated)
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
overlays.Cut()
|
||||
color = "#FFFFFF"
|
||||
var/truedir=0
|
||||
|
||||
// Update ONLY the overlays that have changed.
|
||||
for(var/datum/fluidtrack/track in stack)
|
||||
var/stack_idx=setdirs["[track.direction]"]
|
||||
var/state=coming_state
|
||||
truedir=track.direction
|
||||
if(truedir&240) // Check if we're in the GOING block
|
||||
state=going_state
|
||||
truedir=truedir>>4
|
||||
|
||||
if(track.overlay)
|
||||
track.overlay=null
|
||||
var/image/I = image(icon, icon_state=state, dir=num2dir(truedir))
|
||||
I.color = track.basecolor
|
||||
|
||||
track.fresh=0
|
||||
track.overlay=I
|
||||
stack[stack_idx]=track
|
||||
overlays += I
|
||||
updatedtracks=0 // Clear our memory of updated tracks.
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/footprints
|
||||
name = "wet footprints"
|
||||
dryname = "dried footprints"
|
||||
desc = "Whoops..."
|
||||
drydesc = "Whoops..."
|
||||
coming_state = "human1"
|
||||
going_state = "human2"
|
||||
amount = 0
|
||||
|
||||
/obj/effect/decal/cleanable/blood/tracks/wheels
|
||||
name = "wet tracks"
|
||||
dryname = "dried tracks"
|
||||
desc = "Whoops..."
|
||||
drydesc = "Whoops..."
|
||||
coming_state = "wheels"
|
||||
going_state = ""
|
||||
desc = "They look like tracks left by wheels."
|
||||
gender = PLURAL
|
||||
random_icon_states = null
|
||||
amount = 0
|
||||
@@ -17,7 +17,7 @@
|
||||
..()
|
||||
|
||||
xeno
|
||||
gibtypes = list(/obj/effect/decal/cleanable/xenoblood/xgibs/up,/obj/effect/decal/cleanable/xenoblood/xgibs/down,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs,/obj/effect/decal/cleanable/xenoblood/xgibs/body,/obj/effect/decal/cleanable/xenoblood/xgibs/limb,/obj/effect/decal/cleanable/xenoblood/xgibs/core)
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/xeno/up,/obj/effect/decal/cleanable/blood/gibs/xeno/down,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno,/obj/effect/decal/cleanable/blood/gibs/xeno/body,/obj/effect/decal/cleanable/blood/gibs/xeno/limb,/obj/effect/decal/cleanable/blood/gibs/xeno/core)
|
||||
gibamounts = list(1,1,1,1,1,1,1)
|
||||
|
||||
New()
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
robot
|
||||
sparks = 1
|
||||
gibtypes = list(/obj/effect/decal/cleanable/robot_debris/up,/obj/effect/decal/cleanable/robot_debris/down,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris,/obj/effect/decal/cleanable/robot_debris/limb)
|
||||
gibtypes = list(/obj/effect/decal/cleanable/blood/gibs/robot/up,/obj/effect/decal/cleanable/blood/gibs/robot/down,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot,/obj/effect/decal/cleanable/blood/gibs/robot/limb)
|
||||
gibamounts = list(1,1,1,1,1,1)
|
||||
|
||||
New()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
var/discrete = 0 // used in item_attack.dm to make an item not show an attack message to viewers
|
||||
var/no_embed = 0 // For use in item_attack.dm
|
||||
var/icon/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
|
||||
var/image/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
|
||||
var/blood_overlay_color = null
|
||||
var/item_state = null
|
||||
var/r_speed = 1.0
|
||||
@@ -675,35 +675,29 @@
|
||||
|
||||
//if we haven't made our blood_overlay already
|
||||
if( !blood_overlay )
|
||||
if(M.species.bloodflags & BLOOD_GREEN)
|
||||
generate_blood_overlay(1)
|
||||
else
|
||||
generate_blood_overlay()
|
||||
generate_blood_overlay()
|
||||
|
||||
//apply the blood-splatter overlay if it isn't already in there
|
||||
if(!blood_DNA.len)
|
||||
blood_overlay.color = blood_color
|
||||
overlays += blood_overlay
|
||||
|
||||
//if this blood isn't already in the list, add it
|
||||
|
||||
if(blood_DNA[M.dna.unique_enzymes])
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if(istype(M))
|
||||
if(blood_DNA[M.dna.unique_enzymes])
|
||||
return 0 //already bloodied with this blood. Cannot add more.
|
||||
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
return 1 //we applied blood to the item
|
||||
|
||||
/obj/item/proc/generate_blood_overlay(blood_overlay_color)
|
||||
/obj/item/proc/generate_blood_overlay()
|
||||
if(blood_overlay)
|
||||
return
|
||||
|
||||
var/icon/I = new /icon(icon, icon_state)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD) //fills the icon_state with white (except where it's transparent)
|
||||
if (blood_overlay_color == 1)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', "xitemblood"),ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
|
||||
else
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
|
||||
|
||||
//not sure if this is worth it. It attaches the blood_overlay to every item of the same type if they don't have one already made.
|
||||
for(var/obj/item/A in world)
|
||||
if(A.type == type && !A.blood_overlay)
|
||||
A.blood_overlay = image(I)
|
||||
|
||||
|
||||
@@ -200,11 +200,6 @@
|
||||
desc = "A flag proudly boasting the logo of the Syndicate, in defiance of NT."
|
||||
icon_state = "syndiflag"
|
||||
|
||||
/obj/item/flag/ninja
|
||||
name = "Spider Clan flag"
|
||||
desc = "A flag proudly boasting the logo of the Spider Clan, in defiance of NT."
|
||||
icon_state = "ninjaflag"
|
||||
|
||||
/obj/item/flag/wiz
|
||||
name = "Wizard Federation flag"
|
||||
desc = "A flag proudly boasting the logo of the Wizard Federation, sworn enemies of NT."
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/obj/item/weapon/ninja_manuscript
|
||||
name = "Manuscript"
|
||||
desc = "A mysterious manuscript..."
|
||||
icon = 'icons/obj/library.dmi'
|
||||
icon_state = "book1"
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
w_class = 3
|
||||
attack_verb = list("bashed", "whacked", "educated")
|
||||
|
||||
var/charges = 1
|
||||
|
||||
/obj/item/weapon/ninja_manuscript/attack_self(var/mob/user as mob)
|
||||
|
||||
if(charges <= 0)
|
||||
user << "\red The manuscript's power appears spent..."
|
||||
return
|
||||
|
||||
else
|
||||
user << "\blue You intently read the manuscript and come to the realization that true balance is achieved through self-will."
|
||||
user << "\blue You relax and concentrate deeply; something in your mind alights ablaze and you realize the only way to true balance is the way of the Ninja."
|
||||
|
||||
charges--
|
||||
|
||||
|
||||
user.mind.assigned_role = "MODE"
|
||||
user.mind.special_role = "Ninja"
|
||||
|
||||
return
|
||||
@@ -121,8 +121,8 @@
|
||||
user.do_attack_animation(L)
|
||||
baton_stun(L, user)
|
||||
else
|
||||
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>", \
|
||||
"<span class='warning'>You've been prodded with [src] by [user]. Luckily it was off</span>")
|
||||
L.visible_message("<span class='warning'>[user] has prodded [L] with [src]. Luckily it was off.</span>", \
|
||||
"<span class='warning'>[user] has prodded you with [src]. Luckily it was off</span>")
|
||||
return
|
||||
else
|
||||
..()
|
||||
@@ -138,8 +138,8 @@
|
||||
L.Weaken(stunforce)
|
||||
L.apply_effect(STUTTER, stunforce)
|
||||
|
||||
L.visible_message("<span class='danger'>[L] has been stunned with [src] by [user]!</span>", \
|
||||
"<span class='userdanger'>You've been stunned with [src] by [user]!</span>")
|
||||
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
|
||||
|
||||
if(isrobot(loc))
|
||||
@@ -163,22 +163,9 @@
|
||||
..()
|
||||
|
||||
//secborg stun baton module
|
||||
/obj/item/weapon/melee/baton/robot
|
||||
hitcost = 500
|
||||
/obj/item/weapon/melee/baton/loaded/robot
|
||||
hitcost = 1000
|
||||
|
||||
/obj/item/weapon/melee/baton/robot/New()
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/robot/attack_self(mob/user)
|
||||
//try to find our power cell
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if (istype(R))
|
||||
bcell = R.cell
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/melee/baton/robot/attackby(obj/item/weapon/W, mob/user, params)
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/loaded/ntcane
|
||||
name = "fancy cane"
|
||||
|
||||
@@ -87,20 +87,6 @@
|
||||
new /mob/living/simple_animal/chick(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/ninja
|
||||
name = "Mysterious Crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
/obj/structure/largecrate/ninja/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/clothing/gloves/space_ninja(loc)
|
||||
new /obj/item/clothing/mask/gas/voice/space_ninja(loc)
|
||||
new /obj/item/clothing/shoes/space_ninja(loc)
|
||||
new /obj/item/clothing/head/helmet/space/space_ninja(loc)
|
||||
new /obj/item/clothing/suit/space/space_ninja(loc)
|
||||
new /obj/item/weapon/ninja_manuscript(loc)
|
||||
..()
|
||||
|
||||
/obj/structure/largecrate/cat
|
||||
name = "cat crate"
|
||||
icon_state = "lisacrate"
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
if(wet_overlay)
|
||||
overlays -= wet_overlay
|
||||
|
||||
/turf/simulated/proc/AddTracks(var/typepath,var/mob,var/bloodDNA,var/comingdir,var/goingdir)
|
||||
/turf/simulated/proc/AddTracks(var/typepath,var/bloodDNA,var/comingdir,var/goingdir,var/bloodcolor="#A10808")
|
||||
var/obj/effect/decal/cleanable/blood/tracks/tracks = locate(typepath) in src
|
||||
if(!tracks)
|
||||
tracks = new typepath(src)
|
||||
tracks.AddTracks(mob,bloodDNA,comingdir,goingdir,typepath)
|
||||
tracks.AddTracks(bloodDNA,comingdir,goingdir,bloodcolor)
|
||||
|
||||
/turf/simulated/Entered(atom/A, atom/OL)
|
||||
|
||||
@@ -77,40 +77,29 @@
|
||||
else
|
||||
playsound(src, "jackboot", 20, 1)
|
||||
|
||||
|
||||
// Tracking blood
|
||||
var/list/bloodDNA = null
|
||||
var/bloodcolor=""
|
||||
if(H.shoes)
|
||||
var/obj/item/clothing/shoes/S = H.shoes
|
||||
if(S.track_blood && S.blood_DNA)
|
||||
bloodDNA = S.blood_DNA
|
||||
bloodcolor=S.blood_color
|
||||
S.track_blood--
|
||||
src.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,H,bloodDNA,H.dir,0) // Coming
|
||||
var/turf/simulated/from = get_step(H,reverse_direction(H.dir))
|
||||
if(from && istype(from, /turf/simulated))
|
||||
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,H,bloodDNA,0,H.dir) // Going
|
||||
|
||||
if(S.track_blood_green && S.blood_DNA)
|
||||
bloodDNA = S.blood_DNA
|
||||
S.track_blood_green--
|
||||
src.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints/green,H,bloodDNA,H.dir,0) // Coming
|
||||
var/turf/simulated/from = get_step(H,reverse_direction(H.dir))
|
||||
if(from && istype(from, /turf/simulated))
|
||||
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints/green,H,bloodDNA,0,H.dir) // Going
|
||||
else
|
||||
if(H.track_blood && H.feet_blood_DNA)
|
||||
bloodDNA = H.feet_blood_DNA
|
||||
bloodcolor=H.feet_blood_color
|
||||
H.track_blood--
|
||||
src.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,H,bloodDNA,H.dir,0) // Coming
|
||||
var/turf/simulated/from = get_step(H,reverse_direction(H.dir))
|
||||
if(from && istype(from, /turf/simulated))
|
||||
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,H,bloodDNA,0,H.dir) // Going
|
||||
if(H.track_blood_green && H.feet_blood_DNA)
|
||||
bloodDNA = H.feet_blood_DNA
|
||||
H.track_blood_green--
|
||||
src.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints/green,H,bloodDNA,H.dir,0) // Coming
|
||||
var/turf/simulated/from = get_step(H,reverse_direction(H.dir))
|
||||
if(from && istype(from, /turf/simulated))
|
||||
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints/green,H,bloodDNA,0,H.dir) // Going
|
||||
bloodDNA = null
|
||||
|
||||
if (bloodDNA)
|
||||
src.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,bloodDNA,H.dir,0,bloodcolor) // Coming
|
||||
var/turf/simulated/from = get_step(H,reverse_direction(H.dir))
|
||||
if(istype(from) && from)
|
||||
from.AddTracks(/obj/effect/decal/cleanable/blood/tracks/footprints,bloodDNA,0,H.dir,bloodcolor) // Going
|
||||
|
||||
bloodDNA = null
|
||||
|
||||
var/noslip = 0
|
||||
for (var/obj/structure/stool/bed/chair/C in loc)
|
||||
@@ -187,53 +176,23 @@
|
||||
if (!..())
|
||||
return 0
|
||||
|
||||
for(var/obj/effect/decal/cleanable/blood/B in contents)
|
||||
if(!B.blood_DNA[M.dna.unique_enzymes])
|
||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
B.virus2 = virus_copylist(M.virus2)
|
||||
if(istype(M))
|
||||
for(var/obj/effect/decal/cleanable/blood/B in contents)
|
||||
if(!B.blood_DNA[M.dna.unique_enzymes])
|
||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
B.virus2 = virus_copylist(M.virus2)
|
||||
return 1 //we bloodied the floor
|
||||
blood_splatter(src,M.get_blood(M.vessel),1)
|
||||
return 1 //we bloodied the floor
|
||||
|
||||
|
||||
|
||||
//if there isn't a blood decal already, make one.
|
||||
if(M.species.bloodflags &BLOOD_GREEN)
|
||||
var/obj/effect/decal/cleanable/blood/green/newblood = new /obj/effect/decal/cleanable/blood/green(src)
|
||||
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
newblood.virus2 = virus_copylist(M.virus2)
|
||||
newblood.update_icon()
|
||||
else
|
||||
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(src)
|
||||
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
newblood.virus2 = virus_copylist(M.virus2)
|
||||
newblood.update_icon()
|
||||
|
||||
return 1 //we bloodied the floor
|
||||
|
||||
return 0
|
||||
|
||||
// Only adds blood on the floor -- Skie
|
||||
/turf/simulated/proc/add_blood_floor(mob/living/carbon/M as mob)
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.bloodflags &BLOOD_GREEN)
|
||||
var/obj/effect/decal/cleanable/blood/green/this = new /obj/effect/decal/cleanable/blood/green(src)
|
||||
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
this.virus2 = virus_copylist(M.virus2)
|
||||
else
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(src)
|
||||
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
this.virus2 = virus_copylist(M.virus2)
|
||||
if(istype(M, /mob/living/carbon/monkey))
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(src)
|
||||
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
if (M.virus2.len)
|
||||
this.virus2 = virus_copylist(M.virus2)
|
||||
|
||||
blood_splatter(src,M,1)
|
||||
else if( istype(M, /mob/living/carbon/alien ))
|
||||
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(src)
|
||||
var/obj/effect/decal/cleanable/blood/xeno/this = new /obj/effect/decal/cleanable/blood/xeno(src)
|
||||
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
|
||||
|
||||
else if( istype(M, /mob/living/silicon/robot ))
|
||||
new /obj/effect/decal/cleanable/oil(src)
|
||||
new /obj/effect/decal/cleanable/blood/oil(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user