Skip to content

Commit

Permalink
Tweaks energy weapons (part I?)
Browse files Browse the repository at this point in the history
Adjusts the fire delays, charge levels and recharge speeds of many energy weapons.

Adjusts the damage of several types of energy beams.

Renames the "burst laser" to the "burst energy gun". Also updates the cargo ordering console's entry to match.

Converts a few weapon-related booleans to use TRUE/FALSE.

Fixes formatting of some weapon fire modes.
  • Loading branch information
Frenjo committed Jul 23, 2023
1 parent 9a8d1bd commit 10e11ae
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 78 deletions.
8 changes: 4 additions & 4 deletions code/datums/supplypacks/munitions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Shotgun crate"
access = access_armory

/datum/supply_pack/munitions/shotgunsemi
name = "Weapons - Semi-Automatic Shotgun crate"
contains = list(
Expand All @@ -96,11 +96,11 @@
access = access_armory

/datum/supply_pack/munitions/burstlaser
name = "Weapons - Burst laser"
name = "Weapons - Burst Energy Gun"
contains = list(/obj/item/gun/energy/gun/burst = 2)
cost = 50
containertype = /obj/structure/closet/crate/secure/lawson
containername = "Burst laser crate"
containername = "Burst Energy Gun crate"
access = access_armory

/datum/supply_pack/munitions/ionweapons
Expand Down Expand Up @@ -248,4 +248,4 @@
cost = 50
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Energy ammunition crate"
access = access_security
access = access_security
52 changes: 26 additions & 26 deletions code/modules/projectiles/guns/energy/laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
icon_state = "laser"
item_state = "laser"
wielded_item_state = "laser-wielded"
fire_delay = 8
fire_delay = 0.8 SECONDS
slot_flags = SLOT_BELT|SLOT_BACK
w_class = ITEMSIZE_LARGE
force = 10
Expand All @@ -16,16 +16,16 @@
one_handed_penalty = 30

firemodes = list(
list(mode_name="normal", fire_delay=8, projectile_type=/obj/item/projectile/beam/midlaser, charge_cost = 240),
list(mode_name="suppressive", fire_delay=5, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60),
)
list(mode_name = "normal", projectile_type = /obj/item/projectile/beam/midlaser, charge_cost = 240),
list(mode_name = "suppressive", fire_delay = 0.6 SECONDS, projectile_type = /obj/item/projectile/beam/weaklaser, charge_cost = 60),
)

/obj/item/gun/energy/laser/empty
cell_type = null

/obj/item/gun/energy/laser/mounted
self_recharge = 1
use_external_power = 1
self_recharge = TRUE
use_external_power = TRUE
one_handed_penalty = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry.

/obj/item/gun/energy/laser/mounted/augment
Expand All @@ -49,9 +49,9 @@
cell_type = /obj/item/cell/device

firemodes = list(
list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 48),
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 12),
)
list(mode_name = "normal", projectile_type = /obj/item/projectile/beam/practice, charge_cost = 48),
list(mode_name = "suppressive", projectile_type = /obj/item/projectile/beam/practice, charge_cost = 12),
)

//Functionally identical, but slightly higher tech due to rarer.
/obj/item/gun/energy/laser/sleek
Expand All @@ -71,7 +71,7 @@
icon_state = "mininglaser"
item_state = "laser"
wielded_item_state = "laser-wielded"
fire_delay = 8
fire_delay = 0.8 SECONDS
slot_flags = SLOT_BELT|SLOT_BACK
w_class = ITEMSIZE_LARGE
force = 15
Expand All @@ -81,9 +81,9 @@
one_handed_penalty = 30

firemodes = list(
list(mode_name="mining", fire_delay=8, projectile_type=/obj/item/projectile/beam/mininglaser, charge_cost = 200),
list(mode_name="deter", fire_delay=5, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 80),
)
list(mode_name = "mining", projectile_type = /obj/item/projectile/beam/mininglaser, charge_cost = 200),
list(mode_name = "deter", fire_delay = 0.6 SECONDS, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 80),
)

/obj/item/gun/energy/retro
name = "retro laser"
Expand All @@ -93,11 +93,11 @@
slot_flags = SLOT_BELT
w_class = ITEMSIZE_NORMAL
projectile_type = /obj/item/projectile/beam
fire_delay = 10 //old technology
fire_delay = 1 SECOND //old technology

/obj/item/gun/energy/retro/mounted
self_recharge = 1
use_external_power = 1
self_recharge = TRUE
use_external_power = TRUE

/obj/item/gun/energy/retro/empty
icon_state = "retro"
Expand Down Expand Up @@ -138,7 +138,7 @@
catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_pistol)
icon_state = "alienpistol"
item_state = "alienpistol"
fire_delay = 10 // Handguns should be inferior to two-handed weapons. Even alien ones I suppose.
fire_delay = 1 SECOND // Handguns should be inferior to two-handed weapons. Even alien ones I suppose.
charge_cost = 480 // Five shots.

projectile_type = /obj/item/projectile/beam/cyan
Expand All @@ -160,7 +160,7 @@
w_class = ITEMSIZE_NORMAL
projectile_type = /obj/item/projectile/beam
origin_tech = null
fire_delay = 10 //Old pistol
fire_delay = 1 SECOND //Old pistol
charge_cost = 480 //to compensate a bit for self-recharging
cell_type = /obj/item/cell/device/weapon/recharge/captain
battery_lock = 1
Expand All @@ -176,22 +176,21 @@
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/beam/heavylaser/cannon
battery_lock = 1
fire_delay = 20
fire_delay = 2 SECONDS
w_class = ITEMSIZE_LARGE
one_handed_penalty = 90 // The thing's heavy and huge.
accuracy = 45
charge_cost = 600
recharge_time = 1 SECOND

/obj/item/gun/energy/lasercannon/mounted
name = "mounted laser cannon"
self_recharge = 1
use_external_power = 1
recharge_time = 10
self_recharge = TRUE
use_external_power = TRUE
accuracy = 0 // Mounted cannons are just fine the way they are.
one_handed_penalty = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry.
projectile_type = /obj/item/projectile/beam/heavylaser
charge_cost = 400
fire_delay = 20

/obj/item/gun/energy/xray
name = "xray laser gun"
Expand All @@ -202,6 +201,7 @@
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2)
projectile_type = /obj/item/projectile/beam/xray
charge_cost = 200
fire_delay = 0.8 SECONDS

/obj/item/gun/energy/sniperrifle
name = "marksman energy rifle"
Expand All @@ -218,11 +218,11 @@
action_button_name = "Use Scope"
battery_lock = 1
charge_cost = 600
fire_delay = 35
fire_delay = 3.5 SECONDS
force = 10
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
accuracy = -45 //shooting at the hip
scoped_accuracy = 50
scoped_accuracy = 75
one_handed_penalty = 60 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand.

/obj/item/gun/energy/sniperrifle/ui_action_click()
Expand All @@ -246,7 +246,7 @@
slot_flags = SLOT_BACK
action_button_name = "Aim Down Sights"
charge_cost = 1300
fire_delay = 20
fire_delay = 2 SECONDS
force = 8
w_class = ITEMSIZE_LARGE
accuracy = 10
Expand Down
53 changes: 32 additions & 21 deletions code/modules/projectiles/guns/energy/nuclear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
description_fluff = "Lawson Arms is Hephaestus Industries’ main personal-energy-weapon branding, often sold alongside MarsTech projectile weapons to security and law enforcement agencies."
icon_state = "energystun100"
item_state = null //so the human update icon uses the icon_state instead.
fire_delay = 10 // Handguns should be inferior to two-handed weapons.
fire_delay = 1 SECOND // Handguns should be inferior to two-handed weapons.

projectile_type = /obj/item/projectile/beam/stun/med
origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2)
Expand All @@ -13,24 +13,24 @@
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/med, modifystate="energystun", charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", charge_cost = 480),
)
)


/obj/item/gun/energy/gun/mounted
name = "mounted energy gun"
self_recharge = 1
use_external_power = 1
self_recharge = TRUE
use_external_power = TRUE

/obj/item/gun/energy/gun/burst
name = "burst laser"
name = "burst energy gun"
desc = "The Lawson Arms FM-2t is a versatile energy based weapon, capable of switching between stun or kill with a three round burst option for both settings."
description_fluff = "Lawson Arms is Hephaestus Industries’ main personal-energy-weapon branding, often sold alongside MarsTech projectile weapons to security and law enforcement agencies."
icon_state = "riflestun100"
item_state = null //so the human update icon uses the icon_state instead.
charge_cost = 100
force = 8
w_class = ITEMSIZE_LARGE //Probably gonna make it a rifle sooner or later
fire_delay = 6
fire_delay = 0.8 SECONDS

projectile_type = /obj/item/projectile/beam/stun/weak
origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 2, TECH_ILLEGAL = 3)
Expand All @@ -40,11 +40,22 @@
// one_handed_penalty = 30

firemodes = list(
list(mode_name="stun", burst=1, projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="riflestun", charge_cost = 100),
list(mode_name="stun burst", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,0,0), dispersion=list(0.0, 0.2, 0.5), projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="riflestun"),
list(mode_name="lethal", burst=1, projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="riflekill", charge_cost = 200),
list(mode_name="lethal burst", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,0,0), dispersion=list(0.0, 0.2, 0.5), projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="riflekill"),
)
list(mode_name = "stun", burst = 1, projectile_type = /obj/item/projectile/beam/stun/weak,
modifystate = "riflestun"
),
list(mode_name = "stun burst", burst = 3, fire_delay = 1 SECOND, move_delay = 4,
burst_accuracy = list(0,0,0), dispersion = list(0.0, 0.2, 0.5),
projectile_type = /obj/item/projectile/beam/stun/weak, modifystate = "riflestun"
),
list(mode_name = "lethal", burst = 1, projectile_type = /obj/item/projectile/beam/burstlaser,
modifystate = "riflekill", charge_cost = 200
),
list(mode_name = "lethal burst", burst = 3, fire_delay = 1 SECOND, move_delay = 4,
burst_accuracy = list(0,0,0), dispersion = list(0.0, 0.2, 0.5),
projectile_type = /obj/item/projectile/beam/burstlaser, modifystate = "riflekill",
charge_cost = 200
),
)

/obj/item/gun/energy/gun/nuclear
name = "advanced energy gun"
Expand All @@ -55,7 +66,7 @@
slot_flags = SLOT_BELT
force = 8 //looks heavier than a pistol
w_class = ITEMSIZE_LARGE //Looks bigger than a pistol, too.
fire_delay = 6 //This one's not a handgun, it should have the same fire delay as everything else
fire_delay = 0.8 SECONDS //This one's not a handgun, it should have the same fire delay as everything else
cell_type = /obj/item/cell/device/weapon/recharge
battery_lock = 1
modifystate = null
Expand All @@ -64,9 +75,9 @@
// one_handed_penalty = 15 // It's rather bulky, so holding it in one hand is a little harder than with two, however it's not 'required'.

firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, modifystate="nucgunstun", charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="nucgunkill", charge_cost = 480),
)
list(mode_name = "stun", projectile_type = /obj/item/projectile/beam/stun, modifystate = "nucgunstun", charge_cost = 240),
list(mode_name = "lethal", projectile_type = /obj/item/projectile/beam, modifystate = "nucgunkill", charge_cost = 480),
)

//Functionally a Perun, but flavoured.
/obj/item/gun/energy/gun/compact
Expand All @@ -80,9 +91,9 @@
modifystate = "PDWstun"

firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/med, modifystate="PDWstun", charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="PDWkill", charge_cost = 480),
)
list(mode_name = "stun", projectile_type = /obj/item/projectile/beam/stun/med, modifystate = "PDWstun", charge_cost = 240),
list(mode_name = "lethal", projectile_type = /obj/item/projectile/beam, modifystate = "PDWkill", charge_cost = 480),
)

//What if we went smaller?
/obj/item/gun/energy/gun/pocket
Expand All @@ -95,6 +106,6 @@

modifystate = "egunstun"
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/med, modifystate="egunstun", charge_cost = 240),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="egunkill", charge_cost = 480),
)
list(mode_name = "stun", projectile_type = /obj/item/projectile/beam/stun/med, modifystate = "egunstun", charge_cost = 240),
list(mode_name = "lethal", projectile_type = /obj/item/projectile/beam, modifystate = "egunkill", charge_cost = 480),
)
12 changes: 6 additions & 6 deletions code/modules/projectiles/guns/energy/phase.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
one_handed_penalty = 0

/obj/item/gun/energy/phasegun/mounted
self_recharge = 1
use_external_power = 1
self_recharge = TRUE
use_external_power = TRUE
one_handed_penalty = 0

/obj/item/gun/energy/phasegun/mounted/cyborg
charge_cost = 400
recharge_time = 7
recharge_time = 0.6 SECONDS

/obj/item/gun/energy/phasegun/pistol
name = "phase pistol"
Expand All @@ -57,12 +57,12 @@

/obj/item/gun/energy/phasegun/pistol/mounted
name = "mounted phase pistol"
self_recharge = 1
use_external_power = 1
self_recharge = TRUE
use_external_power = TRUE

/obj/item/gun/energy/phasegun/pistol/mounted/cyborg
charge_cost = 400
recharge_time = 7
recharge_time = 0.6 SECONDS

/obj/item/gun/energy/phasegun/rifle
name = "phase rifle"
Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/guns/energy/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
force = 10
slot_flags = SLOT_BACK
projectile_type = /obj/item/projectile/ion
fire_delay = 0.8 SECONDS

/obj/item/gun/energy/ionrifle/emp_act(severity)
..(max(severity, 4)) //so it doesn't EMP itself, I guess
Expand All @@ -27,6 +28,7 @@
slot_flags = SLOT_BELT|SLOT_HOLSTER
charge_cost = 480
projectile_type = /obj/item/projectile/ion/pistol
fire_delay = 1 SECOND

/obj/item/gun/energy/decloner
name = "biological demolecularisor"
Expand Down
Loading

0 comments on commit 10e11ae

Please sign in to comment.