Merge pull request #16529 from chafla/foam-fixes

Ensure only pistol-type weapons can be holstered
This commit is contained in:
variableundefined
2021-08-29 14:47:09 -05:00
committed by GitHub
10 changed files with 25 additions and 4 deletions
+1 -1
View File
@@ -56,7 +56,7 @@
var/knife_x_offset = 0
var/knife_y_offset = 0
var/can_holster = TRUE
var/can_holster = FALSE // Anything that can be holstered should be manually set
var/list/upgrades = list()
@@ -35,6 +35,7 @@
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
actions_types = list(/datum/action/item_action/toggle_gunlight)
shaded_charge = FALSE
can_holster = TRUE // Pistol sized, so it should fit into a holster
/obj/item/gun/energy/gun/mini/Initialize(mapload, ...)
gun_light = new /obj/item/flashlight/seclite(src)
@@ -57,6 +58,7 @@
ammo_x_offset = 4
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
shaded_charge = FALSE
can_holster = TRUE
/obj/item/gun/energy/gun/blueshield
name = "advanced stun revolver"
@@ -67,6 +69,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/electrode/hos, /obj/item/ammo_casing/energy/laser/hos)
ammo_x_offset = 1
shaded_charge = TRUE
can_holster = TRUE
/obj/item/gun/energy/gun/blueshield/pdw9
name = "PDW-9 taser pistol"
@@ -37,6 +37,7 @@
origin_tech = "combat=4;materials=4;biotech=5;plasmatech=6"
ammo_type = list(/obj/item/ammo_casing/energy/declone)
ammo_x_offset = 1
can_holster = TRUE
/obj/item/gun/energy/decloner/update_icon()
..()
@@ -56,6 +57,7 @@
modifystate = 1
ammo_x_offset = 1
selfcharge = 1
can_holster = TRUE
// Meteor Gun //
/obj/item/gun/energy/meteorgun
@@ -109,6 +111,7 @@
can_flashlight = 0
max_mod_capacity = 0
empty_state = null
can_holster = TRUE
/obj/item/gun/energy/kinetic_accelerator/crossbow/detailed_examine()
return "This is an energy weapon. To fire the weapon, have your gun mode set to 'fire', \
@@ -159,6 +162,7 @@
force = 12
sharp = 1
can_charge = 0
can_holster = TRUE
/obj/item/gun/energy/plasmacutter/examine(mob/user)
. = ..()
@@ -297,6 +301,7 @@
clumsy_check = 0
selfcharge = 1
ammo_x_offset = 3
can_holster = TRUE // you'll never see it coming
/obj/item/gun/energy/toxgun
name = "plasma pistol"
@@ -308,6 +313,7 @@
origin_tech = "combat=4;magnets=4;powerstorage=3"
ammo_type = list(/obj/item/ammo_casing/energy/toxplasma)
shaded_charge = 1
can_holster = TRUE
// Energy Sniper //
/obj/item/gun/energy/sniperrifle
@@ -636,6 +642,7 @@
selfcharge = 1
ammo_x_offset = 3
var/mimic_type = /obj/item/gun/projectile/automatic/pistol //Setting this to the mimicgun type does exactly what you think it will.
can_holster = TRUE
/obj/item/gun/energy/mimicgun/newshot()
var/obj/item/ammo_casing/energy/mimic/M = ammo_type[select]
@@ -6,6 +6,7 @@
origin_tech = "combat=3"
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
ammo_x_offset = 3
can_holster = TRUE // Pistol size
/obj/item/gun/energy/shock_revolver
name = "tesla revolver"
@@ -16,6 +17,8 @@
ammo_type = list(/obj/item/ammo_casing/energy/shock_revolver)
can_flashlight = 0
shaded_charge = FALSE
can_holster = TRUE
/obj/item/gun/energy/gun/advtaser
name = "hybrid taser"
@@ -26,6 +29,7 @@
ammo_x_offset = 2
flight_x_offset = 15
shaded_charge = FALSE
can_holster = TRUE // Pistol size
/obj/item/gun/energy/gun/advtaser/detailed_examine()
return "This is an energy weapon. To recharge this weapon, use a weapon recharger. \
@@ -49,6 +53,7 @@
origin_tech = "combat=3"
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
ammo_x_offset = 3
can_holster = TRUE
/obj/item/gun/energy/disabler/cyborg
name = "cyborg disabler"
+1
View File
@@ -18,6 +18,7 @@
origin_tech = null
clumsy_check = 0
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
can_holster = FALSE // Nothing here is a gun, and therefore shouldn't really fit into a holster
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
@@ -4,7 +4,6 @@
var/select = 1
can_tactical = TRUE
can_suppress = 1
can_holster = FALSE
burst_size = 3
fire_delay = 2
actions_types = list(/datum/action/item_action/toggle_firemode)
@@ -143,6 +142,7 @@
mag_type = /obj/item/ammo_box/magazine/uzim9mm
fire_sound = 'sound/weapons/gunshots/gunshot_pistol.ogg'
burst_size = 2
can_holster = TRUE // it's a mini-uzi after all
//M-90gl Carbine//
/obj/item/gun/projectile/automatic/m90
@@ -9,6 +9,7 @@
mag_type = /obj/item/ammo_box/magazine/internal/grenadelauncher
fire_sound = 'sound/weapons/grenadelaunch.ogg'
w_class = WEIGHT_CLASS_NORMAL
can_holster = FALSE // Not your normal revolver
/obj/item/gun/projectile/revolver/grenadelauncher/attackby(obj/item/A, mob/user, params)
..()
@@ -5,6 +5,7 @@
mag_type = /obj/item/ammo_box/magazine/internal/cylinder
origin_tech = "combat=3;materials=2"
fire_sound = 'sound/weapons/gunshots/gunshot_strong.ogg'
can_holster = TRUE
/obj/item/gun/projectile/revolver/New()
..()
@@ -158,6 +159,7 @@
fire_sound_text = null
lefthand_file = null
righthand_file = null
can_holster = FALSE // Get your fingers out of there!
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
clumsy_check = 0 //Stole your uplink! Honk!
needs_permit = 0 //go away beepsky
@@ -26,6 +26,7 @@
can_suppress = 0
burst_size = 1
fire_delay = 0
can_holster = TRUE
actions_types = list()
/obj/item/gun/projectile/automatic/toy/pistol/update_icon()
@@ -42,8 +43,8 @@
..()
/obj/item/gun/projectile/automatic/toy/pistol/enforcer
name = "Foam Enforcer"
desc = "A foam shooting version of the Enforcer meant to be used for training new caddets who can't be trusted with rubber bullets."
name = "foam Enforcer"
desc = "A foam-shooting version of the Enforcer meant to be used for training new cadets who can't be trusted with rubber bullets."
icon_state = "enforcer"
mag_type = /obj/item/ammo_box/magazine/toy/enforcer
can_flashlight = TRUE