Initial commit
This commit is contained in:
BIN
Binary file not shown.
|
After Width: | Height: | Size: 410 B |
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"id": "svetikas.lt/theotown/volcano/manifest",
|
||||||
|
"version": 11,
|
||||||
|
"title": "Volcano Disaster",
|
||||||
|
"text": "Adds a powerful volcano that can erupt unexpectedly, unleashing lava flows, ash clouds, and devastating destruction across the landscape.\n\nAutomatic disaster can be configured through the settings.\n\nLava destroys almost everything (except resilient pickles and landmarks) in its path. It will only stop if it gets in touch with water or cools down on its own.",
|
||||||
|
"author": "JustAnyone",
|
||||||
|
"thumbnail": "icon.png"
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
-- We define the local variable for our settings table here so that our functions can see it
|
||||||
|
local settings
|
||||||
|
|
||||||
|
function script:init()
|
||||||
|
settings = Util.optStorage(TheoTown.getStorage(), 'volcano_plugin:settings')
|
||||||
|
|
||||||
|
-- Check if the the key is not set in the storage
|
||||||
|
if settings.autoDisaster == nil then
|
||||||
|
settings.autoDisaster = false
|
||||||
|
end
|
||||||
|
|
||||||
|
if settings.autoDisaster then
|
||||||
|
TheoTown.setGlobalFunVar("!_autovolcanodisasterjajaja", 1)
|
||||||
|
else
|
||||||
|
TheoTown.setGlobalFunVar("!_autovolcanodisasterjajaja", 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function script:settings()
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
name = 'Spawn Volcano Disaster',
|
||||||
|
value = settings.autoDisaster,
|
||||||
|
onChange = function(newState)
|
||||||
|
settings.autoDisaster = newState
|
||||||
|
if newState then
|
||||||
|
TheoTown.setGlobalFunVar("!_autovolcanodisasterjajaja", 1)
|
||||||
|
else
|
||||||
|
TheoTown.setGlobalFunVar("!_autovolcanodisasterjajaja", 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
BIN
Binary file not shown.
+375
@@ -0,0 +1,375 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": "svetikas.lt/theotown/volcano/script",
|
||||||
|
"type": "script",
|
||||||
|
"script": "settings.lua"
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": "svetikas.lt/theotown/volcano/volcano-template",
|
||||||
|
"type": "template",
|
||||||
|
"author": "22Alpha and JustAnyone",
|
||||||
|
"height": 8,
|
||||||
|
"width": 8,
|
||||||
|
"frames": [{"bmp": "volcano.png"}],
|
||||||
|
"smoke": [
|
||||||
|
{"id": "$watervapor00", "x": 122, "y": -110},
|
||||||
|
{"id": "$watervapor00", "x": 126, "y": -110},
|
||||||
|
{"id": "$watervapor00", "x": 130, "y": -110}
|
||||||
|
],
|
||||||
|
"draw ground": true,
|
||||||
|
"power": 0,
|
||||||
|
"water": 0,
|
||||||
|
"build time": 0,
|
||||||
|
"needs road": false,
|
||||||
|
"destroyable": false, // prevent destruction by disasters, but it can still be bulldozed by the player
|
||||||
|
"title": "Volcano",
|
||||||
|
"text": "This was a slight replica of the Mayon Volcano, famous for its perfect cone.",
|
||||||
|
"influence pollution": 25,
|
||||||
|
"influence park": 100,
|
||||||
|
"bulldoze price": 5000,
|
||||||
|
"price": 250000,
|
||||||
|
"monthly price": 640 // should work, doesnt, formula change? https://www.desmos.com/calculator/rdygfraq11
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"id": "volcano",
|
||||||
|
"type": "terrain",
|
||||||
|
"template": "svetikas.lt/theotown/volcano/volcano-template",
|
||||||
|
"random fun": [
|
||||||
|
{
|
||||||
|
"condition": {"z": 1, "id": "!_autovolcanodisasterjajaja", "type": "value"},
|
||||||
|
"actions": [
|
||||||
|
{"type": "build", "id": "volcano", "x": -3, "y": -4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -3},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -2},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -1},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 0},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 1},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 2},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 3},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -3},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -2},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -1},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 0},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 1},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 2},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 3},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 4, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 4, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 3, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 3, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 2, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 2, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 1, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 1, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 0, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 0, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -1, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -1, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -2, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -2, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -3, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -3, "y": 4}
|
||||||
|
],
|
||||||
|
"p": 0.0005
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
//tool
|
||||||
|
{
|
||||||
|
"id": "svetikas.lt/theotown/volcano/disaster-tool",
|
||||||
|
"type": "tool",
|
||||||
|
"cmd": "Erupt",
|
||||||
|
"hide id": true,
|
||||||
|
"ordinal": 99998,
|
||||||
|
"category": "$cat_disaster00",
|
||||||
|
"frames": [{"bmp": "volcanoicon.png"}],
|
||||||
|
"icon frames": [{"x": 130, "y": 683, "w": 26, "h": 26}],
|
||||||
|
"text": "Shake the ground to erupt a volcano.",
|
||||||
|
"title": "Volcano",
|
||||||
|
"on click fun": {
|
||||||
|
"actions": [
|
||||||
|
{"type": "build", "id": "volcano", "x": -3, "y": -4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -3},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -2},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": -1},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 0},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 1},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 2},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 3},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -4, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -3},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -2},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": -1},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 0},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 1},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 2},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 3},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 5, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 4, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 4, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 3, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 3, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 2, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 2, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 1, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 1, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 0, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": 0, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -1, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -1, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -2, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -2, "y": 4},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -3, "y": -5},
|
||||||
|
{"id": "$ja_lava_unique00", "type": "build", "x": -3, "y": 4}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//basalt
|
||||||
|
{
|
||||||
|
"category": "$cat_disaster00",
|
||||||
|
"frames": [{"bmp": "basalt.png"}],
|
||||||
|
"height": 1,
|
||||||
|
"id": "$ja_basalt_unique00",
|
||||||
|
"removable": true,
|
||||||
|
"pickable": false,
|
||||||
|
"burnable": false,
|
||||||
|
"hidden": true,
|
||||||
|
"bulldoze price": 100,
|
||||||
|
"ordinal": 99999,
|
||||||
|
"icon frames": [{"x": 156, "y": 683, "w": 26, "h": 26}],
|
||||||
|
"influence pollution": 5,
|
||||||
|
"final": false,
|
||||||
|
"needs road": false,
|
||||||
|
"power": 0,
|
||||||
|
"price": 0,
|
||||||
|
"text": "A solidified form of lava, no longer a threat to the city.",
|
||||||
|
"title": "Basalt",
|
||||||
|
"type": "destroyed",
|
||||||
|
"water": 0,
|
||||||
|
"width": 1,
|
||||||
|
"fun": [
|
||||||
|
{
|
||||||
|
"condition": {"id": "$ja_lava_unique00", "x": 1, "type": "building"},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "x": 1},
|
||||||
|
{"id": "$ja_basalt_unique00", "type": "build", "x": 1}
|
||||||
|
],
|
||||||
|
"p": 0.99
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {"id": "$ja_lava_unique00", "x": -1, "type": "building"},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "x": -1},
|
||||||
|
{"id": "$ja_basalt_unique00", "type": "build", "x": -1}
|
||||||
|
],
|
||||||
|
"p": 0.99
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {"id": "$ja_lava_unique00", "y": 1, "type": "building"},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "y": 1},
|
||||||
|
{"id": "$ja_basalt_unique00", "type": "build", "y": 1}
|
||||||
|
],
|
||||||
|
"p": 0.99
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {"id": "$ja_lava_unique00", "y": -1, "type": "building"},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "y": -1},
|
||||||
|
{"id": "$ja_basalt_unique00", "type": "build", "y": -1}
|
||||||
|
],
|
||||||
|
"p": 0.99
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"draw ground": true
|
||||||
|
},
|
||||||
|
//lava
|
||||||
|
{
|
||||||
|
"category": "$cat_disaster00",
|
||||||
|
"frames": [{"bmp": "lava.png"}],
|
||||||
|
"height": 1,
|
||||||
|
"id": "$ja_lava_unique00",
|
||||||
|
"pickable": false,
|
||||||
|
"burnable": false,
|
||||||
|
"ordinal": 99998,
|
||||||
|
"hidden": true,
|
||||||
|
"removable": false,
|
||||||
|
"disaster": true,
|
||||||
|
"icon frames": [{"x": 364, "y": 709, "w": 26, "h": 26}],
|
||||||
|
"final": false,
|
||||||
|
"needs road": false,
|
||||||
|
"power": 0,
|
||||||
|
"price": 0,
|
||||||
|
"text": "A dangerous flow of molten rock that can burn anything in its path. It can be solidified into basalt.",
|
||||||
|
"title": "Lava",
|
||||||
|
"type": "terrain",
|
||||||
|
"water": 0,
|
||||||
|
"width": 1,
|
||||||
|
"fun": [
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$ja_lava_unique00", "invert": true, "x": 1, "type": "building"},
|
||||||
|
{"id": "$ja_basalt_unique00", "invert": true, "x": 1, "type": "building"},
|
||||||
|
{"id": "volcano", "invert": true, "x": 1, "type": "building"},
|
||||||
|
{"type": "building", "x": 1}
|
||||||
|
],
|
||||||
|
"type": "and"
|
||||||
|
},
|
||||||
|
"actions": [{"type": "burn", "x": 1}],
|
||||||
|
"p": 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$ja_lava_unique00", "invert": true, "x": -1, "type": "building"},
|
||||||
|
{"id": "$ja_basalt_unique00", "invert": true, "x": -1, "type": "building"},
|
||||||
|
{"id": "volcano", "invert": true, "x": -1, "type": "building"},
|
||||||
|
{"type": "building", "x": -1}
|
||||||
|
],
|
||||||
|
"type": "and"
|
||||||
|
},
|
||||||
|
"actions": [{"type": "burn", "x": -1}],
|
||||||
|
"p": 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$ja_lava_unique00", "invert": true, "y": 1, "type": "building"},
|
||||||
|
{"id": "$ja_basalt_unique00", "invert": true, "y": 1, "type": "building"},
|
||||||
|
{"id": "volcano", "invert": true, "y": 1, "type": "building"},
|
||||||
|
{"type": "building", "y": 1}
|
||||||
|
],
|
||||||
|
"type": "and"
|
||||||
|
},
|
||||||
|
"actions": [{"type": "burn", "y": 1}],
|
||||||
|
"p": 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$ja_lava_unique00", "invert": true, "y": -1, "type": "building"},
|
||||||
|
{"id": "$ja_basalt_unique00", "invert": true, "y": -1, "type": "building"},
|
||||||
|
{"id": "volcano", "invert": true, "y": -1, "type": "building"},
|
||||||
|
{"type": "building", "y": -1}
|
||||||
|
],
|
||||||
|
"type": "and"
|
||||||
|
},
|
||||||
|
"actions": [{"type": "burn", "y": -1}],
|
||||||
|
"p": 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$destroyedtile", "x": 1, "type": "building"},
|
||||||
|
{"id": "$crater4x4", "x": 1, "type": "building"},
|
||||||
|
{"id": "$crater1x1", "x": 1, "type": "building"},
|
||||||
|
{"id": "$destroyedtileradioactive00", "x": 1, "type": "building"},
|
||||||
|
{"type": "building", "x": 1, "invert": true}
|
||||||
|
],
|
||||||
|
"type": "or"
|
||||||
|
},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "x": 1},
|
||||||
|
{"type": "build", "id": "$ja_lava_unique00", "x": 1}
|
||||||
|
],
|
||||||
|
"p": 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$destroyedtile", "x": -1, "type": "building"},
|
||||||
|
{"id": "$crater4x4", "x": -1, "type": "building"},
|
||||||
|
{"id": "$crater1x1", "x": -1, "type": "building"},
|
||||||
|
{"id": "$destroyedtileradioactive00", "x": -1, "type": "building"},
|
||||||
|
{"type": "building", "x": -1, "invert": true}
|
||||||
|
],
|
||||||
|
"type": "or"
|
||||||
|
},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "x": -1},
|
||||||
|
{"type": "build", "id": "$ja_lava_unique00", "x": -1}
|
||||||
|
],
|
||||||
|
"p": 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$destroyedtile", "y": 1, "type": "building"},
|
||||||
|
{"id": "$crater4x4", "y": 1, "type": "building"},
|
||||||
|
{"id": "$crater1x1", "y": 1, "type": "building"},
|
||||||
|
{"id": "$destroyedtileradioactive00", "y": 1, "type": "building"},
|
||||||
|
{"type": "building", "y": 1, "invert": true}
|
||||||
|
],
|
||||||
|
"type": "or"
|
||||||
|
},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "y": 1},
|
||||||
|
{"type": "build", "id": "$ja_lava_unique00", "y": 1}
|
||||||
|
],
|
||||||
|
"p": 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$destroyedtile", "y": -1, "type": "building"},
|
||||||
|
{"id": "$crater4x4", "y": -1, "type": "building"},
|
||||||
|
{"id": "$crater1x1", "y": -1, "type": "building"},
|
||||||
|
{"id": "$destroyedtileradioactive00", "y": -1, "type": "building"},
|
||||||
|
{"type": "building", "y": -1, "invert": true}
|
||||||
|
],
|
||||||
|
"type": "or"
|
||||||
|
},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "y": -1},
|
||||||
|
{"type": "build", "id": "$ja_lava_unique00", "y": -1}
|
||||||
|
],
|
||||||
|
"p": 0.5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"id": "$ja_lava_unique00", "x": 0, "type": "building"},
|
||||||
|
{"id": "$ja_basalt_unique00", "invert": true, "x": 0, "type": "building"}
|
||||||
|
],
|
||||||
|
"type": "and"
|
||||||
|
},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "x": 0},
|
||||||
|
{"type": "build", "id": "$ja_basalt_unique00", "x": 0}
|
||||||
|
],
|
||||||
|
"p": 0.0025
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": {
|
||||||
|
"inner": [
|
||||||
|
{"x": -1, "type": "water"},
|
||||||
|
{"x": 1, "type": "water"},
|
||||||
|
{"y": 1, "type": "water"},
|
||||||
|
{"y": -1, "type": "water"}
|
||||||
|
],
|
||||||
|
"type": "or"
|
||||||
|
},
|
||||||
|
"actions": [
|
||||||
|
{"type": "remove", "x": 0},
|
||||||
|
{"type": "build", "id": "$ja_basalt_unique00", "x": 0}
|
||||||
|
],
|
||||||
|
"p": 0.85
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"draw ground": true
|
||||||
|
}
|
||||||
|
]
|
||||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Reference in New Issue
Block a user