forked from mrkubax10/industrialtest
Introduce utility function for deriving table fields
This commit is contained in:
@@ -17,8 +17,7 @@
|
||||
-- This entire code is super hacky, I'm aware.
|
||||
|
||||
local S=minetest.get_translator("industrialtest")
|
||||
industrialtest.ElectricSaberBase=table.copy(industrialtest.ActivatedElectricTool)
|
||||
industrialtest.internal.unpackTableInto(industrialtest.ElectricSaberBase,{
|
||||
industrialtest.ElectricSaberBase=industrialtest.internal.derive(industrialtest.ActivatedElectricTool,{
|
||||
fullPunchInterval=0.5,
|
||||
digs={"snappy"},
|
||||
hits={"fleshy"},
|
||||
@@ -55,8 +54,7 @@ function industrialtest.ElectricSaberBase.getOpPower(self,itemstack)
|
||||
return 500
|
||||
end
|
||||
|
||||
industrialtest.ElectricSaber=table.copy(industrialtest.ElectricSaberBase)
|
||||
industrialtest.internal.unpackTableInto(industrialtest.ElectricSaber,{
|
||||
industrialtest.ElectricSaber=industrialtest.internal.derive(industrialtest.ElectricSaberBase,{
|
||||
name="industrialtest:electric_saber",
|
||||
description=S("Electric Saber"),
|
||||
inventoryImage="industrialtest_electric_saber.png",
|
||||
@@ -81,8 +79,7 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
industrialtest.AdvancedElectricSaber=table.copy(industrialtest.ElectricSaberBase)
|
||||
industrialtest.internal.unpackTableInto(industrialtest.AdvancedElectricSaber,{
|
||||
industrialtest.AdvancedElectricSaber=industrialtest.internal.derive(industrialtest.ElectricSaberBase,{
|
||||
name="industrialtest:advanced_electric_saber",
|
||||
description=S("Advanced Electric Saber"),
|
||||
inventoryImage="industrialtest_advanced_electric_saber.png",
|
||||
|
||||
Reference in New Issue
Block a user