Skip to content

Commit

Permalink
redesign hologram_lines again to the new hologramtrait structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 22, 2022
1 parent 4635077 commit 37d50a7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
Expand Up @@ -1374,13 +1374,9 @@ public void adjust(Mechanism mechanism) {
// -->
if (mechanism.matches("hologram_lines") && mechanism.requireObject(ListTag.class)) {
HologramTrait hologram = getCitizen().getOrAddTrait(HologramTrait.class);
if (npc.isSpawned()) {
hologram.onDespawn();
}
hologram.getLines().clear();
hologram.getLines().addAll(mechanism.valueAsType(ListTag.class));
if (npc.isSpawned()) {
hologram.onSpawn();
hologram.clear();
for (String line : mechanism.valueAsType(ListTag.class)) {
hologram.addLine(line);
}
}

Expand Down
Expand Up @@ -2426,6 +2426,20 @@ public static ListTag getHandlerPluginList(Class eventClass) {

public static void adjustServer(Mechanism mechanism) {

// <--[mechanism]
// @object server
// @name clean_flags
// @input None
// @description
// Cleans any expired flags from the object.
// Generally doesn't need to be called, using the 'skip flag cleanings' setting was enabled.
// This is an internal/special case mechanism, and should be avoided where possible.
// Does not function on all flaggable objects, particularly those that just store their flags into other objects.
// -->
if (mechanism.matches("clean_flags")) {
DenizenCore.serverFlagMap.doTotalClean();
}

// <--[mechanism]
// @object server
// @name delete_file
Expand Down

0 comments on commit 37d50a7

Please sign in to comment.