Skip to content

Commit

Permalink
upp machinegunner tweaks (cmss13-devs#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroBetel committed Jun 1, 2024
1 parent f9b0783 commit a7b6191
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 156 deletions.
3 changes: 3 additions & 0 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,9 @@
/obj/item/ammo_magazine/pkp,
)
has_gamemode_skin = FALSE
item_state_slots = list(
WEAR_L_HAND = "upp_belt",
WEAR_R_HAND = "upp_belt")

/obj/item/storage/belt/gun/mortarbelt
name="\improper M276 pattern mortar operator belt"
Expand Down
41 changes: 38 additions & 3 deletions code/modules/clothing/suits/marine_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,6 @@
. = ..()
if(SSmapping.configs[GROUND_MAP].environment_traits[MAP_COLD] && name == "M56 combat harness")
name = "M56 snow combat harness"
else
name = "M56 combat harness"
//select_gamemode_skin(type)

/obj/item/clothing/suit/storage/marine/smartgunner/mob_can_equip(mob/equipping_mob, slot, disable_warning = FALSE)
. = ..()
Expand Down Expand Up @@ -454,6 +451,44 @@
/obj/item/clothing/suit/storage/marine/smartgunner/standard
flags_atom = NO_SNOW_TYPE

/obj/item/clothing/suit/storage/marine/smartgunner/upp
name = "\improper UH7-I heavy plated harness"
desc = "An experimental set of heavy armor with additional harnesses designed to support QYJ-72-I smartmachinegun. Heavy plates along with harnesses make wearing backpacks extremely uncomfortable and borderline impossible."
icon_state = "upp_armor_heavy"
storage_slots = 1
slowdown = SLOWDOWN_ARMOR_HEAVY
flags_atom = NO_SNOW_TYPE|NO_NAME_OVERRIDE
flags_inventory = BLOCKSHARPOBJ|SMARTGUN_HARNESS|BLOCK_KNOCKDOWN
armor_melee = CLOTHING_ARMOR_MEDIUMHIGH
armor_bullet = CLOTHING_ARMOR_HIGHPLUS
armor_laser = CLOTHING_ARMOR_MEDIUMLOW
armor_energy = CLOTHING_ARMOR_MEDIUM
armor_bomb = CLOTHING_ARMOR_HIGH
armor_bio = CLOTHING_ARMOR_MEDIUM
armor_rad = CLOTHING_ARMOR_MEDIUMLOW
armor_internaldamage = CLOTHING_ARMOR_HIGHPLUS
uniform_restricted = list(/obj/item/clothing/under/marine/veteran/UPP, /obj/item/clothing/under/marine/veteran/UPP/medic, /obj/item/clothing/under/marine/veteran/UPP/engi)
allowed = list(
/obj/item/tank/emergency_oxygen,
/obj/item/device/flashlight,
/obj/item/ammo_magazine,
/obj/item/explosive/mine,
/obj/item/attachable/bayonet,
/obj/item/weapon/gun/pkp,
/obj/item/storage/backpack/general_belt,
/obj/item/device/motiondetector,
/obj/item/device/walkman,
)


/obj/item/clothing/suit/storage/marine/smartgunner/upp/Initialize()
. = ..()
pockets.bypass_w_limit = list(
/obj/item/ammo_magazine/minigun,
/obj/item/ammo_magazine/pkp,
)


/obj/item/clothing/suit/storage/marine/leader
name = "\improper B12 pattern marine armor"
desc = "Semi-experimental body armor system similar to M3, incorporating primarily carbon fiber instead of boron carbide. \nDesigned in a lovely olive green, slightly improved protection against blunt impact and biological hazards."
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/under/marine_uniform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@
min_cold_protection_temperature = ICE_PLANET_MIN_COLD_PROT
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_UPP
suit_restricted = list(/obj/item/clothing/suit/storage/marine/faction/UPP, /obj/item/clothing/suit/gimmick/jason, /obj/item/clothing/suit/storage/snow_suit/soviet, /obj/item/clothing/suit/storage/snow_suit/survivor, /obj/item/clothing/suit/storage/webbing)
suit_restricted = list(/obj/item/clothing/suit/storage/marine/faction/UPP, /obj/item/clothing/suit/gimmick/jason, /obj/item/clothing/suit/storage/snow_suit/soviet, /obj/item/clothing/suit/storage/snow_suit/survivor, /obj/item/clothing/suit/storage/webbing, /obj/item/clothing/suit/storage/marine/smartgunner/upp)
flags_jumpsuit = UNIFORM_SLEEVE_ROLLABLE

/obj/item/clothing/under/marine/veteran/UPP/boiler
Expand Down
15 changes: 14 additions & 1 deletion code/modules/projectiles/guns/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -272,13 +272,26 @@
return FALSE
if(!skillcheck(user, SKILL_FIREARMS, SKILL_FIREARMS_TRAINED))
to_chat(user, SPAN_WARNING("You don't seem to know how to use [src]..."))
return 0
return FALSE

/obj/item/weapon/gun/pkp/iff
name = "\improper QYJ-72-I General Purpose Machine Gun"
desc = "The QYJ-72-I is an experimental variant of common UPP GPMG featuring IFF capabilities which were developed by reverse-engineering USCM smartweapons. Aside from that, not much has been done to this machinegun: it's still heavy, overheats rather quickly and is able to lay down range unprecedented amounts of lead. \n<b>Alt-click it to open the feed cover and allow for reloading.</b>"
actions_types = list(/datum/action/item_action/toggle_iff_pkp)
aim_slowdown = SLOWDOWN_ADS_SPECIALIST
var/iff_enabled = TRUE
var/requires_harness = TRUE

/obj/item/weapon/gun/pkp/iff/able_to_fire(mob/living/user)
. = ..()
if(.)
if(!ishuman(user))
return FALSE
var/mob/living/carbon/human/H = user
if(requires_harness)
if(!H.wear_suit || !(H.wear_suit.flags_inventory & SMARTGUN_HARNESS))
balloon_alert(user, "harness required")
return FALSE

/obj/item/weapon/gun/pkp/iff/set_bullet_traits()
LAZYADD(traits_to_give, list(
Expand Down
Binary file modified icons/mob/humans/onmob/belt.dmi
Binary file not shown.
Binary file modified icons/obj/items/clothing/belts.dmi
Binary file not shown.
Loading

0 comments on commit a7b6191

Please sign in to comment.