-------------------------------------------------- ---- [Talent.M] Map Plug-In -------------------------------------------------- --[[ --Update Log-- 2016-04-03 V1.8 Repair : Repair the teleportato_ring does not show the problem 2016-04-03 V1.7 Repair : Map Revealed bug 2016-04-03 V1.6 Add : Volcano position display 2016-03-06 V1.5 Add New Icon : Treeguard,Spider Queen,Moose/Goose Egg,Doydoy 2016-06-07 V1.4 Add New Icon : pig head,krampus,Ancient Guardian,Batilisk,Cave Spider,Clockwork Bishop,Damaged Bishop,Clockwork Knight,Damaged Knight Dangling Depth Dweller,Depths Worm,MacTusk,Snake,Poison Snake,Sealnado,Seal,Tiger Shark,Sharkitten,Quacken 2016-03-06 V1.3 Code Refactoring : All code rewrite, more optimized. Add New Icon : fireflies,dirtpile,animal,tentacle,tentacle_pillar,bunnyman,firehound,icehound,warg,berrybush teleportato_box,teleportato_crank,teleportato_potato,teleportato_potato Change Icon : lightninggoat,moose,dragonfly,deerclops,bearger,Wall Icon(Smaller) Add function : teleportato Position display 2016-03-01 V1.0 V1.0 release ]] -------------------------------------------------- ---- Icon Funtion -------------------------------------------------- Assets = {} function IconOnMap(prefab) table.insert(Assets, Asset("IMAGE", "icon/" .. prefab .. ".tex")) table.insert(Assets, Asset("ATLAS", "icon/" .. prefab .. ".xml")) AddMinimapAtlas("icon/" .. prefab .. ".xml") AddPrefabPostInit(prefab, function(inst) inst.entity:AddMiniMapEntity() inst.MiniMapEntity:SetIcon(prefab .. ".tex") end) end -------------------------------------------------- ---- Common Icon Prefab List -------------------------------------------------- Common_PB_List = { --Core "beefalo", "babybeefalo", "carrot_planted", "flint", "rabbithole", "rocky", "lightninggoat", "molehill", "koalefant_winter", "koalefant_summer", "blue_mushroom", "red_mushroom", "green_mushroom", "berrybush", "mandrake", "hound", "skeleton", "rock2", "fireflies", "dirtpile", "animal_track", "tentacle", "tentacle_pillar", "bunnyman", "firehound", "icehound", "packim_fishbone", "chester_eyebone", "pighead", "krampus", "minotaur", "bat", "spider_hider", "bishop", "bishop_nightmare", "knight", "knight_nightmare", "rook", "rook_nightmare", "spider_dropper", "worm", "walrus", --SW "crabhole", "whale_bubbles", "sharx", "swordfish", "ox", "ballphin", "bioluminescence", "knightboat", "livingjungletree", "obsidian", "seashell_beached", "volcanostaff", "fishinhole", "magmarock_gold", "sandhill", "whale_blue", "whale_white", "flup", "solofish", "jellyfish_planted", "snake", "snake_poison", "doydoy", ----Teleportato For ROG "teleportato_box", "teleportato_crank", "teleportato_potato", "teleportato_ring", --Teleportato For SW "teleportato_sw_box", "teleportato_sw_crank", "teleportato_sw_potato", "teleportato_sw_ring", --BOSS "leif", "leif_sparse", "spiderqueen", "moose", "mooseegg", "dragonfly", "deerclops", "bearger", "warg", --SW Boss "twister", "twister_seal", "tigershark", "sharkitten", "kraken", } -------------------------------------------------- ---- Wall Icon List -------------------------------------------------- Wall_PB_List = { "sandbagsmall", "wall_hay", "wall_wood", "wall_stone", "wall_limestone", "wall_ruins", } if GetModConfigData("IconState") == true then for k,v in pairs(Common_PB_List) do IconOnMap(v) end end if GetModConfigData("WallState") == true then for k,v in pairs(Wall_PB_List) do IconOnMap(v) end end -------------------------------------------------- ---- Eyebone Pigking Fishbone Volcano -------------------------------------------------- if GetModConfigData("VolcanoState") == true then local function Volcano(inst) inst:AddTag("volcano") end AddPrefabPostInit( "volcano", Volcano ) end function Reaveltarget(player) if GetModConfigData("BoneState") == true then if not GLOBAL.TheSim:FindFirstEntityWithTag("chester") then if GLOBAL.TheSim:FindFirstEntityWithTag("chester_eyebone") then local doer = player local target = GLOBAL.TheSim:FindFirstEntityWithTag("chester_eyebone") local x, y, z = target.Transform:GetWorldPosition() player:DoTaskInTime(0, function() GLOBAL.GetWorld().minimap.MiniMap:ShowArea(x, y, z, 19) end) end end if GLOBAL.IsDLCEnabled(GLOBAL.CAPY_DLC) then if not GLOBAL.TheSim:FindFirstEntityWithTag("packim") then if GLOBAL.TheSim:FindFirstEntityWithTag("packim_fishbone") then local doer = player local target = GLOBAL.TheSim:FindFirstEntityWithTag("packim_fishbone") local x, y, z = target.Transform:GetWorldPosition() player:DoTaskInTime(0, function() GLOBAL.GetWorld().minimap.MiniMap:ShowArea(x, y, z, 19) end) end end end end if GetModConfigData("KingState") == true then if not GLOBAL.TheSim:FindFirstEntityWithTag("chester") then if GLOBAL.TheSim:FindFirstEntityWithTag("king") then local doer = player local target = GLOBAL.TheSim:FindFirstEntityWithTag("king") local x, y, z = target.Transform:GetWorldPosition() player:DoTaskInTime(0, function() GLOBAL.GetWorld().minimap.MiniMap:ShowArea(x, y, z, 19) end) end end if GLOBAL.IsDLCEnabled(GLOBAL.CAPY_DLC) then if not GLOBAL.TheSim:FindFirstEntityWithTag("packim") then if GLOBAL.TheSim:FindFirstEntityWithTag("king") then local doer = player local target = GLOBAL.TheSim:FindFirstEntityWithTag("king") local x, y, z = target.Transform:GetWorldPosition() player:DoTaskInTime(0, function() GLOBAL.GetWorld().minimap.MiniMap:ShowArea(x, y, z, 19) end) end end end end if GetModConfigData("TState") == true then if GLOBAL.TheSim:FindFirstEntityWithTag("teleportato") then local doer = player local target = GLOBAL.TheSim:FindFirstEntityWithTag("teleportato") local x, y, z = target.Transform:GetWorldPosition() player:DoTaskInTime(0, function() GLOBAL.GetWorld().minimap.MiniMap:ShowArea(x, y, z, 19) end) end end if GetModConfigData("VolcanoState") == true then if GLOBAL.IsDLCEnabled(GLOBAL.CAPY_DLC) then if GLOBAL.TheSim:FindFirstEntityWithTag("volcano") then local doer = player local target = GLOBAL.TheSim:FindFirstEntityWithTag("volcano") local x, y, z = target.Transform:GetWorldPosition() player:DoTaskInTime(0, function() GLOBAL.GetWorld().minimap.MiniMap:ShowArea(x, y, z, 100) end) end end end end AddSimPostInit(Reaveltarget) -------------------------------------------------- ---- Map Reavele -------------------------------------------------- local function revealer( inst ) GLOBAL.RunScript("consolecommands") inst:DoTaskInTime( 0.001, function() minimap = GLOBAL.TheSim:FindFirstEntityWithTag("minimap") minimap.MiniMap:ShowArea(0,0,0,40000) end) end if GetModConfigData("MapViewState") == true then AddSimPostInit( revealer ) end