aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_room_remove.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 16:13:49 -0400
committerhistoria <[not public]>2026-09-18 16:13:49 -0400
commit194164a77eb4f2479b94c19e6f0e1278ab608781 (patch)
tree53413add8ed6f32a34d1733397e380cc98ef70ef /internal/game/cmd_room_remove.go
parent67e01aab85607b9e601185c7d62dff576af3bb43 (diff)
downloadthehouseoficarus-194164a77eb4f2479b94c19e6f0e1278ab608781.tar.gz
fix: more casino, economy, gameplay, security, and world data hardening gaps
Diffstat (limited to 'internal/game/cmd_room_remove.go')
-rw-r--r--internal/game/cmd_room_remove.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/game/cmd_room_remove.go b/internal/game/cmd_room_remove.go
index af745fd..77a09b3 100644
--- a/internal/game/cmd_room_remove.go
+++ b/internal/game/cmd_room_remove.go
@@ -180,7 +180,7 @@ func (g *Game) roomRemove(sess *net.Session, args []string) {
sess.WriteLine("Error updating current room YAML.")
return
}
- if err := os.WriteFile(aPath, aData, 0644); err != nil {
+ if err := writeRoomFile(aPath, aData); err != nil {
sess.WriteLine("Error writing current room file.")
return
}
@@ -198,7 +198,9 @@ func (g *Game) roomRemove(sess *net.Session, args []string) {
if cPathOK {
cData, cerr := yaml.Marshal(cRoom)
if cerr == nil {
- os.WriteFile(cPath, cData, 0644)
+ if werr := writeRoomFile(cPath, cData); werr != nil {
+ sess.WriteLine(fmt.Sprintf("Warning: could not link the opposite exit in room %d: %v", cID, werr))
+ }
}
}