diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 1080f868a45..2e99af52c3f 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -5841,7 +5841,7 @@ /area/maintenance/starboard/fore) "asc" = ( /obj/structure/table/wood, -/obj/item/gun/ballistic/automatic/toy/pistol/unrestricted, +/obj/item/gun/ballistic/automatic/pistol/toy, /obj/effect/turf_decal/tile/neutral{ dir = 1 }, diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index 68661c316ad..dfb5fd7733f 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -73,6 +73,9 @@ /// Flags for the pod_flags var on /obj/structure/closet/supplypod #define FIRST_SOUNDS (1<<0) // If it shouldn't play sounds the first time it lands, used for reverse mode +/// Flags for the gun_flags var for firearms +#define TOY_FIREARM_OVERLAY (1<<0) // If update_overlay would add some indicator that the gun is a toy, like a plastic cap on a pistol + /// Flags for sharpness in obj/item #define SHARP_EDGED (1<<0) #define SHARP_POINTY (1<<1) diff --git a/code/game/objects/items/storage/holsters.dm b/code/game/objects/items/storage/holsters.dm index 5a347dada27..5a359870baa 100644 --- a/code/game/objects/items/storage/holsters.dm +++ b/code/game/objects/items/storage/holsters.dm @@ -24,7 +24,6 @@ STR.set_holdable(list( /obj/item/gun/ballistic/automatic/pistol, /obj/item/gun/ballistic/revolver, - /obj/item/gun/ballistic/automatic/toy/pistol, /obj/item/gun/energy/e_gun/mini, /obj/item/gun/energy/disabler, /obj/item/gun/energy/dueling @@ -49,7 +48,6 @@ /obj/item/ammo_box/c38, // Revolver speedloaders. /obj/item/ammo_box/a357, /obj/item/ammo_box/a762, - /obj/item/gun/ballistic/automatic/toy/pistol, /obj/item/ammo_box/magazine/toy/pistol, /obj/item/gun/energy/e_gun/mini, /obj/item/gun/energy/disabler, @@ -108,7 +106,6 @@ /obj/item/ammo_box/c38, /obj/item/ammo_box/a357, /obj/item/ammo_box/a762, - /obj/item/gun/ballistic/automatic/toy/pistol, /obj/item/ammo_box/magazine/toy/pistol, /obj/item/gun/energy/kinetic_accelerator/crossbow, /obj/item/gun/energy/e_gun/mini, diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index ce5d8bd614c..9591e40f385 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -2192,8 +2192,8 @@ desc = "Psst.. hey bud... remember those old foam force pistols that got discontinued for being too cool? Well I got two of those right here with your name on em. I'll even throw in a spare mag for each, waddya say?" contraband = TRUE cost = CARGO_CRATE_VALUE * 8 - contains = list(/obj/item/gun/ballistic/automatic/toy/pistol, - /obj/item/gun/ballistic/automatic/toy/pistol, + contains = list(/obj/item/gun/ballistic/automatic/pistol/toy, + /obj/item/gun/ballistic/automatic/pistol/toy, /obj/item/ammo_box/magazine/toy/pistol, /obj/item/ammo_box/magazine/toy/pistol) crate_name = "foam force crate" diff --git a/code/modules/mining/abandoned_crates.dm b/code/modules/mining/abandoned_crates.dm index f86bce4268c..50c1add0b57 100644 --- a/code/modules/mining/abandoned_crates.dm +++ b/code/modules/mining/abandoned_crates.dm @@ -221,7 +221,7 @@ for(var/i in 1 to 4) new /obj/item/clothing/mask/balaclava(src) new /obj/item/gun/ballistic/shotgun/toy(src) - new /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted(src) + new /obj/item/gun/ballistic/automatic/pistol/toy(src) new /obj/item/gun/ballistic/automatic/toy/unrestricted(src) new /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted(src) new /obj/item/ammo_box/foambox(src) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 109898f1538..f9f95f3cfa2 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -21,6 +21,7 @@ attack_verb_continuous = list("strikes", "hits", "bashes") attack_verb_simple = list("strike", "hit", "bash") + var/gun_flags = NONE var/fire_sound = 'sound/weapons/gun/pistol/shot.ogg' var/vary_fire_sound = TRUE var/fire_sound_volume = 50 diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index a7fe375dc2d..960420e1ea1 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -153,6 +153,10 @@ . += MA if(!chambered && empty_indicator) //this is duplicated in c20's update_overlayss due to a layering issue with the select fire icon. . += "[icon_state]_empty" + + if(gun_flags & TOY_FIREARM_OVERLAY) + . += "[icon_state]_toy" + if (magazine && !internal_magazine) if (special_mags) . += "[icon_state]_mag_[initial(magazine.icon_state)]" @@ -177,7 +181,6 @@ if (capacity_number) . += "[icon_state]_mag_[capacity_number]" - /obj/item/gun/ballistic/process_chamber(empty_chamber = TRUE, from_firing = TRUE, chamber_next_round = TRUE) if(!semi_auto && from_firing) return diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index 04d816f8e68..93385667470 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -340,6 +340,8 @@ slot_flags = ITEM_SLOT_BACK actions_types = list() mag_display = TRUE + suppressor_x_offset = 3 + suppressor_y_offset = 3 /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate name = "syndicate sniper rifle" diff --git a/code/modules/projectiles/guns/ballistic/toy.dm b/code/modules/projectiles/guns/ballistic/toy.dm index ffdad6d584c..dcf96f1687b 100644 --- a/code/modules/projectiles/guns/ballistic/toy.dm +++ b/code/modules/projectiles/guns/ballistic/toy.dm @@ -12,40 +12,26 @@ can_suppress = TRUE clumsy_check = FALSE item_flags = NONE + gun_flags = TOY_FIREARM_OVERLAY casing_ejector = FALSE -/obj/item/gun/ballistic/automatic/toy/update_overlays() - . = ..() - . += "[icon_state]_toy" - /obj/item/gun/ballistic/automatic/toy/unrestricted pin = /obj/item/firing_pin -/obj/item/gun/ballistic/automatic/toy/pistol +/obj/item/gun/ballistic/automatic/pistol/toy name = "foam force pistol" desc = "A small, easily concealable toy handgun. Ages 8 and up." - icon_state = "pistol" - bolt_type = BOLT_TYPE_LOCKING - w_class = WEIGHT_CLASS_SMALL mag_type = /obj/item/ammo_box/magazine/toy/pistol fire_sound = 'sound/items/syringeproj.ogg' - burst_size = 1 - fire_delay = 0 - actions_types = list() + gun_flags = TOY_FIREARM_OVERLAY -/obj/item/gun/ballistic/automatic/toy/pistol/riot +/obj/item/gun/ballistic/automatic/pistol/toy/riot mag_type = /obj/item/ammo_box/magazine/toy/pistol/riot -/obj/item/gun/ballistic/automatic/toy/pistol/riot/Initialize() +/obj/item/gun/ballistic/automatic/pistol/riot/Initialize() magazine = new /obj/item/ammo_box/magazine/toy/pistol/riot(src) return ..() -/obj/item/gun/ballistic/automatic/toy/pistol/unrestricted - pin = /obj/item/firing_pin - -/obj/item/gun/ballistic/automatic/toy/pistol/riot/unrestricted - pin = /obj/item/firing_pin - /obj/item/gun/ballistic/shotgun/toy name = "foam force shotgun" desc = "A toy shotgun with wood furniture and a four-shell capacity underneath. Ages 8 and up." @@ -58,10 +44,7 @@ casing_ejector = FALSE can_suppress = FALSE pb_knockback = 0 - -/obj/item/gun/ballistic/shotgun/toy/update_overlays() - . = ..() - . += "[icon_state]_toy" + gun_flags = TOY_FIREARM_OVERLAY /obj/item/gun/ballistic/shotgun/toy/process_chamber(empty_chamber = 0) ..() @@ -92,6 +75,7 @@ mag_type = /obj/item/ammo_box/magazine/toy/smgm45/riot casing_ejector = FALSE clumsy_check = FALSE + gun_flags = TOY_FIREARM_OVERLAY /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted //Use this for actual toys pin = /obj/item/firing_pin @@ -100,10 +84,6 @@ /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted/riot mag_type = /obj/item/ammo_box/magazine/toy/smgm45/riot -/obj/item/gun/ballistic/automatic/c20r/toy/update_overlays() - . = ..() - . += "[icon_state]_toy" - /obj/item/gun/ballistic/automatic/l6_saw/toy //This is the syndicate variant with syndicate firing pin and riot darts. name = "donksoft LMG" desc = "A heavily modified toy light machine gun, designated 'L6 SAW'. Ages 8 and up." @@ -113,6 +93,7 @@ mag_type = /obj/item/ammo_box/magazine/toy/m762/riot casing_ejector = FALSE clumsy_check = FALSE + gun_flags = TOY_FIREARM_OVERLAY /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted //Use this for actual toys pin = /obj/item/firing_pin @@ -120,7 +101,3 @@ /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted/riot mag_type = /obj/item/ammo_box/magazine/toy/m762/riot - -/obj/item/gun/ballistic/automatic/l6_saw/toy/update_overlays() - . = ..() - . += "[icon_state]_toy" diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 1d6792dc5b7..0853001e651 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -550,7 +550,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) name = "Toy Pistol with Riot Darts" desc = "An innocent-looking toy pistol designed to fire foam darts. Comes loaded with riot-grade \ darts effective at incapacitating a target." - item = /obj/item/gun/ballistic/automatic/toy/pistol/riot + item = /obj/item/gun/ballistic/automatic/pistol/toy/riot cost = 2 surplus = 10 diff --git a/code/modules/vending/liberation_toy.dm b/code/modules/vending/liberation_toy.dm index 8e1e5f674ae..d5c247c0a25 100644 --- a/code/modules/vending/liberation_toy.dm +++ b/code/modules/vending/liberation_toy.dm @@ -7,7 +7,7 @@ vend_reply = "Come back for more!" circuit = /obj/item/circuitboard/machine/vending/syndicatedonksofttoyvendor products = list(/obj/item/gun/ballistic/automatic/toy/unrestricted = 10, - /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = 10, + /obj/item/gun/ballistic/automatic/pistol/toy = 10, /obj/item/gun/ballistic/shotgun/toy/unrestricted = 10, /obj/item/toy/sword = 10, /obj/item/ammo_box/foambox = 20, diff --git a/code/modules/vending/toys.dm b/code/modules/vending/toys.dm index 94d2c12e4cf..fa55857fb78 100644 --- a/code/modules/vending/toys.dm +++ b/code/modules/vending/toys.dm @@ -9,7 +9,7 @@ circuit = /obj/item/circuitboard/machine/vending/donksofttoyvendor products = list( /obj/item/gun/ballistic/automatic/toy/unrestricted = 10, - /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = 10, + /obj/item/gun/ballistic/automatic/pistol/toy = 10, /obj/item/gun/ballistic/shotgun/toy/unrestricted = 10, /obj/item/toy/sword = 10, /obj/item/ammo_box/foambox = 20, diff --git a/icons/obj/guns/projectile.dmi b/icons/obj/guns/projectile.dmi index 1c9c69ae535..fdd0d047f60 100644 Binary files a/icons/obj/guns/projectile.dmi and b/icons/obj/guns/projectile.dmi differ diff --git a/modular_skyrat/master_files/code/_globalvars/maint_loot_common.dm b/modular_skyrat/master_files/code/_globalvars/maint_loot_common.dm index bae629322bb..875a919e541 100644 --- a/modular_skyrat/master_files/code/_globalvars/maint_loot_common.dm +++ b/modular_skyrat/master_files/code/_globalvars/maint_loot_common.dm @@ -208,7 +208,7 @@ GLOBAL_LIST_INIT(common_loot, list( //common: basic items /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted = 25, /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted = 25, /obj/item/gun/ballistic/automatic/toy/unrestricted = 25, - /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted = 25, + /obj/item/gun/ballistic/automatic/pistol/toy = 25, /obj/item/gun/ballistic/shotgun/toy/unrestricted = 25, /obj/item/gun/ballistic/shotgun/toy/crossbow = 25, /obj/item/hot_potato/harmless/toy = 25,