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

Siege rework #1

Merged
merged 21 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a818306
effortless building fix
Supernoobv Jul 6, 2024
6264c1b
forgot mixins json (woops)
Supernoobv Jul 6, 2024
269e8a6
Make kills valid within 3x3 chunk area around siege camp (Untested)
MisterNorwood Jul 10, 2024
cbb291a
Siege Cooldown is now configurable hopefully
ReclipseTheOne Jul 10, 2024
658f18a
prepare for adding new cooldowns
MisterNorwood Jul 13, 2024
699e428
untied flags from global timer, flags use own cooldown (untested)
MisterNorwood Jul 13, 2024
0a9eab0
fix missmapped settings
MisterNorwood Jul 13, 2024
0219821
Another cooldown based commit <3
ReclipseTheOne Jul 13, 2024
500ee0a
Merge branch 'master' of https://github.com/ReclipseTheOne/WarForge-R…
Supernoobv Jul 15, 2024
33024a4
Merge branch 'siege-rework' of https://github.com/ReclipseTheOne/WarF…
Supernoobv Jul 15, 2024
a729ffe
reclipse genius maths at work
Supernoobv Jul 15, 2024
7ea1e1b
Siege block *should* be breakable now, testing needed
ReclipseTheOne Jul 20, 2024
8b69f03
add claim dimension whitelist
MisterNorwood Jul 20, 2024
3e28b6f
Adds forcing siege to end, destroying siege block automatically, with…
EightXOR8 Jul 26, 2024
35a1093
Remove logging and rename username for run client back to default.
EightXOR8 Jul 26, 2024
ac4db71
Adds handling for sieges ended properly and changes some notification…
EightXOR8 Jul 26, 2024
61f313a
Implement Anit-SiegeLog
MisterNorwood Jul 27, 2024
e160f77
Fix implementation of Anit-SiegeLog
MisterNorwood Jul 27, 2024
c69712c
add isEmpty
MisterNorwood Jul 27, 2024
2d46e12
Adds grace period for chunks won (including defended) in a siege, den…
EightXOR8 Jul 27, 2024
55c645f
Notify attackers when siege zone has been abandoned for ~1/16th the t…
EightXOR8 Jul 28, 2024
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 implementation of Anit-SiegeLog
  • Loading branch information
MisterNorwood committed Jul 27, 2024
commit e160f7725417486d7e203b7088f43073b90da02c
9 changes: 7 additions & 2 deletions src/main/java/com/flansmod/warforge/common/WarForgeMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class WarForgeMod implements ILateMixinLoader

public static MinecraftServer MC_SERVER = null;
public static Random rand = new Random();
public static CombatLogHandler CombatLog = new CombatLogHandler();
public static CombatLogHandler combatLog = new CombatLogHandler();


public static long numberOfSiegeDaysTicked = 0L;
Expand Down Expand Up @@ -264,6 +264,10 @@ public void UpdateServer()
FACTIONS.AdvanceYieldDay();
shouldUpdate = true;
}
if(!combatLog.isEmpty()){
combatLog.doEnforcements(System.currentTimeMillis());

}

if(shouldUpdate)
{
Expand Down Expand Up @@ -505,7 +509,6 @@ public void PlayerJoinedGame(PlayerLoggedInEvent event)

FACTIONS.SendAllSiegeInfoToNearby();
}
PlayerMP
}

// Discord integration
Expand Down Expand Up @@ -734,8 +737,10 @@ public void ServerStopped(FMLServerStoppingEvent event)
@EventHandler
public static void onPlayerLogout(PlayerEvent.PlayerLoggedOutEvent event) {
EntityPlayer player = event.player;
DimBlockPos playerPos = new DimBlockPos(player);
Faction playerFaction = FACTIONS.GetFactionOfPlayer(player.getUniqueID());
if(FACTIONS.isPlayerDefending(player.getUniqueID())){
combatLog.add(playerPos,player.getUniqueID(), System.currentTimeMillis());


}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public class FactionStorage

// This is all the currently active sieges, keyed by the defending position
private HashMap<DimChunkPos, Siege> mSieges = new HashMap<DimChunkPos, Siege>();

//This is all chunks that are under the "Grace" period
private HashMap<DimChunkPos, Long> mStalled = new HashMap<DimChunkPos, Long>();

// SafeZone and WarZone
public static UUID SAFE_ZONE_ID = Faction.CreateUUID("safezone");
Expand Down