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

Tweak modsuit holster module after bulky lasers #1770

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
30 changes: 30 additions & 0 deletions modular_ss220/mod/code/mod_modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,33 @@

/obj/item/mod/module/insignia/red/chaplain
color = "#f0a00c"

// holster tweak for bulky lasers
/obj/item/mod/module/holster
var/static/list/overridebulky = list(
/obj/item/gun/energy/gun,
/obj/item/gun/energy/gun/advtaser,
/obj/item/gun/energy/gun/nuclear,
/obj/item/gun/energy/immolator,
/obj/item/gun/energy/immolator/multi,
/obj/item/gun/energy/laser,
/obj/item/gun/energy/laser/retro,
/obj/item/gun/energy/laser/retro/old,
/obj/item/gun/energy/xray,
)

/obj/item/mod/module/holster/on_use()
if(!holstered)
var/obj/item/gun/holding = mod.wearer.get_active_hand()
if(!holding)
to_chat(mod.wearer, "<span class='warning'>Nothing to holster!</span>")
return
for(var/type in overridebulky)
if(holding.type == type)
holstered = holding
mod.wearer.visible_message("<span class='notice'>[mod.wearer] holsters [holstered].</span>", "<span class='notice'>You holster [holstered].</span>")
mod.wearer.unequip(mod.wearer.get_active_hand())
holstered.forceMove(src)
return
. = ..()
else . = ..()