From feb5d39633cc0e8a64028e621f4a0573996142bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=9B=88=E1=9B=9F=E1=9A=B2=E1=9A=B2=E1=9B=96=E1=9B=8F?= =?UTF-8?q?=E1=9B=8B?= <55299415+Pockets-byte@users.noreply.github.com> Date: Sat, 8 Jun 2024 19:59:06 -0600 Subject: [PATCH] venting, and more balance stuff --- .../ship_weapons/energy_weapons/laser_ams.dm | 2 +- .../ship_weapons/energy_weapons/laser_pd.dm | 2 +- .../ship_weapons/energy_weapons/phaser.dm | 25 ++++++++++++------- .../packages/tgui/interfaces/EnergyWeapons.js | 6 +++++ 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_ams.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_ams.dm index f17313c8ac2..0538dd4cfd6 100644 --- a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_ams.dm +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_ams.dm @@ -16,7 +16,7 @@ charge = 0 max_heat = 800 heat_per_shot = 200 - heat_rate = 80 + heat_rate = 30 storage_rate = 50 diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_pd.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_pd.dm index 82dbfafa978..7b0d448148d 100644 --- a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_pd.dm +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/laser_pd.dm @@ -78,7 +78,7 @@ var/gun_id = 0 // Used for map linkage max_heat = 1000 heat_per_shot = 80 - heat_rate = 30 + heat_rate = 15 storage_rate = 100 diff --git a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm index eebca9815f9..1ff6f8ed1ba 100644 --- a/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm +++ b/nsv13/code/modules/munitions/ship_weapons/energy_weapons/phaser.dm @@ -47,6 +47,7 @@ heat_rate = 10 var/storage_rate = 100 var/weapon_state = STATE_NOTHING + var/ventnumber = 1 /obj/machinery/ship_weapon/energy/beam name = "phase cannon" @@ -61,7 +62,7 @@ power_modifier_cap = 5 //Allows you to do insanely powerful oneshot lasers. Maximum theoretical damage of 500. max_heat = 2000 heat_per_shot = 800 - heat_rate = 90 + heat_rate = 5 storage_rate = 140 /obj/machinery/ship_weapon/energy/Initialize() @@ -94,6 +95,16 @@ ui.open() ui.set_autoupdate(TRUE) +/obj/machinery/ship_weapon/energy/proc/vent() + if(heat > max_heat/4) + weapon_state = STATE_VENTING + ventnumber = max_heat - (3*(max_heat/4)) + if(heat <= (max_heat/4)) + ventnumber = max_heat + weapon_state = STATE_VENTING + playsound(src, 'sound/effects/turbolift/turbolift-close.ogg', 100, 1) + playsound(src, overheat_sound, 100, 1) + /obj/machinery/ship_weapon/energy/ui_act(action, params) if(..()) @@ -104,6 +115,8 @@ power_modifier = value if("activeToggle") active = !active + if("vent") + vent() return /obj/machinery/ship_weapon/energy/attack_hand(mob/user) @@ -262,7 +275,7 @@ if(weapon_state == STATE_OVERLOAD) return if(weapon_state == STATE_VENTING) - if(heat <= max_heat-V) + if(heat <= max_heat-ventnumber) weapon_state = STATE_NOTHING return heat = max(((H*1.2)-H),0) @@ -377,10 +390,4 @@ -/obj/machinery/ship_weapon/energy/proc/vent() - if(heat > (max_heat/4) ) - weapon_state = STATE_VENTING - var/V = max_heat - 3(max_heat/4) - if(heat <= (max_heat/4) ) - var/V = max_heat - weapon_state = STATE_VENTING + diff --git a/tgui/packages/tgui/interfaces/EnergyWeapons.js b/tgui/packages/tgui/interfaces/EnergyWeapons.js index a32d09ff2d2..35c2834e06b 100644 --- a/tgui/packages/tgui/interfaces/EnergyWeapons.js +++ b/tgui/packages/tgui/interfaces/EnergyWeapons.js @@ -50,6 +50,12 @@ export const EnergyWeapons = (props, context) => { average: [0.2, 0.5], bad: [0.5, Infinity], }} /> +