mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[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:
@@ -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
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user