ID:2952549
 
BYOND Version:515
Operating System:Windows 11 Pro 64-bit
Web Browser:Chrome 131.0.0.0
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
When you modify a mob's verb list while that mob's loc is an object, the verbs panel will not update to reflect the change (including the chat bar). Even if you already had the verb visible and you're supposed to not have the verb, clicking the verb will do nothing.

Numbered Steps to Reproduce Problem:
  1. Control: Toggle the verb (it is added)
  2. Control: Use the test verb (it says it was clicked)
  3. Control: Toggle the verb (it was removed)
  4. Move into the object
  5. Try adding the verb (nothing happens)
  6. Move out of the object (verb appears)
  7. Use the test verb (it says it was clicked)
  8. Move into the object
  9. Use the test verb (it says it was clicked)
  10. Try toggling the verb (nothing happens)
  11. Try using the test verb (nothing happens)
  12. Move out of the object (verb dissapears)




Code Snippet (if applicable) to Reproduce Problem:
/world
fps = 25
icon_size = 32
view = 6

maxx = 2
maxy = 2
maxz = 1

var/global/obj/container

/world/New()
. = ..()
container = new /obj(locate(2,2,1))

/mob
step_size = 8
var/added = 0
var/moved = 0

/mob/Login()
. = ..()
world << "[world.byond_version].[world.byond_build]"
world << "Verb adding/removal should work when a mob's loc is an object. But instead it is 'sticky' when loc is an object."
world << "-----------------------------------------"

/mob/verb/toggle_verb()
if(added)
remove_verb(src, /mob/proc/do_stuff)
else
add_verb(src, /mob/proc/do_stuff)
added = !added
world << "[src] should have [added ? "added" : "removed"] the verb."

/mob/verb/toggle_containment()
if(moved)
src.loc = locate(1,1,1)
else
src.loc = container
moved = !moved
world << "[src] was moved [moved ? "into" : "out of"] the object."

/mob/proc/do_stuff()
set name = "Test me!"
set desc = "Clicking me should make a message"
world << "[src] clicked the test verb!"

/proc/add_verb(mob/target, verb_to_add)
target.verbs += verb_to_add

/proc/remove_verb(mob/target, verb_to_remove)
target.verbs -= verb_to_remove


Test case (Type of target in add/remove procs was a client rather than a mob, but doesn't matter): https://discord.com/channels/725444629172060262/ 725458744711839873/1307544082289266820

Expected Results:
When adding a verb, it should be added regardless of your location. When removing a verb, it should be removed regardless of your location.

Actual Results:
Verb adding/removal on a mob does not update the panel when loc is an obj.

Does the problem occur:
Every time? Or how often?
Always
In other games?
Yes
In other user accounts?
Yes
On other computers?
Yes

When does the problem NOT occur?
When your loc is not an object.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Reproduced on 514.1589 and 515.1646 so is likely a long standing bug.

Workarounds:
Don't alter verbs when loc is an obj, or move them out to force an update and then back.

Login to reply.