(In BYOND terminology, rooms are areas that have no turfs assigned to them.)
If you look at the room example, it seems that verbs will function for anything in that room by default.
Yet, in my recent attempt, it seems that room verb functionality was lost. Nothing happened when I tried to use the verb, it produced no text output and didn't move the player.
Numbered Steps to Reproduce Problem:
The following code seemed to reproduce the problem for a player located in that area.
Code Snippet (if applicable) to Reproduce Problem:
area/selectfaction
verb/btnJoinNativeFaction()
// set src in world.contents // Removing this line breaks it.
var/mob/player/thisPlayer = usr
if (thisPlayer in contents)
thisPlayer.faction = "native"
thisPlayer.Move(locate(/area/nativefaction))
else
usr << "You will need to quit your existing faction before you can join a new one."
/area/nativefaction
Entered(var/mob/player/thisEntered)
if (!(istype(thisEntered,/mob/player)))
DebugMsg("[type].Entered(): [thisEntered.name][thisEntered.type] entered area/selectfaction. Deleting offender.")
del thisEntered
return()
else
thisEntered << "You have joined the Native faction."
winset (thisEntered,"childView","left=paneViewNativeFaction")
winset (thisEntered,"lblViewNativeStory","text=\"[GenerateNativeStory(thisEntered)]\"")
mob/player
density = 0
var/faction // Simple text string to describe faction. Should be native, terran, or pirate
New()
Move(locate(/area/selectfaction))
Expected Results:
The player is moved to /area/nativefaction, which produces obvious results.
Actual Results:
Nothing happens. There's not even a 'invalid verb' message. It's an identical result for the verb simply not being accessible.
Does the problem occur:
Every time
When does the problem NOT occur?
Outside of using a workaround, never.
Workarounds:
There are various workarounds involving verb arithmetic or, as in this case, simply making the verb accessible to world and doing the access checks manually. Still, in terms of usability, it would be nice if verbs would work for rooms.