I would like a proc that returns mobs and objects, essentially we already have the proc hearers but it only returns mobs, if you have mobs inside objects they become effectively deaf since you then cannot check objects for mobs inside of objects.
http://www.byond.com/docs/ref/info.html#/proc/hearers
Workarounds are cludgy and essentially the work around is to use view after setting the turf underneath the mob making the luminosity to full bright then changing it back to regular luminosity so you can "hear" in the dark as well.
https://github.com/Baystation12/Baystation12/blob/master/ code/__HELPERS/game.dm#L38
Currently we use this list of objects to get turfs they are on then cycle through the client list to see if a mob is ultimately on that tile.
These sorts of work arounds have probably resulted in such things as recursive mob checks within objects and have caused speech to become completely more CPU intensive then it needs to be.
ID:1753423
![]() Jan 2 2015, 7:56 pm (Edited on Jan 2 2015, 8:16 pm)
|
|||||||
| |||||||
Mloc wrote:
Either a version of view() that ignores lighting, or a version of hearers() that also returns objects. are you talking about range() ? Format: range(Dist,Center=usr) Returns: A list of objects within Dist tiles of Center. Args: Dist: A number. Center: An object on the map. "This instruction is identical to view() except visibility is ignored. All objects are included in the list whether they are visible or not. " |
range() ignores lighting and LoS, I want to be able to use LoS and ignore lighting.
|
Or both!