Renames a bunch of storage.dm variables to be more clear in what they do (#9354)

Removes a bunch of unneeded max_w_class defines on items using can_only_hold

If you defined can_only_hold, it ignores w_class automatically
This commit is contained in:
Intigracy
2016-04-10 15:04:55 -07:00
committed by clusterfack
parent 6268bea296
commit 06e112aecb
26 changed files with 80 additions and 105 deletions

View File

@@ -564,7 +564,7 @@
if(slot_in_backpack)
if (H.back && istype(H.back, /obj/item/weapon/storage/backpack))
var/obj/item/weapon/storage/backpack/B = H.back
if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
if(B.contents.len < B.storage_slots && w_class <= B.fits_max_w_class)
return 1
return 0
return 0 //Unsupported slot

View File

@@ -16,9 +16,8 @@
name = "body bag kit"
desc = "A kit specifically designed to fit bodybags."
icon_state = "bodybags" //Consider respriting this to a kit some day
max_w_class = 3
max_combined_w_class = 21
can_hold = list("/obj/item/bodybag") //Needed due to the last two variables, figures
can_only_hold = list("/obj/item/bodybag") //Needed due to the last two variables, figures
/obj/item/weapon/storage/box/bodybags/New()
..()

View File

@@ -5,7 +5,7 @@
item_state = "RPED"
w_class = 4
use_to_pickup = 1
max_w_class = 3
fits_max_w_class = 3
max_combined_w_class = 100
storage_slots = 50
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/misc_tools.dmi', "right_hand" = 'icons/mob/in-hand/right/misc_tools.dmi')

View File

@@ -11,7 +11,7 @@
w_class = 4.0
flags = FPRINT
slot_flags = SLOT_BACK //ERROOOOO
max_w_class = 3
fits_max_w_class = 3
max_combined_w_class = 21
/obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -31,7 +31,7 @@
origin_tech = "bluespace=4"
item_state = "holdingpack"
icon_state = "holdingpack"
max_w_class = 4
fits_max_w_class = 4
max_combined_w_class = 28
/obj/item/weapon/storage/backpack/holding/suicide_act(mob/user)
@@ -98,7 +98,7 @@
item_state = "giftbag"
w_class = 4.0
storage_slots = 7
max_w_class = 4
fits_max_w_class = 4
max_combined_w_class = 400 // can store a ton of shit!
/obj/item/weapon/storage/backpack/santabag/attack_hand(user)

View File

@@ -34,9 +34,9 @@
item_state = "trashbag"
w_class = 4
max_w_class = 2
fits_max_w_class = 2
storage_slots = 21
can_hold = list() // any
can_only_hold = list() // any
cant_hold = list("/obj/item/weapon/disk/nuclear")
/obj/item/weapon/storage/bag/trash/update_icon()
@@ -61,9 +61,9 @@
item_state = "plasticbag"
w_class = 4
max_w_class = 2
fits_max_w_class = 2
storage_slots = 21
can_hold = list() // any
can_only_hold = list() // any
cant_hold = list("/obj/item/weapon/disk/nuclear")
body_parts_covered = FULL_HEAD|BEARD
slot_flags = SLOT_BELT | SLOT_HEAD
@@ -103,8 +103,7 @@
w_class = 3
storage_slots = 50
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class
max_w_class = 3
can_hold = list("/obj/item/weapon/ore")
can_only_hold = list("/obj/item/weapon/ore")
// -----------------------------
@@ -117,9 +116,8 @@
name = "Plant Bag"
storage_slots = 50; //the number of plant pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = 3
w_class = 1
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown", "/obj/item/weapon/reagent_containers/food/snacks/meat", "/obj/item/weapon/reagent_containers/food/snacks/egg", "/obj/item/weapon/reagent_containers/food/snacks/honeycomb")
can_only_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown", "/obj/item/weapon/reagent_containers/food/snacks/meat", "/obj/item/weapon/reagent_containers/food/snacks/egg", "/obj/item/weapon/reagent_containers/food/snacks/honeycomb")
// -----------------------------
// Food bag
@@ -132,9 +130,8 @@
name = "Food Delivery Bag"
storage_slots = 14; //the number of food items it can carry.
max_combined_w_class = 28 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = 3
w_class = 3
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks")
can_only_hold = list("/obj/item/weapon/reagent_containers/food/snacks")
/obj/item/weapon/storage/bag/food/update_icon()
if(contents.len < 1)
@@ -175,9 +172,8 @@
origin_tech = "biotech=2;materials=1"
storage_slots = 50; //the number of plant pieces it can carry.
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class
max_w_class = 3
w_class = 1
can_hold = list("/obj/item/weapon/reagent_containers/glass/bottle","/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/reagent_containers/syringe")
can_only_hold = list("/obj/item/weapon/reagent_containers/glass/bottle","/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/reagent_containers/syringe")
// -----------------------------
// Sheet Snatcher
@@ -335,9 +331,8 @@
desc = "This bag can be used to store many machine components."
storage_slots = 25;
max_combined_w_class = 200
max_w_class = 3
w_class = 1
can_hold = list("/obj/item/weapon/stock_parts", "/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/cell")
can_only_hold = list("/obj/item/weapon/stock_parts", "/obj/item/weapon/reagent_containers/glass/beaker", "/obj/item/weapon/cell")
/obj/item/weapon/storage/bag/gadgets/mass_remove(atom/A)
var/lowest_rating = INFINITY //Get the lowest rating, so only mass drop the lowest parts.
@@ -365,8 +360,7 @@
flags = FPRINT
w_class = 4
max_w_class = 3
storage_slots = 21
fits_max_w_class = 3
max_combined_w_class = 63 // Fuck this var
can_hold = list("/obj/item/weapon/coin", "/obj/item/weapon/ore", "/obj/item/weapon/spacecash")
can_only_hold = list("/obj/item/weapon/coin", "/obj/item/weapon/ore", "/obj/item/weapon/spacecash")
cant_hold = list()

View File

@@ -23,10 +23,9 @@
icon_state = "utilitybelt"
item_state = "utility"
w_class = 4
max_w_class = 2
storage_slots = 14
max_combined_w_class = 200 //This actually doesn't matter as long as it is arbitrarily high, bar will be set by storage slots
can_hold = list(
can_only_hold = list(
"/obj/item/weapon/crowbar",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/weldingtool",
@@ -83,9 +82,8 @@
icon_state = "utilitychief"
item_state = "utilitychief"
w_class = 4
max_w_class = 3
storage_slots = 14
can_hold = list(
can_only_hold = list(
"/obj/item/weapon/crowbar",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/weldingtool",
@@ -121,7 +119,7 @@
desc = "Can hold various medical equipment."
icon_state = "medicalbelt"
item_state = "medical"
can_hold = list(
can_only_hold = list(
"/obj/item/device/healthanalyzer",
"/obj/item/weapon/dnainjector",
"/obj/item/weapon/reagent_containers/dropper",
@@ -151,9 +149,8 @@
icon_state = "securitybelt"
item_state = "security"//Could likely use a better one.
storage_slots = 7
max_w_class = 3
max_combined_w_class = 21
can_hold = list(
can_only_hold = list(
"/obj/item/weapon/grenade",
"/obj/item/weapon/reagent_containers/spray/pepper",
"/obj/item/weapon/handcuffs",
@@ -184,9 +181,10 @@
desc = "For all your crime-fighting bat needs."
icon_state = "bmbelt"
item_state = "bmbelt"
/obj/item/weapon/storage/belt/security/batmanbelt/New()
..()
can_hold |= "/obj/item/weapon/gun/hookshot"
can_only_hold |= "/obj/item/weapon/gun/hookshot"
/obj/item/weapon/storage/belt/soulstone
name = "soul stone belt"
@@ -194,7 +192,7 @@
icon_state = "soulstonebelt"
item_state = "soulstonebelt"
storage_slots = 6
can_hold = list(
can_only_hold = list(
"/obj/item/device/soulstone"
)
@@ -214,7 +212,7 @@
icon_state = "championbelt"
item_state = "champion"
storage_slots = 1
can_hold = list(
can_only_hold = list(
"/obj/item/clothing/mask/luchador"
)
@@ -224,9 +222,8 @@
desc = "Excellent for holding the heads of your fallen foes."
icon_state = "utilitybelt"
item_state = "utility"
max_w_class = 4
max_combined_w_class = 28
can_hold = list(
can_only_hold = list(
"/obj/item/weapon/organ/head"
)
@@ -236,10 +233,9 @@
desc = "Can hold various mining gear like pickaxes or drills."
icon_state = "miningbelt"
item_state = "mining"
w_class = 4 //Lets it hold mining satchels.
max_w_class = 4
w_class = 4
max_combined_w_class = 28
can_hold = list(
can_only_hold = list(
"/obj/item/weapon/storage/bag/ore",
"/obj/item/weapon/pickaxe/shovel",
"/obj/item/weapon/storage/box/samplebags",
@@ -271,10 +267,9 @@
icon_state = "lazarusbelt_0"
item_state = "lazbelt"
w_class = 4
max_w_class = 4
max_combined_w_class = 28
storage_slots = 6
can_hold = list(
can_only_hold = list(
"/obj/item/device/mobcapsule",
"/obj/item/weapon/lazarus_injector")
@@ -298,15 +293,7 @@
update_icon()
/obj/item/weapon/storage/belt/lazarus/antag
name = "master trainer's belt"
desc = "For the pokemo- mining master, holds your lazarus capsules."
icon_state = "lazarusbelt"
item_state = "lazbelt"
storage_slots = 6
w_class = 4
max_w_class = 4
max_combined_w_class = 28
can_hold = list("/obj/item/device/mobcapsule")
/obj/item/weapon/storage/belt/lazarus/antag/New(loc, mob/user)
var/blocked = list(
@@ -329,7 +316,7 @@
desc = "Can hold the thunderdome IDs of your fallen foes."
item_state = ""
storage_slots = 30
can_hold = list("/obj/item/weapon/card/id/thunderdome")
can_only_hold = list("/obj/item/weapon/card/id/thunderdome")
/obj/item/weapon/storage/belt/thunderdome/green
icon_state = "td_belt-green"

View File

@@ -328,7 +328,7 @@
icon = 'icons/obj/food.dmi'
icon_state = "monkeycubebox"
storage_slots = 7
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube")
can_only_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube")
/obj/item/weapon/storage/box/monkeycubes/New()
..()
@@ -465,7 +465,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "spbox"
storage_slots = 8
can_hold = list("/obj/item/toy/snappop")
can_only_hold = list("/obj/item/toy/snappop")
/obj/item/weapon/storage/box/snappops/New()
..()
@@ -501,7 +501,7 @@
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots=21
can_hold = list("/obj/item/weapon/light/tube", "/obj/item/weapon/light/bulb")
can_only_hold = list("/obj/item/weapon/light/tube", "/obj/item/weapon/light/bulb")
max_combined_w_class = 21
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try

View File

@@ -8,7 +8,7 @@
throw_speed = 1
throw_range = 4
w_class = 4.0
max_w_class = 3
fits_max_w_class = 3
max_combined_w_class = 16
var/empty = 0
@@ -75,7 +75,7 @@
throw_speed = 1
throw_range = 3
w_class = 4.0
max_w_class = 2
fits_max_w_class = 2
max_combined_w_class = 10
var/busy_hunting = 0
@@ -120,7 +120,7 @@
return
stored_item = item
max_w_class = 3.0 - stored_item.w_class
fits_max_w_class = 3.0 - stored_item.w_class
item.loc = null //null space here we go - to stop it showing up in the briefcase
to_chat(user, "You place \the [item] into the false bottom of the briefcase.")
else
@@ -131,7 +131,7 @@
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)
fits_max_w_class = initial(fits_max_w_class)
else
return ..()

View File

@@ -58,7 +58,7 @@
icon_type = "donut"
name = "donut box"
storage_slots = 6
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut", \
can_only_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut", \
"/obj/item/weapon/reagent_containers/food/snacks/customizable/candy/donut")
foldable = /obj/item/stack/sheet/cardboard
@@ -88,7 +88,7 @@
icon_type = "egg"
name = "egg box"
storage_slots = 12
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg")
can_only_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg")
foldable = /obj/item/stack/sheet/cardboard
starting_materials = list(MAT_CARDBOARD = 3750)
@@ -153,7 +153,7 @@
w_class = 2.0
storage_slots = 6
icon_type = "crayon"
can_hold = list(
can_only_hold = list(
"/obj/item/toy/crayon"
)
@@ -204,7 +204,7 @@
w_class = 1
flags = 0
var/matchtype = /obj/item/weapon/match
can_hold = list("/obj/item/weapon/match") // Strict type check.
can_only_hold = list("/obj/item/weapon/match") // Strict type check.
slot_flags = SLOT_BELT
/obj/item/weapon/storage/fancy/matchbox/empty
@@ -265,7 +265,7 @@
flags = 0
slot_flags = SLOT_BELT
storage_slots = 6
can_hold = list("=/obj/item/clothing/mask/cigarette", "/obj/item/weapon/lighter") // Strict type check.
can_only_hold = list("=/obj/item/clothing/mask/cigarette", "/obj/item/weapon/lighter") // Strict type check.
icon_type = "cigarette"
starting_materials = list(MAT_CARDBOARD = 370)
w_type=RECYK_MISC
@@ -326,7 +326,7 @@
icon_type = "vial"
name = "vial storage box"
storage_slots = 6
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
can_only_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
foldable = null
@@ -345,8 +345,7 @@
icon = 'icons/obj/vialbox.dmi'
icon_state = "vialbox0"
item_state = "syringe_kit"
max_w_class = 3
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
can_only_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 6
req_access = list(access_virology)
@@ -381,7 +380,7 @@
icon_type = "flare"
name = "box of flares"
storage_slots = 6
can_hold = list("/obj/item/device/flashlight/flare")
can_only_hold = list("/obj/item/device/flashlight/flare")
foldable = /obj/item/stack/sheet/cardboard
starting_materials = list(MAT_CARDBOARD = 3750)
@@ -420,7 +419,7 @@
icon_state = "kfc_drumsticks"
item_state = "kfc_bucket"
icon_type = "drumstick"
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/chicken_drumstick")
can_only_hold = list("/obj/item/weapon/reagent_containers/food/snacks/chicken_drumstick")
starting_materials = list(MAT_CARDBOARD = 3750)
w_type=RECYK_MISC
@@ -448,7 +447,7 @@
icon = 'icons/obj/food.dmi'
icon_state = "slider_box"
storage_slots = 6
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks")
can_only_hold = list("/obj/item/weapon/reagent_containers/food/snacks")
/obj/item/weapon/storage/fancy/food_box/update_icon(var/itemremoved = 0) //this is so that your box doesn't turn into a donut box, see line 29
return
@@ -460,7 +459,7 @@
desc = "I wonder what's inside."
icon_type = "slider"
storage_slots = 4
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/slider")
can_only_hold = list("/obj/item/weapon/reagent_containers/food/snacks/slider")
var/slider_type = /obj/item/weapon/reagent_containers/food/snacks/slider//set this as the spawn path of your slider
starting_materials = list(MAT_CARDBOARD = 3750)
w_type=RECYK_MISC

View File

@@ -120,7 +120,7 @@
icon = 'icons/obj/chemical.dmi'
item_state = "contsolid"
w_class = 2.0
can_hold = list("/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/dice","/obj/item/weapon/paper")
can_only_hold = list("/obj/item/weapon/reagent_containers/pill","/obj/item/weapon/dice","/obj/item/weapon/paper")
allow_quick_gather = 1
use_to_pickup = 1
storage_slots = 14

View File

@@ -6,7 +6,7 @@
icon_state = "lockbox+l"
item_state = "syringe_kit"
w_class = 4
max_w_class = 3
fits_max_w_class = 3
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
storage_slots = 4
req_access = list(access_armory)
@@ -190,8 +190,7 @@
desc = "A secure container for the profits of a vending machine."
icon_state = "coinbox+l"
w_class = 2
max_w_class = 1
can_hold = list("/obj/item/voucher","/obj/item/weapon/coin","/obj/item/weapon/reagent_containers/food/snacks/customizable/candy/coin","/obj/item/weapon/reagent_containers/food/snacks/chococoin")
can_only_hold = list("/obj/item/voucher","/obj/item/weapon/coin","/obj/item/weapon/reagent_containers/food/snacks/customizable/candy/coin","/obj/item/weapon/reagent_containers/food/snacks/chococoin")
max_combined_w_class = 30
force = 8
throwforce = 10

View File

@@ -24,7 +24,7 @@
var/emagged = 0
var/open = 0
w_class = 3.0
max_w_class = 2
fits_max_w_class = 2
max_combined_w_class = 14
/obj/item/weapon/storage/secure/examine(mob/user)
@@ -217,7 +217,7 @@
flags = FPRINT
force = 8.0
w_class = 8.0
max_w_class = 8
fits_max_w_class = 8
anchored = 1.0
density = 0
cant_hold = list("/obj/item/weapon/storage/secure/briefcase")

View File

@@ -12,11 +12,11 @@
// These two accept a string containing the type path and the following optional prefixes:
// = - Strict type matching. Will NOT check for subtypes.
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/list/ignore_w_class = new/list() //List of objects which will fit in this item, regardless of size. AKA can_hold_too.
var/list/can_only_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_only_hold isn't set)
var/list/fits_ignoring_w_class = new/list() //List of objects which will fit in this item, regardless of size. Doesn't restrict to ONLY items of these types, and doesn't ignore max_combined_w_class. (in effect only if can_only_hold isn't set)
var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/fits_max_w_class = 2 //Max size of objects that this object can store (in effect only if can_only_hold isn't set)
var/max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
var/storage_slots = 7 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
@@ -227,9 +227,9 @@
to_chat(usr, "<span class='notice'>Unwield \the [ref_name] first.</span>")
return
if(can_hold.len)
if(can_only_hold.len)
var/ok = 0
for(var/A in can_hold)
for(var/A in can_only_hold)
if(dd_hasprefix(A,"="))
// Force strict matching of type.
// No subtypes allowed.
@@ -262,10 +262,10 @@
to_chat(usr, "<span class='notice'>\The [src] cannot hold \the [W].</span>")
return 0
if (W.w_class > max_w_class)
if ((W.w_class > fits_max_w_class) && !can_only_hold.len) //fits_max_w_class doesn't matter if there's only a specific list of items you can put in
var/yeh = 0
if(ignore_w_class.len)
for(var/A in ignore_w_class)
if(fits_ignoring_w_class.len)
for(var/A in fits_ignoring_w_class)
if(dd_hasprefix(A,"="))
// Force strict matching of type.
// No subtypes allowed.

View File

@@ -19,7 +19,7 @@
attack_verb = list("robusts", "batters", "staves in")
storage_slots = 14
max_combined_w_class = 28
ignore_w_class = list(
fits_ignoring_w_class = list(
"/obj/item/weapon/weldingtool/hugetank",
"/obj/item/device/rcd/matter/engineering",
"/obj/item/device/rcd/rpd",

View File

@@ -5,7 +5,7 @@
icon = 'icons/obj/wallet.dmi'
icon_state = "wallet"
w_class = 2
can_hold = list(
can_only_hold = list(
"/obj/item/weapon/spacecash",
"/obj/item/weapon/card",
"/obj/item/clothing/mask/cigarette",

View File

@@ -1,7 +1,7 @@
/obj/item/clothing/suit/storage
var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set)
var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set)
var/list/can_only_hold = new/list() //List of objects which this item can store (if set, it can't store anything else)
var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_only_hold isn't set)
var/fits_max_w_class = 2 //Max size of objects that this object can store (in effect only if can_only_hold isn't set)
var/max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item.
var/storage_slots = 2 //The number of storage slots in this container.
var/obj/screen/storage/boxes = null
@@ -115,9 +115,9 @@
to_chat(user, "<span class='warning'>The [src] is full, make some space.</span>")
return //Storage item is full
if(can_hold.len)
if(can_only_hold.len)
var/ok = 0
for(var/A in can_hold)
for(var/A in can_only_hold)
if(istype(W, text2path(A) ))
ok = 1
break
@@ -130,7 +130,7 @@
to_chat(user, "<span class='warning'>The [src] cannot hold \the [W].</span>")
return
if (W.w_class > max_w_class)
if (W.w_class > fits_max_w_class && !can_only_hold.len) //fits_max_w_class doesn't matter if there's only a specific list of items you can put in
to_chat(user, "<span class='warning'>The [W] is too big for \the [src].</span>")
return

View File

@@ -363,7 +363,7 @@
item_state = "bandolier"
storage_slots = 8
max_combined_w_class = 20
can_hold = list("/obj/item/ammo_casing/shotgun")
can_only_hold = list("/obj/item/ammo_casing/shotgun")
/obj/item/clothing/suit/officercoat
name = "Officer's Coat"

View File

@@ -98,4 +98,4 @@
..()
new /obj/item/weapon/hatchet/unathiknife(hold)
new /obj/item/weapon/hatchet/unathiknife(hold)
hold.can_hold = list("obj/item/weapon/hatchet", "obj/item/weapon/kitchen/utensil/knife")
hold.can_only_hold = list("obj/item/weapon/hatchet", "obj/item/weapon/kitchen/utensil/knife")

View File

@@ -253,9 +253,8 @@ var/global/list/wizard_cards_normal = list(
name = "Wizard Card Pack"
storage_slots = 50
max_combined_w_class = 200
max_w_class = 3
w_class = 1
can_hold = list("/obj/item/toy/wizard_card","/obj/item/weapon/reagent_containers/food/snacks/chocofrog")
can_only_hold = list("/obj/item/toy/wizard_card","/obj/item/weapon/reagent_containers/food/snacks/chocofrog")
/obj/item/weapon/storage/bag/wiz_cards/full/New()
..()

View File

@@ -316,7 +316,7 @@
if(slot_in_backpack)
if (src.back && istype(src.back, /obj/item/weapon/storage/backpack))
var/obj/item/weapon/storage/backpack/B = src.back
if(B.contents.len < B.storage_slots && W.w_class <= B.max_w_class)
if(B.contents.len < B.storage_slots && W.w_class <= B.fits_max_w_class)
W.loc = B
equipped = 1

View File

@@ -827,7 +827,7 @@ var/list/slot_equipment_priority = list( \
if(slot_in_backpack)
if (H.back && istype(H.back, /obj/item/weapon/storage/backpack))
var/obj/item/weapon/storage/backpack/B = H.back
if(B.contents.len < B.storage_slots && w_class <= B.max_w_class)
if(B.contents.len < B.storage_slots && w_class <= B.fits_max_w_class)
return 1
return 0
return 0 //Unsupported slot

View File

@@ -90,7 +90,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
can_only_hold = list("/obj/item/weapon/photo",)
/*

View File

@@ -8,7 +8,7 @@
flags = FPRINT
siemens_coefficient = 1
slot_flags = SLOT_BELT
max_w_class = 3
fits_max_w_class = 3
max_combined_w_class = 20
origin_tech = "materials=3;engineering=3"

View File

@@ -22,7 +22,7 @@
use_to_pickup = 1
allow_quick_empty = 1
storage_slots = 21
can_hold = list("/obj/item/weapon/stock_parts")
can_only_hold = list("/obj/item/weapon/stock_parts")
/obj/item/weapon/storage/component_exchanger/attackby(var/atom/A, mob/user)
if(istype(A, /obj/item/weapon/storage/bag/gadgets))

View File

@@ -5,9 +5,8 @@
icon_state = "gearbelt"
item_state = "utility"
w_class = 4 //Lets it hold mining satchels.
max_w_class = 4
max_combined_w_class = 28
can_hold = list(
can_only_hold = list(
"/obj/item/weapon/storage/box/samplebags",
"/obj/item/device/core_sampler",
"/obj/item/device/beacon_locator",

View File

@@ -110,7 +110,7 @@
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
storage_slots = 7
w_class = 2
can_hold = list("/obj/item/weapon/pickaxe/brush",\
can_only_hold = list("/obj/item/weapon/pickaxe/brush",\
"/obj/item/weapon/pickaxe/one_pick",\
"/obj/item/weapon/pickaxe/two_pick",\
"/obj/item/weapon/pickaxe/three_pick",\
@@ -118,7 +118,6 @@
"/obj/item/weapon/pickaxe/five_pick",\
"/obj/item/weapon/pickaxe/six_pick")
max_combined_w_class = 17
max_w_class = 4
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
/obj/item/weapon/storage/box/excavation/New()