diff --git a/code/datums/components/crafting/ranged_weapon.dm b/code/datums/components/crafting/ranged_weapon.dm index ace9f2c7c8b0..73674d262676 100644 --- a/code/datums/components/crafting/ranged_weapon.dm +++ b/code/datums/components/crafting/ranged_weapon.dm @@ -307,8 +307,7 @@ /obj/item/stack/rods = 4, /obj/item/stock_parts/micro_laser = 1, /obj/item/stock_parts/capacitor = 1, - /obj/item/clothing/glasses/regular = 1, - /obj/item/reagent_containers/cup/glass/drinkingglass = 1, + /obj/item/reagent_containers/cup/glass/drinkingglass = 2, ) tool_behaviors = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER) time = 10 SECONDS diff --git a/code/datums/components/crank_recharge.dm b/code/datums/components/crank_recharge.dm index 5c3c7aad24ed..5f63479e4d7f 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 @@ -12,20 +14,23 @@ var/charge_sound_cooldown_time /// Are we currently charging var/is_charging = FALSE + /// Should you be able to move while charging, use IGNORE_USER_LOC_CHANGE if you want to move and crank + var/charge_move = NONE 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/items/weapons/laser_crank.ogg', charge_sound_cooldown_time = 1.8 SECONDS, charge_move = NONE) . = ..() 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 src.charge_sound_cooldown_time = charge_sound_cooldown_time - + src.charge_move = charge_move /datum/component/crank_recharge/RegisterWithParent() . = ..() RegisterSignal(parent, COMSIG_ITEM_ATTACK_SELF, PROC_REF(on_attack_self)) @@ -45,15 +50,21 @@ 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) playsound(source, charge_sound, 40) source.balloon_alert(user, "charging...") - if(!do_after(user, cooldown_time, source, interaction_key = DOAFTER_SOURCE_CHARGE_CRANKRECHARGE)) + if(!do_after(user, cooldown_time, source, interaction_key = DOAFTER_SOURCE_CHARGE_CRANKRECHARGE, timed_action_flags = charge_move)) is_charging = FALSE return charging_cell.give(charge_amount) 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/game/objects/items/storage/holsters.dm b/code/game/objects/items/storage/holsters.dm index 400c949a9932..afb7b0f750b2 100644 --- a/code/game/objects/items/storage/holsters.dm +++ b/code/game/objects/items/storage/holsters.dm @@ -11,11 +11,11 @@ /obj/item/storage/belt/holster/equipped(mob/user, slot) . = ..() if(slot & (ITEM_SLOT_BELT|ITEM_SLOT_SUITSTORE)) - ADD_TRAIT(user, TRAIT_GUNFLIP, CLOTHING_TRAIT) + ADD_CLOTHING_TRAIT(user, TRAIT_GUNFLIP) /obj/item/storage/belt/holster/dropped(mob/user) . = ..() - REMOVE_TRAIT(user, TRAIT_GUNFLIP, CLOTHING_TRAIT) + REMOVE_CLOTHING_TRAIT(user, TRAIT_GUNFLIP) /obj/item/storage/belt/holster/Initialize(mapload) . = ..() diff --git a/code/modules/cargo/packs/security.dm b/code/modules/cargo/packs/security.dm index 02845abf4a54..b2dd82b89d8c 100644 --- a/code/modules/cargo/packs/security.dm +++ b/code/modules/cargo/packs/security.dm @@ -331,8 +331,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/ammunition/energy/laser.dm b/code/modules/projectiles/ammunition/energy/laser.dm index 6eb2d238bb06..d44a26e3a4d5 100644 --- a/code/modules/projectiles/ammunition/energy/laser.dm +++ b/code/modules/projectiles/ammunition/energy/laser.dm @@ -38,6 +38,8 @@ /obj/item/ammo_casing/energy/laser/musket/prime projectile_type = /obj/projectile/beam/laser/musket/prime + pellets = 3 + variance = 10 /obj/item/ammo_casing/energy/laser/practice projectile_type = /obj/projectile/beam/practice diff --git a/code/modules/projectiles/guns/energy/crank_guns.dm b/code/modules/projectiles/guns/energy/crank_guns.dm index 23cd6a297ed3..68f68e3ecead 100644 --- a/code/modules/projectiles/guns/energy/crank_guns.dm +++ b/code/modules/projectiles/guns/energy/crank_guns.dm @@ -13,14 +13,14 @@ /obj/item/gun/energy/laser/musket/Initialize(mapload) . = ..() - AddComponent(/datum/component/two_handed, require_twohands = TRUE, force_wielded = 10) AddComponent( \ /datum/component/crank_recharge, \ charging_cell = get_cell(), \ charge_amount = 500, \ cooldown_time = 2 SECONDS, \ - charge_sound = 'sound/weapons/laser_crank.ogg', \ + charge_sound = 'sound/items/weapons/laser_crank.ogg', \ charge_sound_cooldown_time = 1.8 SECONDS, \ + charge_move = IGNORE_USER_LOC_CHANGE, \ ) /obj/item/gun/energy/laser/musket/update_icon_state() @@ -52,8 +52,9 @@ charging_cell = get_cell(), \ charge_amount = 1000, \ cooldown_time = 2 SECONDS, \ - charge_sound = 'sound/weapons/laser_crank.ogg', \ + charge_sound = 'sound/items/weapons/laser_crank.ogg', \ charge_sound_cooldown_time = 1.8 SECONDS, \ + charge_move = IGNORE_USER_LOC_CHANGE, \ ) /obj/item/gun/energy/disabler/smoothbore/add_seclight_point() @@ -72,3 +73,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 561525fe6fe9..04703a2275fc 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 diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index 0f3cdd2c553e..0a30ec6f9355 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -70,15 +70,15 @@ name = "low-power laser" icon_state = "laser_musket" impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser - damage = 25 - stamina = 40 + damage = 28 + stamina = 35 light_color = COLOR_STRONG_VIOLET weak_against_armour = TRUE /obj/projectile/beam/laser/musket/prime name = "mid-power laser" - damage = 30 - stamina = 45 + damage = 25 + stamina = 20 weak_against_armour = FALSE /obj/projectile/beam/weak diff --git a/sound/weapons/laser_crank.ogg b/sound/items/weapons/laser_crank.ogg similarity index 100% rename from sound/weapons/laser_crank.ogg rename to sound/items/weapons/laser_crank.ogg