Skip to content

Commit

Permalink
1.1.22.1530
Browse files Browse the repository at this point in the history
  • Loading branch information
SphereII committed Oct 22, 2024
1 parent 9e0f489 commit 5a67110
Show file tree
Hide file tree
Showing 44 changed files with 736 additions and 61 deletions.
35 changes: 35 additions & 0 deletions Mods/0-SCore/0-SCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,41 @@
<HintPath>..\..\7DaysToDie_Data\Managed\LogLibrary.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.RemoteControl, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.RemoteControl.16.3.52\lib\net45\Microsoft.VisualStudio.RemoteControl.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Telemetry, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Telemetry.17.11.20\lib\net45\Microsoft.VisualStudio.Telemetry.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TextTemplating, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.TextTemplating.17.5.33428.366\lib\net472\Microsoft.VisualStudio.TextTemplating.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TextTemplating.Interfaces, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.TextTemplating.Interfaces.17.10.40152\lib\net472\Microsoft.VisualStudio.TextTemplating.Interfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TextTemplating.Interfaces.10.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.17.0.32112.339\lib\net472\Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TextTemplating.Interfaces.11.0, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.TextTemplating.Interfaces.11.0.17.0.32112.339\lib\net472\Microsoft.VisualStudio.TextTemplating.Interfaces.11.0.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.Utilities.Internal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.VisualStudio.Utilities.Internal.16.3.73\lib\net45\Microsoft.VisualStudio.Utilities.Internal.dll</HintPath>
</Reference>
<Reference Include="netstandard" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.9.0.0-rc.2.24473.5\lib\net462\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<!--
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.VisualStudio.RemoteControl, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Expand Down
8 changes: 8 additions & 0 deletions Mods/0-SCore/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ public class ChallengeObjectiveBlockDestroyed : BaseChallengeObjective {
public string biome;
public string poi;
public string poi_tags;
private string _descriptionOverride;

public override string DescriptionText => Localization.Get(LocalizationKey);
public override string DescriptionText {
get {
if (string.IsNullOrEmpty(_descriptionOverride))
Localization.Get(LocalizationKey);
return Localization.Get(_descriptionOverride);
}
}

public override void HandleAddHooks() {
QuestEventManager.Current.BlockDestroy += Check_Block;
Expand Down Expand Up @@ -120,6 +127,9 @@ public override void ParseElement(XElement e) {
{
poi_tags = e.GetAttribute("poi_tag");
}
if (e.HasAttribute("description_override"))
_descriptionOverride = e.GetAttribute("description_override");



}
Expand All @@ -131,7 +141,9 @@ public override BaseChallengeObjective Clone() {
biome = biome,
poi = poi,
poi_tags = poi_tags,
LocalizationKey =LocalizationKey
LocalizationKey =LocalizationKey,
_descriptionOverride = _descriptionOverride


};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ public class ChallengeObjectiveBlockUpgradeSCore : ChallengeObjectiveSCoreBase {
(ChallengeObjectiveType)ChallengeObjectiveTypeSCore.ChallengeObjectiveBlockUpgradeSCore;

public string LocalizationKey = "challengeObjectiveOnBlockUpgrade";
public override string DescriptionText => Localization.Get(LocalizationKey);
private string _descriptionOverride;

public override string DescriptionText {
get {
if (string.IsNullOrEmpty(_descriptionOverride))
Localization.Get(LocalizationKey);
return Localization.Get(_descriptionOverride);
}
}

public override void HandleAddHooks() {
QuestEventManager.Current.BlockUpgrade += this.Current_BlockUpgrade;
Expand All @@ -32,7 +40,13 @@ private void Current_BlockUpgrade(string block, Vector3i blockPos) {
Current++;
CheckObjectiveComplete();
}


public override void ParseElement(XElement e) {
base.ParseElement(e);
if (e.HasAttribute("description_override"))
_descriptionOverride = e.GetAttribute("description_override");
}

public override BaseChallengeObjective Clone() {
return new ChallengeObjectiveBlockUpgradeSCore {
biome = this.biome,
Expand All @@ -47,6 +61,7 @@ public override BaseChallengeObjective Clone() {
neededResourceID = this.neededResourceID,
neededResourceCount = this.neededResourceCount,

_descriptionOverride = _descriptionOverride
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ public class ChallengeObjectiveCVar : BaseChallengeObjective {
private string _cvarName;
public string LocalizationKey = "challengeObjectiveOnCVar";

public override string DescriptionText => Localization.Get($"{LocalizationKey}", false) + " " + _cvarName + ":";
private string _descriptionOverride;

public override string DescriptionText {
get {
if (string.IsNullOrEmpty(_descriptionOverride))
return Localization.Get($"{LocalizationKey}", false) + " " + _cvarName + ":";
return Localization.Get(_descriptionOverride);
}
}

public override void HandleAddHooks() {
EventOnCVarAdded.CVarAdded += CheckCVar;
Expand Down Expand Up @@ -48,6 +56,10 @@ public override void ParseElement(XElement e) {
public override BaseChallengeObjective Clone() {
return new ChallengeObjectiveCVar {
_cvarName = _cvarName
,
_descriptionOverride = _descriptionOverride


};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ public class ChallengeObjectiveCompleteQuestStealth : BaseChallengeObjective {
public override ChallengeObjectiveType ObjectiveType =>
(ChallengeObjectiveType)ChallengeObjectiveTypeSCore.ChallengeObjectiveCompleteQuestStealth;

public override string DescriptionText =>
Localization.Get("ChallengeObjectiveCompleteQuestStealth");

public string LocalizationKey = "ChallengeObjectiveCompleteQuestStealth";
private string _descriptionOverride;

public override string DescriptionText {
get {
if (string.IsNullOrEmpty(_descriptionOverride))
Localization.Get(LocalizationKey);
return Localization.Get(_descriptionOverride);
}
}
public override void Init() {
}

Expand Down Expand Up @@ -87,9 +94,15 @@ private bool Current_EntityDamaged(DamageResponse _dmresponse, EntityAlive entit
return true;
}

public override void ParseElement(XElement e) {
base.ParseElement(e);
if (e.HasAttribute("description_override"))
_descriptionOverride = e.GetAttribute("description_override");
}

public override BaseChallengeObjective Clone() {
return new ChallengeObjectiveCompleteQuestStealth {

_descriptionOverride = _descriptionOverride
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@ public override string DescriptionText {
get {
if (string.IsNullOrEmpty(_descriptionOverride))
{
return Localization.Get($"{LocalizationKey}") + ingredientString;
return Localization.Get($"{LocalizationKey}") + ingredientString;
}

return Localization.Get(_descriptionOverride);
}
}

public override void HandleAddHooks()
{

public override void HandleAddHooks() {
QuestEventManager.Current.CraftItem += Current_CraftItem;
}


public override void HandleRemoveHooks()
{

public override void HandleRemoveHooks() {
QuestEventManager.Current.CraftItem -= Current_CraftItem;
}

Expand All @@ -48,35 +46,31 @@ private void Current_CraftItem(ItemStack stack) {
foreach (var ingred in recipe.ingredients)
{
var itemName = ingred.itemValue.ItemClass.GetItemName();
if ( !string.Equals(itemName, ingredientString, StringComparison.InvariantCultureIgnoreCase)) continue;
if (!string.Equals(itemName, ingredientString, StringComparison.InvariantCultureIgnoreCase)) continue;
Current += ingred.count;
CheckObjectiveComplete();
}

}


public override void ParseElement(XElement e)
{
public override void ParseElement(XElement e) {
base.ParseElement(e);
if (e.HasAttribute("ingredient"))
{
ingredientString = e.GetAttribute("ingredient");
}

if (e.HasAttribute("description_key"))
LocalizationKey =e.GetAttribute("description_key");
LocalizationKey = e.GetAttribute("description_key");
if (e.HasAttribute("description_override"))
_descriptionOverride = e.GetAttribute("description_override");
}

public override BaseChallengeObjective Clone()
{
return new ChallengeObjectiveCraftWithIngredient
{
ingredientString = ingredientString

public override BaseChallengeObjective Clone() {
return new ChallengeObjectiveCraftWithIngredient {
ingredientString = ingredientString,
_descriptionOverride = _descriptionOverride
};
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ public override BaseChallengeObjective Clone()
{
item_tags = item_tags,
LocalizationKey = LocalizationKey
,
_descriptionOverride = _descriptionOverride


};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ public class ChallengeObjectiveDecapitation : ChallengeObjectiveKillWithItem {
(ChallengeObjectiveType)ChallengeObjectiveTypeSCore.ChallengeObjectiveDecapitation;

public string LocalizationKey = "challengeDecapZombies";
public override string DescriptionText => Localization.Get(LocalizationKey);
private string _descriptionOverride;

public override string DescriptionText {
get {
if (string.IsNullOrEmpty(_descriptionOverride))
Localization.Get(LocalizationKey);
return Localization.Get(_descriptionOverride);
}
}
protected override bool Check_EntityKill(DamageResponse dmgResponse, EntityAlive entityDamaged) {
if (!dmgResponse.Dismember) return false;
if (entityDamaged.emodel.avatarController is not AvatarZombieController controller) return false;
Expand All @@ -30,6 +37,8 @@ public override void ParseElement(XElement e) {
base.ParseElement(e);
if (e.HasAttribute("description_key"))
LocalizationKey = e.GetAttribute("description_key");
if (e.HasAttribute("description_override"))
_descriptionOverride = e.GetAttribute("description_override");
}

public override BaseChallengeObjective Clone() {
Expand All @@ -45,6 +54,8 @@ public override BaseChallengeObjective Clone() {
ItemTag = ItemTag,
StealthCheck = StealthCheck,
LocalizationKey = LocalizationKey
,
_descriptionOverride = _descriptionOverride
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ public class ChallengeObjectiveEnterPOI : BaseChallengeObjective {
public override ChallengeObjectiveType ObjectiveType =>
(ChallengeObjectiveType)ChallengeObjectiveTypeSCore.ChallengeObjectiveEnterPOI;

public override string DescriptionText =>
Localization.Get("challengeObjectiveEnter") + " " + Localization.Get(_prefabName);
private string _descriptionOverride;

public override string DescriptionText {
get {
if (string.IsNullOrEmpty(_descriptionOverride))
return Localization.Get("challengeObjectiveEnter") + " " + Localization.Get(_prefabName);
return Localization.Get(_descriptionOverride);
}
}
public override void Init() {
}

Expand Down Expand Up @@ -73,12 +79,17 @@ public override void ParseElement(XElement e) {
{
_poiTags = FastTags<TagGroup.Poi>.Parse(e.GetAttribute("tags"));
}
if (e.HasAttribute("description_override"))
_descriptionOverride = e.GetAttribute("description_override");
}

public override BaseChallengeObjective Clone() {
return new ChallengeObjectiveEnterPOI {
_prefabName = this._prefabName,
_poiTags = this._poiTags
,
_descriptionOverride = _descriptionOverride

};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,16 @@ public class ChallengeObjectiveGatherTags : BaseChallengeObjective {

public string itemTags;

public override string DescriptionText =>
Localization.Get("challengeObjectiveGatherTags", false) + " " + itemTags + ":";
private string _descriptionOverride;

public override string DescriptionText {
get {
if (string.IsNullOrEmpty(_descriptionOverride))
return Localization.Get("challengeObjectiveGatherTags", false) + " " + itemTags + ":";
return Localization.Get(_descriptionOverride);
}
}


public override void HandleAddHooks()
{
Expand Down Expand Up @@ -101,11 +109,14 @@ public override void ParseElement(XElement e) {
{
itemTags = e.GetAttribute("item_tags");
}
if (e.HasAttribute("description_override"))
_descriptionOverride = e.GetAttribute("description_override");
}

public override BaseChallengeObjective Clone() {
return new ChallengeObjectiveGatherTags() {
itemTags = itemTags
itemTags = itemTags,
_descriptionOverride = _descriptionOverride
};
}
}
Expand Down
Loading

0 comments on commit 5a67110

Please sign in to comment.