diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 1c9e9e686b6..462907f4692 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -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/zak + name = "ZAK-74u Carbine" + desc = "A fully-loaded Zashchita Industriya carbine that uses 30-round 5.45x39mm magazines with a togglable underslung 40mm grenade launcher." + item = /obj/item/weapon/gun/projectile/automatic/zak74 cost = 18 gamemodes = list(/datum/game_mode/nuclear) surplus = 50 @@ -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 @@ -226,11 +225,18 @@ 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." @@ -238,7 +244,7 @@ var/list/uplink_items = list() 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 @@ -265,9 +271,9 @@ 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." +/datum/uplink_item/ammo/zak + name = "Bakelite Magazine - 5.45x39mm" + desc = "An additional 30-round 5.45x39mm magazine for use in the ZAK-74u 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/m545 cost = 2 gamemodes = list(/datum/game_mode/nuclear) diff --git a/code/game/gamemodes/changeling/powers/epinephrine.dm b/code/game/gamemodes/changeling/powers/epinephrine.dm index 973f01f9b54..107bf5a96f8 100644 --- a/code/game/gamemodes/changeling/powers/epinephrine.dm +++ b/code/game/gamemodes/changeling/powers/epinephrine.dm @@ -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 << "We arise." @@ -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 diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm index b953d45005d..9223fadb234 100644 --- a/code/game/gamemodes/wizard/rightandwrong.dm +++ b/code/game/gamemodes/wizard/rightandwrong.dm @@ -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/zak74(get_turf(H)) else switch (randomizemagic) if("fireball") diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 4cffd8b367f..f5d5cb45437 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -22,7 +22,7 @@ user << "[src] blinks red as you try to insert [G]." 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) || istype(G, /obj/item/weapon/gun/projectile/automatic/crossbow)) user << "Your gun's recharge port was removed to make room for a miniaturized reactor." return user.drop_item() diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index f1084796a6b..531f9fecfd2 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -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 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 378e96ba819..7e4c816fc2c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -45,6 +45,8 @@ var/suittoggled = 0 var/hooded = 0 + 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' diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index af34671bef5..cd048e95adb 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -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 @@ -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() diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 1f73247bd5e..0858856ab77 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -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 << "You put [W] [preposition]to [src]." diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 7ce4e7b6e37..95318319f48 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -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 diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 4cd85f4a3c1..c6a4b3bc2d1 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -795,7 +795,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 diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 652416808d3..521b6595861 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -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,\ diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 77be370abf8..d2e94e0a790 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -248,7 +248,6 @@ ..() 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/card/emag(src) modules += new /obj/item/weapon/gun/energy/laser/cyborg(src) modules += new /obj/item/weapon/tank/jetpack/carbondioxide(src) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 0f85597e0ec..608522f5e19 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -34,8 +34,6 @@ BB = new projectile_type(src) return - - //Boxes of ammo /obj/item/ammo_box name = "ammo box (null_reference_exception)" diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index 4cf1351fbf1..7c6d5c7b07d 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -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" \ No newline at end of file diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index 8f05c92eaa4..f9d940c3bfb 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -38,4 +38,10 @@ icon_state = "40mm" ammo_type = /obj/item/ammo_casing/a40mm max_ammo = 4 - multiple_sprites = 1 \ No newline at end of file + 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 \ No newline at end of file diff --git a/code/modules/projectiles/ammunition/energy.dm b/code/modules/projectiles/ammunition/energy.dm index e2473a521f8..83a01448885 100644 --- a/code/modules/projectiles/ammunition/energy.dm +++ b/code/modules/projectiles/ammunition/energy.dm @@ -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 @@ -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 diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index f9d3c7410a0..4a12e40955d 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -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 @@ -160,16 +169,13 @@ obj/item/ammo_box/magazine/tommygunm45 max_ammo = 8 /obj/item/ammo_box/magazine/m545 - name = "box magazine (5.45mm)" + name = "bakelite magazine (5.45mm)" icon_state = "5.45m" origin_tech = "combat=5;syndicate=1" ammo_type = /obj/item/ammo_casing/a545 caliber = "a545" 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)" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 5129c8f259f..f2489779cbf 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -30,6 +30,8 @@ var/sawn_state = SAWN_INTACT var/burst_size = 1 var/fire_delay = 0 + var/obj/item/device/flashlight/F = null + var/can_flashlight = 0 /obj/item/weapon/gun/proc/process_chamber() return 0 @@ -145,4 +147,68 @@ if(user.a_intent == "harm") //Flogging ..() else - return \ No newline at end of file + return + +/obj/item/weapon/gun/attackby(var/obj/item/A as obj, mob/user as mob) + if(istype(A, /obj/item/device/flashlight/seclite)) + var/obj/item/device/flashlight/seclite/S = A + if(can_flashlight) + if(!F) + if(user.l_hand != src && user.r_hand != src) + user << "You'll need [src] in your hands to do that." + return + user.drop_item() + user << "You click [S] into place on [src]." + if(S.on) + SetLuminosity(0) + F = S + A.loc = src + update_icon() + ..() + return + +/obj/item/weapon/gun/verb/toggle_gunlight() + set name = "Toggle Gunlight" + set category = "Object" + set desc = "Click to toggle your weapon's attached flashlight." + var/mob/living/carbon/human/user = usr + if(!isturf(user.loc)) + user << "You cannot turn the light on while in this [user.loc]." + F.on = !F.on + user << "You toggle the gunlight [F.on ? "on":"off"]." + + playsound(user, 'sound/weapons/empty.ogg', 100, 1) + update_gunlight(user) + return + +/obj/item/weapon/gun/proc/update_gunlight(var/mob/user = null) + if(F) + action_button_name = "Toggle Gunlight" + if(F.on) + if(loc == user) + user.AddLuminosity(F.brightness_on) + else if(isturf(loc)) + SetLuminosity(F.brightness_on) + else + if(loc == user) + user.AddLuminosity(-F.brightness_on) + else if(isturf(loc)) + SetLuminosity(0) + update_icon() + else + action_button_name = null + if(isturf(loc)) + SetLuminosity(0) + return + +/obj/item/weapon/gun/pickup(mob/user) + if(F) + if(F.on) + user.AddLuminosity(F.brightness_on) + SetLuminosity(0) + +/obj/item/weapon/gun/dropped(mob/user) + if(F) + if(F.on) + user.AddLuminosity(-F.brightness_on) + SetLuminosity(F.brightness_on) \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 4c407cd5a20..c1a6700caba 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -79,4 +79,13 @@ icon_state = "[initial(icon_state)][shot.mod_name][ratio]" if (2) icon_state = "[initial(icon_state)][shot.select_name][ratio]" - return \ No newline at end of file + overlays.Cut() + if(F) + if(F.on) + overlays += "flight-on" + else + overlays += "flight" + return + +/obj/item/weapon/gun/energy/ui_action_click() + toggle_gunlight() \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 0a4f961eb78..502ffe6671b 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -6,7 +6,7 @@ ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser) origin_tech = "combat=3;magnets=2" modifystate = 2 - + can_flashlight = 1 /obj/item/weapon/gun/energy/gun/attack_self(mob/living/user as mob) select_fire(user) @@ -21,6 +21,7 @@ var/charge_tick = 0 modifystate = 0 ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser) + can_flashlight = 0 /obj/item/weapon/gun/energy/gun/nuclear/New() ..() diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 4db3e4a9ffb..6a29ba4f0c4 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -134,7 +134,6 @@ icon_state = "disabler" item_state = null ammo_type = list(/obj/item/ammo_casing/energy/disabler) - cell_type = "/obj/item/weapon/stock_parts/cell" /obj/item/weapon/gun/energy/wormhole_projector diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 8f28a53effc..162ed932d2f 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -5,30 +5,28 @@ icon_state = "taser" item_state = null //so the human update icon uses the icon_state instead. ammo_type = list(/obj/item/ammo_casing/energy/electrode) - cell_type = "/obj/item/weapon/stock_parts/cell/crap" /obj/item/weapon/gun/energy/stunrevolver name = "stun revolver" - desc = "A high-tech revolver that fires internal, reusable stun cartidges in a revolving cylinder." + desc = "A high-tech revolver that fires internal, reusable stun cartidges in a revolving cylinder. Holds twice as much ammo as a standard taser." icon_state = "stunrevolver" origin_tech = "combat=3;materials=3;powerstorage=2" ammo_type = list(/obj/item/ammo_casing/energy/electrode/gun) - cell_type = "/obj/item/weapon/stock_parts/cell" + can_flashlight = 1 /obj/item/weapon/gun/energy/gun/advtaser - name = "advanced taser" + name = "hybrid taser" desc = "A hybrid taser designed to fire both short-range high-power electrodes and long-range disabler beams." icon_state = "advtaser" ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/disabler) - cell_type = "/obj/item/weapon/stock_parts/cell/crap" origin_tech = null /obj/item/weapon/gun/energy/gun/advtaser/cyborg - name = "advanced taser" - desc = "An integrated advanced taser that draws directly from a cyborg's power cell. The weapon contains a limiter to prevent the cyborg's power cell from overheating." - cell_type = "/obj/item/weapon/stock_parts/cell/secborg" + name = "hybrid taser" + desc = "An integrated taser that draws directly from a cyborg's power cell. The weapon contains a limiter to prevent the cyborg's power cell from overheating." var/charge_tick = 0 var/recharge_time = 10 + can_flashlight = 0 /obj/item/weapon/gun/energy/gun/advtaser/cyborg/New() ..() @@ -54,59 +52,3 @@ update_icon() return 1 - - -/obj/item/weapon/gun/energy/crossbow - name = "mini energy crossbow" - desc = "A weapon favored by syndicate stealth specialists." - icon_state = "crossbow" - item_state = "crossbow" - w_class = 2.0 - m_amt = 2000 - origin_tech = "combat=2;magnets=2;syndicate=5" - suppressed = 1 - ammo_type = list(/obj/item/ammo_casing/energy/bolt) - cell_type = "/obj/item/weapon/stock_parts/cell/crap" - var/charge_tick = 0 - - -/obj/item/weapon/gun/energy/crossbow/New() - ..() - processing_objects.Add(src) - - -/obj/item/weapon/gun/energy/crossbow/Destroy() - processing_objects.Remove(src) - ..() - - -/obj/item/weapon/gun/energy/crossbow/process() - charge_tick++ - if(charge_tick < 4) return 0 - charge_tick = 0 - if(!power_supply) return 0 - power_supply.give(100) - return 1 - - -/obj/item/weapon/gun/energy/crossbow/update_icon() - return - -/obj/item/weapon/gun/energy/crossbow/cyborg/newshot() - if(isrobot(src.loc)) - var/mob/living/silicon/robot/R = src.loc - if(R && R.cell) - var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot - if(R.cell.use(shot.e_cost)) - chambered = shot - chambered.newshot() - return - -/obj/item/weapon/gun/energy/crossbow/largecrossbow - name = "energy crossbow" - desc = "A weapon favored by syndicate carp hunters." - icon_state = "crossbowlarge" - w_class = 3.0 - force = 10 - m_amt = 4000 - suppressed = 0 \ No newline at end of file diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index b5f2c3033c1..44464b6a7cb 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -9,8 +9,8 @@ can_suppress = 1 burst_size = 3 fire_delay = 1 - var/select = 0 - action_button_name = "Toggle Fire Mode" + var/select = 1 + action_button_name = "Toggle Firemode" /obj/item/weapon/gun/projectile/automatic/update_icon() ..() @@ -23,28 +23,40 @@ return /obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob) - if(..() && chambered) - alarmed = 0 + if(istype(A, /obj/item/ammo_box/magazine)) + var/obj/item/ammo_box/magazine/AM = A + if(istype(AM, mag_type)) + if(magazine) + user << "You perform a tactical reload on \the [src], replacing the magazine." + magazine.loc = get_turf(src.loc) + magazine.update_icon() + magazine = null + else + user << "You insert the magazine into \the [src]." + user.remove_from_mob(AM) + magazine = AM + magazine.loc = src + chamber_round() + A.update_icon() + update_icon() + return 1 /obj/item/weapon/gun/projectile/automatic/ui_action_click() burst_select() -/obj/item/weapon/gun/projectile/automatic/verb/burst_select() - set name = "Toggle Fire Mode" - set category = "Object" - set desc = "Click to switch fire modes." +/obj/item/weapon/gun/projectile/automatic/proc/burst_select() var/mob/living/carbon/human/user = usr + select = !select if(select) - select = 0 burst_size = 1 fire_delay = 0 user << "You switch to semi-automatic." else - select = 1 burst_size = initial(burst_size) fire_delay = initial(fire_delay) user << "You switch to [burst_size]-rnd burst." + playsound(user, 'sound/weapons/empty.ogg', 100, 1) update_icon() return @@ -98,12 +110,8 @@ fire_sound = 'sound/weapons/Gunshot_smg.ogg' var/cover_open = 0 can_suppress = 0 - burst_size = 1 - fire_delay = 0 - -/obj/item/weapon/gun/projectile/automatic/l6_saw/burst_select() - return - + burst_size = 5 + fire_delay = 3 /obj/item/weapon/gun/projectile/automatic/l6_saw/attack_self(mob/user as mob) cover_open = !cover_open @@ -145,71 +153,70 @@ return ..() -/obj/item/weapon/gun/projectile/automatic/c90gl - name = "syndicate assault rifle" - desc = "A bullpup three-round burst 5.45x39 assault rifle with a unique toploading design, designated 'C-90gl'. Has an attached underbarrel grenade launcher which can be toggled on and off." - icon_state = "c90gl" - item_state = "c90gl" +/obj/item/weapon/gun/projectile/automatic/zak74 + name = "syndicate carbine" + desc = "A three-round burst 5.45x39 carbine, designated 'ZAK-74u'. Has an attached underbarrel grenade launcher which can be toggled on and off." + icon_state = "zak" + item_state = "l6closedmag" //placeholder origin_tech = "combat=5;materials=2;syndicate=8" mag_type = /obj/item/ammo_box/magazine/m545 fire_sound = 'sound/weapons/Gunshot_smg.ogg' - action_button_name = "Toggle Grenade Launcher" can_suppress = 0 var/obj/item/weapon/gun/projectile/revolver/grenadelauncher/underbarrel burst_size = 3 fire_delay = 2 -/obj/item/weapon/gun/projectile/automatic/c90gl/New() +/obj/item/weapon/gun/projectile/automatic/zak74/New() ..() underbarrel = new /obj/item/weapon/gun/projectile/revolver/grenadelauncher(src) update_icon() return -/obj/item/weapon/gun/projectile/automatic/c90gl/afterattack(var/atom/target, var/mob/living/user, flag, params) +/obj/item/weapon/gun/projectile/automatic/zak74/afterattack(var/atom/target, var/mob/living/user, flag, params) if(select == 2) underbarrel.afterattack(target, user, flag, params) else ..() - empty_alarm() return -/obj/item/weapon/gun/projectile/automatic/c90gl/attackby(var/obj/item/A, mob/user) - if(select == 2) - underbarrel.attackby(A, user) - else - ..() -/obj/item/weapon/gun/projectile/automatic/c90gl/attack_self(var/mob/living/user) - if(select == 2) - underbarrel.attack_self(user) + +/obj/item/weapon/gun/projectile/automatic/zak74/attackby(var/obj/item/A, mob/user) + if(istype(A, /obj/item/ammo_casing)) + if(istype(A, underbarrel.magazine.ammo_type)) + underbarrel.attack_self() + underbarrel.attackby(A, user) else ..() -/obj/item/weapon/gun/projectile/automatic/c90gl/update_icon() +/obj/item/weapon/gun/projectile/automatic/zak74/update_icon() ..() overlays.Cut() - if(!select) - overlays += "[initial(icon_state)]semi" - if(select == 1) - overlays += "[initial(icon_state)]burst" - if(select == 2) - overlays += "[initial(icon_state)]gren" - icon_state = "c90gl[magazine ? "-[Ceiling(get_ammo(0)/6)*6]" : ""][chambered ? "" : "-e"]" + switch(select) + if(0) + overlays += "[initial(icon_state)]semi" + if(1) + overlays += "[initial(icon_state)]burst" + if(2) + overlays += "[initial(icon_state)]gren" + icon_state = "[initial(icon_state)][magazine ? "" : "-e"]" return -/obj/item/weapon/gun/projectile/automatic/c90gl/burst_select() +/obj/item/weapon/gun/projectile/automatic/zak74/burst_select() var/mob/living/carbon/human/user = usr - if(!select) - select = 1 - burst_size = initial(burst_size) - fire_delay = initial(fire_delay) - user << "You switch to [burst_size]-rnd burst." - if(select == 1) - select = 2 - user << "You switch to grenades." - if(select == 2) - select = 0 - burst_size = 1 - fire_delay = 0 - user << "You switch to semi-auto." + switch(select) + if(0) + select = 1 + burst_size = initial(burst_size) + fire_delay = initial(fire_delay) + user << "You switch to [burst_size]-rnd burst." + if(1) + select = 2 + user << "You switch to grenades." + if(2) + select = 0 + burst_size = 1 + fire_delay = 0 + user << "You switch to semi-auto." + playsound(user, 'sound/weapons/empty.ogg', 100, 1) update_icon() return @@ -217,7 +224,7 @@ name = "tommy gun" desc = "A genuine 'Chicago Typewriter'." icon_state = "tommygun" - item_state = "tommygun" + item_state = "shotgun" slot_flags = 0 origin_tech = "combat=5;materials=1;syndicate=2" mag_type = /obj/item/ammo_box/magazine/tommygunm45 diff --git a/code/modules/projectiles/guns/projectile/launchers.dm b/code/modules/projectiles/guns/projectile/launchers.dm index 31773285919..9d3225e74d4 100644 --- a/code/modules/projectiles/guns/projectile/launchers.dm +++ b/code/modules/projectiles/guns/projectile/launchers.dm @@ -7,6 +7,7 @@ icon_state = "dshotgun-sawn" item_state = "gun" mag_type = /obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher + fire_sound = 'sound/weapons/grenadelaunch.ogg' w_class = 3 /obj/item/weapon/gun/projectile/revolver/grenadelauncher/attackby(var/obj/item/A, mob/user) @@ -25,11 +26,12 @@ name = "gyrojet pistol" desc = "A prototype pistol designed to fire self propelled rockets." icon_state = "gyropistol" - fire_sound = 'sound/effects/Explosion1.ogg' + fire_sound = 'sound/weapons/grenadelaunch.ogg' origin_tech = "combat=3" mag_type = /obj/item/ammo_box/magazine/m75 burst_size = 1 fire_delay = 0 + action_button_name = null /obj/item/weapon/gun/projectile/automatic/gyropistol/process_chamber(var/eject_casing = 0, var/empty_chamber = 1) ..() @@ -37,4 +39,46 @@ /obj/item/weapon/gun/projectile/automatic/gyropistol/update_icon() ..() icon_state = "[initial(icon_state)][magazine ? "loaded" : ""]" - return \ No newline at end of file + return + +/obj/item/weapon/gun/projectile/automatic/crossbow + name = "mini auto-crossbow" + desc = "A weapon favored by syndicate stealth specialists. Fires specialized poison bolts." + icon_state = "crossbow" + item_state = "crossbow" + w_class = 2 + m_amt = 2000 + origin_tech = "combat=2;magnets=2;syndicate=5" + suppressed = 1 + mag_type = /obj/item/ammo_box/magazine/internal/cylinder/crossbow + fire_sound = 'sound/weapons/genhit.ogg' + burst_size = 1 + fire_delay = 0 + select = 0 + action_button_name = null + +/obj/item/weapon/gun/projectile/automatic/crossbow/update_icon() + return + +/obj/item/weapon/gun/projectile/automatic/crossbow/attack_self() + return + +/obj/item/weapon/gun/projectile/automatic/crossbow/process_chamber(var/eject_casing = 0, var/empty_chamber = 1) + ..() + +/obj/item/weapon/gun/projectile/automatic/crossbow/attackby(var/obj/item/A, mob/user) + var/num_loaded = magazine.attackby(A, user, 1) + if(num_loaded) + user << "You load [num_loaded] bolt\s into \the [src]." + update_icon() + chamber_round() + +/obj/item/weapon/gun/projectile/automatic/crossbow/large //holds twice the ammo of mini crossbows but can't be pocketed + name = "auto crossbow" + desc = "A weapon favored by carp hunters. Fires specialized poison bolts." + icon_state = "crossbowlarge" + w_class = 3 + force = 10 + m_amt = 4000 + suppressed = 0 + mag_type = /obj/item/ammo_box/magazine/internal/cylinder/crossbow/large \ No newline at end of file diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index 4ed58eba2c9..11c7bc823d8 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -8,6 +8,7 @@ can_suppress = 1 burst_size = 1 fire_delay = 0 + action_button_name = null /obj/item/weapon/gun/projectile/automatic/pistol/update_icon() ..() diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index ba4ccfcd30f..cef3dcdd269 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -204,8 +204,9 @@ mag_type = /obj/item/ammo_box/magazine/m12g fire_sound = 'sound/weapons/Gunshot.ogg' can_suppress = 0 - burst_size = 2 - fire_delay = 1 + burst_size = 1 + fire_delay = 0 + /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/New() ..() update_icon() diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 6008adc5aee..64aefc4b49d 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -41,6 +41,7 @@ icon_state = "omnilaser" damage = 36 damage_type = STAMINA + flag = "energy" hitsound = 'sound/weapons/tap.ogg' eyeblur = 0 diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 8b9d357efe8..e70257da428 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -7,14 +7,15 @@ flag = "bullet" -/obj/item/projectile/bullet/weakbullet +/obj/item/projectile/bullet/weakbullet //beanbag, heavy stamina damage damage = 5 - stamina = 33 + stamina = 80 -/obj/item/projectile/bullet/weakbullet2 +/obj/item/projectile/bullet/weakbullet2 //detective revolver instastuns, but multiple shots are better for keeping punks down damage = 15 - stamina = 75 //the detective can't shoot in bursts and will get yelled at if he sinks 50 rounds into perps to stun 'em + weaken = 3 + stamina = 50 /obj/item/projectile/bullet/weakbullet3 damage = 20 @@ -28,7 +29,8 @@ /obj/item/projectile/bullet/midbullet damage = 20 - stamina = 50 //two round bursts from the c20r + stamina = 65 //two round bursts from the c20r knocks people down + /obj/item/projectile/bullet/midbullet2 damage = 25 @@ -40,10 +42,16 @@ damage = 35 -/obj/item/projectile/bullet/stunshot +/obj/item/projectile/bullet/stunshot //taser slugs for shotguns, nothing special name = "stunshot" damage = 5 - stamina = 50 //two round bursts from the bulldog + stun = 5 + weaken = 5 + stutter = 5 + jitter = 20 + range = 7 + icon_state = "spark" + color = "#FFFF00" /obj/item/projectile/bullet/incendiary/on_hit(var/atom/target, var/blocked = 0) ..() diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index f89f265115f..6ff5d42fc22 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -4,18 +4,18 @@ damage = 0 damage_type = BURN flag = "energy" - color = "#FFFF00" /obj/item/projectile/energy/electrode name = "electrode" icon_state = "spark" + color = "#FFFF00" nodamage = 1 stun = 5 weaken = 5 stutter = 5 jitter = 20 - hitsound = "sparks" + hitsound = 'sound/weapons/taserhit.ogg' range = 7 /obj/item/projectile/energy/electrode/on_hit(var/atom/target, var/blocked = 0) @@ -51,7 +51,7 @@ weaken = 5 range = 7 -/obj/item/projectile/energy/bolt //ebow bolts +/obj/item/projectile/energy/bolt //xbow bolts name = "bolt" icon_state = "cbbolt" damage = 15 @@ -59,8 +59,15 @@ nodamage = 0 weaken = 5 stutter = 5 - range = 10 + range = 7 -/obj/item/projectile/energy/bolt/large - name = "largebolt" - damage = 20 +/obj/item/projectile/energy/bolt/on_hit(var/atom/target, var/blocked = 0) //drop a bolt on hitting basically anything + if(!proj_hit) + proj_hit = 1 + new /obj/item/ammo_casing/caseless/bolt(src.loc) + ..() + +/obj/item/projectile/energy/bolt/on_range() //drop a bolt after 7 tiles + if(!proj_hit) + new /obj/item/ammo_casing/caseless/bolt(src.loc) + ..() \ No newline at end of file diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 65a0c7c1451..7b78b6ad120 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -28,7 +28,6 @@ icon_state= "bolter" damage = 60 flag = "bullet" - range = 7 /obj/item/projectile/bullet/a40mm/on_hit(atom/target, blocked = 0) explosion(target, -1, 0, 2, 1, 0, flame_range = 3) @@ -178,4 +177,4 @@ obj/item/projectile/kinetic/New() /obj/item/projectile/bullet/frag12 name ="explosive slug" damage = 25 - weaken = 5 + weaken = 5 diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index fa35c34bacf..fd90822a838 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -75,7 +75,7 @@ req_tech = list("combat" = 5, "materials" = 5, "engineering" = 3, "biotech" = 4, "syndicate" = 3) build_type = PROTOLATHE materials = list("$metal" = 5000, "$glass" = 1500, "$uranium" = 1500, "$silver" = 1500) - build_path = /obj/item/weapon/gun/energy/crossbow/largecrossbow + build_path = /obj/item/weapon/gun/projectile/automatic/crossbow/large locked = 1 category = list("Weapons") diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index df6f3a4ba10..0ca6029b4e5 100644 Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi index a5a60c35396..f7416b8597f 100644 Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ diff --git a/icons/obj/lighting.dmi b/icons/obj/lighting.dmi index 6f8513e7862..023f6de8438 100644 Binary files a/icons/obj/lighting.dmi and b/icons/obj/lighting.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 4efc2e40adf..4094a0ff640 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ diff --git a/sound/weapons/taserhit.ogg b/sound/weapons/taserhit.ogg new file mode 100644 index 00000000000..d3e15129400 Binary files /dev/null and b/sound/weapons/taserhit.ogg differ