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

Fighter components can be alt-clicked to unload its contents #2769

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
17 changes: 16 additions & 1 deletion nsv13/code/modules/overmap/fighters/_fighters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ Been a mess since 2018, we'll fix it someday (probably)
name = "Peregrine class attack fighter"
desc = "A Peregrine class attack fighter, solgov's only premiere fighter, mounting minature capital grade phasers and a tiny shield generator."
icon = 'nsv13/icons/overmap/new/solgov/playablefighter.dmi'
armor = list("melee" = 60, "bullet" = 60, "laser" = 60, "energy" = 30, "bomb" = 30, "bio" = 100, "rad" = 90, "fire" = 90, "acid" = 80, "overmap_light" = 5, "overmap_medium" = 0, "overmap_heavy" = 10)
armor = list("melee" = 60, "bullet" = 60, "laser" = 60, "energy" = 30, "bomb" = 30, "bio" = 100, "rad" = 90, "fire" = 90, "acid" = 80, "overmap_light" = 5, "overmap_medium" = 0, "overmap_heavy" = 10)
sprite_size = 32
damage_states = FALSE //temp
max_integrity = 25 //shields.
Expand Down Expand Up @@ -941,6 +941,21 @@ due_to_damage: Was this called voluntarily (FALSE) or due to damage / external c
/obj/item/fighter_component/proc/toggle()
active = !active

/obj/item/fighter_component/AltClick(mob/user)
. = ..()
if(!Adjacent(user))
return
if(!isliving(user))
return
if(!length(contents))
to_chat(user, "<span class='warning'>There is nothing to unload from [src]!</span>")
return
to_chat(user, "<span class='notice'>You start to unload [src]'s stored contents...</span>")
if(!do_after(user, 5 SECONDS, target=src))
return
to_chat(user, "<span class='notice>You dump [src]'s contents.</span>")
dump_contents()

/obj/item/fighter_component/proc/dump_contents()
if(!length(contents))
return FALSE
Expand Down
Loading