Make player collision and color handler
This commit is contained in:
parent
9604d9f815
commit
9f1d738fa9
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
7
.idea/discord.xml
Normal file
7
.idea/discord.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DiscordProjectSettings">
|
||||
<option name="show" value="PROJECT_FILES" />
|
||||
<option name="description" value="" />
|
||||
</component>
|
||||
</project>
|
9
.idea/go-susapp.iml
Normal file
9
.idea/go-susapp.iml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/go-susapp.iml" filepath="$PROJECT_DIR$/.idea/go-susapp.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
1
Makefile
1
Makefile
@ -18,7 +18,6 @@ clean:
|
||||
rm -rf dist/ && \
|
||||
rm -rf package/
|
||||
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
make && \
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
[[{"x":2.462232,"y":-0.7328739},{"x":-2.329295,"y":-0.7900157},{"x":-2.731057,"y":-0.2632411},{"x":-2.701691,"y":2.324046},{"x":-1.033857,"y":2.998891},{"x":1.180829,"y":3.004922},{"x":2.809417,"y":2.336571},{"x":2.814456,"y":-0.2378364},{"x":2.448293,"y":-0.7521003}],[{"x":-1.428167,"y":0.6019696},{"x":-2.085,"y":0.31},{"x":-1.645951,"y":-0.1078099},{"x":-0.935,"y":0.16},{"x":-1.428167,"y":0.6019696}],[{"x":1.688167,"y":1.19197},{"x":2.345,"y":0.9},{"x":1.905951,"y":0.4821901},{"x":1.195,"y":0.75},{"x":1.688167,"y":1.19197}],[{"x":-1.0409,"y":2.095182},{"x":-1.435,"y":1.92},{"x":-1.171571,"y":1.669314},{"x":-0.745,"y":1.83},{"x":-1.0409,"y":2.095182}]]
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
45
debugsettingswindow.go
Normal file
45
debugsettingswindow.go
Normal file
@ -0,0 +1,45 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/gotk3/gotk3/gtk"
|
||||
)
|
||||
|
||||
func openDebugSettingsWindow(application *gtk.Application, mainWindow *gtk.ApplicationWindow, state *State) {
|
||||
debugWindow, err := gtk.ApplicationWindowNew(application)
|
||||
if err != nil {
|
||||
log.Fatal("Could not create application window.", err)
|
||||
}
|
||||
// Set ApplicationWindow Properties
|
||||
debugWindow.SetTitle("Sus App > Debug Settings")
|
||||
debugWindow.SetDefaultSize(350, 350)
|
||||
|
||||
layout, _ := gtk.LayoutNew(nil, nil)
|
||||
debugWindow.Add(layout)
|
||||
|
||||
newToggleButton(layout, 8, "Player Position", &state.Settings.Debug.PlayerPosition, state.SaveSettings)
|
||||
newToggleButton(layout, 50, "Player Collision", &state.Settings.Debug.PlayerCollision, state.SaveSettings)
|
||||
newToggleButton(layout, 92, "Map Collision", &state.Settings.Debug.MapCollision, state.SaveSettings)
|
||||
newToggleButton(layout, 134, "Disable Collision", &state.Settings.Debug.DisableCollision, state.SaveSettings)
|
||||
|
||||
debugWindow.ShowAll()
|
||||
}
|
||||
|
||||
func newToggleButton(layout *gtk.Layout, y int, text string, editablePointer *bool, saveSettings func() error) {
|
||||
btn, _ := gtk.ButtonNewWithLabel("[ ] " + text)
|
||||
layout.Put(btn, 8, y)
|
||||
btn.SetSizeRequest(334, 34)
|
||||
if *editablePointer {
|
||||
btn.SetLabel("[x] " + text)
|
||||
}
|
||||
btn.Connect("clicked", func(b *gtk.Button) {
|
||||
*editablePointer = !(*editablePointer)
|
||||
if *editablePointer {
|
||||
btn.SetLabel("[x] " + text)
|
||||
} else {
|
||||
btn.SetLabel("[ ] " + text)
|
||||
}
|
||||
saveSettings()
|
||||
})
|
||||
}
|
@ -25,6 +25,9 @@ func NewGameDataProcessor(sus *SusApp) *GameDataProcessor {
|
||||
0x02: proc.captureGameRPC,
|
||||
0x04: proc.captureGameSpawn,
|
||||
0x05: proc.captureGameDespawn,
|
||||
0x06: proc.emptyCapture,
|
||||
0x07: proc.emptyCapture,
|
||||
0xcd: proc.emptyCapture,
|
||||
}
|
||||
return proc
|
||||
}
|
||||
@ -41,6 +44,9 @@ func (proc *GameDataProcessor) receiveGameDataSubpacket(net *protocol.PacketHand
|
||||
}
|
||||
}
|
||||
|
||||
func (proc *GameDataProcessor) emptyCapture(net *protocol.PacketHandler, GameID int32, h *protocol.Hazel) {
|
||||
}
|
||||
|
||||
func (proc *GameDataProcessor) captureGameData(net *protocol.PacketHandler, GameID int32, h *protocol.Hazel) {
|
||||
a := &gamedata.DataH2G{}
|
||||
a.Read(h.GetUnderlyingPacket())
|
||||
@ -98,8 +104,13 @@ func (proc *GameDataProcessor) captureGameSpawn(net *protocol.PacketHandler, Gam
|
||||
b := &innernetobjects.PlayerControl{}
|
||||
b.Read(z.ComponentData.GetUnderlyingPacket(), true)
|
||||
var c innernetobjects.InnerNetObject = b
|
||||
if proc.sus.state.CurrentGame.NetObjects == nil {
|
||||
proc.sus.state.CurrentGame.NetObjects = make(map[uint32]*innernetobjects.InnerNetObject)
|
||||
}
|
||||
proc.sus.state.CurrentGame.NetObjects[netId] = &c
|
||||
y := &PlayerObject{}
|
||||
y.PlayerID = b.PlayerID
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerID[y.PlayerID] = y
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[netId] = y
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerClientID[a.OwnerID] = y
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerClientID[a.OwnerID].PlayerClientNetID = netId
|
||||
|
@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"codehub.onpointcoding.net/sean/go-susapp/gamedata"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/innernetobjects"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/protocol"
|
||||
)
|
||||
|
||||
@ -26,6 +27,10 @@ func NewGameRPCProcessor(sus *SusApp) *GameRPCProcessor {
|
||||
0x0a: proc.captureRpcSetSkin,
|
||||
0x11: proc.captureRpcSetPet,
|
||||
0x12: proc.captureRpcSetStartCounter,
|
||||
0x13: proc.captureRpcEnterVent,
|
||||
0x14: proc.captureRpcExitVent,
|
||||
0x15: proc.captureRpcSnapTo,
|
||||
0x1d: proc.captureRpcSetTasks,
|
||||
}
|
||||
return proc
|
||||
}
|
||||
@ -36,7 +41,7 @@ func (proc *GameRPCProcessor) receiveGameRpcCall(net *protocol.PacketHandler, Ga
|
||||
v(net, GameID, rpc)
|
||||
} else {
|
||||
fmt.Printf("Unable to parse gamedata rpc call with id of %x\n", rpc.RPCCallID)
|
||||
fmt.Printf("Packet: %v\n", hex.EncodeToString(rpc.UnderlyingHazel.GetUnderlyingPacket().Dump()))
|
||||
fmt.Printf("Packet: %v\n", hex.EncodeToString(rpc.GetUnderlyingHazel().GetUnderlyingPacket().Dump()))
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +51,7 @@ func (proc *GameRPCProcessor) captureRpcPlayAnimation(net *protocol.PacketHandle
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSyncSettings(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSyncSettings{}
|
||||
a.ReadFromPacket(rpc.UnderlyingHazel.GetUnderlyingPacket())
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
if a.Options.IsDefaults {
|
||||
proc.sus.state.CurrentGame.GameOptions = protocol.NewDefaultGameOptionsData()
|
||||
} else {
|
||||
@ -55,7 +60,11 @@ func (proc *GameRPCProcessor) captureRpcSyncSettings(net *protocol.PacketHandler
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSetInfected(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
|
||||
a := &gamedata.RpcSetInfected{}
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
for i := 0; i < len(a.Impostors); i++ {
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerID[a.Impostors[i]].IsImpostor = true
|
||||
}
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcExiled(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
@ -64,38 +73,70 @@ func (proc *GameRPCProcessor) captureRpcExiled(net *protocol.PacketHandler, Game
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSetName(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSetName{}
|
||||
a.ReadFromPacket(rpc.UnderlyingHazel.GetUnderlyingPacket())
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[rpc.SenderNetID].PlayerName = a.Name
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSetColor(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSetColor{}
|
||||
a.ReadFromPacket(rpc.UnderlyingHazel.GetUnderlyingPacket())
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[rpc.SenderNetID].PlayerColor = a.Color
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSetHat(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSetHat{}
|
||||
a.ReadFromPacket(rpc.UnderlyingHazel.GetUnderlyingPacket())
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[rpc.SenderNetID].PlayerHat = a.HatID
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSetSkin(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSetSkin{}
|
||||
a.ReadFromPacket(rpc.UnderlyingHazel.GetUnderlyingPacket())
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[rpc.SenderNetID].PlayerSkin = a.SkinID
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSetPet(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSetPet{}
|
||||
a.ReadFromPacket(rpc.UnderlyingHazel.GetUnderlyingPacket())
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[rpc.SenderNetID].PlayerPet = a.PetID
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSetStartCounter(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSetStartCounter{}
|
||||
a.ReadFromPacket(rpc.UnderlyingHazel.GetUnderlyingPacket())
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
if proc.sus.state.CurrentGame != nil {
|
||||
proc.sus.state.CurrentGame.StartGameTimer = a.TimeRemaining
|
||||
}
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcEnterVent(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcEnterVent{}
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[rpc.SenderNetID].InVent = true
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcExitVent(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcExitVent{}
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[rpc.SenderNetID].InVent = false
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSnapTo(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSnapTo{}
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
netId := proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[rpc.SenderNetID].PlayerNetworkTransform
|
||||
var c0 innernetobjects.InnerNetObject = *proc.sus.state.CurrentGame.NetObjects[netId]
|
||||
b, ok := c0.(*innernetobjects.PlayerNetworkTransform)
|
||||
if ok {
|
||||
b.TargetPosition = a.Position
|
||||
}
|
||||
}
|
||||
|
||||
func (proc *GameRPCProcessor) captureRpcSetTasks(net *protocol.PacketHandler, GameID int32, rpc *gamedata.Rpc) {
|
||||
a := &gamedata.RpcSetTasks{}
|
||||
a.ReadFromPacket(rpc.GetUnderlyingHazel().GetUnderlyingPacket())
|
||||
|
||||
if a.PlayerID == proc.sus.state.CurrentGame.GetMyPlayer().PlayerID {
|
||||
proc.sus.state.CurrentGame.MyTasks = a.Tasks
|
||||
}
|
||||
}
|
||||
|
3
go.mod
3
go.mod
@ -11,6 +11,8 @@ replace (
|
||||
codehub.onpointcoding.net/sean/go-susapp/protocol => ./src/protocol
|
||||
codehub.onpointcoding.net/sean/go-susapp/systemtypes => ./src/systemtypes
|
||||
codehub.onpointcoding.net/sean/go-susapp/util => ./src/util
|
||||
codehub.onpointcoding.net/sean/go-susapp/collision => ./src/collision
|
||||
|
||||
)
|
||||
|
||||
require (
|
||||
@ -22,5 +24,6 @@ require (
|
||||
codehub.onpointcoding.net/sean/go-susapp/systemtypes v1.0.0 // indirect
|
||||
codehub.onpointcoding.net/sean/go-susapp/util v1.0.0
|
||||
codehub.onpointcoding.net/sean/go-susapp/mapdata v1.0.0
|
||||
codehub.onpointcoding.net/sean/go-susapp/collision v1.0.0
|
||||
github.com/gotk3/gotk3 v0.6.1
|
||||
)
|
||||
|
@ -25,7 +25,7 @@ func (input *KeyInputHandler) keyPressEvent(win *gtk.ApplicationWindow, ev *gdk.
|
||||
input.state.TypedGameID = input.state.TypedGameID[:len(input.state.TypedGameID)-1]
|
||||
}
|
||||
}
|
||||
} else if input.state.Screen == enum.SCREEN_LOBBY {
|
||||
} else if input.state.Screen == enum.SCREEN_LOBBY || input.state.Screen == enum.SCREEN_INGAME {
|
||||
if k == gdk.KEY_W {
|
||||
input.state.HoldingUp = true
|
||||
}
|
||||
@ -45,7 +45,6 @@ func (input *KeyInputHandler) keyPressEvent(win *gtk.ApplicationWindow, ev *gdk.
|
||||
func (input *KeyInputHandler) keyReleaseEvent(win *gtk.ApplicationWindow, ev *gdk.Event) {
|
||||
keyEvent := gdk.EventKeyNewFromEvent(ev)
|
||||
k := gdk.KeyvalToUpper(keyEvent.KeyVal())
|
||||
if input.state.Screen == enum.SCREEN_LOBBY {
|
||||
if k == gdk.KEY_W {
|
||||
input.state.HoldingUp = false
|
||||
}
|
||||
@ -60,7 +59,6 @@ func (input *KeyInputHandler) keyReleaseEvent(win *gtk.ApplicationWindow, ev *gd
|
||||
}
|
||||
input.updateMovementDirections()
|
||||
}
|
||||
}
|
||||
|
||||
func (input *KeyInputHandler) updateMovementDirections() {
|
||||
input.state.MovementX = 0
|
||||
|
29
maprenderer.go
Normal file
29
maprenderer.go
Normal file
@ -0,0 +1,29 @@
|
||||
package main
|
||||
|
||||
import "codehub.onpointcoding.net/sean/go-susapp/enum"
|
||||
|
||||
func renderSkeld(r *Renderer) {
|
||||
renderVents(r, enum.VENTS_SKELD)
|
||||
}
|
||||
|
||||
func renderMira(r *Renderer) {
|
||||
renderVents(r, enum.VENTS_MIRA)
|
||||
}
|
||||
|
||||
func renderPolus(r *Renderer) {
|
||||
renderVents(r, enum.VENTS_POLUS)
|
||||
}
|
||||
|
||||
func renderAirship(r *Renderer) {
|
||||
renderVents(r, enum.VENTS_AIRSHIP)
|
||||
}
|
||||
|
||||
func renderVents(r *Renderer, vents map[byte]enum.VentData) {
|
||||
for _, vd := range vents {
|
||||
renderVent(r, &vd)
|
||||
}
|
||||
}
|
||||
|
||||
func renderVent(r *Renderer, vent *enum.VentData) {
|
||||
r.DrawBorderedRectangle(float64(vent.Coordinates.X-5), float64(vent.Coordinates.Y-5), 10, 10, 0xff000000, 0xff0000)
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"codehub.onpointcoding.net/sean/go-susapp/collision"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/enum"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/gamedata"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/innernetobjects"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/packets"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/protocol"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/util"
|
||||
)
|
||||
|
||||
type MovementProcessor struct {
|
||||
@ -13,7 +15,7 @@ type MovementProcessor struct {
|
||||
}
|
||||
|
||||
func (proc *MovementProcessor) Tick(delta int64) {
|
||||
if proc.sus.state.CurrentGame != nil && proc.sus.networkHandler != nil {
|
||||
if proc.sus.state.CurrentGame != nil && proc.sus.state.CurrentGame.NetObjects != nil && proc.sus.networkHandler != nil {
|
||||
p := protocol.NewEmptyPacket()
|
||||
cp, ok := proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID[proc.sus.state.CurrentGame.ClientPlayerNetID]
|
||||
if ok {
|
||||
@ -29,6 +31,11 @@ func (proc *MovementProcessor) Tick(delta int64) {
|
||||
if !nextVelocityZero || prevVelocityZero != nextVelocityZero {
|
||||
a.TargetPosition.X += a.TargetVelocity.X * (float32(delta) / 1000)
|
||||
a.TargetPosition.Y -= a.TargetVelocity.Y * (float32(delta) / 1000)
|
||||
proc.sus.state.PosX = a.TargetPosition.X
|
||||
proc.sus.state.PosY = a.TargetPosition.Y
|
||||
if !proc.sus.state.Settings.Debug.DisableCollision {
|
||||
proc.ProcessCollision(&a.TargetPosition)
|
||||
}
|
||||
c0.Write(p, false)
|
||||
var c1 protocol.UpdateComponent = protocol.UpdateComponent{NetID: netId, RawData: p}
|
||||
var c2 packets.GameDataSubpacket = &gamedata.DataH2G{Component: &c1}
|
||||
@ -39,3 +46,42 @@ func (proc *MovementProcessor) Tick(delta int64) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (proc *MovementProcessor) ProcessCollision(p *util.Vec2) {
|
||||
a := util.NewVec2(p.X, p.Y+enum.PLAYER_COLLISION_OFFSET_Y)
|
||||
if proc.sus.state.Collision != nil {
|
||||
for _, item := range *proc.sus.state.Collision {
|
||||
_, a = proc.ProcessPolygonCollision(a, item)
|
||||
}
|
||||
}
|
||||
(*p) = util.NewVec2(a.X, a.Y-enum.PLAYER_COLLISION_OFFSET_Y)
|
||||
}
|
||||
|
||||
func (proc *MovementProcessor) ProcessPolygonCollision(p util.Vec2, item []util.Vec2) (bool, util.Vec2) {
|
||||
lastPoint := util.Vec2{}
|
||||
y := false
|
||||
for i, point := range item {
|
||||
if i != 0 {
|
||||
yes, closest := collision.CollisionLineCircle(lastPoint, point, p, enum.PLAYER_COLLISION_RADIUS)
|
||||
if yes {
|
||||
p = proc.CalculatePlayerRejectPosition(closest, p, enum.PLAYER_COLLISION_RADIUS)
|
||||
y = true
|
||||
}
|
||||
}
|
||||
lastPoint = point
|
||||
}
|
||||
for _, point := range item {
|
||||
yes := collision.CollisionPointCircle(point, p, enum.PLAYER_COLLISION_RADIUS)
|
||||
if yes {
|
||||
p = proc.CalculatePlayerRejectPosition(point, p, enum.PLAYER_COLLISION_RADIUS)
|
||||
}
|
||||
}
|
||||
return y, p
|
||||
}
|
||||
|
||||
func (proc *MovementProcessor) CalculatePlayerRejectPosition(a util.Vec2, b util.Vec2, dt float32) util.Vec2 {
|
||||
c := util.NewVec2(b.X-a.X, b.Y-a.Y)
|
||||
d := util.Sqrt32((c.X * c.X) + (c.Y * c.Y))
|
||||
t := dt / d
|
||||
return util.NewVec2(((1-t)*a.X + t*b.X), ((1-t)*a.Y + t*b.Y))
|
||||
}
|
||||
|
19
overlayrenderer.go
Normal file
19
overlayrenderer.go
Normal file
@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import "codehub.onpointcoding.net/sean/go-susapp/enum"
|
||||
|
||||
var taskMapTypeMapped = map[byte]map[byte]enum.TaskData{
|
||||
enum.MAP_THE_SKELD: enum.TASKS_SKELD,
|
||||
enum.MAP_MIRA_HQ: enum.TASKS_MIRA,
|
||||
enum.MAP_POLUS: enum.TASKS_POLUS,
|
||||
enum.MAP_THE_AIRSHIP: enum.TASKS_AIRSHIP,
|
||||
}
|
||||
|
||||
func renderTaskOverlay(r *Renderer) {
|
||||
if r.state.CurrentGame.MyTasks != nil {
|
||||
mapped := taskMapTypeMapped[r.state.CurrentGame.MapType]
|
||||
for i, item := range r.state.CurrentGame.MyTasks {
|
||||
r.DrawText(0, float64(40+20*i), mapped[item].Text, defaultRenderFont, 10, 0xffffff)
|
||||
}
|
||||
}
|
||||
}
|
@ -26,6 +26,9 @@ func NewPacketProcessor(sus *SusApp) *PacketProcessor {
|
||||
0x06: proc.captureUnreliableGameDataTo,
|
||||
}
|
||||
proc.reliablePacketTagMap = map[byte]func(net *protocol.PacketHandler, nonce uint16, h *protocol.Hazel){
|
||||
0x00: proc.captureCreateGame,
|
||||
0x01: proc.emptyCapture,
|
||||
0x02: proc.captureStartGame,
|
||||
0x04: proc.captureRemovePlayer,
|
||||
0x05: proc.captureGameDataAll,
|
||||
0x06: proc.captureGameDataTo,
|
||||
@ -61,6 +64,34 @@ func (proc *PacketProcessor) receiveReliablePacket(net *protocol.PacketHandler,
|
||||
}
|
||||
}
|
||||
|
||||
func (proc *PacketProcessor) emptyCapture(net *protocol.PacketHandler, nonce uint16, h *protocol.Hazel) {
|
||||
}
|
||||
|
||||
func (proc *PacketProcessor) captureCreateGame(net *protocol.PacketHandler, nonce uint16, h *protocol.Hazel) {
|
||||
a := &packets.HostGameS2C{}
|
||||
a.Read(h.GetUnderlyingPacket())
|
||||
|
||||
proc.sus.state.TypedGameID = util.CodeFromGameID(a.GameID)
|
||||
var z protocol.HazelPayload = &packets.JoinGameC2S{GameID: a.GameID}
|
||||
proc.sus.networkHandler.SendReliablePacket(proc.sus.networkHandler.GetNonce(), []*protocol.Hazel{
|
||||
protocol.NewHazelFromPayload(&z),
|
||||
})
|
||||
}
|
||||
|
||||
func (proc *PacketProcessor) captureStartGame(net *protocol.PacketHandler, nonce uint16, h *protocol.Hazel) {
|
||||
a := &packets.StartGameH2G{}
|
||||
a.Read(h.GetUnderlyingPacket())
|
||||
|
||||
if a.GameID == proc.sus.state.CurrentGame.GameID {
|
||||
proc.sus.state.Screen = enum.SCREEN_INGAME
|
||||
proc.sus.state.LoadCollisionForMap(proc.sus.state.CurrentGame.GameOptions.Maps)
|
||||
|
||||
var d1 packets.GameDataSubpacket = &gamedata.ReadyC2H{ReadyClientID: proc.sus.state.CurrentGame.ClientID}
|
||||
var d2 protocol.HazelPayload = packets.NewGameDataToSingleSubpacket(proc.sus.state.CurrentGame.GameID, proc.sus.state.CurrentGame.HostClientID, &d1)
|
||||
net.SendReliablePacket(proc.sus.networkHandler.GetNonce(), []*protocol.Hazel{protocol.NewHazelFromPayload(&d2)})
|
||||
}
|
||||
}
|
||||
|
||||
func (proc *PacketProcessor) captureGameDataAll(net *protocol.PacketHandler, nonce uint16, h *protocol.Hazel) {
|
||||
a := &packets.GameDataAll{}
|
||||
a.Read(h.GetUnderlyingPacket())
|
||||
@ -100,7 +131,6 @@ func (proc *PacketProcessor) captureJoinedGame(net *protocol.PacketHandler, nonc
|
||||
GameID: a.GameID,
|
||||
ClientID: a.JoinedClientID,
|
||||
HostClientID: a.HostClientID,
|
||||
OtherClientIDs: make([]uint32, len(a.OtherClientIDs)),
|
||||
GamePrivacy: 0,
|
||||
GameOptions: protocol.NewDefaultGameOptionsData(),
|
||||
NetObjects: map[uint32]*innernetobjects.InnerNetObject{},
|
||||
@ -108,10 +138,9 @@ func (proc *PacketProcessor) captureJoinedGame(net *protocol.PacketHandler, nonc
|
||||
}
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerClientID = map[uint32]*PlayerObject{}
|
||||
proc.sus.state.CurrentGame.PlayerNetObjects.ByPlayerNetID = map[uint32]*PlayerObject{}
|
||||
for j := 0; j < len(a.OtherClientIDs); j++ {
|
||||
proc.sus.state.CurrentGame.OtherClientIDs[j] = a.OtherClientIDs[j]
|
||||
}
|
||||
proc.sus.state.CurrentGame.OtherClientIDs = a.OtherClientIDs
|
||||
proc.sus.state.Screen = enum.SCREEN_LOBBY
|
||||
proc.sus.state.LoadCollision("lobby")
|
||||
|
||||
// Send platform
|
||||
var b1 packets.GameDataSubpacket = &gamedata.ClientInfoC2S{
|
||||
@ -164,9 +193,11 @@ func (proc *PacketProcessor) captureRedirect(net *protocol.PacketHandler, nonce
|
||||
func (proc *PacketProcessor) captureRemovePlayer(net *protocol.PacketHandler, nonce uint16, h *protocol.Hazel) {
|
||||
a := &packets.RemovePlayerS2G{}
|
||||
a.Read(h.GetUnderlyingPacket())
|
||||
if proc.sus.state.CurrentGame != nil {
|
||||
if a.GameID == proc.sus.state.CurrentGame.GameID && a.HostClientID == proc.sus.state.CurrentGame.ClientID {
|
||||
fmt.Println("Host player disconnect and left me in charge")
|
||||
fmt.Println("Host player disconnected and left me in charge")
|
||||
fmt.Println("I can't host a game so I'm disconnecting too")
|
||||
net.SendNormalDisconnectPacket()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
168
renderer.go
168
renderer.go
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -47,6 +48,27 @@ func (r *Renderer) Draw(da *gtk.DrawingArea, cr *cairo.Context) {
|
||||
// Version numbers
|
||||
r.DrawText(10, 10, versionText, "Noto Sans Display", 16, 0xffffff)
|
||||
|
||||
if r.state.Screen == enum.SCREEN_LOBBY || r.state.Screen == enum.SCREEN_INGAME {
|
||||
r.DrawButton(r.w-60, 20, 40, 40, "⚙", defaultRenderFont, 16)
|
||||
|
||||
r.DrawPlayers(r.state.Settings.Debug.PlayerPosition, r.state.Settings.Debug.PlayerCollision)
|
||||
if r.state.Settings.Debug.MapCollision {
|
||||
r.DrawCollision()
|
||||
}
|
||||
|
||||
if r.state.IsLobbyMenuOpen {
|
||||
mw := r.w / 2
|
||||
mh := r.h / 2
|
||||
overlayBottom := mh + 200
|
||||
|
||||
r.DrawFilledRectangle(0, 0, r.w, r.h, 0x80000000)
|
||||
r.DrawFilledRoundedRectangle(mw-200, mh-200, 400, 400, 1, 20, 0x000000)
|
||||
|
||||
r.DrawButton((r.w-200)/2, overlayBottom-60, 200, 40, "Return to Game", defaultRenderFont, 16)
|
||||
r.DrawButton((r.w-200)/2, overlayBottom-120, 200, 40, "Leave Game", defaultRenderFont, 16)
|
||||
}
|
||||
}
|
||||
|
||||
if r.state.Screen == enum.SCREEN_TITLE {
|
||||
colorLen := enum.GetPlayerTotalColors()
|
||||
for i := 0; i < colorLen; i++ {
|
||||
@ -74,27 +96,13 @@ func (r *Renderer) Draw(da *gtk.DrawingArea, cr *cairo.Context) {
|
||||
r.DrawFilledRoundedRectangle(mw+50*math.Sin(d)-20, mh+50*math.Cos(d)-20, 40, 40, 1, 20, 0xffffff)
|
||||
} else if r.state.Screen == enum.SCREEN_LOBBY {
|
||||
r.DrawButton((r.w-100)/2, r.h-60, 100, 40, util.CodeFromGameID(r.state.CurrentGame.GameID), defaultRenderFont, 16)
|
||||
r.DrawButton(r.w-60, 20, 40, 40, "⚙", defaultRenderFont, 16)
|
||||
|
||||
if r.state.CurrentGame.GamePrivacy == 1 {
|
||||
r.DrawButton((r.w-100)/2+120, r.h-60, 100, 40, "Public", defaultRenderFont, 16)
|
||||
} else if r.state.CurrentGame.GamePrivacy == 0 {
|
||||
r.DrawButton((r.w-100)/2+120, r.h-60, 100, 40, "Private", defaultRenderFont, 16)
|
||||
}
|
||||
|
||||
r.DrawPlayers()
|
||||
|
||||
if r.state.IsLobbyMenuOpen {
|
||||
mw := r.w / 2
|
||||
mh := r.h / 2
|
||||
overlayBottom := mh + 200
|
||||
|
||||
r.DrawFilledRectangle(0, 0, r.w, r.h, 0x80000000)
|
||||
r.DrawFilledRoundedRectangle(mw-200, mh-200, 400, 400, 1, 20, 0x000000)
|
||||
|
||||
r.DrawButton((r.w-200)/2, overlayBottom-60, 200, 40, "Return to Game", defaultRenderFont, 16)
|
||||
r.DrawButton((r.w-200)/2, overlayBottom-120, 200, 40, "Leave Game", defaultRenderFont, 16)
|
||||
}
|
||||
r.DrawMiddleText(r.w/2, r.h-80, fmt.Sprint(r.state.CurrentGame.StartGameTimer), defaultRenderFont, 16, 0xffffff)
|
||||
} else if r.state.Screen == enum.SCREEN_ERROR {
|
||||
mw := r.w / 2
|
||||
mh := r.h / 2
|
||||
@ -107,6 +115,18 @@ func (r *Renderer) Draw(da *gtk.DrawingArea, cr *cairo.Context) {
|
||||
} else {
|
||||
r.DrawWrappedText(mw-190, mh-156, 380, enum.DisconnectMessageText(r.state.DisconnectReason), defaultRenderFont, 16, 0xffffff)
|
||||
}
|
||||
} else if r.state.Screen == enum.SCREEN_INGAME {
|
||||
switch r.state.CurrentGame.MapType {
|
||||
case enum.MAP_THE_SKELD:
|
||||
renderSkeld(r)
|
||||
case enum.MAP_MIRA_HQ:
|
||||
renderMira(r)
|
||||
case enum.MAP_POLUS:
|
||||
renderPolus(r)
|
||||
case enum.MAP_THE_AIRSHIP:
|
||||
renderAirship(r)
|
||||
}
|
||||
renderTaskOverlay(r)
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,16 +138,31 @@ func (r *Renderer) SetHex(hex int) {
|
||||
r.SetRGB((hex/(256*256))%256, (hex/256)%256, hex%256, (hex/(256*256*256))%256)
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawLine(x1 float64, y1 float64, x2 float64, y2 float64, color int) {
|
||||
r.cr.Save()
|
||||
r.SetHex(color)
|
||||
r.cr.NewPath()
|
||||
r.cr.MoveTo(x1, y1)
|
||||
r.cr.LineTo(x2, y2)
|
||||
r.cr.ClosePath()
|
||||
r.cr.Stroke()
|
||||
r.cr.Restore()
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawRectangle(x float64, y float64, w float64, h float64, color int) {
|
||||
r.cr.Save()
|
||||
r.SetHex(color)
|
||||
r.cr.Rectangle(x, y, w, h)
|
||||
r.cr.Stroke()
|
||||
r.cr.Restore()
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawFilledRectangle(x float64, y float64, w float64, h float64, color int) {
|
||||
r.cr.Save()
|
||||
r.SetHex(color)
|
||||
r.cr.Rectangle(x, y, w, h)
|
||||
r.cr.Fill()
|
||||
r.cr.Restore()
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawBorderedRectangle(x float64, y float64, w float64, h float64, color int, border int) {
|
||||
@ -136,6 +171,7 @@ func (r *Renderer) DrawBorderedRectangle(x float64, y float64, w float64, h floa
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawRoundedRectangle(x float64, y float64, w float64, h float64, aspect float64, corner_radius float64, color int) {
|
||||
r.cr.Save()
|
||||
a := corner_radius / aspect
|
||||
d := math.Pi / 180
|
||||
r.cr.NewPath()
|
||||
@ -146,9 +182,11 @@ func (r *Renderer) DrawRoundedRectangle(x float64, y float64, w float64, h float
|
||||
r.cr.ClosePath()
|
||||
r.SetHex(color)
|
||||
r.cr.Stroke()
|
||||
r.cr.Restore()
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawFilledRoundedRectangle(x float64, y float64, w float64, h float64, aspect float64, corner_radius float64, color int) {
|
||||
r.cr.Save()
|
||||
a := corner_radius / aspect
|
||||
d := math.Pi / 180
|
||||
r.cr.NewPath()
|
||||
@ -159,9 +197,11 @@ func (r *Renderer) DrawFilledRoundedRectangle(x float64, y float64, w float64, h
|
||||
r.cr.ClosePath()
|
||||
r.SetHex(color)
|
||||
r.cr.FillPreserve()
|
||||
r.cr.Restore()
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawBorderedRoundedRectangle(x float64, y float64, w float64, h float64, aspect float64, corner_radius float64, color int, border int) {
|
||||
r.cr.Save()
|
||||
a := corner_radius / aspect
|
||||
d := math.Pi / 180
|
||||
r.cr.NewPath()
|
||||
@ -174,6 +214,7 @@ func (r *Renderer) DrawBorderedRoundedRectangle(x float64, y float64, w float64,
|
||||
r.cr.FillPreserve()
|
||||
r.SetHex(border)
|
||||
r.cr.Stroke()
|
||||
r.cr.Restore()
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawText(x float64, y float64, text string, fontFamily string, fontSize float64, color int) {
|
||||
@ -190,6 +231,44 @@ func (r *Renderer) DrawText(x float64, y float64, text string, fontFamily string
|
||||
pango.CairoShowLayout(r.cr, layout)
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawMiddleText(x float64, y float64, text string, fontFamily string, fontSize float64, color int) {
|
||||
layout := pango.CairoCreateLayout(r.cr)
|
||||
font := pango.FontDescriptionFromString("sans normal 16")
|
||||
font.SetFamily(fontFamily)
|
||||
|
||||
layout.SetFontDescription(font)
|
||||
layout.SetText(text, len(text))
|
||||
|
||||
textWidth, textHeight := layout.GetSize()
|
||||
textWidth /= pango.SCALE
|
||||
textHeight /= pango.SCALE
|
||||
|
||||
r.SetHex(0xffffff)
|
||||
r.cr.MoveTo(x-float64(textWidth)/2, y-float64(textHeight)/2)
|
||||
pango.CairoUpdateLayout(r.cr, layout)
|
||||
pango.CairoShowLayout(r.cr, layout)
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawCircle(x float64, y float64, radius float64, color int) {
|
||||
r.cr.Save()
|
||||
r.SetHex(color)
|
||||
r.cr.NewPath()
|
||||
r.cr.Arc(x, y, radius, 0, 2*math.Pi)
|
||||
r.cr.ClosePath()
|
||||
r.cr.FillPreserve()
|
||||
r.cr.Restore()
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawBorderedCircle(x float64, y float64, radius float64, color int) {
|
||||
r.cr.Save()
|
||||
r.SetHex(color)
|
||||
r.cr.NewPath()
|
||||
r.cr.Arc(x, y, radius, 0, 2*math.Pi)
|
||||
r.cr.ClosePath()
|
||||
r.cr.Stroke()
|
||||
r.cr.Restore()
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawWrappedText(x float64, y float64, w float64, text string, fontFamily string, fontSize float64, color int) {
|
||||
layout := pango.CairoCreateLayout(r.cr)
|
||||
layout.SetWidth(int(w) * pango.SCALE)
|
||||
@ -259,15 +338,60 @@ func (r *Renderer) DrawTextInput(x float64, y float64, w float64, h float64, tex
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawPlayers() {
|
||||
func (r *Renderer) DrawPlayers(debugPosition bool, debugCollision bool) {
|
||||
meImpostor := r.state.CurrentGame.GetMyPlayer().IsImpostor
|
||||
for _, item := range r.state.CurrentGame.PlayerNetObjects.ByPlayerClientID {
|
||||
var t innernetobjects.InnerNetObject = *r.state.CurrentGame.NetObjects[item.PlayerNetworkTransform]
|
||||
a, ok := t.(*innernetobjects.PlayerNetworkTransform)
|
||||
if item.InVent {
|
||||
continue
|
||||
}
|
||||
var t *innernetobjects.InnerNetObject = r.state.CurrentGame.NetObjects[item.PlayerNetworkTransform]
|
||||
if t != nil {
|
||||
a, ok := (*t).(*innernetobjects.PlayerNetworkTransform)
|
||||
if ok {
|
||||
x := r.w/2 + float64(a.TargetPosition.X)*50
|
||||
y := r.h/2 - float64(a.TargetPosition.Y)*50
|
||||
r.DrawFilledRectangle(float64(x-5), float64(y-5), 10, 10, enum.GetPlayerMainColor(int(item.PlayerColor)))
|
||||
r.DrawText(x, y, strconv.FormatFloat(float64(a.TargetPosition.X), 'e', 4, 64)+strconv.FormatFloat(float64(a.TargetPosition.Y), 'e', 4, 64), defaultRenderFont, 10, 0xffffff)
|
||||
b := r.ConvertToDisplayVec2(a.TargetPosition)
|
||||
if debugCollision {
|
||||
e := util.NewVec2(a.TargetPosition.X, a.TargetPosition.Y+enum.PLAYER_COLLISION_OFFSET_Y)
|
||||
f := r.ConvertToDisplayVec2(e)
|
||||
r.DrawBorderedCircle(float64(f.X), float64(f.Y), enum.PLAYER_COLLISION_RADIUS*50, 0xff0000)
|
||||
}
|
||||
r.DrawCircle(float64(b.X), float64(b.Y), 5, enum.GetPlayerMainColor(int(item.PlayerColor)))
|
||||
|
||||
fontColor := 0xffffff
|
||||
if meImpostor && item.IsImpostor {
|
||||
fontColor = 0x7a0838
|
||||
}
|
||||
r.DrawText(float64(b.X), float64(b.Y), item.PlayerName, defaultRenderFont, 10, fontColor)
|
||||
|
||||
if debugPosition {
|
||||
r.DrawText(float64(b.X), float64(b.Y-34), fmt.Sprintf("%v, %v", a.TargetPosition.X, a.TargetPosition.Y), defaultRenderFont, 10, 0xffffff)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawCollision() {
|
||||
if r.state.Collision != nil {
|
||||
for _, item := range *r.state.Collision {
|
||||
lastPoint := util.Vec2{}
|
||||
for i, point := range item {
|
||||
if i != 0 {
|
||||
r.DrawCollisionLine(lastPoint, point, 0x00ff00)
|
||||
}
|
||||
lastPoint = point
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (r *Renderer) DrawCollisionLine(a util.Vec2, b util.Vec2, color int) {
|
||||
c := r.ConvertToDisplayVec2(a)
|
||||
d := r.ConvertToDisplayVec2(b)
|
||||
r.DrawLine(float64(c.X), float64(c.Y), float64(d.X), float64(d.Y), color)
|
||||
}
|
||||
|
||||
func (r *Renderer) ConvertToDisplayVec2(vec2 util.Vec2) util.Vec2 {
|
||||
x := r.w/2 - float64(r.state.PosX)*50 + float64(vec2.X)*50
|
||||
y := r.h/2 + float64(r.state.PosY)*50 - float64(vec2.Y)*50
|
||||
return util.Vec2{X: float32(x), Y: float32(y)}
|
||||
}
|
||||
|
14
settings.go
14
settings.go
@ -13,6 +13,14 @@ type SettingsJSON struct {
|
||||
ServerPort int64 `json:"ServerPort"`
|
||||
Language uint32 `json:"Language"`
|
||||
QuickChatMode byte `json:"QuickChatMode"`
|
||||
Debug DebugJSON `json:"Debug"`
|
||||
}
|
||||
|
||||
type DebugJSON struct {
|
||||
PlayerPosition bool `json:"PlayerPosition"`
|
||||
PlayerCollision bool `json:"PlayerCollision"`
|
||||
MapCollision bool `json:"MapCollision"`
|
||||
DisableCollision bool `json:"DisableCollision"`
|
||||
}
|
||||
|
||||
func UnmarshalSettings(data []byte) (SettingsJSON, error) {
|
||||
@ -33,5 +41,11 @@ func NewDefaultSettingsJSON() SettingsJSON {
|
||||
ServerPort: 22023,
|
||||
Language: enum.GAMEKEYWORD_ALL,
|
||||
QuickChatMode: enum.QUICK_CHAT_ONLY,
|
||||
Debug: DebugJSON{
|
||||
PlayerPosition: false,
|
||||
PlayerCollision: false,
|
||||
MapCollision: false,
|
||||
DisableCollision: false,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,13 @@ func openSettingsWindow(application *gtk.Application, mainWindow *gtk.Applicatio
|
||||
state.SaveSettings()
|
||||
})
|
||||
|
||||
debugBtn, _ := gtk.ButtonNewWithLabel("Debug")
|
||||
layout.Put(debugBtn, 8, 260)
|
||||
debugBtn.SetSizeRequest(334, 34)
|
||||
debugBtn.Connect("clicked", func(b *gtk.Button) {
|
||||
openDebugSettingsWindow(application, mainWindow, state)
|
||||
})
|
||||
|
||||
optWindow.ShowAll()
|
||||
}
|
||||
|
||||
|
1735
src/collision/assets/airship.json
Normal file
1735
src/collision/assets/airship.json
Normal file
File diff suppressed because it is too large
Load Diff
34
src/collision/assets/lobby.json
Normal file
34
src/collision/assets/lobby.json
Normal file
@ -0,0 +1,34 @@
|
||||
[
|
||||
[
|
||||
{ "x": 2.462232, "y": -0.7328739 },
|
||||
{ "x": -2.329295, "y": -0.7900157 },
|
||||
{ "x": -2.731057, "y": -0.2632411 },
|
||||
{ "x": -2.701691, "y": 2.324046 },
|
||||
{ "x": -1.033857, "y": 2.998891 },
|
||||
{ "x": 1.180829, "y": 3.004922 },
|
||||
{ "x": 2.809417, "y": 2.336571 },
|
||||
{ "x": 2.814456, "y": -0.2378364 },
|
||||
{ "x": 2.448293, "y": -0.7521003 }
|
||||
],
|
||||
[
|
||||
{ "x": -1.428167, "y": 0.6019696 },
|
||||
{ "x": -2.085, "y": 0.31 },
|
||||
{ "x": -1.645951, "y": -0.1078099 },
|
||||
{ "x": -0.935, "y": 0.16 },
|
||||
{ "x": -1.428167, "y": 0.6019696 }
|
||||
],
|
||||
[
|
||||
{ "x": 1.688167, "y": 1.19197 },
|
||||
{ "x": 2.345, "y": 0.9 },
|
||||
{ "x": 1.905951, "y": 0.4821901 },
|
||||
{ "x": 1.195, "y": 0.75 },
|
||||
{ "x": 1.688167, "y": 1.19197 }
|
||||
],
|
||||
[
|
||||
{ "x": -1.0409, "y": 2.095182 },
|
||||
{ "x": -1.435, "y": 1.92 },
|
||||
{ "x": -1.171571, "y": 1.669314 },
|
||||
{ "x": -0.745, "y": 1.83 },
|
||||
{ "x": -1.0409, "y": 2.095182 }
|
||||
]
|
||||
]
|
621
src/collision/assets/mira.json
Normal file
621
src/collision/assets/mira.json
Normal file
@ -0,0 +1,621 @@
|
||||
[
|
||||
[
|
||||
{ "x": 3.71337, "y": -2.238192 },
|
||||
{ "x": 3.687777, "y": -2.593762 },
|
||||
{ "x": -6.192677, "y": -2.624138 },
|
||||
{ "x": -6.184436, "y": -0.03365517 },
|
||||
{ "x": -6.713911, "y": 0.02841848 },
|
||||
{ "x": -6.665236, "y": 4.055113 },
|
||||
{ "x": -2.499738, "y": 4.00852 },
|
||||
{ "x": -2.52292, "y": 3.110758 },
|
||||
{ "x": -2.509094, "y": 2.238056 },
|
||||
{ "x": -2.771595, "y": 2.170679 },
|
||||
{ "x": -2.80248, "y": -0.7535518 },
|
||||
{ "x": 3.695479, "y": -0.6665705 }
|
||||
],
|
||||
[
|
||||
{ "x": 7.211442, "y": 2.161355 },
|
||||
{ "x": 8.762964, "y": 2.16075 },
|
||||
{ "x": 8.751773, "y": 5.226181 },
|
||||
{ "x": 11.12137, "y": 5.24228 },
|
||||
{ "x": 11.12562, "y": 4.513843 },
|
||||
{ "x": 11.26416, "y": 4.509835 },
|
||||
{ "x": 11.25983, "y": 5.654586 }
|
||||
],
|
||||
[
|
||||
{ "x": 3.695692, "y": -2.227394 },
|
||||
{ "x": 13.57364, "y": -2.236449 },
|
||||
{ "x": 13.57352, "y": -0.3868256 },
|
||||
{ "x": 13.71494, "y": -0.3952844 },
|
||||
{ "x": 13.70653, "y": -2.223386 },
|
||||
{ "x": 17.07831, "y": -2.222195 },
|
||||
{ "x": 17.08636, "y": 1.597083 },
|
||||
{ "x": 13.69615, "y": 1.581925 },
|
||||
{ "x": 13.68949, "y": 0.692555 },
|
||||
{ "x": 13.57186, "y": 0.69209 },
|
||||
{ "x": 13.56429, "y": 3.41575 },
|
||||
{ "x": 13.7098, "y": 3.405168 },
|
||||
{ "x": 13.69926, "y": 2.460877 },
|
||||
{ "x": 16.67167, "y": 2.455469 },
|
||||
{ "x": 16.67134, "y": 5.129327 },
|
||||
{ "x": 16.25138, "y": 4.924525 },
|
||||
{ "x": 15.90153, "y": 5.098832 },
|
||||
{ "x": 14.85329, "y": 5.113066 },
|
||||
{ "x": 14.64129, "y": 4.891927 },
|
||||
{ "x": 14.30725, "y": 5.120798 },
|
||||
{ "x": 14.09058, "y": 5.117527 },
|
||||
{ "x": 14.05816, "y": 5.476541 },
|
||||
{ "x": 13.71774, "y": 5.463151 },
|
||||
{ "x": 13.71342, "y": 4.504309 },
|
||||
{ "x": 13.56084, "y": 4.517361 },
|
||||
{ "x": 13.55398, "y": 5.708665 }
|
||||
],
|
||||
[
|
||||
{ "x": 3.680702, "y": -0.7193847 },
|
||||
{ "x": 11.23482, "y": -0.7322021 },
|
||||
{ "x": 11.25548, "y": 3.415659 },
|
||||
{ "x": 11.12786, "y": 3.419772 },
|
||||
{ "x": 10.75617, "y": 3.248261 },
|
||||
{ "x": 10.73357, "y": 0.1335044 },
|
||||
{ "x": 3.80519, "y": 0.1373074 },
|
||||
{ "x": 3.818368, "y": 2.171448 },
|
||||
{ "x": 4.95494, "y": 2.163688 }
|
||||
],
|
||||
[
|
||||
{ "x": 24.3919, "y": 5.646832 },
|
||||
{ "x": 24.40391, "y": 5.442618 },
|
||||
{ "x": 29.13271, "y": 5.463554 },
|
||||
{ "x": 29.13235, "y": -0.5738076 },
|
||||
{ "x": 26.70813, "y": -0.5683059 },
|
||||
{ "x": 26.73149, "y": -1.518903 },
|
||||
{ "x": 26.95974, "y": -1.376958 },
|
||||
{ "x": 28.65404, "y": -1.375125 },
|
||||
{ "x": 28.65683, "y": -2.748982 },
|
||||
{ "x": 20.33384, "y": -2.765088 },
|
||||
{ "x": 20.3395, "y": -3.770453 },
|
||||
{ "x": 17.93382, "y": -3.75399 },
|
||||
{ "x": 17.96961, "y": -1.380442 },
|
||||
{ "x": 20.87004, "y": -1.529158 },
|
||||
{ "x": 20.88352, "y": -0.57613 },
|
||||
{ "x": 17.95704, "y": -0.5691274 },
|
||||
{ "x": 17.97062, "y": 0.8038477 },
|
||||
{ "x": 18.93854, "y": 0.7800388 },
|
||||
{ "x": 18.93254, "y": 1.598521 },
|
||||
{ "x": 17.98071, "y": 1.602374 },
|
||||
{ "x": 17.96151, "y": 5.457216 },
|
||||
{ "x": 22.08923, "y": 5.464901 }
|
||||
],
|
||||
[
|
||||
{ "x": 21.05723, "y": 5.580141 },
|
||||
{ "x": 21.04314, "y": 1.607991 },
|
||||
{ "x": 20.09641, "y": 1.596745 },
|
||||
{ "x": 20.0989, "y": 0.7935047 },
|
||||
{ "x": 21.20391, "y": 0.7903333 },
|
||||
{ "x": 21.19257, "y": 5.576942 }
|
||||
],
|
||||
[
|
||||
{ "x": 11.25491, "y": 5.620545 },
|
||||
{ "x": 11.25136, "y": 7.638169 },
|
||||
{ "x": 12.73018, "y": 7.648466 },
|
||||
{ "x": 16.70739, "y": 11.60392 },
|
||||
{ "x": 16.70363, "y": 15.95111 }
|
||||
],
|
||||
[
|
||||
{ "x": 13.56464, "y": 5.627538 },
|
||||
{ "x": 13.55336, "y": 6.262187 },
|
||||
{ "x": 17.82847, "y": 10.52911 }
|
||||
],
|
||||
[
|
||||
{ "x": 22.0916, "y": 5.628248 },
|
||||
{ "x": 22.10105, "y": 6.269244 },
|
||||
{ "x": 17.82738, "y": 10.53223 }
|
||||
],
|
||||
[
|
||||
{ "x": 18.96374, "y": 15.99181 },
|
||||
{ "x": 18.95209, "y": 11.60822 },
|
||||
{ "x": 22.92673, "y": 7.648565 },
|
||||
{ "x": 23.77438, "y": 7.633254 },
|
||||
{ "x": 24.39512, "y": 7.429035 },
|
||||
{ "x": 24.40486, "y": 5.632056 }
|
||||
],
|
||||
[
|
||||
{ "x": 7.220767, "y": 8.833663 },
|
||||
{ "x": 7.22247, "y": 13.32097 },
|
||||
{ "x": 7.355358, "y": 13.31475 },
|
||||
{ "x": 7.347641, "y": 9.647293 },
|
||||
{ "x": 12.08101, "y": 9.675213 },
|
||||
{ "x": 12.10811, "y": 14.14455 },
|
||||
{ "x": 7.977394, "y": 14.13185 },
|
||||
{ "x": 7.965653, "y": 14.56834 },
|
||||
{ "x": 5.895285, "y": 14.56914 },
|
||||
{ "x": 5.340263, "y": 13.75509 },
|
||||
{ "x": 4.994918, "y": 13.86703 },
|
||||
{ "x": 4.97183, "y": 10.77085 },
|
||||
{ "x": 4.854324, "y": 10.77326 },
|
||||
{ "x": 4.82991, "y": 14.37352 },
|
||||
{ "x": 3.731284, "y": 14.37308 },
|
||||
{ "x": 2.88799, "y": 13.48531 },
|
||||
{ "x": 2.05535, "y": 13.47907 },
|
||||
{ "x": 1.203818, "y": 14.39449 },
|
||||
{ "x": 0.08164263, "y": 14.39737 },
|
||||
{ "x": 0.09667063, "y": 9.66668 },
|
||||
{ "x": 4.986578, "y": 9.656466 },
|
||||
{ "x": 4.97504, "y": 8.829696 }
|
||||
],
|
||||
[
|
||||
{ "x": 16.70916, "y": 15.85023 },
|
||||
{ "x": 16.70025, "y": 16.77103 },
|
||||
{ "x": 12.87164, "y": 16.76122 },
|
||||
{ "x": 12.86896, "y": 20.66066 },
|
||||
{ "x": 13.45543, "y": 20.44748 },
|
||||
{ "x": 13.97733, "y": 20.66153 },
|
||||
{ "x": 13.98698, "y": 20.99139 },
|
||||
{ "x": 15.44601, "y": 20.98349 },
|
||||
{ "x": 15.45127, "y": 20.65192 },
|
||||
{ "x": 15.75683, "y": 20.46402 },
|
||||
{ "x": 16.55697, "y": 20.66496 },
|
||||
{ "x": 16.56016, "y": 17.77095 },
|
||||
{ "x": 16.69854, "y": 17.78921 },
|
||||
{ "x": 16.69959, "y": 21.05262 },
|
||||
{ "x": 17.28384, "y": 21.04772 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.29037, "y": 21.03862 },
|
||||
{ "x": 17.28807, "y": 21.8748 },
|
||||
{ "x": 12.74644, "y": 21.8763 },
|
||||
{ "x": 12.75951, "y": 22.57441 },
|
||||
{ "x": 13.10651, "y": 23.37466 },
|
||||
{ "x": 13.73439, "y": 24.10774 },
|
||||
{ "x": 15.4092, "y": 25.05675 },
|
||||
{ "x": 16.66343, "y": 25.38271 },
|
||||
{ "x": 17.84418, "y": 25.4593 },
|
||||
{ "x": 19.55612, "y": 25.26398 },
|
||||
{ "x": 21.22287, "y": 24.61058 },
|
||||
{ "x": 22.23365, "y": 23.81404 },
|
||||
{ "x": 22.85189, "y": 22.84578 },
|
||||
{ "x": 22.946, "y": 21.83673 },
|
||||
{ "x": 18.39528, "y": 21.88615 },
|
||||
{ "x": 18.39615, "y": 21.04512 }
|
||||
],
|
||||
[
|
||||
{ "x": 18.39268, "y": 21.06862 },
|
||||
{ "x": 19.00124, "y": 21.0586 },
|
||||
{ "x": 18.97912, "y": 19.36902 },
|
||||
{ "x": 19.09182, "y": 19.36764 },
|
||||
{ "x": 19.07861, "y": 20.87417 },
|
||||
{ "x": 19.93716, "y": 20.85499 },
|
||||
{ "x": 19.93814, "y": 21.016 },
|
||||
{ "x": 20.60378, "y": 20.99647 },
|
||||
{ "x": 20.59911, "y": 20.85824 },
|
||||
{ "x": 22.44798, "y": 20.86359 },
|
||||
{ "x": 22.43852, "y": 20.04767 },
|
||||
{ "x": 22.78794, "y": 20.04396 },
|
||||
{ "x": 22.81651, "y": 16.90077 },
|
||||
{ "x": 19.54131, "y": 16.91623 },
|
||||
{ "x": 19.54423, "y": 16.77063 },
|
||||
{ "x": 19.10311, "y": 16.76015 },
|
||||
{ "x": 19.10099, "y": 18.36283 },
|
||||
{ "x": 18.95522, "y": 18.3579 },
|
||||
{ "x": 18.97521, "y": 15.8332 }
|
||||
],
|
||||
[
|
||||
{ "x": 7.212324, "y": 9.84881 },
|
||||
{ "x": 7.219448, "y": 2.166317 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.975575, "y": 9.639039 },
|
||||
{ "x": 4.948083, "y": 2.163976 }
|
||||
],
|
||||
[
|
||||
{ "x": 16.568, "y": 19.02069 },
|
||||
{ "x": 16.128, "y": 19.02069 },
|
||||
{ "x": 16.128, "y": 18.061 },
|
||||
{ "x": 16.568, "y": 18.061 },
|
||||
{ "x": 16.568, "y": 19.02069 }
|
||||
],
|
||||
[
|
||||
{ "x": 14.298, "y": 19.32877 },
|
||||
{ "x": 12.868, "y": 19.32877 },
|
||||
{ "x": 12.868, "y": 18.837 },
|
||||
{ "x": 14.298, "y": 18.837 },
|
||||
{ "x": 14.298, "y": 19.32877 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.9349, "y": 5.586789 },
|
||||
{ "x": 18.00781, "y": 5.227939 },
|
||||
{ "x": 18.67603, "y": 4.793009 },
|
||||
{ "x": 19.14774, "y": 5.096714 },
|
||||
{ "x": 19.15981, "y": 5.218315 },
|
||||
{ "x": 20.28024, "y": 5.215115 },
|
||||
{ "x": 20.59529, "y": 4.862257 },
|
||||
{ "x": 21.07071, "y": 5.041684 },
|
||||
{ "x": 21.05624, "y": 5.598478 },
|
||||
{ "x": 17.9349, "y": 5.586789 }
|
||||
],
|
||||
[
|
||||
{ "x": 20.47344, "y": 3.445615 },
|
||||
{ "x": 20.90137, "y": 3.802666 },
|
||||
{ "x": 20.90182, "y": 4.066891 },
|
||||
{ "x": 20.46002, "y": 4.36205 },
|
||||
{ "x": 20.02631, "y": 4.068808 },
|
||||
{ "x": 20.01486, "y": 3.775074 },
|
||||
{ "x": 20.47344, "y": 3.445615 }
|
||||
],
|
||||
[
|
||||
{ "x": 20.57644, "y": 2.875615 },
|
||||
{ "x": 21.00437, "y": 3.232666 },
|
||||
{ "x": 21.00482, "y": 3.496891 },
|
||||
{ "x": 20.56302, "y": 3.79205 },
|
||||
{ "x": 20.12931, "y": 3.498807 },
|
||||
{ "x": 20.11786, "y": 3.205074 },
|
||||
{ "x": 20.57644, "y": 2.875615 }
|
||||
],
|
||||
[
|
||||
{ "x": 13.56155, "y": 17.24444 },
|
||||
{ "x": 13.35024, "y": 17.03253 },
|
||||
{ "x": 13.13379, "y": 17.16789 },
|
||||
{ "x": 12.972, "y": 17.29 },
|
||||
{ "x": 12.9723, "y": 18.24428 },
|
||||
{ "x": 14.402, "y": 18.26 },
|
||||
{ "x": 14.442, "y": 17.2 },
|
||||
{ "x": 13.56155, "y": 17.24444 }
|
||||
],
|
||||
[
|
||||
{ "x": -0.2100389, "y": 0 },
|
||||
{ "x": 0.2100389, "y": 0.2100389 },
|
||||
{ "x": 0.4200778, "y": 0 },
|
||||
{ "x": 0.2100389, "y": 0.2100389 },
|
||||
{ "x": -0.4200778, "y": 0 }
|
||||
],
|
||||
[
|
||||
{ "x": -0.15, "y": 0 },
|
||||
{ "x": 0.15, "y": 0.15 },
|
||||
{ "x": 0.3, "y": 0 },
|
||||
{ "x": 0.15, "y": 0.15 },
|
||||
{ "x": -0.3, "y": 0 }
|
||||
],
|
||||
[
|
||||
{ "x": -0.1982777, "y": 0 },
|
||||
{ "x": 0.1982777, "y": 0.1982777 },
|
||||
{ "x": 0.3965554, "y": 0 },
|
||||
{ "x": 0.1982777, "y": 0.1982777 },
|
||||
{ "x": -0.3965554, "y": 0 }
|
||||
],
|
||||
[
|
||||
{ "x": -0.1982777, "y": 0 },
|
||||
{ "x": 0.1982777, "y": 0.1982777 },
|
||||
{ "x": 0.3965554, "y": 0 },
|
||||
{ "x": 0.1982777, "y": 0.1982777 },
|
||||
{ "x": -0.3965554, "y": 0 }
|
||||
],
|
||||
[
|
||||
{ "x": 21.03973, "y": 3.091555 },
|
||||
{ "x": 19.02226, "y": 3.091555 },
|
||||
{ "x": 19.02226, "y": 2.636287 },
|
||||
{ "x": 21.03973, "y": 2.636287 },
|
||||
{ "x": 21.03973, "y": 3.091555 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.878, "y": 13.541 },
|
||||
{ "x": 4.248, "y": 13.541 },
|
||||
{ "x": 4.248, "y": 13.351 },
|
||||
{ "x": 4.878, "y": 13.351 },
|
||||
{ "x": 4.878, "y": 13.541 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.878, "y": 12.713 },
|
||||
{ "x": 4.248, "y": 12.713 },
|
||||
{ "x": 4.248, "y": 12.523 },
|
||||
{ "x": 4.878, "y": 12.523 },
|
||||
{ "x": 4.878, "y": 12.713 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.878, "y": 11.676 },
|
||||
{ "x": 4.248, "y": 11.676 },
|
||||
{ "x": 4.248, "y": 11.486 },
|
||||
{ "x": 4.878, "y": 11.486 },
|
||||
{ "x": 4.878, "y": 11.676 }
|
||||
],
|
||||
[
|
||||
{ "x": -6.140824, "y": 2.366569 },
|
||||
{ "x": -6.841852, "y": 2.366569 },
|
||||
{ "x": -6.841852, "y": 1.44923 },
|
||||
{ "x": -6.140824, "y": 1.44923 },
|
||||
{ "x": -6.140824, "y": 2.366569 }
|
||||
],
|
||||
[
|
||||
{ "x": -2.1, "y": 2.1913 },
|
||||
{ "x": -2.78, "y": 2.1913 },
|
||||
{ "x": -2.78, "y": 1.08 },
|
||||
{ "x": -2.1, "y": 1.08 },
|
||||
{ "x": -2.1, "y": 2.1913 }
|
||||
],
|
||||
[
|
||||
{ "x": 24.92, "y": 3.80943 },
|
||||
{ "x": 23.16, "y": 3.80943 },
|
||||
{ "x": 23.16, "y": 0.9315456 },
|
||||
{ "x": 24.92, "y": 0.9315456 },
|
||||
{ "x": 24.92, "y": 3.80943 }
|
||||
],
|
||||
[
|
||||
{ "x": 27.78, "y": 3.80943 },
|
||||
{ "x": 26.02, "y": 3.80943 },
|
||||
{ "x": 26.02, "y": 0.9315456 },
|
||||
{ "x": 27.78, "y": 0.9315456 },
|
||||
{ "x": 27.78, "y": 3.80943 }
|
||||
],
|
||||
[
|
||||
{ "x": 28.753, "y": 6.152 },
|
||||
{ "x": 28.073, "y": 6.152 },
|
||||
{ "x": 28.073, "y": 5.172 },
|
||||
{ "x": 28.753, "y": 5.172 },
|
||||
{ "x": 28.753, "y": 6.152 }
|
||||
],
|
||||
[
|
||||
{ "x": 29.165, "y": 3.735192 },
|
||||
{ "x": 28.755, "y": 3.735192 },
|
||||
{ "x": 28.755, "y": 1.065314 },
|
||||
{ "x": 29.165, "y": 1.065314 },
|
||||
{ "x": 29.165, "y": 3.735192 }
|
||||
],
|
||||
[
|
||||
{ "x": 29.145, "y": 5.06 },
|
||||
{ "x": 28.735, "y": 5.06 },
|
||||
{ "x": 28.735, "y": 4.28 },
|
||||
{ "x": 29.145, "y": 4.28 },
|
||||
{ "x": 29.145, "y": 5.06 }
|
||||
],
|
||||
[
|
||||
{ "x": 19.027, "y": 2.864326 },
|
||||
{ "x": 18.617, "y": 2.864326 },
|
||||
{ "x": 18.617, "y": 2.661 },
|
||||
{ "x": 19.027, "y": 2.661 },
|
||||
{ "x": 19.027, "y": 2.864326 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.7080002, "y": 13.566 },
|
||||
{ "x": 0.07800007, "y": 13.566 },
|
||||
{ "x": 0.07800007, "y": 13.376 },
|
||||
{ "x": 0.7080002, "y": 13.376 },
|
||||
{ "x": 0.7080002, "y": 13.566 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.5790001, "y": 13.4695 },
|
||||
{ "x": 0.08900023, "y": 13.4695 },
|
||||
{ "x": 0.08900023, "y": 12.682 },
|
||||
{ "x": 0.5790001, "y": 12.682 },
|
||||
{ "x": 0.5790001, "y": 13.4695 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.7080002, "y": 12.703 },
|
||||
{ "x": 0.07800007, "y": 12.703 },
|
||||
{ "x": 0.07800007, "y": 12.513 },
|
||||
{ "x": 0.7080002, "y": 12.513 },
|
||||
{ "x": 0.7080002, "y": 12.703 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.5790001, "y": 12.779 },
|
||||
{ "x": 0.08900023, "y": 12.779 },
|
||||
{ "x": 0.08900023, "y": 11.809 },
|
||||
{ "x": 0.5790001, "y": 11.809 },
|
||||
{ "x": 0.5790001, "y": 12.779 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.7080002, "y": 11.701 },
|
||||
{ "x": 0.07800007, "y": 11.701 },
|
||||
{ "x": 0.07800007, "y": 11.511 },
|
||||
{ "x": 0.7080002, "y": 11.511 },
|
||||
{ "x": 0.7080002, "y": 11.701 }
|
||||
],
|
||||
[
|
||||
{ "x": 1.022, "y": 11.5454 },
|
||||
{ "x": 0.2020001, "y": 11.5454 },
|
||||
{ "x": 0.2020001, "y": 11.114 },
|
||||
{ "x": 1.022, "y": 11.114 },
|
||||
{ "x": 1.022, "y": 11.5454 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.7080002, "y": 10.187 },
|
||||
{ "x": 0.07800007, "y": 10.187 },
|
||||
{ "x": 0.07800007, "y": 9.997 },
|
||||
{ "x": 0.7080002, "y": 9.997 },
|
||||
{ "x": 0.7080002, "y": 10.187 }
|
||||
],
|
||||
[
|
||||
{ "x": 11.635, "y": 9.885 },
|
||||
{ "x": 7.905001, "y": 9.885 },
|
||||
{ "x": 7.905001, "y": 9.655001 },
|
||||
{ "x": 11.635, "y": 9.655001 },
|
||||
{ "x": 11.635, "y": 9.885 }
|
||||
],
|
||||
[
|
||||
{ "x": 10.53, "y": 11.48153 },
|
||||
{ "x": 8.13, "y": 11.48153 },
|
||||
{ "x": 8.13, "y": 10.605 },
|
||||
{ "x": 10.53, "y": 10.605 },
|
||||
{ "x": 10.53, "y": 11.48153 }
|
||||
],
|
||||
[
|
||||
{ "x": 10.50025, "y": 4.627614 },
|
||||
{ "x": 9.624989, "y": 4.627614 },
|
||||
{ "x": 9.624989, "y": 4.265 },
|
||||
{ "x": 10.50025, "y": 4.265 },
|
||||
{ "x": 10.50025, "y": 4.627614 }
|
||||
],
|
||||
[
|
||||
{ "x": 22.63, "y": 16.915 },
|
||||
{ "x": 19.55, "y": 16.915 },
|
||||
{ "x": 19.55, "y": 16.765 },
|
||||
{ "x": 22.63, "y": 16.765 },
|
||||
{ "x": 22.63, "y": 16.915 }
|
||||
],
|
||||
[
|
||||
{ "x": 22.095, "y": 18.117 },
|
||||
{ "x": 19.965, "y": 18.117 },
|
||||
{ "x": 19.965, "y": 17.61187 },
|
||||
{ "x": 22.095, "y": 17.61187 },
|
||||
{ "x": 22.095, "y": 18.117 }
|
||||
],
|
||||
[
|
||||
{ "x": 19.871, "y": 23.511 },
|
||||
{ "x": 18.441, "y": 23.511 },
|
||||
{ "x": 18.441, "y": 23.261 },
|
||||
{ "x": 19.871, "y": 23.261 },
|
||||
{ "x": 19.871, "y": 23.511 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.135, "y": 23.425 },
|
||||
{ "x": 15.705, "y": 23.425 },
|
||||
{ "x": 15.705, "y": 23.175 },
|
||||
{ "x": 17.135, "y": 23.175 },
|
||||
{ "x": 17.135, "y": 23.425 }
|
||||
],
|
||||
[
|
||||
{ "x": 21.845, "y": 23.615 },
|
||||
{ "x": 20.415, "y": 23.615 },
|
||||
{ "x": 20.415, "y": 23.365 },
|
||||
{ "x": 21.845, "y": 23.365 },
|
||||
{ "x": 21.845, "y": 23.615 }
|
||||
],
|
||||
[
|
||||
{ "x": 15.625, "y": 23.475 },
|
||||
{ "x": 14.195, "y": 23.475 },
|
||||
{ "x": 14.195, "y": 23.225 },
|
||||
{ "x": 15.625, "y": 23.225 },
|
||||
{ "x": 15.625, "y": 23.475 }
|
||||
],
|
||||
[
|
||||
{ "x": 15.399, "y": 24.317 },
|
||||
{ "x": 13.949, "y": 24.317 },
|
||||
{ "x": 13.949, "y": 23.967 },
|
||||
{ "x": 15.399, "y": 23.967 },
|
||||
{ "x": 15.399, "y": 24.317 }
|
||||
],
|
||||
[
|
||||
{ "x": 15.756, "y": 22.593 },
|
||||
{ "x": 14.306, "y": 22.593 },
|
||||
{ "x": 14.306, "y": 22.243 },
|
||||
{ "x": 15.756, "y": 22.243 },
|
||||
{ "x": 15.756, "y": 22.593 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.316, "y": 22.679 },
|
||||
{ "x": 15.866, "y": 22.679 },
|
||||
{ "x": 15.866, "y": 22.329 },
|
||||
{ "x": 17.316, "y": 22.329 },
|
||||
{ "x": 17.316, "y": 22.679 }
|
||||
],
|
||||
[
|
||||
{ "x": 19.706, "y": 22.699 },
|
||||
{ "x": 18.256, "y": 22.699 },
|
||||
{ "x": 18.256, "y": 22.349 },
|
||||
{ "x": 19.706, "y": 22.349 },
|
||||
{ "x": 19.706, "y": 22.699 }
|
||||
],
|
||||
[
|
||||
{ "x": 22.68, "y": 22.702 },
|
||||
{ "x": 21.23, "y": 22.702 },
|
||||
{ "x": 21.23, "y": 22.352 },
|
||||
{ "x": 22.68, "y": 22.352 },
|
||||
{ "x": 22.68, "y": 22.702 }
|
||||
],
|
||||
[
|
||||
{ "x": 16.23, "y": 25.004 },
|
||||
{ "x": 14.8, "y": 25.004 },
|
||||
{ "x": 14.8, "y": 24.754 },
|
||||
{ "x": 16.23, "y": 24.754 },
|
||||
{ "x": 16.23, "y": 25.004 }
|
||||
],
|
||||
[
|
||||
{ "x": 21.038, "y": 24.766 },
|
||||
{ "x": 19.588, "y": 24.766 },
|
||||
{ "x": 19.588, "y": 24.416 },
|
||||
{ "x": 21.038, "y": 24.416 },
|
||||
{ "x": 21.038, "y": 24.766 }
|
||||
],
|
||||
[
|
||||
{ "x": 19.367, "y": -2.518978 },
|
||||
{ "x": 18.68754, "y": -2.518978 },
|
||||
{ "x": 18.68754, "y": -2.839065 },
|
||||
{ "x": 19.367, "y": -2.839065 },
|
||||
{ "x": 19.367, "y": -2.518978 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.001, "y": 1.865 },
|
||||
{ "x": 16.231, "y": 1.865 },
|
||||
{ "x": 16.231, "y": 0.875 },
|
||||
{ "x": 17.001, "y": 0.875 },
|
||||
{ "x": 17.001, "y": 1.865 }
|
||||
],
|
||||
[
|
||||
{ "x": 15.925, "y": 1.865 },
|
||||
{ "x": 15.155, "y": 1.865 },
|
||||
{ "x": 15.155, "y": 0.875 },
|
||||
{ "x": 15.925, "y": 0.875 },
|
||||
{ "x": 15.925, "y": 1.865 }
|
||||
],
|
||||
[
|
||||
{ "x": 14.539, "y": 1.865 },
|
||||
{ "x": 13.769, "y": 1.865 },
|
||||
{ "x": 13.769, "y": 0.875 },
|
||||
{ "x": 14.539, "y": 0.875 },
|
||||
{ "x": 14.539, "y": 1.865 }
|
||||
],
|
||||
[
|
||||
{ "x": 14.72, "y": -1.882 },
|
||||
{ "x": 13.7, "y": -1.882 },
|
||||
{ "x": 13.7, "y": -2.232 },
|
||||
{ "x": 14.72, "y": -2.232 },
|
||||
{ "x": 14.72, "y": -1.882 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.08, "y": -1.879 },
|
||||
{ "x": 16.06, "y": -1.879 },
|
||||
{ "x": 16.06, "y": -2.229 },
|
||||
{ "x": 17.08, "y": -2.229 },
|
||||
{ "x": 17.08, "y": -1.879 }
|
||||
],
|
||||
[
|
||||
{ "x": 20.427, "y": 2.613 },
|
||||
{ "x": 20.427, "y": 2.153 },
|
||||
{ "x": 20.797, "y": 1.793 },
|
||||
{ "x": 21.057, "y": 1.953 },
|
||||
{ "x": 20.427, "y": 2.613 }
|
||||
],
|
||||
[
|
||||
{ "x": 9.81149, "y": 13.37871 },
|
||||
{ "x": 9.815001, "y": 12.48 },
|
||||
{ "x": 11.2387, "y": 12.45026 },
|
||||
{ "x": 11.25847, "y": 11.15674 },
|
||||
{ "x": 11.47295, "y": 11.17267 },
|
||||
{ "x": 11.465, "y": 10.86 },
|
||||
{ "x": 12.11164, "y": 10.50449 },
|
||||
{ "x": 12.11447, "y": 13.38711 },
|
||||
{ "x": 9.81149, "y": 13.37871 }
|
||||
],
|
||||
[
|
||||
{ "x": 22.0661, "y": 19.44129 },
|
||||
{ "x": 21.59683, "y": 19.86015 },
|
||||
{ "x": 20.43074, "y": 19.8552 },
|
||||
{ "x": 20.04636, "y": 19.4479 },
|
||||
{ "x": 19.75579, "y": 19.44509 },
|
||||
{ "x": 19.736, "y": 18.319 },
|
||||
{ "x": 20.446, "y": 17.909 },
|
||||
{ "x": 21.616, "y": 17.909 },
|
||||
{ "x": 22.076, "y": 18.279 },
|
||||
{ "x": 22.0661, "y": 19.44129 }
|
||||
],
|
||||
[
|
||||
{ "x": 16.60246, "y": 5.043699 },
|
||||
{ "x": 16.4291, "y": 4.853531 },
|
||||
{ "x": 16.10734, "y": 5.052094 },
|
||||
{ "x": 15.05132, "y": 5.074209 },
|
||||
{ "x": 14.85036, "y": 4.780072 },
|
||||
{ "x": 14.47607, "y": 5.052905 },
|
||||
{ "x": 14.26516, "y": 5.059663 },
|
||||
{ "x": 14.26178, "y": 5.7193 },
|
||||
{ "x": 16.94973, "y": 5.700385 },
|
||||
{ "x": 16.94588, "y": 5.045084 },
|
||||
{ "x": 16.60246, "y": 5.043699 }
|
||||
]
|
||||
]
|
839
src/collision/assets/polus.json
Normal file
839
src/collision/assets/polus.json
Normal file
@ -0,0 +1,839 @@
|
||||
[
|
||||
[
|
||||
{ "x": 4.468355, "y": -25.19164 },
|
||||
{ "x": 4.642188, "y": -25.4748 },
|
||||
{ "x": 5.859158, "y": -25.97136 },
|
||||
{ "x": 7.379907, "y": -26.17045 },
|
||||
{ "x": 9.318335, "y": -25.85212 },
|
||||
{ "x": 9.691259, "y": -25.51607 }
|
||||
],
|
||||
[
|
||||
{ "x": 12.85454, "y": -25.81685 },
|
||||
{ "x": 13.21841, "y": -26.08871 },
|
||||
{ "x": 15.07888, "y": -26.52698 },
|
||||
{ "x": 17.51235, "y": -26.34335 },
|
||||
{ "x": 19.41673, "y": -26.09551 },
|
||||
{ "x": 19.68621, "y": -25.85137 }
|
||||
],
|
||||
[
|
||||
{ "x": 31.83391, "y": -17.77156 },
|
||||
{ "x": 31.16781, "y": -16.94566 },
|
||||
{ "x": 30.99393, "y": -16.22257 },
|
||||
{ "x": 32.84105, "y": -16.14146 },
|
||||
{ "x": 32.84063, "y": -15.6644 },
|
||||
{ "x": 31.01169, "y": -15.65007 },
|
||||
{ "x": 31.19056, "y": -14.61455 },
|
||||
{ "x": 32.02383, "y": -13.94915 },
|
||||
{ "x": 33.24313, "y": -13.53686 },
|
||||
{ "x": 34.74972, "y": -13.62016 },
|
||||
{ "x": 34.87443, "y": -11.78193 }
|
||||
],
|
||||
[
|
||||
{ "x": 1.163654, "y": -8.0028 },
|
||||
{ "x": 11.41751, "y": -7.992749 },
|
||||
{ "x": 11.42015, "y": -9.245324 },
|
||||
{ "x": 11.07954, "y": -9.219257 },
|
||||
{ "x": 10.46802, "y": -9.175865 },
|
||||
{ "x": 10.10005, "y": -8.969795 },
|
||||
{ "x": 9.726253, "y": -8.987286 },
|
||||
{ "x": 9.737602, "y": -9.120133 },
|
||||
{ "x": 7.71242, "y": -9.124039 },
|
||||
{ "x": 7.702194, "y": -8.981174 },
|
||||
{ "x": 2.543196, "y": -8.972954 },
|
||||
{ "x": 2.216505, "y": -9.236499 },
|
||||
{ "x": 1.586406, "y": -8.953769 },
|
||||
{ "x": 1.588347, "y": -10.41234 },
|
||||
{ "x": 1.889818, "y": -10.42414 },
|
||||
{ "x": 1.875751, "y": -11.16787 },
|
||||
{ "x": 1.56425, "y": -11.43982 },
|
||||
{ "x": 1.58513, "y": -13.01106 },
|
||||
{ "x": 4.34094, "y": -13.01894 },
|
||||
{ "x": 4.351696, "y": -11.30745 },
|
||||
{ "x": 3.332622, "y": -11.3479 },
|
||||
{ "x": 3.13042, "y": -11.16702 },
|
||||
{ "x": 3.143933, "y": -10.42473 },
|
||||
{ "x": 4.461988, "y": -10.43749 },
|
||||
{ "x": 4.454574, "y": -13.01405 },
|
||||
{ "x": 4.805012, "y": -13.01713 },
|
||||
{ "x": 4.800202, "y": -13.99301 },
|
||||
{ "x": 4.261829, "y": -13.97445 }
|
||||
],
|
||||
[
|
||||
{ "x": 6.059853, "y": -13.98625 },
|
||||
{ "x": 6.056842, "y": -13.01136 },
|
||||
{ "x": 6.365222, "y": -13.00313 },
|
||||
{ "x": 6.363031, "y": -10.41905 },
|
||||
{ "x": 6.883934, "y": -10.43037 },
|
||||
{ "x": 6.866985, "y": -11.38156 },
|
||||
{ "x": 6.683385, "y": -11.38787 },
|
||||
{ "x": 6.68111, "y": -13.98867 },
|
||||
{ "x": 6.055891, "y": -13.98866 }
|
||||
],
|
||||
[
|
||||
{ "x": 6.660733, "y": -13.96993 },
|
||||
{ "x": 11.38878, "y": -13.96052 },
|
||||
{ "x": 11.4079, "y": -10.2124 },
|
||||
{ "x": 11.06013, "y": -10.21909 },
|
||||
{ "x": 11.0841, "y": -10.41887 },
|
||||
{ "x": 8.096922, "y": -10.41325 },
|
||||
{ "x": 8.091213, "y": -11.39648 },
|
||||
{ "x": 11.39786, "y": -11.37933 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.623094, "y": -13.24155 },
|
||||
{ "x": 4.616889, "y": -17.96251 }
|
||||
],
|
||||
[
|
||||
{ "x": 6.22798, "y": -17.95516 },
|
||||
{ "x": 6.21671, "y": -13.17807 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.329903, "y": -17.80734 },
|
||||
{ "x": 4.848855, "y": -17.80634 },
|
||||
{ "x": 4.866112, "y": -18.79152 },
|
||||
{ "x": 3.729993, "y": -18.78318 },
|
||||
{ "x": 3.712253, "y": -18.00079 },
|
||||
{ "x": 4.014073, "y": -18.00014 },
|
||||
{ "x": 4.023358, "y": -16.33687 },
|
||||
{ "x": 3.302862, "y": -15.68751 },
|
||||
{ "x": 2.222462, "y": -15.69674 },
|
||||
{ "x": 2.171762, "y": -16.38062 },
|
||||
{ "x": 1.870695, "y": -16.55518 },
|
||||
{ "x": 1.413249, "y": -16.39653 },
|
||||
{ "x": 1.182948, "y": -15.71359 },
|
||||
{ "x": 0.315588, "y": -15.69561 },
|
||||
{ "x": 0.3355923, "y": -16.98934 },
|
||||
{ "x": 0.5901208, "y": -17.0723 },
|
||||
{ "x": 0.5943825, "y": -17.20404 },
|
||||
{ "x": 0.8280015, "y": -17.29915 },
|
||||
{ "x": 0.8179843, "y": -18.00991 },
|
||||
{ "x": 2.493732, "y": -18.01904 },
|
||||
{ "x": 2.49319, "y": -21.35849 },
|
||||
{ "x": 2.079746, "y": -21.36394 },
|
||||
{ "x": 2.078685, "y": -20.61282 },
|
||||
{ "x": 2.35622, "y": -20.60777 },
|
||||
{ "x": 2.368558, "y": -18.95865 },
|
||||
{ "x": 2.076443, "y": -18.97806 },
|
||||
{ "x": 1.885863, "y": -18.75928 },
|
||||
{ "x": 1.117207, "y": -18.76488 },
|
||||
{ "x": 0.8289199, "y": -19.03341 },
|
||||
{ "x": 0.8386979, "y": -19.20543 },
|
||||
{ "x": 1.388847, "y": -19.19547 },
|
||||
{ "x": 1.596443, "y": -19.43404 },
|
||||
{ "x": 1.575914, "y": -19.69593 },
|
||||
{ "x": 1.435838, "y": -19.77969 },
|
||||
{ "x": 0.8422089, "y": -19.78425 },
|
||||
{ "x": 0.8446279, "y": -19.98297 },
|
||||
{ "x": 0.3109691, "y": -20.59622 },
|
||||
{ "x": 0.8417668, "y": -20.61433 },
|
||||
{ "x": 0.8157988, "y": -21.63438 },
|
||||
{ "x": 0.3295369, "y": -21.70924 },
|
||||
{ "x": 0.3366578, "y": -22.43502 },
|
||||
{ "x": 2.793279, "y": -22.44424 },
|
||||
{ "x": 2.792992, "y": -23.2027 },
|
||||
{ "x": 1.461118, "y": -23.19614 },
|
||||
{ "x": 1.31747, "y": -23.37593 },
|
||||
{ "x": 0.31354, "y": -23.61072 },
|
||||
{ "x": 0.3137934, "y": -24.99285 },
|
||||
{ "x": 4.304623, "y": -24.96215 },
|
||||
{ "x": 4.311398, "y": -23.18888 },
|
||||
{ "x": 4.065456, "y": -23.198 },
|
||||
{ "x": 4.066553, "y": -22.43078 },
|
||||
{ "x": 4.303843, "y": -22.44131 },
|
||||
{ "x": 4.305241, "y": -21.84784 },
|
||||
{ "x": 5.262867, "y": -21.85781 },
|
||||
{ "x": 5.281539, "y": -22.83879 },
|
||||
{ "x": 4.633771, "y": -22.82001 },
|
||||
{ "x": 4.633868, "y": -25.707 }
|
||||
],
|
||||
[
|
||||
{ "x": 6.121937, "y": -17.81924 },
|
||||
{ "x": 6.125292, "y": -18.77762 },
|
||||
{ "x": 6.825426, "y": -18.76699 },
|
||||
{ "x": 6.839787, "y": -21.85088 },
|
||||
{ "x": 6.540904, "y": -21.85227 },
|
||||
{ "x": 6.540395, "y": -22.78975 },
|
||||
{ "x": 7.153381, "y": -22.81718 },
|
||||
{ "x": 7.160014, "y": -17.79613 },
|
||||
{ "x": 6.122066, "y": -17.81233 }
|
||||
],
|
||||
[
|
||||
{ "x": 9.454855, "y": -25.96852 },
|
||||
{ "x": 9.431522, "y": -21.63816 },
|
||||
{ "x": 12.19316, "y": -21.62917 },
|
||||
{ "x": 12.18578, "y": -20.95824 },
|
||||
{ "x": 12.39046, "y": -20.95943 },
|
||||
{ "x": 12.36431, "y": -22.44428 },
|
||||
{ "x": 10.78102, "y": -22.44403 },
|
||||
{ "x": 10.67416, "y": -22.7368 },
|
||||
{ "x": 10.25398, "y": -22.84688 },
|
||||
{ "x": 10.11095, "y": -23.10449 },
|
||||
{ "x": 10.11586, "y": -23.96232 },
|
||||
{ "x": 11.675, "y": -23.98213 },
|
||||
{ "x": 11.98683, "y": -24.2565 },
|
||||
{ "x": 12.07754, "y": -24.65993 },
|
||||
{ "x": 12.11319, "y": -25.18934 },
|
||||
{ "x": 13.01008, "y": -25.17044 },
|
||||
{ "x": 14.1152, "y": -24.04868 },
|
||||
{ "x": 14.13201, "y": -22.4912 },
|
||||
{ "x": 13.70978, "y": -22.44748 },
|
||||
{ "x": 13.69046, "y": -20.95766 },
|
||||
{ "x": 13.92116, "y": -20.93906 },
|
||||
{ "x": 13.92223, "y": -21.61344 },
|
||||
{ "x": 14.35059, "y": -21.61405 },
|
||||
{ "x": 14.33282, "y": -24.663 },
|
||||
{ "x": 12.82521, "y": -26.22824 }
|
||||
],
|
||||
[
|
||||
{ "x": 19.41761, "y": -26.89183 },
|
||||
{ "x": 19.41428, "y": -23.9883 },
|
||||
{ "x": 18.17723, "y": -24.03974 },
|
||||
{ "x": 18.07403, "y": -23.80378 },
|
||||
{ "x": 17.23896, "y": -23.79051 },
|
||||
{ "x": 17.24987, "y": -22.49761 },
|
||||
{ "x": 17.55, "y": -22.48637 },
|
||||
{ "x": 17.55483, "y": -22.85442 },
|
||||
{ "x": 19.63054, "y": -22.86251 },
|
||||
{ "x": 19.63194, "y": -20.89175 },
|
||||
{ "x": 19.23694, "y": -20.54975 },
|
||||
{ "x": 19.22899, "y": -19.82631 },
|
||||
{ "x": 20.36378, "y": -19.8261 },
|
||||
{ "x": 20.34842, "y": -20.56401 },
|
||||
{ "x": 20.06929, "y": -20.57189 },
|
||||
{ "x": 19.98769, "y": -20.68674 },
|
||||
{ "x": 19.72377, "y": -20.70757 },
|
||||
{ "x": 19.73185, "y": -25.68816 },
|
||||
{ "x": 20.47411, "y": -25.67962 },
|
||||
{ "x": 20.4746, "y": -23.78805 },
|
||||
{ "x": 20.92922, "y": -23.78977 },
|
||||
{ "x": 20.91884, "y": -25.68327 },
|
||||
{ "x": 22.64618, "y": -25.65857 },
|
||||
{ "x": 22.64977, "y": -24.8419 },
|
||||
{ "x": 21.57603, "y": -24.84848 },
|
||||
{ "x": 21.57071, "y": -23.77324 },
|
||||
{ "x": 22.64747, "y": -23.79463 },
|
||||
{ "x": 22.65281, "y": -23.03153 },
|
||||
{ "x": 23.25619, "y": -23.03007 },
|
||||
{ "x": 23.27328, "y": -23.97827 },
|
||||
{ "x": 22.75698, "y": -23.98265 },
|
||||
{ "x": 22.74235, "y": -25.67866 },
|
||||
{ "x": 25.35623, "y": -25.67291 },
|
||||
{ "x": 25.34784, "y": -25.31824 },
|
||||
{ "x": 25.6509, "y": -25.32745 },
|
||||
{ "x": 25.64791, "y": -25.98885 }
|
||||
],
|
||||
[
|
||||
{ "x": 25.36081, "y": -24.2927 },
|
||||
{ "x": 26.78346, "y": -24.34598 },
|
||||
{ "x": 26.9757, "y": -24.08747 },
|
||||
{ "x": 26.94914, "y": -20.68051 },
|
||||
{ "x": 27.24854, "y": -20.39237 },
|
||||
{ "x": 33.72597, "y": -20.36598 }
|
||||
],
|
||||
[
|
||||
{ "x": 25.60491, "y": -25.32418 },
|
||||
{ "x": 28.29795, "y": -25.32301 },
|
||||
{ "x": 28.56379, "y": -25.11761 },
|
||||
{ "x": 28.55518, "y": -21.54346 },
|
||||
{ "x": 28.8744, "y": -21.15343 },
|
||||
{ "x": 33.65784, "y": -21.16417 }
|
||||
],
|
||||
[
|
||||
{ "x": 33.62392, "y": -20.36062 },
|
||||
{ "x": 33.74138, "y": -20.37108 },
|
||||
{ "x": 33.98942, "y": -19.83228 },
|
||||
{ "x": 34.34132, "y": -19.84434 },
|
||||
{ "x": 35.3353, "y": -18.84248 },
|
||||
{ "x": 38.09467, "y": -18.81666 },
|
||||
{ "x": 38.33393, "y": -19.0464 },
|
||||
{ "x": 38.4529, "y": -18.96912 },
|
||||
{ "x": 38.45289, "y": -18.25862 },
|
||||
{ "x": 38.2281, "y": -17.98815 },
|
||||
{ "x": 37.93935, "y": -17.9932 }
|
||||
],
|
||||
[
|
||||
{ "x": 33.62782, "y": -21.26315 },
|
||||
{ "x": 33.6063, "y": -20.97958 },
|
||||
{ "x": 33.72726, "y": -20.98293 },
|
||||
{ "x": 33.81273, "y": -21.31415 },
|
||||
{ "x": 34.1008, "y": -21.30166 },
|
||||
{ "x": 34.48833, "y": -21.31375 },
|
||||
{ "x": 34.62857, "y": -21.45783 },
|
||||
{ "x": 34.63147, "y": -22.14026 },
|
||||
{ "x": 35.06453, "y": -22.50477 },
|
||||
{ "x": 37.82113, "y": -22.5367 },
|
||||
{ "x": 37.87976, "y": -22.09232 },
|
||||
{ "x": 38.05656, "y": -21.70172 },
|
||||
{ "x": 38.46301, "y": -21.59719 },
|
||||
{ "x": 39.04375, "y": -21.58111 },
|
||||
{ "x": 39.37287, "y": -21.19324 },
|
||||
{ "x": 39.36033, "y": -20.183 },
|
||||
{ "x": 39.15706, "y": -19.87025 },
|
||||
{ "x": 39.17252, "y": -19.18412 },
|
||||
{ "x": 39.29811, "y": -19.09086 },
|
||||
{ "x": 39.48417, "y": -19.31238 }
|
||||
],
|
||||
[
|
||||
{ "x": 39.86636, "y": -11.77958 },
|
||||
{ "x": 39.85297, "y": -18.35519 },
|
||||
{ "x": 39.66782, "y": -18.8361 },
|
||||
{ "x": 39.34599, "y": -19.17971 }
|
||||
],
|
||||
[
|
||||
{ "x": 38.26079, "y": -11.81432 },
|
||||
{ "x": 38.25633, "y": -18.10769 }
|
||||
],
|
||||
[
|
||||
{ "x": 24.79112, "y": -8.297972 },
|
||||
{ "x": 24.60275, "y": -8.309859 },
|
||||
{ "x": 24.60161, "y": -9.347557 },
|
||||
{ "x": 24.93522, "y": -9.361137 },
|
||||
{ "x": 24.93626, "y": -9.281505 },
|
||||
{ "x": 25.99243, "y": -9.277384 },
|
||||
{ "x": 25.98319, "y": -8.309302 },
|
||||
{ "x": 24.76362, "y": -8.30243 },
|
||||
{ "x": 24.76752, "y": -6.596991 },
|
||||
{ "x": 28.4891, "y": -6.597414 },
|
||||
{ "x": 28.45923, "y": -7.883276 },
|
||||
{ "x": 28.0819, "y": -7.898211 },
|
||||
{ "x": 27.26835, "y": -8.311927 },
|
||||
{ "x": 27.25182, "y": -9.284495 },
|
||||
{ "x": 27.67033, "y": -9.284494 },
|
||||
{ "x": 27.64346, "y": -9.429042 },
|
||||
{ "x": 30.11549, "y": -9.410277 },
|
||||
{ "x": 30.1084, "y": -9.26344 },
|
||||
{ "x": 30.76909, "y": -9.30785 },
|
||||
{ "x": 30.7845, "y": -8.539226 },
|
||||
{ "x": 29.29904, "y": -8.507231 },
|
||||
{ "x": 29.30643, "y": -7.69715 },
|
||||
{ "x": 29.00145, "y": -7.67394 },
|
||||
{ "x": 28.97839, "y": -7.201445 },
|
||||
{ "x": 29.26816, "y": -7.067931 },
|
||||
{ "x": 30.77146, "y": -6.979141 },
|
||||
{ "x": 32.51074, "y": -6.985449 },
|
||||
{ "x": 32.5293, "y": -7.183598 },
|
||||
{ "x": 32.63257, "y": -7.192318 },
|
||||
{ "x": 32.61849, "y": -5.816308 },
|
||||
{ "x": 33.23944, "y": -5.262764 },
|
||||
{ "x": 34.96804, "y": -5.275941 },
|
||||
{ "x": 35.62245, "y": -5.857418 },
|
||||
{ "x": 36.93289, "y": -5.911241 },
|
||||
{ "x": 36.93803, "y": -6.817193 },
|
||||
{ "x": 36.95642, "y": -7.421597 },
|
||||
{ "x": 37.01499, "y": -7.498929 },
|
||||
{ "x": 37.21291, "y": -7.564006 },
|
||||
{ "x": 37.30141, "y": -7.493206 },
|
||||
{ "x": 39.42292, "y": -7.540127 },
|
||||
{ "x": 39.60057, "y": -7.493062 },
|
||||
{ "x": 39.68266, "y": -7.383775 },
|
||||
{ "x": 39.69355, "y": -6.823347 },
|
||||
{ "x": 41.01453, "y": -6.819366 },
|
||||
{ "x": 41.00942, "y": -8.521671 },
|
||||
{ "x": 39.64987, "y": -8.511548 },
|
||||
{ "x": 39.65253, "y": -8.208335 },
|
||||
{ "x": 37.28139, "y": -8.251371 },
|
||||
{ "x": 36.92989, "y": -8.531352 },
|
||||
{ "x": 36.92381, "y": -9.269684 },
|
||||
{ "x": 37.82073, "y": -9.275565 },
|
||||
{ "x": 37.82654, "y": -9.387205 },
|
||||
{ "x": 38.14684, "y": -9.405945 },
|
||||
{ "x": 38.16234, "y": -9.270851 },
|
||||
{ "x": 41.01444, "y": -9.254274 },
|
||||
{ "x": 41.00807, "y": -10.88156 },
|
||||
{ "x": 39.70001, "y": -10.87982 },
|
||||
{ "x": 39.71012, "y": -11.84312 },
|
||||
{ "x": 41.33603, "y": -11.85758 }
|
||||
],
|
||||
[
|
||||
{ "x": 38.43769, "y": -10.88076 },
|
||||
{ "x": 38.44409, "y": -11.83403 },
|
||||
{ "x": 32.30521, "y": -11.84694 },
|
||||
{ "x": 32.30261, "y": -11.41184 },
|
||||
{ "x": 24.60489, "y": -11.42625 },
|
||||
{ "x": 24.60373, "y": -10.31385 },
|
||||
{ "x": 24.93105, "y": -10.3164 },
|
||||
{ "x": 24.9278, "y": -10.46288 },
|
||||
{ "x": 32.50663, "y": -10.4634 },
|
||||
{ "x": 32.49953, "y": -9.272195 },
|
||||
{ "x": 32.03727, "y": -9.283109 },
|
||||
{ "x": 32.03503, "y": -8.515261 },
|
||||
{ "x": 32.50163, "y": -8.525516 },
|
||||
{ "x": 32.50784, "y": -8.143551 },
|
||||
{ "x": 32.61598, "y": -8.14327 },
|
||||
{ "x": 32.60762, "y": -8.518142 },
|
||||
{ "x": 35.66286, "y": -8.51203 },
|
||||
{ "x": 35.66552, "y": -9.276382 },
|
||||
{ "x": 35.50318, "y": -9.27581 },
|
||||
{ "x": 35.49751, "y": -9.757851 },
|
||||
{ "x": 35.39729, "y": -9.761734 },
|
||||
{ "x": 35.39405, "y": -9.366034 },
|
||||
{ "x": 34.50618, "y": -9.353576 },
|
||||
{ "x": 34.50914, "y": -9.807557 },
|
||||
{ "x": 33.2071, "y": -9.797601 },
|
||||
{ "x": 33.23382, "y": -9.251056 },
|
||||
{ "x": 32.62589, "y": -9.238699 },
|
||||
{ "x": 32.60516, "y": -10.88941 },
|
||||
{ "x": 35.38573, "y": -10.884 },
|
||||
{ "x": 35.39033, "y": -10.73012 },
|
||||
{ "x": 35.502, "y": -10.7328 },
|
||||
{ "x": 35.49858, "y": -10.87894 },
|
||||
{ "x": 37.81333, "y": -10.87426 },
|
||||
{ "x": 37.81733, "y": -10.3591 },
|
||||
{ "x": 38.1471, "y": -10.35867 },
|
||||
{ "x": 38.14536, "y": -10.87858 },
|
||||
{ "x": 38.43985, "y": -10.88128 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.69288, "y": -12.43071 },
|
||||
{ "x": 17.92506, "y": -12.44274 },
|
||||
{ "x": 17.91992, "y": -12.73771 },
|
||||
{ "x": 18.13973, "y": -13.14827 },
|
||||
{ "x": 18.93378, "y": -13.03682 },
|
||||
{ "x": 18.93032, "y": -13.74802 },
|
||||
{ "x": 23.40946, "y": -13.73718 },
|
||||
{ "x": 23.41752, "y": -10.04595 },
|
||||
{ "x": 17.67672, "y": -10.04396 },
|
||||
{ "x": 17.69304, "y": -10.65219 },
|
||||
{ "x": 19.11459, "y": -10.72677 },
|
||||
{ "x": 19.19703, "y": -10.83733 },
|
||||
{ "x": 20.77446, "y": -10.84928 },
|
||||
{ "x": 21.06972, "y": -11.36423 },
|
||||
{ "x": 23.21907, "y": -11.98615 },
|
||||
{ "x": 23.20252, "y": -12.70573 },
|
||||
{ "x": 22.73357, "y": -12.50255 },
|
||||
{ "x": 22.23224, "y": -13.00422 },
|
||||
{ "x": 20.03675, "y": -12.9942 },
|
||||
{ "x": 20.02708, "y": -12.52135 },
|
||||
{ "x": 19.64642, "y": -12.50077 },
|
||||
{ "x": 19.58921, "y": -12.24613 },
|
||||
{ "x": 19.4246, "y": -12.09461 },
|
||||
{ "x": 19.07064, "y": -12.11856 },
|
||||
{ "x": 19.0561, "y": -11.69396 },
|
||||
{ "x": 17.68979, "y": -11.67623 },
|
||||
{ "x": 17.69365, "y": -12.43585 }
|
||||
],
|
||||
[
|
||||
{ "x": 2.592513, "y": -8.025942 },
|
||||
{ "x": 4.280735, "y": -7.398408 },
|
||||
{ "x": 4.290099, "y": -4.471621 },
|
||||
{ "x": 4.004474, "y": -4.254463 },
|
||||
{ "x": 3.906721, "y": -3.920575 },
|
||||
{ "x": 4.174633, "y": -3.568251 },
|
||||
{ "x": 4.674113, "y": -3.396756 },
|
||||
{ "x": 5.219826, "y": -3.662916 },
|
||||
{ "x": 5.343629, "y": -3.998812 },
|
||||
{ "x": 5.228846, "y": -4.248911 },
|
||||
{ "x": 4.984394, "y": -4.46321 },
|
||||
{ "x": 4.982031, "y": -7.379822 },
|
||||
{ "x": 6.230354, "y": -7.271032 }
|
||||
],
|
||||
[
|
||||
{ "x": 23.14033, "y": -6.594245 },
|
||||
{ "x": 23.80352, "y": -6.434936 },
|
||||
{ "x": 23.8171, "y": -3.478621 },
|
||||
{ "x": 23.53148, "y": -3.261463 },
|
||||
{ "x": 23.43372, "y": -2.927575 },
|
||||
{ "x": 23.70163, "y": -2.575251 },
|
||||
{ "x": 24.20111, "y": -2.403756 },
|
||||
{ "x": 24.74683, "y": -2.669916 },
|
||||
{ "x": 24.87063, "y": -3.005812 },
|
||||
{ "x": 24.75585, "y": -3.255911 },
|
||||
{ "x": 24.51139, "y": -3.47021 },
|
||||
{ "x": 24.50903, "y": -6.386822 },
|
||||
{ "x": 24.79138, "y": -6.653455 }
|
||||
],
|
||||
[
|
||||
{ "x": 5.413117, "y": -8.351901 },
|
||||
{ "x": 7.054794, "y": -8.276548 },
|
||||
{ "x": 8.697342, "y": -8.510894 },
|
||||
{ "x": 10.10862, "y": -8.303051 },
|
||||
{ "x": 10.58135, "y": -8.118687 },
|
||||
{ "x": 11.00681, "y": -7.484922 },
|
||||
{ "x": 12.62112, "y": -8.204644 },
|
||||
{ "x": 14.23929, "y": -8.974723 },
|
||||
{ "x": 14.40617, "y": -7.258311 },
|
||||
{ "x": 14.29719, "y": -2.043067 },
|
||||
{ "x": 15.70589, "y": -1.51522 },
|
||||
{ "x": 17.53691, "y": -1.506043 },
|
||||
{ "x": 19.03707, "y": -2.029848 },
|
||||
{ "x": 18.93472, "y": -7.274326 },
|
||||
{ "x": 19.20114, "y": -8.927617 },
|
||||
{ "x": 22.39211, "y": -7.533558 },
|
||||
{ "x": 23.25742, "y": -7.609662 },
|
||||
{ "x": 23.75232, "y": -7.498259 }
|
||||
],
|
||||
[
|
||||
{ "x": 37.91449, "y": -20.31673 },
|
||||
{ "x": 35.00881, "y": -20.31673 },
|
||||
{ "x": 35.00881, "y": -20.94084 },
|
||||
{ "x": 37.91449, "y": -20.94084 },
|
||||
{ "x": 37.91449, "y": -20.31673 }
|
||||
],
|
||||
[
|
||||
{ "x": 26.02585, "y": -6.64 },
|
||||
{ "x": 24.817, "y": -6.64 },
|
||||
{ "x": 24.817, "y": -6.970619 },
|
||||
{ "x": 26.02585, "y": -6.970619 },
|
||||
{ "x": 26.02585, "y": -6.64 }
|
||||
],
|
||||
[
|
||||
{ "x": 11.77179, "y": -19.62465 },
|
||||
{ "x": 11.83028, "y": -18.52067 },
|
||||
{ "x": 13.4037, "y": -18.52042 },
|
||||
{ "x": 13.44733, "y": -15.98955 },
|
||||
{ "x": 13.68375, "y": -15.79114 },
|
||||
{ "x": 13.66221, "y": -15.21871 },
|
||||
{ "x": 13.32477, "y": -14.72645 },
|
||||
{ "x": 11.799, "y": -14.733 },
|
||||
{ "x": 11.589, "y": -14.723 },
|
||||
{ "x": 9.954119, "y": -14.72645 },
|
||||
{ "x": 10.04784, "y": -19.60156 },
|
||||
{ "x": 10.24256, "y": -19.60833 },
|
||||
{ "x": 10.2018, "y": -15.63915 },
|
||||
{ "x": 12.86989, "y": -15.59822 },
|
||||
{ "x": 12.99521, "y": -16.18124 },
|
||||
{ "x": 13.21599, "y": -16.24457 },
|
||||
{ "x": 13.21647, "y": -17.73367 },
|
||||
{ "x": 11.58001, "y": -17.74002 },
|
||||
{ "x": 11.55608, "y": -19.60504 },
|
||||
{ "x": 11.77179, "y": -19.62465 }
|
||||
],
|
||||
[
|
||||
{ "x": 22.90844, "y": -18.77619 },
|
||||
{ "x": 23.78691, "y": -18.78369 },
|
||||
{ "x": 23.8818, "y": -17.88425 },
|
||||
{ "x": 23.83846, "y": -16.25285 },
|
||||
{ "x": 24.49371, "y": -16.31531 },
|
||||
{ "x": 24.48757, "y": -16.49074 },
|
||||
{ "x": 27.01841, "y": -16.46032 },
|
||||
{ "x": 27.30907, "y": -16.29564 },
|
||||
{ "x": 28.57129, "y": -16.29163 },
|
||||
{ "x": 28.57926, "y": -16.8445 },
|
||||
{ "x": 28.90884, "y": -16.85584 },
|
||||
{ "x": 28.90578, "y": -15.3694 },
|
||||
{ "x": 15.61483, "y": -15.35862 },
|
||||
{ "x": 15.62812, "y": -20.79835 },
|
||||
{ "x": 17.24424, "y": -20.7777 },
|
||||
{ "x": 17.25434, "y": -21.51932 },
|
||||
{ "x": 17.56835, "y": -21.50746 },
|
||||
{ "x": 17.57353, "y": -20.74102 },
|
||||
{ "x": 17.96331, "y": -20.58899 },
|
||||
{ "x": 17.9802, "y": -19.81679 },
|
||||
{ "x": 15.96782, "y": -19.82635 },
|
||||
{ "x": 15.96752, "y": -18.91302 },
|
||||
{ "x": 16.61518, "y": -18.76492 },
|
||||
{ "x": 16.62491, "y": -18.02716 },
|
||||
{ "x": 16.45051, "y": -18.01276 },
|
||||
{ "x": 16.46912, "y": -16.46037 },
|
||||
{ "x": 16.88453, "y": -16.43662 },
|
||||
{ "x": 17.00264, "y": -16.34876 },
|
||||
{ "x": 21.93412, "y": -16.3298 },
|
||||
{ "x": 21.9517, "y": -16.55123 },
|
||||
{ "x": 23.38988, "y": -16.55636 },
|
||||
{ "x": 23.38412, "y": -18.00589 },
|
||||
{ "x": 22.89434, "y": -18.00573 },
|
||||
{ "x": 22.90844, "y": -18.77619 }
|
||||
],
|
||||
[
|
||||
{ "x": 21.63955, "y": -18.01692 },
|
||||
{ "x": 17.88043, "y": -18.02346 },
|
||||
{ "x": 17.88024, "y": -18.81244 },
|
||||
{ "x": 18.13617, "y": -18.86934 },
|
||||
{ "x": 21.36609, "y": -18.88367 },
|
||||
{ "x": 21.63298, "y": -18.80225 },
|
||||
{ "x": 21.63955, "y": -18.01692 }
|
||||
],
|
||||
[
|
||||
{ "x": 25.04842, "y": -18.75886 },
|
||||
{ "x": 25.3532, "y": -18.74552 },
|
||||
{ "x": 25.34759, "y": -19.82735 },
|
||||
{ "x": 21.61452, "y": -19.81656 },
|
||||
{ "x": 21.65306, "y": -22.25628 },
|
||||
{ "x": 22.08868, "y": -22.44897 },
|
||||
{ "x": 22.14978, "y": -20.58658 },
|
||||
{ "x": 25.36657, "y": -20.61784 },
|
||||
{ "x": 25.35131, "y": -23.00266 },
|
||||
{ "x": 24.53445, "y": -23.02254 },
|
||||
{ "x": 24.5266, "y": -23.98506 },
|
||||
{ "x": 25.34336, "y": -23.98594 },
|
||||
{ "x": 25.33836, "y": -24.35742 },
|
||||
{ "x": 25.65167, "y": -24.35947 },
|
||||
{ "x": 25.67025, "y": -18.97481 },
|
||||
{ "x": 28.91121, "y": -18.98343 },
|
||||
{ "x": 28.9024, "y": -17.81323 },
|
||||
{ "x": 28.5792, "y": -17.8131 },
|
||||
{ "x": 28.57479, "y": -18.02147 },
|
||||
{ "x": 25.03823, "y": -18.00087 },
|
||||
{ "x": 25.04842, "y": -18.75886 }
|
||||
],
|
||||
[
|
||||
{ "x": 26.86648, "y": -7.398125 },
|
||||
{ "x": 26.58685, "y": -7.362242 },
|
||||
{ "x": 26.25525, "y": -7.46819 },
|
||||
{ "x": 26.14983, "y": -7.690572 },
|
||||
{ "x": 26.36041, "y": -8.006925 },
|
||||
{ "x": 26.76204, "y": -8.007652 },
|
||||
{ "x": 27.03698, "y": -7.880741 },
|
||||
{ "x": 27.13068, "y": -7.605845 },
|
||||
{ "x": 26.86648, "y": -7.398125 }
|
||||
],
|
||||
[
|
||||
{ "x": 5.790905, "y": -19.75676 },
|
||||
{ "x": 3.727096, "y": -19.75676 },
|
||||
{ "x": 3.727096, "y": -20.96208 },
|
||||
{ "x": 5.790905, "y": -20.96208 },
|
||||
{ "x": 5.790905, "y": -19.75676 }
|
||||
],
|
||||
[
|
||||
{ "x": 26.83904, "y": -14.12032 },
|
||||
{ "x": 26.22075, "y": -14.01883 },
|
||||
{ "x": 25.39735, "y": -14.13572 },
|
||||
{ "x": 24.71892, "y": -13.72345 },
|
||||
{ "x": 25.51597, "y": -13.2925 },
|
||||
{ "x": 27.56451, "y": -13.30547 },
|
||||
{ "x": 28.30361, "y": -13.6028 },
|
||||
{ "x": 28.42681, "y": -13.89908 },
|
||||
{ "x": 26.83904, "y": -14.12032 }
|
||||
],
|
||||
[
|
||||
{ "x": 13.3388, "y": -6.003677 },
|
||||
{ "x": 12.77013, "y": -6.260994 },
|
||||
{ "x": 12.46447, "y": -6.640699 },
|
||||
{ "x": 12.43997, "y": -7.028212 },
|
||||
{ "x": 12.30328, "y": -7.102982 },
|
||||
{ "x": 12.30591, "y": -7.660471 },
|
||||
{ "x": 12.69129, "y": -8.015654 },
|
||||
{ "x": 13.37645, "y": -7.761706 },
|
||||
{ "x": 13.74081, "y": -7.960196 },
|
||||
{ "x": 14.04209, "y": -7.840932 },
|
||||
{ "x": 14.03963, "y": -7.349671 },
|
||||
{ "x": 13.97028, "y": -6.885252 },
|
||||
{ "x": 13.74353, "y": -6.663803 },
|
||||
{ "x": 13.74, "y": -6.37474 },
|
||||
{ "x": 13.3388, "y": -6.003677 }
|
||||
],
|
||||
[
|
||||
{ "x": 20.79322, "y": -7.794276 },
|
||||
{ "x": 20.20507, "y": -7.589413 },
|
||||
{ "x": 20.23226, "y": -7.977169 },
|
||||
{ "x": 19.84346, "y": -8.353935 },
|
||||
{ "x": 19.24475, "y": -8.107004 },
|
||||
{ "x": 19.61344, "y": -7.113365 },
|
||||
{ "x": 19.65041, "y": -6.401253 },
|
||||
{ "x": 20.03278, "y": -6.080639 },
|
||||
{ "x": 21.13224, "y": -6.860869 },
|
||||
{ "x": 21.15035, "y": -7.431738 },
|
||||
{ "x": 20.79322, "y": -7.794276 }
|
||||
],
|
||||
[
|
||||
{ "x": 9.379, "y": -11.10174 },
|
||||
{ "x": 8.338992, "y": -11.10174 },
|
||||
{ "x": 8.338992, "y": -11.9455 },
|
||||
{ "x": 9.379, "y": -11.9455 },
|
||||
{ "x": 9.379, "y": -11.10174 }
|
||||
],
|
||||
[
|
||||
{ "x": 11.147, "y": -11.10174 },
|
||||
{ "x": 10.10699, "y": -11.10174 },
|
||||
{ "x": 10.10699, "y": -11.9455 },
|
||||
{ "x": 11.147, "y": -11.9455 },
|
||||
{ "x": 11.147, "y": -11.10174 }
|
||||
],
|
||||
[
|
||||
{ "x": 11.147, "y": -12.94574 },
|
||||
{ "x": 10.10699, "y": -12.94574 },
|
||||
{ "x": 10.10699, "y": -13.7895 },
|
||||
{ "x": 11.147, "y": -13.7895 },
|
||||
{ "x": 11.147, "y": -12.94574 }
|
||||
],
|
||||
[
|
||||
{ "x": 9.37, "y": -12.94574 },
|
||||
{ "x": 8.329992, "y": -12.94574 },
|
||||
{ "x": 8.329992, "y": -13.7895 },
|
||||
{ "x": 9.37, "y": -13.7895 },
|
||||
{ "x": 9.37, "y": -12.94574 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.303, "y": -24.20208 },
|
||||
{ "x": 3.323, "y": -24.20208 },
|
||||
{ "x": 3.323, "y": -24.508 },
|
||||
{ "x": 4.303, "y": -24.508 },
|
||||
{ "x": 4.303, "y": -24.20208 }
|
||||
],
|
||||
[
|
||||
{ "x": 22.72785, "y": -17.09251 },
|
||||
{ "x": 22.22638, "y": -17.09251 },
|
||||
{ "x": 22.22638, "y": -17.53884 },
|
||||
{ "x": 22.72785, "y": -17.53884 },
|
||||
{ "x": 22.72785, "y": -17.09251 }
|
||||
],
|
||||
[
|
||||
{ "x": 24.79221, "y": -21.106 },
|
||||
{ "x": 22.99592, "y": -21.106 },
|
||||
{ "x": 22.99592, "y": -22.106 },
|
||||
{ "x": 24.79221, "y": -22.106 },
|
||||
{ "x": 24.79221, "y": -21.106 }
|
||||
],
|
||||
[
|
||||
{ "x": 34.16841, "y": -5.455648 },
|
||||
{ "x": 33.56845, "y": -5.455648 },
|
||||
{ "x": 33.56845, "y": -5.682265 },
|
||||
{ "x": 34.16841, "y": -5.682265 },
|
||||
{ "x": 34.16841, "y": -5.455648 }
|
||||
],
|
||||
[
|
||||
{ "x": 35.77344, "y": -6.916783 },
|
||||
{ "x": 33.96344, "y": -6.916783 },
|
||||
{ "x": 33.96344, "y": -7.673556 },
|
||||
{ "x": 35.77344, "y": -7.673556 },
|
||||
{ "x": 35.77344, "y": -6.916783 }
|
||||
],
|
||||
[
|
||||
{ "x": 18.05003, "y": -25.48757 },
|
||||
{ "x": 17.57003, "y": -25.48757 },
|
||||
{ "x": 17.57003, "y": -25.70757 },
|
||||
{ "x": 18.05003, "y": -25.70757 },
|
||||
{ "x": 18.05003, "y": -25.48757 }
|
||||
],
|
||||
[
|
||||
{ "x": 18.77, "y": -25.59 },
|
||||
{ "x": 18.29, "y": -25.59 },
|
||||
{ "x": 18.29, "y": -25.81 },
|
||||
{ "x": 18.77, "y": -25.81 },
|
||||
{ "x": 18.77, "y": -25.59 }
|
||||
],
|
||||
[
|
||||
{ "x": 32.08207, "y": -11.78346 },
|
||||
{ "x": 31.60206, "y": -11.78346 },
|
||||
{ "x": 31.60206, "y": -12.00346 },
|
||||
{ "x": 32.08207, "y": -12.00346 },
|
||||
{ "x": 32.08207, "y": -11.78346 }
|
||||
],
|
||||
[
|
||||
{ "x": 12.63623, "y": -11.89787 },
|
||||
{ "x": 12.15623, "y": -11.89787 },
|
||||
{ "x": 12.15623, "y": -12.11787 },
|
||||
{ "x": 12.63623, "y": -12.11787 },
|
||||
{ "x": 12.63623, "y": -11.89787 }
|
||||
],
|
||||
[
|
||||
{ "x": 7.059857, "y": -16.24459 },
|
||||
{ "x": 6.579858, "y": -16.24459 },
|
||||
{ "x": 6.579858, "y": -16.46459 },
|
||||
{ "x": 7.059857, "y": -16.46459 },
|
||||
{ "x": 7.059857, "y": -16.24459 }
|
||||
],
|
||||
[
|
||||
{ "x": 1.571452, "y": -10.26345 },
|
||||
{ "x": 1.819386, "y": -10.43345 },
|
||||
{ "x": 2.262032, "y": -10.0961 },
|
||||
{ "x": 1.571452, "y": -10.26345 }
|
||||
],
|
||||
[
|
||||
{ "x": 1.334, "y": -24.403 },
|
||||
{ "x": 0.3184614, "y": -24.39593 },
|
||||
{ "x": 0.3239999, "y": -24.973 },
|
||||
{ "x": 0.674, "y": -24.973 },
|
||||
{ "x": 0.6772294, "y": -24.77208 },
|
||||
{ "x": 1.324769, "y": -24.75715 },
|
||||
{ "x": 1.334, "y": -24.403 }
|
||||
],
|
||||
[
|
||||
{ "x": 8.508034, "y": -23.93293 },
|
||||
{ "x": 8.629685, "y": -24.40218 },
|
||||
{ "x": 8.92936, "y": -24.96339 },
|
||||
{ "x": 9.599236, "y": -25.21856 },
|
||||
{ "x": 9.57372, "y": -22.93649 },
|
||||
{ "x": 8.644652, "y": -23.21924 },
|
||||
{ "x": 8.508034, "y": -23.93293 }
|
||||
],
|
||||
[
|
||||
{ "x": 11.67719, "y": -16.53101 },
|
||||
{ "x": 11.29618, "y": -16.53452 },
|
||||
{ "x": 11.06358, "y": -16.58503 },
|
||||
{ "x": 10.94267, "y": -16.71943 },
|
||||
{ "x": 10.93917, "y": -16.87988 },
|
||||
{ "x": 11.06962, "y": -17.01637 },
|
||||
{ "x": 11.56154, "y": -17.0409 },
|
||||
{ "x": 11.88714, "y": -16.91338 },
|
||||
{ "x": 11.89764, "y": -16.71949 },
|
||||
{ "x": 11.67719, "y": -16.53101 }
|
||||
],
|
||||
[
|
||||
{ "x": 21.01822, "y": -17.32524 },
|
||||
{ "x": 21.40012, "y": -17.168 },
|
||||
{ "x": 21.40401, "y": -17.06523 },
|
||||
{ "x": 21.00678, "y": -16.91912 },
|
||||
{ "x": 20.329, "y": -16.81467 },
|
||||
{ "x": 18.87623, "y": -16.81245 },
|
||||
{ "x": 18.07026, "y": -16.91774 },
|
||||
{ "x": 17.70623, "y": -17.03189 },
|
||||
{ "x": 17.71012, "y": -17.188 },
|
||||
{ "x": 17.74012, "y": -17.208 },
|
||||
{ "x": 18.04012, "y": -17.328 },
|
||||
{ "x": 18.83012, "y": -17.448 },
|
||||
{ "x": 20.22012, "y": -17.448 },
|
||||
{ "x": 21.01822, "y": -17.32524 }
|
||||
],
|
||||
[
|
||||
{ "x": 27.34005, "y": -6.938899 },
|
||||
{ "x": 27.93693, "y": -7.230727 },
|
||||
{ "x": 28.42066, "y": -6.909329 },
|
||||
{ "x": 27.80876, "y": -6.653845 },
|
||||
{ "x": 27.34005, "y": -6.938899 }
|
||||
],
|
||||
[
|
||||
{ "x": 16.65074, "y": -10.12311 },
|
||||
{ "x": 16.00821, "y": -10.30374 },
|
||||
{ "x": 15.95542, "y": -10.52961 },
|
||||
{ "x": 16.30542, "y": -10.77919 },
|
||||
{ "x": 16.83255, "y": -10.98451 },
|
||||
{ "x": 17.15542, "y": -10.73961 },
|
||||
{ "x": 17.15542, "y": -10.18961 },
|
||||
{ "x": 16.65074, "y": -10.12311 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.995, "y": -3.943596 },
|
||||
{ "x": 4.688505, "y": -4.143763 },
|
||||
{ "x": 4.360964, "y": -3.921563 },
|
||||
{ "x": 4.666411, "y": -3.684916 },
|
||||
{ "x": 4.995, "y": -3.943596 }
|
||||
],
|
||||
[
|
||||
{ "x": 24.537, "y": -2.915734 },
|
||||
{ "x": 24.2305, "y": -3.115901 },
|
||||
{ "x": 23.90296, "y": -2.893701 },
|
||||
{ "x": 24.20841, "y": -2.657055 },
|
||||
{ "x": 24.537, "y": -2.915734 }
|
||||
],
|
||||
[
|
||||
{ "x": 28.8746, "y": -18.89537 },
|
||||
{ "x": 32.58327, "y": -17.87351 },
|
||||
{ "x": 31.65491, "y": -17.43377 },
|
||||
{ "x": 28.904, "y": -18.19115 },
|
||||
{ "x": 28.8746, "y": -18.89537 }
|
||||
],
|
||||
[
|
||||
{ "x": 31.08879, "y": -13.97953 },
|
||||
{ "x": 30.4176, "y": -13.91366 },
|
||||
{ "x": 30.037, "y": -14.07843 },
|
||||
{ "x": 30.39278, "y": -14.2843 },
|
||||
{ "x": 30.83512, "y": -14.17834 },
|
||||
{ "x": 31.08879, "y": -13.97953 }
|
||||
],
|
||||
[
|
||||
{ "x": 32.36998, "y": -12.94724 },
|
||||
{ "x": 33.05407, "y": -13.68856 },
|
||||
{ "x": 34.27784, "y": -13.63817 },
|
||||
{ "x": 32.97806, "y": -11.86354 },
|
||||
{ "x": 32.30158, "y": -11.74354 },
|
||||
{ "x": 32.36998, "y": -12.94724 }
|
||||
],
|
||||
[
|
||||
{ "x": -0.3, "y": 0 },
|
||||
{ "x": 0.3, "y": 0.3 },
|
||||
{ "x": 0.6, "y": 0 },
|
||||
{ "x": 0.3, "y": 0.3 },
|
||||
{ "x": -0.6, "y": 0 }
|
||||
]
|
||||
]
|
629
src/collision/assets/skeld.json
Normal file
629
src/collision/assets/skeld.json
Normal file
@ -0,0 +1,629 @@
|
||||
[
|
||||
[
|
||||
{ "x": 0.2362284, "y": -7.726103 },
|
||||
{ "x": 2.013968, "y": -7.715738 },
|
||||
{ "x": 2.011803, "y": -10.30677 },
|
||||
{ "x": 6.082888, "y": -10.30429 },
|
||||
{ "x": 6.962117, "y": -9.435246 },
|
||||
{ "x": 6.962895, "y": -6.817364 },
|
||||
{ "x": 6.706806, "y": -6.619056 },
|
||||
{ "x": 6.232102, "y": -6.602984 },
|
||||
{ "x": 6.176251, "y": -6.938542 },
|
||||
{ "x": 3.060317, "y": -6.960407 },
|
||||
{ "x": 3.011859, "y": -6.6034 },
|
||||
{ "x": 0.2607511, "y": -6.571015 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.8954936, "y": -6.595578 },
|
||||
{ "x": 0.08411826, "y": -6.767831 },
|
||||
{ "x": 0.05762036, "y": -4.452175 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.07118475, "y": -8.635859 },
|
||||
{ "x": 0.08622147, "y": -7.654803 },
|
||||
{ "x": 0.9666418, "y": -7.737996 }
|
||||
],
|
||||
[
|
||||
{ "x": -1.460379, "y": -8.631944 },
|
||||
{ "x": -1.462344, "y": -4.483645 }
|
||||
],
|
||||
[
|
||||
{ "x": -7.368402, "y": 1.584177 },
|
||||
{ "x": -6.555078, "y": 1.57672 },
|
||||
{ "x": -6.557156, "y": 4.008165 },
|
||||
{ "x": -4.60883, "y": 5.933904 },
|
||||
{ "x": 1.670171, "y": 5.95224 },
|
||||
{ "x": 4.543502, "y": 3.066632 },
|
||||
{ "x": 4.553433, "y": 1.587478 },
|
||||
{ "x": 5.637702, "y": 1.583386 }
|
||||
],
|
||||
[
|
||||
{ "x": -0.2999234, "y": -5.142708 },
|
||||
{ "x": -0.2951662, "y": -4.452511 },
|
||||
{ "x": 1.997185, "y": -4.436467 },
|
||||
{ "x": 4.564693, "y": -1.878594 },
|
||||
{ "x": 4.549082, "y": 0.4435357 },
|
||||
{ "x": 5.659974, "y": 0.4535991 }
|
||||
],
|
||||
[
|
||||
{ "x": -7.401506, "y": 0.4553653 },
|
||||
{ "x": -6.580028, "y": 0.4451815 },
|
||||
{ "x": -6.567801, "y": -1.97265 },
|
||||
{ "x": -4.072343, "y": -4.44449 },
|
||||
{ "x": -1.812371, "y": -4.433851 },
|
||||
{ "x": -1.811063, "y": -5.56378 }
|
||||
],
|
||||
[
|
||||
{ "x": 14.56604, "y": -4.229232 },
|
||||
{ "x": 15.64946, "y": -4.230859 },
|
||||
{ "x": 15.65051, "y": -2.836758 },
|
||||
{ "x": 17.51895, "y": -2.849281 },
|
||||
{ "x": 19.1273, "y": -4.154813 },
|
||||
{ "x": 19.13222, "y": -5.43117 },
|
||||
{ "x": 17.50414, "y": -6.75653 },
|
||||
{ "x": 15.63534, "y": -6.741789 },
|
||||
{ "x": 15.64649, "y": -5.373594 },
|
||||
{ "x": 14.97682, "y": -5.367826 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.952006, "y": 1.57443 },
|
||||
{ "x": 6.752982, "y": 1.585721 },
|
||||
{ "x": 7.033926, "y": 1.475315 },
|
||||
{ "x": 7.801225, "y": 1.480557 },
|
||||
{ "x": 7.989945, "y": 2.125443 },
|
||||
{ "x": 8.366776, "y": 2.596887 },
|
||||
{ "x": 8.386627, "y": 3.642199 },
|
||||
{ "x": 9.479401, "y": 3.64006 },
|
||||
{ "x": 11.58195, "y": 1.583232 },
|
||||
{ "x": 10.50412, "y": 1.58118 },
|
||||
{ "x": 10.46297, "y": 1.088706 },
|
||||
{ "x": 10.14301, "y": 0.6494932 },
|
||||
{ "x": 10.15121, "y": -1.103494 },
|
||||
{ "x": 10.2626, "y": -1.332904 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.956852, "y": 0.4148467 },
|
||||
{ "x": 7.101061, "y": 0.4562553 },
|
||||
{ "x": 7.263814, "y": 0.3892393 },
|
||||
{ "x": 8.363285, "y": 0.3629824 },
|
||||
{ "x": 8.846294, "y": 0.135911 },
|
||||
{ "x": 8.820242, "y": -1.119593 },
|
||||
{ "x": 8.771524, "y": -1.311896 }
|
||||
],
|
||||
[
|
||||
{ "x": 8.222275, "y": -4.019724 },
|
||||
{ "x": 7.755623, "y": -4.004018 },
|
||||
{ "x": 7.610951, "y": -4.239169 },
|
||||
{ "x": 7.185065, "y": -4.238694 },
|
||||
{ "x": 7.009696, "y": -4.505672 },
|
||||
{ "x": 7.019401, "y": -5.130587 },
|
||||
{ "x": 6.245888, "y": -5.137787 },
|
||||
{ "x": 6.252361, "y": -4.420362 },
|
||||
{ "x": 6.121649, "y": -4.258716 },
|
||||
{ "x": 5.744867, "y": -4.264971 },
|
||||
{ "x": 5.575344, "y": -4.418731 },
|
||||
{ "x": 5.553154, "y": -5.131573 },
|
||||
{ "x": 4.840867, "y": -5.133445 },
|
||||
{ "x": 4.825717, "y": -4.378825 },
|
||||
{ "x": 4.445279, "y": -4.140391 },
|
||||
{ "x": 5.200883, "y": -3.392043 },
|
||||
{ "x": 5.570336, "y": -3.395252 },
|
||||
{ "x": 6.07529, "y": -2.981499 },
|
||||
{ "x": 6.987266, "y": -2.986429 },
|
||||
{ "x": 7.193809, "y": -2.857087 },
|
||||
{ "x": 8.241753, "y": -2.880474 }
|
||||
],
|
||||
[
|
||||
{ "x": 6.565016, "y": -11.72411 },
|
||||
{ "x": 6.987641, "y": -11.79513 },
|
||||
{ "x": 7.896163, "y": -11.79405 },
|
||||
{ "x": 8.188145, "y": -11.67882 },
|
||||
{ "x": 8.455678, "y": -11.41463 },
|
||||
{ "x": 8.826189, "y": -11.20363 },
|
||||
{ "x": 8.838142, "y": -10.35416 },
|
||||
{ "x": 8.728677, "y": -9.931278 }
|
||||
],
|
||||
[
|
||||
{ "x": 6.575041, "y": -12.87208 },
|
||||
{ "x": 7.911303, "y": -12.93333 },
|
||||
{ "x": 8.129161, "y": -13.3627 },
|
||||
{ "x": 8.807487, "y": -13.87456 },
|
||||
{ "x": 8.824697, "y": -14.20615 },
|
||||
{ "x": 7.358915, "y": -14.20941 },
|
||||
{ "x": 7.3613, "y": -14.74166 },
|
||||
{ "x": 8.720889, "y": -14.71317 },
|
||||
{ "x": 8.717556, "y": -14.93626 },
|
||||
{ "x": 9.488122, "y": -14.93082 },
|
||||
{ "x": 10.1447, "y": -14.29308 },
|
||||
{ "x": 10.12637, "y": -13.5075 },
|
||||
{ "x": 10.55909, "y": -12.89536 },
|
||||
{ "x": 10.55823, "y": -12.24413 },
|
||||
{ "x": 10.14061, "y": -11.52396 },
|
||||
{ "x": 10.14535, "y": -10.80471 },
|
||||
{ "x": 11.66409, "y": -10.79793 },
|
||||
{ "x": 11.65609, "y": -10.42626 },
|
||||
{ "x": 10.26556, "y": -10.42765 },
|
||||
{ "x": 10.24841, "y": -9.86418 }
|
||||
],
|
||||
[
|
||||
{ "x": 15.17467, "y": -4.419531 },
|
||||
{ "x": 12.64121, "y": -4.44558 },
|
||||
{ "x": 12.63906, "y": -2.948531 },
|
||||
{ "x": 10.23936, "y": -3.092088 },
|
||||
{ "x": 10.22813, "y": -0.9974822 }
|
||||
],
|
||||
[
|
||||
{ "x": 10.24439, "y": -10.28774 },
|
||||
{ "x": 10.25753, "y": -7.140551 },
|
||||
{ "x": 12.62506, "y": -7.155302 },
|
||||
{ "x": 12.63361, "y": -5.415534 },
|
||||
{ "x": 15.18507, "y": -5.4197 }
|
||||
],
|
||||
[
|
||||
{ "x": 8.746116, "y": -10.24708 },
|
||||
{ "x": 8.741796, "y": -6.048161 },
|
||||
{ "x": 11.1656, "y": -6.042319 },
|
||||
{ "x": 11.16558, "y": -4.080832 },
|
||||
{ "x": 7.765801, "y": -4.095026 }
|
||||
],
|
||||
[
|
||||
{ "x": 7.799847, "y": -2.876018 },
|
||||
{ "x": 8.758554, "y": -2.886162 },
|
||||
{ "x": 8.773032, "y": -0.922443 }
|
||||
],
|
||||
[
|
||||
{ "x": -14.81697, "y": -11.22099 },
|
||||
{ "x": -11.38458, "y": -11.21203 },
|
||||
{ "x": -11.37703, "y": -14.06057 },
|
||||
{ "x": -10.22454, "y": -14.0326 },
|
||||
{ "x": -10.21113, "y": -10.33264 },
|
||||
{ "x": -7.675366, "y": -10.31545 }
|
||||
],
|
||||
[
|
||||
{ "x": -7.695002, "y": -10.31545 },
|
||||
{ "x": -7.695909, "y": -9.451391 },
|
||||
{ "x": -10.11512, "y": -9.437295 },
|
||||
{ "x": -10.13741, "y": -7.76803 },
|
||||
{ "x": -6.895009, "y": -7.855294 },
|
||||
{ "x": -6.745681, "y": -7.990388 },
|
||||
{ "x": -5.197094, "y": -7.945567 },
|
||||
{ "x": -5.198377, "y": -8.148785 },
|
||||
{ "x": -6.449782, "y": -9.321177 },
|
||||
{ "x": -6.435663, "y": -11.45714 },
|
||||
{ "x": -7.44524, "y": -12.40876 },
|
||||
{ "x": -8.85337, "y": -12.36879 },
|
||||
{ "x": -8.805441, "y": -14.07697 }
|
||||
],
|
||||
[
|
||||
{ "x": -8.805441, "y": -14.07697 },
|
||||
{ "x": -5.374582, "y": -14.06365 }
|
||||
],
|
||||
[
|
||||
{ "x": -14.81383, "y": -12.35692 },
|
||||
{ "x": -12.88635, "y": -12.35124 },
|
||||
{ "x": -12.88583, "y": -15.19543 },
|
||||
{ "x": -5.270284, "y": -15.17392 }
|
||||
],
|
||||
[
|
||||
{ "x": -18.90468, "y": -4.917564 },
|
||||
{ "x": -19.21733, "y": -4.914915 },
|
||||
{ "x": -19.25125, "y": -3.487691 },
|
||||
{ "x": -20.80061, "y": -3.466249 },
|
||||
{ "x": -20.82514, "y": -1.781794 },
|
||||
{ "x": -21.77498, "y": -1.781393 },
|
||||
{ "x": -22.19863, "y": -2.061523 },
|
||||
{ "x": -22.18964, "y": -2.351079 },
|
||||
{ "x": -22.92343, "y": -2.855991 },
|
||||
{ "x": -22.93843, "y": -3.568924 },
|
||||
{ "x": -22.23674, "y": -3.921036 },
|
||||
{ "x": -21.91414, "y": -4.717618 },
|
||||
{ "x": -21.90926, "y": -5.25623 },
|
||||
{ "x": -21.48744, "y": -5.424995 },
|
||||
{ "x": -21.48222, "y": -5.773309 },
|
||||
{ "x": -21.60671, "y": -5.917229 },
|
||||
{ "x": -21.98811, "y": -5.893168 },
|
||||
{ "x": -21.98224, "y": -6.374194 },
|
||||
{ "x": -22.23363, "y": -6.524475 },
|
||||
{ "x": -22.58218, "y": -6.172986 },
|
||||
{ "x": -22.88113, "y": -6.147035 },
|
||||
{ "x": -22.92309, "y": -8.299733 },
|
||||
{ "x": -21.77963, "y": -9.033682 },
|
||||
{ "x": -20.80727, "y": -9.037098 },
|
||||
{ "x": -20.82744, "y": -7.339758 },
|
||||
{ "x": -19.23684, "y": -7.333115 },
|
||||
{ "x": -19.2312, "y": -6.027665 },
|
||||
{ "x": -18.87985, "y": -6.043848 }
|
||||
],
|
||||
[
|
||||
{ "x": 1.514437, "y": -12.88248 },
|
||||
{ "x": 0.9000312, "y": -12.87428 },
|
||||
{ "x": 0.9177916, "y": -17.50703 },
|
||||
{ "x": -3.021377, "y": -17.54297 },
|
||||
{ "x": -5.077038, "y": -15.46409 },
|
||||
{ "x": -5.080357, "y": -15.18036 },
|
||||
{ "x": -5.737282, "y": -15.17595 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.02917442, "y": -7.893129 },
|
||||
{ "x": 0.03507514, "y": -9.129563 },
|
||||
{ "x": 0.9134803, "y": -9.266632 },
|
||||
{ "x": 0.9189174, "y": -11.73293 },
|
||||
{ "x": 1.625746, "y": -11.7288 }
|
||||
],
|
||||
[
|
||||
{ "x": -5.709477, "y": -14.03647 },
|
||||
{ "x": -5.07719, "y": -14.0213 },
|
||||
{ "x": -5.074898, "y": -11.00069 },
|
||||
{ "x": -4.480464, "y": -10.70592 },
|
||||
{ "x": -4.46635, "y": -10.3222 },
|
||||
{ "x": -2.930291, "y": -9.498736 },
|
||||
{ "x": -2.852392, "y": -9.117779 },
|
||||
{ "x": -1.468678, "y": -9.132879 },
|
||||
{ "x": -1.450918, "y": -8.018958 }
|
||||
],
|
||||
[
|
||||
{ "x": -17.66159, "y": -8.313709 },
|
||||
{ "x": -17.66675, "y": -9.546221 },
|
||||
{ "x": -19.51328, "y": -9.537824 },
|
||||
{ "x": -19.51333, "y": -13.05503 },
|
||||
{ "x": -18.33128, "y": -13.99051 },
|
||||
{ "x": -14.8677, "y": -13.99421 },
|
||||
{ "x": -14.86014, "y": -12.34251 },
|
||||
{ "x": -14.46036, "y": -12.34108 }
|
||||
],
|
||||
[
|
||||
{ "x": -16.16101, "y": -8.316375 },
|
||||
{ "x": -16.16359, "y": -9.572023 },
|
||||
{ "x": -14.88622, "y": -9.570913 },
|
||||
{ "x": -14.88741, "y": -11.21787 },
|
||||
{ "x": -14.32632, "y": -11.20666 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.97958, "y": -11.76019 },
|
||||
{ "x": 6.992189, "y": -11.7485 }
|
||||
],
|
||||
[
|
||||
{ "x": 0.9887347, "y": -12.91188 },
|
||||
{ "x": 4.368167, "y": -12.876 },
|
||||
{ "x": 4.358963, "y": -13.96144 }
|
||||
],
|
||||
[
|
||||
{ "x": 5.864928, "y": -13.42998 },
|
||||
{ "x": 5.870777, "y": -12.87888 },
|
||||
{ "x": 6.897767, "y": -12.87967 }
|
||||
],
|
||||
[
|
||||
{ "x": -15.03895, "y": 1.597145 },
|
||||
{ "x": -6.570155, "y": 1.575777 }
|
||||
],
|
||||
[
|
||||
{ "x": -15.1985, "y": 0.4579078 },
|
||||
{ "x": -10.23706, "y": 0.4484872 },
|
||||
{ "x": -10.23486, "y": -0.4350799 }
|
||||
],
|
||||
[
|
||||
{ "x": -8.766523, "y": -0.6480405 },
|
||||
{ "x": -8.767955, "y": 0.4350485 },
|
||||
{ "x": -6.58421, "y": 0.4233765 }
|
||||
],
|
||||
[
|
||||
{ "x": -14.63285, "y": -4.891836 },
|
||||
{ "x": -16.24534, "y": -4.88406 },
|
||||
{ "x": -16.24988, "y": -1.635784 }
|
||||
],
|
||||
[
|
||||
{ "x": -17.56018, "y": -1.635784 },
|
||||
{ "x": -17.5364, "y": -3.693102 },
|
||||
{ "x": -17.65632, "y": -4.623451 },
|
||||
{ "x": -17.45963, "y": -4.732869 },
|
||||
{ "x": -17.46077, "y": -4.988844 },
|
||||
{ "x": -19.02956, "y": -5.000385 }
|
||||
],
|
||||
[
|
||||
{ "x": -16.16554, "y": -9.545579 },
|
||||
{ "x": -16.20093, "y": -7.663517 },
|
||||
{ "x": -16.33388, "y": -7.573332 },
|
||||
{ "x": -16.31617, "y": -6.972282 },
|
||||
{ "x": -16.15963, "y": -6.06042 },
|
||||
{ "x": -14.49686, "y": -6.07415 }
|
||||
],
|
||||
[
|
||||
{ "x": -18.98414, "y": -6.040682 },
|
||||
{ "x": -17.65042, "y": -6.052687 },
|
||||
{ "x": -17.67024, "y": -9.558265 }
|
||||
],
|
||||
[
|
||||
{ "x": -14.56532, "y": 1.662872 },
|
||||
{ "x": -14.90609, "y": 1.650298 },
|
||||
{ "x": -14.88668, "y": 2.885079 },
|
||||
{ "x": -18.32795, "y": 2.894751 },
|
||||
{ "x": -19.52896, "y": 1.864622 },
|
||||
{ "x": -19.52396, "y": -1.570519 },
|
||||
{ "x": -17.71379, "y": -1.537421 },
|
||||
{ "x": -17.68546, "y": -2.032646 }
|
||||
],
|
||||
[
|
||||
{ "x": -14.55745, "y": 0.4402371 },
|
||||
{ "x": -14.85756, "y": 0.4410935 },
|
||||
{ "x": -14.83369, "y": -1.524606 },
|
||||
{ "x": -16.12798, "y": -1.591758 },
|
||||
{ "x": -16.13887, "y": -2.05983 }
|
||||
],
|
||||
[
|
||||
{ "x": 4.390248, "y": -12.89099 },
|
||||
{ "x": 4.412769, "y": -14.44803 },
|
||||
{ "x": 4.073301, "y": -14.74718 },
|
||||
{ "x": 1.539549, "y": -14.71471 },
|
||||
{ "x": 1.546466, "y": -15.85303 },
|
||||
{ "x": 2.15479, "y": -15.84039 },
|
||||
{ "x": 2.124448, "y": -16.75854 },
|
||||
{ "x": 1.752654, "y": -16.75457 },
|
||||
{ "x": 2.532989, "y": -17.46411 },
|
||||
{ "x": 2.886859, "y": -17.46804 },
|
||||
{ "x": 2.883881, "y": -16.92094 },
|
||||
{ "x": 3.369814, "y": -17.0816 },
|
||||
{ "x": 3.656673, "y": -16.95642 },
|
||||
{ "x": 4.00171, "y": -16.79352 },
|
||||
{ "x": 4.377112, "y": -16.82868 },
|
||||
{ "x": 4.413591, "y": -17.07326 },
|
||||
{ "x": 4.874448, "y": -17.04011 },
|
||||
{ "x": 5.397761, "y": -16.8904 },
|
||||
{ "x": 5.406366, "y": -17.49508 },
|
||||
{ "x": 5.998445, "y": -16.9528 },
|
||||
{ "x": 6.004679, "y": -15.85465 },
|
||||
{ "x": 6.492789, "y": -15.85043 },
|
||||
{ "x": 6.49343, "y": -14.44846 },
|
||||
{ "x": 5.879263, "y": -14.47317 },
|
||||
{ "x": 5.880812, "y": -12.86388 }
|
||||
],
|
||||
[
|
||||
{ "x": -15.45731, "y": -4.882467 },
|
||||
{ "x": -14.46863, "y": -4.895476 },
|
||||
{ "x": -14.47101, "y": -3.812231 },
|
||||
{ "x": -13.55466, "y": -2.877563 },
|
||||
{ "x": -13.45982, "y": -3.3577 },
|
||||
{ "x": -13.1225, "y": -3.353385 },
|
||||
{ "x": -13.08784, "y": -2.893233 },
|
||||
{ "x": -12.57413, "y": -2.867874 },
|
||||
{ "x": -11.92476, "y": -3.50242 },
|
||||
{ "x": -11.93444, "y": -4.685921 },
|
||||
{ "x": -12.92189, "y": -4.678928 },
|
||||
{ "x": -12.92335, "y": -5.555384 },
|
||||
{ "x": -12.75325, "y": -5.688099 },
|
||||
{ "x": -12.42195, "y": -5.651134 },
|
||||
{ "x": -12.38069, "y": -5.922665 },
|
||||
{ "x": -11.94423, "y": -5.987844 },
|
||||
{ "x": -11.91953, "y": -6.434968 },
|
||||
{ "x": -12.05945, "y": -6.434929 },
|
||||
{ "x": -12.06055, "y": -7.300493 },
|
||||
{ "x": -14.32722, "y": -7.307874 },
|
||||
{ "x": -14.32708, "y": -6.44428 },
|
||||
{ "x": -14.46767, "y": -6.447207 },
|
||||
{ "x": -14.47318, "y": -6.049348 },
|
||||
{ "x": -15.37626, "y": -6.048749 }
|
||||
],
|
||||
[
|
||||
{ "x": -9.896128, "y": 0.09396344 },
|
||||
{ "x": -9.906479, "y": -1.014971 },
|
||||
{ "x": -11.16, "y": -1.020813 },
|
||||
{ "x": -11.12743, "y": -4.796037 },
|
||||
{ "x": -10.33474, "y": -5.799318 },
|
||||
{ "x": -5.22831, "y": -5.799926 },
|
||||
{ "x": -5.220803, "y": -5.351019 },
|
||||
{ "x": -5.824704, "y": -4.780326 },
|
||||
{ "x": -5.461809, "y": -4.228658 },
|
||||
{ "x": -6.392942, "y": -3.4428 },
|
||||
{ "x": -6.636661, "y": -3.934034 },
|
||||
{ "x": -6.987354, "y": -3.613638 },
|
||||
{ "x": -6.967412, "y": -1.019102 },
|
||||
{ "x": -8.405022, "y": -1.028633 },
|
||||
{ "x": -8.408207, "y": 0.2032199 }
|
||||
],
|
||||
[
|
||||
{ "x": 3.33, "y": -8.261624 },
|
||||
{ "x": 3.33, "y": -9.313201 },
|
||||
{ "x": 5.765989, "y": -9.313227 },
|
||||
{ "x": 5.742, "y": -8.261624 },
|
||||
{ "x": 3.33, "y": -8.261624 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.88076, "y": -6.179931 },
|
||||
{ "x": 17.45793, "y": -6.386068 },
|
||||
{ "x": 17.72214, "y": -6.643311 },
|
||||
{ "x": 18.11662, "y": -6.310138 },
|
||||
{ "x": 17.88076, "y": -6.179931 }
|
||||
],
|
||||
[
|
||||
{ "x": 18.50979, "y": -4.473197 },
|
||||
{ "x": 18.06764, "y": -4.467421 },
|
||||
{ "x": 17.77722, "y": -4.937558 },
|
||||
{ "x": 18.57143, "y": -4.977489 },
|
||||
{ "x": 18.50979, "y": -4.473197 }
|
||||
],
|
||||
[
|
||||
{ "x": 17.65212, "y": -3.412386 },
|
||||
{ "x": 17.2644, "y": -3.7608 },
|
||||
{ "x": 17.72674, "y": -3.964799 },
|
||||
{ "x": 18.16902, "y": -3.658661 },
|
||||
{ "x": 17.65212, "y": -3.412386 }
|
||||
],
|
||||
[
|
||||
{ "x": -0.6781706, "y": -13.55313 },
|
||||
{ "x": -0.5186334, "y": -13.65023 },
|
||||
{ "x": -0.356359, "y": -13.66372 },
|
||||
{ "x": -0.1854412, "y": -13.57278 },
|
||||
{ "x": -0.1816655, "y": -13.09209 },
|
||||
{ "x": -0.2930961, "y": -12.94377 }
|
||||
],
|
||||
[
|
||||
{ "x": -3.246386, "y": -12.28785 },
|
||||
{ "x": -3.709773, "y": -12.07104 },
|
||||
{ "x": -4.100151, "y": -12.41943 },
|
||||
{ "x": -4.086681, "y": -12.96832 },
|
||||
{ "x": -3.531352, "y": -13.16967 },
|
||||
{ "x": -3.234791, "y": -12.87577 },
|
||||
{ "x": -3.238448, "y": -13.60751 },
|
||||
{ "x": -2.558987, "y": -13.60691 },
|
||||
{ "x": -2.55681, "y": -14.15934 },
|
||||
{ "x": -2.294851, "y": -14.15913 },
|
||||
{ "x": -2.283567, "y": -14.56503 },
|
||||
{ "x": -1.581326, "y": -14.83519 },
|
||||
{ "x": -1.148905, "y": -14.39955 },
|
||||
{ "x": -1.143201, "y": -14.16828 },
|
||||
{ "x": -0.6143369, "y": -14.17394 },
|
||||
{ "x": -0.6246856, "y": -13.58801 },
|
||||
{ "x": -0.2763608, "y": -12.96624 },
|
||||
{ "x": -0.283671, "y": -11.13291 },
|
||||
{ "x": -1.927792, "y": -11.11836 },
|
||||
{ "x": -1.925223, "y": -11.35053 },
|
||||
{ "x": -3.245068, "y": -11.37238 },
|
||||
{ "x": -3.246306, "y": -12.29369 }
|
||||
],
|
||||
[
|
||||
{ "x": -15.80511, "y": -11.39031 },
|
||||
{ "x": -15.91522, "y": -10.76074 },
|
||||
{ "x": -16.07204, "y": -10.53166 },
|
||||
{ "x": -18.71611, "y": -10.4536 },
|
||||
{ "x": -19.24034, "y": -10.09965 },
|
||||
{ "x": -19.53993, "y": -10.4893 },
|
||||
{ "x": -19.49779, "y": -13.02382 },
|
||||
{ "x": -18.53159, "y": -13.02814 },
|
||||
{ "x": -18.40778, "y": -12.43455 },
|
||||
{ "x": -16.19409, "y": -12.45347 },
|
||||
{ "x": -15.88496, "y": -12.03066 },
|
||||
{ "x": -15.80511, "y": -11.39031 }
|
||||
],
|
||||
[
|
||||
{ "x": -15.83031, "y": 0.8088304 },
|
||||
{ "x": -15.94042, "y": 1.436132 },
|
||||
{ "x": -16.09725, "y": 1.664383 },
|
||||
{ "x": -18.74131, "y": 1.742164 },
|
||||
{ "x": -19.26554, "y": 2.094836 },
|
||||
{ "x": -19.56513, "y": 1.706586 },
|
||||
{ "x": -19.52299, "y": -0.8187767 },
|
||||
{ "x": -18.55679, "y": -0.823085 },
|
||||
{ "x": -18.43298, "y": -0.2316318 },
|
||||
{ "x": -16.21929, "y": -0.2504853 },
|
||||
{ "x": -15.91016, "y": 0.1707977 },
|
||||
{ "x": -15.83031, "y": 0.8088304 }
|
||||
],
|
||||
[
|
||||
{ "x": -16.22955, "y": -12.49125 },
|
||||
{ "x": -15.74837, "y": -12.49532 },
|
||||
{ "x": -15.72997, "y": -10.52501 },
|
||||
{ "x": -16.2295, "y": -10.52501 }
|
||||
],
|
||||
[
|
||||
{ "x": -16.25475, "y": -0.2881263 },
|
||||
{ "x": -15.77357, "y": -0.2921864 },
|
||||
{ "x": -15.75517, "y": 1.671011 },
|
||||
{ "x": -16.2547, "y": 1.671011 }
|
||||
],
|
||||
[
|
||||
{ "x": 16.476, "y": -5.988 },
|
||||
{ "x": 15.54, "y": -5.988 },
|
||||
{ "x": 15.54, "y": -6.78 },
|
||||
{ "x": 16.476, "y": -6.78 },
|
||||
{ "x": 16.476, "y": -5.988 }
|
||||
],
|
||||
[
|
||||
{ "x": 16.476, "y": -2.772 },
|
||||
{ "x": 15.54, "y": -2.772 },
|
||||
{ "x": 15.54, "y": -3.564 },
|
||||
{ "x": 16.476, "y": -3.564 },
|
||||
{ "x": 16.476, "y": -2.772 }
|
||||
],
|
||||
[
|
||||
{ "x": -6.957, "y": -2.549 },
|
||||
{ "x": -8.067, "y": -2.549 },
|
||||
{ "x": -8.067, "y": -3.379 },
|
||||
{ "x": -6.957, "y": -3.379 },
|
||||
{ "x": -6.957, "y": -2.549 }
|
||||
],
|
||||
[
|
||||
{ "x": -10.077, "y": -2.549 },
|
||||
{ "x": -11.187, "y": -2.549 },
|
||||
{ "x": -11.187, "y": -3.379 },
|
||||
{ "x": -10.077, "y": -3.379 },
|
||||
{ "x": -10.077, "y": -2.549 }
|
||||
],
|
||||
[
|
||||
{ "x": -6.957, "y": -1.229 },
|
||||
{ "x": -8.067, "y": -1.229 },
|
||||
{ "x": -8.067, "y": -2.059 },
|
||||
{ "x": -6.957, "y": -2.059 },
|
||||
{ "x": -6.957, "y": -1.229 }
|
||||
],
|
||||
[
|
||||
{ "x": -10.077, "y": -1.229 },
|
||||
{ "x": -11.187, "y": -1.229 },
|
||||
{ "x": -11.187, "y": -2.059 },
|
||||
{ "x": -10.077, "y": -2.059 },
|
||||
{ "x": -10.077, "y": -1.229 }
|
||||
],
|
||||
[
|
||||
{ "x": -2.910683, "y": 2.348959 },
|
||||
{ "x": -2.188303, "y": 2.785507 },
|
||||
{ "x": -1.933683, "y": 3.511235 },
|
||||
{ "x": -2.064806, "y": 3.991863 },
|
||||
{ "x": -2.610682, "y": 4.384067 },
|
||||
{ "x": -3.341935, "y": 4.587026 },
|
||||
{ "x": -4.275301, "y": 4.375321 },
|
||||
{ "x": -4.825263, "y": 3.795358 },
|
||||
{ "x": -4.775846, "y": 2.94697 },
|
||||
{ "x": -4.058721, "y": 2.382533 },
|
||||
{ "x": -2.910683, "y": 2.348959 }
|
||||
],
|
||||
[
|
||||
{ "x": 2.014117, "y": 2.371759 },
|
||||
{ "x": 2.736497, "y": 2.808307 },
|
||||
{ "x": 2.991117, "y": 3.534035 },
|
||||
{ "x": 2.859994, "y": 4.014663 },
|
||||
{ "x": 2.314118, "y": 4.406867 },
|
||||
{ "x": 1.582865, "y": 4.609826 },
|
||||
{ "x": 0.6494999, "y": 4.398121 },
|
||||
{ "x": 0.09953787, "y": 3.818158 },
|
||||
{ "x": 0.1489543, "y": 2.96977 },
|
||||
{ "x": 0.8660797, "y": 2.405333 },
|
||||
{ "x": 2.014117, "y": 2.371759 }
|
||||
],
|
||||
[
|
||||
{ "x": -0.3918829, "y": -0.2814406 },
|
||||
{ "x": 0.3304967, "y": 0.1551068 },
|
||||
{ "x": 0.5851166, "y": 0.8808349 },
|
||||
{ "x": 0.4539942, "y": 1.361462 },
|
||||
{ "x": -0.09188195, "y": 1.753667 },
|
||||
{ "x": -0.8231351, "y": 1.956626 },
|
||||
{ "x": -1.7565, "y": 1.744921 },
|
||||
{ "x": -2.306462, "y": 1.164958 },
|
||||
{ "x": -2.257046, "y": 0.31657 },
|
||||
{ "x": -1.53992, "y": -0.2478667 },
|
||||
{ "x": -0.3918829, "y": -0.2814406 }
|
||||
],
|
||||
[
|
||||
{ "x": -2.939483, "y": -2.830241 },
|
||||
{ "x": -2.217103, "y": -2.393693 },
|
||||
{ "x": -1.962484, "y": -1.667965 },
|
||||
{ "x": -2.093606, "y": -1.187338 },
|
||||
{ "x": -2.639482, "y": -0.7951334 },
|
||||
{ "x": -3.370735, "y": -0.5921744 },
|
||||
{ "x": -4.304101, "y": -0.8038793 },
|
||||
{ "x": -4.854062, "y": -1.383842 },
|
||||
{ "x": -4.804646, "y": -2.23223 },
|
||||
{ "x": -4.087521, "y": -2.796667 },
|
||||
{ "x": -2.939483, "y": -2.830241 }
|
||||
],
|
||||
[
|
||||
{ "x": 2.054917, "y": -2.830241 },
|
||||
{ "x": 2.777297, "y": -2.393693 },
|
||||
{ "x": 3.031917, "y": -1.667965 },
|
||||
{ "x": 2.900795, "y": -1.187338 },
|
||||
{ "x": 2.354918, "y": -0.7951334 },
|
||||
{ "x": 1.623665, "y": -0.5921744 },
|
||||
{ "x": 0.6902999, "y": -0.8038793 },
|
||||
{ "x": 0.1403379, "y": -1.383842 },
|
||||
{ "x": 0.1897544, "y": -2.23223 },
|
||||
{ "x": 0.9068797, "y": -2.796667 },
|
||||
{ "x": 2.054917, "y": -2.830241 }
|
||||
]
|
||||
]
|
6
src/collision/collisionassets.go
Normal file
6
src/collision/collisionassets.go
Normal file
@ -0,0 +1,6 @@
|
||||
package collision
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed assets
|
||||
var CollisionAssetsFolder embed.FS
|
35
src/collision/collisionmath.go
Normal file
35
src/collision/collisionmath.go
Normal file
@ -0,0 +1,35 @@
|
||||
package collision
|
||||
|
||||
import (
|
||||
"codehub.onpointcoding.net/sean/go-susapp/util"
|
||||
)
|
||||
|
||||
func CollisionLineCircle(a util.Vec2, b util.Vec2, c util.Vec2, r float32) (bool, util.Vec2) {
|
||||
linelen := util.Dist32(a, b)
|
||||
|
||||
dot := (((c.X - a.X) * (b.X - a.X)) + ((c.Y - a.Y) * (b.Y - a.Y))) / (linelen * linelen)
|
||||
closest := util.NewVec2(a.X+(dot*(b.X-a.X)), a.Y+(dot*(b.Y-a.Y)))
|
||||
|
||||
onSegment := CollisionLinePoint(a, b, closest, 0.00001)
|
||||
if !onSegment {
|
||||
return false, closest
|
||||
}
|
||||
|
||||
closestdist := util.Dist32(closest, c)
|
||||
return closestdist <= r, closest
|
||||
}
|
||||
|
||||
func CollisionPointCircle(a util.Vec2, c util.Vec2, r float32) bool {
|
||||
pointdist := util.NewVec2(a.X-c.X, a.Y-c.Y)
|
||||
pointlen := util.Sqrt32((pointdist.X * pointdist.X) + (pointdist.Y * pointdist.Y))
|
||||
|
||||
return pointlen <= r
|
||||
}
|
||||
|
||||
func CollisionLinePoint(a util.Vec2, b util.Vec2, c util.Vec2, t float32) bool {
|
||||
d1 := util.Dist32(c, a)
|
||||
d2 := util.Dist32(c, b)
|
||||
|
||||
linelen := util.Dist32(a, b)
|
||||
return d1+d2 >= linelen-t && d1+d2 <= linelen+t
|
||||
}
|
12
src/collision/go.mod
Normal file
12
src/collision/go.mod
Normal file
@ -0,0 +1,12 @@
|
||||
module codehub.onpointcoding.net/sean/go-susapp/collision
|
||||
|
||||
go 1.17
|
||||
|
||||
|
||||
replace (
|
||||
codehub.onpointcoding.net/sean/go-susapp/util => ../util
|
||||
)
|
||||
|
||||
require (
|
||||
codehub.onpointcoding.net/sean/go-susapp/util v1.0.0
|
||||
)
|
19
src/collision/parser.go
Normal file
19
src/collision/parser.go
Normal file
@ -0,0 +1,19 @@
|
||||
package collision
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"codehub.onpointcoding.net/sean/go-susapp/util"
|
||||
)
|
||||
|
||||
type CollisionAsset [][]util.Vec2
|
||||
|
||||
func UnmarshalCollisionAsset(data []byte) (CollisionAsset, error) {
|
||||
var r [][]util.Vec2
|
||||
err := json.Unmarshal(data, &r)
|
||||
return r, err
|
||||
}
|
||||
|
||||
func (r *CollisionAsset) Marshal() ([]byte, error) {
|
||||
return json.Marshal(r)
|
||||
}
|
@ -7,6 +7,13 @@ const (
|
||||
MAP_THE_AIRSHIP = 3
|
||||
)
|
||||
|
||||
var mapString = map[byte]string{
|
||||
MAP_THE_SKELD: "skeld",
|
||||
MAP_MIRA_HQ: "mira",
|
||||
MAP_POLUS: "polus",
|
||||
MAP_THE_AIRSHIP: "airship",
|
||||
}
|
||||
|
||||
func MapBitfield(a []int) byte {
|
||||
var b byte = 0
|
||||
for i := 0; i < len(a); i++ {
|
||||
@ -18,3 +25,11 @@ func MapBitfield(a []int) byte {
|
||||
func BitfieldHasMap(b byte, a int) bool {
|
||||
return b&(1<<a) != 0
|
||||
}
|
||||
|
||||
func MapByteToString(b byte) string {
|
||||
a, ok := mapString[b]
|
||||
if ok {
|
||||
return a
|
||||
}
|
||||
return "empty"
|
||||
}
|
||||
|
@ -2,5 +2,5 @@ package enum
|
||||
|
||||
const (
|
||||
PLAYER_COLLISION_RADIUS = 0.2234
|
||||
PLAYER_COLLISION_OFFSET_Y = -0.3636
|
||||
PLAYER_COLLISION_OFFSET_Y = -0.25
|
||||
)
|
||||
|
@ -7,27 +7,39 @@ var playerColorNames = []string{
|
||||
"Pink",
|
||||
"Orange",
|
||||
"Yellow",
|
||||
"Grey",
|
||||
"Black",
|
||||
"White",
|
||||
"Purple",
|
||||
"Brown",
|
||||
"Cyan",
|
||||
"Light Green",
|
||||
"Maroon",
|
||||
"Rose",
|
||||
"Banana",
|
||||
"Gray",
|
||||
"Tan",
|
||||
"Sunset",
|
||||
}
|
||||
|
||||
var playerColors = []int{
|
||||
rgb(198, 17, 17),
|
||||
rgb(19, 46, 210),
|
||||
rgb(17, 128, 45),
|
||||
rgb(238, 84, 187),
|
||||
rgb(240, 125, 13),
|
||||
rgb(215, 30, 34),
|
||||
rgb(29, 60, 233),
|
||||
rgb(27, 145, 62),
|
||||
rgb(255, 99, 212),
|
||||
rgb(255, 141, 28),
|
||||
rgb(246, 246, 87),
|
||||
rgb(63, 71, 78),
|
||||
rgb(215, 225, 241),
|
||||
rgb(107, 47, 188),
|
||||
rgb(113, 73, 30),
|
||||
rgb(56, 255, 221),
|
||||
rgb(80, 240, 57),
|
||||
rgb(74, 86, 94),
|
||||
rgb(233, 247, 255),
|
||||
rgb(120, 61, 210),
|
||||
rgb(128, 88, 45),
|
||||
rgb(68, 255, 247),
|
||||
rgb(91, 255, 75),
|
||||
rgb(108, 43, 61),
|
||||
rgb(255, 214, 236),
|
||||
rgb(255, 255, 190),
|
||||
rgb(131, 151, 167),
|
||||
rgb(159, 153, 137),
|
||||
rgb(236, 117, 120),
|
||||
}
|
||||
|
||||
var playerShadedColors = []int{
|
||||
@ -36,13 +48,19 @@ var playerShadedColors = []int{
|
||||
rgb(10, 77, 46),
|
||||
rgb(172, 43, 174),
|
||||
rgb(180, 62, 21),
|
||||
rgb(195, 136, 34),
|
||||
rgb(255, 255, 103),
|
||||
rgb(30, 31, 38),
|
||||
rgb(132, 149, 192),
|
||||
rgb(59, 23, 124),
|
||||
rgb(94, 38, 21),
|
||||
rgb(36, 169, 191),
|
||||
rgb(21, 168, 66),
|
||||
rgb(65, 15, 26),
|
||||
rgb(222, 146, 179),
|
||||
rgb(210, 188, 137),
|
||||
rgb(70, 86, 100),
|
||||
rgb(81, 65, 62),
|
||||
rgb(180, 67, 98),
|
||||
}
|
||||
|
||||
func rgb(r int, g int, b int) int {
|
||||
|
19
src/enum/tasks.go
Normal file
19
src/enum/tasks.go
Normal file
@ -0,0 +1,19 @@
|
||||
package enum
|
||||
|
||||
type TaskData struct {
|
||||
ID byte
|
||||
Text string
|
||||
Type int
|
||||
Length byte
|
||||
IsVisual bool
|
||||
}
|
||||
|
||||
const (
|
||||
TASK_LENGTH_SHORT = 0
|
||||
TASK_LENGTH_COMMON = 1
|
||||
TASK_LENGTH_LONG = 2
|
||||
)
|
||||
|
||||
func NewTaskData(id byte, a string, b int, c byte, d bool) TaskData {
|
||||
return TaskData{ID: id, Text: a, Type: b, Length: c, IsVisual: d}
|
||||
}
|
44
src/enum/tasks_airship.go
Normal file
44
src/enum/tasks_airship.go
Normal file
@ -0,0 +1,44 @@
|
||||
package enum
|
||||
|
||||
var TASKS_AIRSHIP = map[byte]TaskData{
|
||||
0: NewTaskData(0, "Electrical: Fix Wiring", TASKTYPES_FIX_WIRING, TASK_LENGTH_COMMON, false),
|
||||
1: NewTaskData(1, "Meeting Room: Enter ID Code", TASKTYPES_ENTER_ID_CODE, TASK_LENGTH_COMMON, false),
|
||||
3: NewTaskData(3, "Electrical: Reset Breakers", TASKTYPES_RESET_BREAKERS, TASK_LENGTH_LONG, false),
|
||||
4: NewTaskData(4, "Vault Room: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
5: NewTaskData(5, "Brig: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
6: NewTaskData(6, "Cargo Bay: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
7: NewTaskData(7, "Gap Room: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
8: NewTaskData(8, "Records: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
9: NewTaskData(9, "Cargo Bay: Unlock Safe", TASKTYPES_UNLOCK_SAFE, TASK_LENGTH_LONG, false),
|
||||
10: NewTaskData(10, "Ventilation: Start Fans", TASKTYPES_START_FANS, TASK_LENGTH_LONG, false),
|
||||
11: NewTaskData(11, "Main Hall: Empty Garbage", TASKTYPES_EMPTY_GARBAGE, TASK_LENGTH_LONG, false),
|
||||
12: NewTaskData(12, "Medical: Empty Garbage", TASKTYPES_EMPTY_GARBAGE, TASK_LENGTH_LONG, false),
|
||||
13: NewTaskData(13, "Kitchen: Empty Garbage", TASKTYPES_EMPTY_GARBAGE, TASK_LENGTH_LONG, false),
|
||||
14: NewTaskData(14, "Main Hall: Develop Photos", TASKTYPES_DEVELOP_PHOTOS, TASK_LENGTH_LONG, false),
|
||||
15: NewTaskData(15, "Cargo Bay: Fuel Engines", TASKTYPES_FUEL_ENGINES, TASK_LENGTH_LONG, false),
|
||||
16: NewTaskData(16, "Security: Rewind Tapes", TASKTYPES_REWIND_TAPES, TASK_LENGTH_LONG, false),
|
||||
17: NewTaskData(17, "Vault Room: Polish Ruby", TASKTYPES_POLISH_RUBY, TASK_LENGTH_SHORT, false),
|
||||
18: NewTaskData(18, "Electrical: Calibrate Distributor", TASKTYPES_CALIBRATE_DISTRIBUTOR, TASK_LENGTH_LONG, false),
|
||||
19: NewTaskData(19, "Cockpit: Stabilize Steering", TASKTYPES_STABILIZE_STEERING, TASK_LENGTH_SHORT, false),
|
||||
20: NewTaskData(20, "Armory: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
21: NewTaskData(21, "Cockpit: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
22: NewTaskData(22, "Comms: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
23: NewTaskData(23, "Medical: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
24: NewTaskData(24, "Viewing Deck: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_LONG, false),
|
||||
25: NewTaskData(25, "Electrical: Divert Power to Armory", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
26: NewTaskData(26, "Electrical: Divert Power to Cockpit", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
27: NewTaskData(27, "Electrical: Divert Power to Gap Room", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
28: NewTaskData(28, "Electrical: Divert Power to Main Hall", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
29: NewTaskData(29, "Electrical: Divert Power to Meeting Room", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
30: NewTaskData(30, "Electrical: Divert Power to Showers", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
31: NewTaskData(31, "Electrical: Divert Power to Engine", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
32: NewTaskData(32, "Showers: Pick Up Towels", TASKTYPES_PICK_UP_TOWELS, TASK_LENGTH_SHORT, false),
|
||||
33: NewTaskData(33, "Lounge: Clean Toilet", TASKTYPES_CLEAN_TOILET, TASK_LENGTH_SHORT, false),
|
||||
34: NewTaskData(34, "Vault Room: Dress Mannequin", TASKTYPES_DRESS_MANNEQUIN, TASK_LENGTH_SHORT, false),
|
||||
35: NewTaskData(35, "Records: Sort Records", TASKTYPES_SORT_RECORDS, TASK_LENGTH_SHORT, false),
|
||||
36: NewTaskData(36, "Armory: Put Away Pistols", TASKTYPES_PUT_AWAY_PISTOLS, TASK_LENGTH_SHORT, false),
|
||||
37: NewTaskData(37, "Armory: Put Away Rifles", TASKTYPES_PUT_AWAY_RIFLES, TASK_LENGTH_SHORT, false),
|
||||
38: NewTaskData(38, "Main Hall: Decontaminate", TASKTYPES_DECONTAMINATE, TASK_LENGTH_SHORT, false),
|
||||
39: NewTaskData(39, "Kitchen: Make Burger", TASKTYPES_MAKE_BURGER, TASK_LENGTH_SHORT, false),
|
||||
40: NewTaskData(40, "Showers: Fix Shower", TASKTYPES_FIX_SHOWER, TASK_LENGTH_SHORT, false),
|
||||
}
|
30
src/enum/tasks_mira.go
Normal file
30
src/enum/tasks_mira.go
Normal file
@ -0,0 +1,30 @@
|
||||
package enum
|
||||
|
||||
var TASKS_MIRA = map[byte]TaskData{
|
||||
0: NewTaskData(0, "Hallway: Fix Wiring", TASKTYPES_FIX_WIRING, TASK_LENGTH_COMMON, false),
|
||||
1: NewTaskData(1, "Admin: Enter ID Code", TASKTYPES_ENTER_ID_CODE, TASK_LENGTH_COMMON, false),
|
||||
2: NewTaskData(2, "Medbay: Submit Scan", TASKTYPES_SUBMIT_SCAN, TASK_LENGTH_LONG, true),
|
||||
3: NewTaskData(3, "Balcony: Clear Asteroids", TASKTYPES_CLEAR_ASTEROIDS, TASK_LENGTH_LONG, false),
|
||||
4: NewTaskData(4, "Electrical: Divert Power to Admin", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
5: NewTaskData(5, "Electrical: Divert Power to Cafeteria", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
6: NewTaskData(6, "Electrical: Divert Power to Communications", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
7: NewTaskData(7, "Electrical: Divert Power to Launchpad", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
8: NewTaskData(8, "Electrical: Divert Power to Medbay", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
9: NewTaskData(9, "Electrical: Divert Power to Office", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
10: NewTaskData(10, "Storage: Water Plants", TASKTYPES_WATER_PLANTS, TASK_LENGTH_LONG, false),
|
||||
11: NewTaskData(11, "Reactor: Start Reactor", TASKTYPES_START_REACTOR, TASK_LENGTH_LONG, false),
|
||||
12: NewTaskData(12, "Electrical: Divert Power to Greenhouse", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
13: NewTaskData(13, "Admin: Chart Course", TASKTYPES_CHART_COURSE, TASK_LENGTH_SHORT, false),
|
||||
14: NewTaskData(14, "Greenhouse: Clean O2 Filter", TASKTYPES_CLEAN_O2_FILTER, TASK_LENGTH_SHORT, false),
|
||||
15: NewTaskData(15, "Launchpad: Fuel Engines", TASKTYPES_FUEL_ENGINES, TASK_LENGTH_SHORT, false),
|
||||
16: NewTaskData(16, "Laboratory: Assemble Artifact", TASKTYPES_ASSEMBLE_ARTIFACT, TASK_LENGTH_SHORT, false),
|
||||
17: NewTaskData(17, "Laboratory: Sort Samples", TASKTYPES_SORT_SAMPLES, TASK_LENGTH_SHORT, false),
|
||||
18: NewTaskData(18, "Admin: Prime Shields", TASKTYPES_PRIME_SHIELDS, TASK_LENGTH_SHORT, false),
|
||||
19: NewTaskData(19, "Cafeteria: Empty Garbage", TASKTYPES_EMPTY_GARBAGE, TASK_LENGTH_SHORT, false),
|
||||
20: NewTaskData(20, "Balcony: Measure Weather", TASKTYPES_MEASURE_WEATHER, TASK_LENGTH_SHORT, false),
|
||||
21: NewTaskData(21, "Electrical: Divert Power to Laboratory", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
22: NewTaskData(22, "Cafeteria: Buy Beverage", TASKTYPES_BUY_BEVERAGE, TASK_LENGTH_SHORT, false),
|
||||
23: NewTaskData(23, "Office: Process Data", TASKTYPES_PROCESS_DATA, TASK_LENGTH_SHORT, false),
|
||||
24: NewTaskData(24, "Launchpad: Run Diagnostics", TASKTYPES_RUN_DIAGNOSTICS, TASK_LENGTH_LONG, false),
|
||||
25: NewTaskData(25, "Reactor: Unlock Manifolds", TASKTYPES_UNLOCK_MANIFOLDS, TASK_LENGTH_SHORT, false),
|
||||
}
|
37
src/enum/tasks_polus.go
Normal file
37
src/enum/tasks_polus.go
Normal file
@ -0,0 +1,37 @@
|
||||
package enum
|
||||
|
||||
var TASKS_POLUS = map[byte]TaskData{
|
||||
0: NewTaskData(0, "Office: Swipe Card", TASKTYPES_SWIPE_CARD, TASK_LENGTH_COMMON, false),
|
||||
1: NewTaskData(1, "Dropship: Insert Keys", TASKTYPES_INSERT_KEYS, TASK_LENGTH_COMMON, false),
|
||||
2: NewTaskData(2, "Office: Scan Boarding Pass", TASKTYPES_SCAN_BOARDING_PASS, TASK_LENGTH_COMMON, false),
|
||||
3: NewTaskData(3, "Electrical: Fix Wiring", TASKTYPES_FIX_WIRING, TASK_LENGTH_COMMON, false),
|
||||
4: NewTaskData(4, "Weapons: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
5: NewTaskData(5, "Office: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
6: NewTaskData(6, "Electrical: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
7: NewTaskData(7, "Specimen Room: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
8: NewTaskData(8, "O2: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
9: NewTaskData(9, "Specimen Room: Start Reactor", TASKTYPES_START_REACTOR, TASK_LENGTH_LONG, false),
|
||||
10: NewTaskData(10, "Storage: Fuel Engines", TASKTYPES_FUEL_ENGINES, TASK_LENGTH_LONG, false),
|
||||
11: NewTaskData(11, "Boiler Room: Open Waterways", TASKTYPES_OPEN_WATERWAYS, TASK_LENGTH_LONG, false),
|
||||
12: NewTaskData(12, "Medbay: Inspect Sample", TASKTYPES_INSPECT_SAMPLE, TASK_LENGTH_LONG, false),
|
||||
13: NewTaskData(13, "Boiler Room: Replace Water Jug", TASKTYPES_REPLACE_WATER_JUG, TASK_LENGTH_LONG, false),
|
||||
14: NewTaskData(14, "Outside: Fix Weather Node Node_GI", TASKTYPES_ACTIVATE_WEATHER_NODES, TASK_LENGTH_LONG, false),
|
||||
15: NewTaskData(15, "Outside: Fix Weather Node Node_IRO", TASKTYPES_ACTIVATE_WEATHER_NODES, TASK_LENGTH_LONG, false),
|
||||
16: NewTaskData(16, "Outside: Fix Weather Node Node_PD", TASKTYPES_ACTIVATE_WEATHER_NODES, TASK_LENGTH_LONG, false),
|
||||
17: NewTaskData(17, "Outside: Fix Weather Node Node_TB", TASKTYPES_ACTIVATE_WEATHER_NODES, TASK_LENGTH_LONG, false),
|
||||
18: NewTaskData(18, "Communications: Reboot WiFi", TASKTYPES_REBOOT_WIFI, TASK_LENGTH_LONG, false),
|
||||
19: NewTaskData(19, "O2: Monitor Tree", TASKTYPES_MONITOR_O2, TASK_LENGTH_SHORT, false),
|
||||
20: NewTaskData(20, "Specimen Room: Unlock Manifolds", TASKTYPES_UNLOCK_MANIFOLDS, TASK_LENGTH_SHORT, false),
|
||||
21: NewTaskData(21, "Specimen Room: Store Artifacts", TASKTYPES_STORE_ARTIFACTS, TASK_LENGTH_SHORT, false),
|
||||
22: NewTaskData(22, "O2: Fill Canisters", TASKTYPES_FILL_CANISTERS, TASK_LENGTH_SHORT, false),
|
||||
23: NewTaskData(23, "O2: Empty Garbage", TASKTYPES_EMPTY_GARBAGE, TASK_LENGTH_SHORT, false),
|
||||
24: NewTaskData(24, "Dropship: Chart Course", TASKTYPES_CHART_COURSE, TASK_LENGTH_SHORT, false),
|
||||
25: NewTaskData(25, "Medbay: Submit Scan", TASKTYPES_SUBMIT_SCAN, TASK_LENGTH_SHORT, true),
|
||||
26: NewTaskData(26, "Weapons: Clear Asteroids", TASKTYPES_CLEAR_ASTEROIDS, TASK_LENGTH_SHORT, true),
|
||||
27: NewTaskData(27, "Outside: Fix Weather Node Node_CA", TASKTYPES_ACTIVATE_WEATHER_NODES, TASK_LENGTH_LONG, false),
|
||||
28: NewTaskData(28, "Outside: Fix Weather Node Node_MLG", TASKTYPES_ACTIVATE_WEATHER_NODES, TASK_LENGTH_LONG, false),
|
||||
29: NewTaskData(29, "Laboratory: Align Telescope", TASKTYPES_ALIGN_TELESCOPE, TASK_LENGTH_SHORT, false),
|
||||
30: NewTaskData(30, "Laboratory: Repair Drill", TASKTYPES_REPAIR_DRILL, TASK_LENGTH_SHORT, false),
|
||||
31: NewTaskData(31, "Laboratory: Record Temperature", TASKTYPES_RECORD_TEMPERATURE, TASK_LENGTH_SHORT, false),
|
||||
32: NewTaskData(32, "Outside: Record Temperature", TASKTYPES_RECORD_TEMPERATURE, TASK_LENGTH_SHORT, false),
|
||||
}
|
33
src/enum/tasks_skeld.go
Normal file
33
src/enum/tasks_skeld.go
Normal file
@ -0,0 +1,33 @@
|
||||
package enum
|
||||
|
||||
var TASKS_SKELD = map[byte]TaskData{
|
||||
0: NewTaskData(0, "Admin: Swipe Card", TASKTYPES_SWIPE_CARD, TASK_LENGTH_COMMON, false),
|
||||
1: NewTaskData(1, "Electrical: Fix Wiring", TASKTYPES_FIX_WIRING, TASK_LENGTH_COMMON, false),
|
||||
2: NewTaskData(2, "Weapons: Clear Asteroids", TASKTYPES_CLEAR_ASTEROIDS, TASK_LENGTH_LONG, true),
|
||||
3: NewTaskData(3, "Engines: Align Engine Output", TASKTYPES_ALIGN_ENGINE_OUTPUT, TASK_LENGTH_SHORT, false),
|
||||
4: NewTaskData(4, "Medbay: Submit Scan", TASKTYPES_SUBMIT_SCAN, TASK_LENGTH_LONG, true),
|
||||
5: NewTaskData(5, "Medbay: Inspect Sample", TASKTYPES_INSPECT_SAMPLE, TASK_LENGTH_LONG, false),
|
||||
6: NewTaskData(6, "Storage: Fuel Engines", TASKTYPES_FUEL_ENGINES, TASK_LENGTH_LONG, false),
|
||||
7: NewTaskData(7, "Reactor: Start Reactor", TASKTYPES_START_REACTOR, TASK_LENGTH_LONG, false),
|
||||
8: NewTaskData(8, "O2: Empty Chute", TASKTYPES_EMPTY_CHUTE, TASK_LENGTH_LONG, true),
|
||||
9: NewTaskData(9, "Cafeteria: Empty Garbage", TASKTYPES_EMPTY_GARBAGE, TASK_LENGTH_LONG, true),
|
||||
10: NewTaskData(10, "Communications: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
11: NewTaskData(11, "Electrical: Calibrate Distributor", TASKTYPES_CALIBRATE_DISTRIBUTOR, TASK_LENGTH_SHORT, false),
|
||||
12: NewTaskData(12, "Navigation: Chart Course", TASKTYPES_CHART_COURSE, TASK_LENGTH_SHORT, false),
|
||||
13: NewTaskData(13, "O2: Clean O2 Filter", TASKTYPES_CLEAN_O2_FILTER, TASK_LENGTH_SHORT, false),
|
||||
14: NewTaskData(14, "Reactor: Unlock Manifolds", TASKTYPES_UNLOCK_MANIFOLDS, TASK_LENGTH_SHORT, false),
|
||||
15: NewTaskData(15, "Electrical: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
16: NewTaskData(16, "Navigation: Stabilize Steering", TASKTYPES_STABILIZE_STEERING, TASK_LENGTH_SHORT, false),
|
||||
17: NewTaskData(17, "Weapons: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
18: NewTaskData(18, "Shields: Prime Shields", TASKTYPES_PRIME_SHIELDS, TASK_LENGTH_SHORT, true),
|
||||
19: NewTaskData(19, "Cafeteria: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
20: NewTaskData(20, "Navigation: Download Data", TASKTYPES_UPLOAD_DATA, TASK_LENGTH_SHORT, false),
|
||||
21: NewTaskData(21, "Electrical: Divert Power to Shields", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
22: NewTaskData(22, "Electrical: Divert Power to Weapons", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
23: NewTaskData(23, "Electrical: Divert Power to Communications", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
24: NewTaskData(24, "Electrical: Divert Power to Upper Engine", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
25: NewTaskData(25, "Electrical: Divert Power to O2", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
26: NewTaskData(26, "Electrical: Divert Power to Navigation", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
27: NewTaskData(27, "Electrical: Divert Power to Lower Engine", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
28: NewTaskData(28, "Electrical: Divert Power to Security", TASKTYPES_DIVERT_POWER, TASK_LENGTH_SHORT, false),
|
||||
}
|
13
src/enum/vents.go
Normal file
13
src/enum/vents.go
Normal file
@ -0,0 +1,13 @@
|
||||
package enum
|
||||
|
||||
import "codehub.onpointcoding.net/sean/go-susapp/util"
|
||||
|
||||
type VentData struct {
|
||||
ID byte
|
||||
Coordinates util.Vec2
|
||||
PartnerVents []byte
|
||||
}
|
||||
|
||||
func NewVentData(id byte, a util.Vec2, b []byte) VentData {
|
||||
return VentData{ID: id, Coordinates: a, PartnerVents: b}
|
||||
}
|
18
src/enum/vents_airship.go
Normal file
18
src/enum/vents_airship.go
Normal file
@ -0,0 +1,18 @@
|
||||
package enum
|
||||
|
||||
import "codehub.onpointcoding.net/sean/go-susapp/util"
|
||||
|
||||
var VENTS_AIRSHIP = map[byte]VentData{
|
||||
0: NewVentData(0, util.NewVec2(-12.6322, 8.4735), []byte{1}),
|
||||
1: NewVentData(1, util.NewVec2(-22.099, -1.512), []byte{1}),
|
||||
2: NewVentData(2, util.NewVec2(-15.659, -11.6991), []byte{1}),
|
||||
3: NewVentData(3, util.NewVec2(0.203, -2.5361), []byte{1}),
|
||||
4: NewVentData(4, util.NewVec2(-2.6019, -9.338), []byte{1}),
|
||||
5: NewVentData(5, util.NewVec2(7.021, -3.730999), []byte{1}),
|
||||
6: NewVentData(6, util.NewVec2(9.814, 3.206), []byte{1}),
|
||||
7: NewVentData(7, util.NewVec2(12.663, 5.922), []byte{1}),
|
||||
8: NewVentData(8, util.NewVec2(3.605, 6.923), []byte{1}),
|
||||
9: NewVentData(9, util.NewVec2(23.9869, -1.386), []byte{1}),
|
||||
10: NewVentData(10, util.NewVec2(23.2799, 8.259998), []byte{1}),
|
||||
11: NewVentData(11, util.NewVec2(30.4409, -3.577), []byte{1}),
|
||||
}
|
17
src/enum/vents_mira.go
Normal file
17
src/enum/vents_mira.go
Normal file
@ -0,0 +1,17 @@
|
||||
package enum
|
||||
|
||||
import "codehub.onpointcoding.net/sean/go-susapp/util"
|
||||
|
||||
var VENTS_MIRA = map[byte]VentData{
|
||||
1: NewVentData(1, util.NewVec2(23.769283, -1.576561), []byte{1}),
|
||||
2: NewVentData(2, util.NewVec2(23.899899, 7.5434494), []byte{1}),
|
||||
3: NewVentData(3, util.NewVec2(0.4791336, 11.0603485), []byte{1}),
|
||||
4: NewVentData(4, util.NewVec2(11.60479, 14.179291), []byte{1}),
|
||||
5: NewVentData(5, util.NewVec2(13.279617, 20.492867), []byte{1}),
|
||||
6: NewVentData(6, util.NewVec2(22.38987, 17.59243), []byte{1}),
|
||||
7: NewVentData(7, util.NewVec2(17.848782, 25.59304), []byte{1}),
|
||||
8: NewVentData(8, util.NewVec2(15.409779, -1.4569321), []byte{1}),
|
||||
9: NewVentData(9, util.NewVec2(6.8293304, 3.5077438), []byte{1}),
|
||||
10: NewVentData(10, util.NewVec2(4.289009, 0.8929596), []byte{1}),
|
||||
11: NewVentData(11, util.NewVec2(-6.1811256, 3.9227905), []byte{1}),
|
||||
}
|
18
src/enum/vents_polus.go
Normal file
18
src/enum/vents_polus.go
Normal file
@ -0,0 +1,18 @@
|
||||
package enum
|
||||
|
||||
import "codehub.onpointcoding.net/sean/go-susapp/util"
|
||||
|
||||
var VENTS_POLUS = map[byte]VentData{
|
||||
0: NewVentData(0, util.NewVec2(1.9281311, -9.195087), []byte{1}),
|
||||
1: NewVentData(1, util.NewVec2(6.8989105, -14.047455), []byte{1}),
|
||||
2: NewVentData(2, util.NewVec2(3.5089645, -16.216679), []byte{1}),
|
||||
3: NewVentData(3, util.NewVec2(12.303043, -18.53483), []byte{1}),
|
||||
4: NewVentData(4, util.NewVec2(16.377811, -19.235523), []byte{1}),
|
||||
5: NewVentData(5, util.NewVec2(20.088806, -25.153582), []byte{1}),
|
||||
6: NewVentData(6, util.NewVec2(32.96254, -9.163349), []byte{1}),
|
||||
7: NewVentData(7, util.NewVec2(30.906845, -11.497368), []byte{1}),
|
||||
8: NewVentData(8, util.NewVec2(21.999237, -11.826963), []byte{1}),
|
||||
9: NewVentData(9, util.NewVec2(24.019531, -8.026855), []byte{1}),
|
||||
10: NewVentData(10, util.NewVec2(9.639431, -7.356678), []byte{1}),
|
||||
11: NewVentData(11, util.NewVec2(18.929123, -24.487068), []byte{1}),
|
||||
}
|
20
src/enum/vents_skeld.go
Normal file
20
src/enum/vents_skeld.go
Normal file
@ -0,0 +1,20 @@
|
||||
package enum
|
||||
|
||||
import "codehub.onpointcoding.net/sean/go-susapp/util"
|
||||
|
||||
var VENTS_SKELD = map[byte]VentData{
|
||||
0: NewVentData(0, util.NewVec2(2.543373, -9.59182), []byte{1}),
|
||||
1: NewVentData(1, util.NewVec2(9.38308, -6.0749207), []byte{1}),
|
||||
2: NewVentData(2, util.NewVec2(4.2584915, 0.08728027), []byte{1}),
|
||||
3: NewVentData(3, util.NewVec2(-9.777372, -7.6704063), []byte{1}),
|
||||
4: NewVentData(4, util.NewVec2(-15.288929, 2.8827324), []byte{1}),
|
||||
5: NewVentData(5, util.NewVec2(-12.534981, -6.586403), []byte{1}),
|
||||
6: NewVentData(6, util.NewVec2(-10.608683, -3.8129234), []byte{1}),
|
||||
7: NewVentData(7, util.NewVec2(8.819103, 3.687191), []byte{1}),
|
||||
8: NewVentData(8, util.NewVec2(-20.796825, -6.590065), []byte{1}),
|
||||
9: NewVentData(9, util.NewVec2(-15.251087, -13.293049), []byte{1}),
|
||||
10: NewVentData(10, util.NewVec2(9.52224, -13.974211), []byte{1}),
|
||||
11: NewVentData(11, util.NewVec2(-21.877165, -2.6886406), []byte{1}),
|
||||
12: NewVentData(12, util.NewVec2(16.007935, -2.8046074), []byte{1}),
|
||||
13: NewVentData(13, util.NewVec2(16.007935, -6.0212097), []byte{1}),
|
||||
}
|
@ -7,20 +7,20 @@ import (
|
||||
)
|
||||
|
||||
type MiraShipStatus struct {
|
||||
Systems map[int]*systemtypes.SystemType
|
||||
Systems map[int]systemtypes.SystemType
|
||||
SystemsMask uint32
|
||||
}
|
||||
|
||||
func NewMiraShipStatus() *MiraShipStatus {
|
||||
a := &MiraShipStatus{}
|
||||
a.Systems = make(map[int]*systemtypes.SystemType)
|
||||
a.Systems[enum.SYSTEMTYPE_REACTOR] = systemtypes.SystemTypeCast(&systemtypes.ReactorSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_ELECTRICAL] = systemtypes.SystemTypeCast(&systemtypes.SwitchSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_O2] = systemtypes.SystemTypeCast(&systemtypes.LifeSuppSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_MEDBAY] = systemtypes.SystemTypeCast(&systemtypes.MedScanSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_COMMUNICATIONS] = systemtypes.SystemTypeCast(&systemtypes.HqHudSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_SABOTAGE] = systemtypes.SystemTypeCast(&systemtypes.SabotageSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_DECONTAMINATION] = systemtypes.SystemTypeCast(&systemtypes.DeconSystem{})
|
||||
a.Systems = make(map[int]systemtypes.SystemType)
|
||||
a.Systems[enum.SYSTEMTYPE_REACTOR] = &systemtypes.ReactorSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_ELECTRICAL] = &systemtypes.SwitchSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_O2] = &systemtypes.LifeSuppSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_MEDBAY] = &systemtypes.MedScanSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_COMMUNICATIONS] = &systemtypes.HqHudSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_SABOTAGE] = &systemtypes.SabotageSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_DECONTAMINATION] = &systemtypes.DeconSystem{}
|
||||
return a
|
||||
}
|
||||
|
||||
|
@ -7,22 +7,22 @@ import (
|
||||
)
|
||||
|
||||
type PolusShipStatus struct {
|
||||
Systems map[int]*systemtypes.SystemType
|
||||
Systems map[int]systemtypes.SystemType
|
||||
SystemsMask uint32
|
||||
}
|
||||
|
||||
func NewPolusShipStatus() *MiraShipStatus {
|
||||
a := &MiraShipStatus{}
|
||||
a.Systems = make(map[int]*systemtypes.SystemType)
|
||||
a.Systems[enum.SYSTEMTYPE_ELECTRICAL] = systemtypes.SystemTypeCast(&systemtypes.SwitchSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_MEDBAY] = systemtypes.SystemTypeCast(&systemtypes.MedScanSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_SECURITY] = systemtypes.SystemTypeCast(&systemtypes.SecurityCameraSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_COMMUNICATIONS] = systemtypes.SystemTypeCast(&systemtypes.HudOverrideSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_DOORS] = systemtypes.SystemTypeCast(&systemtypes.DoorsSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_DECONTAMINATION] = systemtypes.SystemTypeCast(&systemtypes.DeconSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_DECONTAMINATION_2] = systemtypes.SystemTypeCast(&systemtypes.DeconSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_SABOTAGE] = systemtypes.SystemTypeCast(&systemtypes.SabotageSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_LABORATORY] = systemtypes.SystemTypeCast(&systemtypes.ReactorSystem{})
|
||||
func NewPolusShipStatus() *PolusShipStatus {
|
||||
a := &PolusShipStatus{}
|
||||
a.Systems = make(map[int]systemtypes.SystemType)
|
||||
a.Systems[enum.SYSTEMTYPE_ELECTRICAL] = &systemtypes.SwitchSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_MEDBAY] = &systemtypes.MedScanSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_SECURITY] = &systemtypes.SecurityCameraSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_COMMUNICATIONS] = &systemtypes.HudOverrideSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_DOORS] = &systemtypes.DoorsSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_DECONTAMINATION] = &systemtypes.DeconSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_DECONTAMINATION_2] = &systemtypes.DeconSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_SABOTAGE] = &systemtypes.SabotageSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_LABORATORY] = &systemtypes.ReactorSystem{}
|
||||
return a
|
||||
}
|
||||
|
||||
|
@ -6,16 +6,16 @@ import (
|
||||
"codehub.onpointcoding.net/sean/go-susapp/systemtypes"
|
||||
)
|
||||
|
||||
func WriteShipStatus(Systems map[int]*systemtypes.SystemType, SystemsMask *uint32, packet *protocol.Packet, isSpawn bool) {
|
||||
func WriteShipStatus(Systems map[int]systemtypes.SystemType, SystemsMask *uint32, packet *protocol.Packet, isSpawn bool) {
|
||||
p := protocol.NewEmptyPacket()
|
||||
for i := 0; i < enum.TOTAL_SYSTEMTYPE; i++ {
|
||||
if isSpawn {
|
||||
if val, ok := Systems[i]; ok {
|
||||
(*val).Write(p, isSpawn)
|
||||
val.Write(p, isSpawn)
|
||||
}
|
||||
} else {
|
||||
if (*SystemsMask & (1 << i)) != 0 {
|
||||
(*Systems[i]).Write(p, isSpawn)
|
||||
Systems[i].Write(p, isSpawn)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@ func WriteShipStatus(Systems map[int]*systemtypes.SystemType, SystemsMask *uint3
|
||||
}
|
||||
}
|
||||
|
||||
func ReadShipStatus(Systems map[int]*systemtypes.SystemType, SystemsMask *uint32, packet *protocol.Packet, isSpawn bool) {
|
||||
func ReadShipStatus(Systems map[int]systemtypes.SystemType, SystemsMask *uint32, packet *protocol.Packet, isSpawn bool) {
|
||||
p := packet
|
||||
if isSpawn {
|
||||
p = packet.ReadHazel().GetUnderlyingPacket()
|
||||
@ -39,11 +39,13 @@ func ReadShipStatus(Systems map[int]*systemtypes.SystemType, SystemsMask *uint32
|
||||
for i := 0; i < enum.TOTAL_SYSTEMTYPE; i++ {
|
||||
if isSpawn {
|
||||
if val, ok := Systems[i]; ok {
|
||||
(*val).Read(p, isSpawn)
|
||||
val.Read(p, isSpawn)
|
||||
}
|
||||
} else {
|
||||
if (*SystemsMask & (1 << i)) != 0 {
|
||||
(*Systems[i]).Read(p, isSpawn)
|
||||
if val, ok := Systems[i]; ok {
|
||||
val.Read(p, isSpawn)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,21 +7,21 @@ import (
|
||||
)
|
||||
|
||||
type SkeldShipStatus struct {
|
||||
Systems map[int]*systemtypes.SystemType
|
||||
Systems map[int]systemtypes.SystemType
|
||||
SystemsMask uint32
|
||||
}
|
||||
|
||||
func NewSkeldShipStatus() *SkeldShipStatus {
|
||||
a := &SkeldShipStatus{}
|
||||
a.Systems = make(map[int]*systemtypes.SystemType)
|
||||
a.Systems[enum.SYSTEMTYPE_REACTOR] = systemtypes.SystemTypeCast(&systemtypes.ReactorSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_ELECTRICAL] = systemtypes.SystemTypeCast(&systemtypes.SwitchSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_O2] = systemtypes.SystemTypeCast(&systemtypes.LifeSuppSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_MEDBAY] = systemtypes.SystemTypeCast(&systemtypes.MedScanSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_SECURITY] = systemtypes.SystemTypeCast(&systemtypes.SecurityCameraSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_COMMUNICATIONS] = systemtypes.SystemTypeCast(&systemtypes.HudOverrideSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_DOORS] = systemtypes.SystemTypeCast(&systemtypes.AutoDoorsSystem{})
|
||||
a.Systems[enum.SYSTEMTYPE_SABOTAGE] = systemtypes.SystemTypeCast(&systemtypes.SabotageSystem{})
|
||||
a.Systems = make(map[int]systemtypes.SystemType)
|
||||
a.Systems[enum.SYSTEMTYPE_REACTOR] = &systemtypes.ReactorSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_ELECTRICAL] = &systemtypes.SwitchSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_O2] = &systemtypes.LifeSuppSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_MEDBAY] = &systemtypes.MedScanSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_SECURITY] = &systemtypes.SecurityCameraSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_COMMUNICATIONS] = &systemtypes.HudOverrideSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_DOORS] = &systemtypes.AutoDoorsSystem{}
|
||||
a.Systems[enum.SYSTEMTYPE_SABOTAGE] = &systemtypes.SabotageSystem{}
|
||||
return a
|
||||
}
|
||||
|
||||
|
@ -6,11 +6,3 @@ type SystemType interface {
|
||||
Write(packet *protocol.Packet, isSpawn bool)
|
||||
Read(packet *protocol.Packet, isSpawn bool)
|
||||
}
|
||||
|
||||
func SystemTypeCast(baz interface{}) *SystemType {
|
||||
f, ok := baz.(*SystemType)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
return f
|
||||
}
|
||||
|
6
src/util/dist.go
Normal file
6
src/util/dist.go
Normal file
@ -0,0 +1,6 @@
|
||||
package util
|
||||
|
||||
func Dist32(a Vec2, b Vec2) float32 {
|
||||
d := NewVec2(a.X-b.X, a.Y-b.Y)
|
||||
return Sqrt32((d.X * d.X) + (d.Y * d.Y))
|
||||
}
|
7
src/util/sqrt.go
Normal file
7
src/util/sqrt.go
Normal file
@ -0,0 +1,7 @@
|
||||
package util
|
||||
|
||||
import "math"
|
||||
|
||||
func Sqrt32(a float32) float32 {
|
||||
return float32(math.Sqrt(float64(a)))
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
package util
|
||||
|
||||
type Vec2 struct {
|
||||
X float32
|
||||
Y float32
|
||||
X float32 `json:"x"`
|
||||
Y float32 `json:"y"`
|
||||
}
|
||||
|
||||
func NewVec2(x float32, y float32) Vec2 {
|
||||
|
39
state.go
39
state.go
@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"codehub.onpointcoding.net/sean/go-susapp/collision"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/enum"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/innernetobjects"
|
||||
"codehub.onpointcoding.net/sean/go-susapp/protocol"
|
||||
@ -27,6 +28,7 @@ type State struct {
|
||||
HoldingRight bool
|
||||
MovementX float32
|
||||
MovementY float32
|
||||
Collision *collision.CollisionAsset
|
||||
}
|
||||
|
||||
type CurrentGameData struct {
|
||||
@ -47,14 +49,18 @@ type CurrentGameData struct {
|
||||
CheckPetHatAndSkinNonce uint16
|
||||
CheckedNameAndColor byte
|
||||
HasSetStartCounter bool
|
||||
MyTasks []byte
|
||||
MapType byte
|
||||
}
|
||||
|
||||
type PlayerNetObjectMaps struct {
|
||||
ByPlayerClientID map[uint32]*PlayerObject
|
||||
ByPlayerNetID map[uint32]*PlayerObject
|
||||
ByPlayerID map[byte]*PlayerObject
|
||||
}
|
||||
|
||||
type PlayerObject struct {
|
||||
PlayerID byte
|
||||
PlayerClientNetID uint32
|
||||
PlayerControllerNetID uint32
|
||||
PlayerPhysicsNetID uint32
|
||||
@ -64,13 +70,15 @@ type PlayerObject struct {
|
||||
PlayerPet uint32
|
||||
PlayerHat uint32
|
||||
PlayerSkin uint32
|
||||
InVent bool
|
||||
IsImpostor bool
|
||||
}
|
||||
|
||||
var settingsFilename string = "SusSettings.json"
|
||||
|
||||
func CreateAppState(version int32) *State {
|
||||
forceSave := false
|
||||
settings, err := readJson(settingsFilename)
|
||||
settings, err := readSettingsJson(settingsFilename)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
forceSave = true
|
||||
@ -90,11 +98,28 @@ func CreateAppState(version int32) *State {
|
||||
return s
|
||||
}
|
||||
|
||||
func (state *State) SaveSettings() error {
|
||||
return writeJson(settingsFilename, *state.Settings)
|
||||
func (state *State) LoadCollision(filename string) error {
|
||||
b, err := collision.CollisionAssetsFolder.ReadFile("assets/" + filename + ".json")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
a, err := collision.UnmarshalCollisionAsset(b)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
state.Collision = &a
|
||||
return nil
|
||||
}
|
||||
|
||||
func readJson(filename string) (SettingsJSON, error) {
|
||||
func (state *State) LoadCollisionForMap(m byte) {
|
||||
state.LoadCollision(enum.MapByteToString(m))
|
||||
}
|
||||
|
||||
func (state *State) SaveSettings() error {
|
||||
return writeSettingsJson(settingsFilename, *state.Settings)
|
||||
}
|
||||
|
||||
func readSettingsJson(filename string) (SettingsJSON, error) {
|
||||
b, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return NewDefaultSettingsJSON(), err
|
||||
@ -102,10 +127,14 @@ func readJson(filename string) (SettingsJSON, error) {
|
||||
return UnmarshalSettings(b)
|
||||
}
|
||||
|
||||
func writeJson(filename string, settings SettingsJSON) error {
|
||||
func writeSettingsJson(filename string, settings SettingsJSON) error {
|
||||
b, err := settings.Marshal()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return os.WriteFile(filename, b, 0644)
|
||||
}
|
||||
|
||||
func (game *CurrentGameData) GetMyPlayer() *PlayerObject {
|
||||
return game.PlayerNetObjects.ByPlayerClientID[game.ClientID]
|
||||
}
|
||||
|
16
sus.go
16
sus.go
@ -49,7 +49,7 @@ func (sus *SusApp) startApp() {
|
||||
log.Fatal("Could not create application.", err)
|
||||
}
|
||||
|
||||
renderTicker := time.NewTicker(50 * time.Millisecond)
|
||||
renderTicker := time.NewTicker(100 * time.Millisecond)
|
||||
renderTickerDone := make(chan bool)
|
||||
defer func() {
|
||||
fmt.Println("Stopping render ticks")
|
||||
@ -207,7 +207,11 @@ func (sus *SusApp) playGame() {
|
||||
go sus.setupPacketHandler(&raddr.IP, raddr.Port, func(ph *protocol.PacketHandler) {
|
||||
fmt.Println("Sending first packet")
|
||||
ph.SendHelloPacket(ph.GetNonce(), 0, sus.state.Version, sus.state.Settings.PlayerName, 0, sus.state.Settings.Language, sus.state.Settings.QuickChatMode)
|
||||
y, _ := util.CodeToGameID(sus.state.TypedGameID)
|
||||
var y int32
|
||||
if sus.state.TypedGameID == "" {
|
||||
sus.state.TypedGameID = util.CodeFromGameID(0x20000000)
|
||||
}
|
||||
y, _ = util.CodeToGameID(sus.state.TypedGameID)
|
||||
var z protocol.HazelPayload = &packets.JoinGameC2S{GameID: y}
|
||||
ph.SendReliablePacket(ph.GetNonce(), []*protocol.Hazel{
|
||||
protocol.NewHazelFromPayload(&z),
|
||||
@ -245,8 +249,6 @@ func (sus *SusApp) handleForceDisconnectPacket(net *protocol.PacketHandler, h *p
|
||||
}
|
||||
sus.state.Screen = enum.SCREEN_ERROR
|
||||
sus.state.IsLobbyMenuOpen = false
|
||||
sus.state.DisconnectReason = 0xfe
|
||||
sus.state.DisconnectStringReason = "This is a very long piece of text that must be completely read and understood thank you for reading :)"
|
||||
}
|
||||
|
||||
func (sus *SusApp) handleNormalDisconnectPacket(net *protocol.PacketHandler) {
|
||||
@ -280,11 +282,11 @@ func (sus *SusApp) handlePingPacket(net *protocol.PacketHandler, nonce uint16) {
|
||||
func (sus *SusApp) sendPetHatAndSkin(net *protocol.PacketHandler) {
|
||||
// Send RPC SetPet, SetHat, SetSkin
|
||||
sus.state.CurrentGame.CheckPetHatAndSkinNonce = net.GetNonce()
|
||||
var f1a gamedata.RpcSub = &gamedata.RpcSetPet{PetID: 1}
|
||||
var f1a gamedata.RpcSub = &gamedata.RpcSetPet{PetID: enum.PET_ELLIE_ROSE + 1}
|
||||
var f2a packets.GameDataSubpacket = gamedata.NewRpcFromRpcSub(sus.state.CurrentGame.ClientPlayerNetID, &f1a)
|
||||
var f1b gamedata.RpcSub = &gamedata.RpcSetHat{HatID: 1}
|
||||
var f1b gamedata.RpcSub = &gamedata.RpcSetHat{HatID: enum.HAT_HEART_PIN + 1}
|
||||
var f2b packets.GameDataSubpacket = gamedata.NewRpcFromRpcSub(sus.state.CurrentGame.ClientPlayerNetID, &f1b)
|
||||
var f1c gamedata.RpcSub = &gamedata.RpcSetSkin{SkinID: 1}
|
||||
var f1c gamedata.RpcSub = &gamedata.RpcSetSkin{SkinID: enum.SKIN_RIGHT_HAND_MAN_REBORN}
|
||||
var f2c packets.GameDataSubpacket = gamedata.NewRpcFromRpcSub(sus.state.CurrentGame.ClientPlayerNetID, &f1c)
|
||||
var f3 protocol.HazelPayload = &packets.GameDataAll{GameID: sus.state.CurrentGame.GameID, Subpackets: []*protocol.Hazel{
|
||||
f2a.AsHazel(),
|
||||
|
Loading…
Reference in New Issue
Block a user