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

Adds Balloon Alerts to Smartgunners #5866

Merged
merged 4 commits into from
Mar 3, 2024
Merged
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
8 changes: 5 additions & 3 deletions code/modules/projectiles/guns/smartgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,15 @@
return FALSE
var/mob/living/carbon/human/H = user
if(!skillcheckexplicit(user, SKILL_SPEC_WEAPONS, SKILL_SPEC_SMARTGUN) && !skillcheckexplicit(user, SKILL_SPEC_WEAPONS, SKILL_SPEC_ALL))
to_chat(H, SPAN_WARNING("You don't seem to know how to use \the [src]..."))
balloon_alert(user, "insufficient skills")
return FALSE
if(requires_harness)
if(!H.wear_suit || !(H.wear_suit.flags_inventory & SMARTGUN_HARNESS))
to_chat(H, SPAN_WARNING("You need a harness suit to be able to fire [src]..."))
balloon_alert(user, "harness required")
return FALSE
if(cover_open)
to_chat(H, SPAN_WARNING("You can't fire \the [src] with the feed cover open! (alt-click to close)"))
balloon_alert(user, "cannot fire; feed cover open")
return FALSE

/obj/item/weapon/gun/smartgun/unique_action(mob/user)
Expand All @@ -337,6 +338,7 @@
return
secondary_toggled = !secondary_toggled
to_chat(user, "[icon2html(src, usr)] You changed \the [src]'s ammo preparation procedures. You now fire [secondary_toggled ? "armor shredding rounds" : "highly precise rounds"].")
balloon_alert(user, "firing [secondary_toggled ? "armor shredding" : "highly precise"]")
playsound(loc,'sound/machines/click.ogg', 25, 1)
ammo = secondary_toggled ? ammo_secondary : ammo_primary
var/datum/action/item_action/smartgun/toggle_ammo_type/TAT = locate(/datum/action/item_action/smartgun/toggle_ammo_type) in actions
Expand Down Expand Up @@ -387,7 +389,7 @@
return FALSE
return TRUE
if(!battery || battery.power_cell.charge == 0)
to_chat(usr, SPAN_WARNING("[src] emits a low power warning and immediately shuts down!"))
balloon_alert(usr, "low power")
return FALSE
return FALSE

Expand Down
Loading