Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mateba Special #4441

Merged
merged 3 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -1336,6 +1336,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
17 changes: 15 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,18 @@
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
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
morrowwolf marked this conversation as resolved.
Show resolved Hide resolved

//-------------------------------------------------------
//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.
Loading