diff --git a/code/datums/components/crank_recharge.dm b/code/datums/components/crank_recharge.dm index 3cee7088008..59f9dd50e51 100644 --- a/code/datums/components/crank_recharge.dm +++ b/code/datums/components/crank_recharge.dm @@ -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) // NOVA 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") diff --git a/code/modules/cargo/packs/security.dm b/code/modules/cargo/packs/security.dm index 0b007325829..b8e93f2815c 100644 --- a/code/modules/cargo/packs/security.dm +++ b/code/modules/cargo/packs/security.dm @@ -330,8 +330,8 @@ /datum/supply_pack/security/armory/thermal name = "Thermal Pistol Crate" desc = "Contains a pair of holsters each with two experimental thermal pistols, \ - using nanites as the basis for their ammo." - cost = CARGO_CRATE_VALUE * 7 + using nanites as the basis for their ammo. Can be shaken to reload." + cost = CARGO_CRATE_VALUE * 10 contains = list(/obj/item/storage/belt/holster/energy/thermal = 2) crate_name = "thermal pistol crate" diff --git a/code/modules/projectiles/guns/energy/crank_guns.dm b/code/modules/projectiles/guns/energy/crank_guns.dm index 23cd6a297ed..5faaf3ea015 100644 --- a/code/modules/projectiles/guns/energy/crank_guns.dm +++ b/code/modules/projectiles/guns/energy/crank_guns.dm @@ -72,3 +72,56 @@ ammo_type = list(/obj/item/ammo_casing/energy/disabler/smoothbore/prime) charge_sections = 2 spread = 0 //could be like 5, but having just very tiny spread kinda feels like bullshit + +//Inferno and Cryo Pistols + +/obj/item/gun/energy/laser/thermal //the common parent of these guns, it just shoots hard bullets, somoene might like that? + name = "nanite pistol" + desc = "A modified handcannon with a metamorphic reserve of decommissioned weaponized nanites. Spit globs of angry robots into the bad guys." + icon_state = "infernopistol" + inhand_icon_state = null + ammo_type = list(/obj/item/ammo_casing/energy/nanite) + shaded_charge = TRUE + ammo_x_offset = 1 + obj_flags = UNIQUE_RENAME + can_bayonet = TRUE + knife_x_offset = 19 + knife_y_offset = 13 + w_class = WEIGHT_CLASS_NORMAL + dual_wield_spread = 5 //as intended by the coders + +/obj/item/gun/energy/laser/thermal/Initialize(mapload) + . = ..() + AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS) + AddComponent( \ + /datum/component/crank_recharge, \ + charging_cell = get_cell(), \ + spin_to_win = TRUE, \ + charge_amount = 125, \ + cooldown_time = 0.8 SECONDS, \ + charge_sound = 'sound/weapons/kinetic_reload.ogg', \ + charge_sound_cooldown_time = 0.8 SECONDS, \ + ) + +/obj/item/gun/energy/laser/thermal/add_seclight_point() + AddComponent(/datum/component/seclite_attachable, \ + light_overlay_icon = 'icons/obj/weapons/guns/flashlights.dmi', \ + light_overlay = "flight", \ + overlay_x = 15, \ + overlay_y = 9) + +/obj/item/gun/energy/laser/thermal/inferno //the magma gun + name = "inferno pistol" + desc = "A modified handcannon with a metamorphic reserve of decommissioned weaponized nanites. Spit globs of molten angry robots into the bad guys. \ + While it doesn't manipulate temperature in and of itself, it does cause an violent eruption in anyone who is severely cold. Able to generate \ + ammunition by manually spinning the weapon's nanite canister." + icon_state = "infernopistol" + ammo_type = list(/obj/item/ammo_casing/energy/nanite/inferno) + +/obj/item/gun/energy/laser/thermal/cryo //the ice gun + name = "cryo pistol" + desc = "A modified handcannon with a metamorphic reserve of decommissioned weaponized nanites. Spit shards of frozen angry robots into the bad guys. \ + While it doesn't manipulate temperature in and of itself, it does cause an internal explosion in anyone who is severely hot. Able to generate \ + ammunition by manually spinning the weapon's nanite canister." + icon_state = "cryopistol" + ammo_type = list(/obj/item/ammo_casing/energy/nanite/cryo) diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index e7cbc9165e5..efdb6103a8e 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -187,48 +187,6 @@ /obj/item/gun/energy/laser/redtag/hitscan ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag/hitscan) -//Inferno and Cryo Pistols - -/obj/item/gun/energy/laser/thermal //the common parent of these guns, it just shoots hard bullets, somoene might like that? - name = "nanite pistol" - desc = "A modified handcannon with a metamorphic reserve of decommissioned weaponized nanites. Spit globs of angry robots into the bad guys." - icon_state = "infernopistol" - inhand_icon_state = null - ammo_type = list(/obj/item/ammo_casing/energy/nanite) - shaded_charge = TRUE - ammo_x_offset = 1 - obj_flags = UNIQUE_RENAME - can_bayonet = TRUE - knife_x_offset = 19 - knife_y_offset = 13 - w_class = WEIGHT_CLASS_NORMAL - dual_wield_spread = 10 //as intended by the coders - -/obj/item/gun/energy/laser/thermal/Initialize(mapload) - . = ..() - AddElement(/datum/element/empprotection, EMP_PROTECT_SELF|EMP_PROTECT_CONTENTS) - -/obj/item/gun/energy/laser/thermal/add_seclight_point() - AddComponent(/datum/component/seclite_attachable, \ - light_overlay_icon = 'icons/obj/weapons/guns/flashlights.dmi', \ - light_overlay = "flight", \ - overlay_x = 15, \ - overlay_y = 9) - -/obj/item/gun/energy/laser/thermal/inferno //the magma gun - name = "inferno pistol" - desc = "A modified handcannon with a metamorphic reserve of decommissioned weaponized nanites. Spit globs of molten angry robots into the bad guys. \ - While it doesn't manipulate temperature in and of itself, it does cause an violent eruption in anyone who is severely cold." - icon_state = "infernopistol" - ammo_type = list(/obj/item/ammo_casing/energy/nanite/inferno) - -/obj/item/gun/energy/laser/thermal/cryo //the ice gun - name = "cryo pistol" - desc = "A modified handcannon with a metamorphic reserve of decommissioned weaponized nanites. Spit shards of frozen angry robots into the bad guys. \ - While it doesn't manipulate temperature in and of itself, it does cause an internal explosion in anyone who is severely hot." - icon_state = "cryopistol" - ammo_type = list(/obj/item/ammo_casing/energy/nanite/cryo) - // luxury shuttle funnies /obj/item/firing_pin/paywall/luxury multi_payment = TRUE