mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Containers now properly checks types instead of string paths.
Security and medical belts could contain now no longer existing objects. These types have been removed. Conflicts: code/game/objects/items/weapons/storage/belt.dm code/game/objects/structures/inflatable.dm code/modules/clothing/under/ties.dm
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
max_w_class = 2
|
||||
storage_slots = 21
|
||||
can_hold = list() // any
|
||||
cant_hold = list("/obj/item/weapon/disk/nuclear")
|
||||
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||
|
||||
/obj/item/weapon/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
@@ -63,7 +63,7 @@
|
||||
max_w_class = 2
|
||||
storage_slots = 21
|
||||
can_hold = list() // any
|
||||
cant_hold = list("/obj/item/weapon/disk/nuclear")
|
||||
cant_hold = list(/obj/item/weapon/disk/nuclear)
|
||||
|
||||
// -----------------------------
|
||||
// Mining Satchel
|
||||
@@ -79,7 +79,7 @@
|
||||
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_hold = list(/obj/item/weapon/ore)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
@@ -94,7 +94,7 @@
|
||||
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 = 2
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/grown","/obj/item/seeds","/obj/item/weapon/grown")
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown)
|
||||
|
||||
|
||||
// -----------------------------
|
||||
@@ -252,4 +252,4 @@
|
||||
max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class
|
||||
max_w_class = 3
|
||||
w_class = 2
|
||||
can_hold = list("/obj/item/weapon/coin","/obj/item/weapon/spacecash")
|
||||
can_hold = list(/obj/item/weapon/coin,/obj/item/weapon/spacecash)
|
||||
|
||||
@@ -13,19 +13,19 @@
|
||||
icon_state = "utilitybelt"
|
||||
item_state = "utility"
|
||||
can_hold = list(
|
||||
//"/obj/item/weapon/combitool",
|
||||
"/obj/item/weapon/crowbar",
|
||||
"/obj/item/weapon/screwdriver",
|
||||
"/obj/item/weapon/weldingtool",
|
||||
"/obj/item/weapon/wirecutters",
|
||||
"/obj/item/weapon/wrench",
|
||||
"/obj/item/device/multitool",
|
||||
"/obj/item/device/flashlight",
|
||||
"/obj/item/stack/cable_coil",
|
||||
"/obj/item/device/t_scanner",
|
||||
"/obj/item/device/analyzer",
|
||||
"/obj/item/taperoll/engineering",
|
||||
"/obj/item/device/robotanalyzer")
|
||||
///obj/item/weapon/combitool,
|
||||
/obj/item/weapon/crowbar,
|
||||
/obj/item/weapon/screwdriver,
|
||||
/obj/item/weapon/weldingtool,
|
||||
/obj/item/weapon/wirecutters,
|
||||
/obj/item/weapon/wrench,
|
||||
/obj/item/device/multitool,
|
||||
/obj/item/device/flashlight,
|
||||
/obj/item/stack/cable_coil,
|
||||
/obj/item/device/t_scanner,
|
||||
/obj/item/device/analyzer,
|
||||
/obj/item/taperoll/engineering,
|
||||
/obj/item/device/robotanalyzer)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/belt/utility/full/New()
|
||||
@@ -55,22 +55,21 @@
|
||||
icon_state = "medicalbelt"
|
||||
item_state = "medical"
|
||||
can_hold = list(
|
||||
"/obj/item/device/healthanalyzer",
|
||||
"/obj/item/weapon/dnainjector",
|
||||
"/obj/item/weapon/reagent_containers/dropper",
|
||||
"/obj/item/weapon/reagent_containers/glass/beaker",
|
||||
"/obj/item/weapon/reagent_containers/glass/bottle",
|
||||
"/obj/item/weapon/reagent_containers/pill",
|
||||
"/obj/item/weapon/reagent_containers/syringe",
|
||||
"/obj/item/weapon/reagent_containers/glass/dispenser",
|
||||
"/obj/item/weapon/flame/lighter/zippo",
|
||||
"/obj/item/weapon/storage/fancy/cigarettes",
|
||||
"/obj/item/weapon/storage/pill_bottle",
|
||||
"/obj/item/stack/medical",
|
||||
"/obj/item/device/flashlight/pen",
|
||||
"/obj/item/clothing/mask/surgical",
|
||||
"/obj/item/clothing/gloves/latex",
|
||||
"/obj/item/weapon/reagent_containers/hypospray"
|
||||
/obj/item/device/healthanalyzer,
|
||||
/obj/item/weapon/dnainjector,
|
||||
/obj/item/weapon/reagent_containers/dropper,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle,
|
||||
/obj/item/weapon/reagent_containers/pill,
|
||||
/obj/item/weapon/reagent_containers/syringe,
|
||||
/obj/item/weapon/flame/lighter/zippo,
|
||||
/obj/item/weapon/storage/fancy/cigarettes,
|
||||
/obj/item/weapon/storage/pill_bottle,
|
||||
/obj/item/stack/medical,
|
||||
/obj/item/device/flashlight/pen,
|
||||
/obj/item/clothing/mask/surgical,
|
||||
/obj/item/clothing/gloves/latex,
|
||||
/obj/item/weapon/reagent_containers/hypospray
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/belt/medical/emt
|
||||
@@ -90,25 +89,24 @@
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 21
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/grenade",
|
||||
"/obj/item/weapon/reagent_containers/spray/pepper",
|
||||
"/obj/item/weapon/handcuffs",
|
||||
"/obj/item/device/flash",
|
||||
"/obj/item/clothing/glasses",
|
||||
"/obj/item/ammo_casing/shotgun",
|
||||
"/obj/item/ammo_magazine",
|
||||
"/obj/item/weapon/reagent_containers/food/snacks/donut/normal",
|
||||
"/obj/item/weapon/reagent_containers/food/snacks/donut/jelly",
|
||||
"/obj/item/weapon/melee/baton",
|
||||
"/obj/item/weapon/gun/energy/taser",
|
||||
"/obj/item/weapon/flame/lighter/zippo",
|
||||
"/obj/item/weapon/cigpacket",
|
||||
"/obj/item/clothing/glasses/hud/security",
|
||||
"/obj/item/device/flashlight",
|
||||
"/obj/item/device/pda",
|
||||
"/obj/item/device/radio/headset",
|
||||
"/obj/item/weapon/melee",
|
||||
"/obj/item/taperoll/police"
|
||||
/obj/item/weapon/grenade,
|
||||
/obj/item/weapon/reagent_containers/spray/pepper,
|
||||
/obj/item/weapon/handcuffs,
|
||||
/obj/item/device/flash,
|
||||
/obj/item/clothing/glasses,
|
||||
/obj/item/ammo_casing/shotgun,
|
||||
/obj/item/ammo_magazine,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/donut/normal,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/donut/jelly,
|
||||
/obj/item/weapon/melee/baton,
|
||||
/obj/item/weapon/gun/energy/taser,
|
||||
/obj/item/weapon/flame/lighter/zippo,
|
||||
/obj/item/clothing/glasses/hud/security,
|
||||
/obj/item/device/flashlight,
|
||||
/obj/item/device/pda,
|
||||
/obj/item/device/radio/headset,
|
||||
/obj/item/weapon/melee,
|
||||
/obj/item/taperoll/police
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/belt/soulstone
|
||||
@@ -118,7 +116,7 @@
|
||||
item_state = "soulstonebelt"
|
||||
storage_slots = 6
|
||||
can_hold = list(
|
||||
"/obj/item/device/soulstone"
|
||||
/obj/item/device/soulstone
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/belt/soulstone/full/New()
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
icon = 'icons/obj/food.dmi'
|
||||
icon_state = "monkeycubebox"
|
||||
storage_slots = 7
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/monkeycube")
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/monkeycube)
|
||||
New()
|
||||
..()
|
||||
if(src.type == /obj/item/weapon/storage/box/monkeycubes)
|
||||
@@ -458,7 +458,7 @@
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "spbox"
|
||||
storage_slots = 8
|
||||
can_hold = list("/obj/item/toy/snappop")
|
||||
can_hold = list(/obj/item/toy/snappop)
|
||||
New()
|
||||
..()
|
||||
for(var/i=1; i <= storage_slots; i++)
|
||||
@@ -473,7 +473,7 @@
|
||||
storage_slots = 10
|
||||
w_class = 1
|
||||
slot_flags = SLOT_BELT
|
||||
can_hold = list("/obj/item/weapon/flame/match")
|
||||
can_hold = list(/obj/item/weapon/flame/match)
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -506,7 +506,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_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb)
|
||||
max_combined_w_class = 42 //holds 21 items of w_class 2
|
||||
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
name = "egg box"
|
||||
storage_slots = 12
|
||||
max_combined_w_class = 24
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/egg")
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/egg)
|
||||
|
||||
/obj/item/weapon/storage/fancy/egg_box/New()
|
||||
..()
|
||||
@@ -91,7 +91,7 @@
|
||||
storage_slots = 6
|
||||
icon_type = "crayon"
|
||||
can_hold = list(
|
||||
"/obj/item/toy/crayon"
|
||||
/obj/item/toy/crayon
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/fancy/crayons/New()
|
||||
@@ -134,7 +134,7 @@
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 6
|
||||
can_hold = list("/obj/item/clothing/mask/cigarette")
|
||||
can_hold = list(/obj/item/clothing/mask/smokable/cigarette)
|
||||
icon_type = "cigarette"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigarettes/New()
|
||||
@@ -190,7 +190,7 @@
|
||||
throwforce = 2
|
||||
slot_flags = SLOT_BELT
|
||||
storage_slots = 7
|
||||
can_hold = list("/obj/item/clothing/mask/cigarette/cigar")
|
||||
can_hold = list(/obj/item/clothing/mask/smokable/cigarette/cigar)
|
||||
icon_type = "cigar"
|
||||
|
||||
/obj/item/weapon/storage/fancy/cigar/New()
|
||||
@@ -239,7 +239,7 @@
|
||||
icon_type = "vial"
|
||||
name = "vial storage box"
|
||||
storage_slots = 6
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/fancy/vials/New()
|
||||
@@ -255,7 +255,7 @@
|
||||
icon_state = "vialbox0"
|
||||
item_state = "syringe_kit"
|
||||
max_w_class = 3
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/glass/beaker/vial")
|
||||
can_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)
|
||||
|
||||
@@ -138,7 +138,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_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
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
name = "donut box"
|
||||
storage_slots = 6
|
||||
var/startswith = 6
|
||||
can_hold = list("/obj/item/weapon/reagent_containers/food/snacks/donut")
|
||||
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut)
|
||||
foldable = /obj/item/stack/sheet/cardboard
|
||||
|
||||
/obj/item/weapon/storage/donut_box/New()
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
max_w_class = 8
|
||||
anchored = 1.0
|
||||
density = 0
|
||||
cant_hold = list("/obj/item/weapon/storage/secure/briefcase")
|
||||
cant_hold = list(/obj/item/weapon/storage/secure/briefcase)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -209,21 +209,14 @@
|
||||
usr << "<span class='notice'>[src] is full, make some space.</span>"
|
||||
return 0 //Storage item is full
|
||||
|
||||
if(can_hold.len)
|
||||
var/ok = 0
|
||||
for(var/A in can_hold)
|
||||
if(istype(W, text2path(A) ))
|
||||
ok = 1
|
||||
break
|
||||
if(!ok)
|
||||
if(can_hold.len && !is_type_in_list(W, can_hold))
|
||||
if(!stop_messages)
|
||||
if (istype(W, /obj/item/weapon/hand_labeler))
|
||||
return 0
|
||||
usr << "<span class='notice'>[src] cannot hold [W].</span>"
|
||||
return 0
|
||||
|
||||
for(var/A in cant_hold) //Check for specific items which this container can't hold.
|
||||
if(istype(W, text2path(A) ))
|
||||
if(cant_hold.len && is_type_in_list(W, cant_hold))
|
||||
if(!stop_messages)
|
||||
usr << "<span class='notice'>[src] cannot hold [W].</span>"
|
||||
return 0
|
||||
|
||||
@@ -5,25 +5,25 @@
|
||||
icon_state = "wallet"
|
||||
w_class = 2
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/spacecash",
|
||||
"/obj/item/weapon/card",
|
||||
"/obj/item/clothing/mask/cigarette",
|
||||
"/obj/item/device/flashlight/pen",
|
||||
"/obj/item/seeds",
|
||||
"/obj/item/stack/medical",
|
||||
"/obj/item/toy/crayon",
|
||||
"/obj/item/weapon/coin",
|
||||
"/obj/item/weapon/dice",
|
||||
"/obj/item/weapon/disk",
|
||||
"/obj/item/weapon/implanter",
|
||||
"/obj/item/weapon/flame/lighter",
|
||||
"/obj/item/weapon/flame/match",
|
||||
"/obj/item/weapon/paper",
|
||||
"/obj/item/weapon/pen",
|
||||
"/obj/item/weapon/photo",
|
||||
"/obj/item/weapon/reagent_containers/dropper",
|
||||
"/obj/item/weapon/screwdriver",
|
||||
"/obj/item/weapon/stamp")
|
||||
/obj/item/weapon/spacecash,
|
||||
/obj/item/weapon/card,
|
||||
/obj/item/clothing/mask/smokable/cigarette/,
|
||||
/obj/item/device/flashlight/pen,
|
||||
/obj/item/seeds,
|
||||
/obj/item/stack/medical,
|
||||
/obj/item/toy/crayon,
|
||||
/obj/item/weapon/coin,
|
||||
/obj/item/weapon/dice,
|
||||
/obj/item/weapon/disk,
|
||||
/obj/item/weapon/implanter,
|
||||
/obj/item/weapon/flame/lighter,
|
||||
/obj/item/weapon/flame/match,
|
||||
/obj/item/weapon/paper,
|
||||
/obj/item/weapon/pen,
|
||||
/obj/item/weapon/photo,
|
||||
/obj/item/weapon/reagent_containers/dropper,
|
||||
/obj/item/weapon/screwdriver,
|
||||
/obj/item/weapon/stamp)
|
||||
slot_flags = SLOT_ID
|
||||
|
||||
var/obj/item/weapon/card/id/front_id = null
|
||||
|
||||
@@ -253,6 +253,7 @@
|
||||
icon_state = "inf_box"
|
||||
item_state = "syringe_kit"
|
||||
max_combined_w_class = 21
|
||||
can_hold = list(/obj/item/inflatable)
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -86,7 +86,7 @@ var/global/photo_count = 0
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "album"
|
||||
item_state = "briefcase"
|
||||
can_hold = list("/obj/item/weapon/photo",)
|
||||
can_hold = list(/obj/item/weapon/photo)
|
||||
|
||||
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
|
||||
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
icon_state = "gearbelt"
|
||||
item_state = "utility"
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/storage/box/samplebags",
|
||||
"/obj/item/device/core_sampler",
|
||||
"/obj/item/device/beacon_locator",
|
||||
"/obj/item/device/radio/beacon",
|
||||
"/obj/item/device/gps",
|
||||
"/obj/item/device/measuring_tape",
|
||||
"/obj/item/device/flashlight",
|
||||
"/obj/item/weapon/pickaxe",
|
||||
"/obj/item/device/depth_scanner",
|
||||
"/obj/item/device/camera",
|
||||
"/obj/item/weapon/paper",
|
||||
"/obj/item/weapon/photo",
|
||||
"/obj/item/weapon/folder",
|
||||
"/obj/item/weapon/pen",
|
||||
"/obj/item/weapon/folder",
|
||||
"/obj/item/weapon/clipboard",
|
||||
"/obj/item/weapon/anodevice",
|
||||
"/obj/item/clothing/glasses",
|
||||
"/obj/item/weapon/wrench",
|
||||
"/obj/item/weapon/storage/box/excavation",
|
||||
"/obj/item/weapon/anobattery")
|
||||
/obj/item/weapon/storage/box/samplebags,
|
||||
/obj/item/device/core_sampler,
|
||||
/obj/item/device/beacon_locator,
|
||||
/obj/item/device/radio/beacon,
|
||||
/obj/item/device/gps,
|
||||
/obj/item/device/measuring_tape,
|
||||
/obj/item/device/flashlight,
|
||||
/obj/item/weapon/pickaxe,
|
||||
/obj/item/device/depth_scanner,
|
||||
/obj/item/device/camera,
|
||||
/obj/item/weapon/paper,
|
||||
/obj/item/weapon/photo,
|
||||
/obj/item/weapon/folder,
|
||||
/obj/item/weapon/pen,
|
||||
/obj/item/weapon/folder,
|
||||
/obj/item/weapon/clipboard,
|
||||
/obj/item/weapon/anodevice,
|
||||
/obj/item/clothing/glasses,
|
||||
/obj/item/weapon/wrench,
|
||||
/obj/item/weapon/storage/box/excavation,
|
||||
/obj/item/weapon/anobattery)
|
||||
|
||||
@@ -33,4 +33,4 @@
|
||||
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/fossil")
|
||||
can_hold = list(/obj/item/weapon/fossil)
|
||||
|
||||
@@ -110,13 +110,13 @@
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
storage_slots = 7
|
||||
w_class = 2
|
||||
can_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",\
|
||||
"/obj/item/weapon/pickaxe/four_pick",\
|
||||
"/obj/item/weapon/pickaxe/five_pick",\
|
||||
"/obj/item/weapon/pickaxe/six_pick")
|
||||
can_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,\
|
||||
/obj/item/weapon/pickaxe/four_pick,\
|
||||
/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
|
||||
|
||||
Reference in New Issue
Block a user