Skip to content

Commit

Permalink
1.0.88.1027
Browse files Browse the repository at this point in the history
  • Loading branch information
SphereII committed Sep 21, 2024
1 parent 79fc10e commit 7891512
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 32 deletions.
3 changes: 2 additions & 1 deletion Mods/0-SCore/Config/Localization.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,5 @@ hireNPCsMaleWithItem,"Hire a male NPC with some brass in your hand"
hireNPCsMaleWithmaterial,"Hire a male NPC with a wood material in your hand."
onHarvest,"Harvest"
NPC_title,"Hire NPCs"
SCore03challenges_key,"Harvests"
SCore03challenges_key,"Harvests"
challengeKillZombiesWithItemDesc,"Kill Zombies"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Challenges {
<objective type="Harvest, SCore" count="20" item="resourceWood" />
<objective type="Harvest, SCore" count="20" item="resourceWood" biome="burnt_forest" />
<objective type="Harvest, SCore" count="20" item="resourceWood" item="meleeItem" />
<objective type="Harvest, SCore" count="20" item="resourceWood" item_tags="meleetag" />
<objective type="Harvest, SCore" count="20" item_tags="woodtag" />
<objective type="Harvest, SCore" count="20" block_tags="blocktag" />
*/
public class ChallengeObjectiveHarvest : ChallengeObjectiveSCoreBase {
Expand Down Expand Up @@ -49,6 +49,12 @@ private void Current_HarvestItem(ItemValue held, ItemStack stack, BlockValue bv)
if (!result) return;
}

if (!string.IsNullOrEmpty(itemTag))
{
var tag = FastTags<TagGroup.Global>.Parse(itemTag);
if (!stack.itemValue.ItemClass.HasAnyTags(tag)) return;
}

if (!CheckBiome()) return;
if (!CheckBlocks(bv)) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class ChallengeObjectiveKillWithItem : ChallengeObjectiveKillByTag {
public string ItemTag;
public bool StealthCheck = false;
public string LocalizationKey = "";
public bool GenerateDescription;

public override void Init() {
if ( string.IsNullOrEmpty(entityTag))
Expand All @@ -51,11 +52,7 @@ public override void Init() {

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

var objectiveDesc = Localization.Get(LocalizationKey);
objectiveDesc = objectiveDesc.Replace("[]", MaxCount.ToString());
var objectiveDesc = Localization.Get("challengeKillZombiesWithItemDesc");
var with = Localization.Get("challengeObjectiveWith");

if (!string.IsNullOrEmpty(ItemClass))
Expand All @@ -71,12 +68,12 @@ public override string DescriptionText {
counter++;
}

return $"{objectiveDesc} {itemDisplay}";
return $"{objectiveDesc} {itemDisplay} :";
}

if (string.IsNullOrEmpty(ItemTag)) return $"{objectiveDesc}";
if (string.IsNullOrEmpty(ItemTag)) return $"{objectiveDesc} :";
var itemWithTags = Localization.Get("itemWithTags");
return $"{objectiveDesc} {with} {itemWithTags} {ItemTag}";
return $"{objectiveDesc} {with} {itemWithTags} {ItemTag} :";

}
}
Expand Down Expand Up @@ -130,10 +127,21 @@ public override void ParseElement(XElement e) {
}

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

LocalizationKey =e.GetAttribute("description_key");

if (e.HasAttribute("generate_description"))
{
var temp = e.GetAttribute("generate_description");
StringParsers.TryParseBool(temp, out GenerateDescription);

}

if (e.HasAttribute("target_name_key"))
targetName = Localization.Get(e.GetAttribute("target_name_key"));

}


public override BaseChallengeObjective Clone() {
return new ChallengeObjectiveKillWithItem {
entityTag = entityTag,
Expand Down
2 changes: 1 addition & 1 deletion Mods/0-SCore/ModInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<Description value="SCore Mod" />
<DisplayName value="0-SCore" />
<Website value="" />
<Version value="1.0.86.1506" />
<Version value="1.0.88.1027" />
</xml>
4 changes: 2 additions & 2 deletions Mods/0-SCore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
// [assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("20.0.*")]

[assembly: AssemblyVersion("1.0.86.1506")]
[assembly: AssemblyFileVersion("1.0.86.1506")]
[assembly: AssemblyVersion("1.0.88.1027")]
[assembly: AssemblyFileVersion("1.0.88.1027")]
14 changes: 14 additions & 0 deletions Mods/0-SCore/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ Direct Download to the 0-SCore.zip available on gitlab mirror: https://github.co
### Change Logs

[ Change Log ]
Version: 1.0.88.1027
[ Challenges ]
- Added target_name_key parsing to KillWithItem.
- Added Localization key for KillWith Item
challengeKillZombiesWithItemDesc

- Added Item_tags to be validated, on the Harvest Objective.
- If item="" and item_tags="" are both defined, they both need to pass
[ NPCs ]
- merged 2 fixes from khzmusik
- Fixed a see cache issue
- Fixed a faction tracking issue

Version: 1.0.86.1506
[ Challenges ]
- Another patch to fix challenges being corrupted
Expand Down
Binary file modified Mods/0-SCore/SCore.dll
Binary file not shown.
Binary file modified Mods/0-SCore/SCore.pdb
Binary file not shown.
18 changes: 4 additions & 14 deletions Mods/0-SCore/Scripts/Entities/EntityAliveSDX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Runtime.Remoting.Messaging;
using UAI;
using UnityEngine;
using UnityEngine.Serialization;
Expand All @@ -39,7 +40,7 @@ public class EntityAliveSDX : EntityTrader, IEntityOrderReceiverSDX {

private string rightHandTransformName;

private bool canCollideWithLeader = true;
public bool canCollideWithLeader = true;
private float enemyDistanceToTalk = 10f;

/// <inheritdoc/>
Expand Down Expand Up @@ -590,6 +591,7 @@ public override bool CanBePushed() {
return true;
}


public override void InitLocation(Vector3 _pos, Vector3 _rot) {
base.InitLocation(_pos, _rot);
// Trader class turns that off.
Expand Down Expand Up @@ -880,19 +882,7 @@ public override void UpdateJump() {

this.accumulatedRootMotion.y = 0f;
}

public override bool CanCollideWith(Entity _other) {
if (canCollideWithLeader) return true;

var result = base.CanCollideWith(_other);
var leader = EntityUtilities.GetLeaderOrOwner(entityId);
if (leader && leader.entityId == _other.entityId)
{
return false;
}

return result;
}


public override void MoveEntityHeaded(Vector3 _direction, bool _isDirAbsolute) {
// Check the state to see if the controller IsBusy or not. If it's not, then let it walk.
Expand Down
Binary file modified Mods/CompoPackTweaks/CompoPackTweaks.dll
Binary file not shown.
Binary file modified Mods/CompoPackTweaks/CompoPackTweaks.pdb
Binary file not shown.
Binary file modified Mods/SphereII A Round World/bin/Debug/SphereII_A_Round_World.dll
Binary file not shown.
Binary file modified Mods/SphereII A Round World/bin/Debug/SphereII_A_Round_World.pdb
Binary file not shown.
6 changes: 6 additions & 0 deletions Mods/SphereII Challenges/Config/challenges-02.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
<objective type="Harvest, SCore" count="20" item="resourceWood" held_tags="axe" biome="burnt_forest" />
<objective type="Harvest, SCore" count="20" item="resourceWood" held_tags="axe" block_tag="challenge_pallet" />
</challenge>

<challenge name="LocalizationTest" title_key="title_key" icon="ui_game_symbol_quest" group="SCore03Group"
short_description_key="short_description_key" description_key="description_key"
reward_text_key="reward_text_key" reward_event="challenge_reward_1000">
<objective type="KillWithItem, SCore" count="10" item="gunRifleT0PipeRifle" />
</challenge>
</append>

</configs>
2 changes: 1 addition & 1 deletion Mods/SphereII Legacy Distant Terrain/ModInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<DisplayName value="SphereII Legacy Distant Terrain"/>
<Description value="Re-enables Legacy Distant Terrain"/>
<Author value="sphereii"/>
<Version value="20.0.981.724"/>
<Version value="20.0.994.1027"/>
<Website value=""/>
</xml>
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

using System.Reflection;

[assembly: AssemblyVersion("20.0.981.724")]
[assembly: AssemblyFileVersion("20.0.981.724")]
[assembly: AssemblyVersion("20.0.994.1027")]
[assembly: AssemblyFileVersion("20.0.994.1027")]
Binary file not shown.
Binary file not shown.

0 comments on commit 7891512

Please sign in to comment.