Adriftus-Studios / network-script-data

Public, open-source repository of Adriftus Studios' Minecraft network. Powered by Denizen Script.
https://discord.gg/adriftus
19 stars 12 forks source link

Removal of local injection from scripts #339

Closed Eutherin closed 2 years ago

Eutherin commented 3 years ago

things like inject locally need to have a path: attribute in the future, we should go through and update scripts as we have time

image

Old style:

graves_data:
  type: world
  debug: false
  load:
    - if <server.has_file[data/graves.yml]>:
      - yaml id:graves load:data/graves.yml
    - else:
      - yaml id:graves create
      - yaml id:graves savefile:data/graves.yml
  save:
    - ~yaml id:graves savefile:data/graves.yml
  events:
    on server start:
      - inject locally load
    on delta time minutely:
      - inject locally save

future warning safe style:

 graves_data:
  type: world
  debug: false
  load:
    - if <server.has_file[data/graves.yml]>:
      - yaml id:graves load:data/graves.yml
    - else:
      - yaml id:graves create
      - yaml id:graves savefile:data/graves.yml
  save:
    - ~yaml id:graves savefile:data/graves.yml
  events:
    on server start:
      - inject graves_data path:load
    on delta time minutely:
      - inject graves_data path:save
Eutherin commented 3 years ago

@Grumblin @AJ4real

waiting on Monkey's response on how to shut this up in the mean time, i have fixed the graves error in discord though.

Eutherin commented 3 years ago

monkey changed it to an outright error but added back support apparently lol image