Adds modified syringe guns
This commit is contained in:
@@ -64,6 +64,25 @@
|
||||
qdel(S)
|
||||
..()
|
||||
|
||||
/obj/item/ammo_casing/dnainjector
|
||||
name = "rigged syringe gun spring"
|
||||
desc = "A high-power spring that throws DNA injectors."
|
||||
projectile_type = /obj/item/projectile/bullet/dnainjector
|
||||
firing_effect_type = null
|
||||
|
||||
/obj/item/ammo_casing/dnainjector/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
if(!BB)
|
||||
return
|
||||
if(istype(loc, /obj/item/weapon/gun/syringe/dna))
|
||||
var/obj/item/weapon/gun/syringe/dna/SG = loc
|
||||
if(!SG.syringes.len)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/dnainjector/S = popleft(SG.syringes)
|
||||
var/obj/item/projectile/bullet/dnainjector/D = BB
|
||||
S.forceMove(D)
|
||||
D.injector = S
|
||||
..()
|
||||
|
||||
/obj/item/ammo_casing/energy/c3dbullet
|
||||
projectile_type = /obj/item/projectile/bullet/midbullet3
|
||||
|
||||
@@ -49,18 +49,18 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = 1)
|
||||
/obj/item/weapon/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/weapon/reagent_containers/syringe))
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(A, src))
|
||||
return
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You load [A] into \the [src].</span>")
|
||||
syringes.Add(A)
|
||||
syringes += A
|
||||
recharge_newshot()
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return 0
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/gun/syringe/rapidsyringe
|
||||
name = "rapid syringe gun"
|
||||
@@ -78,3 +78,29 @@
|
||||
force = 2 //Also very weak because it's smaller
|
||||
suppressed = 1 //Softer fire sound
|
||||
can_unsuppress = 0 //Permanently silenced
|
||||
|
||||
/obj/item/weapon/gun/syringe/dna
|
||||
name = "modified syringe gun"
|
||||
desc = "A syringe gun that has been modified to fit DNA injectors instead of normal syringes."
|
||||
origin_tech = "combat=2;syndicate=2;biotech=3"
|
||||
|
||||
/obj/item/weapon/gun/syringe/dna/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/dnainjector(src)
|
||||
|
||||
/obj/item/weapon/gun/syringe/dna/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/weapon/dnainjector))
|
||||
var/obj/item/weapon/dnainjector/D = A
|
||||
if(D.used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(D, src))
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You load \the [D] into \the [src].</span>")
|
||||
syringes += D
|
||||
recharge_newshot()
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return FALSE
|
||||
@@ -190,7 +190,7 @@
|
||||
name = "dart"
|
||||
icon_state = "cbbolt"
|
||||
damage = 6
|
||||
var/piercing = 0
|
||||
var/piercing = FALSE
|
||||
|
||||
/obj/item/projectile/bullet/dart/New()
|
||||
..()
|
||||
@@ -201,15 +201,15 @@
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
if(blocked != 100) // not completely blocked
|
||||
if(M.can_inject(null, 0, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
|
||||
if(M.can_inject(null, FALSE, def_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
|
||||
..()
|
||||
reagents.reaction(M, INJECT)
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
blocked = 100
|
||||
target.visible_message("<span class='danger'>The [name] was deflected!</span>", \
|
||||
"<span class='userdanger'>You were protected against the [name]!</span>")
|
||||
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
|
||||
"<span class='userdanger'>You were protected against \the [src]!</span>")
|
||||
|
||||
..(target, blocked)
|
||||
reagents.set_reacting(TRUE)
|
||||
@@ -240,7 +240,28 @@
|
||||
nodamage = 1
|
||||
. = ..() // Execute the rest of the code.
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
icon_state = "syringeproj"
|
||||
var/obj/item/weapon/dnainjector/injector
|
||||
|
||||
/obj/item/projectile/bullet/dnainjector/on_hit(atom/target, blocked = 0)
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/M = target
|
||||
if(blocked != 100)
|
||||
if(M.can_inject(null, FALSE, def_zone, FALSE))
|
||||
if(injector.inject(M, firer))
|
||||
QDEL_NULL(injector)
|
||||
return TRUE
|
||||
else
|
||||
blocked = 100
|
||||
target.visible_message("<span class='danger'>\The [src] was deflected!</span>", \
|
||||
"<span class='userdanger'>You were protected against \the [src]!</span>")
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/bullet/dnainjector/Destroy()
|
||||
QDEL_NULL(injector)
|
||||
return ..()
|
||||
|
||||
//// SNIPER BULLETS
|
||||
|
||||
|
||||
@@ -1299,6 +1299,13 @@ GLOBAL_LIST_EMPTY(uplink_items) // Global list so we only initialize this once.
|
||||
cost = 2
|
||||
restricted_roles = list("Curator")
|
||||
limited_stock = 1 // please don't spam deadchat
|
||||
|
||||
/datum/uplink_item/role_restricted/modified_syringe_gun
|
||||
name = "Modified Syringe Gun"
|
||||
desc = "A syringe gun that fires DNA injectors instead of normal syringes."
|
||||
item = /obj/item/weapon/gun/syringe/dna
|
||||
cost = 14
|
||||
restricted_roles = list("Geneticist", "Chief Medical Officer")
|
||||
|
||||
// Pointless
|
||||
/datum/uplink_item/badass
|
||||
|
||||
Reference in New Issue
Block a user