move models to /internal/models

This commit is contained in:
Sky Johnson 2025-08-14 11:44:10 -05:00
parent 869464944a
commit c083c55212
24 changed files with 1801 additions and 1801 deletions

View File

@ -1,4 +1,60 @@
[ [
{
"id": 31,
"name": "Memory Drop",
"level": 5,
"type": 1,
"att": "expbonus,10"
},
{
"id": 25,
"name": "Ruby",
"level": 50,
"type": 1,
"att": "maxhp,150"
},
{
"id": 23,
"name": "Seraph's Truth",
"level": 35,
"type": 1,
"att": "maxmp,75,dexterity,75"
},
{
"id": 24,
"name": "Seraph's Love",
"level": 40,
"type": 1,
"att": "maxmp,100,dexterity,100"
},
{
"id": 11,
"name": "Dragon's Tear",
"level": 35,
"type": 1,
"att": "strength,50"
},
{
"id": 20,
"name": "Angel's Love",
"level": 40,
"type": 1,
"att": "maxhp,100,strength,100"
},
{
"id": 18,
"name": "Angel's Rise",
"level": 30,
"type": 1,
"att": "maxhp,50,strength,50"
},
{
"id": 8,
"name": "Dragon's Plate",
"level": 30,
"type": 1,
"att": "defensepower,50"
},
{ {
"id": 5, "id": 5,
"name": "Magic Stone", "name": "Magic Stone",
@ -14,25 +70,46 @@
"att": "strength,150" "att": "strength,150"
}, },
{ {
"id": 30, "id": 26,
"name": "Diamond", "name": "Pearl",
"level": 50, "level": 50,
"type": 1, "type": 1,
"att": "defensepower,150" "att": "maxmp,150"
}, },
{ {
"id": 24, "id": 14,
"name": "Seraph's Love", "name": "Demon's Fall",
"level": 40,
"type": 1,
"att": "maxmp,100,dexterity,100"
},
{
"id": 13,
"name": "Demon's Sin",
"level": 35, "level": 35,
"type": 1, "type": 1,
"att": "maxhp,-50,strength,50" "att": "maxmp,-50,strength,50"
},
{
"id": 17,
"name": "Angel's Joy",
"level": 25,
"type": 1,
"att": "maxhp,25,strength,25"
},
{
"id": 7,
"name": "Dragon's Scale",
"level": 10,
"type": 1,
"att": "defensepower,25"
},
{
"id": 12,
"name": "Dragon's Wing",
"level": 35,
"type": 1,
"att": "dexterity,50"
},
{
"id": 1,
"name": "Life Pebble",
"level": 1,
"type": 1,
"att": "maxhp,10"
}, },
{ {
"id": 4, "id": 4,
@ -42,11 +119,39 @@
"att": "maxmp,10" "att": "maxmp,10"
}, },
{ {
"id": 11, "id": 22,
"name": "Dragon's Tear", "name": "Seraph's Rise",
"level": 35, "level": 30,
"type": 1, "type": 1,
"att": "strength,50" "att": "maxmp,50,dexterity,50"
},
{
"id": 29,
"name": "Obsidian",
"level": 50,
"type": 1,
"att": "attackpower,150"
},
{
"id": 32,
"name": "Fortune Drop",
"level": 5,
"type": 1,
"att": "goldbonus,10"
},
{
"id": 30,
"name": "Diamond",
"level": 50,
"type": 1,
"att": "defensepower,150"
},
{
"id": 15,
"name": "Demon's Lie",
"level": 45,
"type": 1,
"att": "maxhp,-100,strength,100"
}, },
{ {
"id": 9, "id": 9,
@ -56,18 +161,18 @@
"att": "attackpower,25" "att": "attackpower,25"
}, },
{ {
"id": 20, "id": 28,
"name": "Angel's Love", "name": "Topaz",
"level": 40, "level": 50,
"type": 1, "type": 1,
"att": "maxhp,100,strength,100" "att": "dexterity,150"
}, },
{ {
"id": 2, "id": 6,
"name": "Life Stone", "name": "Magic Rock",
"level": 10, "level": 25,
"type": 1, "type": 1,
"att": "maxhp,25" "att": "maxmp,50"
}, },
{ {
"id": 21, "id": 21,
@ -76,6 +181,34 @@
"type": 1, "type": 1,
"att": "maxmp,25,dexterity,25" "att": "maxmp,25,dexterity,25"
}, },
{
"id": 3,
"name": "Life Rock",
"level": 25,
"type": 1,
"att": "maxhp,50"
},
{
"id": 19,
"name": "Angel's Truth",
"level": 35,
"type": 1,
"att": "maxhp,75,strength,75"
},
{
"id": 13,
"name": "Demon's Sin",
"level": 35,
"type": 1,
"att": "maxhp,-50,strength,50"
},
{
"id": 2,
"name": "Life Stone",
"level": 10,
"type": 1,
"att": "maxhp,25"
},
{ {
"id": 10, "id": 10,
"name": "Dragon's Tooth", "name": "Dragon's Tooth",
@ -89,138 +222,5 @@
"level": 45, "level": 45,
"type": 1, "type": 1,
"att": "maxmp,-100,strength,100" "att": "maxmp,-100,strength,100"
},
{
"id": 26,
"name": "Pearl",
"level": 50,
"type": 1,
"att": "maxmp,150"
},
{
"id": 31,
"name": "Memory Drop",
"level": 5,
"type": 1,
"att": "expbonus,10"
},
{
"id": 14,
"name": "Demon's Fall",
"level": 35,
"type": 1,
"att": "maxmp,-50,strength,50"
},
{
"id": 28,
"name": "Topaz",
"level": 50,
"type": 1,
"att": "dexterity,150"
},
{
"id": 22,
"name": "Seraph's Rise",
"level": 30,
"type": 1,
"att": "maxmp,50,dexterity,50"
},
{
"id": 8,
"name": "Dragon's Plate",
"level": 30,
"type": 1,
"att": "defensepower,50"
},
{
"id": 3,
"name": "Life Rock",
"level": 25,
"type": 1,
"att": "maxhp,50"
},
{
"id": 17,
"name": "Angel's Joy",
"level": 25,
"type": 1,
"att": "maxhp,25,strength,25"
},
{
"id": 19,
"name": "Angel's Truth",
"level": 35,
"type": 1,
"att": "maxhp,75,strength,75"
},
{
"id": 6,
"name": "Magic Rock",
"level": 25,
"type": 1,
"att": "maxmp,50"
},
{
"id": 15,
"name": "Demon's Lie",
"level": 45,
"type": 1,
"att": "maxhp,-100,strength,100"
},
{
"id": 7,
"name": "Dragon's Scale",
"level": 10,
"type": 1,
"att": "defensepower,25"
},
{
"id": 29,
"name": "Obsidian",
"level": 50,
"type": 1,
"att": "attackpower,150"
},
{
"id": 25,
"name": "Ruby",
"level": 50,
"type": 1,
"att": "maxhp,150"
},
{
"id": 18,
"name": "Angel's Rise",
"level": 30,
"type": 1,
"att": "maxhp,50,strength,50"
},
{
"id": 23,
"name": "Seraph's Truth",
"level": 35,
"type": 1,
"att": "maxmp,75,dexterity,75"
},
{
"id": 12,
"name": "Dragon's Wing",
"level": 35,
"type": 1,
"att": "dexterity,50"
},
{
"id": 32,
"name": "Fortune Drop",
"level": 5,
"type": 1,
"att": "goldbonus,10"
},
{
"id": 1,
"name": "Life Pebble",
"level": 1,
"type": 1,
"att": "maxhp,10"
} }
] ]

View File

@ -1,11 +1,35 @@
[ [
{ {
"id": 17, "id": 3,
"type": 2, "type": 1,
"name": "Skivvies", "name": "Club",
"value": 25, "value": 40,
"att": 2, "att": 5,
"special": "goldbonus,10" "special": ""
},
{
"id": 5,
"type": 1,
"name": "Hatchet",
"value": 150,
"att": 12,
"special": ""
},
{
"id": 33,
"type": 3,
"name": "Destiny Aegis",
"value": 25000,
"att": 100,
"special": "maxhp,50"
},
{
"id": 10,
"type": 1,
"name": "Battle Axe",
"value": 1200,
"att": 50,
"special": ""
}, },
{ {
"id": 11, "id": 11,
@ -15,62 +39,6 @@
"att": 60, "att": 60,
"special": "" "special": ""
}, },
{
"id": 28,
"type": 3,
"name": "Reed Shield",
"value": 50,
"att": 2,
"special": ""
},
{
"id": 8,
"type": 1,
"name": "Poleaxe",
"value": 500,
"att": 35,
"special": ""
},
{
"id": 25,
"type": 2,
"name": "Dark Armor",
"value": 5000,
"att": 150,
"special": "expbonus,-10"
},
{
"id": 20,
"type": 2,
"name": "Hard Leather Armor",
"value": 150,
"att": 25,
"special": ""
},
{
"id": 12,
"type": 1,
"name": "Dark Axe",
"value": 3000,
"att": 100,
"special": "expbonus,-5"
},
{
"id": 22,
"type": 2,
"name": "Bronze Plate",
"value": 900,
"att": 50,
"special": ""
},
{
"id": 19,
"type": 2,
"name": "Leather Armor",
"value": 75,
"att": 10,
"special": ""
},
{ {
"id": 21, "id": 21,
"type": 2, "type": 2,
@ -79,86 +47,6 @@
"att": 30, "att": 30,
"special": "" "special": ""
}, },
{
"id": 26,
"type": 2,
"name": "Bright Armor",
"value": 10000,
"att": 175,
"special": "expbonus,10"
},
{
"id": 23,
"type": 2,
"name": "Iron Plate",
"value": 2000,
"att": 100,
"special": ""
},
{
"id": 4,
"type": 1,
"name": "Dagger",
"value": 90,
"att": 8,
"special": ""
},
{
"id": 7,
"type": 1,
"name": "Brand",
"value": 300,
"att": 25,
"special": ""
},
{
"id": 29,
"type": 3,
"name": "Buckler",
"value": 100,
"att": 4,
"special": ""
},
{
"id": 18,
"type": 2,
"name": "Clothes",
"value": 50,
"att": 5,
"special": ""
},
{
"id": 3,
"type": 1,
"name": "Club",
"value": 40,
"att": 5,
"special": ""
},
{
"id": 32,
"type": 3,
"name": "Silver Shield",
"value": 10000,
"att": 60,
"special": ""
},
{
"id": 24,
"type": 2,
"name": "Magic Armor",
"value": 4000,
"att": 125,
"special": "maxmp,50"
},
{
"id": 16,
"type": 1,
"name": "Destiny Blade",
"value": 50000,
"att": 250,
"special": "strength,50"
},
{ {
"id": 14, "id": 14,
"type": 1, "type": 1,
@ -167,30 +55,6 @@
"att": 100, "att": 100,
"special": "expbonus,10" "special": "expbonus,10"
}, },
{
"id": 5,
"type": 1,
"name": "Hatchet",
"value": 150,
"att": 12,
"special": ""
},
{
"id": 1,
"type": 1,
"name": "Stick",
"value": 10,
"att": 2,
"special": ""
},
{
"id": 27,
"type": 2,
"name": "Destiny Raiment",
"value": 50000,
"att": 200,
"special": "dexterity,50"
},
{ {
"id": 13, "id": 13,
"type": 1, "type": 1,
@ -216,27 +80,107 @@
"special": "" "special": ""
}, },
{ {
"id": 6, "id": 15,
"type": 1, "type": 1,
"name": "Axe", "name": "Magic Sword",
"value": 200, "value": 10000,
"att": 16, "att": 150,
"special": "maxmp,50"
},
{
"id": 20,
"type": 2,
"name": "Hard Leather Armor",
"value": 150,
"att": 25,
"special": "" "special": ""
}, },
{ {
"id": 33, "id": 19,
"type": 3, "type": 2,
"name": "Destiny Aegis", "name": "Leather Armor",
"value": 25000, "value": 75,
"att": 100, "att": 10,
"special": "maxhp,50" "special": ""
}, },
{ {
"id": 10, "id": 26,
"type": 2,
"name": "Bright Armor",
"value": 10000,
"att": 175,
"special": "expbonus,10"
},
{
"id": 29,
"type": 3,
"name": "Buckler",
"value": 100,
"att": 4,
"special": ""
},
{
"id": 24,
"type": 2,
"name": "Magic Armor",
"value": 4000,
"att": 125,
"special": "maxmp,50"
},
{
"id": 28,
"type": 3,
"name": "Reed Shield",
"value": 50,
"att": 2,
"special": ""
},
{
"id": 8,
"type": 1, "type": 1,
"name": "Battle Axe", "name": "Poleaxe",
"value": 1200, "value": 500,
"att": 50, "att": 35,
"special": ""
},
{
"id": 12,
"type": 1,
"name": "Dark Axe",
"value": 3000,
"att": 100,
"special": "expbonus,-5"
},
{
"id": 2,
"type": 1,
"name": "Branch",
"value": 30,
"att": 4,
"special": ""
},
{
"id": 17,
"type": 2,
"name": "Skivvies",
"value": 25,
"att": 2,
"special": "goldbonus,10"
},
{
"id": 32,
"type": 3,
"name": "Silver Shield",
"value": 10000,
"att": 60,
"special": ""
},
{
"id": 1,
"type": 1,
"name": "Stick",
"value": 10,
"att": 2,
"special": "" "special": ""
}, },
{ {
@ -248,19 +192,75 @@
"special": "" "special": ""
}, },
{ {
"id": 2, "id": 23,
"type": 1, "type": 2,
"name": "Branch", "name": "Iron Plate",
"value": 30, "value": 2000,
"att": 4, "att": 100,
"special": "" "special": ""
}, },
{ {
"id": 15, "id": 25,
"type": 1, "type": 2,
"name": "Magic Sword", "name": "Dark Armor",
"value": 10000, "value": 5000,
"att": 150, "att": 150,
"special": "maxmp,50" "special": "expbonus,-10"
},
{
"id": 18,
"type": 2,
"name": "Clothes",
"value": 50,
"att": 5,
"special": ""
},
{
"id": 16,
"type": 1,
"name": "Destiny Blade",
"value": 50000,
"att": 250,
"special": "strength,50"
},
{
"id": 6,
"type": 1,
"name": "Axe",
"value": 200,
"att": 16,
"special": ""
},
{
"id": 27,
"type": 2,
"name": "Destiny Raiment",
"value": 50000,
"att": 200,
"special": "dexterity,50"
},
{
"id": 4,
"type": 1,
"name": "Dagger",
"value": 90,
"att": 8,
"special": ""
},
{
"id": 7,
"type": 1,
"name": "Brand",
"value": 300,
"att": 25,
"special": ""
},
{
"id": 22,
"type": 2,
"name": "Bronze Plate",
"value": 900,
"att": 50,
"special": ""
} }
] ]

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,30 @@
[ [
{ {
"id": 5, "id": 13,
"name": "Gaia", "name": "Nightmare",
"mp": 75, "mp": 60,
"attribute": 150, "attribute": 13,
"type": 3
},
{
"id": 16,
"name": "Fury",
"mp": 30,
"attribute": 50,
"type": 4
},
{
"id": 7,
"name": "Pain",
"mp": 12,
"attribute": 35,
"type": 2
},
{
"id": 4,
"name": "Breath",
"mp": 50,
"attribute": 100,
"type": 1 "type": 1
}, },
{ {
@ -13,34 +34,6 @@
"attribute": 25, "attribute": 25,
"type": 1 "type": 1
}, },
{
"id": 3,
"name": "Life",
"mp": 25,
"attribute": 50,
"type": 1
},
{
"id": 8,
"name": "Maim",
"mp": 25,
"attribute": 70,
"type": 2
},
{
"id": 14,
"name": "Craze",
"mp": 10,
"attribute": 10,
"type": 4
},
{
"id": 1,
"name": "Heal",
"mp": 5,
"attribute": 10,
"type": 1
},
{ {
"id": 15, "id": 15,
"name": "Rage", "name": "Rage",
@ -49,10 +42,24 @@
"type": 4 "type": 4
}, },
{ {
"id": 9, "id": 11,
"name": "Rend", "name": "Sleep",
"mp": 40, "mp": 10,
"attribute": 100, "attribute": 5,
"type": 3
},
{
"id": 10,
"name": "Chaos",
"mp": 50,
"attribute": 130,
"type": 2
},
{
"id": 8,
"name": "Maim",
"mp": 25,
"attribute": 70,
"type": 2 "type": 2
}, },
{ {
@ -76,13 +83,6 @@
"attribute": 9, "attribute": 9,
"type": 3 "type": 3
}, },
{
"id": 18,
"name": "Fend",
"mp": 20,
"attribute": 25,
"type": 5
},
{ {
"id": 19, "id": 19,
"name": "Barrier", "name": "Barrier",
@ -91,45 +91,45 @@
"type": 5 "type": 5
}, },
{ {
"id": 13, "id": 5,
"name": "Nightmare", "name": "Gaia",
"mp": 60, "mp": 75,
"attribute": 13, "attribute": 150,
"type": 3 "type": 1
}, },
{ {
"id": 11, "id": 3,
"name": "Sleep", "name": "Life",
"mp": 10, "mp": 25,
"attribute": 5,
"type": 3
},
{
"id": 16,
"name": "Fury",
"mp": 30,
"attribute": 50, "attribute": 50,
"type": 1
},
{
"id": 1,
"name": "Heal",
"mp": 5,
"attribute": 10,
"type": 1
},
{
"id": 9,
"name": "Rend",
"mp": 40,
"attribute": 100,
"type": 2
},
{
"id": 14,
"name": "Craze",
"mp": 10,
"attribute": 10,
"type": 4 "type": 4
}, },
{ {
"id": 10, "id": 18,
"name": "Chaos", "name": "Fend",
"mp": 50, "mp": 20,
"attribute": 130, "attribute": 25,
"type": 2 "type": 5
},
{
"id": 7,
"name": "Pain",
"mp": 12,
"attribute": 35,
"type": 2
},
{
"id": 4,
"name": "Breath",
"mp": 50,
"attribute": 100,
"type": 1
} }
] ]

View File

@ -1,9 +1,9 @@
package actions package actions
import ( import (
"dk/internal/control" "dk/internal/models/control"
"dk/internal/towns" "dk/internal/models/towns"
"dk/internal/users" "dk/internal/models/users"
"fmt" "fmt"
) )

View File

@ -1,8 +1,8 @@
package actions package actions
import ( import (
"dk/internal/items" "dk/internal/models/items"
"dk/internal/users" "dk/internal/models/users"
) )
// UserEquipItem equips a given item onto a user. This overwrites any // UserEquipItem equips a given item onto a user. This overwrites any

View File

@ -4,9 +4,9 @@
package auth package auth
import ( import (
"dk/internal/models/users"
"dk/internal/password" "dk/internal/password"
"dk/internal/session" "dk/internal/session"
"dk/internal/users"
) )
var Manager *AuthManager var Manager *AuthManager

View File

@ -2,9 +2,9 @@ package middleware
import ( import (
"dk/internal/auth" "dk/internal/auth"
"dk/internal/models/users"
"dk/internal/router" "dk/internal/router"
"dk/internal/session" "dk/internal/session"
"dk/internal/users"
"github.com/valyala/fasthttp" "github.com/valyala/fasthttp"
) )

View File

@ -1,9 +1,9 @@
package middleware package middleware
import ( import (
"dk/internal/models/towns"
"dk/internal/models/users"
"dk/internal/router" "dk/internal/router"
"dk/internal/towns"
"dk/internal/users"
"github.com/valyala/fasthttp" "github.com/valyala/fasthttp"
) )

View File

@ -7,10 +7,10 @@ import (
"dk/internal/auth" "dk/internal/auth"
"dk/internal/csrf" "dk/internal/csrf"
"dk/internal/middleware" "dk/internal/middleware"
"dk/internal/models/users"
"dk/internal/password" "dk/internal/password"
"dk/internal/router" "dk/internal/router"
"dk/internal/template/components" "dk/internal/template/components"
"dk/internal/users"
"github.com/valyala/fasthttp" "github.com/valyala/fasthttp"
) )

View File

@ -4,12 +4,12 @@ import (
"dk/internal/actions" "dk/internal/actions"
"dk/internal/auth" "dk/internal/auth"
"dk/internal/helpers" "dk/internal/helpers"
"dk/internal/items"
"dk/internal/middleware" "dk/internal/middleware"
"dk/internal/models/items"
"dk/internal/models/towns"
"dk/internal/models/users"
"dk/internal/router" "dk/internal/router"
"dk/internal/template/components" "dk/internal/template/components"
"dk/internal/towns"
"dk/internal/users"
"slices" "slices"
"strconv" "strconv"
) )

View File

@ -3,9 +3,9 @@ package components
import ( import (
"dk/internal/helpers" "dk/internal/helpers"
"dk/internal/middleware" "dk/internal/middleware"
"dk/internal/models/spells"
"dk/internal/models/towns"
"dk/internal/router" "dk/internal/router"
"dk/internal/spells"
"dk/internal/towns"
) )
// LeftAside generates the data map for the left sidebar. // LeftAside generates the data map for the left sidebar.

View File

@ -2,8 +2,8 @@ package components
import ( import (
"dk/internal/helpers/markdown" "dk/internal/helpers/markdown"
"dk/internal/news" "dk/internal/models/news"
"dk/internal/users" "dk/internal/models/users"
"fmt" "fmt"
"time" "time"
) )

20
main.go
View File

@ -10,20 +10,20 @@ import (
"syscall" "syscall"
"dk/internal/auth" "dk/internal/auth"
"dk/internal/babble"
"dk/internal/control"
"dk/internal/drops"
"dk/internal/forum"
"dk/internal/items"
"dk/internal/middleware" "dk/internal/middleware"
"dk/internal/monsters" "dk/internal/models/babble"
"dk/internal/news" "dk/internal/models/control"
"dk/internal/models/drops"
"dk/internal/models/forum"
"dk/internal/models/items"
"dk/internal/models/monsters"
"dk/internal/models/news"
"dk/internal/models/spells"
"dk/internal/models/towns"
"dk/internal/models/users"
"dk/internal/router" "dk/internal/router"
"dk/internal/routes" "dk/internal/routes"
"dk/internal/spells"
"dk/internal/template" "dk/internal/template"
"dk/internal/towns"
"dk/internal/users"
"github.com/valyala/fasthttp" "github.com/valyala/fasthttp"
) )