Project Zomboid
Μη επαρκής αριθμός βαθμολογιών
Metalwelding Build Menu Compatibility
Από Tchernobill
Most mods adding options to the Metalwelding menu override the whole menu.
This prevents mods compatibility.

Below is a snippet to use by any mod to achieve compatibility.
   
Βραβείο
Αγαπημένο
Αγαπημένο
Μη αγαπημένο
Snippet
--override the name of that function local myModdedFunctionToAddOptionToMetalWeldingMenu = function(subMenuMW, player) --add here your own options --see Build Roof mod for a full exemple link below end local myModdedMetalWeldingCallback = function(player, context, worldobjects, test) if test or not context then return end local buildMWOption = context:getOptionFromName(getText("ContextMenu_MetalWelding")) if not buildMWOption then return end local subMenuMW = context:getSubMenu(buildMWOption.subOption) if subMenuMW then myModdedFunctionToAddOptionToMetalWeldingMenu(subMenuMW, player)--override the name of that function end end Events.OnFillWorldObjectContextMenu.Add(myModdedMetalWeldingCallback);

e.g. see exemple mod under BuildRoof/media/lua/client/CBuildMetalRoof.lua