Count Prefabs (Client)

If you liked this item, please rate it up on Steam Workshop page.

Author: Crimeraaa

Last revision: 15 Dec, 2022 at 10:46 UTC

File size: 10.24 KB

On Steam Workshop

Description:

Massive thanks to Crestwave for creating the original code that this mod is built on!
Without his work, this mod wouldn’t exist. Him and the DST Survivors Discord Server were also a huge help in refining this mod.

This mod adds this following slash command:
/count prefab mode

This mod counts prefabs on the ground, loaded by the client, and announces it to chat. Stacks of items are also considered in the count, and the actual number of stacks is specified separately if it exists. Items in your inventory, backpack and other containers are ignored.

Prefabs are not enclosed by quotation marks as the command already assumes they are strings. Also, they’re not case sensitive because the mod converts your input to all lowercase.

However make sure you have the correct prefab code. "grass" refers to a planted Grass plant, "cut_grass" refers to the inventory item of the same name, and "dug_grass" refers to the Grass plant item that’s been dug up.

Mode is an optional parameter you can input to change how the count is announced. If you don’t input anything for Mode, it defaults to 0 (Global Chat). You can change the default Mode in settings.

Modes
Mode#
Chat Type

0
Global Chat

1
Whisper Chat

2
Local Chat