mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
[MIRROR] Thermal Pistol Rework Attempt Two: You Spin to Win (it uses the crank energy weapon mechanics) (#26876)
* Thermal Pistol Rework Attempt Two: You Spin to Win (it uses the crank energy weapon mechanics) (#81819) ## About The Pull Request Thermal pistols now can be 'cranked' in order to reload them, similar to a smoothbore disabler. Each 'crank' recharges one shot out of 8 shots. And by crank, I mean you SPIN THE GUN. In order to spin guns, you need a holster. So, without a holster, you can't utilize this mechanic of the pistols. (Also they're more accurate while dual-wielded hoo haa) Thermal pistol crates are now slightly more expensive, at 2000 credits. (is this even a balancing point now that we have stocks?) ## Why It's Good For The Game People really liked what was going on in this [PR with the gun flipping resulting in a reload](https://github.com/tgstation/tgstation/pull/76076). However, it was...maybe a little too strong. As a more middle ground approach, the gun crank component was a particularly helpful addition to the game that allows for things like...slow bullet-by-bullet reloading of even energy weapons. ## Changelog 🆑 balance: Thermal pistols can now be 'cranked' to recharge shots. You must have a holster equipped in order to utilize this feature. Also, they have a tighter dual-wield cone. balance: Thermal pistol crates are now 2000 credits, up from 1400 credits. /🆑 * Thermal Pistol Rework Attempt Two: You Spin to Win (it uses the crank energy weapon mechanics) --------- Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
This commit is contained in:
co-authored by
necromanceranne
parent
8e8cc93958
commit
237bf908cd
@@ -2,6 +2,8 @@
|
||||
/datum/component/crank_recharge
|
||||
/// Our cell to charge
|
||||
var/obj/item/stock_parts/cell/charging_cell
|
||||
/// Whether we spin our gun to reload (and therefore need the relevant trait)
|
||||
var/spin_to_win = FALSE
|
||||
/// How much charge we give our cell on each crank
|
||||
var/charge_amount
|
||||
/// How long is the cooldown time between each charge
|
||||
@@ -14,13 +16,14 @@
|
||||
var/is_charging = FALSE
|
||||
COOLDOWN_DECLARE(charge_sound_cooldown)
|
||||
|
||||
/datum/component/crank_recharge/Initialize(charging_cell, charge_amount = 500, cooldown_time = 2 SECONDS, charge_sound = 'sound/weapons/laser_crank.ogg', charge_sound_cooldown_time = 1.8 SECONDS)
|
||||
/datum/component/crank_recharge/Initialize(charging_cell, spin_to_win = FALSE, charge_amount = 500, cooldown_time = 2 SECONDS, charge_sound = 'sound/weapons/laser_crank.ogg', charge_sound_cooldown_time = 1.8 SECONDS)
|
||||
. = ..()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
if(isnull(charging_cell) || !istype(charging_cell, /obj/item/stock_parts/cell))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
src.charging_cell = charging_cell
|
||||
src.spin_to_win = spin_to_win
|
||||
src.charge_amount = charge_amount
|
||||
src.cooldown_time = cooldown_time
|
||||
src.charge_sound = charge_sound
|
||||
@@ -45,6 +48,10 @@
|
||||
return
|
||||
if(is_charging)
|
||||
return
|
||||
if(spin_to_win && !HAS_TRAIT(user, TRAIT_GUNFLIP))
|
||||
source.balloon_alert(user, "need holster to spin!")
|
||||
return
|
||||
|
||||
is_charging = TRUE
|
||||
if(COOLDOWN_FINISHED(src, charge_sound_cooldown))
|
||||
COOLDOWN_START(src, charge_sound_cooldown, charge_sound_cooldown_time)
|
||||
@@ -57,4 +64,6 @@
|
||||
SEND_SIGNAL(parent, COMSIG_UPDATE_AMMO_HUD) // SKYRAT EDIT ADDITION - AMMO COUNT HUD
|
||||
source.update_appearance()
|
||||
is_charging = FALSE
|
||||
if(spin_to_win)
|
||||
source.SpinAnimation(4, 2) //What a badass
|
||||
source.balloon_alert(user, "charged")
|
||||
|
||||
Reference in New Issue
Block a user