Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EE Merge + Station AI #148

Merged
merged 73 commits into from
Jan 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
d8ae58e
Station AI (#30944)
metalgearsloth Aug 28, 2024
c866ffb
Verb tweaks (#31309)
metalgearsloth Aug 25, 2024
d6b0b99
ItemToggle + slots stuff (#31312)
metalgearsloth Aug 25, 2024
56451fa
Station AI (#30944)
ElectroJr Jun 18, 2024
bdafdeb
Move SleepingSystem to Shared & cleanup (#28672)
Tayrtahn Jun 14, 2024
ede16f0
Potentially re-add EE changes?
sleepyyapril Jan 4, 2025
661bdba
Fix build errors
sleepyyapril Jan 4, 2025
006acf3
Add ContainerComp (#31311)
metalgearsloth Aug 25, 2024
b7e34aa
Localize ai dataset names (#33608)
MilenVolf Dec 6, 2024
b8e2844
Add LocalizedDatasetPrototype (#28310)
Tayrtahn May 28, 2024
c9e0e5d
SetStationAiName for testing
sleepyyapril Jan 4, 2025
0334cc6
Use EntityManager.System<>
sleepyyapril Jan 4, 2025
00adaa3
Re-add improved random sentience event (#29123)
Psychpsyo Aug 18, 2024
b262e8f
no name!
Psychpsyo Sep 8, 2024
385b667
fix shitcode
sleepyyapril Jan 4, 2025
f5e6583
HideSpawnMenu
sleepyyapril Jan 4, 2025
1b7d820
Merge branch 'master' into station-ai
sleepyyapril Jan 4, 2025
1ad367b
Yippee
sleepyyapril Jan 4, 2025
1f416da
Merge branch 'station-ai' of https://github.com/sleepyyapril/Einstein…
sleepyyapril Jan 4, 2025
ca0b40a
The Den Mass Cherry-Pick 01/06/25 (#1443)
angelofallars Jan 5, 2025
975c905
Automatic Changelog Update (#1443)
SimpleStation14 Jan 5, 2025
632cf60
Merge branch 'master' into station-ai
VMSolidus Jan 5, 2025
8b5eec7
Fix Face Markings Rendering Above Clothing (#1467)
angelofallars Jan 8, 2025
998e0ea
Automatic Changelog Update (#1467)
SimpleStation14 Jan 8, 2025
b39e126
Prisoner Headset Box in Warden's Locker (#1470)
Lumminal Jan 9, 2025
4907639
Automatic Changelog Update (#1470)
SimpleStation14 Jan 9, 2025
86296da
Adds Missing Lathe Recipes (#1472)
BlueHNT Jan 10, 2025
b89412a
Some Surgery Fixs (#1471)
Spatison Jan 10, 2025
77a7295
Automatic Changelog Update (#1472)
SimpleStation14 Jan 10, 2025
ba616f0
Automatic Changelog Update (#1471)
SimpleStation14 Jan 10, 2025
0f48142
Night And Thermal Vision (#1462)
Spatison Jan 10, 2025
83fa923
Automatic Changelog Update (#1462)
SimpleStation14 Jan 10, 2025
9c65527
Merge branch 'master' into station-ai
VMSolidus Jan 10, 2025
b38b7f9
CyberEyes Night Vision And Thermal Vision Modules (#1477)
VMSolidus Jan 10, 2025
7f32e00
Automatic Changelog Update (#1477)
SimpleStation14 Jan 10, 2025
df8ffb0
Assay Psionic Power (#1450)
VMSolidus Jan 11, 2025
f0a9bbd
Automatic Changelog Update (#1450)
SimpleStation14 Jan 11, 2025
6941a01
Update dev_map.yml
VMSolidus Jan 11, 2025
5a13b27
How the fuck did AI not have these?
VMSolidus Jan 11, 2025
0b0e9a8
I managed to get both AI Latejoin and Prisoner Latejoin working at th…
metalgearsloth Aug 29, 2024
5242ceb
Make AI Not Spawn With Clothes
VMSolidus Jan 11, 2025
6903924
Station AI (#1423)
VMSolidus Jan 11, 2025
14f738d
Automatic Changelog Update (#1423)
SimpleStation14 Jan 11, 2025
f92e2b3
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
sleepyyapril Jan 11, 2025
1d1f9ac
y
sleepyyapril Jan 11, 2025
26eade2
1
sleepyyapril Jan 11, 2025
fcc908f
AI can now speak once more. (#33196)
ScarKy0 Nov 7, 2024
736f70b
Allow AI and observers to see electrified doors (#33466)
metalgearsloth Nov 23, 2024
d662644
Hiding and clearing department prototype code (#28114)
Peptide90 Jan 11, 2025
a8b6657
fix sentienceRule
sleepyyapril Jan 11, 2025
a89b6cb
Meta with AI
Mike32oz Jan 11, 2025
1a6bd6f
Fixup playerspawn stuff (#31546)
Fildrance Sep 27, 2024
a906ed7
feat: now when research is unlocked in console, approver of reasearch…
Fildrance Sep 3, 2024
c4d14da
Update SharedStationAiSystem.Held.cs
VMSolidus Jan 11, 2025
d7317a7
Update SharedStationAiSystem.Held.cs
VMSolidus Jan 11, 2025
f293d7e
add access reader log wire (#29094)
deltanedas Jun 22, 2024
1709427
Update AccessReaderSystem.cs
VMSolidus Jan 11, 2025
0f7a662
wheeee
VMSolidus Jan 11, 2025
e2526ec
Meta with AI (#1484)
VMSolidus Jan 11, 2025
12bf563
Automatic Changelog Update (#1484)
SimpleStation14 Jan 11, 2025
0ce4d63
Update silicon.yml
VMSolidus Jan 11, 2025
fa35a3a
Hiding and Clearing Department Prototype Code (#28114) (#1483)
VMSolidus Jan 11, 2025
81bab8a
Fix Ai Accessible Consoles (#1485)
VMSolidus Jan 11, 2025
19f894d
Add Station AI To Gax (#1486)
VMSolidus Jan 11, 2025
afa2085
Automatic Changelog Update (#1486)
SimpleStation14 Jan 11, 2025
7485e8d
Senior Physician CPR (#1476)
VMSolidus Jan 11, 2025
2f6f7be
Fix AbsorbentTest & Shadowkin Test Fail (#1458)
sleepyyapril Jan 11, 2025
02dfa2e
Radstation AI (#1487)
VMSolidus Jan 11, 2025
3ebe76e
Automatic Changelog Update (#1487)
SimpleStation14 Jan 11, 2025
e389dff
Porting over My Cruise Control Code From Frontier (#1482)
neuPanda Jan 11, 2025
07401aa
Automatic Changelog Update (#1482)
SimpleStation14 Jan 11, 2025
419257f
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
sleepyyapril Jan 11, 2025
0c6d64f
Oops
sleepyyapril Jan 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix sentienceRule
sleepyyapril committed Jan 11, 2025
commit a8b66575ef2d3b38639dd94fa95d6b1df1c5c1b5
39 changes: 10 additions & 29 deletions Content.Server/StationEvents/Events/RandomSentienceRule.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Content.Server.Announcements.Systems;
using System.Linq;
using Content.Shared.Dataset;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Station.Components;
using Content.Server.StationEvents.Components;
using Content.Shared.GameTicking.Components;
using Content.Shared.Random.Helpers;
@@ -13,27 +11,25 @@ namespace Content.Server.StationEvents.Events;

public sealed class RandomSentienceRule : StationEventSystem<RandomSentienceRuleComponent>
{
[Dependency] private readonly AnnouncerSystem _announcer = default!;

[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IRobustRandom _random = default!;
protected override void Started(EntityUid uid, RandomSentienceRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
if (!TryGetRandomStation(out var randomStation))
if (!TryGetRandomStation(out var station))
return;

var targetList = new List<Entity<SentienceTargetComponent>>();
var query = EntityQueryEnumerator<SentienceTargetComponent, TransformComponent>();
while (query.MoveNext(out var targetUid, out var target, out var xform))
{
if (StationSystem.GetOwningStation(targetUid, xform) != randomStation)
if (StationSystem.GetOwningStation(targetUid, xform) != station)
continue;

targetList.Add((targetUid, target));
}

var toMakeSentient = _random.Next(component.MinSentiences, component.MaxSentiences);
var stationsToNotify = new List<EntityUid>();

var groups = new HashSet<string>();

for (var i = 0; i < toMakeSentient && targetList.Count > 0; i++)
@@ -72,27 +68,12 @@ protected override void Started(EntityUid uid, RandomSentienceRuleComponent comp
var kind2 = groupList.Count > 1 ? groupList[1] : "???";
var kind3 = groupList.Count > 2 ? groupList[2] : "???";

foreach (var target in targetList)
{
var targetStation = StationSystem.GetOwningStation(target);
if(targetStation == null)
continue;
stationsToNotify.Add((EntityUid) targetStation);
}
foreach (var station in stationsToNotify)
{
_announcer.SendAnnouncement(
_announcer.GetAnnouncementId(args.RuleId),
StationSystem.GetInStation(EntityManager.GetComponent<StationDataComponent>(station)),
"station-event-random-sentience-announcement",
null,
Color.Gold,
null,
null,
ChatSystem.DispatchStationAnnouncement(
station.Value,
_announcer.GetAnnouncementId(args.RuleId),
("kind1", kind1), ("kind2", kind2), ("kind3", kind3), ("amount", groupList.Count),
("data", _random.Pick(_prototype.Index<LocalizedDatasetPrototype>("RandomSentienceEventData"))),
("strength", _random.Pick(_prototype.Index<LocalizedDatasetPrototype>("RandomSentienceEventStrength")))
);
}
("data", _random.Pick(_prototype.Index<LocalizedDatasetPrototype>("RandomSentienceEventData"))),
("strength", _random.Pick(_prototype.Index<LocalizedDatasetPrototype>("RandomSentienceEventStrength")))
);
}
}
}

Unchanged files with check annotations Beta

/// <summary>
/// Sets electrified value of component and marks dirty if required.
/// </summary>
public void SetElectrified(Entity<ElectrifiedComponent> ent, bool value)

Check failure on line 31 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / YAML Linter

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 31 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / YAML Linter

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 31 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 31 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 31 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 31 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 31 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / Test Packaging

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 31 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / Test Packaging

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)
{
if (ent.Comp.Enabled == value)
{
_appearance.SetData(ent.Owner, ElectrifiedVisuals.IsElectrified, value);
}
public void SetElectrifiedWireCut(Entity<ElectrifiedComponent> ent, bool value)

Check failure on line 44 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / YAML Linter

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 44 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / YAML Linter

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 44 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 44 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 44 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 44 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / build (ubuntu-latest)

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 44 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / Test Packaging

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 44 in Content.Shared/Electrocution/SharedElectrocutionSystem.cs

GitHub Actions / Test Packaging

The type or namespace name 'ElectrifiedComponent' could not be found (are you missing a using directive or an assembly reference?)
{
if (ent.Comp.IsWireCut == value)
{