diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index e35ca1eae9f..354543e2b85 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -900,6 +900,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) cost = 3 surplus = 10 +/datum/uplink_item/stealthy_weapons/false_briefcase + name = "False Bottomed Briefcase" + desc = "A modified briefcase capable of storing and firing a gun under a false bottom. Use a screwdriver to pry away the false bottom and make modifications. Distinguishable upon close examination due to the added weight." + reference = "FBBC" + item = /obj/item/storage/briefcase/false_bottomed + cost = 3 + /datum/uplink_item/stealthy_weapons/soap name = "Syndicate Soap" desc = "A sinister-looking surfactant used to clean blood stains to hide murders and prevent DNA analysis. You can also drop it underfoot to slip people." diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index 2450648cded..0a2a8bcfbbc 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -5,7 +5,7 @@ item_state = "briefcase" flags = CONDUCT hitsound = "swing_hit" - force = 8.0 + force = 8 throw_speed = 2 throw_range = 4 w_class = WEIGHT_CLASS_BULKY @@ -20,10 +20,69 @@ force = 10 /obj/item/storage/briefcase/sniperbundle/New() - ..() + ..() new /obj/item/gun/projectile/automatic/sniper_rifle/syndicate(src) new /obj/item/clothing/accessory/red(src) new /obj/item/clothing/under/syndicate/sniper(src) new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src) new /obj/item/ammo_box/magazine/sniper_rounds/soporific(src) - new /obj/item/suppressor/specialoffer(src) \ No newline at end of file + new /obj/item/suppressor/specialoffer(src) + +/obj/item/storage/briefcase/false_bottomed + max_w_class = WEIGHT_CLASS_SMALL + max_combined_w_class = 10 + + var/busy_hunting = FALSE + var/bottom_open = FALSE //is the false bottom open? + var/obj/item/stored_item = null //what's in the false bottom. If it's a gun, we can fire it + +/obj/item/storage/briefcase/false_bottomed/Destroy() + if(stored_item)//since the stored_item isn't in the briefcase' contents we gotta remind the game to delete it here. + QDEL_NULL(stored_item) + return ..() + +/obj/item/storage/briefcase/false_bottomed/afterattack(atom/A, mob/user, flag, params) + ..() + if(stored_item && istype(stored_item, /obj/item/gun) && !Adjacent(A)) + var/obj/item/gun/stored_gun = stored_item + stored_gun.afterattack(A, user, flag, params) + +/obj/item/storage/briefcase/false_bottomed/attackby(var/obj/item/I, mob/user) + if(isscrewdriver(I)) + if(!bottom_open && !busy_hunting) + to_chat(user, "You begin to hunt around the rim of the [src]...") + busy_hunting = TRUE + if(do_after(user, 20, target = src)) + if(user) + to_chat(user, "You pry open the false bottom!") + bottom_open = TRUE + busy_hunting = FALSE + else if(bottom_open) + to_chat(user, "You push the false bottom down and close it with a click[stored_item ? ", with the [stored_item] snugly inside." : "."]") + bottom_open = FALSE + else if(bottom_open) + if(stored_item) + to_chat(user, "There's already something in the false bottom!") + return + if(I.w_class > WEIGHT_CLASS_NORMAL) + to_chat(user, "The [I] is too big to fit in the false bottom!") + return + if(!user.drop_item(I)) + user << "The [I] is stuck to your hands!" + return + + stored_item = I + max_w_class = WEIGHT_CLASS_NORMAL - stored_item.w_class + I.forceMove(null) //null space here we go - to stop it showing up in the briefcase + to_chat(user, "You place the [I] into the false bottom of the briefcase.") + else + return ..() + +/obj/item/storage/briefcase/false_bottomed/attack_hand(mob/user) + if(bottom_open && stored_item) + user.put_in_hands(stored_item) + to_chat(user, "You pull out the [stored_item] from the [src]'s false bottom.") + stored_item = null + max_w_class = initial(max_w_class) + else + return ..() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index eea2c2253e8..0dc634bd958 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -184,7 +184,7 @@ return 0 return 1 -obj/item/gun/proc/newshot() +/obj/item/gun/proc/newshot() return /obj/item/gun/proc/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)