mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 03:26:31 +01:00
Small storage refactor and examine change (#44109)
* Removes repeated line * Description change for clothing items that can only store specific items * Get all children of can_hold listed items. * can_hold only needs the top most item, child items are dealt automatically * cant_hold related change * Text change * Moves the item check to the line above, and removes the current. * Same changes, but to belt/wallet code. * Change to using signals instead * Generic signal on datum/topic * Cache typecache, and small signal change * Small argument tweaks and remove unneeded lists * Change to proc * Change call can_holds/cant_holds to use new proc * initial, and cleaned up display code * Null check
This commit is contained in:
@@ -124,8 +124,10 @@
|
||||
how_cool_are_your_threads += "[src]'s storage opens when clicked.\n"
|
||||
else
|
||||
how_cool_are_your_threads += "[src]'s storage opens when dragged to yourself.\n"
|
||||
how_cool_are_your_threads += "[src] can store [pockets.max_items] item\s.\n"
|
||||
how_cool_are_your_threads += "[src] can store items that are [weightclass2text(pockets.max_w_class)] or smaller.\n"
|
||||
if (!pockets.can_hold.len) // If pocket type can hold anything, vs only specific items
|
||||
how_cool_are_your_threads += "[src] can store [pockets.max_items] item\s that are [weightclass2text(pockets.max_w_class)] or smaller.\n"
|
||||
else
|
||||
how_cool_are_your_threads += "[src] can store [pockets.max_items] <a href='?src=[REF(src)];show_valid_pocket_items=1'>item\s</a>.\n"
|
||||
if(pockets.quickdraw)
|
||||
how_cool_are_your_threads += "You can quickly remove an item from [src] using Alt-Click.\n"
|
||||
if(pockets.silent)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
/obj/item/storage/bag/easterbasket/Initialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(STR, /datum/component/storage)
|
||||
STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/egg, /obj/item/reagent_containers/food/snacks/chocolateegg, /obj/item/reagent_containers/food/snacks/boiledegg))
|
||||
STR.set_holdable(list(/obj/item/reagent_containers/food/snacks/egg, /obj/item/reagent_containers/food/snacks/chocolateegg, /obj/item/reagent_containers/food/snacks/boiledegg))
|
||||
|
||||
/obj/item/storage/bag/easterbasket/proc/countEggs()
|
||||
cut_overlays()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
STR.max_w_class = WEIGHT_CLASS_NORMAL
|
||||
STR.max_items = 40
|
||||
STR.max_combined_w_class = 40
|
||||
STR.can_hold = typecacheof(list(/obj/item/coin, /obj/item/stack/spacecash, /obj/item/holochip))
|
||||
STR.set_holdable(list(/obj/item/coin, /obj/item/stack/spacecash, /obj/item/holochip))
|
||||
|
||||
/obj/item/storage/bag/money/vault/PopulateContents()
|
||||
new /obj/item/coin/silver(src)
|
||||
@@ -24,4 +24,4 @@
|
||||
new /obj/item/coin/silver(src)
|
||||
new /obj/item/coin/gold(src)
|
||||
new /obj/item/coin/gold(src)
|
||||
new /obj/item/coin/adamantine(src)
|
||||
new /obj/item/coin/adamantine(src)
|
||||
|
||||
@@ -674,8 +674,6 @@
|
||||
to_chat(src, "<span class='notice'>You succesfuly remove the durathread strand.</span>")
|
||||
remove_status_effect(STATUS_EFFECT_CHOKINGSTRAND)
|
||||
return
|
||||
visible_message("[src] examines [p_them()]self.", \
|
||||
"<span class='notice'>You check yourself for injuries.</span>")
|
||||
check_self_for_injuries()
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/obj/item/storage/photo_album/Initialize()
|
||||
. = ..()
|
||||
GET_COMPONENT(STR, /datum/component/storage)
|
||||
STR.can_hold = typecacheof(list(/obj/item/photo))
|
||||
STR.set_holdable(list(/obj/item/photo))
|
||||
STR.max_combined_w_class = 42
|
||||
STR.max_items = 21
|
||||
LAZYADD(SSpersistence.photo_albums, src)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define DUEL_IDLE 1
|
||||
#define DUEL_PREPARATION 2
|
||||
#define DUEL_READY 3
|
||||
#define DUEL_READY 3
|
||||
#define DUEL_COUNTDOWN 4
|
||||
#define DUEL_FIRING 5
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
else
|
||||
duel.fired[src] = TRUE
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/gun/energy/dueling/before_firing(target,user)
|
||||
var/obj/item/ammo_casing/energy/duel/D = chambered
|
||||
D.setting = setting
|
||||
@@ -297,7 +297,7 @@
|
||||
var/mob/living/L = target
|
||||
if(!istype(target))
|
||||
return BULLET_ACT_BLOCK
|
||||
|
||||
|
||||
var/obj/item/bodypart/B = L.get_bodypart(BODY_ZONE_HEAD)
|
||||
B.dismember()
|
||||
qdel(B)
|
||||
@@ -321,7 +321,7 @@
|
||||
GET_COMPONENT(STR, /datum/component/storage)
|
||||
STR.max_w_class = WEIGHT_CLASS_SMALL
|
||||
STR.max_items = 2
|
||||
STR.can_hold = typecacheof(list(/obj/item/gun/energy/dueling))
|
||||
STR.set_holdable(list(/obj/item/gun/energy/dueling))
|
||||
|
||||
/obj/item/storage/lockbox/dueling/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
Reference in New Issue
Block a user