mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user