Skip to content

Commit

Permalink
Merge pull request #4 from jonathan-robertson/7dtd-1.0
Browse files Browse the repository at this point in the history
Update to support 7DTD 1.0
  • Loading branch information
jonathan-robertson authored Jul 4, 2024
2 parents 859468a + 2a1a04e commit bf28309
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 23 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2024-07-04

- remove journal tips (discontinued in 1.0)
- update references for 7dtd-1.0

## [1.0.0] - 2023-07-15

- initial release
4 changes: 0 additions & 4 deletions Config/Localization.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
Key,File,Type,english

protectHighTierPrefabsTip01_title,Journal Tip,,"Protected POIs [ff8000][MOD]"
protectHighTierPrefabsTip01,Journal Tip,,"Tier 4 and 5 POIs (points of interest) are late-game quest locations offered by the Traders. They produce the best loot, but there usually aren't many of them on a map.\n\nPlacing a Bedroll or Land Claim Block within any quest location will prevent quests from being issued or activated there. So when someone attempts to take over a Tier 4 or 5 POI in this way, it often generates a lot of frustration and drama from other players on the server.\n\nFor this reason, [ff8000]Land Claim Blocks and Bedrolls are automatically prevented from being placed within Tier 4 or 5 POIs[-] to avoid interrupting any quests at these locations.\n\nPlease feel free to take over [00ff80]any Remnant (non-quest) or Tier 1-3 POI[-] on the map instead, or build anywhere outside of quest POIs if you prefer."


protectHighTierPrefabsInterruptLandClaimTip01,buffs,Buff,"Land Claim area cannot overlap with Tier 4/5 quest locations."
protectHighTierPrefabsInterruptLandClaimTip02,buffs,Buff,"Your land claim block has been returned to you."
protectHighTierPrefabsInterruptBedTip01,buffs,Buff,"Beds cannot be placed within Tier 4/5 quest locations."
Expand Down
6 changes: 0 additions & 6 deletions Config/buffs.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<config>
<append xpath="/buffs/buff[@name='buffStatusCheck02']">
<effect_group name="protect-high-tier-prefabs-journal-entries">
<triggered_effect trigger="onSelfEnteredGame" action="AddJournalEntry" journal="protectHighTierPrefabsTip01" />
</effect_group>
</append>

<append xpath="/buffs">
<buff name="protectHighTierPrefabsInLandClaimPreventionZone" name_key="protectHighTierPrefabsInLandClaimPreventionZoneName" description_key="protectHighTierPrefabsInLandClaimPreventionZoneDesc" icon="ui_game_symbol_brick" icon_color="255,128,0">
<duration value="0" />
Expand Down
9 changes: 0 additions & 9 deletions Config/gameevents.xml

This file was deleted.

2 changes: 1 addition & 1 deletion ModInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<xml>
<Name value="kanaverum-protect-high-tier-prefabs" />
<DisplayName value="Protect High Tier Prefabs" />
<Version value="1.0.0" />
<Version value="2.0.0" />
<Description value="Prevent players from taking over Tier 4 or 5 prefabs." />
<Author value="Jonathan Robertson (Kanaverum)" />
<Website value="/~https://github.com/jonathan-robertson/protect-high-tier-prefabs" />
Expand Down
Binary file modified ProtectHighTierPrefabs.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Protect High Tier Prefabs

[![🧪 Tested On](https://img.shields.io/badge/🧪%20Tested%20On-A21%20b324-blue.svg)](https://7daystodie.com/) [![📦 Automated Release](/~https://github.com/jonathan-robertson/protect-high-tier-prefabs/actions/workflows/release.yml/badge.svg)](/~https://github.com/jonathan-robertson/protect-high-tier-prefabs/actions/workflows/release.yml)
[![🧪 Tested On](https://img.shields.io/badge/🧪%20Tested%20On-1.0%20b313-blue.svg)](https://7daystodie.com/) [![📦 Automated Release](/~https://github.com/jonathan-robertson/protect-high-tier-prefabs/actions/workflows/release.yml/badge.svg)](/~https://github.com/jonathan-robertson/protect-high-tier-prefabs/actions/workflows/release.yml)

- [Protect High Tier Prefabs](#protect-high-tier-prefabs)
- [Summary](#summary)
Expand Down
Binary file modified references/0Harmony.dll
Binary file not shown.
Binary file modified references/Assembly-CSharp.dll
Binary file not shown.
Binary file modified references/LogLibrary.dll
Binary file not shown.
Binary file modified references/System.Configuration.dll
Binary file not shown.
Binary file modified references/UnityEngine.CoreModule.dll
Binary file not shown.
Binary file modified references/UnityEngine.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Utilities/BlockPlacementManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private static void ProcessBlockChanges(List<BlockChangeInfo> blockChangeInfo, o
/// <returns>Whether the given BlockValue can be placed at the given Position.</returns>
private static bool CanPlaceBlock(Vector3i pos, BlockValue blockValue, out bool isLandClaim)
{
if (blockValue.Block.Properties.Values.TryGetString("Class", out var className))
if (blockValue.Block.Properties.Values.TryGetValue("Class", out var className))
{
switch (className)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/ZoneManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static void OnGameStartDone()
if (_landClaimPreventionZone.ContainsKey(pi.id)
|| _bedPreventionZone.ContainsKey(pi.id))
{
_log.Error($"Prefab {pi.id} appears to have already been recorded but is showing up again in this hook => id: {pi.id} | tier: {pi.prefab.DifficultyTier} | filename: {pi.prefab.FileNameNoExtension} | tags: {pi.prefab.GetQuestTags()}");
_log.Error($"Prefab {pi.id} appears to have already been recorded but is showing up again in this hook => id: {pi.id} | tier: {pi.prefab.DifficultyTier} | filename: {pi.prefab.PrefabName} | tags: {pi.prefab.GetQuestTags()}");
return;
}
_landClaimPreventionZone.Add(pi.id, new BoundsInt(pi.boundingBoxPosition - landclaimPadding, pi.boundingBoxSize + (landclaimPadding * 2)));
Expand Down

0 comments on commit bf28309

Please sign in to comment.