diff --git a/code/modules/projectiles/guns/energy/charge.dm b/code/modules/projectiles/guns/energy/charge.dm index 219d8ace79f..af683fc5e83 100644 --- a/code/modules/projectiles/guns/energy/charge.dm +++ b/code/modules/projectiles/guns/energy/charge.dm @@ -36,7 +36,7 @@ var/mag_insert_sound = 'sound/effects/weapons/gun/assaultrifle_magin.ogg' var/mag_eject_sound = 'sound/effects/weapons/gun/assaultrifle_magout.ogg' - var/charge_cost = 15 + var/charge_cost = 16 var/charge_multiplier = 1.0 var/modifystate = "charge_rifle" var/barrel_overlay = "" @@ -109,10 +109,10 @@ ..() ClearOverlays() if(!power_supply) - icon_state = "[modifystate]-empty" + icon_state = "[base_icon_state]-empty" return - icon_state = modifystate + icon_state = base_icon_state if(round(power_supply.charge / (charge_cost * charge_multiplier)) == 0) AddOverlays("[modifystate]-noammo") @@ -121,15 +121,17 @@ else AddOverlays("[modifystate]-burst") + AddOverlays("[modifystate]-[power_supply.barrel_overlay]") var/ratio = (power_supply.charge >= (charge_cost * charge_multiplier)) ? max(round(CELL_PERCENT(power_supply), 25), 25) : 0 - AddOverlays("[modifystate]-[power_supply.barrel_overlay][ratio]") + if(ratio < 100) + AddOverlays("[modifystate]-[ratio]") /obj/item/gun/charge/proc/update_barrel_overlay(opening) if(opening) CutOverlays(barrel_overlay, ATOM_ICON_CACHE_PROTECTED) CutOverlays("[modifystate]_closing", ATOM_ICON_CACHE_PROTECTED) - barrel_overlay = "[modifystate]-[power_supply.barrel_overlay]" + barrel_overlay = "[modifystate]_barrel-[power_supply.barrel_overlay]" AddOverlays(barrel_overlay, ATOM_ICON_CACHE_PROTECTED) AddOverlays("[modifystate]_opening", ATOM_ICON_CACHE_PROTECTED) ImmediateOverlayUpdate() @@ -228,6 +230,45 @@ update_cell() return +/obj/item/gun/charge/advanced + name = "advanced charge carbine" + desc = "C-13S Charge Carbine, an improved modification of NanoTrasen's C-13. Compared to the basic version, this one has ergonomic grips and a high-contrast sight, while its internal autolathe uses more expensive materials." + + icon_state = "adv_charge_rifle-preview" + item_state = "charge_rifle" + base_icon_state = "adv_charge_rifle" + modifystate = "charge_rifle" + + one_hand_penalty = 2.5 + accuracy = 3.0 + +/obj/item/gun/charge/pistol + name = "charge pistol" + desc = "P-7 Charge Pistol, NanoTrasen's standard issue handgun. Even though it's rather cheap and somewhat unwieldy, it can use a wide range of energy-based ammunition because of its internal miniature autolathe that effectively reassembles the gun on the run." + + icon_state = "charge_pistol-preview" + item_state = "charge_pistol" + wielded_item_state = null + base_icon_state = "charge_pistol" + modifystate = "charge_pistol" + improper_held_icon = FALSE + + w_class = ITEM_SIZE_NORMAL + slot_flags = SLOT_BELT|SLOT_HOLSTER + + force = 8.5 + mod_weight = 0.7 + mod_reach = 0.5 + mod_handy = 1.0 + + one_hand_penalty = 0 + accuracy = -0.35 + + charge_multiplier = 1.25 + +/obj/item/gun/charge/pistol/switch_firemodes() + return null + /obj/item/cell/ammo/charge name = "charge magazine" @@ -235,7 +276,7 @@ icon = 'icons/obj/ammo.dmi' item_state = "cell" icon_state = "charge" - maxcharge = 150 + maxcharge = 160 overlay_key = "charge_over" w_class = ITEM_SIZE_SMALL @@ -243,8 +284,8 @@ var/fire_sound var/barrel_overlay = "" var/firemodes = list( - list(mode_name = "semiauto", fire_delay = 1, charge_cost = 15, burst = 1, projectile_type = null), - list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 15, burst = 2, projectile_type = null) + list(mode_name = "semiauto", fire_delay = 1, charge_cost = 16, burst = 1, projectile_type = null), + list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 16, burst = 2, projectile_type = null) ) /obj/item/cell/ammo/charge/on_update_icon() @@ -264,8 +305,8 @@ fire_sound = 'sound/effects/weapons/energy/Taser.ogg' barrel_overlay = "stun" firemodes = list( - list(mode_name = "semiauto", fire_delay = 1, charge_cost = 15, burst = 1, projectile_type = /obj/item/projectile/energy/electrode/lesser), - list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 15, burst = 2, projectile_type = /obj/item/projectile/energy/electrode/lesser) + list(mode_name = "semiauto", fire_delay = 1, charge_cost = 16, burst = 1, projectile_type = /obj/item/projectile/energy/electrode/lesser), + list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 16, burst = 2, projectile_type = /obj/item/projectile/energy/electrode/lesser) ) /obj/item/cell/ammo/charge/blaster @@ -277,21 +318,8 @@ fire_sound = 'sound/effects/weapons/energy/fire14.ogg' barrel_overlay = "blaster" firemodes = list( - list(mode_name = "semiauto", fire_delay = 1, charge_cost = 15, burst = 1, projectile_type = /obj/item/projectile/energy/laser/lesser), - list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 15, burst = 2, projectile_type = /obj/item/projectile/energy/laser/lesser) - ) - -/obj/item/cell/ammo/charge/kinetic - name = "charge magazine (kinetic)" - desc = "A power cell designed to be used as a magazine for charge-based weapons. This one allows the weapon to synthesize \"soft\" chunks of unstable particles and accelerate them, shooting bullets with high stopping power and lowered penetration." - icon_state = "charge_kinetic" - - tier = 1 - fire_sound = 'sound/effects/weapons/gun/fire_generic_smg.ogg' - barrel_overlay = "kinetic" - firemodes = list( - list(mode_name = "semiauto", fire_delay = 1, charge_cost = 15, burst = 1, projectile_type = /obj/item/projectile/bullet/charge/kinetic), - list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 15, burst = 2, projectile_type = /obj/item/projectile/bullet/charge/kinetic) + list(mode_name = "semiauto", fire_delay = 1, charge_cost = 16, burst = 1, projectile_type = /obj/item/projectile/energy/laser/lesser), + list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 16, burst = 2, projectile_type = /obj/item/projectile/energy/laser/lesser) ) /obj/item/cell/ammo/charge/accelerator @@ -303,8 +331,21 @@ fire_sound = 'sound/effects/weapons/gun/gunshot3.ogg' barrel_overlay = "phazer" firemodes = list( - list(mode_name = "semiauto", fire_delay = 1, charge_cost = 15, burst = 1, projectile_type = /obj/item/projectile/bullet/charge), - list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 15, burst = 2, projectile_type = /obj/item/projectile/bullet/charge) + list(mode_name = "semiauto", fire_delay = 1, charge_cost = 16, burst = 1, projectile_type = /obj/item/projectile/bullet/charge), + list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 16, burst = 2, projectile_type = /obj/item/projectile/bullet/charge) + ) + +/obj/item/cell/ammo/charge/kinetic + name = "charge magazine (kinetic)" + desc = "A power cell designed to be used as a magazine for charge-based weapons. This one allows the weapon to synthesize \"soft\" chunks of unstable particles and accelerate them, shooting bullets with high stopping power and lowered penetration." + icon_state = "charge_kinetic" + + tier = 1 + fire_sound = 'sound/effects/weapons/gun/fire_generic_smg.ogg' + barrel_overlay = "kinetic" + firemodes = list( + list(mode_name = "semiauto", fire_delay = 1, charge_cost = 16, burst = 1, projectile_type = /obj/item/projectile/bullet/charge/kinetic), + list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 16, burst = 2, projectile_type = /obj/item/projectile/bullet/charge/kinetic) ) /obj/item/cell/ammo/charge/accelerator_adv @@ -316,8 +357,8 @@ fire_sound = 'sound/effects/weapons/gun/gunshot3.ogg' barrel_overlay = "phazer" firemodes = list( - list(mode_name = "semiauto", fire_delay = 1, charge_cost = 15, burst = 1, projectile_type = /obj/item/projectile/bullet/charge), - list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 15, burst = 2, projectile_type = /obj/item/projectile/bullet/charge) + list(mode_name = "semiauto", fire_delay = 1, charge_cost = 16, burst = 1, projectile_type = /obj/item/projectile/bullet/charge), + list(mode_name = "2-round bursts", fire_delay = 1, charge_cost = 16, burst = 2, projectile_type = /obj/item/projectile/bullet/charge) ) #undef BARREL_TIMER diff --git a/icons/mob/onmob/items/lefthand_guns.dmi b/icons/mob/onmob/items/lefthand_guns.dmi index e702ca7c5b7..decfa1e7ded 100644 Binary files a/icons/mob/onmob/items/lefthand_guns.dmi and b/icons/mob/onmob/items/lefthand_guns.dmi differ diff --git a/icons/mob/onmob/items/righthand_guns.dmi b/icons/mob/onmob/items/righthand_guns.dmi index e865562756c..1732d6b3034 100644 Binary files a/icons/mob/onmob/items/righthand_guns.dmi and b/icons/mob/onmob/items/righthand_guns.dmi differ diff --git a/icons/obj/guns/charge.dmi b/icons/obj/guns/charge.dmi index c2bad329937..6244c758b2b 100644 Binary files a/icons/obj/guns/charge.dmi and b/icons/obj/guns/charge.dmi differ