Revert "[SHOULD BE DONE BUT LETS TESTMERGE FIRST] TG SYNC"

This commit is contained in:
LetterJay
2017-12-16 13:08:50 -06:00
committed by GitHub
parent 715960b324
commit 7af461539f
756 changed files with 10062 additions and 11368 deletions
+2 -2
View File
@@ -19,8 +19,8 @@
var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the ammo is fired.
/obj/item/ammo_casing/Initialize()
. = ..()
/obj/item/ammo_casing/New()
..()
if(projectile_type)
BB = new projectile_type(src)
pixel_x = rand(-10, 10)
@@ -284,8 +284,8 @@
icon_state = "cshell"
projectile_type = /obj/item/projectile/bullet/dart
/obj/item/ammo_casing/shotgun/dart/Initialize()
. = ..()
/obj/item/ammo_casing/shotgun/dart/New()
..()
container_type |= OPENCONTAINER_1
create_reagents(30)
reagents.set_reacting(TRUE)
@@ -296,10 +296,10 @@
/obj/item/ammo_casing/shotgun/dart/bioterror
desc = "A shotgun dart filled with deadly toxins."
/obj/item/ammo_casing/shotgun/dart/bioterror/Initialize()
. = ..()
/obj/item/ammo_casing/shotgun/dart/bioterror/New()
..()
reagents.add_reagent("neurotoxin", 6)
reagents.add_reagent("spore", 6)
reagents.add_reagent("mutetoxin", 6) //;HELP OPS IN MAINT
reagents.add_reagent("coniine", 6)
reagents.add_reagent("sodium_thiopental", 6)
reagents.add_reagent("sodium_thiopental", 6)
@@ -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
moveToNullspace()
loc = null
return 1
else
return 0
+2 -2
View File
@@ -22,8 +22,8 @@
var/multiload = 1
var/start_empty = 0
/obj/item/ammo_box/Initialize()
. = ..()
/obj/item/ammo_box/New()
..()
if(!start_empty)
for(var/i = 1, i <= max_ammo, i++)
stored_ammo += new ammo_type(src)
@@ -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.forceMove(src)
R.loc = src
if(bullet)
bullet.forceMove(drop_location())
bullet.loc = get_turf(src.loc)
return 1
return 0
@@ -156,9 +156,9 @@
max_ammo = 6
multiload = 0
/obj/item/ammo_box/magazine/internal/rus357/Initialize()
/obj/item/ammo_box/magazine/internal/rus357/New()
stored_ammo += new ammo_type(src)
. = ..()
..()
/obj/item/ammo_box/magazine/internal/boltaction
name = "bolt action rifle internal magazine"
+16 -13
View File
@@ -24,7 +24,7 @@
var/can_suppress = FALSE
var/can_unsuppress = TRUE
var/recoil = 0 //boom boom shake the room
var/clumsy_check = TRUE
var/clumsy_check = 1
var/obj/item/ammo_casing/chambered = null
trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
var/sawn_desc = null //description change if weapon is sawn-off
@@ -77,8 +77,9 @@
..()
var/obj/item/gun/G = locate(/obj/item/gun) in contents
if(G)
G.forceMove(loc)
QDEL_NULL(G.pin)
G.loc = loc
qdel(G.pin)
G.pin = null
visible_message("[G] can now fit a new pin, but the old one was destroyed in the process.", null, null, 3)
qdel(src)
@@ -91,17 +92,19 @@
/obj/item/gun/equipped(mob/living/user, slot)
. = ..()
if(zoomed && user.get_active_held_item() != src)
zoom(user, FALSE) //we can only stay zoomed in if it's in our hands //yeah and we only unzoom if we're actually zoomed using the gun!!
if(zoomable && user.get_active_held_item() != src)
zoom(user, FALSE) //we can only stay zoomed in if it's in our hands
//called after the gun has successfully fired its chambered ammo.
/obj/item/gun/proc/process_chamber()
return FALSE
return 0
//check if there's enough ammo/energy/whatever to shoot one time
//i.e if clicking would make it shoot
/obj/item/gun/proc/can_shoot()
return TRUE
return 1
/obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
to_chat(user, "<span class='danger'>*click*</span>")
@@ -192,13 +195,13 @@
/obj/item/gun/proc/handle_pins(mob/living/user)
if(pin)
if(pin.pin_auth(user) || pin.emagged)
return TRUE
return 1
else
pin.auth_fail(user)
return FALSE
return 0
else
to_chat(user, "<span class='warning'>[src]'s trigger is locked. This weapon doesn't have a firing pin installed!</span>")
return FALSE
return 0
/obj/item/gun/proc/recharge_newshot()
return
@@ -418,7 +421,7 @@
target.visible_message("<span class='warning'>[user] points [src] at [target]'s head, ready to pull the trigger...</span>", \
"<span class='userdanger'>[user] points [src] at your head, ready to pull the trigger...</span>")
semicd = TRUE
semicd = 1
if(!do_mob(user, target, 120) || user.zone_selected != "mouth")
if(user)
@@ -426,10 +429,10 @@
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
else if(target && target.Adjacent(user))
target.visible_message("<span class='notice'>[user] has decided to spare [target]</span>", "<span class='notice'>[user] has decided to spare your life!</span>")
semicd = FALSE
semicd = 0
return
semicd = FALSE
semicd = 0
target.visible_message("<span class='warning'>[user] pulls the trigger!</span>", "<span class='userdanger'>[user] pulls the trigger!</span>")
+3 -4
View File
@@ -107,13 +107,13 @@
/obj/item/gun/ballistic/attack_self(mob/living/user)
var/obj/item/ammo_casing/AC = chambered //Find chambered round
if(magazine)
magazine.forceMove(drop_location())
magazine.loc = get_turf(src.loc)
user.put_in_hands(magazine)
magazine.update_icon()
magazine = null
to_chat(user, "<span class='notice'>You pull the magazine out of \the [src].</span>")
else if(chambered)
AC.forceMove(drop_location())
AC.loc = get_turf(src)
AC.SpinAnimation(10, 1)
chambered = null
to_chat(user, "<span class='notice'>You unload the round from \the [src]'s chamber.</span>")
@@ -167,8 +167,6 @@
#undef BRAINS_BLOWN_THROW_SPEED
#undef BRAINS_BLOWN_THROW_RANGE
/obj/item/gun/ballistic/proc/sawoff(mob/user)
if(sawn_state == SAWN_OFF)
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
@@ -218,3 +216,4 @@
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"
@@ -8,7 +8,7 @@
actions_types = list(/datum/action/item_action/toggle_firemode)
/obj/item/gun/ballistic/automatic/proto
name = "\improper Nanotrasen Saber SMG"
name = "\improper NanoTrasen Saber SMG"
desc = "A prototype three-round burst 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
icon_state = "saber"
mag_type = /obj/item/ammo_box/magazine/smgm9mm
@@ -19,6 +19,7 @@
/obj/item/gun/ballistic/automatic/update_icon()
..()
cut_overlays()
if(!select)
add_overlay("[initial(icon_state)]semi")
if(select == 1)
@@ -92,9 +93,6 @@
fire_delay = 2
burst_size = 2
pin = /obj/item/device/firing_pin/implant/pindicate
can_bayonet = TRUE
knife_x_offset = 26
knife_y_offset = 12
/obj/item/gun/ballistic/automatic/c20r/unrestricted
pin = /obj/item/device/firing_pin
@@ -122,9 +120,6 @@
can_suppress = FALSE
burst_size = 0
actions_types = list()
can_bayonet = TRUE
knife_x_offset = 25
knife_y_offset = 12
/obj/item/gun/ballistic/automatic/wt550/update_icon()
..()
@@ -330,7 +325,7 @@
else if(cover_open && magazine)
//drop the mag
magazine.update_icon()
magazine.forceMove(drop_location())
magazine.loc = get_turf(src.loc)
user.put_in_hands(magazine)
magazine = null
update_icon()
@@ -362,8 +357,7 @@
can_suppress = TRUE
w_class = WEIGHT_CLASS_NORMAL
zoomable = TRUE
zoom_amt = 10 //Long range, enough to see in front of you, but no tiles behind you.
zoom_out_amt = 13
zoom_amt = 7 //Long range, enough to see in front of you, but no tiles behind you.
slot_flags = SLOT_BACK
actions_types = list()
@@ -39,7 +39,7 @@
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
if(CB)
CB.forceMove(drop_location())
CB.loc = get_turf(src.loc)
CB.SpinAnimation(10, 1)
CB.update_icon()
num_unloaded++
@@ -289,7 +289,7 @@
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
chambered = null
CB.forceMove(drop_location())
CB.loc = get_turf(src.loc)
CB.update_icon()
num_unloaded++
if (num_unloaded)
@@ -56,7 +56,7 @@
/obj/item/gun/ballistic/shotgun/proc/pump_unload(mob/M)
if(chambered)//We have a shell in the chamber
chambered.forceMove(drop_location())//Eject casing
chambered.loc = get_turf(src)//Eject casing
chambered.SpinAnimation(5, 1)
chambered = null
@@ -105,9 +105,6 @@
slot_flags = 0 //no SLOT_BACK sprite, alas
mag_type = /obj/item/ammo_box/magazine/internal/boltaction
var/bolt_open = FALSE
can_bayonet = TRUE
knife_x_offset = 27
knife_y_offset = 13
/obj/item/gun/ballistic/shotgun/boltaction/pump(mob/M)
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
@@ -144,7 +141,6 @@
pin = /obj/item/device/firing_pin/magic
icon_state = "arcane_barrage"
item_state = "arcane_barrage"
can_bayonet = FALSE
flags_1 = DROPDEL_1
+5 -3
View File
@@ -63,6 +63,8 @@
var/projectile_setting_pierce = TRUE
var/delay = 65
var/lastfire = 0
var/lastprocess = 0
//ZOOMING
var/zoom_current_view_increase = 0
@@ -500,11 +502,11 @@
if(!do_pierce)
return FALSE
if(pierced[target]) //we already pierced them go away
forceMove(get_turf(target))
loc = get_turf(target)
return TRUE
if(isclosedturf(target))
if(wall_pierce++ < wall_pierce_amount)
forceMove(target)
loc = target
if(prob(wall_devastate))
if(iswallturf(target))
var/turf/closed/wall/W = target
@@ -520,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
forceMove(AM.drop_location())
loc = get_turf(AM)
structure_pierce++
return TRUE
return FALSE
@@ -16,8 +16,8 @@
var/unique_frequency = FALSE // modified by KA modkits
var/overheat = FALSE
can_bayonet = TRUE
knife_x_offset = 20
knife_y_offset = 12
knife_x_offset = 15
knife_y_offset = 13
var/max_mod_capacity = 100
var/list/modkits = list()
@@ -13,10 +13,10 @@
var/obj/item/device/transfer_valve/bomb
/obj/item/gun/blastcannon/Initialize()
. = ..()
/obj/item/gun/blastcannon/New()
if(!pin)
pin = new
return ..()
/obj/item/gun/blastcannon/Destroy()
if(bomb)
+2 -2
View File
@@ -42,7 +42,7 @@
if(!S)
return 0
S.forceMove(user.loc)
S.loc = 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
+2 -2
View File
@@ -73,9 +73,9 @@
var/impact_effect_type //what type of impact effect to show when hitting something
var/log_override = FALSE //is this type spammed enough to not log? (KAs)
/obj/item/projectile/Initialize()
. = ..()
/obj/item/projectile/New()
permutated = list()
return ..()
/obj/item/projectile/proc/Range()
range--
@@ -341,8 +341,8 @@
icon_state = "banana"
range = 200
/obj/item/projectile/bullet/honker/Initialize()
. = ..()
/obj/item/projectile/bullet/honker/New()
..()
SpinAnimation()
// Mime
@@ -364,8 +364,8 @@
damage = 6
var/piercing = FALSE
/obj/item/projectile/bullet/dart/Initialize()
. = ..()
/obj/item/projectile/bullet/dart/New()
..()
create_reagents(50)
reagents.set_reacting(FALSE)
@@ -388,8 +388,8 @@
reagents.handle_reactions()
return TRUE
/obj/item/projectile/bullet/dart/metalfoam/Initialize()
. = ..()
/obj/item/projectile/bullet/dart/metalfoam/New()
..()
reagents.add_reagent("aluminium", 15)
reagents.add_reagent("foaming_agent", 5)
reagents.add_reagent("facid", 5)
@@ -100,7 +100,7 @@
/obj/item/projectile/meteor/Collide(atom/A)
if(A == firer)
forceMove(A.loc)
loc = A.loc
return
A.ex_act(EXPLODE_HEAVY)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
@@ -612,3 +612,4 @@
knockdown = 0
nodamage = TRUE
return ..()