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

Fixes and Tweaks #215

Merged
merged 35 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
734288d
Update README
robinje Oct 4, 2024
5f5250b
Fix Logging Issues
robinje Oct 5, 2024
8c7b276
Graceful Shutdown
robinje Oct 5, 2024
1631f38
Formatting improvement
robinje Oct 5, 2024
b68cda3
Revisions to the Create Item script
robinje Oct 5, 2024
90c87f0
Apply Autoformatting
Oct 5, 2024
c642d5c
Fixing Item / Database Issues
robinje Oct 5, 2024
3e27b84
Item WIP
robinje Oct 5, 2024
13c8ba8
Apply Autoformatting
Oct 5, 2024
62b759b
Create Item Script
robinje Oct 5, 2024
ceac015
Final Create Iem Script
robinje Oct 5, 2024
c5fb7b3
Apply Autoformatting
Oct 5, 2024
a4c120b
Allow editing of room 0
robinje Oct 5, 2024
505d651
Merge branch 'future' of https://github.com/robinje/multi-user-dungeo…
robinje Oct 5, 2024
351a7b1
Room Loading Rework
robinje Oct 6, 2024
3be723a
Fix Room Loading
robinje Oct 6, 2024
7456662
WIP
robinje Oct 6, 2024
e127ed2
WIP
robinje Oct 6, 2024
9ab4024
WIP
robinje Oct 6, 2024
62776f8
Apply JS Autoformatting
Oct 6, 2024
8c8f5ac
Rework of Exit Structure
robinje Oct 6, 2024
3ad5a95
Merge branch 'future' of https://github.com/robinje/multi-user-dungeo…
robinje Oct 6, 2024
409c266
Apply Autoformatting
Oct 6, 2024
a5279a8
Apply Formatting
robinje Oct 6, 2024
7b76c43
Fix display for loading Prototypes
robinje Oct 6, 2024
2ac87fb
Update Data Loaders for Prototypes
robinje Oct 7, 2024
9a70850
Apply Autoformatting
Oct 7, 2024
553e9e1
Item/Prototype Rework
robinje Oct 7, 2024
97ca546
Merge branch 'future' of https://github.com/robinje/multi-user-dungeo…
robinje Oct 7, 2024
8613c8e
Fix Room Saving
robinje Oct 7, 2024
26fa46d
Update Schema Definition
robinje Oct 7, 2024
211498d
Apply JS Autoformatting
Oct 7, 2024
c68e5c1
More Schema
robinje Oct 7, 2024
75251a0
Merge branch 'future' of https://github.com/robinje/multi-user-dungeo…
robinje Oct 7, 2024
ceb1345
Fix DynamoDB Template
robinje Oct 7, 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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,23 @@ The current implementation includes an SSH server for secure authentication and
- [x] Implement a text colorization system.
- [x] Add Cloudwatch Logs and Metrics.
- [x] Build an interactive password change system.
- [ ] Develop a weather and time system.
- [ ] Construct the item system.
- [ ] Create a crafting system for items.
- [ ] Develop game mechanics.
- [ ] Design an economic framework
- [ ] Implement a world creation system.
- [ ] Build a direct messaging system.
- [ ] Develop simple Non-Player Characters (NPCs).
- [ ] Design and implement a quest system.
- [ ] Build a direct messaging system.
- [ ] Develop more complex Non-Player Characters (NPCs) with basic AI.
- [ ] Implement a dynamic content updating system.
- [ ] Implement a player-to-player trading system.
- [ ] Create a crafting system for items.
- [ ] Develop a weather and time system.
- [ ] Implement a party system for cooperative gameplay.
- [ ] Implement a magic system.
- [ ] Impliment a quest tracking system.
- [ ] Impliment a reputation system.
- [ ] Develop a conditional room description system.
- [ ] Implement a world creation system.
- [ ] Develop more complex Non-Player Characters (NPCs) with basic AI.

## TODO

Expand All @@ -71,15 +71,15 @@ The current implementation includes an SSH server for secure authentication and
- [x] Add a Message of the Day (MOTD) command.
- [x] Add Bloom Filter to check for existing characters names being used.
- [x] Add the ability to delete characters.
- [ ] Add the ability to delete accounts.
- [ ] Add look at item command.
- [ ] Implement an obscenity filter.
- [ ] Validate graph of loaded rooms and exits.
- [ ] Add look at item command.
- [ ] Improve the say commands.
- [ ] Improve the say command.
- [ ] Improve the input filters
- [ ] Create administrative interface.
- [ ] Force Password Resets when needed.
- [ ] Allow starting room to be set by Archtype.
- [ ] Add the ability to delete accounts.

## Project Overview

Expand Down
1 change: 1 addition & 0 deletions Schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@

| Field | Type | Description |
| ------------ | --------- | ----------------------------------------------- |
| `ExitID` | `STRING` | UUID of the exit. |
| `RoomID` | `NUMBER` | ID of the room containing the exit. |
| `Direction` | `STRING` | Direction of the exit (e.g., "north", "south"). |
| `TargetRoom` | `NUMBER` | ID of the room the exit leads to. |
Expand Down
20 changes: 19 additions & 1 deletion core/character.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (c *Character) FromData(cd *CharacterData, server *Server) error {
Logger.Error("Error parsing item UUID", "itemID", itemIDStr, "error", err)
continue
}
item, err := server.Database.LoadItem(itemID.String(), false)
item, err := server.Database.LoadItem(itemID.String())
if err != nil {
Logger.Error("Error loading item for character", "itemID", itemID, "characterName", c.Name, "error", err)
continue
Expand Down Expand Up @@ -508,3 +508,21 @@ func RemoveWornItem(c *Character, item *Item) error {
Logger.Info("Item removed from worn location and placed in hand", "characterName", c.Name, "itemName", item.Name, "handSlot", handSlot)
return nil
}

// getOtherCharacters returns a list of character names in the room, excluding the current character.
func getOtherCharacters(r *Room, currentCharacter *Character) []string {
if r == nil || r.Characters == nil {
Logger.Warn("Room or Characters map is nil in getOtherCharacters")
return []string{}
}

otherCharacters := make([]string, 0)
for _, c := range r.Characters {
if c != nil && c != currentCharacter {
otherCharacters = append(otherCharacters, c.Name)
}
}

Logger.Info("Found other characters in room", "count", len(otherCharacters), "room_id", r.RoomID)
return otherCharacters
}
Loading
Loading