Skip to content

Commit

Permalink
Merge pull request #52 from SynthTwo/upstreammergefix
Browse files Browse the repository at this point in the history
I did something really stupid
  • Loading branch information
SynthTwo authored Aug 11, 2024
2 parents 625b824 + d37dfc3 commit 969d658
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 318 deletions.
1 change: 0 additions & 1 deletion code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
tainted_character_profiles = FALSE
//NOVA EDIT ADDITION BEGIN
data["preview_selection"] = preview_pref
data["erp_pref"] = read_preference(/datum/preference/toggle/master_erp_preferences)
data["quirk_points_enabled"] = !CONFIG_GET(flag/disable_quirk_points)
data["quirks_balance"] = GetQuirkBalance()
data["positive_quirk_count"] = GetPositiveQuirkCount()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
name = "White Fannypack"
item_path = /obj/item/storage/belt/fannypack/white

/datum/loadout_item/belts/erpbelt
name = "Black Leather Belt"
item_path = /obj/item/storage/belt/erpbelt
erp_item = TRUE

/datum/loadout_item/belts/lantern
name = "Lantern"
item_path = /obj/item/flashlight/lantern
Expand Down
276 changes: 0 additions & 276 deletions modular_nova/modules/loadouts/loadout_items/loadout_datum_erp.dm

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@
name = "Colourable Arm Wraps"
item_path = /obj/item/clothing/gloves/bracer/wraps

/datum/loadout_item/gloves/latex
name = "Latex Gloves"
item_path = /obj/item/clothing/gloves/latex_gloves
erp_item = TRUE

/*
* RINGS
*/
Expand Down
42 changes: 12 additions & 30 deletions modular_nova/modules/loadouts/loadout_ui/loadout_outfit_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,37 +46,27 @@
var/list/loadout_list = preference_source?.read_preference(/datum/preference/loadout)
var/list/loadout_datums = loadout_list_to_datums(loadout_list)
var/obj/item/storage/briefcase/empty/briefcase
var/obj/item/storage/box/erp/erpbox
var/erp_enabled = !CONFIG_GET(flag/disable_erp_preferences)
if(override_preference == LOADOUT_OVERRIDE_CASE && !visuals_only)
briefcase = new(loc)

for(var/datum/loadout_item/item as anything in loadout_datums)
if (erp_enabled && item.erp_box == TRUE)
if (isnull(erpbox))
erpbox = new(loc)
new item.item_path(erpbox)
else
if (!item.can_be_applied_to(src, preference_source, equipping_job))
continue
new item.item_path(briefcase)
if (!item.can_be_applied_to(src, preference_source, equipping_job))
continue
new item.item_path(briefcase)

briefcase.name = "[preference_source.read_preference(/datum/preference/name/real_name)]'s travel suitcase"
equipOutfit(equipped_outfit, visuals_only)
put_in_hands(briefcase)
else
for(var/datum/loadout_item/item as anything in loadout_datums)
if (erp_enabled && item.erp_box == TRUE)
if (isnull(erpbox))
erpbox = new(loc)
new item.item_path(erpbox)
else
if (!item.can_be_applied_to(src, preference_source, equipping_job))
continue

// Make sure the item is not overriding an important for life outfit item
var/datum/outfit/outfit_important_for_life = dna.species.outfit_important_for_life
if(!outfit_important_for_life || !item.pre_equip_item(equipped_outfit, outfit_important_for_life, src, visuals_only))
item.insert_path_into_outfit(equipped_outfit, src, visuals_only, override_preference)
if (!item.can_be_applied_to(src, preference_source, equipping_job))
continue

// Make sure the item is not overriding an important for life outfit item
var/datum/outfit/outfit_important_for_life = dna.species.outfit_important_for_life
if(!outfit_important_for_life || !item.pre_equip_item(equipped_outfit, outfit_important_for_life, src, visuals_only))
item.insert_path_into_outfit(equipped_outfit, src, visuals_only, override_preference)

equipOutfit(equipped_outfit, visuals_only)

var/list/new_contents = isnull(briefcase) ? get_all_gear() : briefcase.contents
Expand All @@ -86,8 +76,6 @@
continue

var/obj/item/equipped = locate(item.item_path) in new_contents
if (!isnull(erpbox) && item.erp_box)
equipped = locate(item.item_path) in erpbox
for(var/atom/equipped_item in new_contents)
if(equipped_item.type == item.item_path)
equipped = equipped_item
Expand All @@ -108,12 +96,6 @@
var/obj/item/clothing/under/uniform = w_uniform
uniform?.attach_accessory(new /obj/item/clothing/accessory/green_pin(), src, FALSE)

if (!isnull(erpbox))
if (!isnull(briefcase))
briefcase.contents += erpbox
else
erpbox.equip_to_best_slot(src)

regenerate_icons()
return TRUE

Expand Down
1 change: 0 additions & 1 deletion tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7753,7 +7753,6 @@
#include "modular_nova\modules\loadouts\loadout_items\loadout_datum_accessory.dm"
#include "modular_nova\modules\loadouts\loadout_items\loadout_datum_belts.dm"
#include "modular_nova\modules\loadouts\loadout_items\loadout_datum_ears.dm"
#include "modular_nova\modules\loadouts\loadout_items\loadout_datum_erp.dm"
#include "modular_nova\modules\loadouts\loadout_items\loadout_datum_glasses.dm"
#include "modular_nova\modules\loadouts\loadout_items\loadout_datum_gloves.dm"
#include "modular_nova\modules\loadouts\loadout_items\loadout_datum_heads.dm"
Expand Down

0 comments on commit 969d658

Please sign in to comment.