Skip to content

Commit

Permalink
Restore mouse_opacity for morpher ejected items (#3841)
Browse files Browse the repository at this point in the history
# About the pull request

This PR simply restores the mouse_opacity setting for any item ejected
by the egg morpher. Normally /obj/item/storage/proc/_item_removal
restores this change, but the morpher is simply force moving items and
doesn't restore that to initial like removing from storage would
normally.

# Explain why it's good for the game

Fixes #3703 or at least should greatly mitigate it.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>


![image](https://github.com/cmss13-devs/cmss13/assets/76988376/ae816b0e-0a85-441b-ab6d-962e02eff97a)

</details>


# Changelog
:cl: Drathek
fix: Fix morpher ejected items and dumped objectives not restoring their
mouse_opacity setting.
/:cl:
  • Loading branch information
Drulikar authored Jul 14, 2023
1 parent dcb04b8 commit 615b9a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/game/objects/items/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -799,9 +799,9 @@ W is always an item. stop_warning prevents messaging. user may be null.**/
storage_close(watcher)

/obj/item/storage/proc/dump_objectives()
for(var/obj/item/I in src)
if(I.is_objective)
I.forceMove(loc)
for(var/obj/item/cur_item in src)
if(cur_item.is_objective)
remove_from_storage(cur_item, loc)


/obj/item/storage/Destroy()
Expand Down
1 change: 1 addition & 0 deletions code/modules/cm_aliens/structures/special/egg_morpher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
var/obj/item/item = A
if(item.is_objective && item.unacidable)
item.forceMove(get_step(loc, pick(alldirs)))
item.mouse_opacity = initial(item.mouse_opacity)

QDEL_NULL(captured_mob)
update_icon()
Expand Down

0 comments on commit 615b9a6

Please sign in to comment.