sorcery  Diff

Differences From Artifact [6e17face1d]:

To Artifact [5df312f3fb]:


143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
		};
		box = {
			compat = 'boxes';
			predicate = function(name)
				local item = minetest.registered_items[name]
				if item._sorcery and item._sorcery.container then
					local ct = item._sorcery.container
					if ct.type == 'box' then return sorcery.lib.tbl.proto(ct, {
						charge = 8;
					}) end
				end
			end;
		};
		bucket = {
			compat = 'buckets';
			finagle = { type = 'bucket', hold = 'liquid', charge = 3 * 3, empty = 'bucket:bucket_empty'};

			predicate = function(name)
				local item = minetest.registered_items[name]
				if item._sorcery and item._sorcery.container then
					local ct = item._sorcery.container
					if ct.type == 'bucket' then return sorcery.lib.tbl.proto(ct, {
						charge = 3 * 3;
					}) end
				end
			end;
		};
		container = {
			compat = 'containers';
			subclass = {'vessel', 'box', 'bucket'}
		};
................................................................................
		end

		if c.compat then
			o = sorcery.data.compat[c.compat][name]
			if o then
				if c.finagle then
					if type(c.finagle) == 'function' then
						return sorcery.lib.tbl.proto(c.finagle(o), o)
					elseif type(o) == 'table' then
						return sorcery.lib.tbl.merge(c.finagle, o)
					end
				end
				return o
			end
		end

		if c.subclass then







|

|











|

|







 







|

|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
...
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
		};
		box = {
			compat = 'boxes';
			predicate = function(name)
				local item = minetest.registered_items[name]
				if item._sorcery and item._sorcery.container then
					local ct = item._sorcery.container
					if ct.type == 'box' then return sorcery.lib.tbl.merge({
						charge = 8;
					}, ct) end
				end
			end;
		};
		bucket = {
			compat = 'buckets';
			finagle = { type = 'bucket', hold = 'liquid', charge = 3 * 3, empty = 'bucket:bucket_empty'};

			predicate = function(name)
				local item = minetest.registered_items[name]
				if item._sorcery and item._sorcery.container then
					local ct = item._sorcery.container
					if ct.type == 'bucket' then return sorcery.lib.tbl.merge({
						charge = 3 * 3;
					}, ct) end
				end
			end;
		};
		container = {
			compat = 'containers';
			subclass = {'vessel', 'box', 'bucket'}
		};
................................................................................
		end

		if c.compat then
			o = sorcery.data.compat[c.compat][name]
			if o then
				if c.finagle then
					if type(c.finagle) == 'function' then
						return sorcery.lib.tbl.merge(o, c.finagle(o))
					elseif type(o) == 'table' then
						return sorcery.lib.tbl.merge(o, c.finagle)
					end
				end
				return o
			end
		end

		if c.subclass then