Commit Graph

78 Commits

Author SHA1 Message Date
b02af4d0c7 asd 2025-12-14 12:59:18 +01:00
5dba8137c3 Fix: Remove AddBuilding from ProcessBuildingHook
The original PlayerSaveData.Unpack calls AddBuilding, PlaceFromLoad,
and UnpackStage2 after ProcessBuilding returns. The hook should only
create and initialize the building, not call these methods.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 11:58:00 +01:00
b3d7108574 Debug: Add detailed logging to ProcessBuildingHook
Added step-by-step logging to identify where building load fails:
- GetPlaceableByUniqueName result
- Each initialization step
- Exception details if any step fails

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 11:50:31 +01:00
ce1c067fca Fix: Add PlaceFromLoad and UnpackStage2 in ProcessBuildingHook
The hook was missing the critical World.inst.PlaceFromLoad() call which:
- Places building in world cells
- Sets up pathing data for villager navigation
- Registers building properly

Also added UnpackStage2() for complete building initialization.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 11:45:59 +01:00
5d086776cf Fix: Add missing BakePathing() call in PlayerAddBuildingHook
The hook was skipping the original AddBuilding method but not calling
BakePathing(), which is required for villager pathfinding to work.
Without this, villagers cannot find paths to buildings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 11:42:20 +01:00
89586ad8df Fix: Remove TeleportTo calls that break villager AI/movement
- Remove post-load villager TeleportTo refresh (breaks pathfinding)
- Remove periodic villager position sync (TeleportTo interrupts movement)
- Keep ClearVillagerPositionCache for API compatibility

The TeleportTo calls were resetting villager AI state and preventing
them from continuing their movement/work.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 11:39:03 +01:00
8f3d83e807 Fix: Compile errors - variable naming and missing using
- Rename lambda variable 'v' to 'w' to avoid conflict with local 'v'
- Rename local Villager 'v' to 'newVillager' for clarity
- Add missing 'using Assets.Interface' for IResourceStorage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 11:02:01 +01:00
dd17030e56 Fix: Add periodic villager position sync from server
- Server syncs villager positions every ~3 seconds to clients
- Only syncs villagers that moved more than 0.5 units (bandwidth optimization)
- Maintains position cache to detect movement
- Clears cache on lobby leave to prevent stale data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:58:37 +01:00
8d599e13ad Fix: Add post-load fixes for resources and villagers
- Re-register all resource storages after load to fix missing resources
- Refresh building pathing for all players
- Teleport villagers to their position to reset stuck pathfinding/AI
- Add comprehensive error handling and logging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:56:51 +01:00
eab7931f52 Fix: Add position sync for villagers and duplicate check
- Add position property to AddVillagerPacket
- Teleport villager to correct position on client
- Add duplicate guid check to prevent double villager creation
- Send position from Main.cs hook

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:52:39 +01:00
7d6c915b49 Fix: Prevent duplicate building placement via guid check
- Check if building with same guid already exists before placing
- Prevents buildings overlapping from network packet retries
- Logs skip when duplicate detected

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:51:53 +01:00
f7fc5a3969 Fix: Proper session cleanup in LeaveLobby
- Clear clientSteamIds dictionary on disconnect
- Reset loadingSave flag to false
- Prevents stale data when rejoining servers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:51:21 +01:00
2f42cf9366 Fix: Server event handler duplication and null safety
- Remove static constructor that registered MessageReceived handler
- Add proper cleanup in StartServer() before creating new instance
- Add null checks in IsRunning, Update(), and OnApplicationQuit()
- Prevents double event handler registration on reconnect

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:50:57 +01:00
888c807b96 nah 2025-12-14 10:50:05 +01:00
bd12485112 Add CLAUDE.md documentation for Claude Code
Provides architecture overview, packet system docs, and common patterns
for future development assistance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 10:49:52 +01:00
f03e13236f asd 2025-12-14 01:45:02 +01:00
60d509344c fix? 2025-12-14 01:42:22 +01:00
3fbaac2346 na még 1x 2025-12-14 01:27:26 +01:00
0e87108b56 sexy fix 2025-12-14 01:25:29 +01:00
224ba3f912 Merge branch 'main' of https://git.devbeni.lol/devbeni/K-C-Multiplayer 2025-12-14 01:19:31 +01:00
5ebd94c03a Merge branch 'talan-fix/2' 2025-12-14 01:18:52 +01:00
914650c211 asd 2025-12-14 01:17:20 +01:00
93c55dd482 bruh 2025-12-14 01:10:03 +01:00
414ab90afc aha persze talán most nem szia 2025-12-14 01:05:37 +01:00
42a86419ca jaj aja nem hinnem xd 2025-12-14 00:59:48 +01:00
2140fc3868 nem tudom most claude talán megoldja xd 2025-12-14 00:54:55 +01:00
4a2c73badb asd 2025-12-14 00:50:45 +01:00
d6c0ec2a33 sae 2025-12-14 00:50:36 +01:00
634a5f7983 sex 2025-12-14 00:42:03 +01:00
77f4d4fed0 talán???? 2025-12-14 00:34:42 +01:00
3ee6fc4dc6 asd 2025-12-14 00:30:59 +01:00
e0b1b736c3 pls :( 2 2025-12-14 00:27:17 +01:00
28e342b1e3 pls :( 2025-12-14 00:23:06 +01:00
4871f7c150 4. próba... 2025-12-13 23:14:50 +01:00
3dcb9a85b5 talán most grok geci 3. próba 2025-12-13 23:13:40 +01:00
e91ae0fc99 második proba 2025-12-13 23:10:50 +01:00
8edea198cd most elvileg el indul és javítottuk ezueket a szarokat. 2025-12-13 23:09:07 +01:00
f82ae76a3e talán fix geic végre big-pickle 2025-12-13 23:03:10 +01:00
dc50bf2892 fix??? 2025-12-13 21:46:58 +01:00
e636ad6e19 asd 2025-12-13 20:57:23 +01:00
fbb947a23b fix 2025-12-13 20:24:54 +01:00
a2d87106ba talán 2025-12-13 20:21:25 +01:00
0f8f3ce818 fix 69 istenem segíts 2025-12-13 20:06:47 +01:00
07c7e14cde time to shine little one 2025-12-13 19:53:43 +01:00
0549ab0e19 talán fix? 2025-12-13 19:52:16 +01:00
f45402af9a fix 2 2025-12-13 19:42:49 +01:00
6bf74dda43 kisebb fixek elv. 2025-12-13 19:29:33 +01:00
8ac2f2df1c fix 1 2025-12-13 19:20:41 +01:00
b351e0c707 aha 2025-12-13 19:17:20 +01:00
0776da883f BIG FIX XD 2025-12-13 19:12:53 +01:00