diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 793ee1b7462f6..a432ab6f9d2bd 100755 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -39,7 +39,10 @@ . += "- Recharging [recharge_coeff*10]% cell charge per cycle." if(charging) var/obj/item/stock_parts/cell/C = charging.get_cell() - if(C) + if (istype(charging, /obj/item/ammo_box/magazine/recharge)) + var/obj/item/ammo_box/magazine/recharge/magazine = charging + . += "- \The [charging]'s cell is at [magazine.ammo_count() / magazine.max_ammo]%." + else if(C) . += "- \The [charging]'s cell is at [C.percent()]%." else . += "- \The [charging] has no power cell installed." @@ -85,6 +88,14 @@ var/obj/item/gun/energy/E = G if(!E.can_charge) to_chat(user, "Your gun has no external power connector.") + balloon_alert(user, "This gun cannot be charged.") + return 1 + + if (istype(G, /obj/item/gun/ballistic)) + var/obj/item/gun/ballistic/gun = G + if (ispath(gun.mag_type, /obj/item/ammo_box/magazine/recharge)) + to_chat(user, "You need to charge the magazine of this gun!") + balloon_alert(user, "Remove the magazine first!") return 1 if(!user.transferItemToLoc(G, src)) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index c7e8806fa2614..7b201d797bffe 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -38,7 +38,7 @@ new /obj/item/assembly/flash/handheld(src) new /obj/item/storage/box/suitbox/ce_tools(src) new /obj/item/clothing/glasses/meson/engine(src) - new /obj/item/gun/energy/e_gun/mini/heads(src) + new /obj/item/gun/ballistic/automatic/pistol/service/ce(src) /obj/item/storage/box/suitbox/ce_tools name = "compression box of chief engineer tools" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index 6c4870b10d64c..30e33594bb52e 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -116,7 +116,7 @@ new /obj/item/assembly/flash/handheld(src) new /obj/item/healthanalyzer/advanced(src) new /obj/item/wallframe/defib_mount(src) - new /obj/item/gun/energy/e_gun/mini/heads(src) + new /obj/item/gun/ballistic/automatic/pistol/service/cmo(src) /obj/item/storage/box/suitbox/cmo name = "compression box of chief medical officer outfits" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm index 62f73f474ac5b..3c795568d0e42 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm @@ -38,7 +38,7 @@ new /obj/item/clothing/glasses/science(src) new /obj/item/door_remote/research_director(src) new /obj/item/assembly/flash/handheld(src) - new /obj/item/gun/energy/e_gun/mini/heads(src) + new /obj/item/gun/ballistic/automatic/pistol/service/rd(src) /obj/item/storage/box/suitbox/rd name = "compression box of research director outfits" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index b6be1d6aabeae..7994357c3e064 100755 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -40,7 +40,7 @@ new /obj/item/clothing/neck/cloak/cap(src) new /obj/item/door_remote/captain(src) new /obj/item/storage/belt/sabre(src) - new /obj/item/gun/energy/e_gun/mini/heads(src) + new /obj/item/gun/ballistic/automatic/pistol/service/captain(src) /obj/item/storage/box/suitbox/cap name = "compression box of captain outfits" @@ -90,7 +90,7 @@ new /obj/item/clothing/glasses/sunglasses/advanced(src) new /obj/item/clothing/suit/armor/vest/alt(src) new /obj/item/megaphone/command(src) - new /obj/item/gun/energy/e_gun/mini/heads(src) + new /obj/item/gun/ballistic/automatic/pistol/service/hop(src) /obj/item/storage/box/suitbox/hop @@ -167,6 +167,7 @@ new /obj/item/clothing/suit/armor/hos/trenchcoat(src) new /obj/item/shield/riot/tele(src) new /obj/item/storage/belt/security/full(src) + new /obj/item/gun/ballistic/automatic/pistol/service/hos(src) /obj/item/storage/box/suitbox/hos name = "compression box of head of security outfits" diff --git a/code/modules/jobs/job_types/head_of_security.dm b/code/modules/jobs/job_types/head_of_security.dm index e43692c90534b..9776bb8c450b2 100644 --- a/code/modules/jobs/job_types/head_of_security.dm +++ b/code/modules/jobs/job_types/head_of_security.dm @@ -56,7 +56,7 @@ gloves = /obj/item/clothing/gloves/color/black head = /obj/item/clothing/head/hats/hos/beret glasses = /obj/item/clothing/glasses/hud/security/sunglasses - suit_store = /obj/item/gun/energy/e_gun/mini/heads + suit_store = /obj/item/gun/energy/disabler r_pocket = /obj/item/modular_computer/tablet/pda/heads/head_of_security backpack = /obj/item/storage/backpack/security diff --git a/code/modules/projectiles/ammunition/caseless/misc.dm b/code/modules/projectiles/ammunition/caseless/misc.dm index ec09691fece68..20e411ec9ed88 100644 --- a/code/modules/projectiles/ammunition/caseless/misc.dm +++ b/code/modules/projectiles/ammunition/caseless/misc.dm @@ -7,7 +7,13 @@ fire_sound = 'sound/weapons/laser.ogg' firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy +/obj/item/ammo_casing/caseless/laser/bounce_away(still_warm, bounce_delay) + qdel(src) + /obj/item/ammo_casing/caseless/laser/gatling projectile_type = /obj/projectile/beam/weak/penetrator variance = 0.8 click_cooldown_override = 1 + +/obj/item/ammo_casing/caseless/laser/lesslethal + projectile_type = /obj/projectile/beam/laser/lesslethal diff --git a/code/modules/projectiles/boxes_magazines/external/rechargable.dm b/code/modules/projectiles/boxes_magazines/external/rechargable.dm index 7ed0cde50a7bc..9bf883faa4955 100644 --- a/code/modules/projectiles/boxes_magazines/external/rechargable.dm +++ b/code/modules/projectiles/boxes_magazines/external/rechargable.dm @@ -12,3 +12,36 @@ /obj/item/ammo_box/magazine/recharge/attack_self() //No popping out the "bullets" return + +/obj/item/ammo_box/magazine/recharge/emp_act(severity) + . = ..() + if (obj_flags & OBJ_EMPED) + return + obj_flags |= OBJ_EMPED + playsound(src, 'sound/machines/capacitor_discharge.ogg', 60, TRUE) + addtimer(CALLBACK(src, PROC_REF(emp_reset)), rand(1, 200 / severity)) + // Unload the gun we are inside + if (isgun(loc)) + var/obj/item/gun/gun = loc + QDEL_NULL(gun.chambered) + +/obj/item/ammo_box/magazine/recharge/proc/emp_reset() + obj_flags &= ~OBJ_EMPED + playsound(src, 'sound/machines/capacitor_charge.ogg', 100, TRUE) + +/obj/item/ammo_box/magazine/recharge/get_round(keep = FALSE) + if (obj_flags & OBJ_EMPED) + return null + return ..() + +/obj/item/ammo_box/magazine/recharge/service + name = "energy pistol magazine" + desc = "A rechargeable energy pack used by service pistols." + icon_state = "officer-10" + max_ammo = 10 + multiple_sprites = 1 + ammo_type = /obj/item/ammo_casing/caseless/laser/lesslethal + +/obj/item/ammo_box/magazine/recharge/service/update_icon() + ..() + icon_state = "officer-[round(ammo_count(),2)]" diff --git a/code/modules/projectiles/guns/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm index 39a23bedd4240..31ef884c8478d 100644 --- a/code/modules/projectiles/guns/ballistic/pistol.dm +++ b/code/modules/projectiles/guns/ballistic/pistol.dm @@ -115,3 +115,48 @@ to_chat(user, "..and falls into view. Whew, that was a close one.") user.dropItemToGround(src) + +// ================================== +// Officer's Pistol +// ================================== + +/obj/item/gun/ballistic/automatic/pistol/service + name = "service pistol" + desc = "A commemorative pistol given to Nanotrasen officers designed to use higher densities of energy to emulate the ballistic service pistols that they replaced. \ + It primarilly serves as a symbol of power, but has proven to be an effective tool at enforcing the power that is portrays. \ + It fires less-lethal rounds which stun the area of the body that they burn." + icon_state = "officer" + w_class = WEIGHT_CLASS_NORMAL + mag_type = /obj/item/ammo_box/magazine/recharge/service + can_suppress = FALSE + fire_sound = 'sound/weapons/laser.ogg' + casing_ejector = FALSE + fire_rate = 4 + can_suppress = FALSE + worn_icon_state = "officer_pistol" + var/stripe_state = "officer_com" + +/obj/item/gun/ballistic/automatic/pistol/service/update_icon() + . = ..() + var/mutable_appearance/stripe = mutable_appearance(icon, stripe_state) + if (bolt_locked) + stripe.pixel_x = -5 + add_overlay(stripe) + +/obj/item/gun/ballistic/automatic/pistol/service/captain + stripe_state = "officer_com" + +/obj/item/gun/ballistic/automatic/pistol/service/hop + stripe_state = "officer_srv" + +/obj/item/gun/ballistic/automatic/pistol/service/hos + stripe_state = "officer_sec" + +/obj/item/gun/ballistic/automatic/pistol/service/ce + stripe_state = "officer_eng" + +/obj/item/gun/ballistic/automatic/pistol/service/rd + stripe_state = "officer_sci" + +/obj/item/gun/ballistic/automatic/pistol/service/cmo + stripe_state = "officer_med" diff --git a/code/modules/projectiles/guns/energy/energy_gun.dm b/code/modules/projectiles/guns/energy/energy_gun.dm index 786eefeac8095..2e82919cbcfbe 100644 --- a/code/modules/projectiles/guns/energy/energy_gun.dm +++ b/code/modules/projectiles/guns/energy/energy_gun.dm @@ -39,19 +39,6 @@ overlay_x = 19, \ overlay_y = 13) -/obj/item/gun/energy/e_gun/mini/heads - name = "Personal Tiny Self Defense Gun" - desc = "The PTSD gun has a built-in flashlight and the ability to recharge itself in two minutes. PTSD is standard issue for leadership within Nanotrasen. It has two settings: disable and kill." - ammo_type = list(/obj/item/ammo_casing/energy/disabler/hos, /obj/item/ammo_casing/energy/laser) ///uses the hos disabler rounds to slightly weaken the disabler count and also to avoid encountering a visual bug where the gun is out of charge but displays that it has one enough for another shot. - selfcharge = 1 - charge_delay = 20 - can_charge = FALSE ///Not compatible with fast charging stations, must recharge slowly. - icon_state = "personal" - item_state = "gun" - ammo_x_offset = 2 - charge_sections = 2 - single_shot_type_overlay = FALSE - /obj/item/gun/energy/e_gun/stun name = "tactical energy gun" desc = "Military issue energy gun, is able to fire stun rounds." diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 2ea184dfadd48..b87a49f7991dd 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -39,6 +39,11 @@ else if(isturf(target)) impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser/wall +/obj/projectile/beam/laser/lesslethal + damage = 10 + stamina = 18 + icon_state = "minilaser" + /obj/projectile/beam/weak damage = 12 diff --git a/icons/mob/clothing/belt.dmi b/icons/mob/clothing/belt.dmi index c13c65bb55cdf..e9604b401a828 100644 Binary files a/icons/mob/clothing/belt.dmi and b/icons/mob/clothing/belt.dmi differ diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index 432f0c748ec0d..a9ace1d796c0b 100644 Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ diff --git a/icons/obj/guns/energy.dmi b/icons/obj/guns/energy.dmi index 0adb326799e2a..cdcb8e1e6df5a 100644 Binary files a/icons/obj/guns/energy.dmi and b/icons/obj/guns/energy.dmi differ diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi index b291db055c324..030339c1c45e9 100644 Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 329d7e37f2430..7da9814331871 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ