Initial commit

This commit is contained in:
2026-02-08 13:41:13 +02:00
commit 99aa5481c6
6 changed files with 102 additions and 0 deletions
BIN
View File
Binary file not shown.
+44
View File
@@ -0,0 +1,44 @@
[
{
"id": "bluepickle.plugin.meme.song",
"type": "sound",
"file": "file.mp3",
"volume": 1.0
},
{
"id": "bluepickle.plugin.meme.lights",
"type": "animation",
"frames": [{"x": 0, "y": 901, "w": 5, "h": 6, "handle x": 1, "handle y": 1, "offset x": 2048, "offset y": 1024}],
"light": true,
"light switching": true
},
{
"id": "bluepickle.plugin.meme.building00",
"type": "award",
"min version": 1906,
"title": "A Normal House",
"text": "House big enough for a small party.",
"influence culture": 25,
"influence religion": 7,
"needs road": false,
"price": 1500,
"monthly price": 0,
"ordinal": -1,
"water": 0,
"power": 0,
"width": 1,
"height": 1,
"level": 1,
"people": 6,
"require privileges": true, // for influences
"frames": [{"bmp": "smolhouse.png"}],
"max count": 1,
"requirements": [
{"type": "HABITANT_COUNT", "data": {"count": 1}}
],
"animation": [
{"id": "bluepickle.plugin.meme.lights", "x": 20, "y": -1}
],
"script": "lua.lua"
}
]
+50
View File
@@ -0,0 +1,50 @@
--[[
Update 1.9.06 should implement City.playSound function which would allow for location based sound.
In addition, it would solve the issues with leaveCity() and leaveStage() events.
]]
local red,green,blue, bx, by, buildingDraft, songDraft
function script:init()
buildingDraft = Draft.getDraft("bluepickle.plugin.meme.building00")
songDraft = Draft.getDraft("bluepickle.plugin.meme.song")
end
function script:update()
math.randomseed(os.time()*10)
red = 256 - math.random(0,256)
green = 256 - math.random(0,256)
blue = 256 - math.random(0,256)
end
function script:draw(tileX,tileY)
if Tile.isBuildingInConstruction(tileX, tileY) then return end
Drawing.setColor(red,green,blue)
Drawing.setTile(tileX,tileY,20,-1)
Drawing.drawImage(Draft.getDraft('bluepickle.plugin.meme.lights'):getFrame(1))
Drawing.reset()
end
function script:event(x,y,level,event)
if event == Script.EVENT_REMOVE and Tile.getBuildingDraft(x,y):getId() == buildingDraft:getId() and song then
song.stop()
bx, by = nil
song = nil
end
end
function script:nextDay()
if City.countBuildings(buildingDraft) > 0 then
bx, by = City.getBuilding(1, buildingDraft)
if song then
song.setPosition(bx, by)
end
end
if bx and not song then
song = City.playSound(songDraft, bx, by, 0.5, true)
elseif song and not true then
song.stop()
song = nil
end
end
+8
View File
@@ -0,0 +1,8 @@
{
"id": "svetikas.lt/theotown/party-house/manifest",
"version": 7,
"title": "Party House",
"text": "A plugin which adds a party house award with a musical surprise.",
"author": "JustAnyone",
"thumbnail": "thumbnail.png"
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB