Skip to content

Commit

Permalink
rock's review part 1
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroBetel committed Feb 9, 2024
1 parent afb0784 commit 7a4a102
Show file tree
Hide file tree
Showing 14 changed files with 166 additions and 68 deletions.
35 changes: 34 additions & 1 deletion code/datums/factions/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
hud_icon_state = "sl"
if(JOB_UPP_POLICE)
hud_icon_state = "mp"
if(JOB_UPP_LT_OFFICER)
if(JOB_UPP_LT_OFFICER, JOB_SO_UPP)
hud_icon_state = "lt"
if(JOB_UPP_SRLT_OFFICER)
hud_icon_state = "slt"
Expand Down Expand Up @@ -56,6 +56,39 @@
if(hud_icon_state)
holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "upp_[hud_icon_state]")

//UPP PVE PLATOON
var/datum/squad/squad = H.assigned_squad
if(istype(squad, /datum/squad/marine/upp))
var/squad_clr = H.assigned_squad.equipment_color
switch(GET_DEFAULT_ROLE(_role))
if(JOB_SQUAD_MEDIC) hud_icon_state = "med"
if(JOB_SQUAD_SMARTGUN) hud_icon_state = "gun"
if(JOB_SQUAD_TEAM_LEADER) hud_icon_state = "tl"
if(JOB_SQUAD_LEADER) hud_icon_state = "leader_a"
if(squad.fireteam_leaders["SQ1"] == H || squad.fireteam_leaders["SQ2"] == H)
H.langchat_styles = "langchat_smaller_bolded"
else
H.langchat_styles = initial(H.langchat_styles)
H.langchat_color = H.assigned_squad.chat_color

if(!hud_icon_state) hud_icon_state = H.rank_fallback
if(hud_icon_state)
var/image/IMG = image('icons/mob/hud/marine_hud.dmi', H, "hudsquad")
if(squad_clr)
IMG.color = squad_clr
else
IMG.color = "#5A934A"
holder.overlays += IMG
holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "hudsquad_[hud_icon_state]")
if(H.assigned_squad && H.assigned_fireteam)
var/image/IMG2 = image('icons/mob/hud/marine_hud.dmi', H, "hudsquad_[H.assigned_fireteam]")
IMG2.color = squad_clr
holder.overlays += IMG2
if(H.assigned_squad.fireteam_leaders[H.assigned_fireteam] == H)
var/image/IMG3 = image('icons/mob/hud/marine_hud.dmi', H, "hudsquad_ftl")
IMG3.color = squad_clr
holder.overlays += IMG3

/datum/faction/upp/get_antag_guns_snowflake_equipment()
return list(
list("PRIMARY FIREARMS", 0, null, null, null),
Expand Down
1 change: 1 addition & 0 deletions code/game/jobs/job/marine/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
minimap_color = MINIMAP_SQUAD_ALPHA
use_stripe_overlay = FALSE
usable = TRUE
faction = FACTION_UPP

/datum/squad/marine/upp/New()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_upp_medic, list(
list("Essential Medical Set", 0, /obj/effect/essentials_set/medic, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_MANDATORY),

list("STANDARD EQUIPMENT (TAKE ALL)", 0, null, null, null),
list("Standard Apparel", 0, list(/obj/item/clothing/under/marine/veteran/UPP/medic, /obj/item/clothing/shoes/marine/upp, /obj/item/clothing/gloves/marine/veteran/upp, /obj/item/device/radio/headset/distress/UPP/pve, /obj/item/clothing/head/helmet/marine/veteran/UPP), MARINE_CAN_BUY_UNIFORM, VENDOR_ITEM_MANDATORY),
list("Standard Apparel", 0, list(/obj/item/clothing/under/marine/veteran/UPP/medic, /obj/item/clothing/shoes/marine/upp, /obj/item/clothing/gloves/marine/veteran/upp, /obj/item/device/radio/headset/distress/UPP, /obj/item/clothing/head/helmet/marine/veteran/UPP), MARINE_CAN_BUY_UNIFORM, VENDOR_ITEM_MANDATORY),
list("Combat Sterile Gloves", 0, /obj/item/clothing/gloves/marine/medical, MARINE_CAN_BUY_KIT, VENDOR_ITEM_REGULAR),
list("Ration", 0, /obj/item/reagent_container/food/snacks/upp, MARINE_CAN_BUY_MRE, VENDOR_ITEM_MANDATORY),

Expand All @@ -238,10 +238,7 @@ GLOBAL_LIST_INIT(cm_vending_clothing_upp_medic, list(
list("Type 41 Ammo Load Rig", 0, /obj/item/storage/belt/marine/upp, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR),
list("Type 47 General Pistol Holster Rig", 0, /obj/item/storage/belt/gun/type47, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR),
list("Type 41 Lifesaver Bag (Full)", 0, /obj/item/storage/belt/medical/lifesaver/upp/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED),
list("M276 Medical Storage Rig (Full)", 0, /obj/item/storage/belt/medical/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED),
list("M276 M39 Holster Rig", 0, /obj/item/storage/belt/gun/m39, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR),
list("M276 M82F Holster Rig", 0, /obj/item/storage/belt/gun/flaregun, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR),
list("M276 M40 Grenade Rig", 0, /obj/item/storage/belt/grenade, MARINE_CAN_BUY_BELT, VENDOR_ITEM_REGULAR),
list("Type 41 Medical Storage Rig (Full)", 0, /obj/item/storage/belt/medical/full, MARINE_CAN_BUY_BELT, VENDOR_ITEM_RECOMMENDED),

list("POUCHES (CHOOSE 2)", 0, null, null, null),
list("Autoinjector Pouch", 0, /obj/item/storage/pouch/autoinjector, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
list("UPP Uniform", round(scale * 15), /obj/item/clothing/under/marine/veteran/UPP, VENDOR_ITEM_REGULAR),
list("Combat Gloves", round(scale * 15), /obj/item/clothing/gloves/marine/veteran/upp, VENDOR_ITEM_REGULAR),
list("UM4 Pattern Helmet", round(scale * 15), /obj/item/clothing/head/helmet/marine/veteran/UPP, VENDOR_ITEM_REGULAR),
list("Radio Headset", round(scale * 15), /obj/item/device/radio/headset/distress/UPP/pve, VENDOR_ITEM_REGULAR),
list("Radio Headset", round(scale * 15), /obj/item/device/radio/headset/distress/UPP, VENDOR_ITEM_REGULAR),

list("WEBBINGS", -1, null, null),
list("Brown Webbing Vest", round(scale * 1.25), /obj/item/clothing/accessory/storage/black_vest/brown_vest, VENDOR_ITEM_REGULAR),
Expand Down
3 changes: 0 additions & 3 deletions code/game/objects/items/devices/radio/headset.dm
Original file line number Diff line number Diff line change
Expand Up @@ -932,9 +932,6 @@
has_hud = TRUE
hud_type = MOB_HUD_FACTION_UPP

/obj/item/device/radio/headset/distress/UPP/pve
hud_type = MOB_HUD_FACTION_USCM

/obj/item/device/radio/headset/distress/UPP/cct
name = "UPP-CCT headset"
desc = "A special headset used by UPP military. Channels are as follows: :o - colony, #j - combat controller, #n engineering."
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@
. = ..()
. += SPAN_NOTICE("The belt is currently set to [mode ? "take pills directly from bottles": "NOT take pills directly from bottles"].")

/obj/item/storage/belt/medical/upp
name = "\improper Type 41 pattern medical storage rig"
desc = "The Type 41 is the standard load-bearing equipment of UPP military. It consists of a modular belt with various clips. This version is a less common configuration, designed to transport medical supplies and pistol ammunition. \nRight click its sprite and click \"toggle belt mode\" to take pills out of bottles by simply clicking them."
icon_state = "medicalbelt_upp"
item_state = "upp_belt"

/obj/item/storage/belt/medical/lifesaver
name = "\improper M276 pattern lifesaver bag"
desc = "The M276 is the standard load-bearing equipment of the USCM. This configuration mounts a duffel bag filled with a range of injectors and light medical supplies, and is common among medics. \nRight click its sprite and click \"toggle belt mode\" to take pills out of bottles by simply clicking them."
Expand Down
5 changes: 5 additions & 0 deletions code/modules/defenses/handheld.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
defense_type = /obj/structure/machinery/defenses/sentry/mini
deployment_time = 0.75 SECONDS

/obj/item/defenses/handheld/sentry/upp
name = "handheld UPPA 32-H sentry gun"
desc = "A compact version of the UPPA defenses. Designed for quick deployment of the associated type in the field."
defense_type = /obj/structure/machinery/defenses/sentry/upp


// FLAMER BASE AND UPGRADES
/obj/item/defenses/handheld/sentry/flamer
Expand Down
12 changes: 12 additions & 0 deletions code/modules/defenses/sentry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -757,5 +757,17 @@
new /obj/item/stack/sheet/plasteel/medium_stack(loc)
return ..()

/obj/structure/machinery/defenses/sentry/upp
name = "\improper UPPA 32-H sentry gun"
desc = "A deployable, semi-automated turret with AI targeting capabilities. Armed with an AK-500 Autocannon and a 500-round drum magazine."
choice_categories = list(
SENTRY_CATEGORY_IFF = list(FACTION_UPP, FACTION_HUMAN),
)

selected_categories = list(
SENTRY_CATEGORY_IFF = FACTION_UPP,
)


#undef SENTRY_FIREANGLE
#undef SENTRY_RANGE
10 changes: 10 additions & 0 deletions code/modules/gear_presets/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
paygrade = "UE1"
assignment = JOB_SQUAD_MARINE_UPP
languages = list(LANGUAGE_RUSSIAN, LANGUAGE_ENGLISH, LANGUAGE_CHINESE)
faction_group = list(FACTION_UPP)
faction = FACTION_UPP

/datum/equipment_preset/uscm/pfc/upp/load_gear(mob/living/carbon/human/new_human)
var/back_item = /obj/item/storage/backpack/lightpack/upp
Expand Down Expand Up @@ -149,6 +151,8 @@
paygrade = "UE3"
role_comm_title = "MG"
languages = list(LANGUAGE_RUSSIAN, LANGUAGE_ENGLISH, LANGUAGE_CHINESE)
faction_group = list(FACTION_UPP)
faction = FACTION_UPP

/datum/equipment_preset/uscm/sg/upp/load_gear(mob/living/carbon/human/new_human)
var/back_item = /obj/item/storage/backpack/lightpack/upp
Expand Down Expand Up @@ -333,6 +337,8 @@
paygrade = "UE3"
assignment = JOB_SQUAD_MEDIC_UPP
languages = list(LANGUAGE_RUSSIAN, LANGUAGE_ENGLISH, LANGUAGE_CHINESE)
faction_group = list(FACTION_UPP)
faction = FACTION_UPP

/datum/equipment_preset/uscm/medic/upp/load_gear(mob/living/carbon/human/new_human)
var/back_item = /obj/item/storage/backpack/lightpack/upp
Expand Down Expand Up @@ -378,6 +384,8 @@
paygrade = "UE4"
assignment = JOB_SQUAD_TEAM_LEADER_UPP
languages = list(LANGUAGE_RUSSIAN, LANGUAGE_ENGLISH, LANGUAGE_CHINESE)
faction_group = list(FACTION_UPP)
faction = FACTION_UPP

/datum/equipment_preset/uscm/tl/upp/load_gear(mob/living/carbon/human/new_human)
var/back_item = /obj/item/storage/backpack/lightpack/upp
Expand Down Expand Up @@ -456,6 +464,8 @@
assignment = JOB_SQUAD_LEADER_UPP
languages = list(LANGUAGE_RUSSIAN, LANGUAGE_ENGLISH, LANGUAGE_CHINESE)
paygrade = "UE6"
faction_group = list(FACTION_UPP)
faction = FACTION_UPP

/datum/equipment_preset/uscm/leader/upp/load_gear(mob/living/carbon/human/new_human)
var/back_item = /obj/item/storage/backpack/lightpack/upp
Expand Down
5 changes: 3 additions & 2 deletions code/modules/gear_presets/uscm_ship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,11 @@
rank = JOB_SO_UPP
languages = list(LANGUAGE_RUSSIAN, LANGUAGE_ENGLISH, LANGUAGE_TSL, LANGUAGE_SPANISH, LANGUAGE_CHINESE)
paygrade = "UO2"
faction_group = list(FACTION_UPP)
faction = FACTION_UPP

/datum/equipment_preset/uscm_ship/so/upp/load_gear(mob/living/carbon/human/new_human)
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/UPP/pve(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/device/radio/headset/distress/UPP/command(new_human), WEAR_L_EAR)
new_human.equip_to_slot_or_del(new /obj/item/clothing/under/marine/veteran/UPP/officer(new_human), WEAR_BODY)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/dress(new_human), WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/type47/np92(new_human), WEAR_WAIST)
Expand All @@ -595,7 +597,6 @@
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/large(new_human), WEAR_L_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/pouch/general/large(new_human), WEAR_R_STORE)
new_human.equip_to_slot_or_del(new /obj/item/device/binoculars/range(new_human), WEAR_L_HAND)
new_human.faction = FACTION_UPP

/datum/equipment_preset/uscm_ship/so/upp/lesser_rank
paygrade = "UO1"
Expand Down
41 changes: 40 additions & 1 deletion code/modules/projectiles/guns/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,51 @@
/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,)
var/iff_enabled = TRUE

/obj/item/weapon/gun/pkp/iff/set_bullet_traits()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff) //it has no PVE IFF mechanics because its innacurate as hell and is used for suppression and not as assault weapon.
BULLET_TRAIT_ENTRY_ID("iff", /datum/element/bullet_trait_iff) //it has no PVE IFF mechanics because its innacurate as hell and is used for suppression and not as assault weapon.
))

/datum/action/item_action/toggle_iff_pkp/toggle_lethal_mode/New(Target, obj/item/holder)
. = ..()
name = "Toggle IFF"
action_icon_state = "iff_toggle_on"
button.name = name
button.overlays.Cut()
button.overlays += image('icons/mob/hud/actions.dmi', button, action_icon_state)

/datum/action/item_action/toggle_iff_pkp/action_activate()
var/obj/item/weapon/gun/pkp/iff/G = holder_item
if(!ishuman(owner))
return
var/mob/living/carbon/human/H = owner
if(H.is_mob_incapacitated() || G.get_active_firearm(H, FALSE) != holder_item)
return

/datum/action/item_action/toggle_iff_pkp/action_activate()
. = ..()
var/obj/item/weapon/gun/pkp/iff/G = holder_item
G.toggle_lethal_mode(usr)
if(G.iff_enabled)
action_icon_state = "iff_toggle_on"
else
action_icon_state = "iff_toggle_off"
button.overlays.Cut()
button.overlays += image('icons/mob/hud/actions.dmi', button, action_icon_state)

/obj/item/weapon/gun/pkp/iff/proc/toggle_lethal_mode(mob/user)
to_chat(user, "[icon2html(src, usr)] You [iff_enabled? "<B>disable</b>" : "<B>enable</b>"] \the [src]'s fire restriction. You will [iff_enabled ? "harm anyone in your way" : "target through IFF"].")
playsound(loc,'sound/machines/click.ogg', 25, 1)
iff_enabled = !iff_enabled
if(iff_enabled)
add_bullet_trait(BULLET_TRAIT_ENTRY_ID("iff", /datum/element/bullet_trait_iff))
if(!iff_enabled)
remove_bullet_trait("iff")

/obj/effect/syringe_gun_dummy
name = ""
desc = ""
Expand Down
Binary file modified icons/obj/items/clothing/belts.dmi
Binary file not shown.
Loading

0 comments on commit 7a4a102

Please sign in to comment.