The first is how do i make a list show every element in it, even if the 2 elements are the same type. Example:
mob
Login()
var/obj/TestOBJ/O = new(src.contents)
O.stat1=1
O.stat2=1
var/obj/TestOBJ/O2 = new(src.contents)
O2.stat1=1
O2.stat2=0
verb
TestVerb()
var/list/choicelist = list()
for(var/obj/O in usr.contents)
if(O.addtolist==1)
choicelist += O
choicelist+="Cancel"
var/obj/Choice = input("Select One","Test")in choicelist
if(Choice=="Cancel")
return
else
usr << "[Choice]:"
usr << "[Choice.stat1]"
usr << "[Choice.stat2]"
obj
var
stat1 = 0
stat2 = 0
TestOBJ
In the above example, there are 2 TestOBJs in the inventory when you login, one with stat1=1 stat2=1 and the other with stat1=1 stat2=0, the TestVerbs will make you pick one and display the stats as outputs. The problem here is the test verb will only have 1 TestOBJ in it, not both, and will always pick the one first in usr.contents... How can I get it to show both objects while still being able to reference them?
The second problem is more of a straight question really. How can I get an Obj verb to appear in the pop-up menu of a mob in a list other than usr.contents.
Example:
obj/Hammer
verb
Use(mob/Enemy/M)
set category = null
set src in oview()
var/mob/Player/P = src.owner
P << "You hit [M] on head with hammer!"
In the above example, the verb Use will only appear in the pop-up menu when you right click, the problems however, is that it will appear in the pop-up menu for all mobs (and return an error if you select a non-enemy) where I just want it to appear for mobs of type /mob/Enemy and secondly it doesn't show up in the pop-up menu for mobs that are in a statpanel.
Any ideas on any of these problems would be a great help to me,
Thank You,
Kozar's Friend
2. Verb doesn't appear for mobs in contents because you have set src in oview(), don't know how to fix your problem though. Verbs were good in BYOND 3.0 or 3.5, but now there's interface and it's better to use it.