diff --git a/code/__DEFINES/guns.dm b/code/__DEFINES/guns.dm index b29f7c7439f2..2ea9d11ce43d 100644 --- a/code/__DEFINES/guns.dm +++ b/code/__DEFINES/guns.dm @@ -45,3 +45,15 @@ //autofire component fire callback return flags #define AUTOFIRE_CONTINUE (1<<0) #define AUTOFIRE_SUCCESS (1<<1) + +///Base CO special weapons options +#define CO_GUNS list(CO_GUN_MATEBA, CO_GUN_MATEBA_SPECIAL, CO_GUN_DEAGLE) + +///Council CO special weapons options +#define COUNCIL_CO_GUNS list(CO_GUN_MATEBA_COUNCIL, CO_GUN_DEAGLE_COUNCIL) + +#define CO_GUN_MATEBA "Mateba" +#define CO_GUN_MATEBA_SPECIAL "Mateba Special" +#define CO_GUN_DEAGLE "Desert Eagle" +#define CO_GUN_MATEBA_COUNCIL "Colonel's Mateba" +#define CO_GUN_DEAGLE_COUNCIL "Golden Desert Eagle" diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 7ecfcf896521..301f6de2bc70 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -1339,6 +1339,16 @@ new /obj/item/ammo_magazine/revolver/mateba/highimpact/ap(src) new /obj/item/ammo_magazine/revolver/mateba/highimpact/ap(src) +/obj/item/storage/belt/gun/mateba/cmateba/special + +/obj/item/storage/belt/gun/mateba/cmateba/special/fill_preset_inventory() + handle_item_insertion(new /obj/item/weapon/gun/revolver/mateba/special()) + new /obj/item/ammo_magazine/revolver/mateba/highimpact(src) + new /obj/item/ammo_magazine/revolver/mateba/highimpact(src) + new /obj/item/ammo_magazine/revolver/mateba/highimpact(src) + new /obj/item/ammo_magazine/revolver/mateba/highimpact/ap(src) + new /obj/item/ammo_magazine/revolver/mateba/highimpact/ap(src) + /obj/item/storage/belt/gun/mateba/council name = "colonel's M276 pattern Mateba holster rig" desc = "The M276 is the standard load-bearing equipment of the USCM. \ diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d9eb01511344..de50af8dd808 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1331,12 +1331,12 @@ var/const/MAX_SAVE_SLOTS = 10 commander_status = options[new_commander_status] if("co_sidearm") - var/list/options = list("Mateba","Desert Eagle") + var/list/options = CO_GUNS if(whitelist_flags & (WHITELIST_COMMANDER_COUNCIL|WHITELIST_COMMANDER_COUNCIL_LEGACY)) - options += list("Colonel's Mateba","Golden Desert Eagle") + options += COUNCIL_CO_GUNS else - options -= list("Colonel's Mateba","Golden Desert Eagle") //This is weird and should not be necessary but it wouldn't remove these from the list otherwise + options -= COUNCIL_CO_GUNS var/new_co_sidearm = tgui_input_list(user, "Choose your preferred sidearm.", "Commanding Officer's Sidearm", options) if(!new_co_sidearm) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 0e01fc75c013..89cd10af75b8 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -249,7 +249,7 @@ predator_skin_color = sanitize_inlist(predator_skin_color, PRED_SKIN_COLOR, initial(predator_skin_color)) predator_flavor_text = predator_flavor_text ? sanitize_text(predator_flavor_text, initial(predator_flavor_text)) : initial(predator_flavor_text) commander_status = sanitize_inlist(commander_status, whitelist_hierarchy, initial(commander_status)) - commander_sidearm = sanitize_inlist(commander_sidearm, list("Mateba","Colonel's Mateba","Golden Desert Eagle","Desert Eagle"), initial(commander_sidearm)) + commander_sidearm = sanitize_inlist(commander_sidearm, (CO_GUNS + COUNCIL_CO_GUNS), initial(commander_sidearm)) affiliation = sanitize_inlist(affiliation, FACTION_ALLEGIANCE_USCM_COMMANDER, initial(affiliation)) yautja_status = sanitize_inlist(yautja_status, whitelist_hierarchy + list("Elder"), initial(yautja_status)) synth_status = sanitize_inlist(synth_status, whitelist_hierarchy, initial(synth_status)) diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index 5b546b0c941c..7d0a75b7a34a 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -436,20 +436,18 @@ if(new_human.client && new_human.client.prefs) sidearm = new_human.client.prefs.commander_sidearm switch(sidearm) - if("Mateba") + if(CO_GUN_MATEBA) sidearmpath = /obj/item/storage/belt/gun/mateba/cmateba/full kit = /obj/item/storage/mateba_case/captain - if("Colonel's Mateba") + if(CO_GUN_MATEBA_SPECIAL) + sidearmpath = /obj/item/storage/belt/gun/mateba/cmateba/special + if(CO_GUN_MATEBA_COUNCIL) sidearmpath = /obj/item/storage/belt/gun/mateba/council/full kit = /obj/item/storage/mateba_case/captain/council - if("Desert Eagle") + if(CO_GUN_DEAGLE) sidearmpath = /obj/item/storage/belt/gun/m4a3/heavy/co - if("Golden Desert Eagle") + if(CO_GUN_DEAGLE_COUNCIL) sidearmpath = /obj/item/storage/belt/gun/m4a3/heavy/co_golden - if("M4A3 Custom") - sidearmpath = /obj/item/storage/belt/gun/m4a3/commander - if("VP78") - sidearmpath = /obj/item/storage/belt/gun/m4a3/vp78 new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/almayer/mcom/cdrcom(new_human), WEAR_L_EAR) new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/officer/bridge(new_human), WEAR_BODY) diff --git a/code/modules/gear_presets/wo.dm b/code/modules/gear_presets/wo.dm index 521d2690d367..aedd035710f3 100644 --- a/code/modules/gear_presets/wo.dm +++ b/code/modules/gear_presets/wo.dm @@ -52,20 +52,18 @@ if(new_human.client && new_human.client.prefs) sidearm = new_human.client.prefs.commander_sidearm switch(sidearm) - if("Mateba") + if(CO_GUN_MATEBA) sidearmpath = /obj/item/storage/belt/gun/mateba/cmateba/full kit = /obj/item/storage/mateba_case/captain - if("Colonel's Mateba") + if(CO_GUN_MATEBA_SPECIAL) + sidearmpath = /obj/item/storage/belt/gun/mateba/cmateba/special + if(CO_GUN_MATEBA_COUNCIL) sidearmpath = /obj/item/storage/belt/gun/mateba/council/full kit = /obj/item/storage/mateba_case/captain/council - if("Desert Eagle") + if(CO_GUN_DEAGLE) sidearmpath = /obj/item/storage/belt/gun/m4a3/heavy/co - if("Golden Desert Eagle") + if(CO_GUN_DEAGLE_COUNCIL) sidearmpath = /obj/item/storage/belt/gun/m4a3/heavy/co_golden - if("M4A3 Custom") - sidearmpath = /obj/item/storage/belt/gun/m4a3/commander - if("VP78") - sidearmpath = /obj/item/storage/belt/gun/m4a3/vp78 //back new_human.equip_to_slot_or_del(new back_item(new_human), WEAR_BACK) diff --git a/code/modules/projectiles/guns/revolvers.dm b/code/modules/projectiles/guns/revolvers.dm index 4eaedf11ef11..48f237f9b562 100644 --- a/code/modules/projectiles/guns/revolvers.dm +++ b/code/modules/projectiles/guns/revolvers.dm @@ -566,9 +566,10 @@ unacidable = TRUE black_market_value = 100 var/is_locked = TRUE + var/can_change_barrel = TRUE /obj/item/weapon/gun/revolver/mateba/attackby(obj/item/I, mob/user) - if(istype(I, /obj/item/weapon/mateba_key)) + if(istype(I, /obj/item/weapon/mateba_key) && can_change_barrel) if(attachments["special"]) var/obj/item/attachable/R = attachments["special"] visible_message(SPAN_NOTICE("[user] begins stripping [R] from [src]."), @@ -590,7 +591,7 @@ update_icon() else if(istype(I, /obj/item/attachable)) var/obj/item/attachable/A = I - if(A.slot == "muzzle" && !attachments["special"]) + if(A.slot == "muzzle" && !attachments["special"] && can_change_barrel) to_chat(user, SPAN_WARNING("You need to attach a barrel first!")) return . = ..() @@ -667,6 +668,29 @@ current_mag = /obj/item/ammo_magazine/internal/revolver/mateba/impact map_specific_decoration = TRUE +/obj/item/weapon/gun/revolver/mateba/special + name = "\improper Mateba autorevolver special" + desc = "An old, heavily modified version of the Mateba Autorevolver. It sports a smooth wooden grip, and a much larger barrel to it's unmodified counterpart. It's clear that this weapon has been cared for over a long period of time." + icon_state = "cmateba_special" + item_state = "cmateba_special" + current_mag = /obj/item/ammo_magazine/internal/revolver/mateba/impact + attachable_allowed = list( + /obj/item/attachable/reddot, + /obj/item/attachable/reflex, + /obj/item/attachable/flashlight, + /obj/item/attachable/heavy_barrel, + /obj/item/attachable/compensator, + ) + starting_attachment_types = list() + can_change_barrel = FALSE + +/obj/item/weapon/gun/revolver/mateba/special/set_gun_config_values() + ..() + accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_4 + +/obj/item/weapon/gun/revolver/mateba/special/set_gun_attachment_offsets() + attachable_offset = list("muzzle_x" = 30, "muzzle_y" = 23,"rail_x" = 9, "rail_y" = 24, "under_x" = 19, "under_y" = 17, "stock_x" = 19, "stock_y" = 17, "special_x" = 23, "special_y" = 22) + //------------------------------------------------------- //MARSHALS REVOLVER //Spearhead exists in Alien cannon. diff --git a/icons/mob/humans/onmob/items_lefthand_1.dmi b/icons/mob/humans/onmob/items_lefthand_1.dmi index 3acec8cda0f0..37b5f9bcc609 100644 Binary files a/icons/mob/humans/onmob/items_lefthand_1.dmi and b/icons/mob/humans/onmob/items_lefthand_1.dmi differ diff --git a/icons/mob/humans/onmob/items_righthand_1.dmi b/icons/mob/humans/onmob/items_righthand_1.dmi index 821711fad50b..3ad8b52d0403 100644 Binary files a/icons/mob/humans/onmob/items_righthand_1.dmi and b/icons/mob/humans/onmob/items_righthand_1.dmi differ diff --git a/icons/obj/items/clothing/belts.dmi b/icons/obj/items/clothing/belts.dmi index 612b4785d24f..38ff421cfda5 100644 Binary files a/icons/obj/items/clothing/belts.dmi and b/icons/obj/items/clothing/belts.dmi differ diff --git a/icons/obj/items/weapons/guns/guns_by_faction/uscm.dmi b/icons/obj/items/weapons/guns/guns_by_faction/uscm.dmi index 49e06f5ee547..38fe8079a2e8 100644 Binary files a/icons/obj/items/weapons/guns/guns_by_faction/uscm.dmi and b/icons/obj/items/weapons/guns/guns_by_faction/uscm.dmi differ