Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] [MODULAR] Fixes a bug whereby loadout plushes with a custom desc could revert to the default desc #636

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modular_skyrat/master_files/code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@

human_mob.dna.current_body_size = BODY_SIZE_NORMAL // because if we don't set this, update_body_size will think that it has no work to do.
human_mob.dna.update_body_size()

/// Called after a loadout item gets custom named
/atom/proc/on_loadout_custom_named()
return

/// Called after a loadout item gets a custom description
/atom/proc/on_loadout_custom_described()
return
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Because plushes have a second desc var that needs to be updated
/obj/item/toy/plush/on_loadout_custom_described()
normal_desc = desc

// // MODULAR PLUSHES
/obj/item/toy/plush/skyrat
icon = 'modular_skyrat/master_files/icons/obj/plushes.dmi'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ GLOBAL_LIST_EMPTY(all_loadout_datums)
if(equipped_item)
if(INFO_NAMED in our_loadout[item_path])
equipped_item.name = our_loadout[item_path][INFO_NAMED]
equipped_item.on_loadout_custom_named()
if(INFO_DESCRIBED in our_loadout[item_path])
equipped_item.desc = our_loadout[item_path][INFO_DESCRIBED]
equipped_item.on_loadout_custom_described()
else
stack_trace("[type] on_equip_item(): Could not locate item (path: [item_path]) in [equipper]'s contents to set name/desc!")

Expand Down
Loading