Merge branch 'master' into upstream-merge-33498

This commit is contained in:
LetterJay
2017-12-19 17:50:11 -06:00
committed by GitHub
284 changed files with 5080 additions and 1897 deletions
@@ -7,7 +7,7 @@
/obj/item/ammo_casing/caseless/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread)
if (..()) //successfully firing
loc = null
moveToNullspace()
return 1
else
return 0
+2 -2
View File
@@ -87,7 +87,7 @@
if(num_loaded)
if(!silent)
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
playsound(user, 'sound/weapons/bulletinsert.ogg', 60, 1)
playsound(src, 'sound/weapons/bulletinsert.ogg', 60, 1)
A.update_icon()
update_icon()
@@ -98,7 +98,7 @@
if(A)
user.put_in_hands(A)
to_chat(user, "<span class='notice'>You remove a round from \the [src]!</span>")
playsound(user, 'sound/weapons/bulletremove.ogg', 60, 1)
playsound(A, 'sound/weapons/bulletremove.ogg', 60, 1)
update_icon()
/obj/item/ammo_box/update_icon()
@@ -51,10 +51,10 @@
var/obj/item/ammo_casing/bullet = stored_ammo[i]
if(!bullet || !bullet.BB) // found a spent ammo
stored_ammo[i] = R
R.loc = src
R.forceMove(src)
if(bullet)
bullet.loc = get_turf(src.loc)
bullet.forceMove(drop_location())
return 1
return 0
+3 -4
View File
@@ -77,9 +77,8 @@
..()
var/obj/item/gun/G = locate(/obj/item/gun) in contents
if(G)
G.loc = loc
qdel(G.pin)
G.pin = null
G.forceMove(loc)
QDEL_NULL(G.pin)
visible_message("[G] can now fit a new pin, but the old one was destroyed in the process.", null, null, 3)
qdel(src)
@@ -108,7 +107,7 @@
/obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
to_chat(user, "<span class='danger'>*click*</span>")
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
/obj/item/gun/proc/shoot_live_shot(mob/living/user as mob|obj, pointblank = 0, mob/pbtarget = null, message = 1)
+18 -6
View File
@@ -30,8 +30,9 @@
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(istype(AC)) //there's a chambered round
if(casing_ejector)
AC.forceMove(get_turf(src)) //Eject casing onto ground.
AC.forceMove(drop_location()) //Eject casing onto ground.
AC.SpinAnimation(10, 1) //next gen special effects
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, AC, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
chambered = null
else if(empty_chamber)
chambered = null
@@ -58,7 +59,13 @@
if(user.transferItemToLoc(AM, src))
magazine = AM
to_chat(user, "<span class='notice'>You load a new magazine into \the [src].</span>")
chamber_round()
if(magazine.ammo_count())
playsound(src, "gun_insert_full_magazine", 70, 1)
if(!chambered)
chamber_round()
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, src, 'sound/weapons/gun_chamber_round.ogg', 100, 1), 3)
else
playsound(src, "gun_insert_empty_magazine", 70, 1)
A.update_icon()
update_icon()
return 1
@@ -107,16 +114,22 @@
/obj/item/gun/ballistic/attack_self(mob/living/user)
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(magazine)
magazine.loc = get_turf(src.loc)
magazine.forceMove(drop_location())
user.put_in_hands(magazine)
magazine.update_icon()
if(magazine.ammo_count())
playsound(src, "sound/weapons/gun_magazine_remove_full.ogg", 70, 1)
else
playsound(src, "gun_remove_empty_magazine", 70, 1)
magazine = null
to_chat(user, "<span class='notice'>You pull the magazine out of \the [src].</span>")
else if(chambered)
AC.loc = get_turf(src)
AC.forceMove(drop_location())
AC.SpinAnimation(10, 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, AC, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
chambered = null
to_chat(user, "<span class='notice'>You unload the round from \the [src]'s chamber.</span>")
playsound(src, "gun_slide_lock", 70, 1)
else
to_chat(user, "<span class='notice'>There's no magazine in \the [src].</span>")
update_icon()
@@ -162,7 +175,7 @@
return(OXYLOSS)
else
user.visible_message("<span class='suicide'>[user] is pretending to blow [user.p_their()] brain[user.p_s()] out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
return (OXYLOSS)
#undef BRAINS_BLOWN_THROW_SPEED
#undef BRAINS_BLOWN_THROW_RANGE
@@ -216,4 +229,3 @@
desc = "A foreign knock-off suppressor, it feels flimsy, cheap, and brittle. Still fits all weapons."
icon = 'icons/obj/guns/projectile.dmi'
icon_state = "suppressor"
@@ -325,7 +325,7 @@
else if(cover_open && magazine)
//drop the mag
magazine.update_icon()
magazine.loc = get_turf(src.loc)
magazine.forceMove(drop_location())
user.put_in_hands(magazine)
magazine = null
update_icon()
@@ -39,13 +39,13 @@
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
if(CB)
CB.loc = get_turf(src.loc)
CB.forceMove(drop_location())
CB.SpinAnimation(10, 1)
CB.update_icon()
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, CB, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
num_unloaded++
if (num_unloaded)
to_chat(user, "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>")
playsound(user, 'sound/weapons/bulletremove.ogg', 60, 1)
else
to_chat(user, "<span class='warning'>[src] is empty!</span>")
@@ -229,7 +229,7 @@
return
user.visible_message("<span class='danger'>*click*</span>")
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
/obj/item/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head")
user.apply_damage(300, BRUTE, affecting)
@@ -289,7 +289,7 @@
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
chambered = null
CB.loc = get_turf(src.loc)
CB.forceMove(drop_location())
CB.update_icon()
num_unloaded++
if (num_unloaded)
@@ -56,8 +56,9 @@
/obj/item/gun/ballistic/shotgun/proc/pump_unload(mob/M)
if(chambered)//We have a shell in the chamber
chambered.loc = get_turf(src)//Eject casing
chambered.SpinAnimation(5, 1)
chambered.forceMove(drop_location())//Eject casing
chambered.SpinAnimation(10, 1)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, chambered, 'sound/weapons/bulletremove.ogg', 60, 1), 3)
chambered = null
/obj/item/gun/ballistic/shotgun/proc/pump_reload(mob/M)
+3 -3
View File
@@ -502,11 +502,11 @@
if(!do_pierce)
return FALSE
if(pierced[target]) //we already pierced them go away
loc = get_turf(target)
forceMove(get_turf(target))
return TRUE
if(isclosedturf(target))
if(wall_pierce++ < wall_pierce_amount)
loc = target
forceMove(target)
if(prob(wall_devastate))
if(iswallturf(target))
var/turf/closed/wall/W = target
@@ -522,7 +522,7 @@
var/obj/O = AM
O.take_damage((impact_structure_damage + aoe_structure_damage) * structure_bleed_coeff * get_damage_coeff(AM), BURN, "energy", FALSE)
pierced[AM] = TRUE
loc = get_turf(AM)
forceMove(AM.drop_location())
structure_pierce++
return TRUE
return FALSE
+1 -1
View File
@@ -175,7 +175,7 @@
return(OXYLOSS)
else
user.visible_message("<span class='suicide'>[user] is pretending to blow [user.p_their()] brains out with [src]! It looks like [user.p_theyre()] trying to commit suicide!</b></span>")
playsound(src, "gun_dry_fire", 50, 1)
playsound(src, "gun_dry_fire", 60, 1)
return (OXYLOSS)
+2 -2
View File
@@ -42,7 +42,7 @@
if(!S)
return 0
S.loc = user.loc
S.forceMove(user.loc)
syringes.Remove(S)
to_chat(user, "<span class='notice'>You unload [S] from \the [src].</span>")
@@ -101,4 +101,4 @@
return TRUE
else
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
return FALSE
return FALSE
@@ -100,7 +100,7 @@
/obj/item/projectile/meteor/Collide(atom/A)
if(A == firer)
loc = A.loc
forceMove(A.loc)
return
A.ex_act(EXPLODE_HEAVY)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
@@ -612,4 +612,3 @@
knockdown = 0
nodamage = TRUE
return ..()