sorcery  Check-in [cf3645dcf5]

Overview
Comment:idk even
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cf3645dcf5ff2fbb1275a88632a52919ff7e6ecf8ade9f4bf3d5d487935abc8f
User & Date: lexi on 2021-07-11 02:26:00
Other Links: manifest | tags
Context
2021-07-14
15:42
add displacer sound effects, tweak astrolabe recipe to use new crafting items check-in: 67cefa38df user: lexi tags: trunk
2021-07-11
02:26
idk even check-in: cf3645dcf5 user: lexi tags: trunk
2021-07-10
21:24
bug fixes check-in: f4a14cad78 user: lexi tags: trunk
Changes

Modified disassembly.lua from [8701b2357d] to [b1bce87867].

    35     35   	local ink = i:get_stack('ink',1)
    36     36   	local pen = i:get_stack('pen',1)
    37     37   
    38     38   	local ink_count = ink:get_count()
    39     39   	
    40     40   	local maxrecs = math.min(ink_count, paper:get_count(), item:get_count())
    41     41   	if pen:is_empty() then maxrecs = 0 end
    42         -
    43         -	if maxrecs > 0 and sorcery.cookbook.classes.craft.find(item:get_name()) then
    44         -		local rec = ItemStack{name = 'sorcery:recipe', count = maxrecs}
    45         -		sorcery.cookbook.setrecipe(rec, 'craft', item:get_name())
    46         -		i:set_stack('output',1,rec)
    47         -	else
           42  +	local found = false
           43  +	if maxrecs > 0 then
           44  +		for _, meth in pairs {'craft','lathe','grind'} do
           45  +			if sorcery.cookbook.classes[meth].find(item:get_name()) then
           46  +				local rec = ItemStack{name = 'sorcery:recipe', count = maxrecs}
           47  +				sorcery.cookbook.setrecipe(rec, meth, item:get_name())
           48  +				i:set_stack('output',1,rec)
           49  +				found = true
           50  +				break
           51  +			end
           52  +		end
           53  +	end
           54  +	if not found then
    48     55   		i:set_stack('output',1,ItemStack())
    49     56   	end
    50     57   	disassembler_formspec(pos)
    51     58   end
    52     59   local dsbox = {
    53     60   	type = 'fixed';
    54     61   	fixed = {