Borg Bag Fixes and Refactors (#20578)

Fixes #19603
Fixes #20558

- bugfix: "Fixes plant bags - now uses storage_slot system, along with
other bag subtypes."
  - bugfix: "Borgs can interact with tables again."
  - refactor: "Refactors make_exact_fit to be a binary variable."
- refactor: "Refactors storage items to use make_exact_fit instead of
arbitrary max_storage_space values."
- refactor: "Refactors storage items to use defines for storage space."
  - bugfix: "Fixes monkey cube boxes having superfluous overlay."
  - rscadd: "Updates the progress bar toggle message."
- qol: "Objects that rotated 90 degrees in storage no longer rotate in
storage slots."
 
<img width="732" alt="dreamseeker_qRVkIlYN78"
src="https://github.com/user-attachments/assets/1226ed22-52c1-4965-a1b4-2290e56a2ab3"
/>
This commit is contained in:
Wowzewow (Wezzy)
2025-03-12 09:12:27 +00:00
committed by GitHub
parent 696eae5d7b
commit f046ebe584
39 changed files with 183 additions and 137 deletions
+5 -3
View File
@@ -22,6 +22,8 @@
//in exchange for being limited in the w_class of items that will fit
#define BASE_STORAGE_CAPACITY(w_class) (7*(w_class-1))
#define DEFAULT_BACKPACK_STORAGE BASE_STORAGE_CAPACITY(5)
#define DEFAULT_LARGEBOX_STORAGE BASE_STORAGE_CAPACITY(4)
#define DEFAULT_BOX_STORAGE BASE_STORAGE_CAPACITY(3)
#define DEFAULT_HOLDING_STORAGE BASE_STORAGE_CAPACITY(9)
#define DEFAULT_DUFFELBAG_STORAGE BASE_STORAGE_CAPACITY(6)
#define DEFAULT_BACKPACK_STORAGE BASE_STORAGE_CAPACITY(5)
#define DEFAULT_LARGEBOX_STORAGE BASE_STORAGE_CAPACITY(4)
#define DEFAULT_BOX_STORAGE BASE_STORAGE_CAPACITY(3)
+4 -4
View File
@@ -526,11 +526,11 @@
w_class = WEIGHT_CLASS_HUGE
can_hold = list(/obj/item/stock_parts,/obj/item/reagent_containers/glass/beaker)
storage_slots = 50
use_to_pickup = 1
allow_quick_gather = 1
allow_quick_empty = 1
use_to_pickup = TRUE
allow_quick_gather = TRUE
allow_quick_empty = TRUE
collection_mode = 1
display_contents_with_number = 1
display_contents_with_number = TRUE
max_w_class = WEIGHT_CLASS_NORMAL
max_storage_space = 100
+2 -1
View File
@@ -19,6 +19,8 @@
var/storage_cost
var/storage_slot_sort_by_name = FALSE
///Dimensions of the icon file used when this item is worn, eg: hats.dmi (32x32 sprite, 64x64 sprite, etc.). Allows inhands/worn sprites to be of any size, but still centered on a mob properly
var/worn_x_dimension = 32
@@ -223,7 +225,6 @@
///Used to override hardcoded clothing dmis in human clothing pr
var/icon_override
var/charge_failure_message = " cannot be recharged."
var/held_maptext
+1 -1
View File
@@ -149,11 +149,11 @@
use_sound = 'sound/items/storage/wrapper.ogg'
open_sound = /singleton/sound_category/rip_sound
open_message = "You tear open the bag, breaking the vacuum seal."
make_exact_fit = TRUE
/obj/item/storage/box/fancy/vkrexi_swollen_organ/fill()
new /obj/item/reagent_containers/food/drinks/bottle/skyemok(src)
. = ..()
make_exact_fit()
/obj/item/storage/box/fancy/vkrexi_swollen_organ/attack_self(mob/user)
open(user)
+2 -1
View File
@@ -44,7 +44,8 @@
/obj/item/card/update_icon()
var/matrix/tf = matrix()
if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
if(istype(S, /obj/item/storage) && !S.storage_slots)
tf.Turn(-90) //Vertical for storing compactly
tf.Translate(-1, 0) //Could do this with pixel_x but let's just update the appearance once.
transform = tf
@@ -140,7 +140,7 @@
icon_state = "holdingpack"
item_state = "holdingpack"
max_w_class = WEIGHT_CLASS_BULKY
max_storage_space = 56
max_storage_space = DEFAULT_HOLDING_STORAGE
storage_cost = 29
empty_delay = 0.8 SECOND
@@ -157,15 +157,6 @@
return 1
return ..()
/obj/item/storage/backpack/santabag
name = "\improper Santa's gift bag"
desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!"
icon_state = "giftbag0"
item_state = "giftbag"
w_class = WEIGHT_CLASS_BULKY
max_storage_space = 200 // can store a ton of shit!
empty_delay = 1 SECOND
/obj/item/storage/backpack/cultpack
name = "trophy rack"
desc = "It's useful for both carrying extra gear and proudly declaring your insanity."
@@ -395,7 +386,7 @@
icon = 'icons/obj/unathi_items.dmi'
icon_state = "hegemony_satchel"
item_state = "hegemony_satchel"
max_storage_space = 32
max_storage_space = DEFAULT_DUFFELBAG_STORAGE
allow_quick_empty = FALSE // Pouches 'n shit.
/obj/item/storage/backpack/satchel/eng
@@ -563,7 +554,7 @@
w_class = WEIGHT_CLASS_HUGE // to avoid recursive backpacks
slot_flags = SLOT_BACK
max_w_class = WEIGHT_CLASS_NORMAL
max_storage_space = 20
max_storage_space = DEFAULT_LARGEBOX_STORAGE
build_from_parts = TRUE
worn_overlay = "overlay"
@@ -580,7 +571,6 @@
desc = "A small, fashionable bag typically worn over the shoulder."
icon_state = "purse"
item_state = "purse"
max_storage_space = 16
straps = FALSE
// Duffel Bags
@@ -592,7 +582,7 @@
icon_state = "duffel"
item_state = "duffel"
slowdown = 1
max_storage_space = 38
max_storage_space = DEFAULT_DUFFELBAG_STORAGE
straps = TRUE
/obj/item/storage/backpack/duffel/cap
@@ -926,7 +916,7 @@
contained_sprite = FALSE
w_class = WEIGHT_CLASS_HUGE
slot_flags = SLOT_BACK
max_storage_space = 12
max_storage_space = DEFAULT_BOX_STORAGE
canremove = FALSE
species_restricted = list(BODYTYPE_VAURCA_BREEDER)
sprite_sheets = list(BODYTYPE_VAURCA_BREEDER = 'icons/mob/species/breeder/back.dmi')
@@ -18,10 +18,11 @@
// Generic non-item
/obj/item/storage/bag
allow_quick_gather = 1
allow_quick_empty = 1
display_contents_with_number = 0 // UNStABLE AS FuCK, turn on when it stops crashing clients
use_to_pickup = 1
allow_quick_gather = TRUE
allow_quick_empty = TRUE
display_contents_with_number = TRUE
use_to_pickup = TRUE
storage_slots = 7
slot_flags = SLOT_BELT
var/use_deferred = TRUE
icon = 'icons/obj/storage/bags.dmi'
@@ -40,7 +41,8 @@
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_SMALL
max_storage_space = 56
storage_slots = 50
max_storage_space = DEFAULT_HOLDING_STORAGE
can_hold = null // any
cant_hold = list(/obj/item/disk/nuclear)
drop_sound = 'sound/items/drop/wrapper.ogg'
@@ -106,6 +108,7 @@
desc = "It's a very flimsy, very noisy alternative to a bag."
icon_state = "plasticbag"
item_state = "plasticbag"
storage_slots = null
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_SMALL
can_hold = null // any
@@ -122,11 +125,15 @@
desc = "For storing your stems, seeds, buds, and any other illicit substances."
icon_state = "plantbag"
item_state = "plantbag"
storage_slots = 50
max_storage_space = 100
max_w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_SMALL
can_hold = list(/obj/item/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/grown)
/obj/item/storage/bag/plants/full
starts_with = list(/obj/random_produce/box = 50)
// -----------------------------
// Sheet Snatcher
// -----------------------------
@@ -142,7 +149,7 @@
w_class = WEIGHT_CLASS_NORMAL
storage_slots = 7
allow_quick_empty = 1 // this function is superceded
allow_quick_empty = TRUE // this function is superceded
use_deferred = FALSE
/obj/item/storage/bag/sheetsnatcher/can_be_inserted(obj/item/W as obj, stop_messages = 0)
@@ -303,7 +310,6 @@
name = "book bag"
desc = "A bag for books."
icon_state = "bookbag"
storage_slots = 7
max_storage_space = 200
max_w_class = WEIGHT_CLASS_NORMAL
w_class = WEIGHT_CLASS_NORMAL
@@ -423,7 +423,7 @@
item_state = "militarybelt"
storage_slots = 9 //same as a combat belt now
max_w_class = WEIGHT_CLASS_NORMAL
max_storage_space = 28
max_storage_space = DEFAULT_BACKPACK_STORAGE
can_hold = list(
/obj/item/grenade,
/obj/item/handcuffs,
@@ -454,10 +454,7 @@
name = "box of tethering devices"
desc = "A box containing eight electro-tethers, used primarily to keep track of partners during expeditions."
starts_with = list(/obj/item/tethering_device = 8)
/obj/item/storage/box/tethers/fill()
..()
make_exact_fit()
make_exact_fit = TRUE
/obj/item/storage/box/teargas
name = "box of pepperspray grenades"
@@ -609,7 +606,7 @@
/obj/item/storage/box/janitorgloves
name = "janitorial gloves box"
desc = "A box full of janitorial gloves of all shapes and sizes."
max_storage_space = 4
make_exact_fit = TRUE
can_hold = list(
/obj/item/clothing/gloves/janitor
)
@@ -626,10 +623,10 @@
desc_extended = "The manufacture of a cubed animal produces subjects that are similar but have marked differences compared to their ordinary cousins. Higher brain functions are all but destroyed \
and the life expectancy of the cubed animal is greatly reduced, with most expiring only a few days after introduction with water."
icon_state = "monkeycubebox"
illustration = null
can_hold = list(/obj/item/reagent_containers/food/snacks/monkeycube)
starts_with = list(/obj/item/reagent_containers/food/snacks/monkeycube/wrapped = 5)
/obj/item/storage/box/monkeycubes/farwacubes
name = "farwa cube box"
desc = "Drymate brand farwa cubes, shipped from Adhomai. Just add water!"
@@ -716,11 +713,8 @@
name = "box of replacement bulbs"
illustration = "light"
desc = "This box is shaped on the inside so that only light tubes and bulbs fit."
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/storage/box/lights/Initialize() // TODO-STORAGE: Initialize()?
. = ..()
make_exact_fit()
use_to_pickup = TRUE // for picking up broken bulbs, not that most people will try
make_exact_fit = TRUE
/obj/item/storage/box/lights/bulbs
starts_with = list(/obj/item/light/bulb = 21)
@@ -918,10 +912,7 @@
icon_state = "largebox"
illustration = "fruit"
starts_with = list(/obj/random_produce/box = 15)
/obj/item/storage/box/produce/fill()
. = ..()
make_exact_fit()
make_exact_fit = TRUE
/obj/item/storage/box/candy
@@ -929,6 +920,7 @@
desc = "A large box of assorted small candy."
icon_state = "largebox"
illustration = "writing_large"
make_exact_fit = TRUE
/obj/item/storage/box/candy/fill()
var/list/assorted_list = list(
@@ -948,8 +940,6 @@
var/chosen_candy = pickweight(assorted_list)
new chosen_candy(src)
make_exact_fit()
/obj/item/storage/box/crabmeat
name = "box of crab legs"
@@ -1072,7 +1062,7 @@
illustration = null
icon_state = "sharpsbox"
use_sound = 'sound/items/storage/briefcase.ogg'
max_storage_space = 20
max_storage_space = DEFAULT_LARGEBOX_STORAGE
chewable = FALSE
foldable = null
@@ -1084,7 +1074,7 @@
/obj/item/storage/box/aggression
desc_antag = "This box contains various implants that will make their owners increasingly aggressive."
illustration = "implant"
max_storage_space = 12
max_storage_space = DEFAULT_BOX_STORAGE
starts_with = list(/obj/item/implantcase/aggression = 6, /obj/item/implanter = 1, /obj/item/implantpad = 1)
/obj/item/storage/box/encryption_key
@@ -1213,7 +1203,7 @@
icon_state = "largebox"
illustration = "flare"
foldable = FALSE
max_storage_space = 12
max_storage_space = DEFAULT_BOX_STORAGE
can_hold = list(
/obj/item/device/flashlight/flare
)
@@ -1228,7 +1218,7 @@
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
foldable = FALSE
max_storage_space = 16
max_storage_space = DEFAULT_BOX_STORAGE
can_hold = list(
/obj/item/device/magnetic_lock
)
@@ -1241,7 +1231,7 @@
name = "power cell box"
desc = "A box full of power cells."
foldable = FALSE
max_storage_space = 6
make_exact_fit = TRUE
can_hold = list(
/obj/item/cell
)
@@ -1281,19 +1271,17 @@
desc = "A box of advanced formula chemical tablets designed by Idris Incorporated."
desc_extended = "A new generation of cleaning chemicals, according to Idris at least. The instructions on the box reads: \"Dissolve tablet fully in container of water\". A warning label mentions that you should not consume the tablets nor drink the mixture after dissolving them."
illustration = "soapbucket"
max_storage_space = 16
starts_with = list(
/obj/item/reagent_containers/pill/cleaner_tablet = 16
)
make_exact_fit = TRUE
/obj/item/storage/box/led_collars
name = "box of LED collars"
desc = "A box containing eight LED collars, usually worn around the neck of the voidsuit."
starts_with = list(/obj/item/clothing/accessory/led_collar = 8)
make_exact_fit = TRUE
/obj/item/storage/box/led_collars/fill()
..()
make_exact_fit()
/obj/item/storage/box/traps/punji
name = "box of punji traps"
desc = "A box containing 5 punji traps."
@@ -1328,7 +1316,7 @@
drop_sound = 'sound/items/drop/metal_pot.ogg'
pickup_sound = 'sound/items/drop/metal_pot.ogg'
contained_sprite = TRUE
max_storage_space = 1
make_exact_fit = TRUE
can_hold = list(
/obj/item/reagent_containers/food/snacks/grown/konyang_tea
)
@@ -11,7 +11,7 @@
throw_range = 4
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_storage_space = 16
max_storage_space = DEFAULT_LARGEBOX_STORAGE
use_sound = 'sound/items/storage/briefcase.ogg'
drop_sound = 'sound/items/drop/backpack.ogg'
pickup_sound = 'sound/items/pickup/backpack.ogg'
@@ -95,6 +95,7 @@
center_of_mass = list("x" = 16,"y" = 9)
can_hold = list(/obj/item/reagent_containers/food/snacks/donut)
starts_with = list(/obj/item/reagent_containers/food/snacks/donut/normal = 6)
max_storage_space = DEFAULT_BOX_STORAGE
storage_slots = 6
icon_overlays = FALSE
foldable = /obj/item/stack/material/cardboard
@@ -110,7 +111,6 @@
/obj/item/storage/box/fancy/donut/empty
starts_with = null
max_storage_space = 12
/*
* Egg Box
@@ -455,7 +455,7 @@
pickup_sound = 'sound/items/pickup/toolbox.ogg'
max_w_class = WEIGHT_CLASS_SMALL
can_hold = list(/obj/item/reagent_containers/glass/beaker/vial)
max_storage_space = 12 //The sum of the w_classes of all the items in this storage item.
make_exact_fit = TRUE
storage_slots = 6
req_access = list(ACCESS_VIROLOGY)
@@ -756,7 +756,7 @@
pickup_sound = 'sound/items/pickup/bottle.ogg'
storage_type = "glass"
storage_slots = 20
max_storage_space = 20
max_storage_space = DEFAULT_LARGEBOX_STORAGE
can_hold = list(
/obj/item/reagent_containers/food/snacks/cakepopselection
)
@@ -827,7 +827,7 @@
icon_type = "chocolate praline"
contained_sprite = TRUE
storage_slots = 10
max_storage_space = 10
make_exact_fit = TRUE
drop_sound = 'sound/items/drop/cardboardbox.ogg'
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
can_hold = list(
@@ -7,12 +7,12 @@
modern rations are issued to all branches of the Republic's military. Native field meals are composed of salt-cured Fatshouters's meat, bread and Victory Gin, while imported ones \
are commonly found in the form of LiquidFood rations, a less than popular alternative manufactured by NanoTrasen."
var/preset_ration //if the package comes with one in particular, not a random
make_exact_fit = TRUE
/obj/item/storage/field_ration/fill()
..()
new /obj/item/material/kitchen/utensil/spoon(src)
create_ration()
make_exact_fit()
/obj/item/storage/field_ration/proc/create_ration()
var/selected_ration = preset_ration
@@ -188,10 +188,7 @@
/obj/item/stack/medical/advanced/bruise_pack = 1,
/obj/item/reagent_containers/inhaler/soporific = 2
)
/obj/item/storage/firstaid/surgery/fill()
. = ..()
make_exact_fit()
make_exact_fit = TRUE
/obj/item/storage/firstaid/trauma
name = "trauma first-aid kit"
@@ -12,11 +12,11 @@
w_class = WEIGHT_CLASS_HUGE
max_w_class = WEIGHT_CLASS_BULKY
max_storage_space = 25 //20 for clothes + a bit of additional space for non-clothing items that were worn on body
max_storage_space = DEFAULT_BACKPACK_STORAGE
storage_slots = 14
use_to_pickup = 1
allow_quick_empty = 1
allow_quick_gather = 1
use_to_pickup = TRUE
allow_quick_empty = TRUE
allow_quick_gather = TRUE
collection_mode = 1
var/linked
@@ -28,11 +28,11 @@ Single Use Emergency Pouches
icon_overlays = FALSE
closable = FALSE
var/injury_type = "generic"
make_exact_fit = TRUE
/obj/item/storage/box/fancy/med_pouch/Initialize()
. = ..()
name = "emergency [injury_type] pouch"
make_exact_fit()
for(var/obj/item/reagent_containers/pill/P in contents)
P.color = color
@@ -67,15 +67,11 @@
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
)
w_class = WEIGHT_CLASS_TINY
max_storage_space = 10
make_exact_fit = TRUE
throwforce = 2
slot_flags = SLOT_BELT
starts_with = list(/obj/item/paper/cig = 10)
/obj/item/storage/box/fancy/cigpaper/Initialize()
. = ..()
make_exact_fit()
make_exact_fit = TRUE
/obj/item/storage/box/fancy/cigpaper/update_icon()
. = ..()
@@ -99,11 +95,7 @@
drop_sound = 'sound/items/drop/gloves.ogg'
pickup_sound = 'sound/items/pickup/gloves.ogg'
use_sound = 'sound/items/storage/wrapper.ogg'
/obj/item/storage/cigfilter/Initialize(mapload, defer_shrinkwrap)
. = ..()
make_exact_fit()
make_exact_fit = TRUE
/obj/item/storage/box/fancy/cigpaper/fine
name = "\improper Trident cigarette paper"
@@ -131,11 +123,7 @@
throwforce = 2
slot_flags = SLOT_BELT
starts_with = list(/obj/item/clothing/mask/chewable/tobacco = 6)
/obj/item/storage/chewables/Initialize(mapload, defer_shrinkwrap)
. = ..()
make_exact_fit()
make_exact_fit = TRUE
/obj/item/storage/chewables/tobacco/bad
name = "can of Rredouane Cuts chewing tobacco"
@@ -154,7 +142,6 @@
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
)
starts_with = list(/obj/item/clothing/mask/chewable/tobacco/generic = 6)
storage_slots = 6
/obj/item/storage/chewables/tobacco/fine
name = "tin of Taba-Kamu chewing tobacco"
@@ -206,7 +193,6 @@
slot_r_hand_str = 'icons/mob/items/righthand_cigs_lighters.dmi',
)
w_class = WEIGHT_CLASS_TINY
max_storage_space = 8
drop_sound = 'sound/items/drop/cardboardbox.ogg'
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
use_sound = 'sound/items/storage/box.ogg'
@@ -26,11 +26,11 @@ MRE Stuff
/obj/item/reagent_containers/food/condiment/small/packet/capsaicin = 1,
/obj/item/material/kitchen/utensil/fork/plastic = 1
)
make_exact_fit = TRUE
/obj/item/storage/box/fancy/mre/fill()
new main_meal(src)
. = ..()
make_exact_fit()
/obj/item/storage/mre/attack_self(mob/user)
open(user)
@@ -8,12 +8,12 @@
center_of_mass = list("x" = 16,"y" = 12)
w_class = WEIGHT_CLASS_SMALL
can_hold = list(/obj/item/reagent_containers/pill,/obj/item/stack/dice,/obj/item/paper)
allow_quick_gather = 1
use_to_pickup = 1
allow_quick_gather = TRUE
use_to_pickup = TRUE
use_sound = 'sound/items/storage/pillbottle.ogg'
drop_sound = 'sound/items/drop/pillbottle.ogg'
pickup_sound = 'sound/items/pickup/pillbottle.ogg'
max_storage_space = 16
max_storage_space = DEFAULT_BOX_STORAGE
/obj/item/storage/pill_bottle/attack_self(mob/living/user)
if(user.get_inactive_hand())
@@ -25,7 +25,7 @@ ABSTRACT_TYPE(/obj/item/storage/secure)
var/open = 0
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_NORMAL
max_storage_space = 16
max_storage_space = DEFAULT_BOX_STORAGE
use_sound = 'sound/items/storage/briefcase.ogg'
/obj/item/storage/secure/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
@@ -11,7 +11,7 @@
throw_range = 2
w_class = WEIGHT_CLASS_SMALL
max_w_class = WEIGHT_CLASS_TINY
max_storage_space = 12
max_storage_space = DEFAULT_BOX_STORAGE
can_hold = list(
/obj/item/sticker
)
@@ -84,6 +84,8 @@
///Boolean, whether or not we should have the squish animation when inserting and removing objects
var/animated = TRUE
var/make_exact_fit = FALSE
/obj/item/storage/Destroy()
close_all()
QDEL_NULL(boxes)
@@ -398,7 +400,7 @@
// Don't touch these numbers. This works on literal pixel measurements. Unless you want to fix this shit or change the sprites.
var/storage_cap_width = 2 //length of sprite for start and end of the box representing total storage space
var/stored_cap_width = 4 //length of sprite for start and end of the box representing the stored item
var/storage_width = (1+stored_cap_width*2)*max_storage_space - 1 //length of sprite for the box representing total storage space, -1px. because no spacing on left for first item.
var/storage_width = min(((1+stored_cap_width*2)*max_storage_space - 1),((1+stored_cap_width*2)*DEFAULT_DUFFELBAG_STORAGE - 1)) //length of sprite for the box representing total storage space, -1px. because no spacing on left for first item.
storage_start.ClearOverlays()
@@ -442,7 +444,7 @@
storage_screens += list(stored_start, stored_continue, stored_end)
storage_start.add_vis_contents(list(stored_start, stored_continue, stored_end))
O.screen_loc = "4:[startpoint + round(stored_width/2)],2:16"
O.screen_loc = "4:[round(startpoint + round(stored_width/2))],2:16"
O.maptext = ""
O.hud_layerise()
@@ -473,11 +475,16 @@
numbered_contents = list()
adjusted_contents = 0
for(var/obj/item/I in contents)
var/found = 0
var/found = FALSE
for(var/datum/numbered_display/ND in numbered_contents)
if(ND.sample_object.type == I.type)
if(ND.sample_object.storage_slot_sort_by_name)
if(ND.sample_object.name == I.name)
ND.number++
found = TRUE
break
else if(ND.sample_object.type == I.type)
ND.number++
found = 1
found = TRUE
break
if(!found)
adjusted_contents++
@@ -700,7 +707,6 @@
if (user.s_active)
user.s_active.show_to(user)
// who knows what the fuck this does
if (istype(src, /obj/item/storage/box/fancy))
update_icon(1)
else
@@ -830,6 +836,9 @@
fill()
if(make_exact_fit)
make_exact_fit()
for(var/obj/item/I in contents)
I.in_storage = TRUE
+6 -4
View File
@@ -79,9 +79,10 @@
/obj/item/screwdriver/update_icon()
var/matrix/tf = matrix()
if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
if(istype(S, /obj/item/storage) && !S.storage_slots)
tf.Turn(-90) //Vertical for storing compactly
tf.Translate(-3,0) //Could do this with pixel_x but let's just update the appearance once.
tf.Translate(-1, 0) //Could do this with pixel_x but let's just update the appearance once.
transform = tf
/obj/item/screwdriver/get_belt_overlay()
@@ -160,9 +161,10 @@
/obj/item/wirecutters/update_icon()
var/matrix/tf = matrix()
if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
if(istype(S, /obj/item/storage) && !S.storage_slots)
tf.Turn(-90) //Vertical for storing compactly
tf.Translate(-1,0) //Could do this with pixel_x but let's just update the appearance once.
tf.Translate(-1, 0) //Could do this with pixel_x but let's just update the appearance once.
transform = tf
/obj/item/wirecutters/get_belt_overlay()
+1 -1
View File
@@ -359,7 +359,7 @@
name = "CCIA agent briefcase"
desc = "A smart looking briefcase with an SCC logo on the side."
storage_slots = 8
max_storage_space = 16
max_storage_space = DEFAULT_LARGEBOX_STORAGE
/obj/item/storage/lockbox/cciaa/bssb
name = "BSSB agent briefcase"
+1 -4
View File
@@ -151,10 +151,7 @@
prefs.toggles_secondary ^= PROGRESS_BARS
prefs.save_preferences()
if (prefs.toggles_secondary & PROGRESS_BARS)
to_chat(src, "You will now see progress bars on delayed actions.")
else
to_chat(src, "You will no longer see progress bars on delayed actions.")
to_chat(src, SPAN_NOTICE("Progress bars are now [prefs.toggles_secondary & PROGRESS_BARS ? "enabled" : "disabled"]."))
/client/verb/toggle_floating_messages()
set name = "Toggle Floating Messages"
@@ -11,7 +11,7 @@
. = ..()
hold = new/obj/item/storage/internal(src)
hold.storage_slots = slots
hold.max_storage_space = 12
hold.max_storage_space = DEFAULT_BOX_STORAGE
hold.max_w_class = WEIGHT_CLASS_SMALL
/obj/item/clothing/accessory/storage/attack_hand(mob/user as mob)
@@ -183,7 +183,7 @@
/obj/item/clothing/accessory/storage/knifeharness/Initialize()
. = ..()
hold.max_storage_space = 4
hold.max_storage_space = BASE_STORAGE_COST(WEIGHT_CLASS_NORMAL)
hold.can_hold = list(
/obj/item/material/hatchet/unathiknife,
/obj/item/material/kitchen/utensil/knife,
@@ -203,7 +203,7 @@
/obj/item/clothing/accessory/storage/bayonet/Initialize()
. = ..()
hold.max_storage_space = 4
hold.max_storage_space = BASE_STORAGE_COST(WEIGHT_CLASS_NORMAL)
hold.max_w_class = WEIGHT_CLASS_NORMAL
hold.can_hold = list(
/obj/item/material/knife/bayonet
+1 -1
View File
@@ -533,12 +533,12 @@ All custom items with worn sprites must follow the contained sprite system: http
icon_state = "thea_teabox"
foldable = null
can_hold = list(/obj/item/reagent_containers/glass/beaker/teapot/fluff/thea_teapot, /obj/item/reagent_containers/food/drinks/fluff/thea_teacup)
make_exact_fit = TRUE
/obj/item/storage/box/fluff/thea_teabox/fill()
new /obj/item/reagent_containers/glass/beaker/teapot/fluff/thea_teapot(src)
for(var/i in 1 to 4)
new /obj/item/reagent_containers/food/drinks/fluff/thea_teacup(src)
make_exact_fit()
/obj/item/fluff/fraseq_journal //Fraseq's Journal of Mysteries - Quorrdash Fraseq - kingoftheping
name = "leather journal"
+1 -1
View File
@@ -6,7 +6,7 @@
icon_state = "case"
item_state = "case"
storage_slots = 14
max_storage_space = 35
max_storage_space = DEFAULT_DUFFELBAG_STORAGE
contained_sprite = 1
use_sound = 'sound/items/storage/toolbox.ogg'
drop_sound = 'sound/items/drop/toolbox.ogg'
+1
View File
@@ -9,6 +9,7 @@
drop_sound = 'sound/items/drop/herb.ogg'
pickup_sound = 'sound/items/pickup/herb.ogg'
storage_slot_sort_by_name = TRUE
var/plantname
var/datum/seed/seed
var/potency = -1
@@ -9,6 +9,7 @@
slot_l_hand_str = 'icons/mob/items/lefthand_grown.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_grown.dmi',
)
storage_slot_sort_by_name = TRUE
var/plantname
var/potency = 1
+1
View File
@@ -7,6 +7,7 @@ GLOBAL_LIST_EMPTY(plant_seed_sprites)
icon_state = "random"
w_class = WEIGHT_CLASS_SMALL
storage_slot_sort_by_name = TRUE
var/seed_type
var/datum/seed/seed
var/modified = 0
+3 -2
View File
@@ -15,9 +15,10 @@
/obj/item/wirecutters/clippers/update_icon()
var/matrix/tf = matrix()
if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
if(istype(S, /obj/item/storage) && !S.storage_slots)
tf.Turn(-90) //Vertical for storing compactly
tf.Translate(-1,0) //Could do this with pixel_x but let's just update the appearance once.
tf.Translate(-1, 0) //Could do this with pixel_x but let's just update the appearance once.
transform = tf
/obj/item/device/analyzer/plant_analyzer
@@ -231,6 +231,7 @@
/obj/item/screwdriver,
/obj/item/device/multitool
)
make_exact_fit = TRUE
/obj/item/storage/bag/circuits/basic/fill()
new /obj/item/storage/bag/circuits/mini/arithmetic(src)
@@ -251,7 +252,6 @@
new /obj/item/device/multitool(src)
new /obj/item/screwdriver(src)
new /obj/item/crowbar(src)
make_exact_fit()
/obj/item/storage/bag/circuits/all/fill()
..()
@@ -276,7 +276,6 @@
new /obj/item/device/integrated_electronics/wirer(src)
new /obj/item/device/integrated_electronics/debugger(src)
new /obj/item/crowbar(src)
make_exact_fit()
/obj/item/storage/bag/circuits/mini
name = "circuit box"
@@ -298,8 +297,6 @@
for (var/i in 1 to 4)
new IC.type(src)
make_exact_fit()
/obj/item/storage/bag/circuits/mini/arithmetic
name = "arithmetic circuit box"
desc = "Warning: Contains math."
@@ -14,7 +14,7 @@
var/fire_pressure // Used in fire checks/pressure checks.
var/max_w_class = WEIGHT_CLASS_NORMAL // Hopper intake size.
var/max_storage_space = 20 // Total internal storage size.
var/max_storage_space = DEFAULT_LARGEBOX_STORAGE // Total internal storage size.
var/obj/item/tank/tank = null // Tank of gas for use in firing the cannon.
var/obj/item/storage/item_storage
+2 -1
View File
@@ -45,7 +45,8 @@ Firing pins as a rule can't be removed without replacing them, blame a really sh
/obj/item/firing_pin/update_icon()
var/matrix/tf = matrix()
if(istype(loc, /obj/item/storage))
var/obj/item/storage/S = loc
if(istype(S, /obj/item/storage) && !S.storage_slots)
tf.Turn(-90) //Vertical for storing compactly
tf.Translate(-1, 0) //Could do this with pixel_x but let's just update the appearance once.
transform = tf
@@ -151,7 +151,7 @@
storage_type = "packaging"
starts_with = list(/obj/item/reagent_containers/food/snacks/vkrexitaffy = 6)
can_hold = list(/obj/item/reagent_containers/food/snacks/vkrexitaffy)
max_storage_space = 6
make_exact_fit = TRUE
use_sound = 'sound/items/storage/wrapper.ogg'
drop_sound = 'sound/items/drop/wrapper.ogg'
@@ -383,7 +383,7 @@
storage_type = "packaging"
starts_with = list(/obj/item/reagent_containers/food/snacks/cookiesnack = 6)
can_hold = list(/obj/item/reagent_containers/food/snacks/cookiesnack)
max_storage_space = 6
make_exact_fit = TRUE
use_sound = 'sound/items/storage/wrapper.ogg'
drop_sound = 'sound/items/drop/wrapper.ogg'
@@ -417,7 +417,7 @@
w_class = WEIGHT_CLASS_TINY
starts_with = list(/obj/item/clothing/mask/chewable/candy/gum = 5)
can_hold = list(/obj/item/clothing/mask/chewable/candy/gum, /obj/item/trash/spitgum)
max_storage_space = 5
make_exact_fit = TRUE
use_sound = 'sound/items/storage/wrapper.ogg'
drop_sound = 'sound/items/drop/wrapper.ogg'
@@ -456,7 +456,7 @@
w_class = WEIGHT_CLASS_TINY
starts_with = list(/obj/item/reagent_containers/food/snacks/mint/admints = 6)
can_hold = list(/obj/item/reagent_containers/food/snacks/mint/admints)
max_storage_space = 6
make_exact_fit = TRUE
use_sound = 'sound/items/storage/wrapper.ogg'
drop_sound = 'sound/items/drop/wrapper.ogg'
@@ -809,7 +809,7 @@
storage_type = "packaging"
starts_with = list(/obj/item/reagent_containers/food/snacks/foy = 6)
can_hold = list(/obj/item/reagent_containers/food/snacks/foy)
max_storage_space = 6
make_exact_fit = TRUE
use_sound = 'sound/items/storage/wrapper.ogg'
drop_sound = 'sound/items/drop/wrapper.ogg'
@@ -172,9 +172,9 @@
/obj/item/pickaxe/four_pick,\
/obj/item/pickaxe/five_pick,\
/obj/item/pickaxe/six_pick)
max_storage_space = 18
make_exact_fit = TRUE
max_w_class = WEIGHT_CLASS_NORMAL
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
use_to_pickup = TRUE // for picking up broken bulbs, not that most people will try
/obj/item/storage/box/excavation/fill()
..()
+3 -3
View File
@@ -239,9 +239,6 @@
to_chat(user, SPAN_WARNING("You need a better grip to do that!"))
return
if(!attacking_item.dropsafety())
return
if(reinforced && attacking_item.isscrewdriver())
remove_reinforced(attacking_item, user)
if(!reinforced)
@@ -340,6 +337,9 @@
health = maxhealth
visible_message("<b>[user]</b> repairs \the [src].", SPAN_NOTICE("You repair \the [src]."))
if(!attacking_item.dropsafety())
return
// Placing stuff on tables
if(user.unEquip(attacking_item, 0, loc)) //Loc is intentional here so we don't forceMove() items into oblivion
user.make_item_drop_sound(attacking_item)
+65
View File
@@ -0,0 +1,65 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# - (fixes bugs)
# wip
# - (work in progress)
# qol
# - (quality of life)
# soundadd
# - (adds a sound)
# sounddel
# - (removes a sound)
# rscadd
# - (adds a feature)
# rscdel
# - (removes a feature)
# imageadd
# - (adds an image or sprite)
# imagedel
# - (removes an image or sprite)
# spellcheck
# - (fixes spelling or grammar)
# experiment
# - (experimental change)
# balance
# - (balance changes)
# code_imp
# - (misc internal code change)
# refactor
# - (refactors code)
# config
# - (makes a change to the config files)
# admin
# - (makes changes to administrator tools)
# server
# - (miscellaneous changes to server)
#################################
# Your name.
author: Wowzewow (Wezzy)
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Fixes plant bags - now uses storage_slot system, along with other bag subtypes."
- bugfix: "Borgs can interact with tables again."
- refactor: "Refactors make_exact_fit to be a binary variable."
- refactor: "Refactors storage items to use make_exact_fit instead of arbitrary max_storage_space values."
- refactor: "Refactors storage items to use defines for storage space."
- bugfix: "Fixes monkey cube boxes having superfluous overlay."
- rscadd: "Updates the progress bar toggle message."
- qol: "Objects that rotated 90 degrees in storage no longer rotate in storage slots."