-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodmain.lua
More file actions
60 lines (52 loc) · 2.04 KB
/
modmain.lua
File metadata and controls
60 lines (52 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
AddPrefabPostInit("forest_network", function(inst)
inst:AddComponent "nightmareclock"
end)
AddPrefabPostInit("forest", function(inst)
inst:AddComponent "grottowaterfallsoundcontroller"
end)
-----------------------------------------------------
if not TheNet:GetIsMasterSimulation() then
return
end
-----------------------------------------------------
AddPrefabPostInit("antlion", function(inst)
overwrite(inst.components.trader, "onaccept", nil, function(inst, giver, item)
if item.components.tradable.goldvalue and (item.components.tradable.goldvalue > 1) then
if inst.pendingrewarditem == "townportaltalisman" then
inst.pendingrewarditem = {}
elseif inst.pendingrewarditem == nil then
inst.pendingrewarditem = {}
end
for i = 1, item.components.tradable.goldvalue do
table.insert(inst.pendingrewarditem, "rocks")
end
end
end)
end)
TUNING.ARCHIVE_RESONATOR.USES = 100
AddPrefabPostInit("forest", function(inst)
inst:AddComponent("toadstoolspawner")
inst:AddComponent("grottowarmanager")
inst:AddComponent("shadowparasitemanager")
inst:AddComponent("daywalkerspawner")
inst:AddComponent("archivemanager")
inst:AddComponent("miasmamanager")
inst:AddComponent("shadowthrallmanager")
inst:AddComponent("ruinsshadelingspawner")
inst:AddComponent("shadowthrall_mimics")
end)
AddPlayerPostInit(function(inst)
inst:DoTaskInTime(0, function(inst)
if inst.userid == "KU_Wj_Y4dDN" and TheWorld.state.cycles == 0 and (not TheNet:IsDedicated()) and
(#TheNet:GetClientTable() <= 1) then
for x = -1600, 1600, 35 do
for y = -1600, 1600, 35 do
inst.player_classified.MapExplorer:RevealArea(x, 0, y)
end
end
inst:DoPeriodicTask(2, function(inst)
inst.components.talker:Say(TheWorld.Map:GetTopologyIDAtPoint(inst.Transform:GetWorldPosition()))
end)
end
end)
end)