/obj/item/dnainjector name = "\improper DNA injector" desc = "This injects the person with DNA." icon = 'icons/obj/items.dmi' icon_state = "dnainjector" var/block=0 var/datum/dna2/record/buf=null var/s_time = 10.0 throw_speed = 1 throw_range = 5 w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS var/uses = 1 var/nofail var/is_bullet = 0 var/inuse = 0 // USE ONLY IN PREMADE SYRINGES. WILL NOT WORK OTHERWISE. var/datatype=0 var/value=0 /obj/item/dnainjector/Initialize() . = ..() if(datatype && block) buf=new buf.dna=new buf.types = datatype buf.dna.ResetSE() //testing("[name]: DNA2 SE blocks prior to SetValue: [english_list(buf.dna.SE)]") SetValue(src.value) //testing("[name]: DNA2 SE blocks after SetValue: [english_list(buf.dna.SE)]") /obj/item/dnainjector/proc/GetRealBlock(var/selblock) if(selblock==0) return block else return selblock /obj/item/dnainjector/proc/GetState(var/selblock=0) var/real_block=GetRealBlock(selblock) if(buf.types&DNA2_BUF_SE) return buf.dna.GetSEState(real_block) else return buf.dna.GetUIState(real_block) /obj/item/dnainjector/proc/SetState(var/on, var/selblock=0) var/real_block=GetRealBlock(selblock) if(buf.types&DNA2_BUF_SE) return buf.dna.SetSEState(real_block,on) else return buf.dna.SetUIState(real_block,on) /obj/item/dnainjector/proc/GetValue(var/selblock=0) var/real_block=GetRealBlock(selblock) if(buf.types&DNA2_BUF_SE) return buf.dna.GetSEValue(real_block) else return buf.dna.GetUIValue(real_block) /obj/item/dnainjector/proc/SetValue(var/val,var/selblock=0) var/real_block=GetRealBlock(selblock) if(buf.types&DNA2_BUF_SE) return buf.dna.SetSEValue(real_block,val) else return buf.dna.SetUIValue(real_block,val) /obj/item/dnainjector/proc/inject(mob/M as mob, mob/user as mob) if(istype(M,/mob/living)) var/mob/living/L = M L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0) L.apply_damage(max(2,L.getCloneLoss()), CLONE) if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed if (buf.types & DNA2_BUF_UI) if (!block) //isolated block? M.UpdateAppearance(buf.dna.UI.Copy()) if (buf.types & DNA2_BUF_UE) //unique enzymes? yes M.real_name = buf.dna.real_name M.name = buf.dna.real_name uses-- else M.dna.SetUIValue(block,src.GetValue()) M.UpdateAppearance() uses-- if (buf.types & DNA2_BUF_SE) if (!block) //isolated block? M.dna.SE = buf.dna.SE.Copy() M.dna.UpdateSE() else M.dna.SetSEValue(block,src.GetValue()) domutcheck(M, null, block!=null) uses-- if(prob(5)) trigger_side_effect(M) spawn(0)//this prevents the collapse of space-time continuum if (user) user.drop_from_inventory(src) qdel(src) return uses /obj/item/dnainjector/attack(mob/M as mob, mob/user as mob) if (!istype(M, /mob)) return if (!usr.IsAdvancedToolUser()) return if(inuse) return 0 user.visible_message("\The [user] is trying to inject \the [M] with \the [src]!") inuse = 1 s_time = world.time spawn(50) inuse = 0 if(!do_after(user,50)) return user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) user.do_attack_animation(M) M.visible_message("\The [M] has been injected with \the [src] by \the [user].") var/mob/living/carbon/human/H = M if(!istype(H)) to_chat(user, "Apparently it didn't work...") return // Used by admin log. var/injected_with_monkey = "" if((buf.types & DNA2_BUF_SE) && (block ? (GetState() && block == MONKEYBLOCK) : GetState(MONKEYBLOCK))) injected_with_monkey = " (MONKEY)" add_attack_logs(user,M,"[injected_with_monkey] used the [name] on") // Apply the DNA shit. inject(M, user) return /obj/item/dnainjector/hulkmut name = "\improper DNA injector (Hulk)" desc = "This will make you big and strong, but give you a bad skin condition." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/hulkmut/Initialize() block = HULKBLOCK . = ..() /obj/item/dnainjector/antihulk name = "\improper DNA injector (Anti-Hulk)" desc = "Cures green skin." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antihulk/Initialize() block = HULKBLOCK . = ..() /obj/item/dnainjector/xraymut name = "\improper DNA injector (Xray)" desc = "Finally you can see what the Site Manager does." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/xraymut/Initialize() block = XRAYBLOCK . = ..() /obj/item/dnainjector/antixray name = "\improper DNA injector (Anti-Xray)" desc = "It will make you see harder." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antixray/Initialize() block = XRAYBLOCK . = ..() /obj/item/dnainjector/firemut name = "\improper DNA injector (Fire)" desc = "Gives you fire." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/firemut/Initialize() block = FIREBLOCK . = ..() /obj/item/dnainjector/antifire name = "\improper DNA injector (Anti-Fire)" desc = "Cures fire." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antifire/Initialize() block = FIREBLOCK . = ..() /obj/item/dnainjector/telemut name = "\improper DNA injector (Tele.)" desc = "Super brain man!" datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/telemut/Initialize() block = TELEBLOCK . = ..() /obj/item/dnainjector/antitele name = "\improper DNA injector (Anti-Tele.)" desc = "Will make you not able to control your mind." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antitele/Initialize() block = TELEBLOCK . = ..() /obj/item/dnainjector/nobreath name = "\improper DNA injector (No Breath)" desc = "Hold your breath and count to infinity." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/nobreath/Initialize() block = NOBREATHBLOCK . = ..() /obj/item/dnainjector/antinobreath name = "\improper DNA injector (Anti-No Breath)" desc = "Hold your breath and count to 100." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antinobreath/Initialize() block = NOBREATHBLOCK . = ..() /obj/item/dnainjector/remoteview name = "\improper DNA injector (Remote View)" desc = "Stare into the distance for a reason." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/remoteview/Initialize() block = REMOTEVIEWBLOCK . = ..() /obj/item/dnainjector/antiremoteview name = "\improper DNA injector (Anti-Remote View)" desc = "Cures green skin." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antiremoteview/Initialize() block = REMOTEVIEWBLOCK . = ..() /obj/item/dnainjector/regenerate name = "\improper DNA injector (Regeneration)" desc = "Healthy but hungry." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/regenerate/Initialize() block = REGENERATEBLOCK . = ..() /obj/item/dnainjector/antiregenerate name = "\improper DNA injector (Anti-Regeneration)" desc = "Sickly but sated." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antiregenerate/Initialize() block = REGENERATEBLOCK . = ..() /obj/item/dnainjector/runfast name = "\improper DNA injector (Increase Run)" desc = "Running Man." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/runfast/Initialize() block = INCREASERUNBLOCK . = ..() /obj/item/dnainjector/antirunfast name = "\improper DNA injector (Anti-Increase Run)" desc = "Walking Man." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antirunfast/Initialize() block = INCREASERUNBLOCK . = ..() /obj/item/dnainjector/morph name = "\improper DNA injector (Morph)" desc = "A total makeover." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/morph/Initialize() block = MORPHBLOCK . = ..() /obj/item/dnainjector/antimorph name = "\improper DNA injector (Anti-Morph)" desc = "Cures identity crisis." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antimorph/Initialize() block = MORPHBLOCK . = ..() /obj/item/dnainjector/noprints name = "\improper DNA injector (No Prints)" desc = "Better than a pair of budget insulated gloves." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/noprints/Initialize() block = NOPRINTSBLOCK . = ..() /obj/item/dnainjector/antinoprints name = "\improper DNA injector (Anti-No Prints)" desc = "Not quite as good as a pair of budget insulated gloves." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antinoprints/Initialize() block = NOPRINTSBLOCK . = ..() /obj/item/dnainjector/insulation name = "\improper DNA injector (Shock Immunity)" desc = "Better than a pair of real insulated gloves." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/insulation/Initialize() block = SHOCKIMMUNITYBLOCK . = ..() /obj/item/dnainjector/antiinsulation name = "\improper DNA injector (Anti-Shock Immunity)" desc = "Not quite as good as a pair of real insulated gloves." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antiinsulation/Initialize() block = SHOCKIMMUNITYBLOCK . = ..() /obj/item/dnainjector/midgit name = "\improper DNA injector (Small Size)" desc = "Makes you shrink." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/midgit/Initialize() block = SMALLSIZEBLOCK . = ..() /obj/item/dnainjector/antimidgit name = "\improper DNA injector (Anti-Small Size)" desc = "Makes you grow. But not too much." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antimidgit/Initialize() block = SMALLSIZEBLOCK . = ..() ///////////////////////////////////// /obj/item/dnainjector/antiglasses name = "\improper DNA injector (Anti-Glasses)" desc = "Toss away those glasses!" datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antiglasses/Initialize() block = GLASSESBLOCK . = ..() /obj/item/dnainjector/glassesmut name = "\improper DNA injector (Glasses)" desc = "Will make you need dorkish glasses." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/glassesmut/Initialize() block = GLASSESBLOCK . = ..() /obj/item/dnainjector/epimut name = "\improper DNA injector (Epi.)" desc = "Shake shake shake the room!" datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/epimut/Initialize() block = HEADACHEBLOCK . = ..() /obj/item/dnainjector/antiepi name = "\improper DNA injector (Anti-Epi.)" desc = "Will fix you up from shaking the room." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antiepi/Initialize() block = HEADACHEBLOCK . = ..() /obj/item/dnainjector/anticough name = "\improper DNA injector (Anti-Cough)" desc = "Will stop that awful noise." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/anticough/Initialize() block = COUGHBLOCK . = ..() /obj/item/dnainjector/coughmut name = "\improper DNA injector (Cough)" desc = "Will bring forth a sound of horror from your throat." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/coughmut/Initialize() block = COUGHBLOCK . = ..() /obj/item/dnainjector/clumsymut name = "\improper DNA injector (Clumsy)" desc = "Makes clumsy minions." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/clumsymut/Initialize() block = CLUMSYBLOCK . = ..() /obj/item/dnainjector/anticlumsy name = "\improper DNA injector (Anti-Clumy)" desc = "Cleans up confusion." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/anticlumsy/Initialize() block = CLUMSYBLOCK . = ..() /obj/item/dnainjector/antitour name = "\improper DNA injector (Anti-Tour.)" desc = "Will cure tourrets." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antitour/Initialize() block = TWITCHBLOCK . = ..() /obj/item/dnainjector/tourmut name = "\improper DNA injector (Tour.)" desc = "Gives you a nasty case off tourrets." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/tourmut/Initialize() block = TWITCHBLOCK . = ..() /obj/item/dnainjector/stuttmut name = "\improper DNA injector (Stutt.)" desc = "Makes you s-s-stuttterrr" datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/stuttmut/Initialize() block = NERVOUSBLOCK . = ..() /obj/item/dnainjector/antistutt name = "\improper DNA injector (Anti-Stutt.)" desc = "Fixes that speaking impairment." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antistutt/Initialize() block = NERVOUSBLOCK . = ..() /obj/item/dnainjector/blindmut name = "\improper DNA injector (Blind)" desc = "Makes you not see anything." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/blindmut/Initialize() block = BLINDBLOCK . = ..() /obj/item/dnainjector/antiblind name = "\improper DNA injector (Anti-Blind)" desc = "ITS A MIRACLE!!!" datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antiblind/Initialize() block = BLINDBLOCK . = ..() /obj/item/dnainjector/deafmut name = "\improper DNA injector (Deaf)" desc = "Sorry, what did you say?" datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/deafmut/Initialize() block = DEAFBLOCK . = ..() /obj/item/dnainjector/antideaf name = "\improper DNA injector (Anti-Deaf)" desc = "Will make you hear once more." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antideaf/Initialize() block = DEAFBLOCK . = ..() /obj/item/dnainjector/hallucination name = "\improper DNA injector (Halluctination)" desc = "What you see isn't always what you get." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/hallucination/Initialize() block = HALLUCINATIONBLOCK . = ..() /obj/item/dnainjector/antihallucination name = "\improper DNA injector (Anti-Hallucination)" desc = "What you see is what you get." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/antihallucination/Initialize() block = HALLUCINATIONBLOCK . = ..() /obj/item/dnainjector/h2m name = "\improper DNA injector (Human > Monkey)" desc = "Will make you a flea bag." datatype = DNA2_BUF_SE value = 0xFFF /obj/item/dnainjector/h2m/Initialize() block = MONKEYBLOCK . = ..() /obj/item/dnainjector/m2h name = "\improper DNA injector (Monkey > Human)" desc = "Will make you...less hairy." datatype = DNA2_BUF_SE value = 0x001 /obj/item/dnainjector/m2h/Initialize() block = MONKEYBLOCK . = ..()