Jump to content

[General] - [MODS] Trap set pieces are not initialized during world generation.


Kzisor

Recommended Posts

Bug Submission:

Category: General

Issue Title: [MODS] Trap set pieces are not initialized during world generation.

Issue Description: Trap set pieces are not initialized during world generation, therefore mods cannot add traps set pieces to the table.

Steps to Reproduce: Using the following code:

local Traps = require("map/traps")

AddTrapPreInit = function(location, layout)

if location == "Any" then

table.insert(Traps.Sandbox.Any, layout)

print("Count: "..tostring(#Traps.Sandbox.Any))

end

for k, v in pairs(Traps.Sandbox) do

print("Key: "..k.." Count: "..tostring(#v))

end

end

inside the modworldgenmain.lua file you can clearly see that traps are not initialized during world generation.

After further research into this matter, I now understand how Trap set pieces work and can safely say that I'd definitely have loved a better method of having these added to the game, however, I can modify my code to make them work.

 

Suggestion:

Create a better method in which modders can add trap set pieces to world generation. Even if it's simply a duplicated method that modders access through the mod environment.

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...