Code Monkey home page Code Monkey logo

global-positions's People

Contributors

rezecib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

global-positions's Issues

Player Indicators "Always" setting only works for host

Comment on steam:

Frank 16 hours ago
'Player Indicators' is broken. Setting it to "Always' allows me (host) to see other players' indicators at unlimited range. However, the unlimited range does not function for other players.

This mod breaks the new "zoom cursor focus" option

From Steam:

A73 has Don't Starve Together Jul 2 @ 7:59am

Hi there, since the last update (The Curse of Moon Quay) there is a new option on the Settings -> Advanced -> Zoom Cursor Focus

For some reason the mod disables this option permanently, i thought it was a problem with some mods but only this one causes this problem.

There is no crashing or other problem with the mod, thanks for reading.

worldmapexplorer appears not to work properly anymore

Previously each world object (there's one per overworld, caves, etc) had a "worldmapexplorer" entity attached to it that stored a "master copy" of the map, containing the sum of all exploration all players had made. This seems to not work properly anymore.

An idea for a new system building off of the cartography system the game now uses:

  • For each world, listen for player despawns
  • When a player despawns, save a hidden cartography map object with their map data.
  • When another player despawns, their map object overwrites the previous one (assumption: they have managed to sync with all stored maps).
  • Also listen for player spawns. When a player spawns in, load in the map data from the hidden object.

Possible defense against breaking the assumption of having synced:

  • Version the map data.
  • Initially, player map version is 0.
  • When a player despawns, they first sync in any saved map data, then save their map data.
    • The saved map version becomes max(player_map_version, previous_saved_map_version) + 1
  • When a player loads in:
    • Check for players in the world, and find the one with the highest map version number, saving their map.
      • This covers the case where player A has been in the world exploring, but hasn't despawned and saved their map, and a new joining player B needs A's map data that they uncovered prior to B joining.
      • Do this at most once a second, to prevent a huge load spike if reloading a world with everyone still connected, for example.
    • Then sync with the saved map data and give the spawning player its version number.
  • When syncing from the saved map, only sync if its version is greater than the player's.

I think this should result in consistent map saving without data loss.

Crash when Cawnival Crow Kid adds fuel to fire

User Kova on steam posted:

Crashed: http://3.72.240.91/crashlogs/2022_06_03__01_36_15.txt

From the logs it's pretty clear that when Crow Kids add fuel to fire, they pass in nil, as seen in the ADDFUEL action:

ACTIONS.ADDFUEL.fn = function(act)
    if act.doer.components.inventory and act.invobject then
        local fuel = act.doer.components.inventory:RemoveItem(act.invobject)
        if fuel then
            if act.target.components.fueled and act.target.components.fueled:TakeFuelItem(fuel, act.doer) then
                return true
            else
                --print("False")
                act.doer.components.inventory:GiveItem(fuel)
            end
        end
	elseif act.doer.components.fueler then
        if act.target.components.fueled and act.target.components.fueled:TakeFuelItem(nil, act.doer) then
            return true
		end
    end
end

In my code here, we check if the fuel is charcoal, but we don't have a nil/table check for the item itself, because previously it was assumed there would always be an item.

I should add a simple check to see if it's a table before checking for charcoal.

Crash on zooming map (mod interactions?)

From Steam:

gimpycoder has Don't Starve Together 5 hours ago
The following crash happens when I try to view map and zoom on mouse wheel.

[00:03:19]: [string "scripts/widgets/mapwidget.lua"]:57: calling 'Zoom' on bad self (number expected, got table)
LUA ERROR stack traceback:
=[C]:-1 in (method) Zoom (C) <-1--1>
scripts/widgets/mapwidget.lua:57 in (global) MapWidget_OnZoomOut_base (Lua) <55-61>
../mods/workshop-345692228/modmain.lua:146 in (upvalue) OldOnZoomOut (Lua) <145-151>
../mods/workshop-378160973/modmain.lua:748 in (upvalue) oldOnZoomOut (Lua) <746-753>
../mods/workshop-821143467/modmain.lua:89 in (method) OnZoomOut (Lua) <87-91>
scripts/screens/mapscreen.lua:101 in (method) DoZoomOut (Lua) <98-105>
scripts/screens/mapscreen.lua:230 in (global) MapScreen_OnControl_base (Lua) <211-235>
../mods/workshop-345692228/modmain.lua:123 in () ? (Lua) <122-130>
=(tail call):-1 in () (tail) <-1--1>
scripts/frontend.lua:390 in (method) OnControl (Lua) <374-438>
scripts/input.lua:165 in (method) OnControl (Lua) <162-169>
scripts/input.lua:422 in () ? (Lua) <421-423>

Compatibility with "Waypoint" mod and Pings

"there is a weird conflict with "waypoint mod" ... if Waypoint on, I cannot use the "pings" option here from your mod. Is there a way to fix this conflict? Or, could u include custom markers like waypoint does, so we can have the waypoint functionality in your mod? I really like custom markers for individual use to mark important resources or things like suspicious statues, rabbits, boofs, etc"

pos.portraitdirty:push() crash

From Steam comments:

There is bug :
Don't Starve Together/mods/workshop-378160973/scripts/components/globalposition.lua
linenum 105
pos.portraitdirty:push()
pos is nil when user close share trigger RemoveServerEntity
but timer in line: 102 self.inst:DoTaskInTime(1, function()
did not cancel
the inited code trigger PushPortraitDirty()
then cause server crash
It happems many times

log:
[19:34:08]: [string "../mods/workshop-378160973/scripts/componen..."]:105: attempt to index local 'pos' (a nil value)
LUA ERROR stack traceback:
../mods/workshop-378160973/scripts/components/globalposition.lua:105 in (field) fn (Lua) <102-107>
scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207>
scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377>
scripts/update.lua:180 in () ? (Lua) <159-238>

[19:34:08]: Warning: Widget:SetFocusFromChild is h

Add ratelimiting for pings

A reasonable ratelimit would be one ping per half-second per player (I can't really see legit use-cases for higher rates), with an overall limit of 100 pings (to avoid lagging the server with pings).

Copies of map in wrong place

FreyaMaluk reports on Steam:

hi :) .. sometimes there is a bug showing a copy of other section of the map on another area .. like mirrowing.. happens only with this mod enabled...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.