Comment: | fix amulets again |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
1d0bffea079626cb9909fd932869f88b |
User & Date: | lexi on 2021-10-17 03:27:23 |
Other Links: | manifest | tags |
2021-10-18
| ||
12:00 | fix misplaced parens check-in: 92e49a62b8 user: lexi tags: trunk | |
2021-10-17
| ||
03:27 | fix amulets again check-in: 1d0bffea07 user: lexi tags: trunk | |
2021-10-16
| ||
23:51 | continue work on runes, comment out test code in vfx.lua check-in: 967d5006f5 user: lexi tags: trunk | |
Modified cookbook.lua from [f442987cb7] to [ecf4e863cd].
32 32 bone = { caption = 'Any Bone', cnitem = 'bonemeal:bone' }; 33 33 vessel = { caption = 'Any Bottle', cnitem = 'vessels:glass_bottle' }; 34 34 flower = { caption = 'Any Flower', cnitem = 'flowers:rose' }; 35 35 mushroom = { caption = 'Any Mushroom', cnitem = 'flowers:mushroom_brown' }; 36 36 water_bucket = { caption = 'Water Bucket', cnitem = 'bucket:bucket_water' }; 37 37 sorcery_ley_cable = { caption = 'Cable', cnitem = 'sorcery:cable_vidrium' }; 38 38 scissors = { caption = 'Scissors', cnitem = 'sorcery:scissors_steel' }; 39 + sorcery_screw = { caption = 'Screw', cnitem = 'sorcery:screw_steel' }; 39 40 }; 40 41 } 41 42 sorcery.cookbook.constants = constants 42 43 43 44 local slot3x3 = { 44 45 {0,0}, {1,0}, {2,0}; 45 46 {0,1}, {1,1}, {2,1};
Modified gems.lua from [3215634528] to [fa0c620eff].
1 1 --- gemstones 2 2 local shards_per_gem = 9 3 3 4 4 local register_gem = function(name,gem) 5 5 local itemname = gem.foreign or 'sorcery:gem_' .. name 6 6 local shardname = gem.foreign_shard or 'sorcery:gem_' .. name .. '_shard' 7 7 local amuletname = gem.foreign_amulet or 'sorcery:gem_' .. name .. '_amulet' 8 + local polishedname = gem.foreign_polished or 'sorcery:gem_' .. name .. '_polished' 8 9 9 10 sorcery.data.gems[name].parts = { 10 11 item = itemname; 11 12 shard = shardname; 12 13 amulet = amuletname; 13 14 } 14 15 ................................................................................ 51 52 }; 52 53 }; 53 54 }) 54 55 end 55 56 gem.durability = gem.durability or (gem.hardness or 1) * 100 56 57 if not gem.foreign_amulet then 57 58 local img = sorcery.lib.image 58 - local img_stone = img('sorcery_amulet.png'):multiply(sorcery.lib.color(gem.tone)) 59 + local colorized_stone = function(file) 60 + return img(file):multiply(sorcery.lib.color(gem.tone:brighten(1.1))) 61 + end 62 + local img_stone = colorized_stone('sorcery_amulet.png') 63 + local img_stone_tiny = colorized_stone('sorcery_amulet_embedded.png') 59 64 local img_sparkle = img('sorcery_amulet_sparkle.png') 65 + local img_necklace = img('sorcery_amulet_necklace.png') 60 66 local useamulet = function(stack,user,target) 61 67 local sp = sorcery.amulet.getspell(stack) 62 68 if not sp or not sp.cast then return nil end 63 69 64 70 local usedamulet if stack:get_count() == 1 then 65 71 usedamulet = stack 66 72 else ................................................................................ 119 125 if leftover and leftover:get_count() > 0 then 120 126 minetest.add_item(user:get_pos(), leftover) 121 127 end 122 128 end 123 129 return stack 124 130 end 125 131 end; 132 + 133 + local stonematprops = { 134 + gem = true, id = name, data = gem; 135 + value = (5 * shards_per_gem) + 4; 136 + }; 126 137 minetest.register_craftitem(amuletname, { 127 138 description = sorcery.lib.str.capitalize(name) .. ' amulet'; 128 - inventory_image = img_sparkle:blit(img_stone):render(); 139 + inventory_image = img_sparkle:blit(img_stone):blit(img_necklace):render(); 140 + wield_image = img_sparkle:blit(img_stone):render(); 129 141 wield_scale = { x = 0.6, y = 0.6, z = 0.6 }; 130 142 groups = { sorcery_amulet = 1 }; 131 143 on_use = useamulet; 132 - _sorcery = { 133 - material = { 134 - gem = true, id = name, data = gem; 135 - value = (5 * shards_per_gem) + 4; 136 - }; 137 - amulet = { base = name }; 144 + _sorcery = { material = stonematprops, amulet = { base=name }}; 145 + }) 146 + minetest.register_craftitem(polishedname, { 147 + description = 'Polished ' .. name; 148 + inventory_image = img_sparkle:blit(img_stone):render(); 149 + wield_scale = { x = 0.6, y = 0.6, z = 0.6 }; 150 + _sorcery = { material = stonematprops }; 151 + }) 152 + minetest.register_craft { 153 + output = amuletname; 154 + type = 'shapeless'; 155 + recipe = { 156 + polishedname; 157 + 'basic_materials:silver_wire'; 158 + }; 159 + replacements = { 160 + {'basic_materials:silver_wire', 'basic_materials:empty_spool'}; 138 161 }; 139 - }) 162 + } 140 163 sorcery.lathe.register { 141 164 input = itemname; 142 - output = amuletname; 165 + output = polishedname; 143 166 tech = 'intaglio'; 144 167 cost = 1; 145 168 } 146 169 sorcery.register.metals.foreach('sorcery:mk-amulet-frames-'..name,{'sorcery:generate'}, function(metalid,metal) 147 170 if not metal.amulet then return end 148 171 local framedid = string.format("%s_frame_%s", amuletname, metalid) 149 172 local img_frame = img(string.format('sorcery_amulet_frame_%s.png',metalid)) 150 173 minetest.register_craftitem(framedid, { 151 174 description = string.format("%s-framed %s amulet",sorcery.lib.str.capitalize(metalid), name); 152 - inventory_image = img_sparkle:blit(img_frame):blit(img_stone):render(); 175 + inventory_image = img_stone_tiny:blit(img_frame):blit(img_necklace):render(); 176 + wield_image = img_stone_tiny:blit(img_frame):render(); 153 177 wield_scale = { x = 0.6, y = 0.6, z = 0.6 }; 154 178 groups = { sorcery_amulet = 1 }; 155 179 on_use = useamulet; 156 180 _sorcery = { 157 181 amulet = { base = name, frame = metalid }; 158 182 }; 159 183 })
Modified metal.lua from [fd032c3f0d] to [9d08817e20].
113 113 end 114 114 115 115 if not metal.no_craftables then 116 116 install(screw, 0.5) 117 117 minetest.register_craftitem(screw, { 118 118 description = sorcery.lib.str.capitalize(name) .. ' Screw'; 119 119 inventory_image = sorcery.lib.image('sorcery_screw.png'):multiply(sorcery.lib.color(metal.tone)):render(); 120 - groups = { metal = 1; sorcery_screw = 1; sorcery_tech_component = 1; }; 120 + groups = { metal = 1; screw = 1; sorcery_screw = 1; sorcery_tech_component = 1; }; 121 121 _sorcery = { 122 122 material = { 123 123 id = name, data = metal; 124 124 powder = powder; 125 125 grindcost = 2, grindvalue = 1; 126 126 value = 0.5; 127 127 };
Modified recipes.lua from [7c1490fa06] to [db56bcbbba].
709 709 {'bucket:bucket_water','bucket:bucket_empty'}; 710 710 }; 711 711 } 712 712 minetest.register_craft { 713 713 output = 'sorcery:writing_stand'; 714 714 recipe = { 715 715 {'screwdriver:screwdriver','default:book','default:gold_ingot'}; 716 - {'sorcery:screw_steel','group:wood','sorcery:screw_steel'}; 716 + {'group:sorcery_screw','group:wood','group:sorcery_screw'}; 717 717 {'group:wood','default:stick','group:wood'}; 718 718 }; 719 719 replacements = { 720 720 {'screwdriver:screwdriver','screwdriver:screwdriver'}; 721 721 }; 722 722 }; 723 723
Modified textures/sorcery_amulet.png from [1fec4bee23] to [40cf089c30].
cannot compute difference between binary files
Modified textures/sorcery_amulet_frame_cobalt.png from [03581951d2] to [712d069ef1].
cannot compute difference between binary files
Modified textures/sorcery_amulet_frame_gold.png from [3f4e9ea977] to [63f3443b23].
cannot compute difference between binary files
Modified textures/sorcery_amulet_frame_iridium.png from [1a2fff3d07] to [51f6cad623].
cannot compute difference between binary files
Modified textures/sorcery_amulet_frame_tungsten.png from [22b5ae6c57] to [f984168de7].
cannot compute difference between binary files
Modified textures/sorcery_amulet_sparkle.png from [5b0e4685c3] to [8cee192550].
cannot compute difference between binary files