[NO-GBP] Last loadout fixes to make it on par with the old system (#28684)

Last loadout fixes to make it on par with the old system
This commit is contained in:
Waterpig
2024-07-08 14:52:48 +05:30
committed by GitHub
parent 039f2cb09b
commit 7bd79ddba1
3 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -55,7 +55,7 @@
to_chat(preference_source.parent, span_warning("You were unable to get a loadout item ([initial(item.item_path.name)]) due to CKEY restrictions!"))
continue
if(loadout_placement_preference == LOADOUT_OVERRIDE_CASE)
if(loadout_placement_preference == LOADOUT_OVERRIDE_CASE && !visuals_only)
if(!travel_suitcase)
travel_suitcase = new(loc)
new item.item_path(travel_suitcase)
@@ -0,0 +1,25 @@
/datum/loadout_category/pocket
max_allowed = 3
/datum/loadout_category/toys
VAR_PRIVATE/max_allowed = 3
/datum/loadout_category/toys/New()
. = ..()
category_info = "([max_allowed] allowed)"
/datum/loadout_category/toys/handle_duplicate_entires(
datum/preference_middleware/loadout/manager,
datum/loadout_item/conflicting_item,
datum/loadout_item/added_item,
list/datum/loadout_item/all_loadout_items,
)
var/list/datum/loadout_item/toys/other_toys_items = list()
for(var/datum/loadout_item/toys/other_toys_item in all_loadout_items)
other_toys_items += other_toys_item
if(length(other_toys_items) >= max_allowed)
// We only need to deselect something if we're above the limit
// (And if we are we prioritize the first item found, FIFO)
manager.deselect_item(other_toys_items[1])
return TRUE
+1
View File
@@ -6675,6 +6675,7 @@
#include "modular_skyrat\master_files\code\modules\jobs\job_types\warden.dm"
#include "modular_skyrat\master_files\code\modules\language\_language.dm"
#include "modular_skyrat\master_files\code\modules\language\language_holder.dm"
#include "modular_skyrat\master_files\code\modules\loadout\category_rebalance.dm"
#include "modular_skyrat\master_files\code\modules\loadout\categories\accessories.dm"
#include "modular_skyrat\master_files\code\modules\loadout\categories\belts.dm"
#include "modular_skyrat\master_files\code\modules\loadout\categories\donator_personal.dm"