Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
Rxup committed Aug 29, 2024
1 parent 823e258 commit 8378ebd
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions Content.Server/Backmen/Fugitive/FugitiveSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public override void Initialize()
SubscribeLocalEvent<FugitiveComponent, GhostRoleSpawnerUsedEvent>(OnSpawned);
SubscribeLocalEvent<FugitiveComponent, MindAddedMessage>(OnMindAdded);
SubscribeLocalEvent<RoundEndTextAppendEvent>(OnRoundEnd);
SubscribeLocalEvent<PlayerSpawningEvent>(HandlePlayerSpawning, before: new []{ typeof(SpawnPointSystem) });
}

[ValidatePrototypeId<JobPrototype>]
Expand Down
19 changes: 11 additions & 8 deletions Content.Server/Backmen/Soul/GolemSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ public override void Initialize()

private void OnGetLaws(EntityUid uid, GolemComponent component, ref GetSiliconLawsEvent args)
{
if (args.Handled || component.Master == null)
if (args.Handled)
return;

// Add the first emag law
args.Laws.Laws.Add(new SiliconLaw
{
LawString = Loc.GetString("law-golem-1", ("name", component.Master)),
LawString = Loc.GetString("law-golem-1", ("name", component.Master ?? "----")),
Order = 1
});

Expand All @@ -91,7 +91,7 @@ private void OnAfterInteract(EntityUid uid, SoulCrystalComponent component, Afte
if (!TryComp<GolemComponent>(args.Target, out var golem))
return;

if (HasComp<ActorComponent>(args.Target))
if (!(HasComp<ActorComponent>(args.Target) || Prototype(args.User)?.ID == AdminObserver))
return;

if (!TryComp<ActorComponent>(args.User, out var userActor))
Expand Down Expand Up @@ -142,6 +142,9 @@ private void OnDispelled(EntityUid uid, GolemComponent component, DispelledEvent
DirtyEntity(uid);
}

[ValidatePrototypeId<EntityPrototype>]
private const string Ash = "Ash";

private void OnMobStateChanged(EntityUid uid, GolemComponent component, MobStateChangedEvent args)
{
if (args.NewMobState != MobState.Dead)
Expand All @@ -151,7 +154,7 @@ private void OnMobStateChanged(EntityUid uid, GolemComponent component, MobState
var ev = new DispelledEvent();
RaiseLocalEvent(uid, ev, false);

Spawn("Ash", Transform(uid).Coordinates);
Spawn(Ash, Transform(uid).Coordinates);
_audioSystem.PlayPvs(component.DeathSound, uid);
}

Expand All @@ -163,10 +166,10 @@ private void OnInstallRequest(EntityUid uid, GolemComponent component, GolemInst
if (!TryComp<ItemSlotsComponent>(uid, out var slots))
return;

if (!TryComp<ActorComponent>(component.PotentialCrystal, out var actor))
return;
//if (!TryComp<ActorComponent>(component.PotentialCrystal, out var actor))
// return;

if (!_mindSystem.TryGetMind(component.PotentialCrystal.Value, out var mindId, out var mind))
if (!_mindSystem.TryGetMind(component.PotentialCrystal.Value, out var mindId, out var mind) || mind.Session == null)
return;

if (!_slotsSystem.TryGetSlot(uid, CrystalSlot, out var crystalSlot, slots)) // does it not have a crystal slot?
Expand Down Expand Up @@ -217,7 +220,7 @@ private void OnInstallRequest(EntityUid uid, GolemComponent component, GolemInst
//component.Master = null;
component.GolemName = null;
DirtyEntity(uid);
Dirty(uid, component);
//Dirty(uid, component);
}

private void OnNameChanged(EntityUid uid, GolemComponent golemComponent, GolemNameChangedMessage args)
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Maps/bagel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@
Deliveryman: [ 0, 1 ]
Prisoner: [ 2, 3]
#silicon
StationAi: [ 1, 0 ]
StationAi: [ 1, 1 ]
Borg: [ 4, 4 ]
3 changes: 3 additions & 0 deletions Resources/Prototypes/_Backmen/Entities/Mobs/Species/golem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
description: Искусственная конструкция, имитирующая жизнь. У этого еще не установлен кристалл души.
components:
- type: ComplexInteraction
- type: ActionGrant
actions:
- ActionViewLaws
- type: Sprite
noRot: true
drawdepth: Mobs
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/_Backmen/Maps/hive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
SalvageSpecialist: [ 2, 3 ]
Deliveryman: [ 2, 2 ]
#silicon
StationAi: [ 1, 0 ]
StationAi: [ 1, 1 ]
#BKBPLATech: [0, 3]
#BKBPLAMED: [0, 3]
Borg: [ 3, 3 ]
2 changes: 1 addition & 1 deletion Resources/Prototypes/_Backmen/Maps/rook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
SalvageSpecialist: [ 2, 2 ]
CargoTechnician: [ 2, 3 ]
#silicon
StationAi: [ 1, 0 ]
StationAi: [ 1, 1 ]
#BKBPLATech: [0, 2]
#BKBPLAMED: [0, 2]
Borg: [ 1, 2 ]
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/_Backmen/Maps/shoukou.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
SalvageSpecialist: [ 2, 4 ]
CargoTechnician: [ 2, 3 ]
#silicon
StationAi: [ 1, 0 ]
StationAi: [ 1, 1 ]
#BKBPLATech: [0, 2]
#BKBPLAMED: [0, 2]
Borg: [ 3, 3 ]
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/_Backmen/Maps/tortuga.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
SalvageSpecialist: [ 3, 4 ]
Deliveryman: [ 2, 2 ]
#silicon
StationAi: [ 1, 0 ]
StationAi: [ 1, 1 ]
#BKBPLATech: [0, 3]
#BKBPLAMED: [0, 3]
Borg: [ 3, 3 ]

0 comments on commit 8378ebd

Please sign in to comment.