mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-25 08:51:41 +00:00
630 lines
15 KiB
Plaintext
630 lines
15 KiB
Plaintext
/obj/item/weapon/dnainjector
|
|
name = "DNA-Injector"
|
|
desc = "This injects the person with DNA."
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "dnainjector"
|
|
item_state = "dnainjector"
|
|
var/block = 0
|
|
var/datum/dna2/record/buf=null
|
|
throw_speed = 3
|
|
throw_range = 5
|
|
w_class = 1
|
|
origin_tech = "biotech=1"
|
|
|
|
var/damage_coeff = 1
|
|
var/used = 0
|
|
|
|
// USE ONLY IN PREMADE SYRINGES. WILL NOT WORK OTHERWISE.
|
|
var/datatype = 0
|
|
var/value = 0
|
|
|
|
/obj/item/weapon/dnainjector/New()
|
|
if(datatype && block)
|
|
buf=new
|
|
buf.dna=new
|
|
buf.types = datatype
|
|
buf.dna.ResetSE()
|
|
SetValue(value)
|
|
|
|
/obj/item/weapon/dnainjector/proc/GetRealBlock(var/selblock)
|
|
if(selblock==0)
|
|
return block
|
|
else
|
|
return selblock
|
|
|
|
/obj/item/weapon/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/weapon/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/weapon/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/weapon/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/weapon/dnainjector/proc/inject(mob/living/M as mob, mob/user as mob)
|
|
if(used)
|
|
return
|
|
if(istype(M,/mob/living))
|
|
M.apply_effect(rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)),IRRADIATE,0,1)
|
|
var/mob/living/carbon/human/H
|
|
if(istype(M, /mob/living/carbon/human))
|
|
H = M
|
|
|
|
spawn(0) //Some mutations have sleeps in them, like monkey
|
|
if(!(NOCLONE in M.mutations) && !(H && (H.species.flags & NO_DNA))) // prevents drained people from having their DNA changed
|
|
var/prev_ue = M.dna.unique_enzymes
|
|
var/mutflags = 0
|
|
// UI in syringe.
|
|
if(buf.types & DNA2_BUF_UI)
|
|
if(!block) //isolated block?
|
|
M.dna.UI = buf.dna.UI.Copy()
|
|
M.dna.UpdateUI()
|
|
M.UpdateAppearance()
|
|
if(buf.types & DNA2_BUF_UE) //unique enzymes? yes
|
|
|
|
M.real_name = buf.dna.real_name
|
|
M.name = buf.dna.real_name
|
|
M.dna.real_name = buf.dna.real_name
|
|
M.dna.unique_enzymes = buf.dna.unique_enzymes
|
|
else
|
|
M.dna.SetUIValue(block,src.GetValue())
|
|
M.UpdateAppearance()
|
|
if(buf.types & DNA2_BUF_SE)
|
|
mutflags = MUTCHK_FORCED
|
|
if(!block) //isolated block?
|
|
M.dna.SE = buf.dna.SE.Copy()
|
|
M.dna.UpdateSE()
|
|
else
|
|
M.dna.SetSEValue(block,src.GetValue())
|
|
domutcheck(M, null, mutflags)
|
|
M.update_mutations()
|
|
if(H)
|
|
H.sync_organ_dna(assimilate = 0, old_ue = prev_ue)
|
|
|
|
/obj/item/weapon/dnainjector/attack(mob/M as mob, mob/user as mob)
|
|
if(used)
|
|
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
|
return
|
|
if(!M.dna) //You know what would be nice? If the mob you're injecting has DNA, and so doesn't cause runtimes.
|
|
return 0
|
|
|
|
if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure.
|
|
var/mob/living/carbon/human/H = M
|
|
if(H.species.flags & NO_DNA)
|
|
return 0
|
|
|
|
if(!user.IsAdvancedToolUser())
|
|
return 0
|
|
|
|
M.create_attack_log("<font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
|
|
user.create_attack_log("<font color='red'>Used the [name] to inject [M.name] ([M.ckey])</font>")
|
|
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
|
|
|
|
if(!iscarbon(user))
|
|
M.LAssailant = null
|
|
else
|
|
M.LAssailant = user
|
|
|
|
if(buf.types & DNA2_BUF_SE)
|
|
|
|
if(block)
|
|
if(GetState() && block == MONKEYBLOCK && ishuman(M))
|
|
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
|
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
|
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
|
else
|
|
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
|
|
|
else
|
|
if(GetState(MONKEYBLOCK) && ishuman(M))
|
|
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
|
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name] (MONKEY)")
|
|
log_game("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] \red(MONKEY)")
|
|
else
|
|
log_attack("[key_name(user)] injected [key_name(M)] with the Isolated [name]")
|
|
|
|
else
|
|
log_attack("[key_name(user)] injected [key_name(M)] with the [name]")
|
|
|
|
if(M != user)
|
|
M.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>", "<span class='userdanger'>[user] is trying to inject [M] with [src]!</span>")
|
|
if(!do_mob(user, M))
|
|
return
|
|
M.visible_message("<span class='danger'>[user] injects [M] with the syringe with [src]!", \
|
|
"<span class='userdanger'>[user] injects [M] with the syringe with [src]!")
|
|
|
|
else
|
|
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
|
|
|
inject(M, user)
|
|
used = 1
|
|
icon_state = "dnainjector0"
|
|
desc += " This one is used up."
|
|
|
|
/obj/item/weapon/dnainjector/hulkmut
|
|
name = "DNA-Injector (Hulk)"
|
|
desc = "This will make you big and strong, but give you a bad skin condition."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = HULKBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antihulk
|
|
name = "DNA-Injector (Anti-Hulk)"
|
|
desc = "Cures green skin."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = HULKBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/xraymut
|
|
name = "DNA-Injector (Xray)"
|
|
desc = "Finally you can see what the Captain does."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 8
|
|
New()
|
|
block = XRAYBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antixray
|
|
name = "DNA-Injector (Anti-Xray)"
|
|
desc = "It will make you see harder."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 8
|
|
New()
|
|
block = XRAYBLOCK
|
|
..()
|
|
|
|
|
|
/obj/item/weapon/dnainjector/firemut
|
|
name = "DNA-Injector (Fire)"
|
|
desc = "Gives you fire."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 10
|
|
New()
|
|
block = FIREBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antifire
|
|
name = "DNA-Injector (Anti-Fire)"
|
|
desc = "Cures fire."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 10
|
|
New()
|
|
block = FIREBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/telemut
|
|
name = "DNA-Injector (Tele.)"
|
|
desc = "Super brain man!"
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 12
|
|
New()
|
|
block = TELEBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/telemut/darkbundle
|
|
name = "DNA injector"
|
|
desc = "Good. Let the hate flow through you."
|
|
|
|
|
|
/obj/item/weapon/dnainjector/antitele
|
|
name = "DNA-Injector (Anti-Tele.)"
|
|
desc = "Will make you not able to control your mind."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 12
|
|
New()
|
|
block = TELEBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/nobreath
|
|
name = "DNA-Injector (No Breath)"
|
|
desc = "Hold your breath and count to infinity."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = NOBREATHBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antinobreath
|
|
name = "DNA-Injector (Anti-No Breath)"
|
|
desc = "Hold your breath and count to 100."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = NOBREATHBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/remoteview
|
|
name = "DNA-Injector (Remote View)"
|
|
desc = "Stare into the distance for a reason."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = REMOTEVIEWBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antiremoteview
|
|
name = "DNA-Injector (Anti-Remote View)"
|
|
desc = "Cures green skin."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = REMOTEVIEWBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/regenerate
|
|
name = "DNA-Injector (Regeneration)"
|
|
desc = "Healthy but hungry."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = REGENERATEBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antiregenerate
|
|
name = "DNA-Injector (Anti-Regeneration)"
|
|
desc = "Sickly but sated."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = REGENERATEBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/runfast
|
|
name = "DNA-Injector (Increase Run)"
|
|
desc = "Running Man."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = INCREASERUNBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antirunfast
|
|
name = "DNA-Injector (Anti-Increase Run)"
|
|
desc = "Walking Man."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = INCREASERUNBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/morph
|
|
name = "DNA-Injector (Morph)"
|
|
desc = "A total makeover."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = MORPHBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antimorph
|
|
name = "DNA-Injector (Anti-Morph)"
|
|
desc = "Cures identity crisis."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = MORPHBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/noprints
|
|
name = "DNA-Injector (No Prints)"
|
|
desc = "Better than a pair of budget insulated gloves."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = NOPRINTSBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antinoprints
|
|
name = "DNA-Injector (Anti-No Prints)"
|
|
desc = "Not quite as good as a pair of budget insulated gloves."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = NOPRINTSBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/insulation
|
|
name = "DNA-Injector (Shock Immunity)"
|
|
desc = "Better than a pair of real insulated gloves."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = SHOCKIMMUNITYBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antiinsulation
|
|
name = "DNA-Injector (Anti-Shock Immunity)"
|
|
desc = "Not quite as good as a pair of real insulated gloves."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = SHOCKIMMUNITYBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/midgit
|
|
name = "DNA-Injector (Small Size)"
|
|
desc = "Makes you shrink."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = SMALLSIZEBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antimidgit
|
|
name = "DNA-Injector (Anti-Small Size)"
|
|
desc = "Makes you grow. But not too much."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = SMALLSIZEBLOCK
|
|
..()
|
|
|
|
/////////////////////////////////////
|
|
/obj/item/weapon/dnainjector/antiglasses
|
|
name = "DNA-Injector (Anti-Glasses)"
|
|
desc = "Toss away those glasses!"
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 1
|
|
New()
|
|
block = GLASSESBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/glassesmut
|
|
name = "DNA-Injector (Glasses)"
|
|
desc = "Will make you need dorkish glasses."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 1
|
|
New()
|
|
block = GLASSESBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/epimut
|
|
name = "DNA-Injector (Epi.)"
|
|
desc = "Shake shake shake the room!"
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 3
|
|
New()
|
|
block = EPILEPSYBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antiepi
|
|
name = "DNA-Injector (Anti-Epi.)"
|
|
desc = "Will fix you up from shaking the room."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 3
|
|
New()
|
|
block = EPILEPSYBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/anticough
|
|
name = "DNA-Injector (Anti-Cough)"
|
|
desc = "Will stop that awful noise."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 5
|
|
New()
|
|
block = COUGHBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/coughmut
|
|
name = "DNA-Injector (Cough)"
|
|
desc = "Will bring forth a sound of horror from your throat."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 5
|
|
New()
|
|
block = COUGHBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/clumsymut
|
|
name = "DNA-Injector (Clumsy)"
|
|
desc = "Makes clumsy minions."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 6
|
|
New()
|
|
block = CLUMSYBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/anticlumsy
|
|
name = "DNA-Injector (Anti-Clumy)"
|
|
desc = "Cleans up confusion."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 6
|
|
New()
|
|
block = CLUMSYBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antitour
|
|
name = "DNA-Injector (Anti-Tour.)"
|
|
desc = "Will cure tourrets."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 7
|
|
New()
|
|
block = TWITCHBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/tourmut
|
|
name = "DNA-Injector (Tour.)"
|
|
desc = "Gives you a nasty case off tourrets."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 7
|
|
New()
|
|
block = TWITCHBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/stuttmut
|
|
name = "DNA-Injector (Stutt.)"
|
|
desc = "Makes you s-s-stuttterrr"
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 9
|
|
New()
|
|
block = NERVOUSBLOCK
|
|
..()
|
|
|
|
|
|
/obj/item/weapon/dnainjector/antistutt
|
|
name = "DNA-Injector (Anti-Stutt.)"
|
|
desc = "Fixes that speaking impairment."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 9
|
|
New()
|
|
block = NERVOUSBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/blindmut
|
|
name = "DNA-Injector (Blind)"
|
|
desc = "Makes you not see anything."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 11
|
|
New()
|
|
block = BLINDBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antiblind
|
|
name = "DNA-Injector (Anti-Blind)"
|
|
desc = "ITS A MIRACLE!!!"
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 11
|
|
New()
|
|
block = BLINDBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/telemut
|
|
name = "DNA-Injector (Tele.)"
|
|
desc = "Super brain man!"
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 12
|
|
New()
|
|
block = TELEBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antitele
|
|
name = "DNA-Injector (Anti-Tele.)"
|
|
desc = "Will make you not able to control your mind."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 12
|
|
New()
|
|
block = TELEBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/deafmut
|
|
name = "DNA-Injector (Deaf)"
|
|
desc = "Sorry, what did you say?"
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 13
|
|
New()
|
|
block = DEAFBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antideaf
|
|
name = "DNA-Injector (Anti-Deaf)"
|
|
desc = "Will make you hear once more."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 13
|
|
New()
|
|
block = DEAFBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/hallucination
|
|
name = "DNA-Injector (Halluctination)"
|
|
desc = "What you see isn't always what you get."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 2
|
|
New()
|
|
block = HALLUCINATIONBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/antihallucination
|
|
name = "DNA-Injector (Anti-Hallucination)"
|
|
desc = "What you see is what you get."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 2
|
|
New()
|
|
block = HALLUCINATIONBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/h2m
|
|
name = "DNA-Injector (Human > Monkey)"
|
|
desc = "Will make you a flea bag."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0xFFF
|
|
//block = 14
|
|
New()
|
|
block = MONKEYBLOCK
|
|
..()
|
|
|
|
/obj/item/weapon/dnainjector/m2h
|
|
name = "DNA-Injector (Monkey > Human)"
|
|
desc = "Will make you...less hairy."
|
|
datatype = DNA2_BUF_SE
|
|
value = 0x001
|
|
//block = 14
|
|
New()
|
|
block = MONKEYBLOCK
|
|
..()
|