Merge remote-tracking branch 'refs/remotes/origin/master' into upstream-merge-27268

This commit is contained in:
Poojawa
2017-05-21 00:44:08 -05:00
149 changed files with 5040 additions and 2255 deletions
@@ -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
@@ -5,6 +5,7 @@
item_state = null
w_class = WEIGHT_CLASS_BULKY
force = 10
modifystate = TRUE
flags = CONDUCT
slot_flags = SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
@@ -39,7 +40,7 @@
w_class = WEIGHT_CLASS_NORMAL
slot_flags = SLOT_BELT
icon_state = "pulse_carbine"
item_state = "pulse"
item_state = null
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/carbine"
can_flashlight = 1
flight_x_offset = 18
+32 -6
View File
@@ -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
+26 -5
View File
@@ -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