Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Spacephobia returns. More efficient.
#1
I've heard that before it was removed, spacephobia was super inefficient because it looped through all the things that a mob could see to look for a space tile. This completely does away with that. Now, it just takes a random turf within a radius of the player. If it's a space tile (even if they can't see it) then they have a chance to suffer the effects of the phobia. (I didn't change the actual effects, but I upped the probability of them to account for the lower probability of randomly hitting a space tile near you).

This stuff is the pr description:

  • Picks a random tile within some radius given by the programmer and checks if it's a /turf/space. If it is OR if our radius is touching the map edge, then we trigger the effects.
  • Only works on the station z-level. Because I use hardcoded for the map size for that z-level (300x300). I think there might be a map.size or something where I could get those for any z-level, but I can't find it.
  • There is a tick counter so that it will only run the logic every X number of ticks. I have it set to run like each 4 or 5 times I think.
  • I increased the probability for a faint or scream emote. But that can change.
(This video is super boring, only watch if you want proof that it works.)
Video: https://streamable.com/9ome8

You can take or leave it. Personally, I never liked spacephobia at all and don't mind if it never comes back. But lack of efficiency for something that can easily be made more efficient should not be a reason to remove something.

https://github.com/goonstation/goonstati...6/pull/104


Messages In This Thread
[Feature] Spacephobia returns. More efficient. - by kyle2143 - 01-21-2019, 07:02 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)