Browse Source

Initial Commit

tags/v0.2.1
rubenwardy 5 years ago
commit
674ce00011

+ 22
- 0
.gitattributes View File

@@ -0,0 +1,22 @@
1
+# Auto detect text files and perform LF normalization
2
+* text=auto
3
+
4
+# Custom for Visual Studio
5
+*.cs     diff=csharp
6
+*.sln    merge=union
7
+*.csproj merge=union
8
+*.vbproj merge=union
9
+*.fsproj merge=union
10
+*.dbproj merge=union
11
+
12
+# Standard to msysgit
13
+*.doc	 diff=astextplain
14
+*.DOC	 diff=astextplain
15
+*.docx diff=astextplain
16
+*.DOCX diff=astextplain
17
+*.dot  diff=astextplain
18
+*.DOT  diff=astextplain
19
+*.pdf  diff=astextplain
20
+*.PDF	 diff=astextplain
21
+*.rtf	 diff=astextplain
22
+*.RTF	 diff=astextplain

+ 215
- 0
.gitignore View File

@@ -0,0 +1,215 @@
1
+#################
2
+## Eclipse
3
+#################
4
+
5
+*.pydevproject
6
+.project
7
+.metadata
8
+bin/
9
+tmp/
10
+*.tmp
11
+*.bak
12
+*.swp
13
+*~.nib
14
+local.properties
15
+.classpath
16
+.settings/
17
+.loadpath
18
+
19
+# External tool builders
20
+.externalToolBuilders/
21
+
22
+# Locally stored "Eclipse launch configurations"
23
+*.launch
24
+
25
+# CDT-specific
26
+.cproject
27
+
28
+# PDT-specific
29
+.buildpath
30
+
31
+
32
+#################
33
+## Visual Studio
34
+#################
35
+
36
+## Ignore Visual Studio temporary files, build results, and
37
+## files generated by popular Visual Studio add-ons.
38
+
39
+# User-specific files
40
+*.suo
41
+*.user
42
+*.sln.docstates
43
+
44
+# Build results
45
+
46
+[Dd]ebug/
47
+[Rr]elease/
48
+x64/
49
+build/
50
+[Bb]in/
51
+[Oo]bj/
52
+
53
+# MSTest test Results
54
+[Tt]est[Rr]esult*/
55
+[Bb]uild[Ll]og.*
56
+
57
+*_i.c
58
+*_p.c
59
+*.ilk
60
+*.meta
61
+*.obj
62
+*.pch
63
+*.pdb
64
+*.pgc
65
+*.pgd
66
+*.rsp
67
+*.sbr
68
+*.tlb
69
+*.tli
70
+*.tlh
71
+*.tmp
72
+*.tmp_proj
73
+*.log
74
+*.vspscc
75
+*.vssscc
76
+.builds
77
+*.pidb
78
+*.log
79
+*.scc
80
+
81
+# Visual C++ cache files
82
+ipch/
83
+*.aps
84
+*.ncb
85
+*.opensdf
86
+*.sdf
87
+*.cachefile
88
+
89
+# Visual Studio profiler
90
+*.psess
91
+*.vsp
92
+*.vspx
93
+
94
+# Guidance Automation Toolkit
95
+*.gpState
96
+
97
+# ReSharper is a .NET coding add-in
98
+_ReSharper*/
99
+*.[Rr]e[Ss]harper
100
+
101
+# TeamCity is a build add-in
102
+_TeamCity*
103
+
104
+# DotCover is a Code Coverage Tool
105
+*.dotCover
106
+
107
+# NCrunch
108
+*.ncrunch*
109
+.*crunch*.local.xml
110
+
111
+# Installshield output folder
112
+[Ee]xpress/
113
+
114
+# DocProject is a documentation generator add-in
115
+DocProject/buildhelp/
116
+DocProject/Help/*.HxT
117
+DocProject/Help/*.HxC
118
+DocProject/Help/*.hhc
119
+DocProject/Help/*.hhk
120
+DocProject/Help/*.hhp
121
+DocProject/Help/Html2
122
+DocProject/Help/html
123
+
124
+# Click-Once directory
125
+publish/
126
+
127
+# Publish Web Output
128
+*.Publish.xml
129
+*.pubxml
130
+
131
+# NuGet Packages Directory
132
+## TODO: If you have NuGet Package Restore enabled, uncomment the next line
133
+#packages/
134
+
135
+# Windows Azure Build Output
136
+csx
137
+*.build.csdef
138
+
139
+# Windows Store app package directory
140
+AppPackages/
141
+
142
+# Others
143
+sql/
144
+*.Cache
145
+ClientBin/
146
+[Ss]tyle[Cc]op.*
147
+~$*
148
+*~
149
+*.dbmdl
150
+*.[Pp]ublish.xml
151
+*.pfx
152
+*.publishsettings
153
+
154
+# RIA/Silverlight projects
155
+Generated_Code/
156
+
157
+# Backup & report files from converting an old project file to a newer
158
+# Visual Studio version. Backup files are not needed, because we have git ;-)
159
+_UpgradeReport_Files/
160
+Backup*/
161
+UpgradeLog*.XML
162
+UpgradeLog*.htm
163
+
164
+# SQL Server files
165
+App_Data/*.mdf
166
+App_Data/*.ldf
167
+
168
+#############
169
+## Windows detritus
170
+#############
171
+
172
+# Windows image file caches
173
+Thumbs.db
174
+ehthumbs.db
175
+
176
+# Folder config file
177
+Desktop.ini
178
+
179
+# Recycle Bin used on file shares
180
+$RECYCLE.BIN/
181
+
182
+# Mac crap
183
+.DS_Store
184
+
185
+
186
+#############
187
+## Python
188
+#############
189
+
190
+*.py[co]
191
+
192
+# Packages
193
+*.egg
194
+*.egg-info
195
+dist/
196
+build/
197
+eggs/
198
+parts/
199
+var/
200
+sdist/
201
+develop-eggs/
202
+.installed.cfg
203
+
204
+# Installer logs
205
+pip-log.txt
206
+
207
+# Unit test / coverage reports
208
+.coverage
209
+.tox
210
+
211
+#Translations
212
+*.mo
213
+
214
+#Mr Developer
215
+.mr.developer.cfg

+ 15
- 0
README.md View File

@@ -0,0 +1,15 @@
1
+Sweet Food
2
+==========
3
+
4
+An expansion pack for the food mod, written by rubenwardy.
5
+
6
+* Strawberry cheese cake
7
+* Blueberry cheese cake
8
+* Triple chocolate cheese cake
9
+* Coffee and walnut cheese cake
10
+* Rhubarb crumble
11
+* Wedding cake
12
+
13
+
14
+License for code: GPL 3.0 or later.
15
+License for textures: CC-BY-SA

+ 1
- 0
depends.txt View File

@@ -0,0 +1 @@
1
+food

+ 248
- 0
init.lua View File

@@ -0,0 +1,248 @@
1
+-- SWEET FOOD MOD
2
+-- A mod written by rubenwardy that adds
3
+-- sweet food to the minetest game
4
+-- =====================================
5
+-- >> food_sweet/init.lua
6
+-- Adds cakes, pies, waffles, and sweet
7
+-- things
8
+-- =====================================
9
+
10
+-- Boilerplate to support localized strings if intllib mod is installed.
11
+local S
12
+if (minetest.get_modpath("intllib")) then
13
+	dofile(minetest.get_modpath("intllib").."/intllib.lua")
14
+	S = intllib.Getter(minetest.get_current_modname())
15
+else
16
+	S = function ( s ) return s end
17
+end
18
+
19
+food.support("strawberry","farming_plus","farming_plus:strawberry_item")
20
+food.support("strawberry","plantlib","plantlib:strawberry")
21
+food.support("rhubarb","farming_plus","farming_plus:rhubarb_item")
22
+
23
+food.asupport("walnut",function()
24
+	minetest.register_craftitem("food_sweet:walnut", {
25
+		description = S("Walnut"),
26
+		inventory_image = "food_sweet_walnut.png",
27
+		groups = {food_walnut = 1, food_nut = 1}
28
+	})
29
+	food.craft({
30
+		output = "food_sweet:walnut 4",
31
+		recipe = {
32
+			{"","default:sand",""},
33
+			{"default:sand","","default:sand"},
34
+			{"","default:sand",""}
35
+		}
36
+	})
37
+end)
38
+food.asupport("strawberry",function()
39
+	minetest.register_alias("food:strawberry", "food_sweet:strawberry")
40
+	minetest.register_craftitem("food_sweet:strawberry", {
41
+		description = S("Strawberry"),
42
+		inventory_image = "food_strawberry.png",
43
+		on_use = food.item_eat(2),
44
+		groups = {food_strawberry=1}
45
+	})
46
+	food.craft({
47
+		output = "food_sweet:strawberry",
48
+		recipe = {
49
+			{"default:apple"},
50
+		}
51
+	})
52
+end)
53
+food.asupport("blueberry",function()
54
+	minetest.register_craftitem("food_sweet:blueberry", {
55
+		description = S("Blueberry"),
56
+		inventory_image = "food_sweet_blueberry.png",
57
+		groups = {food_blueberry = 1}
58
+	})
59
+	food.craft({
60
+		output = "food_sweet:blueberry 4",
61
+		recipe = {
62
+			{"","wool:blue",""},
63
+			{"wool:blue","","wool:blue"},
64
+			{"","wool:blue",""}
65
+		}
66
+	})
67
+end)
68
+food.asupport("rhubarb",function()
69
+	minetest.register_craftitem("food_sweet:rhubarb", {
70
+		description = S("Rhubard"),
71
+		inventory_image = "farming_rhubarb.png",
72
+		groups = {food_rhubarb = 1}
73
+	})
74
+	food.craft({
75
+		output = "food_sweet:rhubarb 4",
76
+		recipe = {
77
+			{"wool:red"},
78
+			{"wool:red"},
79
+			{"wool:red"}
80
+		}
81
+	})
82
+end)
83
+
84
+-- Walnut and Coffee cake
85
+food.register("food_sweet:cake_walnut_coffee",{
86
+	description = S("Walnut and Coffee Cake"),
87
+	on_use = food.item_eat(4),
88
+	groups={food=3,crumbly=3},
89
+	walkable = false,
90
+	sunlight_propagates = true,
91
+	inventory_image = "food_sweet_cake_walnut_coffee_2d.png",
92
+	tiles = {
93
+		"food_sweet_cake_walnut_coffee_3d_top.png",
94
+		"food_sweet_cake_walnut_coffee_3d_bottom.png",
95
+		"food_sweet_cake_walnut_coffee_3d.png",
96
+		"food_sweet_cake_walnut_coffee_3d.png",
97
+		"food_sweet_cake_walnut_coffee_3d.png",
98
+		"food_sweet_cake_walnut_coffee_3d.png"
99
+	},
100
+	drawtype = "nodebox",
101
+	paramtype = "light",
102
+	node_box = {
103
+		type = "fixed",
104
+		fixed = {
105
+			{-0.5,-0.4375,-0.5,0.5,0,0.5}, --NodeBox1
106
+			{-0.4375,-0.5,-0.4375,0.438462,-0.4375,0.426923}, --NodeBox2
107
+			{-0.4375,0,-0.4375,0.45,0.0625,0.426923}, --NodeBox3
108
+			{-0.3125,0.0625,0.1875,-0.1875,0.1875,0.3125}, --NodeBox4
109
+			{0.1875,0.0625,-0.3125,0.3125,0.1875,-0.1875}, --NodeBox5
110
+		}
111
+	}
112
+})
113
+minetest.register_craftitem("food_sweet:cakemix_walnut_coffee",{
114
+	description = S("Walnut and Coffee Cake Mix"),
115
+	inventory_image = "food_sweet_cakemix_walnut_coffee.png"
116
+})
117
+food.craft({
118
+	type = "cooking",
119
+	output = "food_sweet:cake_walnut_coffee",
120
+	recipe = "food_sweet:cakemix_walnut_coffee",
121
+	cooktime = 10
122
+})
123
+food.craft({
124
+	output = "food_sweet:cakemix_walnut_coffee",
125
+	recipe = {
126
+		{"","group:food_walnut",""},
127
+		{"group:food_flour","group:food_sugar","group:food_egg"}
128
+	}
129
+})
130
+
131
+-- Strawberry Cheese cake
132
+minetest.register_alias("food:cake_cheese", "food_sweet:cake_cheese")
133
+minetest.register_alias("food:cakemix_cheese", "food_sweet:cakemix_cheese")
134
+minetest.register_craftitem("food_sweet:cake_cheese",{
135
+	description = S("Strawberry Cheese Cake"),
136
+	inventory_image = "food_sweet_cake_cheese.png",
137
+	on_use = food.item_eat(4),
138
+	groups={food=3,crumbly=3}
139
+})
140
+minetest.register_craftitem("food_sweet:cakemix_cheese",{
141
+	description = S("Strawberry Cheese Cake Mix"),
142
+	inventory_image = "food_sweet_cakemix_cheese.png"
143
+})
144
+food.craft({
145
+	type = "cooking",
146
+	output = "food_sweet:cake_cheese",
147
+	recipe = "food_sweet:cakemix_cheese",
148
+	cooktime = 10
149
+})
150
+food.craft({
151
+	output = "food_sweet:cakemix_cheese",
152
+	recipe = {
153
+		{"group:food_cheese","group:food_strawberry",""},
154
+		{"group:food_flour","group:food_sugar","group:food_egg"}
155
+	}
156
+})
157
+
158
+-- Blueberry Cheese Cake
159
+minetest.register_craftitem("food_sweet:cake_cheese_blueberry",{
160
+	description = S("Blueberry Cheese Cake"),
161
+	inventory_image = "food_sweet_cake_cheese_blueberry.png",
162
+	on_use = food.item_eat(4),
163
+	groups={food=3,crumbly=3}
164
+})
165
+minetest.register_craftitem("food_sweet:cakemix_cheese_blueberry",{
166
+	description = S("Blueberry Cheese Cake Mix"),
167
+	inventory_image = "food_sweet_cakemix_cheese_blueberry.png"
168
+})
169
+food.craft({
170
+	type = "cooking",
171
+	output = "food_sweet:cake_cheese_blueberry",
172
+	recipe = "food_sweet:cakemix_cheese_blueberry",
173
+	cooktime = 10
174
+})
175
+food.craft({
176
+	output = "food_sweet:cakemix_cheese",
177
+	recipe = {
178
+		{"group:food_cheese","group:food_blueberry",""},
179
+		{"group:food_flour","group:food_sugar","group:food_egg"}
180
+	}
181
+})
182
+
183
+-- Triple chocolate cake
184
+minetest.register_craftitem("food_sweet:cake_triple_choco",{
185
+	description = S("Triple Chocolate Cake"),
186
+	inventory_image = "food_sweet_cake_triple_choco.png",
187
+	on_use = food.item_eat(4),
188
+	groups={food=3,crumbly=3}
189
+})
190
+minetest.register_craftitem("food_sweet:cakemix_triple_choco",{
191
+	description = S("Triple Chocolate Cake Mix"),
192
+	inventory_image = "food_sweet_cakemix_triple_choco.png"
193
+})
194
+food.craft({
195
+	type = "cooking",
196
+	output = "food_sweet:cake_triple_choco",
197
+	recipe = "food_sweet:cakemix_triple_choco",
198
+	cooktime = 10
199
+})
200
+food.craft({
201
+	output = "food_sweet:cakemix_triple_choco",
202
+	recipe = {
203
+		{"group:food_milk_chocolate","group:food_milk_chocolate","group:food_milk_chocolate"},
204
+		{"group:food_flour","group:food_sugar","group:food_egg"}
205
+	}
206
+})
207
+
208
+-- Wedding Cake
209
+minetest.register_craftitem("food_sweet:cake_wedding",{
210
+	description = S("Wedding Cake"),
211
+	inventory_image = "food_sweet_cake_wedding.png",
212
+	on_use = food.item_eat(4),
213
+	groups={food=3,crumbly=3}
214
+})
215
+
216
+food.craft({
217
+	output = "food_sweet:cake_wedding",
218
+	recipe = {
219
+		{"food:cake"},
220
+		{"food:cake"},
221
+		{"food:cake"}
222
+	}
223
+})
224
+
225
+-- Rhubarb Crumble
226
+minetest.register_craftitem("food_sweet:crumble_rhubarb",{
227
+	description = S("Rhubarb Crumble"),
228
+	inventory_image = "food_sweet_crumble_rhubarb.png",
229
+	on_use = food.item_eat(4),
230
+	groups={food=3,crumbly=3}
231
+})
232
+minetest.register_craftitem("food_sweet:crumble_rhubarb_raw",{
233
+	description = S("Raw Rhubarb Crumble"),
234
+	inventory_image = "food_sweet_crumble_rhubarb_raw.png"
235
+})
236
+food.craft({
237
+	type = "cooking",
238
+	output = "food_sweet:crumble_rhubarb",
239
+	recipe = "food_sweet:crumble_rhubarb_raw",
240
+	cooktime = 10
241
+})
242
+food.craft({
243
+	output = "food_sweet:crumble_rhubarb_raw",
244
+	recipe = {
245
+		{"","group:food_rhubarb",""},
246
+		{"group:food_flour","group:food_sugar","group:food_egg"}
247
+	}
248
+})

+ 1
- 0
locale/de.txt View File

@@ -0,0 +1 @@
1
+Strawberry = Erdbeere

+ 16
- 0
locale/template.txt View File

@@ -0,0 +1,16 @@
1
+# template
2
+Walnut =
3
+Strawberry =
4
+Blueberry =
5
+Rhubarb =
6
+Walnut and Coffee Cake =
7
+Walnut and Coffee Cake Mix =
8
+Strawberry Cheese Cake =
9
+Strawberry Cheese Cake Mix =
10
+Blueberry Cheese Cake =
11
+Blueberry Cheese Cake Mix =
12
+Triple Chocolate Cake =
13
+Triple Chocolate Cake Mix =
14
+Wedding Cake =
15
+Rhubarb Crumble =
16
+Raw Rhubarb Crumble =

BIN
textures/farming_rhubarb.png View File


BIN
textures/food_sweet_blueberry.png View File


BIN
textures/food_sweet_cake_cheese.png View File


BIN
textures/food_sweet_cake_cheese_blueberry.png View File


BIN
textures/food_sweet_cake_triple_choco.png View File


BIN
textures/food_sweet_cake_walnut_coffee_2d.png View File


BIN
textures/food_sweet_cake_walnut_coffee_3d.png View File


BIN
textures/food_sweet_cake_walnut_coffee_3d_bottom.png View File


BIN
textures/food_sweet_cake_walnut_coffee_3d_top.png View File


BIN
textures/food_sweet_cake_wedding.png View File


BIN
textures/food_sweet_cakemix_cheese.png View File


BIN
textures/food_sweet_cakemix_cheese_blueberry.png View File


BIN
textures/food_sweet_cakemix_triple_choco.png View File


BIN
textures/food_sweet_cakemix_walnut_coffee.png View File


BIN
textures/food_sweet_crumble_rhubarb.png View File


BIN
textures/food_sweet_crumble_rhubarb_raw.png View File


BIN
textures/food_sweet_walnut.png View File


Loading…
Cancel
Save