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

Solar Devils SG Frontline Mode, RFN metal nerf #8358

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions code/modules/gear_presets/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@
new_human.equip_to_slot_or_del(new /obj/item/storage/box/packet/high_explosive(new_human), WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/storage/box/packet/incendiary(new_human), WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/motiondetector(new_human), WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/stack/sheet/metal/large_stack(new_human), WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/stack/sheet/metal/medium_stack(new_human), WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/stack/sheet/plasteel/medium_stack(new_human), WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/patch/devils(new_human), WEAR_IN_BACK)

Expand Down Expand Up @@ -1141,7 +1141,7 @@
new_human.equip_to_slot_or_del(new /obj/item/device/multitool(new_human), WEAR_IN_ACCESSORY)
new_human.equip_to_slot_or_del(new /obj/item/tool/weldingtool/screen(new_human), WEAR_IN_ACCESSORY)

new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smartgun(new_human), WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smartgun/pve(new_human), WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/smartgunner/full(new_human), WEAR_WAIST)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/knife(new_human), WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/insulated/black(new_human), WEAR_HANDS)
Expand Down Expand Up @@ -1361,7 +1361,7 @@

new_human.equip_to_slot_or_del(new /obj/item/clothing/accessory/storage/webbing/five_slots(new_human), WEAR_ACCESSORY)

new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smartgun(new_human), WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/smartgun/pve(new_human), WEAR_J_STORE)
new_human.equip_to_slot_or_del(new /obj/item/storage/belt/gun/smartgunner/full(new_human), WEAR_WAIST)
new_human.equip_to_slot_or_del(new /obj/item/clothing/shoes/marine/knife(new_human), WEAR_FEET)
new_human.equip_to_slot_or_del(new /obj/item/clothing/gloves/marine/insulated/black(new_human), WEAR_HANDS)
Expand Down
28 changes: 25 additions & 3 deletions code/modules/projectiles/guns/smartgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,11 @@

//more general procs

/obj/item/weapon/gun/smartgun/proc/toggle_frontline_mode(mob/user)
/obj/item/weapon/gun/smartgun/proc/toggle_frontline_mode(mob/user, silent)
to_chat(user, "[icon2html(src, user)] You [frontline_enabled? "<B>disable</b>" : "<B>enable</b>"] [src]'s frontline mode. You will now [frontline_enabled ? "be able to shoot through friendlies" : "deal increased damage but be unable to shoot through friendlies"].")
balloon_alert(user, "frontline mode [frontline_enabled ? "disabled" : "enabled"]")
playsound(loc,'sound/machines/click.ogg', 25, 1)
if(!silent)
balloon_alert(user, "frontline mode [frontline_enabled ? "disabled" : "enabled"]")
playsound(loc,'sound/machines/click.ogg', 25, 1)
frontline_enabled = !frontline_enabled
///Determines the color of the muzzle flash, depending on whether frontline mode is enabled or not.
if (!frontline_enabled)
Expand Down Expand Up @@ -856,3 +857,24 @@
. = ..()
MD.iff_signal = FACTION_TWE


// Solar devils SG, frontline mode only

/obj/item/weapon/gun/smartgun/pve
desc = "The actual firearm in the 4-piece M56B Smartgun System. This is a variant used by the Solar Devils Batallion, utilizing a 'frontline only' IFF system that refuses to fire if a friendly would be hit.\nYou may toggle firing restrictions by using a special action.\nAlt-click it to open the feed cover and allow for reloading."
actions_types = list(
/datum/action/item_action/smartgun/toggle_accuracy_improvement,
/datum/action/item_action/smartgun/toggle_ammo_type,
/datum/action/item_action/smartgun/toggle_auto_fire,
/datum/action/item_action/smartgun/toggle_lethal_mode,
/datum/action/item_action/smartgun/toggle_motion_detector,
/datum/action/item_action/smartgun/toggle_recoil_compensation,
)

/obj/item/weapon/gun/smartgun/pve/Initialize(mapload, ...)
. = ..()
toggle_frontline_mode(null, TRUE)

/obj/item/weapon/gun/smartgun/pve/set_gun_config_values()
..()
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_3