Skip to content

Commit

Permalink
Inventory adjustments (BeeStation#9337)
Browse files Browse the repository at this point in the history
* Initial ballpark numbers

* tweaks value

* Update backpack.dm

* adjusts storage implant

* storage implant is back to old values

* Increases bag sizes across the board

* Revert "Increases bag sizes across the board"

This reverts commit 46bd592.

* Update belt.dm

* Detective tweaks

Detective has a disproportionate amount of large equipment to carry around, and this helps to enable them to do so.

* Cigar cases are now small

* Revert "Revert "Increases bag sizes across the board""

This reverts commit ae6e520.

* Family heirloom buffed

* Revert "Family heirloom buffed"

This reverts commit 994efde.

* Re-updates family heirloom

* Updates internals boxes

Survival boxes are small
Hold up to 5 items
Can only hold survival items
No more crowbar in miner box

Can be collapsed and rebuilt into a normal box if someone so wishes, but this will improve the experience for the vast majority of players like this.

* Security belts

Security belts now have 7 slots

Officers, Warden and HoS start with loaded sec belts instead of nearly a full belt's worth of loose tools

* Revert "Cigar cases are now small"

This reverts commit eca35b8.

* Revert "Re-updates family heirloom"

This reverts commit 05dd0aa.

* Creates WEIGHT_CLASS_LARGE

* Belts are now bulky

* Boxes are now large

and hold up to a maximum capacity of 8

* Duffel to 40

* Belts can all hold 7 large items

Exception to fanny pack which can hold 5 small items,

* Update belt.dm

* Briefcases can now hold 28 items too

* Bigifies various items

* fixes storage implant

* tidying up

* Helps if bags can actually hold large items

* Security survival box is now small

* Fixes clown survival box

* New icon for survival boxes

Also cleans up security box a bit.

* Medkits reversion (mostly)

Large and fits in bags, but not in belt/coat slots.

Doctor's bag is still bulky and fits in coat/belt slots.

Doctor's bag sprite is now forced over basic medkit sprite.

* All labcoats are now equal.

All labcoats now benefit equally

* Compressed matter in construction bags

* fixes internals boxes not calling up the chain

* Max of three rows of items in bags

Requested by Bacon

* fixes examine for large items

* Updates some files that use weight class

* Updates more files that use weight class

* Fixes detective revolver

* Fixes compression kit and improves its logic

* whoops

* properly implements exception_hold

* Fixes safe and supressor

* FIxes combat medkit

* Update pockets.dm
  • Loading branch information
Rukofamicom authored Nov 5, 2023
1 parent d558e30 commit 1cb8e5f
Show file tree
Hide file tree
Showing 86 changed files with 343 additions and 262 deletions.
2 changes: 1 addition & 1 deletion _maps/map_files/Mining/Lavaland.dmm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion _maps/shuttles/hunter/hunter_space_cop.dmm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions code/__DEFINES/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
//! ## ITEM INVENTORY WEIGHT, FOR w_class
#define WEIGHT_CLASS_TINY 1 //! Usually items smaller then a human hand, (e.g. playing cards, lighter, scalpel, coins/holochips)
#define WEIGHT_CLASS_SMALL 2 //! Pockets can hold small and tiny items, (e.g. flashlight, multitool, grenades, GPS device)
#define WEIGHT_CLASS_NORMAL 3 //! Standard backpacks can carry tiny, small & normal items, (e.g. fire extinguisher, stun baton, gas mask, iron sheets)
#define WEIGHT_CLASS_BULKY 4 //! Items that can be wielded or equipped but not stored in an inventory, (e.g. defibrillator, backpack, space suits)
#define WEIGHT_CLASS_HUGE 5 //! Usually represents objects that require two hands to operate, (e.g. shotgun, two-handed melee weapons)
#define WEIGHT_CLASS_GIGANTIC 6 //! Essentially means it cannot be picked up or placed in an inventory, (e.g. mech parts, safe)
#define WEIGHT_CLASS_NORMAL 4 //! Items which do not fit in pockets, but still fit easily into a backpack, (e.g. gas mask, iron sheets)
#define WEIGHT_CLASS_LARGE 8 //! The upper end of items that fit in backpacks, and take up a large amount of its space (e.g. Boxes, Stun Batons, Fire extinguishers)
#define WEIGHT_CLASS_BULKY 10 //! Items that can be wielded or equipped but not stored in an inventory, (e.g. defibrillator, backpack, space suits)
#define WEIGHT_CLASS_HUGE 12 //! Usually represents objects that require two hands to operate, (e.g. shotgun, two-handed melee weapons)
#define WEIGHT_CLASS_GIGANTIC 15 //! Essentially means it cannot be picked up or placed in an inventory, (e.g. mech parts, safe)

//Inventory depth: limits how many nested storage items you can access directly.
//1: stuff in mob, 2: stuff in backpack, 3: stuff in box in backpack, etc
Expand Down
2 changes: 2 additions & 0 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,8 @@ GLOBAL_LIST_INIT(alphabet, list("a","b","c","d","e","f","g","h","i","j","k","l",
. = "small"
if(WEIGHT_CLASS_NORMAL)
. = "normal-sized"
if(WEIGHT_CLASS_LARGE)
. = "large"
if(WEIGHT_CLASS_BULKY)
. = "bulky"
if(WEIGHT_CLASS_HUGE)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/brain_damage/mild.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
else if(owner.get_active_held_item())
var/drop_chance = 1
var/obj/item/I = owner.get_active_held_item()
drop_chance += I.w_class
drop_chance += I.w_class / 2
if(prob(drop_chance) && owner.dropItemToGround(I))
to_chat(owner, "<span class='warning'>You drop [I]!</span>")

Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/storage/concrete/implant.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/datum/component/storage/concrete/implant
max_w_class = WEIGHT_CLASS_NORMAL
max_combined_w_class = 6
max_combined_w_class = 16
max_items = 2
drop_all_on_destroy = TRUE
drop_all_on_deconstruct = TRUE
Expand Down
10 changes: 6 additions & 4 deletions code/datums/components/storage/concrete/pockets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
return original_parent

/datum/component/storage/concrete/pockets/holster
max_items = 3
max_w_class = WEIGHT_CLASS_NORMAL
max_items = 2
max_w_class = WEIGHT_CLASS_LARGE
var/atom/original_parent

/datum/component/storage/concrete/pockets/holster/Initialize()
Expand All @@ -86,7 +86,8 @@
can_hold = typecacheof(list(
/obj/item/gun/ballistic/automatic/pistol,
/obj/item/gun/ballistic/revolver,
/obj/item/ammo_box))
/obj/item/ammo_box,
/obj/item/ammo_casing))

/datum/component/storage/concrete/pockets/holster/real_location()
// if the component is reparented to a jumpsuit, the items still go in the protector
Expand All @@ -97,7 +98,8 @@
. = ..()
can_hold = typecacheof(list(
/obj/item/gun/ballistic/revolver/detective,
/obj/item/ammo_box/c38))
/obj/item/ammo_box/c38,
/obj/item/ammo_casing/c38))

/datum/component/storage/concrete/pockets/helmet
quickdraw = TRUE
Expand Down
28 changes: 15 additions & 13 deletions code/datums/components/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
dupe_mode = COMPONENT_DUPE_UNIQUE
var/datum/component/storage/concrete/master //If not null, all actions act on master and this is just an access point.

var/list/can_hold //if this is set, only things in this typecache will fit.
var/list/can_hold //if this is set, only things in this typecache will fit, unless
var/list/cant_hold //if this is set, anything in this typecache will not be able to fit.
var/list/exception_hold //if set, these items will be the exception to the max size of object that can fit.
var/list/exception_hold //if this is set, items in this typecache will ignore size limitations, only respecting max_items
/// If set can only contain stuff with this single trait present.
var/list/can_hold_trait

Expand Down Expand Up @@ -635,17 +635,19 @@
if(!stop_messages)
host.balloon_alert(M, "It doesn't fit")
return FALSE
if(I.w_class > max_w_class)
if(!stop_messages)
host.balloon_alert(M, "[I] is too big")
return FALSE
var/sum_w_class = I.w_class
for(var/obj/item/_I in real_location)
sum_w_class += _I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
if(sum_w_class > max_combined_w_class)
if(!stop_messages)
host.balloon_alert(M, "[host] is full")
return FALSE
if(!length(exception_hold) || !is_type_in_typecache(I, exception_hold))
if(I.w_class > max_w_class)
if(!stop_messages)
host.balloon_alert(M, "[I] is too big")
return FALSE
var/sum_w_class = I.w_class
for(var/obj/item/_I in real_location)
if(!length(exception_hold) || !is_type_in_typecache(I, exception_hold)) //we want to exclude items that are part of the exception list from counting toward capacity.
sum_w_class += _I.w_class //Adds up the combined w_classes which will be in the storage item if the item is added to it.
if(sum_w_class > max_combined_w_class)
if(!stop_messages)
host.balloon_alert(M, "[host] is full")
return FALSE
if(isitem(host))
var/obj/item/IP = host
var/datum/component/storage/STR_I = I.GetComponent(/datum/component/storage)
Expand Down
38 changes: 38 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1409,3 +1409,41 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
*/
/obj/item/proc/get_writing_implement_details()
return null

/// Increases weight class by one class and returns true, or else returns false
/obj/item/proc/weight_class_up()
switch(w_class)
if(WEIGHT_CLASS_TINY)
w_class = WEIGHT_CLASS_SMALL
if(WEIGHT_CLASS_SMALL)
w_class = WEIGHT_CLASS_NORMAL
if(WEIGHT_CLASS_NORMAL)
w_class = WEIGHT_CLASS_LARGE
if(WEIGHT_CLASS_LARGE)
w_class = WEIGHT_CLASS_BULKY
if(WEIGHT_CLASS_BULKY)
w_class = WEIGHT_CLASS_HUGE
if(WEIGHT_CLASS_HUGE)
w_class = WEIGHT_CLASS_GIGANTIC
else
return FALSE
return TRUE

/// Decreases weight class by one class and returns true, or else returns false
/obj/item/proc/weight_class_down()
switch(w_class)
if(WEIGHT_CLASS_SMALL)
w_class = WEIGHT_CLASS_TINY
if(WEIGHT_CLASS_NORMAL)
w_class = WEIGHT_CLASS_SMALL
if(WEIGHT_CLASS_LARGE)
w_class = WEIGHT_CLASS_NORMAL
if(WEIGHT_CLASS_BULKY)
w_class = WEIGHT_CLASS_LARGE
if(WEIGHT_CLASS_HUGE)
w_class = WEIGHT_CLASS_BULKY
if(WEIGHT_CLASS_GIGANTIC)
w_class = WEIGHT_CLASS_HUGE
else
return FALSE

2 changes: 1 addition & 1 deletion code/game/objects/items/RCD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RLD
throwforce = 10
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
materials = list(/datum/material/iron=100000)
req_access_txt = "11"
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 50, STAMINA = 0)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/RCL.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
throwforce = 5
throw_speed = 1
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
var/max_amount = 90
var/active = FALSE
actions_types = list(/datum/action/item_action/rcl_col,/datum/action/item_action/rcl_gui,)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/RPD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ GLOBAL_LIST_INIT(fluid_duct_recipes, list(
throwforce = 10
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
slot_flags = ITEM_SLOT_BELT
materials = list(/datum/material/iron=75000, /datum/material/glass=37500)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 50, STAMINA = 0)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/broom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
throwforce = 10
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
attack_verb = list("swept", "brushed off", "bludgeoned", "whacked")
resistance_flags = FLAMMABLE

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/chainsaw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
name = "super energy chainsaw"
desc = "The chainsaw you want when you need to kill every damn thing in the room."
force_on = 60
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
block_power = 75
block_level = 1
attack_weight = 3 //fear him
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/defib.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
icon_state = "defibcompact"
item_state = "defibcompact"
worn_icon_state = "defibcompact"
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
slot_flags = ITEM_SLOT_BELT

/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/deployable/rollerbed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "A collapsed roller bed that can be carried around."
icon = 'icons/obj/beds_chairs/rollerbed.dmi'
icon_state = "folded"
w_class = WEIGHT_CLASS_NORMAL // No more excuses, stop getting blood everywhere
w_class = WEIGHT_CLASS_LARGE // No more excuses, stop getting blood everywhere

/obj/item/rollerbed/ComponentInitialize()
. = ..()
Expand Down
34 changes: 16 additions & 18 deletions code/game/objects/items/devices/compressionkit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,25 @@
return
if(istype(target, /obj/item))
var/obj/item/O = target
if(O.w_class == 1)
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1)
to_chat(user, "<span class='notice'>[target] cannot be compressed smaller!.</span>")
return
if(O.GetComponent(/datum/component/storage))
to_chat(user, "<span class='notice'>You can't make this item any smaller without compromising its storage functions!.</span>")
return
if(O.w_class > 1)
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] is compressing [O] with their bluespace compression kit!</span>")
if(do_after(user, 40, O) && charges > 0 && O.w_class > 1)
playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1)
sparks()
flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN)
O.w_class -= 1
// O.force_mult -= damage_multiplier
charges -= 1
to_chat(user, "<span class='notice'>You successfully compress [target]! The compressor now has [charges] charges.</span>")
else
to_chat(user, "<span class='notice'>Anomalous error. Summon a coder.</span>")

if(O.w_class == WEIGHT_CLASS_TINY)
playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, 1)
to_chat(user, "<span class='notice'>[target] cannot be compressed smaller!.</span>")
return
playsound(get_turf(src), 'sound/weapons/flash.ogg', 50, 1)
user.visible_message("<span class='warning'>[user] is compressing [O] with their bluespace compression kit!</span>")
if(do_after(user, 40, O) && charges > 0 && O.w_class > 1)
playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 50, 1)
sparks()
flash_lighting_fx(3, 3, LIGHT_COLOR_CYAN)
if(!O.weight_class_down())
//This item does not have a normal weight class for some reason, because small items should have already been caught above
to_chat(user, "<span class='danger'>Bluespace compression has encountered a critical error and stopped working, please report this your superiors.</span>")
return
charges -= 1
to_chat(user, "<span class='notice'>You successfully compress [target]! The compressor now has [charges] charges.</span>")

/obj/item/compressionkit/attackby(obj/item/I, mob/user, params)
..()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/extinguisher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
hitsound = 'sound/weapons/smash.ogg'
flags_1 = CONDUCT_1
throwforce = 10
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
throw_speed = 2
throw_range = 7
force = 10
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/flamethrower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var/deac_sound = 'sound/items/welderdeactivate.ogg'
throw_speed = 1
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
item_flags = ISWEAPON
materials = list(/datum/material/iron=500)
resistance_flags = FIRE_PROOF
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/holy_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
name = "unholy pitchfork"
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
desc = "Holding this makes you look absolutely devilish."
attack_verb = list("poked", "impaled", "pierced", "jabbed")
hitsound = 'sound/weapons/bladeslice.ogg'
Expand All @@ -859,7 +859,7 @@
item_state = "pharoah_sceptre"
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
attack_verb = list("bashes", "smacks", "whacks")

/obj/item/nullrod/hypertool
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/mop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
block_upgrade_walk = 1
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
attack_verb = list("mopped", "bashed", "bludgeoned", "whacked")
resistance_flags = FLAMMABLE
var/mopping = 0
Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/items/pneumaticCannon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
name = "improvised pneumatic cannon"
desc = "A gas-powered, object-firing cannon made out of common parts."
force = 5
w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_LARGE
maxWeightClass = 7
gasPerThrow = 5
fire_mode = PCANNON_FIFO
Expand Down Expand Up @@ -275,7 +275,7 @@
range_multiplier = 3
fire_mode = PCANNON_FIFO
throw_amount = 1
maxWeightClass = 150 //50 pies. :^)
maxWeightClass = 200 //50 pies. :^)
clumsyCheck = FALSE
var/static/list/pie_typecache = typecacheof(/obj/item/reagent_containers/food/snacks/pie)

Expand All @@ -287,7 +287,7 @@
automatic = TRUE
selfcharge = TRUE
charge_type = /obj/item/reagent_containers/food/snacks/pie/cream
maxWeightClass = 60 //20 pies.
maxWeightClass = 80 //20 pies.

/obj/item/pneumatic_cannon/pie/selfcharge/compact
name = "honkinator-4 compact pie cannon"
Expand All @@ -298,7 +298,7 @@
name = "low velocity pie cannon"
automatic = FALSE
charge_type = /obj/item/reagent_containers/food/snacks/pie/cream/nostun
maxWeightClass = 6 //2 pies
maxWeightClass = 8 //2 pies
charge_ticks = 2 //4 second/pie

/obj/item/pneumatic_cannon/speargun
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/spear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
block_upgrade_walk = 1
throwforce = 20
throw_speed = 4
embedding = list("armour_block" = 60)
embedding = list("armour_block" = 60, "max_damage_mult" = 0.5)
armour_penetration = 10
materials = list(/datum/material/iron=1150, /datum/material/glass=2075)
hitsound = 'sound/weapons/bladeslice.ogg'
Expand Down Expand Up @@ -186,7 +186,7 @@
block_upgrade_walk = 1
throwforce = 22
throw_speed = 4
embedding = list("armour_block" = 30)
embedding = list("armour_block" = 30, "max_damage_mult" = 0.5)
armour_penetration = 10
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "tore", "gored")
Expand Down
Loading

0 comments on commit 1cb8e5f

Please sign in to comment.