Skip to content

Commit

Permalink
Mateba Special (#4441)
Browse files Browse the repository at this point in the history
# About the pull request

This PR adds an optional version of the mateba: the Mateba Special.

Based on an older version of the game's mateba.

Check the icondiffbot in checks for the sprites.

# Explain why it's good for the game

Neato


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

:cl: Morrow, DrLance (sprites)
add: Added the Mateba Special as a choice for COs
/:cl:
  • Loading branch information
morrowwolf committed Sep 21, 2023
1 parent a8648dc commit 33e0129
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 22 deletions.
12 changes: 12 additions & 0 deletions code/__DEFINES/guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
10 changes: 10 additions & 0 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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. \
Expand Down
6 changes: 3 additions & 3 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
14 changes: 6 additions & 8 deletions code/modules/gear_presets/uscm_ship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 6 additions & 8 deletions code/modules/gear_presets/wo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
28 changes: 26 additions & 2 deletions code/modules/projectiles/guns/revolvers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]."),
Expand All @@ -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
. = ..()
Expand Down Expand Up @@ -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.

Expand Down
Binary file modified icons/mob/humans/onmob/items_lefthand_1.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/items_righthand_1.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/belts.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/guns_by_faction/uscm.dmi
Binary file not shown.

0 comments on commit 33e0129

Please sign in to comment.