Skip to content

Commit

Permalink
Фиксы сохранения карт
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed Dec 18, 2024
1 parent 87b6fa1 commit 71ede86
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 39 deletions.
4 changes: 2 additions & 2 deletions Content.Server/_Sunrise/InnateItem/InnateItemSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed class InnateItemSystem : EntitySystem
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<InnateItemComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<InnateItemComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<InnateItemComponent, InnateWorldTargetActionEvent>(WorldTargetActionActivate);
SubscribeLocalEvent<InnateItemComponent, InnateInstantActionEvent>(InstantActionActivate);
SubscribeLocalEvent<InnateItemComponent, ComponentShutdown>(OnShutdown);
Expand All @@ -29,7 +29,7 @@ private void OnShutdown(EntityUid uid, InnateItemComponent component, ComponentS
}
}

private void OnStartup(EntityUid uid, InnateItemComponent component, ComponentStartup args)
private void OnMapInit(EntityUid uid, InnateItemComponent component, MapInitEvent args)
{
AddItems(uid, component);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Shared.Weapons.Ranged;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
Expand All @@ -9,7 +10,7 @@ namespace Content.Shared._Sunrise.Weapons;
/// Allows for energy gun to switch between three modes. This also changes the sprite accordingly.
/// </summary>
/// <remarks>This is BatteryWeaponFireModesSystem with additional changes to allow for different sprites.</remarks>
[RegisterComponent]
[RegisterComponent, NetworkedComponent]
[Access(typeof(EnergyGunFireModesSystem))]
[AutoGenerateComponentState]
public sealed partial class EnergyGunFireModesComponent : Component
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/_Sunrise/Weapons/EnergyGunFireModesSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<EnergyGunFireModesComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<EnergyGunFireModesComponent, MapInitEvent>(OnMapInit);
SubscribeLocalEvent<EnergyGunFireModesComponent, ActivateInWorldEvent>(OnInteractHandEvent);
SubscribeLocalEvent<EnergyGunFireModesComponent, GetVerbsEvent<Verb>>(OnGetVerb);
SubscribeLocalEvent<EnergyGunFireModesComponent, ExaminedEvent>(OnExamined);
}

private void OnStartup(Entity<EnergyGunFireModesComponent> ent, ref ComponentStartup args)
private void OnMapInit(Entity<EnergyGunFireModesComponent> ent, ref MapInitEvent args)
{
if (ent.Comp.FireModes.Count <= 0)
return;
Expand Down
59 changes: 25 additions & 34 deletions Resources/Maps/_Sunrise/Station/delta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ tilemap:
127: FloorWoodTile
128: Lattice
129: Plating
132: PlatingBurnt
133: PlatingDamaged
132: PlatingDamaged
entities:
- proto: ""
entities:
Expand Down Expand Up @@ -125829,15 +125828,6 @@ entities:
- type: Transform
pos: -34.520683,47.5052
parent: 2
- proto: DungeonMasterCircuitBoard
entities:
- uid: 24243
components:
- type: Transform
parent: 24236
- type: Physics
canCollide: False
- type: InsideEntityStorage
- proto: Eggshells
entities:
- uid: 23883
Expand Down Expand Up @@ -133018,7 +133008,7 @@ entities:
- type: Transform
pos: 93.5,-16.5
parent: 2
- proto: FloraTree02
- proto: FloraTree
entities:
- uid: 18175
components:
Expand All @@ -133031,8 +133021,6 @@ entities:
rot: 3.141592653589793 rad
pos: 70.738884,-20.49512
parent: 2
- proto: FloraTree03
entities:
- uid: 18177
components:
- type: Transform
Expand All @@ -133044,8 +133032,6 @@ entities:
rot: 3.141592653589793 rad
pos: 69.794815,-17.294529
parent: 2
- proto: FloraTree04
entities:
- uid: 18179
components:
- type: Transform
Expand All @@ -133057,8 +133043,6 @@ entities:
rot: 3.141592653589793 rad
pos: 73.34982,-17.176535
parent: 2
- proto: FloraTree05
entities:
- uid: 18181
components:
- type: Transform
Expand All @@ -133070,8 +133054,6 @@ entities:
rot: 3.141592653589793 rad
pos: 69.88979,-23.562963
parent: 2
- proto: FloraTree06
entities:
- uid: 18183
components:
- type: Transform
Expand Down Expand Up @@ -133876,6 +133858,15 @@ entities:
- type: Transform
pos: 13.480562,-15.485751
parent: 2
- proto: GameMasterCircuitBoard
entities:
- uid: 24243
components:
- type: Transform
parent: 24236
- type: Physics
canCollide: False
- type: InsideEntityStorage
- proto: GasAnalyzer
entities:
- uid: 18292
Expand Down Expand Up @@ -175739,13 +175730,6 @@ entities:
- type: Transform
pos: 10.5,66.5
parent: 2
- proto: HeadBorgMedical
entities:
- uid: 26922
components:
- type: Transform
pos: -6.441073,-38.474636
parent: 2
- proto: HeatExchanger
entities:
- uid: 26923
Expand Down Expand Up @@ -177311,6 +177295,13 @@ entities:
parent: 2
- type: Physics
canCollide: False
- proto: LightHeadBorg
entities:
- uid: 26922
components:
- type: Transform
pos: -6.441073,-38.474636
parent: 2
- proto: LightPostSmall
entities:
- uid: 23762
Expand Down Expand Up @@ -248342,13 +248333,6 @@ entities:
- type: Transform
pos: -27.5,-50.5
parent: 2
- proto: WeaponRifleAKM
entities:
- uid: 39261
components:
- type: Transform
pos: 40.57007,17.532423
parent: 2
- proto: WeaponCapacitorRecharger
entities:
- uid: 23325
Expand Down Expand Up @@ -248819,6 +248803,13 @@ entities:
- type: Transform
pos: 36.47151,18.549223
parent: 2
- proto: WeaponRifleAKM
entities:
- uid: 39261
components:
- type: Transform
pos: 40.57007,17.532423
parent: 2
- proto: WeaponRifleBR64
entities:
- uid: 39273
Expand Down

0 comments on commit 71ede86

Please sign in to comment.