Skip to content

Commit

Permalink
Merge pull request tgstation#6747 from paprka/gunchangesv2baby
Browse files Browse the repository at this point in the history
Further changes to the ranged stun system
  • Loading branch information
hornygranny committed Jan 9, 2015
2 parents a477b1f + 6628466 commit 56bad0f
Show file tree
Hide file tree
Showing 40 changed files with 375 additions and 205 deletions.
38 changes: 22 additions & 16 deletions code/datums/uplink_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ var/list/uplink_items = list()
gamemodes = list(/datum/game_mode/nuclear)
surplus = 40

/datum/uplink_item/dangerous/car
name = "C-90gl Compact Assault Rifle"
desc = "A fully-loaded Zashchita Industriya toploading bullpup assault rifle that uses 30-round 5.45x39mm magazines with a togglable underslung 40mm grenade launcher."
item = /obj/item/weapon/gun/projectile/automatic/c90gl
/datum/uplink_item/dangerous/carbine
name = "M-90gl Carbine"
desc = "A fully-loaded three-round burst carbine that uses 30-round 5.56mm magazines with a togglable underslung 40mm grenade launcher."
item = /obj/item/weapon/gun/projectile/automatic/m90
cost = 18
gamemodes = list(/datum/game_mode/nuclear)
surplus = 50
Expand All @@ -137,11 +137,10 @@ var/list/uplink_items = list()
surplus = 0

/datum/uplink_item/dangerous/crossbow
name = "Miniature Energy Crossbow"
desc = "A short bow mounted across a tiller in miniature. Small enough to fit into a pocket or slip into a bag unnoticed. It fires bolts tipped with a paralyzing toxin collected from a rare organism. \
Its bolts stun enemies for short periods, and replenish automatically."
item = /obj/item/weapon/gun/energy/crossbow
cost = 12
name = "Miniature Auto Crossbow"
desc = "A short bow mounted across a tiller in miniature. Small enough to fit into a pocket or slip into a bag unnoticed. It fires bolts tipped with a paralyzing toxin collected from a rare organism."
item = /obj/item/weapon/gun/projectile/automatic/crossbow
cost = 10
excludefrom = list(/datum/game_mode/nuclear)
surplus = 50

Expand Down Expand Up @@ -226,19 +225,26 @@ var/list/uplink_items = list()
surplus = 40

/datum/uplink_item/ammo/pistol
name = "Magazine - 10mm"
name = "Handgun Magazine - 10mm"
desc = "An additional 8-round 10mm magazine for use in the syndicate pistol. These subsonic rounds are dirt cheap but are half as effective as .357 rounds."
item = /obj/item/ammo_box/magazine/m10mm
cost = 1

/datum/uplink_item/ammo/crossbow
name = "Poison-tipped Crossbow Bolts (x4)"
desc = "A four pack of paralyzing crossbow bolts, for hunting big game."
item = /obj/item/ammo_box/crossbow
cost = 2
excludefrom = list(/datum/game_mode/nuclear)

/datum/uplink_item/ammo/revolver
name = "Speed Loader - .357"
desc = "A speed loader that contains seven additional .357 Magnum rounds for the syndicate revolver. For when you really need a lot of things dead."
item = /obj/item/ammo_box/a357
cost = 4

/datum/uplink_item/ammo/smg
name = "Magazine - .45"
name = "SMG Magazine - .45"
desc = "An additional 20-round .45 magazine for use in the C-20r submachine gun. These bullets pack a lot of punch that can knock most targets down, but do limited overall damage."
item = /obj/item/ammo_box/magazine/smgm45
cost = 2
Expand All @@ -265,16 +271,16 @@ var/list/uplink_items = list()
cost = 3
gamemodes = list(/datum/game_mode/nuclear)

/datum/uplink_item/ammo/car
name = "Box Magazine - 5.45x39mm"
desc = "An additional 30-round 5.45x39mm magazine for use in the C-90gl assault rifle. These bullets don't have the punch to knock most targets down, but dish out higher overall damage."
item = /obj/item/ammo_box/magazine/m545
/datum/uplink_item/ammo/carbine
name = "Toploader Magazine - 5.56"
desc = "An additional 30-round 5.56 magazine for use in the M-90gl carbine. These bullets don't have the punch to knock most targets down, but dish out higher overall damage."
item = /obj/item/ammo_box/magazine/m556
cost = 2
gamemodes = list(/datum/game_mode/nuclear)

/datum/uplink_item/ammo/a40mm
name = "Ammo Box - 40mm grenades"
desc = "A box of 4 additional 40mm HE grenades for use the C-90gl's underbarrel grenade launcher. Your teammates will thank you to not shoot these down small hallways."
desc = "A box of 4 additional 40mm HE grenades for use the M-90gl's underbarrel grenade launcher. Your teammates will thank you to not shoot these down small hallways."
item = /obj/item/ammo_box/a40mm
cost = 4
gamemodes = list(/datum/game_mode/nuclear)
Expand Down
3 changes: 2 additions & 1 deletion code/game/gamemodes/changeling/powers/epinephrine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
req_stat = UNCONSCIOUS

//Recover from stuns.
/obj/effect/proc_holder/changeling/epinephrine/sting_action(var/mob/user)
/obj/effect/proc_holder/changeling/epinephrine/sting_action(var/mob/living/user)

if(user.lying)
user << "<span class='notice'>We arise.</span>"
Expand All @@ -21,6 +21,7 @@
user.lying = 0
user.update_canmove()
user.reagents.add_reagent("synaptizine", 20)
user.adjustStaminaLoss(-75)

feedback_add_details("changeling_powers","UNS")
return 1
4 changes: 2 additions & 2 deletions code/game/gamemodes/wizard/rightandwrong.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@
if("sabr")
new /obj/item/weapon/gun/projectile/automatic(get_turf(H))
if("crossbow")
new /obj/item/weapon/gun/energy/crossbow(get_turf(H))
new /obj/item/weapon/gun/projectile/automatic/crossbow(get_turf(H))
if("saw")
new /obj/item/weapon/gun/projectile/automatic/l6_saw(get_turf(H))
if("car")
new /obj/item/weapon/gun/projectile/automatic/c90gl(get_turf(H))
new /obj/item/weapon/gun/projectile/automatic/m90(get_turf(H))
else
switch (randomizemagic)
if("fireball")
Expand Down
1 change: 1 addition & 0 deletions code/game/jobs/job/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Detective
else
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
H.equip_to_slot_or_del(new /obj/item/weapon/melee/classic_baton/telescopic(H), slot_in_backpack)

var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H)
L.imp_in = H
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/recharger.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
user << "<span class='notice'>[src] blinks red as you try to insert [G].</span>"
return

if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow))
if (istype(G, /obj/item/weapon/gun/energy/gun/nuclear))
user << "<span class='notice'>Your gun's recharge port was removed to make room for a miniaturized reactor.</span>"
return
user.drop_item()
Expand Down
2 changes: 1 addition & 1 deletion code/game/mecha/equipment/weapons/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
desc = "A weapon for combat exosuits. Shoots a rapid, three shot burst."
icon_state = "mecha_uac2"
equip_cooldown = 10
projectile = /obj/item/projectile/bullet/weakbullet
projectile = /obj/item/projectile/bullet/weakbullet3
projectiles = 300
projectile_energy_cost = 20
var/projectiles_per_shot = 3
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
else
return 1

var/attackback = 0 //calls calls attackby() when you hit an obj with an item with this var set to 1.

/obj/item/device
icon = 'icons/obj/device.dmi'

Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/weapons/implants/implant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
action_button_is_hands_free = 1
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like loyalty implants
var/implanted = null
var/mob/imp_in = null
var/mob/living/imp_in = null
item_color = "b"
var/allow_reagents = 0

Expand Down Expand Up @@ -190,6 +190,7 @@
imp_in.SetStunned(0)
imp_in.SetWeakened(0)
imp_in.SetParalysis(0)
imp_in.adjustStaminaLoss(-75)
imp_in.lying = 0
imp_in.update_canmove()

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@

add_fingerprint(usr)

if(!prevent_warning && !istype(W, /obj/item/weapon/gun/energy/crossbow))
if(!prevent_warning && !istype(W, /obj/item/weapon/gun/projectile/automatic/crossbow))
for(var/mob/M in viewers(usr, null))
if(M == usr)
usr << "<span class='notice'>You put [W] [preposition]to [src].</span>"
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/storage/uplink_kits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
return

if("stealth")
new /obj/item/weapon/gun/energy/crossbow(src)
new /obj/item/weapon/gun/projectile/automatic/crossbow(src)
new /obj/item/weapon/pen/sleepy(src)
new /obj/item/device/chameleon(src)
return
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/verbs/debug.dm
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ var/global/list/g_fancy_list_of_types = null
qdel(briefcase_item)
for(var/i=3, i>0, i--)
sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000
sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/automatic/crossbow
sec_briefcase.contents += new /obj/item/weapon/gun/projectile/revolver/mateba
sec_briefcase.contents += new /obj/item/ammo_box/a357
sec_briefcase.contents += new /obj/item/weapon/c4
Expand Down
2 changes: 1 addition & 1 deletion code/modules/flufftext/Hallucination.dm
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ mob/living/carbon/proc/handle_hallucinations()
return

var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_box/a357,\
/obj/item/weapon/gun/energy/crossbow, /obj/item/weapon/melee/energy/sword/saber,\
/obj/item/weapon/gun/projectile/automatic/crossbow, /obj/item/weapon/melee/energy/sword/saber,\
/obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/box/emps,\
/obj/item/weapon/cartridge/syndicate, /obj/item/clothing/under/chameleon,\
/obj/item/clothing/shoes/syndigaloshes, /obj/item/weapon/card/id/syndicate,\
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/silicon/robot/robot_modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@
..()
modules += new /obj/item/device/flashlight(src)
modules += new /obj/item/weapon/melee/energy/sword/cyborg(src)
modules += new /obj/item/weapon/gun/energy/crossbow/cyborg(src)
modules += new /obj/item/weapon/gun/energy/printer(src)
modules += new /obj/item/weapon/gun/projectile/revolver/grenadelauncher/cyborg(src)
modules += new /obj/item/weapon/card/emag(src)
modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src)
modules += new /obj/item/weapon/crowbar(src)
emag = null
Expand Down
2 changes: 0 additions & 2 deletions code/modules/projectiles/ammunition.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
BB = new projectile_type(src)
return



//Boxes of ammo
/obj/item/ammo_box
name = "ammo box (null_reference_exception)"
Expand Down
14 changes: 11 additions & 3 deletions code/modules/projectiles/ammunition/ammo_casings.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@
caliber = "a762"
projectile_type = /obj/item/projectile/bullet

/obj/item/ammo_casing/a545
desc = "A 5.45mm bullet casing."
caliber = "a545"
/obj/item/ammo_casing/a556
desc = "A 5.56mm bullet casing."
caliber = "a556"
projectile_type = /obj/item/projectile/bullet/heavybullet

/obj/item/ammo_casing/caseless
Expand All @@ -164,3 +164,11 @@
caliber = "40mm"
icon_state = "40mmHE"
projectile_type = /obj/item/projectile/bullet/a40mm

/obj/item/ammo_casing/caseless/bolt //xbow
name = "poison crossbow bolt"
desc = "A reusable crossbow bolt tipped with specialized carpotoxin."
projectile_type = /obj/item/projectile/energy/bolt
caliber = "crossbow"
icon = 'icons/obj/projectiles.dmi'
icon_state = "cbbolt"
8 changes: 7 additions & 1 deletion code/modules/projectiles/ammunition/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@
icon_state = "40mm"
ammo_type = /obj/item/ammo_casing/a40mm
max_ammo = 4
multiple_sprites = 1
multiple_sprites = 1

/obj/item/ammo_box/crossbow
name = "ammo box (crossbow bolts)"
icon_state = "xbow"
ammo_type = /obj/item/ammo_casing/caseless/bolt
max_ammo = 4
14 changes: 3 additions & 11 deletions code/modules/projectiles/ammunition/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@
projectile_type = /obj/item/projectile/lasertag/redtag
select_name = "redtag"

/obj/item/ammo_casing/energy/bolt
projectile_type = /obj/item/projectile/energy/bolt
select_name = "bolt"
fire_sound = 'sound/weapons/Genhit.ogg'

/obj/item/ammo_casing/energy/bolt/large
projectile_type = /obj/item/projectile/energy/bolt/large
select_name = "heavy bolt"

/obj/item/ammo_casing/energy/xray
projectile_type = /obj/item/projectile/beam/xray
e_cost = 50
Expand All @@ -64,9 +55,11 @@
projectile_type = /obj/item/projectile/energy/electrode
select_name = "stun"
fire_sound = 'sound/weapons/taser.ogg'
e_cost = 200

/obj/item/ammo_casing/energy/electrode/gun
fire_sound = 'sound/weapons/gunshot.ogg'
e_cost = 100

/obj/item/ammo_casing/energy/ion
projectile_type = /obj/item/projectile/ion
Expand Down Expand Up @@ -131,5 +124,4 @@

/obj/item/ammo_casing/energy/wormhole/orange
projectile_type = /obj/item/projectile/beam/wormhole/orange
select_name = "orange"

select_name = "orange"
24 changes: 15 additions & 9 deletions code/modules/projectiles/ammunition/magazines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@
ammo_type = /obj/item/ammo_casing/a40mm
max_ammo = 6

/obj/item/ammo_box/magazine/internal/cylinder/crossbow
name = "autocrossbow internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/bolt
caliber = "crossbow"
max_ammo = 10

/obj/item/ammo_box/magazine/internal/cylinder/crossbow/large
max_ammo = 15

///////////EXTERNAL MAGAZINES////////////////

/obj/item/ammo_box/magazine/m10mm
Expand Down Expand Up @@ -159,17 +168,14 @@ obj/item/ammo_box/magazine/tommygunm45
multiple_sprites = 2
max_ammo = 8

/obj/item/ammo_box/magazine/m545
name = "box magazine (5.45mm)"
icon_state = "5.45m"
/obj/item/ammo_box/magazine/m556
name = "toploader magazine (5.56mm)"
icon_state = "5.56m"
origin_tech = "combat=5;syndicate=1"
ammo_type = /obj/item/ammo_casing/a545
caliber = "a545"
ammo_type = /obj/item/ammo_casing/a556
caliber = "a556"
max_ammo = 30

/obj/item/ammo_box/magazine/m545/update_icon()
..()
icon_state = "[initial(icon_state)]-[round(ammo_count(),10)]"
multiple_sprites = 2

/obj/item/ammo_box/magazine/m762
name = "box magazine (7.62mm)"
Expand Down
8 changes: 7 additions & 1 deletion code/modules/projectiles/ammunition/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,10 @@
/obj/item/ammo_casing/syringegun
name = "syringe gun spring"
desc = "A high-power spring that throws syringes."
projectile_type = null
projectile_type = null

/obj/item/ammo_casing/energy/c3dbullet
projectile_type = /obj/item/projectile/bullet/midbullet3
select_name = "spraydown"
fire_sound = 'sound/weapons/gunshot_smg.ogg'
e_cost = 20
Loading

0 comments on commit 56bad0f

Please sign in to comment.