Skip to content

Commit

Permalink
Loadout update fixes 1
Browse files Browse the repository at this point in the history
  • Loading branch information
Majkl-J committed Jul 2, 2024
1 parent d9707a2 commit 37afcb5
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 101 deletions.
8 changes: 8 additions & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_BALD" = TRAIT_BALD,
"TRAIT_BALLOON_SUTRA" = TRAIT_BALLOON_SUTRA,
"TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE,
"TRAIT_BEAST_EMPATHY" = TRAIT_BEAST_EMPATHY,
"TRAIT_BEING_BLADE_SHIELDED" = TRAIT_BEING_BLADE_SHIELDED,
"TRAIT_BLOB_ALLY" = TRAIT_BLOB_ALLY,
"TRAIT_BLOCK_SHUTTLE_MOVEMENT" = TRAIT_BLOCK_SHUTTLE_MOVEMENT,
Expand Down Expand Up @@ -209,6 +210,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_EXAMINE_FISHING_SPOT" = TRAIT_EXAMINE_FISHING_SPOT,
"TRAIT_EXAMINE_FITNESS" = TRAIT_EXAMINE_FITNESS,
"TRAIT_EXPANDED_FOV" = TRAIT_EXPANDED_FOV,
"TRAIT_EXPERT_FISHER" = TRAIT_EXPERT_FISHER,
"TRAIT_EXTROVERT" = TRAIT_EXTROVERT,
"TRAIT_FAKEDEATH" = TRAIT_FAKEDEATH,
"TRAIT_FASTMED" = TRAIT_FASTMED,
Expand Down Expand Up @@ -418,6 +420,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_ROCK_METAMORPHIC" = TRAIT_ROCK_METAMORPHIC,
"TRAIT_ROCK_STONER" = TRAIT_ROCK_STONER,
"TRAIT_ROD_SUPLEX" = TRAIT_ROD_SUPLEX,
"TRAIT_ROUGHRIDER" = TRAIT_ROUGHRIDER,
"TRAIT_SABRAGE_PRO" = TRAIT_SABRAGE_PRO,
"TRAIT_SACRIFICED" = TRAIT_SACRIFICED,
"TRAIT_SECURITY_HUD" = TRAIT_SECURITY_HUD,
Expand Down Expand Up @@ -450,7 +453,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_STIMULATED" = TRAIT_STIMULATED,
"TRAIT_STRONG_GRABBER" = TRAIT_STRONG_GRABBER,
"TRAIT_STRONG_STOMACH" = TRAIT_STRONG_STOMACH,
"TRAIT_STUBBY_BODY" = TRAIT_STUBBY_BODY,
"TRAIT_STUNIMMUNE" = TRAIT_STUNIMMUNE,
"TRAIT_STURDY_FRAME" = TRAIT_STURDY_FRAME,
"TRAIT_SUCCUMB_OVERRIDE" = TRAIT_SUCCUMB_OVERRIDE,
"TRAIT_SUICIDED" = TRAIT_SUICIDED,
"TRAIT_SUPERMATTER_SOOTHER" = TRAIT_SUPERMATTER_SOOTHER,
Expand Down Expand Up @@ -551,6 +556,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
),
/obj/item/bodypart = list(
"TRAIT_PARALYSIS" = TRAIT_PARALYSIS,
/obj/item/bodypart = list(
"TRAIT_EASY_ATTACH" = TRAIT_EASY_ATTACH,
),
),
/obj/item/card/id = list(
"TRAIT_JOB_FIRST_ID_CARD" = TRAIT_JOB_FIRST_ID_CARD,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,85 +1,3 @@
/*
* LOADOUT ITEM DATUMS FOR BACKPACK/POCKET SLOTS
*/

/// Pocket items (Moved to backpack)
GLOBAL_LIST_INIT(loadout_pocket_items, generate_loadout_items(/datum/loadout_item/pocket_items))

/datum/loadout_item/pocket_items
category = LOADOUT_ITEM_MISC

/datum/loadout_item/pocket_items/pre_equip_item(datum/outfit/outfit, datum/outfit/outfit_important_for_life, mob/living/carbon/human/equipper, visuals_only = FALSE) // these go in the backpack
return FALSE

// The wallet loadout item is special, and puts the player's ID and other small items into it on initialize (fancy!)
/datum/loadout_item/pocket_items/wallet
name = "Wallet"
item_path = /obj/item/storage/wallet
additional_tooltip_contents = list("FILLS AUTOMATICALLY - This item will populate itself with your ID card and other small items you may have on spawn.")

// We add our wallet manually, later, so no need to put it in any outfits.
/datum/loadout_item/pocket_items/wallet/insert_path_into_outfit(datum/outfit/outfit, mob/living/carbon/human/equipper, visuals_only)
return FALSE

// We didn't spawn any item yet, so nothing to call here.
/datum/loadout_item/pocket_items/wallet/on_equip_item(datum/preferences/preference_source, mob/living/carbon/human/equipper, visuals_only)
return FALSE

// We add our wallet at the very end of character initialization (after quirks, etc) to ensure the backpack / their ID is all set by now.
/datum/loadout_item/pocket_items/wallet/post_equip_item(datum/preferences/preference_source, mob/living/carbon/human/equipper)
var/obj/item/card/id/advanced/id_card = equipper.get_item_by_slot(ITEM_SLOT_ID)
if(istype(id_card, /obj/item/storage/wallet))
return

var/obj/item/storage/wallet/wallet = new(equipper)
if(istype(id_card))
equipper.temporarilyRemoveItemFromInventory(id_card, force = TRUE)
equipper.equip_to_slot_if_possible(wallet, ITEM_SLOT_ID, initial = TRUE)
id_card.forceMove(wallet)

if(equipper.back)
var/list/backpack_stuff = equipper.back.atom_storage?.return_inv(FALSE)
for(var/obj/item/thing in backpack_stuff)
if(wallet.contents.len >= 3)
break
if(thing.w_class <= WEIGHT_CLASS_SMALL)
wallet.atom_storage.attempt_insert(src, thing, equipper, TRUE, FALSE)
else
if(!equipper.equip_to_slot_if_possible(wallet, slot = ITEM_SLOT_BACKPACK, initial = TRUE))
wallet.forceMove(equipper.drop_location())

/*
* LUNCHBOX
*/

/datum/loadout_item/pocket_items/lunchbox_nanotrasen
name = "Nanotrasen Lunchbox"
item_path = /obj/item/storage/lunchbox/nanotrasen

/datum/loadout_item/pocket_items/lunchbox_medical
name = "Medical Lunchbox"
item_path = /obj/item/storage/lunchbox/medical

/datum/loadout_item/pocket_items/lunchbox_bunny
name = "Bunny Lunchbox"
item_path = /obj/item/storage/lunchbox/bunny

/datum/loadout_item/pocket_items/lunchbox_corgi
name = "Corgi Lunchbox"
item_path = /obj/item/storage/lunchbox/corgi

/datum/loadout_item/pocket_items/lunchbox_heart
name = "Heart Lunchbox"
item_path = /obj/item/storage/lunchbox/heart

/datum/loadout_item/pocket_items/lunchbox_safetymoth
name = "Safety Moth Lunchbox"
item_path = /obj/item/storage/lunchbox/safetymoth

/datum/loadout_item/pocket_items/lunchbox_amongus
name = "Suspicious Red Lunchbox"
item_path = /obj/item/storage/lunchbox/amongus

/*
* GUM
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/flag/galfed, 32)
desc = "The flag of the Tizirian Empire. The large red sun in the middle is a traditional Tizirian symbol representing their main deity, Aola."
icon = 'modular_zubbers/icons/obj/flags.dmi'
icon_state = "flag_tizira"
item_flag = /obj/item/sign/flag/tizira

/obj/structure/sign/flag/terragov
name = "flag of the Solarian State"
Expand All @@ -32,7 +31,6 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/sign/flag/galfed, 32)
desc = "The folded flag of the Tizirian Empire."
icon = 'modular_zubbers/icons/obj/flags.dmi'
icon_state = "folded_tizira"
sign_path = /obj/structure/sign/flag/tizira

/obj/item/sign/flag/terragov
name = "folded flag of the Solarian State"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// THIS IS WHERE LOADOUT DATUMS GO FOR ACCESSORIES (REMOVE THIS COMMENT AND TICK THIS FILE IF YOU ADD ANYTHING)
1 change: 1 addition & 0 deletions modular_zubbers/code/modules/loadout/categories/ears.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// THIS IS WHERE LOADOUT DATUMS GO FOR EARS (REMOVE THIS COMMENT AND TICK THIS FILE IF YOU ADD ANYTHING)
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@
name = "Folded Galactic Federation Flag"
item_path = /obj/item/sign/flag/galfed

/datum/loadout_item/pocket_items/flag_moghes //sprites by Crumpaloo
name = "Folded Tizirian Empire Flag"
item_path = /obj/item/sign/flag/tizira

/*
* NIF LENSES
*/
Expand Down Expand Up @@ -143,3 +139,35 @@
name = "Meson Scrying Lens Disk"
item_path = /obj/item/disk/nifsoft_uploader/meson_hud
restricted_roles = list(JOB_QUARTERMASTER, JOB_CARGO_TECHNICIAN, JOB_SHAFT_MINER, JOB_CUSTOMS_AGENT, JOB_CHIEF_ENGINEER, JOB_STATION_ENGINEER, JOB_ATMOSPHERIC_TECHNICIAN, JOB_ENGINEERING_GUARD)

/*
* LUNCHBOX
*/

/datum/loadout_item/pocket_items/lunchbox_nanotrasen
name = "Nanotrasen Lunchbox"
item_path = /obj/item/storage/lunchbox/nanotrasen

/datum/loadout_item/pocket_items/lunchbox_medical
name = "Medical Lunchbox"
item_path = /obj/item/storage/lunchbox/medical

/datum/loadout_item/pocket_items/lunchbox_bunny
name = "Bunny Lunchbox"
item_path = /obj/item/storage/lunchbox/bunny

/datum/loadout_item/pocket_items/lunchbox_corgi
name = "Corgi Lunchbox"
item_path = /obj/item/storage/lunchbox/corgi

/datum/loadout_item/pocket_items/lunchbox_heart
name = "Heart Lunchbox"
item_path = /obj/item/storage/lunchbox/heart

/datum/loadout_item/pocket_items/lunchbox_safetymoth
name = "Safety Moth Lunchbox"
item_path = /obj/item/storage/lunchbox/safetymoth

/datum/loadout_item/pocket_items/lunchbox_amongus
name = "Suspicious Red Lunchbox"
item_path = /obj/item/storage/lunchbox/amongus
26 changes: 13 additions & 13 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -8762,19 +8762,19 @@
#include "modular_zubbers\code\modules\languages\vampiric.dm"
#include "modular_zubbers\code\modules\lewd_machinery\lustwish.dm"
#include "modular_zubbers\code\modules\liquids\height_floors.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_glasses.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_gloves.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_heads.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_inhands.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_masks.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_neck.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_pocket.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_shoes.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_suit.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_toys.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\loadout_datum_under.dm"
#include "modular_zubbers\code\modules\loadouts\loadout_items\~donator\donator_personal.dm"
#include "modular_zubbers\code\modules\loadouts\overrides\loadout_items\loadout_datum.dm"
#include "modular_zubbers\code\modules\loadout\categories\glasses.dm"
#include "modular_zubbers\code\modules\loadout\categories\gloves.dm"
#include "modular_zubbers\code\modules\loadout\categories\heads.dm"
#include "modular_zubbers\code\modules\loadout\categories\inhands.dm"
#include "modular_zubbers\code\modules\loadout\categories\masks.dm"
#include "modular_zubbers\code\modules\loadout\categories\neck.dm"
#include "modular_zubbers\code\modules\loadout\categories\pocket.dm"
#include "modular_zubbers\code\modules\loadout\categories\shoes.dm"
#include "modular_zubbers\code\modules\loadout\categories\suit.dm"
#include "modular_zubbers\code\modules\loadout\categories\toys.dm"
#include "modular_zubbers\code\modules\loadout\categories\under.dm"
#include "modular_zubbers\code\modules\loadout\categories\~donator\donator_personal.dm"
#include "modular_zubbers\code\modules\loadout\overrides\loadout_items\loadout_datum.dm"
#include "modular_zubbers\code\modules\lunchbox\code\lunchbox.dm"
#include "modular_zubbers\code\modules\mapping\access_helpers.dm"
#include "modular_zubbers\code\modules\mapping\limastation\areas.dm"
Expand Down

0 comments on commit 37afcb5

Please sign in to comment.