Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter out specific tags from global chat #593

Open
wolfcomp opened this issue Feb 13, 2024 · 0 comments
Open

Filter out specific tags from global chat #593

wolfcomp opened this issue Feb 13, 2024 · 0 comments

Comments

@wolfcomp
Copy link

Here is a regex for filtering out the specific tags from each chat that is server specific

(\[gps=\S*\])|(\[special-item=\S*\])|(\[train=\S*\])|(\[train-stop=\S*\])

Regex flags used gm

Tested on regex101 with the text

[img=class/name]
[img=class.name]
[img=sprite-prototype-name]

[img=item.iron-plate]
[img=quantity-time]
[img=utility/played_green]

Iron plate.png
Time icon.png
Played green.png

Embeds only a small inline game graphic. The period format must be used in game save names. This tag uses sprite paths:
class is any of: item, entity, technology, recipe, item-group, fluid, tile, virtual-signal, achievement, equipment or utility.

name: see below

sprite-prototype-name is the internal-name of a sprite prototype.

[item=name]	[item=iron-plate]	Iron plate.png [Item: Iron plate]	name is the internal-name of the item
[entity=name]	[entity=small-biter]	Small biter.png [Entity: Small biter]	name is the internal-name of the entity
[technology=name]	[technology=logistics]	Logistics (research).png [Technology: Logistics]	name is the internal-name of the technology
[recipe=name]	[recipe=basic-oil-processing]	Basic oil processing.png [Recipe: Basic oil processing]	name is the internal-name of the recipe, usually the item name
[item-group=name]	[item-group=combat]	Item-group military.png [Item Group: Combat]	name is any of: logistics, production, intermediate-products, combat, fluids or signals
[fluid=name]	[fluid=water]	Water.png [Fluid: Water]	name is the internal name of the fluid
[tile=name]	[tile=grass-3]	Grass 3.png [Tile: Grass 3]	name is the internal name of the tile, usually the lowercase name with hyphens replacing spaces as written from the map editor
[virtual-signal=name]	[virtual-signal=signal-A]	Signal-A.png [Virtual Signal: Signal A]	name is the word signal followed by either an uppercase letter, number, color, each, everything or anything
[achievement=name]	[achievement=minions]	Minions-achievement.png [Achievement: Minions]	name is the internal-name of the achievement, usually the lowercase name with hyphens replacing spaces
[gps=x,y]
[gps=x,y,surface]

[gps=0,0]	Map.png [Location: 0,0]	Embeds a map location and marks the location on the map of other players.
x is the x point coordinate
y is the y point coordinate
surface is the current surface. Is only added if the player Ctrl+alt clicks on a surface that is not the default surface. When the player is on another surface than surface, clicking the tag does nothing. Mods must handle this case with on_player_clicked_gps_tag

[special-item=blueprint_string]		Blueprint.png [Blueprint]	Embeds a blueprint. Players can get a blueprint item by clicking the icon.
blueprint_string is the blueprint string of a blueprint, deconstruction planner or upgrade planners

[armor=player]	[armor=Player]	Power armor MK2.png [Armor: Player]	Embeds the armor of a player. Allows other players to see the equipment installed.
player is the name of the player

[train=number]	[train=93]	Locomotive.png [Train: 2]	Embeds a reference to a train. Clicking the icon will open the train GUI for that train.
number is the internal unit number of the train

[train-stop=number]	[train-stop=100]	Train stop.png [Train Stop: Trangar]	Embeds a reference to a train stop. Clicking the icon will open the GUI for that train stop.
number is the internal unit number of the train stop

[tooltip=text,tooltip locale key]	[tooltip=Hover to see "Iron plate",item-name.iron-plate]	Custom-tag-icon.png Hover to see "Iron plate"	Shows the given text with a tooltip that is specified with a locale key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant