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

Allow custom broadcasts on aspects. #147

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CUSTOM.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ This section is meant for users who are familiar with both the tts mod and progr
- `broadcast`: **string** - text to display when selecting spirit
- Note: this needs to be set manually in json under **LuaScriptState** for spirit, anything set in **LuaScript** will be lost to spirit updater operation

### Aspect
- `broadcast`: **string** - text to display when selecting aspect
- Note: unlike the spirit broadcast, this can be set in the script

### Adversary & Scenario
- collision workaround
- workaround for TTS bug https://tabletopsimulator.nolt.io/770
Expand Down
6 changes: 6 additions & 0 deletions script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ function onObjectEnterScriptingZone(zone, obj)
for color,data in pairs(selectedColors) do
if data.zone == zone then
Player[color].broadcast("Using Aspect "..obj.getName(), Color.White)
if obj.getVar("broadcast") then
Player[color].broadcast(obj.getVar("broadcast"), Color.SoftBlue)
end
break
end
end
Expand Down Expand Up @@ -3761,6 +3764,9 @@ function runSpiritSetup()

if obj.hasTag("Aspect") then
Player[color].broadcast("Using Aspect "..obj.getName(), Color.White)
if obj.getVar("broadcast") then
Player[color].broadcast(obj.getVar("broadcast"), Color.SoftBlue)
end
end
end
end
Expand Down
Loading