@rpgjs/server 5.0.0-alpha.20 → 5.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -11,3 +11,5 @@ export * from './presets';
11
11
  export * from '@signe/reactive';
12
12
  export * from './Gui';
13
13
  export { RpgShape, RpgModule } from '@rpgjs/common';
14
+ export * from './decorators/event';
15
+ export * from './decorators/map';
package/dist/index.js CHANGED
@@ -28142,6 +28142,7 @@ let RpgMap = class extends RpgCommonMap {
28142
28142
  }
28143
28143
  if (typeof event === "function") {
28144
28144
  eventInstance = new event();
28145
+ if (event.prototype.name) eventInstance.name.set(event.prototype.name);
28145
28146
  } else {
28146
28147
  class DynamicEvent extends RpgEvent {
28147
28148
  constructor() {
@@ -28158,12 +28159,12 @@ let RpgMap = class extends RpgCommonMap {
28158
28159
  }
28159
28160
  }
28160
28161
  eventInstance = new DynamicEvent();
28162
+ if (event.name) eventInstance.name.set(event.name);
28161
28163
  }
28162
28164
  eventInstance.map = this;
28163
28165
  eventInstance.context = context$1;
28164
28166
  eventInstance.x.set(x);
28165
28167
  eventInstance.y.set(y);
28166
- if (event.name) eventInstance.name.set(event.name);
28167
28168
  this.events()[id] = eventInstance;
28168
28169
  await eventInstance.execMethod("onInit");
28169
28170
  }
@@ -28938,5 +28939,40 @@ function provideServerModules(modules) {
28938
28939
  });
28939
28940
  }
28940
28941
 
28941
- export { AGI, AGI_CURVE, ATK, ArraySubject$1 as ArraySubject, COEFFICIENT_ELEMENTS, Components, DAMAGE_CRITICAL, DAMAGE_GUARD, DAMAGE_PHYSIC, DAMAGE_SKILL, DEX, DEX_CURVE, DialogGui, DialogPosition, Frequency, Gui, INT, INT_CURVE, MAXHP, MAXHP_CURVE, MAXSP, MAXSP_CURVE, MenuGui, Move, NotificationGui, ObjectSubject$1 as ObjectSubject, PDEF, RpgEvent, RpgMap, RpgModule, RpgPlayer, RpgServerEngine, RpgShape, SDEF, STR, STR_CURVE, ShopGui, Speed, WithMoveManager, clearInject, computed$1 as computed, context, createServer, effect$1 as effect, inject, isArraySubject$1 as isArraySubject, isComputed$1 as isComputed, isObjectSubject$1 as isObjectSubject, isSignal$1 as isSignal, provideServerModules, setInject, signal$1 as signal, untracked$1 as untracked };
28942
+ var EventMode = /* @__PURE__ */ ((EventMode2) => {
28943
+ EventMode2["Shared"] = "shared";
28944
+ EventMode2["Scenario"] = "scenario";
28945
+ return EventMode2;
28946
+ })(EventMode || {});
28947
+ function EventData(options) {
28948
+ return (target) => {
28949
+ target.mode = options.mode || "shared" /* Shared */;
28950
+ target.width = options.width;
28951
+ target.height = options.height;
28952
+ target.hitbox = options.hitbox;
28953
+ target._name = options.name;
28954
+ target.prototype._name = options.name;
28955
+ target.prototype.mode = target.mode;
28956
+ };
28957
+ }
28958
+
28959
+ function MapData(options) {
28960
+ return (target) => {
28961
+ target.file = options.file;
28962
+ target.id = options.id;
28963
+ target.type = "map";
28964
+ target.prototype.name = options.name;
28965
+ target.prototype.file = options.file;
28966
+ target.prototype.id = options.id;
28967
+ target.prototype.sounds = options.sounds;
28968
+ target.prototype.lowMemory = options.lowMemory;
28969
+ target.prototype.$schema = {};
28970
+ if (options.syncSchema) {
28971
+ target.prototype.$schema = options.syncSchema;
28972
+ }
28973
+ target.prototype._events = options.events;
28974
+ };
28975
+ }
28976
+
28977
+ export { AGI, AGI_CURVE, ATK, ArraySubject$1 as ArraySubject, COEFFICIENT_ELEMENTS, Components, DAMAGE_CRITICAL, DAMAGE_GUARD, DAMAGE_PHYSIC, DAMAGE_SKILL, DEX, DEX_CURVE, DialogGui, DialogPosition, EventData, EventMode, Frequency, Gui, INT, INT_CURVE, MAXHP, MAXHP_CURVE, MAXSP, MAXSP_CURVE, MapData, MenuGui, Move, NotificationGui, ObjectSubject$1 as ObjectSubject, PDEF, RpgEvent, RpgMap, RpgModule, RpgPlayer, RpgServerEngine, RpgShape, SDEF, STR, STR_CURVE, ShopGui, Speed, WithMoveManager, clearInject, computed$1 as computed, context, createServer, effect$1 as effect, inject, isArraySubject$1 as isArraySubject, isComputed$1 as isComputed, isObjectSubject$1 as isObjectSubject, isSignal$1 as isSignal, provideServerModules, setInject, signal$1 as signal, untracked$1 as untracked };
28942
28978
  //# sourceMappingURL=index.js.map