Skip to content

v1.0.0-beta.8

Pre-release
Pre-release
Compare
Choose a tag to compare
@Taureon Taureon released this 23 Sep 15:39
· 1585 commits to main since this release

Additions

  • Added color support for drawText().

    • You can add color tags to text that gets rendered.
    • A color tag consists of a section sign (§) at each end, with a "color value" in the middle.
    • You can have a color tag with nothing in it (§§) and it will render the section sign normally.
    • A color tag does not get rendered and makes text after it have a specific color.
    • A valid color value can either be a "color code", exactly like the ones you see in definitions COLOR: 3.
    • It can also be a CSS Color Value.
    • And if you want it to reset to the "default color", then you can set it to reset.
    • Example which makes "World" the animated trans color: Hello §37§World§reset§!
    • Example which makes "Gradient" in the gradient colors from red to yellow: §#ff0000§G§#ff2000§r§#ff4000§a§#ff6000§d§#ff8000§i§#ff9f00§e§#ffbf00§n§#ffdf00§t
    • NOTE: As a side effect of this feature, rendered text may be moved by SOME PIXELS in slightly different spots, but it should hardly be noticable.
    • Gradient support could be added as soon as it is figured out how to represent them in text.
  • Added a simple status effect system.

    • Added StatusEffect as a globally accessible class.
    • Arguments: duration (number, required), effects (object, optional), tick (function, optional)
    • duration: effect duration where 30 equals 1 second.
    • multipliers: key-number object with the following (optional) attributes: acceleration, topSpeed, health, shield, regen, damage, penetration, range, fov, density, stealth, pushability, size.
    • tick: function with the entity the effect is on as the argument.
    • StatusEffects should be set with Entity.addStatusEffect(StatusEffect).
    • If an entity gets a new status effect, the newStatusEffect event is emitted with the StatusEffect in the callback as the argument.
    • If a status effect expires, the expiredStatusEffect event is emitted with the StatusEffect in the callback as the argument.
    • multipliers multiplies the body attributes by their number. (example: { fov: 2 } doubles your fov)
    • tick runs once a game tick if the entity is activated.
    • Multiple StatusEffects can stack seamlessly.
    • For an example of an addon that uses StatusEffects, check out the Effect Roller Addon.
  • Added ON_FIRE gun attribute, which runs the given function when the gun fires.

    • Function argument: An object with these attributes: body, gun, masterStore, gunStore
    • body is the entity that the gun belongs to. (If the gun is on a turret, it picks the turret's master instead)
    • gun is the gun itself.
    • masterStore is a storage object that persists between ON_FIRE function calls.
    • gunStore is a storage object like masterStore, but it belongs to the gun instead of the master.
    • For an example implementation, check out "Switcheroo" in the Fun menu.
  • Added LEVEL_CAP entity attribute, which overwrites c.LEVEL_CAP specifically for that entity.

  • Added REPL_WINDOW to config.js.

    • false by default, if set to true, allows you to type js code in your terminal window and execute it.

Fixes

  • Guns now have an unique id, like Entitys.

  • Fixed an object reference bug related to Gun.settings.

  • Fixed io_wanderAroundMap's lookAtGoal setting to actually look at the goal instead of staring at the bottom right.

  • Fixed switching to Developer class resetting your score/level.

    • RESET_UPGRADES now only resets your stat upgrades, returning your points.
    • RESET_UPGRADES happens when you press the dev key.
    • RESET_UPGRADES is not on "Developer" anymore.
  • Fixed the issue with io_nearestDifferentMaster and dominators.