I was attempted to see if it was possible to run an alternate version of a game depending on the type of client used. What I found in doing this was that the BYOND web client will not remove commands once a command is added to its client.
Numbered Steps to Reproduce Problem:
Code below.
Code Snippet (if applicable) to Reproduce Problem:
client
New()
..()
src.verbs-=typesof(/client/verb)
if(connection == "seeker")
world<<"Seeker client [src]."
src.verbs+=/client/verb/ClientC
if(connection == "web")
world<<"Web client [src]"
src.verbs+=/client/verb/WebC
verb
ClientC(T as text)
set name="Client Chat"
world<<"<b><font color=red>CLIENT</font> [usr]</b>: [T]"
WebC(T as text)
set name="Web Chat"
world<<"<b><font color=red>WEB</font> [usr]</b>: [T]"
Test()
src.verbs-=/client/verb/ClientC
world<<"Command sent"
I was testing on how I might be able to solve the issue and it just opened another can of worms all together.
client
New()
..()
if(connection == "seeker")
world<<"Seeker client [src]."
src.verbs+=typesof(/client/sc/verb)
if(connection == "web")
world<<"Web client [src]"
src.verbs+=typesof(/client/wc/verb)
if(connection == "http")
world<<"Http client [src]"
src.verbs+=typesof(/client/wc/verb)
verb
Toc()
world<<"[usr] client type is [connection]"
wc
verb
WebC(T as text)
set name="Web Chat"
world<<"<b><font color=red>WEB</font> [usr]</b>: [T]"
Test()
src.verbs-=/client/sc/verb/ClientC
world<<"Command sent"
sc
verb
ClientC(T as text)
set name="Client Chat"
world<<"<b><font color=red>CLIENT</font> [usr]</b>: [T]"
All the second code did was make the web client totally ignore both the WC and SC verbs all together and if you remove the client/verb then it jumps WC and goes right to whatever section of verbs are listed last in this case SC.
Expected Results:
Seeker Clients with the verb Client Chat and web clients with the verb Web Chat.
Actual Results:
Seeker client has client chat web client has client chat and web chat.
Does the problem occur:
Every time? Or how often?
Every time
In other games?
Yes I have check many other games the same issue applies.
In other user accounts?
Yes all accounts
On other computers?
Yes more than one computer
When does the problem NOT occur?
When not using the web client :P
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.)
Unsure didn't have the time to test it on other versions.
Workarounds:
None so far... o.O
To clarify this, are you saying the removed verb still works, or merely that it still shows up in the verb panel?