1
2
May 15 2016, 11:21 pm
|
|
Well there are well over 400 skills with numeric ids already. I guess I'll just manage with broken cpu ;(
|
mob/proc/addSkill(skill/skill) Well there are well over 400 skills with numeric ids already. Boom. Problem solved. Numeric ids converted to text on insertion into the list. |
In response to Ter13
|
|
Would it make a difference if they were global procs with a mob argument instead of mob procs?
proc/addSkill(mob/m,skill/s) |
In response to Kozuma3
|
|
Kozuma3 wrote:
Would it make a difference if they were global procs with a mob argument instead of mob procs? Only the fact that that's a terrible design. Look how much you're using "m." in your global version. That's a sign that src has been badly chosen. Because the skills list is intrinsic to a mob, adding and removing skills should be mob procs, not global ones. |
In response to Lummox JR
|
|
Lummox JR wrote:
Because the skills list is intrinsic to a mob, adding and removing skills should be mob procs, not global ones. Understandable. I was wondering tho when I typed that up if each mob is given the proc or is there only a single proc that all the mobs have access to or however that works. |
In response to Kozuma3
|
|
Kozuma3 wrote:
Lummox JR wrote: It's just a single proc. The prototype is given a list of procs that belong to it. When you call a proc by name, the engine does a lookup from src's type path and up, so all mobs would have this proc. It doesn't take up any more memory than the global proc, and uses less at runtime because it's using one fewer argument. To put it another way, the proc is part of /mob's definition, not its instances. |
In response to Lummox JR
|
|
Thank you for clearing that up.
|
1
2