Skip to content

Commit

Permalink
[MODULAR] Fixes a bug whereby loadout plushes with a custom desc coul…
Browse files Browse the repository at this point in the history
…d revert to the default desc (#24884)

* Fixes a bug whereby loadout plushes could rename themselves to the initial desc rather than the custom one

* Whoops
  • Loading branch information
vinylspiders authored and FFMirrorBot committed Nov 14, 2023
1 parent 3517791 commit 70eb883
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
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

0 comments on commit 70eb883

Please sign in to comment.