Skip to content

Commit

Permalink
bulky holster
Browse files Browse the repository at this point in the history
  • Loading branch information
kyunkyunkyun committed Feb 3, 2025
1 parent e00302b commit c3863ad
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 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,48 @@

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

// holster tweak for bulky lasers
/obj/item/mod/module/holster
var/static/list/forbidden = typesof(
/obj/item/gun/rocketlauncher,
/obj/item/gun/energy/lasercannon,
/obj/item/gun/energy/lwap,
/obj/item/gun/energy/emitter,
/obj/item/gun/energy/pulse,
/obj/item/gun/energy/bsg,
/obj/item/gun/energy/meteorgun,
/obj/item/gun/energy/temperature,
/obj/item/gun/projectile/automatic/wt550,
/obj/item/gun/projectile/automatic/laserrifle,
/obj/item/gun/projectile/automatic/speargun,
/obj/item/gun/projectile/revolver/overgrown,
/obj/item/gun/projectile/revolver/doublebarrel,
/obj/item/gun/projectile/shotgun,
/obj/item/gun/projectile/automatic/sslr,
/obj/item/gun/projectile/automatic/shotgun/bulldog,
)

/obj/item/mod/module/holster/on_use()
var/msg = "[holstered]"
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
if(!istype(holding) || holding.w_class > WEIGHT_CLASS_BULKY)
to_chat(mod.wearer, "<span class='warning'>It's too big to fit!</span>")
return
for(var/type in forbidden)
if(istype(holding, type) && holding.w_class > WEIGHT_CLASS_NORMAL) //god no holstering a BSG / combat shotgun
to_chat(mod.wearer, "<span class='warning'>It's too big to fit!</span>")
return
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)
else if(mod.wearer.put_in_active_hand(holstered))
mod.wearer.visible_message("<span class='warning'>[mod.wearer] draws [msg], ready to shoot!</span>", \
"<span class='warning'>You draw [msg], ready to shoot!</span>")
else
to_chat(mod.wearer, "<span class='warning'>You need an empty hand to draw [holstered]!</span>")

0 comments on commit c3863ad

Please sign in to comment.