IntegratedDynamics icon indicating copy to clipboard operation
IntegratedDynamics copied to clipboard

Some way of sending a message to the player

Open StarkRG opened this issue 6 years ago • 6 comments

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.

StarkRG avatar Mar 10 '19 16:03 StarkRG

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

rubensworks avatar Mar 11 '19 07:03 rubensworks

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.

PoolloverNathan avatar May 20 '20 22:05 PoolloverNathan

Good ideas @PoolloverNathan.

PRs for this are welcome btw.

rubensworks avatar May 21 '20 07:05 rubensworks

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!").

StarkRG avatar May 21 '20 09:05 StarkRG

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

PoolloverNathan avatar May 28 '20 21:05 PoolloverNathan

@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

nerdman0 avatar Jan 18 '23 21:01 nerdman0