From 7dff2d00ad1ba6dc8ca54b8a27f048b105d8a189 Mon Sep 17 00:00:00 2001 From: TiviPlus <57223640+TiviPlus@users.noreply.github.com> Date: Fri, 1 Apr 2022 01:42:27 +0200 Subject: [PATCH] Better mech ammo names and new ammo defines (#65817) Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com> --- code/__DEFINES/mecha.dm | 18 +++++++++++----- code/modules/vehicles/mecha/_mecha.dm | 4 ++-- .../mecha/equipment/weapons/mecha_ammo.dm | 21 +++++++------------ .../mecha/equipment/weapons/weapons.dm | 14 ++++++------- 4 files changed, 30 insertions(+), 27 deletions(-) diff --git a/code/__DEFINES/mecha.dm b/code/__DEFINES/mecha.dm index 9e698604b8d..cf2683dc91b 100644 --- a/code/__DEFINES/mecha.dm +++ b/code/__DEFINES/mecha.dm @@ -41,8 +41,16 @@ // Some mechs must (at least for now) use snowflake handling of their UI elements, these defines are for that // when changing MUST update the same-named tsx file constants -#define MECHA_SNOWFLAKE_ID_SLEEPER "sleeper_snowflake" -#define MECHA_SNOWFLAKE_ID_SYRINGE "syringe_snowflake" -#define MECHA_SNOWFLAKE_ID_MODE "mode_snowflake" -#define MECHA_SNOWFLAKE_ID_EXTINGUISHER "extinguisher_snowflake" -#define MECHA_SNOWFLAKE_ID_EJECTOR "ejector_snowflake" +#define MECHA_SNOWFLAKE_ID_SLEEPER "sleeper_snowflake" +#define MECHA_SNOWFLAKE_ID_SYRINGE "syringe_snowflake" +#define MECHA_SNOWFLAKE_ID_MODE "mode_snowflake" +#define MECHA_SNOWFLAKE_ID_EXTINGUISHER "extinguisher_snowflake" +#define MECHA_SNOWFLAKE_ID_EJECTOR "ejector_snowflake" + +#define MECHA_AMMO_INCENDIARY "Incendiary bullet" +#define MECHA_AMMO_BUCKSHOT "Buckshot shell" +#define MECHA_AMMO_LMG "LMG bullet" +#define MECHA_AMMO_MISSILE_HE "HE missile" +#define MECHA_AMMO_MISSILE_AP "AP missile" +#define MECHA_AMMO_FLASHBANG "Flashbang" +#define MECHA_AMMO_CLUSTERBANG "Clusterbang" diff --git a/code/modules/vehicles/mecha/_mecha.dm b/code/modules/vehicles/mecha/_mecha.dm index 8a8710525d3..0066e05a0dd 100644 --- a/code/modules/vehicles/mecha/_mecha.dm +++ b/code/modules/vehicles/mecha/_mecha.dm @@ -1272,7 +1272,7 @@ else gun.projectiles_cache = gun.projectiles_cache + ammo_needed playsound(get_turf(user),A.load_audio,50,TRUE) - to_chat(user, span_notice("You add [ammo_needed] [A.round_term][ammo_needed > 1?"s":""] to the [gun.name]")) + to_chat(user, span_notice("You add [ammo_needed] [A.ammo_type][ammo_needed > 1?"s":""] to the [gun.name]")) A.rounds = A.rounds - ammo_needed if(A.custom_materials) A.set_custom_materials(A.custom_materials, A.rounds / initial(A.rounds)) @@ -1284,7 +1284,7 @@ else gun.projectiles_cache = gun.projectiles_cache + A.rounds playsound(get_turf(user),A.load_audio,50,TRUE) - to_chat(user, span_notice("You add [A.rounds] [A.round_term][A.rounds > 1?"s":""] to the [gun.name]")) + to_chat(user, span_notice("You add [A.rounds] [A.ammo_type][A.rounds > 1?"s":""] to the [gun.name]")) A.rounds = 0 A.set_custom_materials(list(/datum/material/iron=2000)) A.update_name() diff --git a/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm b/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm index bdd960cebe7..c7a6d580c65 100644 --- a/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm +++ b/code/modules/vehicles/mecha/equipment/weapons/mecha_ammo.dm @@ -7,7 +7,6 @@ lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' var/rounds = 0 - var/round_term = "round" var/direct_load //For weapons where we re-load the weapon itself rather than adding to the ammo storage. var/load_audio = 'sound/weapons/gun/general/mag_bullet_insert.ogg' var/ammo_type @@ -38,45 +37,43 @@ /obj/item/mecha_ammo/examine(mob/user) . = ..() if(rounds) - . += "There [rounds > 1?"are":"is"] [rounds] [round_term][rounds > 1?"s":""] left." + . += "There [rounds > 1?"are":"is"] [rounds] [ammo_type][rounds > 1?"s":""] left." /obj/item/mecha_ammo/incendiary name = "incendiary ammo box" desc = "A box of incendiary ammunition for use with exosuit weapons." icon_state = "incendiary" rounds = 24 - ammo_type = "incendiary" + ammo_type = MECHA_AMMO_INCENDIARY /obj/item/mecha_ammo/scattershot name = "scattershot ammo box" desc = "A box of scaled-up buckshot, for use in exosuit shotguns." icon_state = "scattershot" rounds = 40 - ammo_type = "scattershot" + ammo_type = MECHA_AMMO_BUCKSHOT /obj/item/mecha_ammo/lmg name = "machine gun ammo box" desc = "A box of linked ammunition, designed for the Ultra AC 2 exosuit weapon." icon_state = "lmg" rounds = 300 - ammo_type = "lmg" + ammo_type = MECHA_AMMO_LMG /obj/item/mecha_ammo/missiles_br name = "breaching missiles" desc = "A box of large missiles, ready for loading into a BRM-6 exosuit missile rack." icon_state = "missile_br" rounds = 6 - round_term = "missile" direct_load = TRUE load_audio = 'sound/weapons/gun/general/mag_bullet_insert.ogg' - ammo_type = "missiles_br" + ammo_type = MECHA_AMMO_MISSILE_HE /obj/item/mecha_ammo/missiles_he name = "anti-armor missiles" desc = "A box of large missiles, ready for loading into an SRM-8 exosuit missile rack." - icon_state = "missile_he" + icon_state = MECHA_AMMO_MISSILE_AP rounds = 8 - round_term = "missile" direct_load = TRUE load_audio = 'sound/weapons/gun/general/mag_bullet_insert.ogg' ammo_type = "missiles_he" @@ -87,14 +84,12 @@ desc = "A box of smooth flashbangs, for use with a large exosuit launcher. Cannot be primed by hand." icon_state = "flashbang" rounds = 6 - round_term = "grenade" - ammo_type = "flashbang" + ammo_type = MECHA_AMMO_FLASHBANG /obj/item/mecha_ammo/clusterbang name = "launchable flashbang clusters" desc = "A box of clustered flashbangs, for use with a specialized exosuit cluster launcher. Cannot be primed by hand." icon_state = "clusterbang" rounds = 3 - round_term = "cluster" direct_load = TRUE - ammo_type = "clusterbang" + ammo_type = MECHA_AMMO_CLUSTERBANG diff --git a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm index 4e622482877..aa07af6affb 100644 --- a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm +++ b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm @@ -269,7 +269,7 @@ projectiles_cache = 24 projectiles_cache_max = 96 harmful = TRUE - ammo_type = "incendiary" + ammo_type = MECHA_AMMO_INCENDIARY /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/silenced name = "\improper S.H.H. \"Quietus\" Carbine" @@ -294,7 +294,7 @@ projectiles_per_shot = 4 variance = 25 harmful = TRUE - ammo_type = "scattershot" + ammo_type = MECHA_AMMO_BUCKSHOT /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg name = "\improper Ultra AC 2" @@ -310,7 +310,7 @@ randomspread = 1 projectile_delay = 2 harmful = TRUE - ammo_type = "lmg" + ammo_type = MECHA_AMMO_LMG /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack name = "\improper SRM-8 missile rack" @@ -324,7 +324,7 @@ disabledreload = TRUE equip_cooldown = 60 harmful = TRUE - ammo_type = "missiles_he" + ammo_type = MECHA_AMMO_MISSILE_HE /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/breaching name = "\improper BRM-6 missile rack" @@ -338,7 +338,7 @@ disabledreload = TRUE equip_cooldown = 60 harmful = TRUE - ammo_type = "missiles_br" + ammo_type = MECHA_AMMO_MISSILE_AP /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher @@ -373,8 +373,8 @@ projectiles_cache_max = 24 missile_speed = 1.5 equip_cooldown = 60 + ammo_type = MECHA_AMMO_FLASHBANG var/det_time = 20 - ammo_type = "flashbang" /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/flashbang/proj_init(obj/item/grenade/flashbang/F, mob/user) var/turf/T = get_turf(src) @@ -391,7 +391,7 @@ disabledreload = TRUE projectile = /obj/item/grenade/clusterbuster equip_cooldown = 90 - ammo_type = "clusterbang" + ammo_type = MECHA_AMMO_CLUSTERBANG /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/banana_mortar name = "banana mortar"