Skip to content

Commit

Permalink
Merge branch 'Lost-Paradise-Project:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkSide-droids authored Sep 16, 2024
2 parents d77a1a4 + b7af1fc commit 79dcf01
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 42 deletions.
8 changes: 4 additions & 4 deletions Content.Client/LateJoin/LateJoinGui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ private void RebuildUI()
_jobCategories.Clear();

#if LPP_Sponsors
var sys = IoCManager.Resolve<IEntitySystemManager>();
var checkSponsorSystem = sys.GetEntitySystem<CheckSponsorClientSystem>();
checkSponsorSystem.GoCheckSponsor();
var sponsorTier = checkSponsorSystem.GetSponsorStatus().Item2;
var sys = IoCManager.Resolve<SponsorsManager>();
var sponsorTier = 0;
if (sys.TryGetInfo(out var sponsorInfo))
sponsorTier = sponsorInfo.Tier ?? 0;
#endif

if (!_gameTicker.DisallowedLateJoin && _gameTicker.StationNames.Count == 0)
Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Preferences/UI/AntagPreferenceSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public AntagPreferenceSelector(AntagPrototype proto, JobPrototype highJob) : bas
var configMan = IoCManager.Resolve<IConfigurationManager>();

#if LPP_Sponsors
var sys = IoCManager.Resolve<IEntitySystemManager>();
var checkSponsorSystem = sys.GetEntitySystem<CheckSponsorClientSystem>();
checkSponsorSystem.GoCheckSponsor();
var sponsorTier = checkSponsorSystem.GetSponsorStatus().Item2;
var sys = IoCManager.Resolve<SponsorsManager>();
var sponsorTier = 0;
if (sys.TryGetInfo(out var sponsorInfo))
sponsorTier = sponsorInfo.Tier ?? 0;
#endif

if (proto.Requirements != null
Expand Down
32 changes: 16 additions & 16 deletions Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -755,10 +755,10 @@ private void UpdateRoleRequirements()
var firstCategory = true;

#if LPP_Sponsors
var sys = IoCManager.Resolve<IEntitySystemManager>();
var checkSponsorSystem = sys.GetEntitySystem<CheckSponsorClientSystem>();
checkSponsorSystem.GoCheckSponsor();
var sponsorTier = checkSponsorSystem.GetSponsorStatus().Item2;
var sys = IoCManager.Resolve<SponsorsManager>();
var sponsorTier = 0;
if (sys.TryGetInfo(out var sponsorInfo))
sponsorTier = sponsorInfo.Tier ?? 0;
#endif

var departments = _prototypeManager.EnumeratePrototypes<DepartmentPrototype>().ToArray();
Expand Down Expand Up @@ -875,10 +875,10 @@ out var reasons
private void EnsureJobRequirementsValid()
{
#if LPP_Sponsors
var sys = IoCManager.Resolve<IEntitySystemManager>();
var checkSponsorSystem = sys.GetEntitySystem<CheckSponsorClientSystem>();
checkSponsorSystem.GoCheckSponsor();
var sponsorTier = checkSponsorSystem.GetSponsorStatus().Item2;
var sys = IoCManager.Resolve<SponsorsManager>();
var sponsorTier = 0;
if (sys.TryGetInfo(out var sponsorInfo))
sponsorTier = sponsorInfo.Tier ?? 0;
#endif
foreach (var selector in _jobPriorities)
{
Expand Down Expand Up @@ -1545,10 +1545,10 @@ private void UpdateTraits(bool showUnusable)
var highJob = _controller.GetPreferredJob(Profile ?? HumanoidCharacterProfile.DefaultWithSpecies());

#if LPP_Sponsors
var sys = IoCManager.Resolve<IEntitySystemManager>();
var checkSponsorSystem = sys.GetEntitySystem<CheckSponsorClientSystem>();
checkSponsorSystem.GoCheckSponsor();
var sponsorTier = checkSponsorSystem.GetSponsorStatus().Item2;
var sys = IoCManager.Resolve<SponsorsManager>();
var sponsorTier = 0;
if (sys.TryGetInfo(out var sponsorInfo))
sponsorTier = sponsorInfo.Tier ?? 0;
#endif

_traits.Clear();
Expand Down Expand Up @@ -1861,10 +1861,10 @@ private void UpdateLoadouts(bool showUnusable)
_loadoutPointsBar.Value = points;

#if LPP_Sponsors
var sys = IoCManager.Resolve<IEntitySystemManager>();
var checkSponsorSystem = sys.GetEntitySystem<CheckSponsorClientSystem>();
checkSponsorSystem.GoCheckSponsor();
var sponsorTier = checkSponsorSystem.GetSponsorStatus().Item2;
var sys = IoCManager.Resolve<SponsorsManager>();
var sponsorTier = 0;
if (sys.TryGetInfo(out var sponsorInfo))
sponsorTier = sponsorInfo.Tier ?? 0;
#endif

// Get the highest priority job to use for loadout filtering
Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Preferences/UI/LoadoutPreferenceSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ public LoadoutPreferenceSelector(LoadoutPrototype loadout, JobPrototype highJob,
tooltip.Append($"{Loc.GetString(desc)}");

#if LPP_Sponsors
var sys = IoCManager.Resolve<IEntitySystemManager>();
var checkSponsorSystem = sys.GetEntitySystem<CheckSponsorClientSystem>();
checkSponsorSystem.GoCheckSponsor();
var sponsorTier = checkSponsorSystem.GetSponsorStatus().Item2;
var sys = IoCManager.Resolve<SponsorsManager>();
var sponsorTier = 0;
if (sys.TryGetInfo(out var sponsorInfo))
sponsorTier = sponsorInfo.Tier ?? 0;
#endif

// Get requirement reasons
Expand Down
9 changes: 4 additions & 5 deletions Content.Client/Preferences/UI/TraitPreferenceSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ public TraitPreferenceSelector(TraitPrototype trait, JobPrototype highJob, Human
tooltip.Append(desc);

#if LPP_Sponsors
//Logger.Error("SPONSOR: go check sponsor - Trait");
var sys = IoCManager.Resolve<IEntitySystemManager>();
var _checkSponsorSystem = sys.GetEntitySystem<CheckSponsorClientSystem>();
_checkSponsorSystem.GoCheckSponsor();
var sponsorTier = _checkSponsorSystem.GetSponsorStatus().Item2;
var sys = IoCManager.Resolve<SponsorsManager>();
var sponsorTier = 0;
if (sys.TryGetInfo(out var sponsorInfo))
sponsorTier = sponsorInfo.Tier ?? 0;
#endif

// Get requirement reasons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
}

#if LPP_Sponsors
//Logger.Error($"SPONSOR: CharacterDepartmentTimeRequirement. Tier: {sponsorTier}, whitelisted: {whitelisted}");
if (sponsorTier >= 5)
if (sponsorTier >= 5 && !whitelisted)
{
reason = null;
return true;
Expand Down Expand Up @@ -233,8 +232,7 @@ public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
}

#if LPP_Sponsors
//Logger.Error($"SPONSOR: CharacterOverallTimeRequirement. Tier: {sponsorTier}, whitelisted: {whitelisted}");
if (sponsorTier >=5)
if (sponsorTier >= 5 && !whitelisted)
{
reason = null;
return true;
Expand Down Expand Up @@ -308,8 +306,7 @@ public override bool IsValid(JobPrototype job, HumanoidCharacterProfile profile,
}

#if LPP_Sponsors
//Logger.Error($"SPONSOR: CharacterPlaytimeRequirement. Tier: {sponsorTier}, whitelisted: {whitelisted}");
if (sponsorTier >= 5)
if (sponsorTier >= 5 && !whitelisted)
{
reason = null;
return true;
Expand Down
11 changes: 11 additions & 0 deletions Resources/Changelog/ChangelogLPP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,14 @@ Entries:
id: 43
time: '2024-09-14T20:13:05.0000000+00:00'
url: https://github.com/Lost-Paradise-Project/Lost-Paradise/pull/146
- author: SpicyDarkFox
changes:
- type: Add
message: Добавлена возможность спонсорам 5 уровня заходить за любую роль кроме ВЛ
- type: Fix
message: Исправлена проблема с прическами унатхов
- type: Fix
message: Исправлены шемаги
id: 44
time: '2024-09-15T20:05:33.0000000+00:00'
url: https://github.com/Lost-Paradise-Project/Lost-Paradise/pull/148
4 changes: 2 additions & 2 deletions Resources/Locale/ru-RU/guidebook/food.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ guidebook-food-unknown-proto = Неизвестный прототип
guidebook-food-sources-header = Источники
guidebook-food-sources-ent-wrapper = { $name }
guidebook-food-reagents-header = Химический состав
guidebook-food-processing-butchering = Нарежте
guidebook-food-processing-slicing = Слайсуйте
guidebook-food-processing-butchering = Разделайте
guidebook-food-processing-slicing = Нарежьте
guidebook-food-processing-cooking = Разогрейте на { $time }сек
guidebook-food-processing-reaction = Смешайте
guidebook-food-processing-recipe = { $ingredients }
Expand Down
3 changes: 2 additions & 1 deletion Resources/Prototypes/Species/reptilian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
id: MobReptilianSprites
sprites:
Head: MobReptilianHead
Hair: MobHumanoidAnyMarking
Snout: MobHumanoidAnyMarking
Chest: MobReptilianTorso
HeadTop: MobHumanoidAnyMarking
Expand All @@ -42,7 +43,7 @@
onlyWhitelisted: true
points:
Hair:
points: 0
points: 1
required: false
FacialHair:
points: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
sprite: _LostParadise/Clothing/Neck/shemags/greendown.rsi
- type: ToggleableClothing
clothingPrototype: LPPClothingMaskShemagGreen
requiredSlot:
- neck
slot: mask
- type: ContainerContainer
containers:
Expand Down Expand Up @@ -41,6 +43,8 @@
sprite: _LostParadise/Clothing/Neck/shemags/reddown.rsi
- type: ToggleableClothing
clothingPrototype: LPPClothingMaskShemagRed
requiredSlot:
- neck
slot: mask
- type: ContainerContainer
containers:
Expand Down Expand Up @@ -72,6 +76,8 @@
sprite: _LostParadise/Clothing/Neck/shemags/bluedown.rsi
- type: ToggleableClothing
clothingPrototype: LPPClothingMaskShemagBlue
requiredSlot:
- neck
slot: mask
- type: ContainerContainer
containers:
Expand Down Expand Up @@ -103,6 +109,8 @@
sprite: _LostParadise/Clothing/Neck/shemags/browndown.rsi
- type: ToggleableClothing
clothingPrototype: LPPClothingMaskShemagBrown
requiredSlot:
- neck
slot: mask
- type: ContainerContainer
containers:
Expand Down Expand Up @@ -134,6 +142,8 @@
sprite: _LostParadise/Clothing/Neck/shemags/purpledown.rsi
- type: ToggleableClothing
clothingPrototype: LPPClothingMaskShemagPurple
requiredSlot:
- neck
slot: mask
- type: ContainerContainer
containers:
Expand Down Expand Up @@ -165,6 +175,8 @@
sprite: _LostParadise/Clothing/Neck/shemags/NPZdown.rsi
- type: ToggleableClothing
clothingPrototype: LPPClothingMaskShemagNPZ
requiredSlot:
- neck
slot: mask
- type: ContainerContainer
containers:
Expand Down

0 comments on commit 79dcf01

Please sign in to comment.