Changes

Jump to navigation Jump to search
→‎Make Data/TriggerActions repeat: tweak example for readability
Line 290: Line 290:  
Each entry in <samp>Data/TriggerActions</samp> is only applied once per player, but you can use the <samp>MarkActionApplied</samp> action to forget that it was applied. (Note that an action can't forget itself though.)
 
Each entry in <samp>Data/TriggerActions</samp> is only applied once per player, but you can use the <samp>MarkActionApplied</samp> action to forget that it was applied. (Note that an action can't forget itself though.)
   −
For example, this patch will set alternating 'week' or 'weekend' mail flags depending on the day of week:
+
For example, this patch will set alternating 'work' or 'weekend' mail flags depending on the day of week:
 
{{#tag:syntaxhighlight|<nowiki>
 
{{#tag:syntaxhighlight|<nowiki>
 
{
 
{
Line 299: Line 299:  
             "Target": "Data/TriggerActions",
 
             "Target": "Data/TriggerActions",
 
             "Entries": {
 
             "Entries": {
                 // set 'week' flag on weekdays, and reset weekend action
+
                 // set 'work' flag on weekdays, and reset weekend action
                 "{{ModId}}_Week": {
+
                 "{{ModId}}_Work": {
                     "Id": "{{ModId}}_Week",
+
                     "Id": "{{ModId}}_Work",
 
                     "Trigger": "DayStarted",
 
                     "Trigger": "DayStarted",
 
                     "Condition": "!DAY_OF_WEEK Saturday Sunday",
 
                     "Condition": "!DAY_OF_WEEK Saturday Sunday",
 
                     "Actions": [
 
                     "Actions": [
                         "AddMail Current {{ModId}}_Week Received",
+
                         "AddMail Current {{ModId}}_Work Received",
 
                         "RemoveMail Current {{ModId}}_Weekend",
 
                         "RemoveMail Current {{ModId}}_Weekend",
 
                         "MarkActionApplied Current {{ModId}}_Weekend false"
 
                         "MarkActionApplied Current {{ModId}}_Weekend false"
Line 311: Line 311:  
                 },
 
                 },
   −
                 // set 'weekend' flag on weekends, and reset week action
+
                 // set 'weekend' flag on weekends, and reset work action
 
                 "{{ModId}}_Weekend": {
 
                 "{{ModId}}_Weekend": {
 
                     "Id": "{{ModId}}_Weekend",
 
                     "Id": "{{ModId}}_Weekend",
Line 318: Line 318:  
                     "Actions": [
 
                     "Actions": [
 
                         "AddMail Current {{ModId}}_Weekend Received",
 
                         "AddMail Current {{ModId}}_Weekend Received",
                         "RemoveMail Current {{ModId}}_Week",
+
                         "RemoveMail Current {{ModId}}_Work",
                         "MarkActionApplied Current {{ModId}}_Week false"
+
                         "MarkActionApplied Current {{ModId}}_Work false"
 
                     ]
 
                     ]
 
                 },
 
                 },
translators
8,447

edits

Navigation menu