Integrated Dynamics

Integrated Dynamics

63M Downloads

Some way of sending a message to the player

StarkRG opened this issue ยท 6 comments

commented

It would be nice to have a way of sending chat messages to a given player when certain conditions occur. "Reactor out of fuel" or "Capacitor bank empty". You could possibly have it as part of the Entity Writer either taking an entity and sending a pre-defined message or taking a string and sending it as a message to a pre-defined player.

commented

@rubensworks I'm not a very good mod author (even the Forge example mod won't build), but I might attempt it.

i had this issue before, it was a problem of the version of gradlew i used

and then when i tried to follow the next steps of the tutorial it failed immediately and i still can't fix it

commented

That's a good idea. Chat-based operators is something I've been wanting to look into for a while now.

commented

Maybe a "Chat Writer"?
Aspects:
set String: Send Message: Sends the message to the player who crafted this writer.
set String: Publish Message: Sends the message to everybody.
set String[]: Send Messages: Sends all the messages to the player who crafted this writer.
get Operator[String (message) -> Float] Message Cooldown: Gets the cooldown for the specified message.

Shift info:
Sends messages to chat, or to (if crafter is player)you(else)(crafter)(endif).
To prevent chat spam, identical messages can only happen every 5 seconds (100 ticks), and the message will also not occur if it was sent the previous tick.

commented

Could also be useful to be able to take a list of player entities and send a message to just those players. You could use this for team messages or, combined with entity readers, proximity warnings ("This region is protected by automated turrets. Go back!").

commented

Good ideas @PoolloverNathan.

PRs for this are welcome btw.

commented

@rubensworks I'm not a very good mod author (even the Forge example mod won't build), but I might attempt it.