Skip to content

Commit

Permalink
Allows guns to be magazine-swapped without delay once again | Cleans …
Browse files Browse the repository at this point in the history
…up some unused guncode (#272) (#1502)

* tactical reload freeloading society

* unused stuff

* mmm non-modular gun edits

Co-authored-by: Paxilmaniac <[email protected]>
  • Loading branch information
Steals-The-PRs and Paxilmaniac authored Jan 9, 2024
1 parent de3aa10 commit 4951b2c
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 70 deletions.
3 changes: 0 additions & 3 deletions code/__DEFINES/~nova_defines/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
#define TRAIT_ASH_ASPECT "ash_aspect"
#define TRAIT_SPARKLE_ASPECT "sparkle_aspect"

/// Allows the user to instantly reload.
#define TRAIT_INSTANT_RELOAD "instant_reload"

// Trait sources
#define TRAIT_GHOSTROLE "ghostrole" // NOVA EDIT ADDITION -- Ghost Cafe Traits

Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_GLUED_ITEM" = TRAIT_GLUED_ITEM,
"TRAIT_HARD_SOLES" = TRAIT_HARD_SOLES,
"TRAIT_HYDRA_HEADS" = TRAIT_HYDRA_HEADS,
"TRAIT_INSTANT_RELOAD" = TRAIT_INSTANT_RELOAD,
"TRAIT_LINGUIST" = TRAIT_LINGUIST,
"TRAIT_LEWDCHEM" = TRAIT_LEWDCHEM,
"TRAIT_LEWDQUIRK" = TRAIT_LEWDQUIRK,
Expand Down
1 change: 0 additions & 1 deletion code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_GLUED_ITEM" = TRAIT_GLUED_ITEM,
"TRAIT_HARD_SOLES" = TRAIT_HARD_SOLES,
"TRAIT_HYDRA_HEADS" = TRAIT_HYDRA_HEADS,
"TRAIT_INSTANT_RELOAD" = TRAIT_INSTANT_RELOAD,
"TRAIT_LINGUIST" = TRAIT_LINGUIST,
"TRAIT_LEWDCHEM" = TRAIT_LEWDCHEM,
"TRAIT_LEWDQUIRK" = TRAIT_LEWDQUIRK,
Expand Down
4 changes: 0 additions & 4 deletions code/modules/projectiles/guns/ballistic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,6 @@
if (.)
return
if (!internal_magazine && istype(A, /obj/item/ammo_box/magazine))
// NOVA EDIT ADDITION START - this return is intentional; we do not want to run TG's version of this case handling
if(handle_magazine(user, A))
return
// NOVA EDIT ADDITION END
var/obj/item/ammo_box/magazine/AM = A
if (!magazine)
insert_magazine(user, AM)
Expand Down
2 changes: 0 additions & 2 deletions modular_nova/modules/black_mesa/code/ghost_spawners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
)
id = /obj/item/card/id
id_trim = /datum/id_trim/hecu
skillchips = list(/obj/item/skillchip/chameleon/reload)

/datum/outfit/hecu/post_equip(mob/living/carbon/human/equipped_human, visualsOnly)
. = ..()
Expand Down Expand Up @@ -206,7 +205,6 @@
)
id = /obj/item/card/id
id_trim = /datum/id_trim/hecu_leader
skillchips = list(/obj/item/skillchip/chameleon/reload)

/datum/outfit/hecu/leader/post_equip(mob/living/carbon/human/equipped_human, visualsOnly)
. = ..()
Expand Down
2 changes: 0 additions & 2 deletions modular_nova/modules/mapping/code/mob_spawns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@
id = /obj/item/card/id/away/tarkon/sec
l_pocket = /obj/item/melee/baton/telescopic
r_pocket = /obj/item/grenade/barrier
skillchips = list(/obj/item/skillchip/chameleon/reload)

/obj/effect/mob_spawn/ghost_role/human/tarkon/ensign
name = "P-T Abandoned Ensign"
Expand All @@ -569,7 +568,6 @@
gloves = /obj/item/clothing/gloves/combat
l_pocket = null
r_pocket = null
skillchips = list(/obj/item/skillchip/chameleon/reload)

/datum/outfit/proc/handlebank(mob/living/carbon/human/owner)
var/datum/bank_account/offstation_bank_account = new(owner.real_name)
Expand Down
43 changes: 0 additions & 43 deletions modular_nova/modules/modular_weapons/code/ballistic_master.dm
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
/obj/item/gun/ballistic
/// Does this gun have mag and nomag on mob variance?
var/alt_icons = FALSE
/// What the icon state is for the on-back guns
var/alt_icon_state
/// How long it takes to reload a magazine.
var/reload_time = 2 SECONDS
/// if this gun has a penalty for reloading with an ammo_box type
var/box_reload_penalty = TRUE
/// reload penalty inflicted by using an ammo box instead of an individual cartridge, if not outright exchanging the magazine
Expand All @@ -24,43 +18,6 @@
/obj/item/gun/ballistic/rifle/boltaction // slightly less negligible than a revolver, since this is mostly for fairly powerful but crew-accessible stuff like mosins
box_reload_delay = CLICK_CD_RANGE

/obj/item/gun/ballistic/Initialize(mapload)
. = ..()

if(alt_icons)
AddElement(/datum/element/update_icon_updates_onmob)

/obj/item/gun/ballistic/update_overlays()
. = ..()
if(alt_icons)
if(!magazine)
if(alt_icon_state)
inhand_icon_state = "[alt_icon_state]_nomag"
worn_icon_state = "[alt_icon_state]_nomag"
else
inhand_icon_state = "[initial(icon_state)]_nomag"
worn_icon_state = "[initial(icon_state)]_nomag"
else
if(alt_icon_state)
inhand_icon_state = "[alt_icon_state]"
worn_icon_state = "[alt_icon_state]"
else
inhand_icon_state = "[initial(icon_state)]"
worn_icon_state = "[initial(icon_state)]"

/obj/item/gun/ballistic/proc/handle_magazine(mob/user, obj/item/ammo_box/magazine/inserting_magazine)
if(magazine) // If we already have a magazine inserted, we're going to begin tactically reloading it.
if(reload_time && !HAS_TRAIT(user, TRAIT_INSTANT_RELOAD)) // Check if we have a reload time to tactical reloading, or if we have the instant reload trait.
to_chat(user, span_notice("You start to insert the magazine into [src]!"))
if(!do_after(user, reload_time, src, IGNORE_USER_LOC_CHANGE)) // We are allowed to move while reloading.
to_chat(user, span_danger("You fail to insert the magazine into [src]!"))
return TRUE
eject_magazine(user, FALSE, inserting_magazine) // We eject the magazine then insert the new one, while putting the old one in hands.
else
insert_magazine(user, inserting_magazine) // Otherwise, just insert it.

return TRUE

/// Reloading with ammo box can incur penalty with some guns
/obj/item/gun/ballistic/proc/handle_box_reload(mob/user, obj/item/ammo_box/ammobox, num_loaded)
var/box_load = FALSE // if you're reloading with an ammo box, inflicts a cooldown
Expand Down
9 changes: 0 additions & 9 deletions modular_nova/modules/modular_weapons/code/skillchip.dm

This file was deleted.

1 change: 0 additions & 1 deletion modular_nova/modules/moretraitoritems/code/weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
rack_sound = 'modular_nova/modules/moretraitoritems/sound/slide.ogg'
fire_sound_volume = 100
bolt_wording = "fuckin' slide"
reload_time = 0 //FAST AS FUCK BOIS!
var/unrestricted = FALSE

/obj/item/gun/ballistic/automatic/pistol/robohand/unrestricted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
item_type = /obj/item/skillchip/job/roboticist
description = "A skillchip that, when installed, allows the user to recognise cyborg wire layouts and understand their functionality at a glance."

/datum/opposing_force_equipment/implants/tacticool
item_type = /obj/item/skillchip/chameleon/reload

//Implants
/datum/opposing_force_equipment/implants/nodrop
item_type = /obj/item/autosurgeon/syndicate/nodrop
Expand Down
1 change: 0 additions & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7664,7 +7664,6 @@
#include "modular_nova\modules\modular_weapons\code\melee.dm"
#include "modular_nova\modules\modular_weapons\code\modular_projectiles.dm"
#include "modular_nova\modules\modular_weapons\code\pepperball_gun.dm"
#include "modular_nova\modules\modular_weapons\code\skillchip.dm"
#include "modular_nova\modules\modular_weapons\code\suppressor_size_change_override.dm"
#include "modular_nova\modules\modular_weapons\code\company_and_or_faction_based\carwo_defense_systems\advert.dm"
#include "modular_nova\modules\modular_weapons\code\company_and_or_faction_based\carwo_defense_systems\grenade_launcher.dm"
Expand Down

0 comments on commit 4951b2c

Please sign in to comment.