Overhaul by Droog71
27
.luacheckrc
|
@ -1,27 +0,0 @@
|
|||
unused_args = false
|
||||
allow_defined_top = true
|
||||
|
||||
read_globals = {
|
||||
"DIR_DELIM",
|
||||
"minetest",
|
||||
"dump",
|
||||
"vector",
|
||||
"VoxelManip", "VoxelArea",
|
||||
"PseudoRandom", "PcgRandom",
|
||||
"ItemStack",
|
||||
"Settings",
|
||||
"unpack",
|
||||
-- Silence errors about custom table methods.
|
||||
table = { fields = { "copy", "indexof" } },
|
||||
-- Silence warnings about accessing undefined fields of global 'math'
|
||||
math = { fields = { "sign" } }
|
||||
}
|
||||
|
||||
-- Overwrites minetest.handle_node_drops
|
||||
files["mods/creative/init.lua"].globals = { "minetest" }
|
||||
|
||||
-- Overwrites minetest.calculate_knockback
|
||||
files["mods/player_api/api.lua"].globals = { "minetest" }
|
||||
|
||||
-- Don't report on legacy definitions of globals.
|
||||
files["mods/default/legacy.lua"].global = false
|
11
.travis.yml
|
@ -1,11 +0,0 @@
|
|||
language: generic
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- luarocks
|
||||
before_install:
|
||||
- luarocks install --local luacheck
|
||||
script:
|
||||
- $HOME/.luarocks/bin/luacheck ./mods
|
||||
notifications:
|
||||
email: false
|
|
@ -1,2 +1,3 @@
|
|||
# minegistics
|
||||
a minetest game for minetest game jam
|
||||
Minegistics
|
||||
=============
|
||||
A building game with logistics networks, power grids, towns and trains.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name = Minegistic
|
||||
author = logalog
|
||||
name = Minegistics
|
||||
author = logalog, Droog71
|
||||
allowed_mapgens = singlenode
|
||||
description = Basic game of connecting resource nodes together
|
||||
description = A building game with logistics networks, power grids, towns and trains.
|
||||
|
|
1084
game_api.txt
After Width: | Height: | Size: 1.5 MiB |
BIN
menu/header.png
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
menu/icon.png
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 28 KiB |
|
@ -1,77 +0,0 @@
|
|||
# This file contains settings of Minetest Game that can be changed in
|
||||
# minetest.conf.
|
||||
# By default, all the settings are commented and not functional.
|
||||
# Uncomment settings by removing the preceding #.
|
||||
|
||||
# Whether creative mode (fast digging of all blocks, unlimited resources) should
|
||||
# be enabled.
|
||||
#creative_mode = false
|
||||
|
||||
# Sets the behaviour of the inventory items when a player dies.
|
||||
# bones: Store items in a bone node but drop items if inside protected area.
|
||||
# drop: Drop items on the ground.
|
||||
# keep: Player keeps items.
|
||||
#bones_mode = bones
|
||||
|
||||
# The time in seconds after which the bones of a dead player can be looted by
|
||||
# everyone.
|
||||
# 0 to disable.
|
||||
#share_bones_time = 1200
|
||||
|
||||
# How much earlier the bones of a dead player can be looted by
|
||||
# everyone if the player dies in a protected area they don't own.
|
||||
# 0 to disable. By default it is "share_bones_time" divide by four.
|
||||
#share_bones_time_early = 300
|
||||
|
||||
# Inform player of condition and location of new bones.
|
||||
#bones_position_message = false
|
||||
|
||||
# Whether fire should be enabled. If disabled, 'basic_flame' nodes will
|
||||
# disappear.
|
||||
# 'permanent_flame' nodes will remain with either setting.
|
||||
#enable_fire = true
|
||||
|
||||
# Enable flame sound.
|
||||
#flame_sound = true
|
||||
|
||||
# Whether lavacooling should be enabled.
|
||||
#enable_lavacooling = true
|
||||
|
||||
# Whether the stuff in initial_stuff should be given to new players.
|
||||
#give_initial_stuff = false
|
||||
#initial_stuff = default:pick_steel,default:axe_steel,default:shovel_steel,
|
||||
default:torch 99,default:cobble 99
|
||||
|
||||
# Whether the TNT mod should be enabled.
|
||||
#enable_tnt = <true in singleplayer, false in multiplayer>
|
||||
|
||||
# The radius of a TNT explosion.
|
||||
#tnt_radius = 3
|
||||
|
||||
# Enable the stairs mod ABM that replaces the old 'upside down'
|
||||
# stair and slab nodes in old maps with the new param2 versions.
|
||||
#enable_stairs_replace_abm = false
|
||||
|
||||
# Whether to allow respawning in beds.
|
||||
# Default value is true.
|
||||
#enable_bed_respawn = true
|
||||
|
||||
# Whether players can skip night by sleeping.
|
||||
# Default value is true.
|
||||
#enable_bed_night_skip = true
|
||||
|
||||
# If enabled, fences and walls cannot be jumped over.
|
||||
#enable_fence_tall = false
|
||||
|
||||
# Whether the engine's spawn search, which does not check for a suitable
|
||||
# starting biome, is used.
|
||||
# Default value is false.
|
||||
#engine_spawn = false
|
||||
|
||||
# Whether river water source nodes create flowing sounds.
|
||||
# Helps rivers create more sound, especially on level sections.
|
||||
#river_source_sounds = false
|
||||
|
||||
# Enable cloud variation by the 'weather' mod.
|
||||
# Non-functional in V6 or Singlenode mapgens.
|
||||
#enable_weather = true
|
|
@ -53,11 +53,7 @@ minetest.register_node("basenodes:stone", {
|
|||
|
||||
minetest.register_node("basenodes:dirt_with_grass", {
|
||||
description = "Dirt with Grass",
|
||||
tiles ={"default_grass.png",
|
||||
-- a little dot on the bottom to distinguish it from dirt
|
||||
"default_dirt.png^basenodes_dirt_with_grass_bottom.png",
|
||||
{name = "default_dirt.png^default_grass_side.png",
|
||||
tileable_vertical = false}},
|
||||
tiles ={"default_grass.png"},
|
||||
})
|
||||
|
||||
minetest.register_node("basenodes:dirt", {
|
||||
|
@ -114,6 +110,14 @@ minetest.register_node("basenodes:stone_with_gold", {
|
|||
tiles = {"default_stone.png^default_mineral_gold.png"},
|
||||
})
|
||||
|
||||
base_ores = {
|
||||
["basenodes:stone_with_coal"] = "basenodes:coal_lump",
|
||||
["basenodes:stone_with_tin"] = "basenodes:tin_lump",
|
||||
["basenodes:stone_with_copper"] = "basenodes:copper_lump",
|
||||
["basenodes:stone_with_iron"] = "basenodes:iron_lump",
|
||||
["basenodes:stone_with_gold"] = "basenodes:gold_lump"
|
||||
}
|
||||
|
||||
minetest.register_node("basenodes:river_water_source", {
|
||||
description = "River Water Source".."\n"..
|
||||
"Drowning damage: 1",
|
||||
|
|
Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 187 B |
|
@ -1,509 +0,0 @@
|
|||
-- carts/cart_entity.lua
|
||||
|
||||
local lumps = {
|
||||
"basenodes:coal_lump",
|
||||
"basenodes:copper_lump",
|
||||
"basenodes:tin_lump",
|
||||
"basenodes:iron_lump",
|
||||
"basenodes:gold_lump"
|
||||
}
|
||||
|
||||
local cart_entity = {
|
||||
initial_properties = {
|
||||
physical = false, -- otherwise going uphill breaks
|
||||
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "carts_cart.b3d",
|
||||
visual_size = {x=1, y=1},
|
||||
textures = {"carts_cart.png"}
|
||||
},
|
||||
|
||||
driver = nil,
|
||||
punched = false, -- used to re-send velocity and position
|
||||
velocity = {x=0, y=0, z=0}, -- only used on punch
|
||||
old_dir = {x=1, y=0, z=0}, -- random value to start the cart on punch
|
||||
old_pos = nil,
|
||||
old_switch = 0,
|
||||
railtype = nil,
|
||||
attached_items = {},
|
||||
cartInv = {},
|
||||
automation_timer = 0,
|
||||
load = true
|
||||
}
|
||||
|
||||
function cart_entity:on_activate(staticdata, dtime_s)
|
||||
self.object:set_armor_groups({immortal=1})
|
||||
if string.sub(staticdata, 1, string.len("return")) ~= "return" then
|
||||
return
|
||||
end
|
||||
local data = minetest.deserialize(staticdata)
|
||||
if type(data) ~= "table" then
|
||||
return
|
||||
end
|
||||
self.railtype = data.railtype
|
||||
self.cartInv = data.cartInv
|
||||
self.load = data.load
|
||||
if data.old_dir then
|
||||
self.old_dir = data.old_dir
|
||||
end
|
||||
end
|
||||
|
||||
function cart_entity:get_staticdata()
|
||||
return minetest.serialize({
|
||||
railtype = self.railtype,
|
||||
old_dir = self.old_dir,
|
||||
cartInv = self.cartInv,
|
||||
load = self.load
|
||||
})
|
||||
end
|
||||
|
||||
-- 0.5.x and later: When the driver leaves
|
||||
function cart_entity:on_detach_child(child)
|
||||
if child and child:get_player_name() == self.driver then
|
||||
self.driver = nil
|
||||
carts:manage_attachment(child, nil)
|
||||
end
|
||||
end
|
||||
|
||||
function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
|
||||
local pos = self.object:get_pos()
|
||||
local vel = self.object:get_velocity()
|
||||
if not self.railtype or vector.equals(vel, {x=0, y=0, z=0}) then
|
||||
local node = minetest.get_node(pos).name
|
||||
self.railtype = minetest.get_item_group(node, "connect_to_raillike")
|
||||
end
|
||||
-- Punched by non-player
|
||||
if not puncher or not puncher:is_player() then
|
||||
local cart_dir = carts:get_rail_direction(pos, self.old_dir, nil, nil, self.railtype)
|
||||
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
|
||||
return
|
||||
end
|
||||
self.velocity = vector.multiply(cart_dir, 2)
|
||||
self.punched = true
|
||||
return
|
||||
end
|
||||
-- Player digs cart by sneak-punch
|
||||
if puncher:get_player_control().sneak then
|
||||
if self.sound_handle then
|
||||
minetest.sound_stop(self.sound_handle)
|
||||
end
|
||||
-- Detach driver and items
|
||||
if self.driver then
|
||||
if self.old_pos then
|
||||
self.object:set_pos(self.old_pos)
|
||||
end
|
||||
local player = minetest.get_player_by_name(self.driver)
|
||||
carts:manage_attachment(player, nil)
|
||||
end
|
||||
for _, obj_ in ipairs(self.attached_items) do
|
||||
if obj_ then
|
||||
obj_:set_detach()
|
||||
end
|
||||
end
|
||||
-- Pick up cart
|
||||
local inv = puncher:get_inventory()
|
||||
if not minetest.is_creative_enabled(puncher:get_player_name())
|
||||
or not inv:contains_item("main", "carts:cart") then
|
||||
local leftover = inv:add_item("main", "carts:cart")
|
||||
-- If no room in inventory add a replacement cart to the world
|
||||
if not leftover:is_empty() then
|
||||
minetest.add_item(self.object:get_pos(), leftover)
|
||||
end
|
||||
end
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
-- Player punches cart to alter velocity
|
||||
if puncher:get_player_name() == self.driver then
|
||||
if math.abs(vel.x + vel.z) > carts.punch_speed_max then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local punch_dir = carts:velocity_to_dir(puncher:get_look_dir())
|
||||
punch_dir.y = 0
|
||||
local cart_dir = carts:get_rail_direction(pos, punch_dir, nil, nil, self.railtype)
|
||||
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
|
||||
return
|
||||
end
|
||||
|
||||
local punch_interval = 1
|
||||
if tool_capabilities and tool_capabilities.full_punch_interval then
|
||||
punch_interval = tool_capabilities.full_punch_interval
|
||||
end
|
||||
time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval)
|
||||
local f = 2 * (time_from_last_punch / punch_interval)
|
||||
|
||||
self.velocity = vector.multiply(cart_dir, f)
|
||||
self.old_dir = cart_dir
|
||||
self.punched = true
|
||||
end
|
||||
|
||||
local function rail_on_step_event(handler, obj, dtime)
|
||||
if handler then
|
||||
handler(obj, dtime)
|
||||
end
|
||||
end
|
||||
|
||||
-- sound refresh interval = 1.0sec
|
||||
local function rail_sound(self, dtime)
|
||||
if not self.sound_ttl then
|
||||
self.sound_ttl = 1.0
|
||||
return
|
||||
elseif self.sound_ttl > 0 then
|
||||
self.sound_ttl = self.sound_ttl - dtime
|
||||
return
|
||||
end
|
||||
self.sound_ttl = 1.0
|
||||
if self.sound_handle then
|
||||
local handle = self.sound_handle
|
||||
self.sound_handle = nil
|
||||
minetest.after(0.2, minetest.sound_stop, handle)
|
||||
end
|
||||
local vel = self.object:get_velocity()
|
||||
local speed = vector.length(vel)
|
||||
if speed > 0 then
|
||||
self.sound_handle = minetest.sound_play(
|
||||
"carts_cart_moving", {
|
||||
object = self.object,
|
||||
gain = (speed / carts.speed_max) / 2,
|
||||
loop = true,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
local function get_railparams(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
return carts.railparams[node.name] or {}
|
||||
end
|
||||
|
||||
local v3_len = vector.length
|
||||
local function rail_on_step(self, dtime)
|
||||
local vel = self.object:get_velocity()
|
||||
if self.punched then
|
||||
vel = vector.add(vel, self.velocity)
|
||||
self.object:set_velocity(vel)
|
||||
self.old_dir.y = 0
|
||||
elseif vector.equals(vel, {x=0, y=0, z=0}) then
|
||||
return
|
||||
end
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
local cart_dir = carts:velocity_to_dir(vel)
|
||||
local same_dir = vector.equals(cart_dir, self.old_dir)
|
||||
local update = {}
|
||||
|
||||
if self.old_pos and not self.punched and same_dir then
|
||||
local flo_pos = vector.round(pos)
|
||||
local flo_old = vector.round(self.old_pos)
|
||||
if vector.equals(flo_pos, flo_old) then
|
||||
-- Do not check one node multiple times
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local ctrl, player
|
||||
|
||||
-- Get player controls
|
||||
if self.driver then
|
||||
player = minetest.get_player_by_name(self.driver)
|
||||
if player then
|
||||
ctrl = player:get_player_control()
|
||||
end
|
||||
end
|
||||
|
||||
local stop_wiggle = false
|
||||
if self.old_pos and same_dir then
|
||||
-- Detection for "skipping" nodes (perhaps use average dtime?)
|
||||
-- It's sophisticated enough to take the acceleration in account
|
||||
local acc = self.object:get_acceleration()
|
||||
local distance = dtime * (v3_len(vel) + 0.5 * dtime * v3_len(acc))
|
||||
|
||||
local new_pos, new_dir = carts:pathfinder(
|
||||
pos, self.old_pos, self.old_dir, distance, ctrl,
|
||||
self.old_switch, self.railtype
|
||||
)
|
||||
|
||||
if new_pos then
|
||||
-- No rail found: set to the expected position
|
||||
pos = new_pos
|
||||
update.pos = true
|
||||
cart_dir = new_dir
|
||||
end
|
||||
elseif self.old_pos and self.old_dir.y ~= 1 and not self.punched then
|
||||
-- Stop wiggle
|
||||
stop_wiggle = true
|
||||
end
|
||||
|
||||
local railparams
|
||||
|
||||
-- dir: New moving direction of the cart
|
||||
-- switch_keys: Currently pressed L/R key, used to ignore the key on the next rail node
|
||||
local dir, switch_keys = carts:get_rail_direction(
|
||||
pos, cart_dir, ctrl, self.old_switch, self.railtype
|
||||
)
|
||||
local dir_changed = not vector.equals(dir, self.old_dir)
|
||||
|
||||
local new_acc = {x=0, y=0, z=0}
|
||||
if stop_wiggle or vector.equals(dir, {x=0, y=0, z=0}) then
|
||||
vel = {x = 0, y = 0, z = 0}
|
||||
local pos_r = vector.round(pos)
|
||||
if not carts:is_rail(pos_r, self.railtype)
|
||||
and self.old_pos then
|
||||
pos = self.old_pos
|
||||
elseif not stop_wiggle then
|
||||
pos = pos_r
|
||||
else
|
||||
pos.y = math.floor(pos.y + 0.5)
|
||||
end
|
||||
update.pos = true
|
||||
update.vel = true
|
||||
else
|
||||
-- Direction change detected
|
||||
if dir_changed then
|
||||
vel = vector.multiply(dir, math.abs(vel.x + vel.z))
|
||||
update.vel = true
|
||||
if dir.y ~= self.old_dir.y then
|
||||
pos = vector.round(pos)
|
||||
update.pos = true
|
||||
end
|
||||
end
|
||||
-- Center on the rail
|
||||
if dir.z ~= 0 and math.floor(pos.x + 0.5) ~= pos.x then
|
||||
pos.x = math.floor(pos.x + 0.5)
|
||||
update.pos = true
|
||||
end
|
||||
if dir.x ~= 0 and math.floor(pos.z + 0.5) ~= pos.z then
|
||||
pos.z = math.floor(pos.z + 0.5)
|
||||
update.pos = true
|
||||
end
|
||||
|
||||
-- Slow down or speed up..
|
||||
local acc = dir.y * -4.0
|
||||
|
||||
-- Get rail for corrected position
|
||||
railparams = get_railparams(pos)
|
||||
|
||||
-- no need to check for railparams == nil since we always make it exist.
|
||||
local speed_mod = railparams.acceleration
|
||||
if speed_mod and speed_mod ~= 0 then
|
||||
-- Try to make it similar to the original carts mod
|
||||
acc = acc + speed_mod
|
||||
else
|
||||
-- Handbrake or coast
|
||||
if ctrl and ctrl.down then
|
||||
acc = acc - 3
|
||||
else
|
||||
acc = acc
|
||||
end
|
||||
end
|
||||
|
||||
new_acc = vector.multiply(dir, acc)
|
||||
end
|
||||
|
||||
-- Limits
|
||||
local max_vel = carts.speed_max
|
||||
for _, v in pairs({"x","y","z"}) do
|
||||
if math.abs(vel[v]) > max_vel then
|
||||
vel[v] = carts:get_sign(vel[v]) * max_vel
|
||||
new_acc[v] = 0
|
||||
update.vel = true
|
||||
end
|
||||
end
|
||||
|
||||
self.object:set_acceleration(new_acc)
|
||||
self.old_pos = vector.round(pos)
|
||||
if not vector.equals(dir, {x=0, y=0, z=0}) and not stop_wiggle then
|
||||
self.old_dir = vector.new(dir)
|
||||
end
|
||||
self.old_switch = switch_keys
|
||||
|
||||
if self.punched then
|
||||
-- Collect dropped items
|
||||
for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do
|
||||
local ent = obj_:get_luaentity()
|
||||
-- Careful here: physical_state and disable_physics are item-internal APIs
|
||||
if ent and ent.name == "__builtin:item" and ent.physical_state then
|
||||
ent:disable_physics()
|
||||
obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||
self.attached_items[#self.attached_items + 1] = obj_
|
||||
add_item_to_cart(self, ent)
|
||||
end
|
||||
end
|
||||
|
||||
self.punched = false
|
||||
update.vel = true
|
||||
end
|
||||
|
||||
railparams = railparams or get_railparams(pos)
|
||||
|
||||
if not (update.vel or update.pos) then
|
||||
rail_on_step_event(railparams.on_step, self, dtime)
|
||||
return
|
||||
end
|
||||
|
||||
local yaw = 0
|
||||
if self.old_dir.x < 0 then
|
||||
yaw = 0.5
|
||||
elseif self.old_dir.x > 0 then
|
||||
yaw = 1.5
|
||||
elseif self.old_dir.z < 0 then
|
||||
yaw = 1
|
||||
end
|
||||
self.object:set_yaw(yaw * math.pi)
|
||||
|
||||
local anim = {x=0, y=0}
|
||||
if dir.y == -1 then
|
||||
anim = {x=1, y=1}
|
||||
elseif dir.y == 1 then
|
||||
anim = {x=2, y=2}
|
||||
end
|
||||
self.object:set_animation(anim, 1, 0)
|
||||
|
||||
if update.vel then
|
||||
self.object:set_velocity(vel)
|
||||
end
|
||||
if update.pos then
|
||||
if dir_changed then
|
||||
self.object:set_pos(pos)
|
||||
else
|
||||
self.object:move_to(pos)
|
||||
end
|
||||
end
|
||||
|
||||
-- call event handler
|
||||
rail_on_step_event(railparams.on_step, self, dtime)
|
||||
end
|
||||
|
||||
--adjusts inventory based on attached items
|
||||
function add_item_to_cart(cart, item_ent)
|
||||
if item_ent then
|
||||
local inv_item = minetest.deserialize(item_ent:get_staticdata())
|
||||
local item_table = {}
|
||||
for str in string.gmatch(inv_item["itemstring"], "([^".." ".."]+)") do
|
||||
table.insert(item_table, str)
|
||||
end
|
||||
local item_name = item_table[1]
|
||||
local item_amount = item_table[2]
|
||||
if item_amount == nil then item_amount = 1 end
|
||||
for lump, amount in pairs(cart.cartInv) do
|
||||
if lump == item_name then
|
||||
if cart.cartInv[lump] == nil then cart.cartInv[lump] = 0 end
|
||||
cart.cartInv[lump] = cart.cartInv[lump] + item_amount
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--attaches an itemstack to the cart
|
||||
function attach_to_cart(cart, item)
|
||||
local item_obj = minetest.add_item(cart.object:get_pos(), ItemStack(item))
|
||||
local item_ent = item_obj:get_luaentity()
|
||||
if item_ent and item_ent.name == "__builtin:item" and item_ent.physical_state then
|
||||
item_ent:disable_physics()
|
||||
item_obj:set_attach(cart.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||
cart.attached_items[#cart.attached_items + 1] = item_obj
|
||||
end
|
||||
end
|
||||
|
||||
--removes all itemstacks from the cart
|
||||
function empty_cart(cart)
|
||||
for _, obj in pairs(cart.attached_items) do
|
||||
if obj then
|
||||
local ent = obj:get_luaentity()
|
||||
if ent then
|
||||
obj:remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Checks if the cart is moving and if stopped check for a structure next to it.
|
||||
local function structure_check(self, dtime)
|
||||
local vel = self.object:get_velocity()
|
||||
local pos = self.object:get_pos()
|
||||
local north = minetest.get_meta({x=(pos.x + 1), y=pos.y, z=pos.z})
|
||||
local south = minetest.get_meta({x=(pos.x - 1), y=pos.y, z=pos.z})
|
||||
local east = minetest.get_meta({x=pos.x, y=pos.y, z=(pos.z + 1)})
|
||||
local west = minetest.get_meta({x=pos.x, y=pos.y, z=(pos.z - 1)})
|
||||
local directions = {north, south, east, west}
|
||||
|
||||
if vel.x == 0 and vel.y == 0 and vel.z == 0 then
|
||||
for i, direction in ipairs(directions) do
|
||||
if direction:get_string("infotext") == "collector" then
|
||||
resources = direction:get_inventory()
|
||||
for i, lump in ipairs(lumps) do
|
||||
while (resources:contains_item("main", (lump .. " 10"))) do
|
||||
resources:remove_item("main", (lump .. " 10"))
|
||||
if self.cartInv[lump] == nil then
|
||||
self.cartInv[lump] = 0
|
||||
end
|
||||
self.cartInv[lump] = self.cartInv[lump] + 10
|
||||
attach_to_cart(self, lump .. " 10")
|
||||
end
|
||||
end
|
||||
elseif direction:get_string("infotext") == "depot" then
|
||||
resources = direction:get_inventory()
|
||||
for i, lump in ipairs(lumps) do
|
||||
if self.cartInv[lump] == nil then
|
||||
self.cartInv[lump] = 0
|
||||
end
|
||||
if self.cartInv[lump] > 0 then
|
||||
resources:add_item("main", lump .. " " .. self.cartInv[lump])
|
||||
self.cartInv[lump] = 0
|
||||
end
|
||||
end
|
||||
empty_cart(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function cart_entity:on_step(dtime)
|
||||
structure_check(self, dtime)
|
||||
rail_on_step(self, dtime)
|
||||
rail_sound(self, dtime)
|
||||
self.automation_timer = self.automation_timer + 1
|
||||
if self.automation_timer >= 500 then
|
||||
self:on_punch()
|
||||
self.automation_timer = 0
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_entity("carts:cart", cart_entity)
|
||||
|
||||
minetest.register_craftitem("carts:cart", {
|
||||
description = ("Cart") .. "\n" .. ("(Sneak+Click to pick up)"),
|
||||
inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_front.png", "carts_cart_side.png"),
|
||||
wield_image = "carts_cart_front.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:is_player() and
|
||||
placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
if not pointed_thing.type == "node" then
|
||||
return
|
||||
end
|
||||
if carts:is_rail(pointed_thing.under) then
|
||||
minetest.add_entity(pointed_thing.under, "carts:cart")
|
||||
elseif carts:is_rail(pointed_thing.above) then
|
||||
minetest.add_entity(pointed_thing.above, "carts:cart")
|
||||
else
|
||||
return
|
||||
end
|
||||
|
||||
minetest.sound_play({name = "default_place_node_metal", gain = 0.5},
|
||||
{pos = pointed_thing.above}, true)
|
||||
|
||||
if not minetest.is_creative_enabled(placer:get_player_name()) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
|
@ -1,30 +0,0 @@
|
|||
-- carts/init.lua
|
||||
|
||||
carts = {}
|
||||
carts.modpath = minetest.get_modpath("carts")
|
||||
carts.railparams = {}
|
||||
|
||||
-- Maximal speed of the cart in m/s (min = -1)
|
||||
carts.speed_max = 7
|
||||
-- Set to -1 to disable punching the cart from inside (min = -1)
|
||||
carts.punch_speed_max = 5
|
||||
-- Maximal distance for the path correction (for dtime peaks)
|
||||
carts.path_distance_max = 3
|
||||
|
||||
|
||||
dofile(carts.modpath.."/functions.lua")
|
||||
dofile(carts.modpath.."/rails.lua")
|
||||
dofile(carts.modpath.."/cart_entity.lua")
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"carts:cart_entity"},
|
||||
neighbors = {"minegistics_structures:minegistics_structures_collector"},
|
||||
interval = 1, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 node
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta({ x = pos.x, y = pos.y, z = pos.z })
|
||||
if meta:get_int("iron") < 100 then
|
||||
meta:set_int("iron", (meta:get_int("iron") + 1))
|
||||
end
|
||||
end
|
||||
})
|
|
@ -1,30 +0,0 @@
|
|||
-- carts/rails.lua
|
||||
|
||||
carts:register_rail("carts:rail", {
|
||||
description = ("Rail"),
|
||||
tiles = {
|
||||
"carts_rail_straight.png", "carts_rail_curved.png",
|
||||
"carts_rail_t_junction.png", "carts_rail_crossing.png"
|
||||
},
|
||||
inventory_image = "carts_rail_straight.png",
|
||||
wield_image = "carts_rail_straight.png",
|
||||
groups = carts:get_rail_groups(),
|
||||
}, {})
|
||||
|
||||
carts:register_rail("carts:powerrail", {
|
||||
description = ("Powered Rail"),
|
||||
tiles = {
|
||||
"carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
|
||||
"carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
|
||||
},
|
||||
groups = carts:get_rail_groups(),
|
||||
}, {acceleration = 5})
|
||||
|
||||
carts:register_rail("carts:brakerail", {
|
||||
description = ("Brake Rail"),
|
||||
tiles = {
|
||||
"carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
|
||||
"carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"
|
||||
},
|
||||
groups = carts:get_rail_groups(),
|
||||
}, {acceleration = -3})
|
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 363 B |
Before Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 401 B |
Before Width: | Height: | Size: 301 B |
Before Width: | Height: | Size: 435 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 415 B |
Before Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 457 B |
Before Width: | Height: | Size: 451 B |
Before Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 446 B |
|
@ -1,40 +0,0 @@
|
|||
minetest.register_node("chest:chest", {
|
||||
description = "Chest" .. "\n" ..
|
||||
"32 inventory slots",
|
||||
tiles ={"chest_chest.png^[sheet:2x2:0,0", "chest_chest.png^[sheet:2x2:0,0",
|
||||
"chest_chest.png^[sheet:2x2:1,0", "chest_chest.png^[sheet:2x2:1,0",
|
||||
"chest_chest.png^[sheet:2x2:1,0", "chest_chest.png^[sheet:2x2:0,1"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {dig_immediate=2,choppy=3},
|
||||
is_ground_content = false,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "Chest")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 8*4)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "Allow put: " .. stack:to_string())
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "Allow take: " .. stack:to_string())
|
||||
return stack:get_count()
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "On put: " .. stack:to_string())
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "On take: " .. stack:to_string())
|
||||
end,
|
||||
})
|
|
@ -1,2 +0,0 @@
|
|||
name = chest
|
||||
description = A simple chest to store items
|
Before Width: | Height: | Size: 163 B |
|
@ -1,3 +1,10 @@
|
|||
--[[
|
||||
Minegistics
|
||||
logalog
|
||||
Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
local give_if_not_gotten_already = function(inv, list, item)
|
||||
if not inv:contains_item(list, item) then
|
||||
inv:add_item(list, item)
|
||||
|
@ -5,12 +12,14 @@ local give_if_not_gotten_already = function(inv, list, item)
|
|||
end
|
||||
|
||||
local give_initial_stuff = function(player)
|
||||
local inv = player:get_inventory()
|
||||
give_if_not_gotten_already(inv, "main", "minegistics:Market" .. " 1")
|
||||
give_if_not_gotten_already(inv, "main", "minegistics:Collector" .. " 2")
|
||||
give_if_not_gotten_already(inv, "main", "carts:cart" .. " 2")
|
||||
give_if_not_gotten_already(inv, "main", "carts:rail" .. " 20")
|
||||
|
||||
local inv = player:get_inventory()
|
||||
give_if_not_gotten_already(inv, "main", "minegistics:Market" .. " 1")
|
||||
give_if_not_gotten_already(inv, "main", "minegistics:Town" .. " 1")
|
||||
give_if_not_gotten_already(inv, "main", "minegistics:Collector" .. " 2")
|
||||
give_if_not_gotten_already(inv, "main", "minegistics:PowerPlant" .. " 1")
|
||||
give_if_not_gotten_already(inv, "main", "minegistics_trains:train" .. " 3")
|
||||
give_if_not_gotten_already(inv, "main", "minegistics_trains:rail" .. " 100")
|
||||
give_if_not_gotten_already(inv, "main", "basenodes:coal_lump" .. " 100")
|
||||
minetest.log("action", "[give_initial_stuff] Giving initial stuff to "..player:get_player_name())
|
||||
end
|
||||
|
||||
|
|
|
@ -1,9 +1,33 @@
|
|||
--[[
|
||||
Minegistics
|
||||
logalog
|
||||
Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
--defines the greeting formspec
|
||||
local function greeting_formspec(player)
|
||||
local greeting = "Welcome to Minegistics! Press I to open your inventory.\n" ..
|
||||
"Hover over the items there and place the objects accordingly.\n" ..
|
||||
"Open the shop window for more information.\n" ..
|
||||
"Good luck and have fun!"
|
||||
local formspec = {
|
||||
"size[8.5,8.5]",
|
||||
"bgcolor[#2d2d2d;false]",
|
||||
"button_exit[3,7;2,0.5;OK;OK]",
|
||||
"label[1,1;" .. greeting .. "]"
|
||||
}
|
||||
return formspec
|
||||
end
|
||||
|
||||
--shows the greeting formspec
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local cb = function(player)
|
||||
if not player or not player:is_player() then
|
||||
return
|
||||
end
|
||||
minetest.chat_send_player(player:get_player_name(), "Welcome to minegistics!")
|
||||
local name = player:get_player_name()
|
||||
minetest.show_formspec(name,"greeting",table.concat(greeting_formspec()))
|
||||
end
|
||||
minetest.after(2.0, cb, player)
|
||||
end)
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
--
|
||||
-- Aliases for map generator outputs
|
||||
--
|
||||
|
||||
-- ESSENTIAL node aliases
|
||||
-- Basic nodes
|
||||
minetest.register_alias("mapgen_stone", "basenodes:stone")
|
||||
minetest.register_alias("mapgen_river_water_source", "basenodes:river_water_source")
|
||||
minetest.register_alias("mapgen_dirt", "basenodes:dirt")
|
||||
minetest.register_alias("mapgen_dirt_with_grass", "basenodes:dirt_with_grass")
|
||||
minetest.register_alias("mapgen_sand", "basenodes:sand")
|
||||
minetest.register_alias("mapgen_leaves", "basenodes:leaves")
|
||||
minetest.register_alias("mapgen_cobble", "basenodes:cobble")
|
||||
minetest.register_alias("mapgen_gravel", "basenodes:gravel")
|
||||
minetest.register_alias("mapgen_coal", "basenodes:stone_with_coal")
|
||||
minetest.register_alias("mapgen_iron", "basenodes:stone_with_iron")
|
||||
minetest.register_alias("mapgen_copper", "basenodes:stone_with_copper")
|
||||
minetest.register_alias("mapgen_tin", "basenodes:stone_with_tin")
|
||||
minetest.register_alias("mapgen_gold", "basenodes:stone_with_gold")
|
|
@ -1,3 +0,0 @@
|
|||
name = mapgen
|
||||
description = Minimal map generator
|
||||
depends = basenodes
|
|
@ -0,0 +1,662 @@
|
|||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
Minegistics
|
||||
=============
|
||||
A building game with logistics networks, power grids, towns and trains.
|
|
@ -0,0 +1 @@
|
|||
A building game with logistics networks, power grids, towns and trains.
|
|
@ -1,7 +1,71 @@
|
|||
--[[
|
||||
Minegistics
|
||||
logalog
|
||||
Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
minegistics = {}
|
||||
|
||||
local loaded = false
|
||||
minegistics.modpath = minetest.get_modpath("minegistics")
|
||||
dofile(minegistics.modpath .. DIR_DELIM .. "src" .. DIR_DELIM .. "structures.lua")
|
||||
dofile(minegistics.modpath .. DIR_DELIM .. "src" .. DIR_DELIM .. "mapgen.lua")
|
||||
dofile(minegistics.modpath .. DIR_DELIM .. "src" .. DIR_DELIM .. "power.lua")
|
||||
dofile(minegistics.modpath .. DIR_DELIM .. "src" .. DIR_DELIM .. "items.lua")
|
||||
dofile(minegistics.modpath .. DIR_DELIM .. "src" .. DIR_DELIM .. "formspec.lua")
|
||||
minetest.settings:set_bool("menu_clouds", false)
|
||||
minetest.settings:set_bool("smooth_lighting", true)
|
||||
minetest.register_item(":", { type = "none", wield_image = "blank.png"})
|
||||
|
||||
dofile(minegistics.modpath.."/money.lua")
|
||||
dofile(minegistics.modpath.."/shop_formspec.lua")
|
||||
dofile(minegistics.modpath.."/structures.lua")
|
||||
--initializes the player and loads saved game
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player:hud_set_flags({hotbar = true, healthbar = false})
|
||||
player:set_properties({
|
||||
textures = { "blank.png", "blank.png" },
|
||||
visual = "upright_sprite",
|
||||
visual_size = { x = 1, y = 2 },
|
||||
collisionbox = {-0.49, 0, -0.49, 0.49, 2, 0.49 },
|
||||
initial_sprite_basepos = {x = 0, y = 0}
|
||||
})
|
||||
skybox.set(player, 1)
|
||||
minetest.set_player_privs(player:get_player_name(), {fly=true, fast=true})
|
||||
player:set_clouds({density = 0})
|
||||
local name = player:get_player_name()
|
||||
if loaded == false then
|
||||
local file = io.open(minetest.get_worldpath() .. DIR_DELIM .. "save_data.json", "r")
|
||||
if file then
|
||||
local data = minetest.parse_json(file:read "*a")
|
||||
if data then
|
||||
if data.money then
|
||||
money = data.money
|
||||
end
|
||||
if data.item_prices then
|
||||
item_prices = data.item_prices
|
||||
end
|
||||
if data.power_producers then
|
||||
power_producers = data.power_producers
|
||||
end
|
||||
if data.power_consumers then
|
||||
power_consumers = data.power_consumers
|
||||
end
|
||||
else
|
||||
minetest.log("error", "Failed to read save_data.json")
|
||||
end
|
||||
io.close(file)
|
||||
end
|
||||
loaded = true
|
||||
end
|
||||
end)
|
||||
|
||||
--saves data
|
||||
minetest.register_on_shutdown(function()
|
||||
local save_vars = {
|
||||
money = money,
|
||||
item_prices = item_prices,
|
||||
power_producers = power_producers,
|
||||
power_consumers = power_consumers
|
||||
}
|
||||
local save_data = minetest.write_json(save_vars)
|
||||
local save_path = minetest.get_worldpath() .. DIR_DELIM .. "save_data.json"
|
||||
minetest.safe_file_write(save_path, save_data)
|
||||
end)
|
|
@ -0,0 +1,4 @@
|
|||
name = minegistics
|
||||
author = logalog, Droog71
|
||||
description = A building game with logistics networks, power grids, towns and trains.
|
||||
title = Minegistics
|
|
@ -0,0 +1,878 @@
|
|||
# Blender v2.79 (sub 0) OBJ File: 'market.blend'
|
||||
# www.blender.org
|
||||
mtllib market.mtl
|
||||
o Cube_Cube.001
|
||||
v -2.000000 -0.499714 2.000000
|
||||
v -2.000000 0.300286 2.000000
|
||||
v -2.000000 -0.499714 -2.000000
|
||||
v -2.000000 0.300286 -2.000000
|
||||
v 2.000000 -0.499714 2.000000
|
||||
v 2.000000 0.300286 2.000000
|
||||
v 2.000000 -0.499714 -2.000000
|
||||
v 2.000000 0.300286 -2.000000
|
||||
v 1.101621 0.300287 -0.870031
|
||||
v 1.101621 1.900286 -0.870031
|
||||
v 1.101621 0.300287 -1.945508
|
||||
v 1.101621 1.900286 -1.945508
|
||||
v 1.907317 0.300287 -0.870031
|
||||
v 1.907317 1.900286 -0.870031
|
||||
v 1.907317 0.300287 -1.945508
|
||||
v 1.907317 1.900286 -1.945508
|
||||
v -1.091775 1.900286 0.854663
|
||||
v -1.091775 0.300287 0.854663
|
||||
v -1.091775 1.900286 1.930140
|
||||
v -1.091775 0.300287 1.930140
|
||||
v -1.897471 1.900286 0.854663
|
||||
v -1.897471 0.300287 0.854663
|
||||
v -1.897471 1.900286 1.930140
|
||||
v -1.897471 0.300287 1.930140
|
||||
v 1.054966 0.300287 1.942355
|
||||
v 1.054966 1.900286 1.942355
|
||||
v 1.054966 0.300287 0.856099
|
||||
v 1.054966 1.900286 0.856099
|
||||
v 1.929879 0.300287 1.942355
|
||||
v 1.929879 1.900286 1.942355
|
||||
v 1.929879 0.300287 0.856099
|
||||
v 1.929879 1.900286 0.856099
|
||||
v -1.897471 0.300287 -0.862380
|
||||
v -1.897471 1.900286 -0.862380
|
||||
v -1.897471 0.300287 -1.937857
|
||||
v -1.897471 1.900286 -1.937857
|
||||
v -1.091775 0.300287 -0.862380
|
||||
v -1.091775 1.900286 -0.862380
|
||||
v -1.091775 0.300287 -1.937857
|
||||
v -1.091775 1.900286 -1.937857
|
||||
v -2.000000 -0.499714 -1.600000
|
||||
v -2.000000 -0.499714 -1.200000
|
||||
v -2.000000 -0.499714 -0.800000
|
||||
v -2.000000 -0.499714 -0.698988
|
||||
v -2.000000 -0.499714 0.000000
|
||||
v -2.000000 -0.499714 0.713937
|
||||
v -2.000000 -0.499714 0.800000
|
||||
v -2.000000 -0.499714 1.200000
|
||||
v -2.000000 -0.499714 1.600000
|
||||
v -2.000000 0.300286 1.600000
|
||||
v -2.000000 0.300286 1.200000
|
||||
v -2.000000 0.300286 0.800000
|
||||
v -2.000000 -0.496217 0.713937
|
||||
v -2.000000 -0.496217 0.000000
|
||||
v -2.000000 -0.496217 -0.698988
|
||||
v -2.000000 0.300286 -0.800000
|
||||
v -2.000000 0.300286 -1.200000
|
||||
v -2.000000 0.300286 -1.600000
|
||||
v 2.000000 -0.499714 1.600000
|
||||
v 2.000000 -0.499714 1.200000
|
||||
v 2.000000 -0.499714 0.800000
|
||||
v 2.000000 -0.499714 0.713937
|
||||
v 2.000000 -0.499714 0.000000
|
||||
v 2.000000 -0.499714 -0.698988
|
||||
v 2.000000 -0.499714 -0.800000
|
||||
v 2.000000 -0.499714 -1.200000
|
||||
v 2.000000 -0.499714 -1.600000
|
||||
v 2.000000 0.300286 -1.600000
|
||||
v 2.000000 0.300286 -1.200000
|
||||
v 2.000000 0.300286 -0.800000
|
||||
v 2.000000 -0.496217 -0.698988
|
||||
v 2.000000 -0.496217 0.000000
|
||||
v 2.000000 -0.496217 0.713937
|
||||
v 2.000000 0.300286 0.800000
|
||||
v 2.000000 0.300286 1.200000
|
||||
v 2.000000 0.300286 1.600000
|
||||
v 1.500000 -0.499714 -2.000000
|
||||
v 1.000000 -0.499714 -2.000000
|
||||
v 0.836361 -0.499714 -2.000000
|
||||
v 0.000000 -0.499714 -2.000000
|
||||
v -0.866260 -0.499714 -2.000000
|
||||
v -1.000000 -0.499714 -2.000000
|
||||
v -1.500000 -0.499714 -2.000000
|
||||
v -1.500000 0.300286 -2.000000
|
||||
v -1.000000 0.300286 -2.000000
|
||||
v -0.866260 -0.498011 -2.000000
|
||||
v 0.000000 -0.498011 -2.000000
|
||||
v 0.836361 -0.498011 -2.000000
|
||||
v 1.000000 0.300286 -2.000000
|
||||
v 1.500000 0.300286 -2.000000
|
||||
v -1.500000 -0.499714 2.000000
|
||||
v -1.000000 -0.499714 2.000000
|
||||
v -0.866260 -0.499714 2.000000
|
||||
v 0.000000 -0.499714 2.000000
|
||||
v 0.836361 -0.499714 2.000000
|
||||
v 1.000000 -0.499714 2.000000
|
||||
v 1.500000 -0.499714 2.000000
|
||||
v 1.500000 0.300286 2.000000
|
||||
v 1.000000 0.300286 2.000000
|
||||
v 0.836361 -0.498011 2.000000
|
||||
v 0.000000 -0.498011 2.000000
|
||||
v -0.866260 -0.498011 2.000000
|
||||
v -1.000000 0.300286 2.000000
|
||||
v -1.500000 0.300286 2.000000
|
||||
v -1.500000 0.300286 -1.600000
|
||||
v -1.000000 0.300286 -1.600000
|
||||
v -0.866260 -0.498011 -1.600000
|
||||
v 0.000000 -0.498011 -1.600000
|
||||
v 0.836361 -0.498011 -1.600000
|
||||
v 1.000000 0.300286 -1.600000
|
||||
v 1.500000 0.300286 -1.600000
|
||||
v -1.500000 0.300286 -1.200000
|
||||
v -1.000000 0.300286 -1.200000
|
||||
v -0.866260 -0.498011 -1.200000
|
||||
v 0.000000 -0.498011 -1.200000
|
||||
v 0.836361 -0.498011 -1.200000
|
||||
v 1.000000 0.300286 -1.200000
|
||||
v 1.500000 0.300286 -1.200000
|
||||
v -1.500000 0.300286 -0.800000
|
||||
v -1.000000 0.300286 -0.800000
|
||||
v -0.866260 -0.498011 -0.800000
|
||||
v 0.000000 -0.498011 -0.800000
|
||||
v 0.836361 -0.498011 -0.800000
|
||||
v 1.000000 0.300286 -0.800000
|
||||
v 1.500000 0.300286 -0.800000
|
||||
v -1.500000 -0.496217 -0.698988
|
||||
v -1.000000 -0.496217 -0.698988
|
||||
v -0.866260 -0.496217 -0.698988
|
||||
v 0.000000 -0.496217 -0.698988
|
||||
v 0.836361 -0.496217 -0.698988
|
||||
v 1.000000 -0.496217 -0.698988
|
||||
v 1.500000 -0.496217 -0.698988
|
||||
v -1.500000 -0.496217 0.000000
|
||||
v -1.000000 -0.496217 0.000000
|
||||
v -0.866260 -0.496217 0.000000
|
||||
v 0.000000 -0.496217 0.000000
|
||||
v 0.836361 -0.496217 0.000000
|
||||
v 1.000000 -0.496217 0.000000
|
||||
v 1.500000 -0.496217 0.000000
|
||||
v -1.500000 -0.496217 0.713937
|
||||
v -1.000000 -0.496217 0.713937
|
||||
v -0.866260 -0.496217 0.713937
|
||||
v 0.000000 -0.496217 0.713937
|
||||
v 0.836361 -0.496217 0.713937
|
||||
v 1.000000 -0.496217 0.713937
|
||||
v 1.500000 -0.496217 0.713937
|
||||
v -1.500000 0.300286 0.800000
|
||||
v -1.000000 0.300286 0.800000
|
||||
v -0.866260 -0.498011 0.800000
|
||||
v 0.000000 -0.498011 0.800000
|
||||
v 0.836361 -0.498011 0.800000
|
||||
v 1.000000 0.300286 0.800000
|
||||
v 1.500000 0.300286 0.800000
|
||||
v -1.500000 0.300286 1.200000
|
||||
v -1.000000 0.300286 1.200000
|
||||
v -0.866260 -0.498011 1.200000
|
||||
v 0.000000 -0.498011 1.200000
|
||||
v 0.836361 -0.498011 1.200000
|
||||
v 1.000000 0.300286 1.200000
|
||||
v 1.500000 0.300286 1.200000
|
||||
v -1.500000 0.300286 1.600000
|
||||
v -1.000000 0.300286 1.600000
|
||||
v -0.866260 -0.498011 1.600000
|
||||
v 0.000000 -0.498011 1.600000
|
||||
v 0.836361 -0.498011 1.600000
|
||||
v 1.000000 0.300286 1.600000
|
||||
v 1.500000 0.300286 1.600000
|
||||
v 1.500000 -0.499714 -1.600000
|
||||
v 1.000000 -0.499714 -1.600000
|
||||
v 0.836361 -0.499714 -1.600000
|
||||
v 0.000000 -0.499714 -1.600000
|
||||
v -0.866260 -0.499714 -1.600000
|
||||
v -1.000000 -0.499714 -1.600000
|
||||
v -1.500000 -0.499714 -1.600000
|
||||
v 1.500000 -0.499714 -1.200000
|
||||
v 1.000000 -0.499714 -1.200000
|
||||
v 0.836361 -0.499714 -1.200000
|
||||
v 0.000000 -0.499714 -1.200000
|
||||
v -0.866260 -0.499714 -1.200000
|
||||
v -1.000000 -0.499714 -1.200000
|
||||
v -1.500000 -0.499714 -1.200000
|
||||
v 1.500000 -0.499714 -0.800000
|
||||
v 1.000000 -0.499714 -0.800000
|
||||
v 0.836361 -0.499714 -0.800000
|
||||
v 0.000000 -0.499714 -0.800000
|
||||
v -0.866260 -0.499714 -0.800000
|
||||
v -1.000000 -0.499714 -0.800000
|
||||
v -1.500000 -0.499714 -0.800000
|
||||
v 1.500000 -0.499714 -0.698988
|
||||
v 1.000000 -0.499714 -0.698988
|
||||
v 0.836361 -0.499714 -0.698988
|
||||
v 0.000000 -0.499714 -0.698988
|
||||
v -0.866260 -0.499714 -0.698988
|
||||
v -1.000000 -0.499714 -0.698988
|
||||
v -1.500000 -0.499714 -0.698988
|
||||
v 1.500000 -0.499714 0.000000
|
||||
v 1.000000 -0.499714 0.000000
|
||||
v 0.836361 -0.499714 0.000000
|
||||
v 0.000000 -0.499714 0.000000
|
||||
v -0.866260 -0.499714 0.000000
|
||||
v -1.000000 -0.499714 0.000000
|
||||
v -1.500000 -0.499714 0.000000
|
||||
v 1.500000 -0.499714 0.713937
|
||||
v 1.000000 -0.499714 0.713937
|
||||
v 0.836361 -0.499714 0.713937
|
||||
v 0.000000 -0.499714 0.713937
|
||||
v -0.866260 -0.499714 0.713937
|
||||
v -1.000000 -0.499714 0.713937
|
||||
v -1.500000 -0.499714 0.713937
|
||||
v 1.500000 -0.499714 0.800000
|
||||
v 1.000000 -0.499714 0.800000
|
||||
v 0.836361 -0.499714 0.800000
|
||||
v 0.000000 -0.499714 0.800000
|
||||
v -0.866260 -0.499714 0.800000
|
||||
v -1.000000 -0.499714 0.800000
|
||||
v -1.500000 -0.499714 0.800000
|
||||
v 1.500000 -0.499714 1.200000
|
||||
v 1.000000 -0.499714 1.200000
|
||||
v 0.836361 -0.499714 1.200000
|
||||
v 0.000000 -0.499714 1.200000
|
||||
v -0.866260 -0.499714 1.200000
|
||||
v -1.000000 -0.499714 1.200000
|
||||
v -1.500000 -0.499714 1.200000
|
||||
v 1.500000 -0.499714 1.600000
|
||||
v 1.000000 -0.499714 1.600000
|
||||
v 0.836361 -0.499714 1.600000
|
||||
v 0.000000 -0.499714 1.600000
|
||||
v -0.866260 -0.499714 1.600000
|
||||
v -1.000000 -0.499714 1.600000
|
||||
v -1.500000 -0.499714 1.600000
|
||||
v -0.501274 -0.509807 0.504980
|
||||
v -0.501274 0.555777 0.504980
|
||||
v -0.501274 -0.509807 -0.495020
|
||||
v -0.501274 0.555777 -0.495020
|
||||
v 0.498726 -0.509807 0.504980
|
||||
v 0.498726 0.555777 0.504980
|
||||
v 0.498726 -0.509807 -0.495020
|
||||
v 0.498726 0.555777 -0.495020
|
||||
vt 0.161509 0.611667
|
||||
vt 0.128176 0.611667
|
||||
vt 0.128176 0.608333
|
||||
vt 0.161509 0.608333
|
||||
vt 0.128176 0.612500
|
||||
vt 0.094842 0.612500
|
||||
vt 0.094842 0.608333
|
||||
vt 0.128176 0.608333
|
||||
vt 0.128176 0.578333
|
||||
vt 0.094842 0.578333
|
||||
vt 0.094842 0.575000
|
||||
vt 0.128176 0.575000
|
||||
vt 0.157342 0.608333
|
||||
vt 0.157342 0.575000
|
||||
vt 0.161509 0.575000
|
||||
vt 0.161509 0.608333
|
||||
vt 0.165676 0.578333
|
||||
vt 0.161509 0.578333
|
||||
vt 0.161509 0.575000
|
||||
vt 0.165676 0.575000
|
||||
vt 0.098176 0.670833
|
||||
vt 0.098176 0.675000
|
||||
vt 0.094842 0.675000
|
||||
vt 0.094842 0.670833
|
||||
vt 0.867857 0.929961
|
||||
vt 0.867857 0.829961
|
||||
vt 0.886905 0.829961
|
||||
vt 0.886905 0.929961
|
||||
vt 0.846429 0.929961
|
||||
vt 0.846429 0.829961
|
||||
vt 0.867857 0.829961
|
||||
vt 0.867857 0.929961
|
||||
vt 0.905952 0.829961
|
||||
vt 0.905952 0.929961
|
||||
vt 0.886905 0.929961
|
||||
vt 0.886905 0.829961
|
||||
vt 0.825000 0.929961
|
||||
vt 0.825000 0.829961
|
||||
vt 0.846429 0.829961
|
||||
vt 0.846429 0.929961
|
||||
vt 0.905952 0.865961
|
||||
vt 0.905952 0.847961
|
||||
vt 0.925000 0.847961
|
||||
vt 0.925000 0.865961
|
||||
vt 0.925000 0.829961
|
||||
vt 0.925000 0.847961
|
||||
vt 0.905952 0.847961
|
||||
vt 0.905952 0.829961
|
||||
vt 0.925000 0.829961
|
||||
vt 0.925000 0.847961
|
||||
vt 0.905952 0.847961
|
||||
vt 0.905952 0.829961
|
||||
vt 0.905952 0.865961
|
||||
vt 0.905952 0.847961
|
||||
vt 0.925000 0.847961
|
||||
vt 0.925000 0.865961
|
||||
vt 0.825000 0.929961
|
||||
vt 0.825000 0.829961
|
||||
vt 0.846429 0.829961
|
||||
vt 0.846429 0.929961
|
||||
vt 0.905952 0.829961
|
||||
vt 0.905952 0.929961
|
||||
vt 0.886905 0.929961
|
||||
vt 0.886905 0.829961
|
||||
vt 0.846429 0.929961
|
||||
vt 0.846429 0.829961
|
||||
vt 0.867857 0.829961
|
||||
vt 0.867857 0.929961
|
||||
vt 0.867857 0.929961
|
||||
vt 0.867857 0.829961
|
||||
vt 0.886905 0.829961
|
||||
vt 0.886905 0.929961
|
||||
vt 0.867857 0.929961
|
||||
vt 0.867857 0.829961
|
||||
vt 0.886905 0.829961
|
||||
vt 0.886905 0.929961
|
||||
vt 0.846429 0.829961
|
||||
vt 0.846429 0.929961
|
||||
vt 0.825000 0.929961
|
||||
vt 0.825000 0.829961
|
||||
vt 0.905952 0.829961
|
||||
vt 0.905952 0.929961
|
||||
vt 0.886905 0.929961
|
||||
vt 0.886905 0.829961
|
||||
vt 0.846429 0.929961
|
||||
vt 0.846429 0.829961
|
||||
vt 0.905952 0.847961
|
||||
vt 0.925000 0.829961
|
||||
vt 0.925000 0.847961
|
||||
vt 0.905952 0.865961
|
||||
vt 0.905952 0.847961
|
||||
vt 0.925000 0.847961
|
||||
vt 0.925000 0.865961
|
||||
vt 0.867857 0.929961
|
||||
vt 0.867857 0.829961
|
||||
vt 0.886905 0.829961
|
||||
vt 0.886905 0.929961
|
||||
vt 0.846429 0.929961
|
||||
vt 0.846429 0.829961
|
||||
vt 0.867857 0.829961
|
||||
vt 0.867857 0.929961
|
||||
vt 0.905952 0.829961
|
||||
vt 0.905952 0.929961
|
||||
vt 0.886905 0.929961
|
||||
vt 0.886905 0.829961
|
||||
vt 0.825000 0.929961
|
||||
vt 0.825000 0.829961
|
||||
vt 0.846429 0.829961
|
||||
vt 0.846429 0.929961
|
||||
vt 0.905952 0.865961
|
||||
vt 0.905952 0.847961
|
||||
vt 0.925000 0.847961
|
||||
vt 0.925000 0.865961
|
||||
vt 0.925000 0.829961
|
||||
vt 0.925000 0.847961
|
||||
vt 0.905952 0.847961
|
||||
vt 0.905952 0.829961
|
||||
vt 0.128176 0.670833
|
||||
vt 0.128176 0.675000
|
||||
vt 0.124842 0.675000
|
||||
vt 0.124842 0.670833
|
||||
vt 0.121509 0.675000
|
||||
vt 0.121509 0.670833
|
||||
vt 0.118176 0.675000
|
||||
vt 0.118176 0.670833
|
||||
vt 0.114842 0.675000
|
||||
vt 0.114842 0.670833
|
||||
vt 0.111509 0.675000
|
||||
vt 0.111509 0.670833
|
||||
vt 0.108176 0.675000
|
||||
vt 0.108176 0.670833
|
||||
vt 0.104842 0.675000
|
||||
vt 0.104842 0.670833
|
||||
vt 0.101509 0.675000
|
||||
vt 0.101509 0.670833
|
||||
vt 0.165676 0.608333
|
||||
vt 0.161509 0.608333
|
||||
vt 0.161509 0.605000
|
||||
vt 0.165676 0.605000
|
||||
vt 0.161509 0.601667
|
||||
vt 0.165676 0.601667
|
||||
vt 0.161509 0.598333
|
||||
vt 0.165676 0.598333
|
||||
vt 0.161509 0.595000
|
||||
vt 0.165676 0.595000
|
||||
vt 0.161509 0.591667
|
||||
vt 0.165676 0.591667
|
||||
vt 0.161509 0.588333
|
||||
vt 0.165676 0.588333
|
||||
vt 0.161509 0.585000
|
||||
vt 0.165676 0.585000
|
||||
vt 0.161509 0.581667
|
||||
vt 0.165676 0.581667
|
||||
vt 0.094842 0.605000
|
||||
vt 0.128176 0.605000
|
||||
vt 0.094842 0.601667
|
||||
vt 0.128176 0.601667
|
||||
vt 0.094842 0.598333
|
||||
vt 0.128176 0.598333
|
||||
vt 0.094842 0.595000
|
||||
vt 0.128176 0.595000
|
||||
vt 0.094842 0.591667
|
||||
vt 0.128176 0.591667
|
||||
vt 0.094842 0.588333
|
||||
vt 0.128176 0.588333
|
||||
vt 0.094842 0.585000
|
||||
vt 0.128176 0.585000
|
||||
vt 0.094842 0.581667
|
||||
vt 0.128176 0.581667
|
||||
vt 0.161509 0.641667
|
||||
vt 0.128176 0.641667
|
||||
vt 0.128176 0.638333
|
||||
vt 0.161509 0.638333
|
||||
vt 0.128176 0.635000
|
||||
vt 0.161509 0.635000
|
||||
vt 0.128176 0.631667
|
||||
vt 0.161509 0.631667
|
||||
vt 0.128176 0.628333
|
||||
vt 0.161509 0.628333
|
||||
vt 0.128176 0.625000
|
||||
vt 0.161509 0.625000
|
||||
vt 0.128176 0.621667
|
||||
vt 0.161509 0.621667
|
||||
vt 0.128176 0.618333
|
||||
vt 0.161509 0.618333
|
||||
vt 0.128176 0.615000
|
||||
vt 0.161509 0.615000
|
||||
vt 0.194843 0.581667
|
||||
vt 0.190676 0.581667
|
||||
vt 0.190676 0.578333
|
||||
vt 0.194843 0.578333
|
||||
vt 0.186509 0.581667
|
||||
vt 0.186509 0.578333
|
||||
vt 0.182342 0.581667
|
||||
vt 0.182342 0.578333
|
||||
vt 0.178176 0.581667
|
||||
vt 0.178176 0.578333
|
||||
vt 0.174009 0.581667
|
||||
vt 0.174009 0.578333
|
||||
vt 0.169843 0.581667
|
||||
vt 0.169843 0.578333
|
||||
vt 0.194843 0.585000
|
||||
vt 0.190676 0.585000
|
||||
vt 0.186509 0.585000
|
||||
vt 0.182342 0.585000
|
||||
vt 0.178176 0.585000
|
||||
vt 0.174009 0.585000
|
||||
vt 0.169843 0.585000
|
||||
vt 0.194843 0.588333
|
||||
vt 0.190676 0.588333
|
||||
vt 0.186509 0.588333
|
||||
vt 0.182342 0.588333
|
||||
vt 0.178176 0.588333
|
||||
vt 0.174009 0.588333
|
||||
vt 0.169843 0.588333
|
||||
vt 0.194843 0.591667
|
||||
vt 0.190676 0.591667
|
||||
vt 0.186509 0.591667
|
||||
vt 0.182342 0.591667
|
||||
vt 0.178176 0.591667
|
||||
vt 0.174009 0.591667
|
||||
vt 0.169843 0.591667
|
||||
vt 0.194843 0.595000
|
||||
vt 0.190676 0.595000
|
||||
vt 0.186509 0.595000
|
||||
vt 0.182342 0.595000
|
||||
vt 0.178176 0.595000
|
||||
vt 0.174009 0.595000
|
||||
vt 0.169843 0.595000
|
||||
vt 0.194843 0.598333
|
||||
vt 0.190676 0.598333
|
||||
vt 0.186509 0.598333
|
||||
vt 0.182342 0.598333
|
||||
vt 0.178176 0.598333
|
||||
vt 0.174009 0.598333
|
||||
vt 0.169843 0.598333
|
||||
vt 0.194843 0.601667
|
||||
vt 0.190676 0.601667
|
||||
vt 0.186509 0.601667
|
||||
vt 0.182342 0.601667
|
||||
vt 0.178176 0.601667
|
||||
vt 0.174009 0.601667
|
||||
vt 0.169843 0.601667
|
||||
vt 0.194843 0.605000
|
||||
vt 0.190676 0.605000
|
||||
vt 0.186509 0.605000
|
||||
vt 0.182342 0.605000
|
||||
vt 0.178176 0.605000
|
||||
vt 0.174009 0.605000
|
||||
vt 0.169843 0.605000
|
||||
vt 0.194843 0.608333
|
||||
vt 0.190676 0.608333
|
||||
vt 0.186509 0.608333
|
||||
vt 0.182342 0.608333
|
||||
vt 0.178176 0.608333
|
||||
vt 0.174009 0.608333
|
||||
vt 0.169843 0.608333
|
||||
vt 0.101509 0.641667
|
||||
vt 0.101509 0.645833
|
||||
vt 0.098176 0.645833
|
||||
vt 0.098176 0.641667
|
||||
vt 0.101509 0.650000
|
||||
vt 0.098176 0.650000
|
||||
vt 0.101509 0.654167
|
||||
vt 0.098176 0.654167
|
||||
vt 0.101509 0.658333
|
||||
vt 0.098176 0.658333
|
||||
vt 0.101509 0.662500
|
||||
vt 0.098176 0.662500
|
||||
vt 0.101509 0.666667
|
||||
vt 0.098176 0.666667
|
||||
vt 0.104842 0.641667
|
||||
vt 0.104842 0.645833
|
||||
vt 0.104842 0.650000
|
||||
vt 0.104842 0.654167
|
||||
vt 0.104842 0.658333
|
||||
vt 0.104842 0.662500
|
||||
vt 0.104842 0.666667
|
||||
vt 0.108176 0.641667
|
||||
vt 0.108176 0.645833
|
||||
vt 0.108176 0.650000
|
||||
vt 0.108176 0.654167
|
||||
vt 0.108176 0.658333
|
||||
vt 0.108176 0.662500
|
||||
vt 0.108176 0.666667
|
||||
vt 0.111509 0.641667
|
||||
vt 0.111509 0.645833
|
||||
vt 0.111509 0.650000
|
||||
vt 0.111509 0.654167
|
||||
vt 0.111509 0.658333
|
||||
vt 0.111509 0.662500
|
||||
vt 0.111509 0.666667
|
||||
vt 0.114842 0.641667
|
||||
vt 0.114842 0.645833
|
||||
vt 0.114842 0.650000
|
||||
vt 0.114842 0.654167
|
||||
vt 0.114842 0.658333
|
||||
vt 0.114842 0.662500
|
||||
vt 0.114842 0.666667
|
||||
vt 0.118176 0.641667
|
||||
vt 0.118176 0.645833
|
||||
vt 0.118176 0.650000
|
||||
vt 0.118176 0.654167
|
||||
vt 0.118176 0.658333
|
||||
vt 0.118176 0.662500
|
||||
vt 0.118176 0.666667
|
||||
vt 0.121509 0.641667
|
||||
vt 0.121509 0.645833
|
||||
vt 0.121509 0.650000
|
||||
vt 0.121509 0.654167
|
||||
vt 0.121509 0.658333
|
||||
vt 0.121509 0.662500
|
||||
vt 0.121509 0.666667
|
||||
vt 0.124842 0.641667
|
||||
vt 0.124842 0.645833
|
||||
vt 0.124842 0.650000
|
||||
vt 0.124842 0.654167
|
||||
vt 0.124842 0.658333
|
||||
vt 0.124842 0.662500
|
||||
vt 0.124842 0.666667
|
||||
vt 0.128176 0.641667
|
||||
vt 0.128176 0.645833
|
||||
vt 0.128176 0.650000
|
||||
vt 0.128176 0.654167
|
||||
vt 0.128176 0.658333
|
||||
vt 0.128176 0.662500
|
||||
vt 0.128176 0.666667
|
||||
vt 0.094842 0.645833
|
||||
vt 0.094842 0.641667
|
||||
vt 0.094842 0.650000
|
||||
vt 0.094842 0.654167
|
||||
vt 0.094842 0.658333
|
||||
vt 0.094842 0.662500
|
||||
vt 0.094842 0.666667
|
||||
vt 0.190676 0.575000
|
||||
vt 0.194843 0.575000
|
||||
vt 0.186509 0.575000
|
||||
vt 0.182343 0.575000
|
||||
vt 0.178176 0.575000
|
||||
vt 0.174009 0.575000
|
||||
vt 0.169843 0.575000
|
||||
vt 0.128176 0.608333
|
||||
vt 0.128176 0.575000
|
||||
vt 0.132343 0.575000
|
||||
vt 0.132343 0.608333
|
||||
vt 0.136509 0.575000
|
||||
vt 0.136509 0.608333
|
||||
vt 0.140676 0.575000
|
||||
vt 0.140676 0.608333
|
||||
vt 0.144843 0.575000
|
||||
vt 0.144843 0.608333
|
||||
vt 0.149009 0.575000
|
||||
vt 0.149009 0.608333
|
||||
vt 0.153176 0.575000
|
||||
vt 0.153176 0.608333
|
||||
vt 0.128176 0.641667
|
||||
vt 0.094842 0.641667
|
||||
vt 0.094842 0.637500
|
||||
vt 0.128176 0.637500
|
||||
vt 0.094842 0.633333
|
||||
vt 0.128176 0.633333
|
||||
vt 0.094842 0.629167
|
||||
vt 0.128176 0.629167
|
||||
vt 0.094842 0.625000
|
||||
vt 0.128176 0.625000
|
||||
vt 0.094842 0.620833
|
||||
vt 0.128176 0.620833
|
||||
vt 0.094842 0.616667
|
||||
vt 0.128176 0.616667
|
||||
vt 0.775000 0.979961
|
||||
vt 0.775000 0.779961
|
||||
vt 0.815000 0.779961
|
||||
vt 0.815000 0.979961
|
||||
vt 0.855000 0.979961
|
||||
vt 0.855000 0.779961
|
||||
vt 0.895000 0.779961
|
||||
vt 0.895000 0.979961
|
||||
vt 0.935000 0.779961
|
||||
vt 0.935000 0.979961
|
||||
vt 0.895000 0.979961
|
||||
vt 0.895000 0.779961
|
||||
vt 0.815000 0.979961
|
||||
vt 0.815000 0.779961
|
||||
vt 0.855000 0.779961
|
||||
vt 0.855000 0.979961
|
||||
vt 0.935000 0.787961
|
||||
vt 0.975000 0.779961
|
||||
vt 0.975000 0.787961
|
||||
vt 0.935000 0.795961
|
||||
vt 0.935000 0.787961
|
||||
vt 0.975000 0.787961
|
||||
vt 0.975000 0.795961
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn 0.0000 0.1258 0.9921
|
||||
vn 0.0000 0.1074 -0.9942
|
||||
vn -0.9796 0.2008 0.0000
|
||||
vn 0.9863 0.1652 0.0000
|
||||
vn -0.4588 0.1881 -0.8684
|
||||
vn 0.0000 0.9998 0.0208
|
||||
vn 0.5341 0.1790 -0.8263
|
||||
vn -0.5151 0.2112 0.8307
|
||||
vn 0.0000 0.9998 -0.0178
|
||||
vn 0.5924 0.1985 0.7808
|
||||
usemtl None
|
||||
s off
|
||||
f 41/1/1 58/2/1 4/3/1 3/4/1
|
||||
f 77/5/2 90/6/2 8/7/2 7/8/2
|
||||
f 59/9/3 76/10/3 6/11/3 5/12/3
|
||||
f 91/13/4 104/14/4 2/15/4 1/16/4
|
||||
f 224/17/5 59/18/5 5/19/5 97/20/5
|
||||
f 161/21/6 50/22/6 2/23/6 104/24/6
|
||||
f 9/25/1 10/26/1 12/27/1 11/28/1
|
||||
f 11/29/2 12/30/2 16/31/2 15/32/2
|
||||
f 15/33/3 16/34/3 14/35/3 13/36/3
|
||||
f 13/37/4 14/38/4 10/39/4 9/40/4
|
||||
f 11/41/5 15/42/5 13/43/5 9/44/5
|
||||
f 16/45/6 12/46/6 10/47/6 14/48/6
|
||||
f 17/49/6 21/50/6 23/51/6 19/52/6
|
||||
f 22/53/5 18/54/5 20/55/5 24/56/5
|
||||
f 20/57/4 19/58/4 23/59/4 24/60/4
|
||||
f 18/61/3 17/62/3 19/63/3 20/64/3
|
||||
f 22/65/2 21/66/2 17/67/2 18/68/2
|
||||
f 24/69/1 23/70/1 21/71/1 22/72/1
|
||||
f 25/73/1 26/74/1 28/75/1 27/76/1
|
||||
f 27/77/2 28/78/2 32/79/2 31/80/2
|
||||
f 31/81/3 32/82/3 30/83/3 29/84/3
|
||||
f 29/85/4 30/86/4 26/74/4 25/73/4
|
||||
f 27/87/5 31/81/5 29/88/5 25/89/5
|
||||
f 32/90/6 28/91/6 26/92/6 30/93/6
|
||||
f 33/94/1 34/95/1 36/96/1 35/97/1
|
||||
f 35/98/2 36/99/2 40/100/2 39/101/2
|
||||
f 39/102/3 40/103/3 38/104/3 37/105/3
|
||||
f 37/106/4 38/107/4 34/108/4 33/109/4
|
||||
f 35/110/5 39/111/5 37/112/5 33/113/5
|
||||
f 40/114/6 36/115/6 34/116/6 38/117/6
|
||||
f 84/118/6 4/119/6 58/120/6 105/121/6
|
||||
f 105/121/6 58/120/6 57/122/6 112/123/6
|
||||
f 112/123/6 57/122/6 56/124/6 119/125/6
|
||||
f 119/125/7 56/124/7 55/126/7 126/127/7
|
||||
f 126/127/6 55/126/6 54/128/6 133/129/6
|
||||
f 133/129/6 54/128/6 53/130/6 140/131/6
|
||||
f 140/131/8 53/130/8 52/132/8 147/133/8
|
||||
f 147/133/6 52/132/6 51/134/6 154/135/6
|
||||
f 154/135/6 51/134/6 50/22/6 161/21/6
|
||||
f 77/136/5 7/137/5 67/138/5 168/139/5
|
||||
f 168/139/5 67/138/5 66/140/5 175/141/5
|
||||
f 175/141/5 66/140/5 65/142/5 182/143/5
|
||||
f 182/143/5 65/142/5 64/144/5 189/145/5
|
||||
f 189/145/5 64/144/5 63/146/5 196/147/5
|
||||
f 196/147/5 63/146/5 62/148/5 203/149/5
|
||||
f 203/149/5 62/148/5 61/150/5 210/151/5
|
||||
f 210/151/5 61/150/5 60/152/5 217/153/5
|
||||
f 217/153/5 60/152/5 59/18/5 224/17/5
|
||||
f 7/8/3 8/7/3 68/154/3 67/155/3
|
||||
f 67/155/3 68/154/3 69/156/3 66/157/3
|
||||
f 66/157/3 69/156/3 70/158/3 65/159/3
|
||||
f 65/159/3 70/158/3 71/160/3 64/161/3
|
||||
f 64/161/3 71/160/3 72/162/3 63/163/3
|
||||
f 63/163/3 72/162/3 73/164/3 62/165/3
|
||||
f 62/165/3 73/164/3 74/166/3 61/167/3
|
||||
f 61/167/3 74/166/3 75/168/3 60/169/3
|
||||
f 60/169/3 75/168/3 76/10/3 59/9/3
|
||||
f 1/170/1 2/171/1 50/172/1 49/173/1
|
||||
f 49/173/1 50/172/1 51/174/1 48/175/1
|
||||
f 48/175/1 51/174/1 52/176/1 47/177/1
|
||||
f 47/177/1 52/176/1 53/178/1 46/179/1
|
||||
f 46/179/1 53/178/1 54/180/1 45/181/1
|
||||
f 45/181/1 54/180/1 55/182/1 44/183/1
|
||||
f 44/183/1 55/182/1 56/184/1 43/185/1
|
||||
f 43/185/1 56/184/1 57/186/1 42/187/1
|
||||
f 42/187/1 57/186/1 58/2/1 41/1/1
|
||||
f 48/188/5 223/189/5 230/190/5 49/191/5
|
||||
f 223/189/5 222/192/5 229/193/5 230/190/5
|
||||
f 222/192/5 221/194/5 228/195/5 229/193/5
|
||||
f 221/194/5 220/196/5 227/197/5 228/195/5
|
||||
f 220/196/5 219/198/5 226/199/5 227/197/5
|
||||
f 219/198/5 218/200/5 225/201/5 226/199/5
|
||||
f 218/200/5 217/153/5 224/17/5 225/201/5
|
||||
f 47/202/5 216/203/5 223/189/5 48/188/5
|
||||
f 216/203/5 215/204/5 222/192/5 223/189/5
|
||||
f 215/204/5 214/205/5 221/194/5 222/192/5
|
||||
f 214/205/5 213/206/5 220/196/5 221/194/5
|
||||
f 213/206/5 212/207/5 219/198/5 220/196/5
|
||||
f 212/207/5 211/208/5 218/200/5 219/198/5
|
||||
f 211/208/5 210/151/5 217/153/5 218/200/5
|
||||
f 46/209/5 209/210/5 216/203/5 47/202/5
|
||||
f 209/210/5 208/211/5 215/204/5 216/203/5
|
||||
f 208/211/5 207/212/5 214/205/5 215/204/5
|
||||
f 207/212/5 206/213/5 213/206/5 214/205/5
|
||||
f 206/213/5 205/214/5 212/207/5 213/206/5
|
||||
f 205/214/5 204/215/5 211/208/5 212/207/5
|
||||
f 204/215/5 203/149/5 210/151/5 211/208/5
|
||||
f 45/216/5 202/217/5 209/210/5 46/209/5
|
||||
f 202/217/5 201/218/5 208/211/5 209/210/5
|
||||
f 201/218/5 200/219/5 207/212/5 208/211/5
|
||||
f 200/219/5 199/220/5 206/213/5 207/212/5
|
||||
f 199/220/5 198/221/5 205/214/5 206/213/5
|
||||
f 198/221/5 197/222/5 204/215/5 205/214/5
|
||||
f 197/222/5 196/147/5 203/149/5 204/215/5
|
||||
f 44/223/5 195/224/5 202/217/5 45/216/5
|
||||
f 195/224/5 194/225/5 201/218/5 202/217/5
|
||||
f 194/225/5 193/226/5 200/219/5 201/218/5
|
||||
f 193/226/5 192/227/5 199/220/5 200/219/5
|
||||
f 192/227/5 191/228/5 198/221/5 199/220/5
|
||||
f 191/228/5 190/229/5 197/222/5 198/221/5
|
||||
f 190/229/5 189/145/5 196/147/5 197/222/5
|
||||
f 43/230/5 188/231/5 195/224/5 44/223/5
|
||||
f 188/231/5 187/232/5 194/225/5 195/224/5
|
||||
f 187/232/5 186/233/5 193/226/5 194/225/5
|
||||
f 186/233/5 185/234/5 192/227/5 193/226/5
|
||||
f 185/234/5 184/235/5 191/228/5 192/227/5
|
||||
f 184/235/5 183/236/5 190/229/5 191/228/5
|
||||
f 183/236/5 182/143/5 189/145/5 190/229/5
|
||||
f 42/237/5 181/238/5 188/231/5 43/230/5
|
||||
f 181/238/5 180/239/5 187/232/5 188/231/5
|
||||
f 180/239/5 179/240/5 186/233/5 187/232/5
|
||||
f 179/240/5 178/241/5 185/234/5 186/233/5
|
||||
f 178/241/5 177/242/5 184/235/5 185/234/5
|
||||
f 177/242/5 176/243/5 183/236/5 184/235/5
|
||||
f 176/243/5 175/141/5 182/143/5 183/236/5
|
||||
f 41/244/5 174/245/5 181/238/5 42/237/5
|
||||
f 174/245/5 173/246/5 180/239/5 181/238/5
|
||||
f 173/246/5 172/247/5 179/240/5 180/239/5
|
||||
f 172/247/5 171/248/5 178/241/5 179/240/5
|
||||
f 171/248/5 170/249/5 177/242/5 178/241/5
|
||||
f 170/249/5 169/250/5 176/243/5 177/242/5
|
||||
f 169/250/5 168/139/5 175/141/5 176/243/5
|
||||
f 3/251/5 83/252/5 174/245/5 41/244/5
|
||||
f 83/252/5 82/253/5 173/246/5 174/245/5
|
||||
f 82/253/5 81/254/5 172/247/5 173/246/5
|
||||
f 81/254/5 80/255/5 171/248/5 172/247/5
|
||||
f 80/255/5 79/256/5 170/249/5 171/248/5
|
||||
f 79/256/5 78/257/5 169/250/5 170/249/5
|
||||
f 78/257/5 77/136/5 168/139/5 169/250/5
|
||||
f 75/258/6 160/259/6 167/260/6 76/261/6
|
||||
f 160/259/6 159/262/6 166/263/6 167/260/6
|
||||
f 159/262/9 158/264/9 165/265/9 166/263/9
|
||||
f 158/264/6 157/266/6 164/267/6 165/265/6
|
||||
f 157/266/6 156/268/6 163/269/6 164/267/6
|
||||
f 156/268/10 155/270/10 162/271/10 163/269/10
|
||||
f 155/270/6 154/135/6 161/21/6 162/271/6
|
||||
f 74/272/6 153/273/6 160/259/6 75/258/6
|
||||
f 153/273/6 152/274/6 159/262/6 160/259/6
|
||||
f 152/274/9 151/275/9 158/264/9 159/262/9
|
||||
f 151/275/6 150/276/6 157/266/6 158/264/6
|
||||
f 150/276/6 149/277/6 156/268/6 157/266/6
|
||||
f 149/277/10 148/278/10 155/270/10 156/268/10
|
||||
f 148/278/6 147/133/6 154/135/6 155/270/6
|
||||
f 73/279/8 146/280/8 153/273/8 74/272/8
|
||||
f 146/280/8 145/281/8 152/274/8 153/273/8
|
||||
f 145/281/11 144/282/11 151/275/11 152/274/11
|
||||
f 144/282/12 143/283/12 150/276/12 151/275/12
|
||||
f 143/283/12 142/284/12 149/277/12 150/276/12
|
||||
f 142/284/13 141/285/13 148/278/13 149/277/13
|
||||
f 141/285/8 140/131/8 147/133/8 148/278/8
|
||||
f 72/286/6 139/287/6 146/280/6 73/279/6
|
||||
f 139/287/6 138/288/6 145/281/6 146/280/6
|
||||
f 138/288/6 137/289/6 144/282/6 145/281/6
|
||||
f 137/289/6 136/290/6 143/283/6 144/282/6
|
||||
f 136/290/6 135/291/6 142/284/6 143/283/6
|
||||
f 135/291/6 134/292/6 141/285/6 142/284/6
|
||||
f 134/292/6 133/129/6 140/131/6 141/285/6
|
||||
f 71/293/6 132/294/6 139/287/6 72/286/6
|
||||
f 132/294/6 131/295/6 138/288/6 139/287/6
|
||||
f 131/295/6 130/296/6 137/289/6 138/288/6
|
||||
f 130/296/6 129/297/6 136/290/6 137/289/6
|
||||
f 129/297/6 128/298/6 135/291/6 136/290/6
|
||||
f 128/298/6 127/299/6 134/292/6 135/291/6
|
||||
f 127/299/6 126/127/6 133/129/6 134/292/6
|
||||
f 70/300/7 125/301/7 132/294/7 71/293/7
|
||||
f 125/301/7 124/302/7 131/295/7 132/294/7
|
||||
f 124/302/14 123/303/14 130/296/14 131/295/14
|
||||
f 123/303/15 122/304/15 129/297/15 130/296/15
|
||||
f 122/304/15 121/305/15 128/298/15 129/297/15
|
||||
f 121/305/16 120/306/16 127/299/16 128/298/16
|
||||
f 120/306/7 119/125/7 126/127/7 127/299/7
|
||||
f 69/307/6 118/308/6 125/301/6 70/300/6
|
||||
f 118/308/6 117/309/6 124/302/6 125/301/6
|
||||
f 117/309/9 116/310/9 123/303/9 124/302/9
|
||||
f 116/310/6 115/311/6 122/304/6 123/303/6
|
||||
f 115/311/6 114/312/6 121/305/6 122/304/6
|
||||
f 114/312/10 113/313/10 120/306/10 121/305/10
|
||||
f 113/313/6 112/123/6 119/125/6 120/306/6
|
||||
f 68/314/6 111/315/6 118/308/6 69/307/6
|
||||
f 111/315/6 110/316/6 117/309/6 118/308/6
|
||||
f 110/316/9 109/317/9 116/310/9 117/309/9
|
||||
f 109/317/6 108/318/6 115/311/6 116/310/6
|
||||
f 108/318/6 107/319/6 114/312/6 115/311/6
|
||||
f 107/319/10 106/320/10 113/313/10 114/312/10
|
||||
f 106/320/6 105/121/6 112/123/6 113/313/6
|
||||
f 8/321/6 90/322/6 111/315/6 68/314/6
|
||||
f 90/322/6 89/323/6 110/316/6 111/315/6
|
||||
f 89/323/9 88/324/9 109/317/9 110/316/9
|
||||
f 88/324/6 87/325/6 108/318/6 109/317/6
|
||||
f 87/325/6 86/326/6 107/319/6 108/318/6
|
||||
f 86/326/10 85/327/10 106/320/10 107/319/10
|
||||
f 85/327/6 84/118/6 105/121/6 106/320/6
|
||||
f 76/261/6 167/260/6 98/328/6 6/329/6
|
||||
f 167/260/6 166/263/6 99/330/6 98/328/6
|
||||
f 166/263/9 165/265/9 100/331/9 99/330/9
|
||||
f 165/265/6 164/267/6 101/332/6 100/331/6
|
||||
f 164/267/6 163/269/6 102/333/6 101/332/6
|
||||
f 163/269/10 162/271/10 103/334/10 102/333/10
|
||||
f 162/271/6 161/21/6 104/24/6 103/334/6
|
||||
f 49/191/5 230/190/5 91/335/5 1/336/5
|
||||
f 230/190/5 229/193/5 92/337/5 91/335/5
|
||||
f 229/193/5 228/195/5 93/338/5 92/337/5
|
||||
f 228/195/5 227/197/5 94/339/5 93/338/5
|
||||
f 227/197/5 226/199/5 95/340/5 94/339/5
|
||||
f 226/199/5 225/201/5 96/341/5 95/340/5
|
||||
f 225/201/5 224/17/5 97/20/5 96/341/5
|
||||
f 5/342/4 6/343/4 98/344/4 97/345/4
|
||||
f 97/345/4 98/344/4 99/346/4 96/347/4
|
||||
f 96/347/4 99/346/4 100/348/4 95/349/4
|
||||
f 95/349/4 100/348/4 101/350/4 94/351/4
|
||||
f 94/351/4 101/350/4 102/352/4 93/353/4
|
||||
f 93/353/4 102/352/4 103/354/4 92/355/4
|
||||
f 92/355/4 103/354/4 104/14/4 91/13/4
|
||||
f 3/356/2 4/357/2 84/358/2 83/359/2
|
||||
f 83/359/2 84/358/2 85/360/2 82/361/2
|
||||
f 82/361/2 85/360/2 86/362/2 81/363/2
|
||||
f 81/363/2 86/362/2 87/364/2 80/365/2
|
||||
f 80/365/2 87/364/2 88/366/2 79/367/2
|
||||
f 79/367/2 88/366/2 89/368/2 78/369/2
|
||||
f 78/369/2 89/368/2 90/6/2 77/5/2
|
||||
f 231/370/1 232/371/1 234/372/1 233/373/1
|
||||
f 233/374/2 234/375/2 238/376/2 237/377/2
|
||||
f 237/378/3 238/379/3 236/380/3 235/381/3
|
||||
f 235/382/4 236/383/4 232/384/4 231/385/4
|
||||
f 233/386/5 237/378/5 235/387/5 231/388/5
|
||||
f 238/389/6 234/390/6 232/391/6 236/392/6
|
|
@ -0,0 +1,964 @@
|
|||
# Blender v2.79 (sub 0) OBJ File: 'town.blend'
|
||||
# www.blender.org
|
||||
mtllib town.mtl
|
||||
o Cube_Cube.001
|
||||
v -2.000000 -0.499714 2.000000
|
||||
v -2.000000 0.300286 2.000000
|
||||
v -2.000000 -0.499714 -2.000000
|
||||
v -2.000000 0.300286 -2.000000
|
||||
v 2.000000 -0.499714 2.000000
|
||||
v 2.000000 0.300286 2.000000
|
||||
v 2.000000 -0.499714 -2.000000
|
||||
v 2.000000 0.300286 -2.000000
|
||||
v 1.101621 0.300287 -0.870031
|
||||
v 1.101621 0.918178 -0.870031
|
||||
v 1.101621 0.300287 -1.945508
|
||||
v 1.101621 0.918178 -1.945508
|
||||
v 1.907317 0.300287 -0.870031
|
||||
v 1.907317 0.918178 -0.870031
|
||||
v 1.907317 0.300287 -1.945508
|
||||
v 1.907317 0.918178 -1.945508
|
||||
v -1.091775 0.918178 0.854663
|
||||
v -1.091775 0.300287 0.854663
|
||||
v -1.091775 0.918178 1.930140
|
||||
v -1.091775 0.300287 1.930140
|
||||
v -1.897471 0.918178 0.854663
|
||||
v -1.897471 0.300287 0.854663
|
||||
v -1.897471 0.918178 1.930140
|
||||
v -1.897471 0.300287 1.930140
|
||||
v 1.054966 0.300287 1.942355
|
||||
v 1.054966 0.918178 1.942355
|
||||
v 1.054966 0.300287 0.856099
|
||||
v 1.054966 0.918178 0.856099
|
||||
v 1.929879 0.300287 1.942355
|
||||
v 1.929879 0.918178 1.942355
|
||||
v 1.929879 0.300287 0.856099
|
||||
v 1.929879 0.918178 0.856099
|
||||
v -1.897471 0.300287 -0.862380
|
||||
v -1.897471 0.918178 -0.862380
|
||||
v -1.897471 0.300287 -1.937857
|
||||
v -1.897471 0.918178 -1.937857
|
||||
v -1.091775 0.300287 -0.862380
|
||||
v -1.091775 0.918178 -0.862380
|
||||
v -1.091775 0.300287 -1.937857
|
||||
v -1.091775 0.918178 -1.937857
|
||||
v -2.000000 -0.499714 -1.600000
|
||||
v -2.000000 -0.499714 -1.200000
|
||||
v -2.000000 -0.499714 -0.800000
|
||||
v -2.000000 -0.499714 -0.698988
|
||||
v -2.000000 -0.499714 0.000000
|
||||
v -2.000000 -0.499714 0.713937
|
||||
v -2.000000 -0.499714 0.800000
|
||||
v -2.000000 -0.499714 1.200000
|
||||
v -2.000000 -0.499714 1.600000
|
||||
v -2.000000 0.300286 1.600000
|
||||
v -2.000000 0.300286 1.200000
|
||||
v -2.000000 0.300286 0.800000
|
||||
v -2.000000 -0.496217 0.713937
|
||||
v -2.000000 -0.496217 0.000000
|
||||
v -2.000000 -0.496217 -0.698988
|
||||
v -2.000000 0.300286 -0.800000
|
||||
v -2.000000 0.300286 -1.200000
|
||||
v -2.000000 0.300286 -1.600000
|
||||
v 2.000000 -0.499714 1.600000
|
||||
v 2.000000 -0.499714 1.200000
|
||||
v 2.000000 -0.499714 0.800000
|
||||
v 2.000000 -0.499714 0.713937
|
||||
v 2.000000 -0.499714 0.000000
|
||||
v 2.000000 -0.499714 -0.698988
|
||||
v 2.000000 -0.499714 -0.800000
|
||||
v 2.000000 -0.499714 -1.200000
|
||||
v 2.000000 -0.499714 -1.600000
|
||||
v 2.000000 0.300286 -1.600000
|
||||
v 2.000000 0.300286 -1.200000
|
||||
v 2.000000 0.300286 -0.800000
|
||||
v 2.000000 -0.496217 -0.698988
|
||||
v 2.000000 -0.496217 0.000000
|
||||
v 2.000000 -0.496217 0.713937
|
||||
v 2.000000 0.300286 0.800000
|
||||
v 2.000000 0.300286 1.200000
|
||||
v 2.000000 0.300286 1.600000
|
||||
v 1.500000 -0.499714 -2.000000
|
||||
v 1.000000 -0.499714 -2.000000
|
||||
v 0.836361 -0.499714 -2.000000
|
||||
v 0.000000 -0.499714 -2.000000
|
||||
v -0.866260 -0.499714 -2.000000
|
||||
v -1.000000 -0.499714 -2.000000
|
||||
v -1.500000 -0.499714 -2.000000
|
||||
v -1.500000 0.300286 -2.000000
|
||||
v -1.000000 0.300286 -2.000000
|
||||
v -0.866260 -0.498011 -2.000000
|
||||
v 0.000000 -0.498011 -2.000000
|
||||
v 0.836361 -0.498011 -2.000000
|
||||
v 1.000000 0.300286 -2.000000
|
||||
v 1.500000 0.300286 -2.000000
|
||||
v -1.500000 -0.499714 2.000000
|
||||
v -1.000000 -0.499714 2.000000
|
||||
v -0.866260 -0.499714 2.000000
|
||||
v 0.000000 -0.499714 2.000000
|
||||
v 0.836361 -0.499714 2.000000
|
||||
v 1.000000 -0.499714 2.000000
|
||||
v 1.500000 -0.499714 2.000000
|
||||
v 1.500000 0.300286 2.000000
|
||||
v 1.000000 0.300286 2.000000
|
||||
v 0.836361 -0.498011 2.000000
|
||||
v 0.000000 -0.498011 2.000000
|
||||
v -0.866260 -0.498011 2.000000
|
||||
v -1.000000 0.300286 2.000000
|
||||
v -1.500000 0.300286 2.000000
|
||||
v -1.500000 0.300286 -1.600000
|
||||
v -1.000000 0.300286 -1.600000
|
||||
v -0.866260 -0.498011 -1.600000
|
||||
v 0.000000 -0.498011 -1.600000
|
||||
v 0.836361 -0.498011 -1.600000
|
||||
v 1.000000 0.300286 -1.600000
|
||||
v 1.500000 0.300286 -1.600000
|
||||
v -1.500000 0.300286 -1.200000
|
||||
v -1.000000 0.300286 -1.200000
|
||||
v -0.866260 -0.498011 -1.200000
|
||||
v 0.000000 -0.498011 -1.200000
|
||||
v 0.836361 -0.498011 -1.200000
|
||||
v 1.000000 0.300286 -1.200000
|
||||
v 1.500000 0.300286 -1.200000
|
||||
v -1.500000 0.300286 -0.800000
|
||||
v -1.000000 0.300286 -0.800000
|
||||
v -0.866260 -0.498011 -0.800000
|
||||
v 0.000000 -0.498011 -0.800000
|
||||
v 0.836361 -0.498011 -0.800000
|
||||
v 1.000000 0.300286 -0.800000
|
||||
v 1.500000 0.300286 -0.800000
|
||||
v -1.500000 -0.496217 -0.698988
|
||||
v -1.000000 -0.496217 -0.698988
|
||||
v -0.866260 -0.496217 -0.698988
|
||||
v 0.000000 -0.496217 -0.698988
|
||||
v 0.836361 -0.496217 -0.698988
|
||||
v 1.000000 -0.496217 -0.698988
|
||||
v 1.500000 -0.496217 -0.698988
|
||||
v -1.500000 -0.496217 0.000000
|
||||
v -1.000000 -0.496217 0.000000
|
||||
v -0.866260 -0.496217 0.000000
|
||||
v 0.000000 -0.496217 0.000000
|
||||
v 0.836361 -0.496217 0.000000
|
||||
v 1.000000 -0.496217 0.000000
|
||||
v 1.500000 -0.496217 0.000000
|
||||
v -1.500000 -0.496217 0.713937
|
||||
v -1.000000 -0.496217 0.713937
|
||||
v -0.866260 -0.496217 0.713937
|
||||
v 0.000000 -0.496217 0.713937
|
||||
v 0.836361 -0.496217 0.713937
|
||||
v 1.000000 -0.496217 0.713937
|
||||
v 1.500000 -0.496217 0.713937
|
||||
v -1.500000 0.300286 0.800000
|
||||
v -1.000000 0.300286 0.800000
|
||||
v -0.866260 -0.498011 0.800000
|
||||
v 0.000000 -0.498011 0.800000
|
||||
v 0.836361 -0.498011 0.800000
|
||||
v 1.000000 0.300286 0.800000
|
||||
v 1.500000 0.300286 0.800000
|
||||
v -1.500000 0.300286 1.200000
|
||||
v -1.000000 0.300286 1.200000
|
||||
v -0.866260 -0.498011 1.200000
|
||||
v 0.000000 -0.498011 1.200000
|
||||
v 0.836361 -0.498011 1.200000
|
||||
v 1.000000 0.300286 1.200000
|
||||
v 1.500000 0.300286 1.200000
|
||||
v -1.500000 0.300286 1.600000
|
||||
v -1.000000 0.300286 1.600000
|
||||
v -0.866260 -0.498011 1.600000
|
||||
v 0.000000 -0.498011 1.600000
|
||||
v 0.836361 -0.498011 1.600000
|
||||
v 1.000000 0.300286 1.600000
|
||||
v 1.500000 0.300286 1.600000
|
||||
v 1.500000 -0.499714 -1.600000
|
||||
v 1.000000 -0.499714 -1.600000
|
||||
v 0.836361 -0.499714 -1.600000
|
||||
v 0.000000 -0.499714 -1.600000
|
||||
v -0.866260 -0.499714 -1.600000
|
||||
v -1.000000 -0.499714 -1.600000
|
||||
v -1.500000 -0.499714 -1.600000
|
||||
v 1.500000 -0.499714 -1.200000
|
||||
v 1.000000 -0.499714 -1.200000
|
||||
v 0.836361 -0.499714 -1.200000
|
||||
v 0.000000 -0.499714 -1.200000
|
||||
v -0.866260 -0.499714 -1.200000
|
||||
v -1.000000 -0.499714 -1.200000
|
||||
v -1.500000 -0.499714 -1.200000
|
||||
v 1.500000 -0.499714 -0.800000
|
||||
v 1.000000 -0.499714 -0.800000
|
||||
v 0.836361 -0.499714 -0.800000
|
||||
v 0.000000 -0.499714 -0.800000
|
||||
v -0.866260 -0.499714 -0.800000
|
||||
v -1.000000 -0.499714 -0.800000
|
||||
v -1.500000 -0.499714 -0.800000
|
||||
v 1.500000 -0.499714 -0.698988
|
||||
v 1.000000 -0.499714 -0.698988
|
||||
v 0.836361 -0.499714 -0.698988
|
||||
v 0.000000 -0.499714 -0.698988
|
||||
v -0.866260 -0.499714 -0.698988
|
||||
v -1.000000 -0.499714 -0.698988
|
||||
v -1.500000 -0.499714 -0.698988
|
||||
v 1.500000 -0.499714 0.000000
|
||||
v 1.000000 -0.499714 0.000000
|
||||
v 0.836361 -0.499714 0.000000
|
||||
v 0.000000 -0.499714 0.000000
|
||||
v -0.866260 -0.499714 0.000000
|
||||
v -1.000000 -0.499714 0.000000
|
||||
v -1.500000 -0.499714 0.000000
|
||||
v 1.500000 -0.499714 0.713937
|
||||
v 1.000000 -0.499714 0.713937
|
||||
v 0.836361 -0.499714 0.713937
|
||||
v 0.000000 -0.499714 0.713937
|
||||
v -0.866260 -0.499714 0.713937
|
||||
v -1.000000 -0.499714 0.713937
|
||||
v -1.500000 -0.499714 0.713937
|
||||
v 1.500000 -0.499714 0.800000
|
||||
v 1.000000 -0.499714 0.800000
|
||||
v 0.836361 -0.499714 0.800000
|
||||
v 0.000000 -0.499714 0.800000
|
||||
v -0.866260 -0.499714 0.800000
|
||||
v -1.000000 -0.499714 0.800000
|
||||
v -1.500000 -0.499714 0.800000
|
||||
v 1.500000 -0.499714 1.200000
|
||||
v 1.000000 -0.499714 1.200000
|
||||
v 0.836361 -0.499714 1.200000
|
||||
v 0.000000 -0.499714 1.200000
|
||||
v -0.866260 -0.499714 1.200000
|
||||
v -1.000000 -0.499714 1.200000
|
||||
v -1.500000 -0.499714 1.200000
|
||||
v 1.500000 -0.499714 1.600000
|
||||
v 1.000000 -0.499714 1.600000
|
||||
v 0.836361 -0.499714 1.600000
|
||||
v 0.000000 -0.499714 1.600000
|
||||
v -0.866260 -0.499714 1.600000
|
||||
v -1.000000 -0.499714 1.600000
|
||||
v -1.500000 -0.499714 1.600000
|
||||
v -0.501274 -0.509807 0.504980
|
||||
v -0.501274 0.230233 0.504980
|
||||
v -0.501274 -0.509807 -0.495020
|
||||
v -0.501274 0.230233 -0.495020
|
||||
v 0.498726 -0.509807 0.504980
|
||||
v 0.498726 0.230233 0.504980
|
||||
v 0.498726 -0.509807 -0.495020
|
||||
v 0.498726 0.230233 -0.495020
|
||||
v 1.504469 0.300287 -1.945508
|
||||
v 1.504469 1.493182 -1.945508
|
||||
v 1.504469 0.300287 -0.870031
|
||||
v 1.504469 1.493182 -0.870031
|
||||
v -1.494623 0.300287 -1.937857
|
||||
v -1.494623 1.493182 -1.937857
|
||||
v -1.494623 0.300287 -0.862380
|
||||
v -1.494623 1.493182 -0.862380
|
||||
v -1.494623 1.493182 1.930140
|
||||
v -1.494623 0.300287 1.930140
|
||||
v -1.494623 1.493182 0.854663
|
||||
v -1.494623 0.300287 0.854663
|
||||
v 1.492423 0.300287 0.856099
|
||||
v 1.492423 1.493182 0.856099
|
||||
v 1.492423 0.300287 1.942355
|
||||
v 1.492423 1.493182 1.942355
|
||||
v -0.001274 -0.509807 -0.495020
|
||||
v -0.001274 0.805237 -0.495020
|
||||
v -0.001274 -0.509807 0.504980
|
||||
v -0.001274 0.805237 0.504980
|
||||
vt 0.910564 0.859698
|
||||
vt 0.877231 0.859698
|
||||
vt 0.877231 0.856365
|
||||
vt 0.910564 0.856365
|
||||
vt 0.877231 0.860531
|
||||
vt 0.843897 0.860531
|
||||
vt 0.843897 0.856365
|
||||
vt 0.877231 0.856365
|
||||
vt 0.877231 0.826365
|
||||
vt 0.843897 0.826365
|
||||
vt 0.843897 0.823031
|
||||
vt 0.877231 0.823031
|
||||
vt 0.906397 0.856365
|
||||
vt 0.906397 0.823031
|
||||
vt 0.910564 0.823031
|
||||
vt 0.910564 0.856365
|
||||
vt 0.914731 0.826365
|
||||
vt 0.910564 0.826365
|
||||
vt 0.910564 0.823031
|
||||
vt 0.914731 0.823031
|
||||
vt 0.847231 0.918865
|
||||
vt 0.847231 0.923031
|
||||
vt 0.843897 0.923031
|
||||
vt 0.843897 0.918865
|
||||
vt 0.619826 0.672008
|
||||
vt 0.619826 0.572008
|
||||
vt 0.638873 0.572008
|
||||
vt 0.638873 0.672008
|
||||
vt 0.609111 0.672008
|
||||
vt 0.609111 0.572008
|
||||
vt 0.619826 0.572008
|
||||
vt 0.619826 0.672008
|
||||
vt 0.657921 0.572008
|
||||
vt 0.657921 0.672008
|
||||
vt 0.638873 0.672008
|
||||
vt 0.638873 0.572008
|
||||
vt 0.587683 0.672008
|
||||
vt 0.587683 0.572008
|
||||
vt 0.598397 0.572008
|
||||
vt 0.598397 0.672008
|
||||
vt 0.657921 0.599008
|
||||
vt 0.657921 0.590008
|
||||
vt 0.676969 0.590008
|
||||
vt 0.676969 0.599008
|
||||
vt 0.676969 0.581008
|
||||
vt 0.676969 0.590008
|
||||
vt 0.657921 0.590008
|
||||
vt 0.657921 0.581008
|
||||
vt 0.676969 0.581008
|
||||
vt 0.676969 0.590008
|
||||
vt 0.657921 0.590008
|
||||
vt 0.657921 0.581008
|
||||
vt 0.657921 0.599008
|
||||
vt 0.657921 0.590008
|
||||
vt 0.676969 0.590008
|
||||
vt 0.676969 0.599008
|
||||
vt 0.587683 0.672008
|
||||
vt 0.587683 0.572008
|
||||
vt 0.598397 0.572008
|
||||
vt 0.598397 0.672008
|
||||
vt 0.657921 0.572008
|
||||
vt 0.657921 0.672008
|
||||
vt 0.638873 0.672008
|
||||
vt 0.638873 0.572008
|
||||
vt 0.609111 0.672008
|
||||
vt 0.609111 0.572008
|
||||
vt 0.619826 0.572008
|
||||
vt 0.619826 0.672008
|
||||
vt 0.619826 0.672008
|
||||
vt 0.619826 0.572008
|
||||
vt 0.638873 0.572008
|
||||
vt 0.638873 0.672008
|
||||
vt 0.619826 0.672008
|
||||
vt 0.619826 0.572008
|
||||
vt 0.638873 0.572008
|
||||
vt 0.638873 0.672008
|
||||
vt 0.587683 0.572008
|
||||
vt 0.587683 0.672008
|
||||
vt 0.576969 0.672008
|
||||
vt 0.576969 0.572008
|
||||
vt 0.657921 0.572008
|
||||
vt 0.657921 0.672008
|
||||
vt 0.638873 0.672008
|
||||
vt 0.638873 0.572008
|
||||
vt 0.609111 0.672008
|
||||
vt 0.609111 0.572008
|
||||
vt 0.657921 0.581008
|
||||
vt 0.676969 0.572008
|
||||
vt 0.676969 0.581008
|
||||
vt 0.657921 0.599008
|
||||
vt 0.657921 0.590008
|
||||
vt 0.676969 0.590008
|
||||
vt 0.676969 0.599008
|
||||
vt 0.619826 0.672008
|
||||
vt 0.619826 0.572008
|
||||
vt 0.638873 0.572008
|
||||
vt 0.638873 0.672008
|
||||
vt 0.609111 0.672008
|
||||
vt 0.609111 0.572008
|
||||
vt 0.619826 0.572008
|
||||
vt 0.619826 0.672008
|
||||
vt 0.657921 0.572008
|
||||
vt 0.657921 0.672008
|
||||
vt 0.638873 0.672008
|
||||
vt 0.638873 0.572008
|
||||
vt 0.587683 0.672008
|
||||
vt 0.587683 0.572008
|
||||
vt 0.598397 0.572008
|
||||
vt 0.598397 0.672008
|
||||
vt 0.657921 0.599008
|
||||
vt 0.657921 0.590008
|
||||
vt 0.676969 0.590008
|
||||
vt 0.676969 0.599008
|
||||
vt 0.676969 0.581008
|
||||
vt 0.676969 0.590008
|
||||
vt 0.657921 0.590008
|
||||
vt 0.657921 0.581008
|
||||
vt 0.877231 0.918865
|
||||
vt 0.877231 0.923031
|
||||
vt 0.873897 0.923031
|
||||
vt 0.873897 0.918865
|
||||
vt 0.870564 0.923031
|
||||
vt 0.870564 0.918865
|
||||
vt 0.867231 0.923031
|
||||
vt 0.867231 0.918865
|
||||
vt 0.863897 0.923031
|
||||
vt 0.863897 0.918865
|
||||
vt 0.860564 0.923031
|
||||
vt 0.860564 0.918865
|
||||
vt 0.857231 0.923031
|
||||
vt 0.857231 0.918865
|
||||
vt 0.853897 0.923031
|
||||
vt 0.853897 0.918865
|
||||
vt 0.850564 0.923031
|
||||
vt 0.850564 0.918865
|
||||
vt 0.914731 0.856365
|
||||
vt 0.910564 0.856365
|
||||
vt 0.910564 0.853031
|
||||
vt 0.914731 0.853031
|
||||
vt 0.910564 0.849698
|
||||
vt 0.914731 0.849698
|
||||
vt 0.910564 0.846365
|
||||
vt 0.914731 0.846365
|
||||
vt 0.910564 0.843031
|
||||
vt 0.914731 0.843031
|
||||
vt 0.910564 0.839698
|
||||
vt 0.914731 0.839698
|
||||
vt 0.910564 0.836365
|
||||
vt 0.914731 0.836365
|
||||
vt 0.910564 0.833031
|
||||
vt 0.914731 0.833031
|
||||
vt 0.910564 0.829698
|
||||
vt 0.914731 0.829698
|
||||
vt 0.843897 0.853031
|
||||
vt 0.877231 0.853031
|
||||
vt 0.843897 0.849698
|
||||
vt 0.877231 0.849698
|
||||
vt 0.843897 0.846365
|
||||
vt 0.877231 0.846365
|
||||
vt 0.843897 0.843031
|
||||
vt 0.877231 0.843031
|
||||
vt 0.843897 0.839698
|
||||
vt 0.877231 0.839698
|
||||
vt 0.843897 0.836365
|
||||
vt 0.877231 0.836365
|
||||
vt 0.843897 0.833031
|
||||
vt 0.877231 0.833031
|
||||
vt 0.843897 0.829698
|
||||
vt 0.877231 0.829698
|
||||
vt 0.910564 0.889698
|
||||
vt 0.877231 0.889698
|
||||
vt 0.877231 0.886365
|
||||
vt 0.910564 0.886365
|
||||
vt 0.877231 0.883031
|
||||
vt 0.910564 0.883031
|
||||
vt 0.877231 0.879698
|
||||
vt 0.910564 0.879698
|
||||
vt 0.877231 0.876365
|
||||
vt 0.910564 0.876365
|
||||
vt 0.877231 0.873031
|
||||
vt 0.910564 0.873031
|
||||
vt 0.877231 0.869698
|
||||
vt 0.910564 0.869698
|
||||
vt 0.877231 0.866365
|
||||
vt 0.910564 0.866365
|
||||
vt 0.877231 0.863031
|
||||
vt 0.910564 0.863031
|
||||
vt 0.943897 0.829698
|
||||
vt 0.939731 0.829698
|
||||
vt 0.939731 0.826365
|
||||
vt 0.943897 0.826365
|
||||
vt 0.935564 0.829698
|
||||
vt 0.935564 0.826365
|
||||
vt 0.931397 0.829698
|
||||
vt 0.931397 0.826365
|
||||
vt 0.927231 0.829698
|
||||
vt 0.927231 0.826365
|
||||
vt 0.923064 0.829698
|
||||
vt 0.923064 0.826365
|
||||
vt 0.918897 0.829698
|
||||
vt 0.918897 0.826365
|
||||
vt 0.943897 0.833031
|
||||
vt 0.939731 0.833031
|
||||
vt 0.935564 0.833031
|
||||
vt 0.931397 0.833031
|
||||
vt 0.927231 0.833031
|
||||
vt 0.923064 0.833031
|
||||
vt 0.918897 0.833031
|
||||
vt 0.943897 0.836365
|
||||
vt 0.939731 0.836365
|
||||
vt 0.935564 0.836365
|
||||
vt 0.931397 0.836365
|
||||
vt 0.927231 0.836365
|
||||
vt 0.923064 0.836365
|
||||
vt 0.918897 0.836365
|
||||
vt 0.943897 0.839698
|
||||
vt 0.939731 0.839698
|
||||
vt 0.935564 0.839698
|
||||
vt 0.931397 0.839698
|
||||
vt 0.927231 0.839698
|
||||
vt 0.923064 0.839698
|
||||
vt 0.918897 0.839698
|
||||
vt 0.943897 0.843031
|
||||
vt 0.939731 0.843031
|
||||
vt 0.935564 0.843031
|
||||
vt 0.931397 0.843031
|
||||
vt 0.927231 0.843031
|
||||
vt 0.923064 0.843031
|
||||
vt 0.918897 0.843031
|
||||
vt 0.943897 0.846365
|
||||
vt 0.939731 0.846365
|
||||
vt 0.935564 0.846365
|
||||
vt 0.931397 0.846365
|
||||
vt 0.927231 0.846365
|
||||
vt 0.923064 0.846365
|
||||
vt 0.918897 0.846365
|
||||
vt 0.943897 0.849698
|
||||
vt 0.939731 0.849698
|
||||
vt 0.935564 0.849698
|
||||
vt 0.931397 0.849698
|
||||
vt 0.927231 0.849698
|
||||
vt 0.923064 0.849698
|
||||
vt 0.918897 0.849698
|
||||
vt 0.943897 0.853031
|
||||
vt 0.939731 0.853031
|
||||
vt 0.935564 0.853031
|
||||
vt 0.931397 0.853031
|
||||
vt 0.927231 0.853031
|
||||
vt 0.923064 0.853031
|
||||
vt 0.918897 0.853031
|
||||
vt 0.943897 0.856365
|
||||
vt 0.939731 0.856365
|
||||
vt 0.935564 0.856365
|
||||
vt 0.931397 0.856365
|
||||
vt 0.927231 0.856365
|
||||
vt 0.923064 0.856365
|
||||
vt 0.918897 0.856365
|
||||
vt 0.850564 0.889698
|
||||
vt 0.850564 0.893865
|
||||
vt 0.847231 0.893865
|
||||
vt 0.847231 0.889698
|
||||
vt 0.850564 0.898031
|
||||
vt 0.847231 0.898031
|
||||
vt 0.850564 0.902198
|
||||
vt 0.847231 0.902198
|
||||
vt 0.850564 0.906365
|
||||
vt 0.847231 0.906365
|
||||
vt 0.850564 0.910531
|
||||
vt 0.847231 0.910531
|
||||
vt 0.850564 0.914698
|
||||
vt 0.847231 0.914698
|
||||
vt 0.853897 0.889698
|
||||
vt 0.853897 0.893865
|
||||
vt 0.853897 0.898031
|
||||
vt 0.853897 0.902198
|
||||
vt 0.853897 0.906365
|
||||
vt 0.853897 0.910531
|
||||
vt 0.853897 0.914698
|
||||
vt 0.857231 0.889698
|
||||
vt 0.857231 0.893865
|
||||
vt 0.857231 0.898031
|
||||
vt 0.857231 0.902198
|
||||
vt 0.857231 0.906365
|
||||
vt 0.857231 0.910531
|
||||
vt 0.857231 0.914698
|
||||
vt 0.860564 0.889698
|
||||
vt 0.860564 0.893865
|
||||
vt 0.860564 0.898031
|
||||
vt 0.860564 0.902198
|
||||
vt 0.860564 0.906365
|
||||
vt 0.860564 0.910531
|
||||
vt 0.860564 0.914698
|
||||
vt 0.863897 0.889698
|
||||
vt 0.863897 0.893865
|
||||
vt 0.863897 0.898031
|
||||
vt 0.863897 0.902198
|
||||
vt 0.863897 0.906365
|
||||
vt 0.863897 0.910531
|
||||
vt 0.863897 0.914698
|
||||
vt 0.867231 0.889698
|
||||
vt 0.867231 0.893865
|
||||
vt 0.867231 0.898031
|
||||
vt 0.867231 0.902198
|
||||
vt 0.867231 0.906365
|
||||
vt 0.867231 0.910531
|
||||
vt 0.867231 0.914698
|
||||
vt 0.870564 0.889698
|
||||
vt 0.870564 0.893865
|
||||
vt 0.870564 0.898031
|
||||
vt 0.870564 0.902198
|
||||
vt 0.870564 0.906365
|
||||
vt 0.870564 0.910531
|
||||
vt 0.870564 0.914698
|
||||
vt 0.873897 0.889698
|
||||
vt 0.873897 0.893865
|
||||
vt 0.873897 0.898031
|
||||
vt 0.873897 0.902198
|
||||
vt 0.873897 0.906365
|
||||
vt 0.873897 0.910531
|
||||
vt 0.873897 0.914698
|
||||
vt 0.877231 0.889698
|
||||
vt 0.877231 0.893865
|
||||
vt 0.877231 0.898031
|
||||
vt 0.877231 0.902198
|
||||
vt 0.877231 0.906365
|
||||
vt 0.877231 0.910531
|
||||
vt 0.877231 0.914698
|
||||
vt 0.843897 0.893865
|
||||
vt 0.843897 0.889698
|
||||
vt 0.843897 0.898031
|
||||
vt 0.843897 0.902198
|
||||
vt 0.843897 0.906365
|
||||
vt 0.843897 0.910531
|
||||
vt 0.843897 0.914698
|
||||
vt 0.939731 0.823031
|
||||
vt 0.943897 0.823031
|
||||
vt 0.935564 0.823031
|
||||
vt 0.931397 0.823031
|
||||
vt 0.927231 0.823031
|
||||
vt 0.923064 0.823031
|
||||
vt 0.918897 0.823031
|
||||
vt 0.877231 0.856365
|
||||
vt 0.877231 0.823031
|
||||
vt 0.881397 0.823031
|
||||
vt 0.881397 0.856365
|
||||
vt 0.885564 0.823031
|
||||
vt 0.885564 0.856365
|
||||
vt 0.889731 0.823031
|
||||
vt 0.889731 0.856365
|
||||
vt 0.893897 0.823031
|
||||
vt 0.893897 0.856365
|
||||
vt 0.898064 0.823031
|
||||
vt 0.898064 0.856365
|
||||
vt 0.902231 0.823031
|
||||
vt 0.902231 0.856365
|
||||
vt 0.877231 0.889698
|
||||
vt 0.843897 0.889698
|
||||
vt 0.843897 0.885531
|
||||
vt 0.877231 0.885531
|
||||
vt 0.843897 0.881365
|
||||
vt 0.877231 0.881365
|
||||
vt 0.843897 0.877198
|
||||
vt 0.877231 0.877198
|
||||
vt 0.843897 0.873031
|
||||
vt 0.877231 0.873031
|
||||
vt 0.843897 0.868865
|
||||
vt 0.877231 0.868865
|
||||
vt 0.843897 0.864698
|
||||
vt 0.877231 0.864698
|
||||
vt 0.526969 0.722008
|
||||
vt 0.526969 0.522008
|
||||
vt 0.566969 0.522008
|
||||
vt 0.566969 0.722008
|
||||
vt 0.626969 0.722008
|
||||
vt 0.626969 0.522008
|
||||
vt 0.646969 0.522008
|
||||
vt 0.646969 0.722008
|
||||
vt 0.686969 0.522008
|
||||
vt 0.686969 0.722008
|
||||
vt 0.646969 0.722008
|
||||
vt 0.646969 0.522008
|
||||
vt 0.586969 0.722008
|
||||
vt 0.586969 0.522008
|
||||
vt 0.606969 0.522008
|
||||
vt 0.606969 0.722008
|
||||
vt 0.686969 0.526008
|
||||
vt 0.726969 0.522008
|
||||
vt 0.726969 0.526008
|
||||
vt 0.686969 0.534008
|
||||
vt 0.686969 0.530008
|
||||
vt 0.726969 0.530008
|
||||
vt 0.726969 0.534008
|
||||
vt 0.676969 0.572008
|
||||
vt 0.657921 0.572008
|
||||
vt 0.657921 0.608008
|
||||
vt 0.676969 0.608008
|
||||
vt 0.576969 0.672008
|
||||
vt 0.576969 0.572008
|
||||
vt 0.598397 0.672008
|
||||
vt 0.598397 0.572008
|
||||
vt 0.676969 0.572008
|
||||
vt 0.657921 0.572008
|
||||
vt 0.657921 0.608008
|
||||
vt 0.676969 0.608008
|
||||
vt 0.576969 0.672008
|
||||
vt 0.576969 0.572008
|
||||
vt 0.598397 0.672008
|
||||
vt 0.598397 0.572008
|
||||
vt 0.598397 0.672008
|
||||
vt 0.598397 0.572008
|
||||
vt 0.576969 0.672008
|
||||
vt 0.576969 0.572008
|
||||
vt 0.657921 0.608008
|
||||
vt 0.676969 0.608008
|
||||
vt 0.676969 0.572008
|
||||
vt 0.657921 0.572008
|
||||
vt 0.657921 0.608008
|
||||
vt 0.676969 0.608008
|
||||
vt 0.657921 0.590008
|
||||
vt 0.676969 0.590008
|
||||
vt 0.598397 0.672008
|
||||
vt 0.598397 0.572008
|
||||
vt 0.598397 0.572008
|
||||
vt 0.598397 0.672008
|
||||
vt 0.686969 0.538008
|
||||
vt 0.726969 0.538008
|
||||
vt 0.686969 0.530008
|
||||
vt 0.726969 0.530008
|
||||
vt 0.566969 0.722008
|
||||
vt 0.566969 0.522008
|
||||
vt 0.606969 0.722008
|
||||
vt 0.606969 0.522008
|
||||
vn -1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 -1.0000
|
||||
vn 1.0000 0.0000 0.0000
|
||||
vn 0.0000 0.0000 1.0000
|
||||
vn 0.0000 -1.0000 0.0000
|
||||
vn 0.0000 1.0000 0.0000
|
||||
vn -0.8190 0.5738 0.0000
|
||||
vn -0.7959 0.6055 0.0000
|
||||
vn 0.0000 0.1258 0.9921
|
||||
vn 0.0000 0.1074 -0.9942
|
||||
vn -0.9796 0.2008 0.0000
|
||||
vn 0.9863 0.1652 0.0000
|
||||
vn -0.4588 0.1881 -0.8684
|
||||
vn 0.0000 0.9998 0.0208
|
||||
vn 0.5341 0.1790 -0.8263
|
||||
vn -0.5151 0.2112 0.8307
|
||||
vn 0.0000 0.9998 -0.0178
|
||||
vn 0.5924 0.1985 0.7808
|
||||
vn -0.7546 0.6562 0.0000
|
||||
vn 0.8190 0.5738 0.0000
|
||||
vn 0.7959 0.6055 0.0000
|
||||
vn 0.7546 0.6562 0.0000
|
||||
usemtl None
|
||||
s off
|
||||
f 41/1/1 58/2/1 4/3/1 3/4/1
|
||||
f 77/5/2 90/6/2 8/7/2 7/8/2
|
||||
f 59/9/3 76/10/3 6/11/3 5/12/3
|
||||
f 91/13/4 104/14/4 2/15/4 1/16/4
|
||||
f 224/17/5 59/18/5 5/19/5 97/20/5
|
||||
f 161/21/6 50/22/6 2/23/6 104/24/6
|
||||
f 9/25/1 10/26/1 12/27/1 11/28/1
|
||||
f 239/29/2 240/30/2 16/31/2 15/32/2
|
||||
f 15/33/3 16/34/3 14/35/3 13/36/3
|
||||
f 241/37/4 242/38/4 10/39/4 9/40/4
|
||||
f 239/41/5 15/42/5 13/43/5 241/44/5
|
||||
f 240/45/7 12/46/7 10/47/7 242/48/7
|
||||
f 249/49/7 21/50/7 23/51/7 247/52/7
|
||||
f 250/53/5 18/54/5 20/55/5 248/56/5
|
||||
f 248/57/4 247/58/4 23/59/4 24/60/4
|
||||
f 18/61/3 17/62/3 19/63/3 20/64/3
|
||||
f 250/65/2 249/66/2 17/67/2 18/68/2
|
||||
f 24/69/1 23/70/1 21/71/1 22/72/1
|
||||
f 25/73/1 26/74/1 28/75/1 27/76/1
|
||||
f 251/77/2 252/78/2 32/79/2 31/80/2
|
||||
f 31/81/3 32/82/3 30/83/3 29/84/3
|
||||
f 253/85/4 254/86/4 26/74/4 25/73/4
|
||||
f 251/87/5 31/81/5 29/88/5 253/89/5
|
||||
f 252/90/8 28/91/8 26/92/8 254/93/8
|
||||
f 33/94/1 34/95/1 36/96/1 35/97/1
|
||||
f 243/98/2 244/99/2 40/100/2 39/101/2
|
||||
f 39/102/3 40/103/3 38/104/3 37/105/3
|
||||
f 245/106/4 246/107/4 34/108/4 33/109/4
|
||||
f 243/110/5 39/111/5 37/112/5 245/113/5
|
||||
f 244/114/7 36/115/7 34/116/7 246/117/7
|
||||
f 84/118/6 4/119/6 58/120/6 105/121/6
|
||||
f 105/121/6 58/120/6 57/122/6 112/123/6
|
||||
f 112/123/6 57/122/6 56/124/6 119/125/6
|
||||
f 119/125/9 56/124/9 55/126/9 126/127/9
|
||||
f 126/127/6 55/126/6 54/128/6 133/129/6
|
||||
f 133/129/6 54/128/6 53/130/6 140/131/6
|
||||
f 140/131/10 53/130/10 52/132/10 147/133/10
|
||||
f 147/133/6 52/132/6 51/134/6 154/135/6
|
||||
f 154/135/6 51/134/6 50/22/6 161/21/6
|
||||
f 77/136/5 7/137/5 67/138/5 168/139/5
|
||||
f 168/139/5 67/138/5 66/140/5 175/141/5
|
||||
f 175/141/5 66/140/5 65/142/5 182/143/5
|
||||
f 182/143/5 65/142/5 64/144/5 189/145/5
|
||||
f 189/145/5 64/144/5 63/146/5 196/147/5
|
||||
f 196/147/5 63/146/5 62/148/5 203/149/5
|
||||
f 203/149/5 62/148/5 61/150/5 210/151/5
|
||||
f 210/151/5 61/150/5 60/152/5 217/153/5
|
||||
f 217/153/5 60/152/5 59/18/5 224/17/5
|
||||
f 7/8/3 8/7/3 68/154/3 67/155/3
|
||||
f 67/155/3 68/154/3 69/156/3 66/157/3
|
||||
f 66/157/3 69/156/3 70/158/3 65/159/3
|
||||
f 65/159/3 70/158/3 71/160/3 64/161/3
|
||||
f 64/161/3 71/160/3 72/162/3 63/163/3
|
||||
f 63/163/3 72/162/3 73/164/3 62/165/3
|
||||
f 62/165/3 73/164/3 74/166/3 61/167/3
|
||||
f 61/167/3 74/166/3 75/168/3 60/169/3
|
||||
f 60/169/3 75/168/3 76/10/3 59/9/3
|
||||
f 1/170/1 2/171/1 50/172/1 49/173/1
|
||||
f 49/173/1 50/172/1 51/174/1 48/175/1
|
||||
f 48/175/1 51/174/1 52/176/1 47/177/1
|
||||
f 47/177/1 52/176/1 53/178/1 46/179/1
|
||||
f 46/179/1 53/178/1 54/180/1 45/181/1
|
||||
f 45/181/1 54/180/1 55/182/1 44/183/1
|
||||
f 44/183/1 55/182/1 56/184/1 43/185/1
|
||||
f 43/185/1 56/184/1 57/186/1 42/187/1
|
||||
f 42/187/1 57/186/1 58/2/1 41/1/1
|
||||
f 48/188/5 223/189/5 230/190/5 49/191/5
|
||||
f 223/189/5 222/192/5 229/193/5 230/190/5
|
||||
f 222/192/5 221/194/5 228/195/5 229/193/5
|
||||
f 221/194/5 220/196/5 227/197/5 228/195/5
|
||||
f 220/196/5 219/198/5 226/199/5 227/197/5
|
||||
f 219/198/5 218/200/5 225/201/5 226/199/5
|
||||
f 218/200/5 217/153/5 224/17/5 225/201/5
|
||||
f 47/202/5 216/203/5 223/189/5 48/188/5
|
||||
f 216/203/5 215/204/5 222/192/5 223/189/5
|
||||
f 215/204/5 214/205/5 221/194/5 222/192/5
|
||||
f 214/205/5 213/206/5 220/196/5 221/194/5
|
||||
f 213/206/5 212/207/5 219/198/5 220/196/5
|
||||
f 212/207/5 211/208/5 218/200/5 219/198/5
|
||||
f 211/208/5 210/151/5 217/153/5 218/200/5
|
||||
f 46/209/5 209/210/5 216/203/5 47/202/5
|
||||
f 209/210/5 208/211/5 215/204/5 216/203/5
|
||||
f 208/211/5 207/212/5 214/205/5 215/204/5
|
||||
f 207/212/5 206/213/5 213/206/5 214/205/5
|
||||
f 206/213/5 205/214/5 212/207/5 213/206/5
|
||||
f 205/214/5 204/215/5 211/208/5 212/207/5
|
||||
f 204/215/5 203/149/5 210/151/5 211/208/5
|
||||
f 45/216/5 202/217/5 209/210/5 46/209/5
|
||||
f 202/217/5 201/218/5 208/211/5 209/210/5
|
||||
f 201/218/5 200/219/5 207/212/5 208/211/5
|
||||
f 200/219/5 199/220/5 206/213/5 207/212/5
|
||||
f 199/220/5 198/221/5 205/214/5 206/213/5
|
||||
f 198/221/5 197/222/5 204/215/5 205/214/5
|
||||
f 197/222/5 196/147/5 203/149/5 204/215/5
|
||||
f 44/223/5 195/224/5 202/217/5 45/216/5
|
||||
f 195/224/5 194/225/5 201/218/5 202/217/5
|
||||
f 194/225/5 193/226/5 200/219/5 201/218/5
|
||||
f 193/226/5 192/227/5 199/220/5 200/219/5
|
||||
f 192/227/5 191/228/5 198/221/5 199/220/5
|
||||
f 191/228/5 190/229/5 197/222/5 198/221/5
|
||||
f 190/229/5 189/145/5 196/147/5 197/222/5
|
||||
f 43/230/5 188/231/5 195/224/5 44/223/5
|
||||
f 188/231/5 187/232/5 194/225/5 195/224/5
|
||||
f 187/232/5 186/233/5 193/226/5 194/225/5
|
||||
f 186/233/5 185/234/5 192/227/5 193/226/5
|
||||
f 185/234/5 184/235/5 191/228/5 192/227/5
|
||||
f 184/235/5 183/236/5 190/229/5 191/228/5
|
||||
f 183/236/5 182/143/5 189/145/5 190/229/5
|
||||
f 42/237/5 181/238/5 188/231/5 43/230/5
|
||||
f 181/238/5 180/239/5 187/232/5 188/231/5
|
||||
f 180/239/5 179/240/5 186/233/5 187/232/5
|
||||
f 179/240/5 178/241/5 185/234/5 186/233/5
|
||||
f 178/241/5 177/242/5 184/235/5 185/234/5
|
||||
f 177/242/5 176/243/5 183/236/5 184/235/5
|
||||
f 176/243/5 175/141/5 182/143/5 183/236/5
|
||||
f 41/244/5 174/245/5 181/238/5 42/237/5
|
||||
f 174/245/5 173/246/5 180/239/5 181/238/5
|
||||
f 173/246/5 172/247/5 179/240/5 180/239/5
|
||||
f 172/247/5 171/248/5 178/241/5 179/240/5
|
||||
f 171/248/5 170/249/5 177/242/5 178/241/5
|
||||
f 170/249/5 169/250/5 176/243/5 177/242/5
|
||||
f 169/250/5 168/139/5 175/141/5 176/243/5
|
||||
f 3/251/5 83/252/5 174/245/5 41/244/5
|
||||
f 83/252/5 82/253/5 173/246/5 174/245/5
|
||||
f 82/253/5 81/254/5 172/247/5 173/246/5
|
||||
f 81/254/5 80/255/5 171/248/5 172/247/5
|
||||
f 80/255/5 79/256/5 170/249/5 171/248/5
|
||||
f 79/256/5 78/257/5 169/250/5 170/249/5
|
||||
f 78/257/5 77/136/5 168/139/5 169/250/5
|
||||
f 75/258/6 160/259/6 167/260/6 76/261/6
|
||||
f 160/259/6 159/262/6 166/263/6 167/260/6
|
||||
f 159/262/11 158/264/11 165/265/11 166/263/11
|
||||
f 158/264/6 157/266/6 164/267/6 165/265/6
|
||||
f 157/266/6 156/268/6 163/269/6 164/267/6
|
||||
f 156/268/12 155/270/12 162/271/12 163/269/12
|
||||
f 155/270/6 154/135/6 161/21/6 162/271/6
|
||||
f 74/272/6 153/273/6 160/259/6 75/258/6
|
||||
f 153/273/6 152/274/6 159/262/6 160/259/6
|
||||
f 152/274/11 151/275/11 158/264/11 159/262/11
|
||||
f 151/275/6 150/276/6 157/266/6 158/264/6
|
||||
f 150/276/6 149/277/6 156/268/6 157/266/6
|
||||
f 149/277/12 148/278/12 155/270/12 156/268/12
|
||||
f 148/278/6 147/133/6 154/135/6 155/270/6
|
||||
f 73/279/10 146/280/10 153/273/10 74/272/10
|
||||
f 146/280/10 145/281/10 152/274/10 153/273/10
|
||||
f 145/281/13 144/282/13 151/275/13 152/274/13
|
||||
f 144/282/14 143/283/14 150/276/14 151/275/14
|
||||
f 143/283/14 142/284/14 149/277/14 150/276/14
|
||||
f 142/284/15 141/285/15 148/278/15 149/277/15
|
||||
f 141/285/10 140/131/10 147/133/10 148/278/10
|
||||
f 72/286/6 139/287/6 146/280/6 73/279/6
|
||||
f 139/287/6 138/288/6 145/281/6 146/280/6
|
||||
f 138/288/6 137/289/6 144/282/6 145/281/6
|
||||
f 137/289/6 136/290/6 143/283/6 144/282/6
|
||||
f 136/290/6 135/291/6 142/284/6 143/283/6
|
||||
f 135/291/6 134/292/6 141/285/6 142/284/6
|
||||
f 134/292/6 133/129/6 140/131/6 141/285/6
|
||||
f 71/293/6 132/294/6 139/287/6 72/286/6
|
||||
f 132/294/6 131/295/6 138/288/6 139/287/6
|
||||
f 131/295/6 130/296/6 137/289/6 138/288/6
|
||||
f 130/296/6 129/297/6 136/290/6 137/289/6
|
||||
f 129/297/6 128/298/6 135/291/6 136/290/6
|
||||
f 128/298/6 127/299/6 134/292/6 135/291/6
|
||||
f 127/299/6 126/127/6 133/129/6 134/292/6
|
||||
f 70/300/9 125/301/9 132/294/9 71/293/9
|
||||
f 125/301/9 124/302/9 131/295/9 132/294/9
|
||||
f 124/302/16 123/303/16 130/296/16 131/295/16
|
||||
f 123/303/17 122/304/17 129/297/17 130/296/17
|
||||
f 122/304/17 121/305/17 128/298/17 129/297/17
|
||||
f 121/305/18 120/306/18 127/299/18 128/298/18
|
||||
f 120/306/9 119/125/9 126/127/9 127/299/9
|
||||
f 69/307/6 118/308/6 125/301/6 70/300/6
|
||||
f 118/308/6 117/309/6 124/302/6 125/301/6
|
||||
f 117/309/11 116/310/11 123/303/11 124/302/11
|
||||
f 116/310/6 115/311/6 122/304/6 123/303/6
|
||||
f 115/311/6 114/312/6 121/305/6 122/304/6
|
||||
f 114/312/12 113/313/12 120/306/12 121/305/12
|
||||
f 113/313/6 112/123/6 119/125/6 120/306/6
|
||||
f 68/314/6 111/315/6 118/308/6 69/307/6
|
||||
f 111/315/6 110/316/6 117/309/6 118/308/6
|
||||
f 110/316/11 109/317/11 116/310/11 117/309/11
|
||||
f 109/317/6 108/318/6 115/311/6 116/310/6
|
||||
f 108/318/6 107/319/6 114/312/6 115/311/6
|
||||
f 107/319/12 106/320/12 113/313/12 114/312/12
|
||||
f 106/320/6 105/121/6 112/123/6 113/313/6
|
||||
f 8/321/6 90/322/6 111/315/6 68/314/6
|
||||
f 90/322/6 89/323/6 110/316/6 111/315/6
|
||||
f 89/323/11 88/324/11 109/317/11 110/316/11
|
||||
f 88/324/6 87/325/6 108/318/6 109/317/6
|
||||
f 87/325/6 86/326/6 107/319/6 108/318/6
|
||||
f 86/326/12 85/327/12 106/320/12 107/319/12
|
||||
f 85/327/6 84/118/6 105/121/6 106/320/6
|
||||
f 76/261/6 167/260/6 98/328/6 6/329/6
|
||||
f 167/260/6 166/263/6 99/330/6 98/328/6
|
||||
f 166/263/11 165/265/11 100/331/11 99/330/11
|
||||
f 165/265/6 164/267/6 101/332/6 100/331/6
|
||||
f 164/267/6 163/269/6 102/333/6 101/332/6
|
||||
f 163/269/12 162/271/12 103/334/12 102/333/12
|
||||
f 162/271/6 161/21/6 104/24/6 103/334/6
|
||||
f 49/191/5 230/190/5 91/335/5 1/336/5
|
||||
f 230/190/5 229/193/5 92/337/5 91/335/5
|
||||
f 229/193/5 228/195/5 93/338/5 92/337/5
|
||||
f 228/195/5 227/197/5 94/339/5 93/338/5
|
||||
f 227/197/5 226/199/5 95/340/5 94/339/5
|
||||
f 226/199/5 225/201/5 96/341/5 95/340/5
|
||||
f 225/201/5 224/17/5 97/20/5 96/341/5
|
||||
f 5/342/4 6/343/4 98/344/4 97/345/4
|
||||
f 97/345/4 98/344/4 99/346/4 96/347/4
|
||||
f 96/347/4 99/346/4 100/348/4 95/349/4
|
||||
f 95/349/4 100/348/4 101/350/4 94/351/4
|
||||
f 94/351/4 101/350/4 102/352/4 93/353/4
|
||||
f 93/353/4 102/352/4 103/354/4 92/355/4
|
||||
f 92/355/4 103/354/4 104/14/4 91/13/4
|
||||
f 3/356/2 4/357/2 84/358/2 83/359/2
|
||||
f 83/359/2 84/358/2 85/360/2 82/361/2
|
||||
f 82/361/2 85/360/2 86/362/2 81/363/2
|
||||
f 81/363/2 86/362/2 87/364/2 80/365/2
|
||||
f 80/365/2 87/364/2 88/366/2 79/367/2
|
||||
f 79/367/2 88/366/2 89/368/2 78/369/2
|
||||
f 78/369/2 89/368/2 90/6/2 77/5/2
|
||||
f 231/370/1 232/371/1 234/372/1 233/373/1
|
||||
f 255/374/2 256/375/2 238/376/2 237/377/2
|
||||
f 237/378/3 238/379/3 236/380/3 235/381/3
|
||||
f 257/382/4 258/383/4 232/384/4 231/385/4
|
||||
f 255/386/5 237/378/5 235/387/5 257/388/5
|
||||
f 256/389/19 234/390/19 232/391/19 258/392/19
|
||||
f 16/393/20 240/45/20 242/48/20 14/394/20
|
||||
f 11/395/5 239/41/5 241/44/5 9/396/5
|
||||
f 13/397/4 14/398/4 242/38/4 241/37/4
|
||||
f 11/399/2 12/400/2 240/30/2 239/29/2
|
||||
f 40/401/20 244/114/20 246/117/20 38/402/20
|
||||
f 35/403/5 243/110/5 245/113/5 33/404/5
|
||||
f 37/405/4 38/406/4 246/107/4 245/106/4
|
||||
f 35/407/2 36/408/2 244/99/2 243/98/2
|
||||
f 22/409/2 21/410/2 249/66/2 250/65/2
|
||||
f 20/411/4 19/412/4 247/58/4 248/57/4
|
||||
f 22/413/5 250/53/5 248/56/5 24/414/5
|
||||
f 17/415/20 249/49/20 247/52/20 19/416/20
|
||||
f 32/417/21 252/90/21 254/93/21 30/418/21
|
||||
f 27/419/5 251/87/5 253/89/5 25/420/5
|
||||
f 29/421/4 30/422/4 254/86/4 253/85/4
|
||||
f 27/423/2 28/424/2 252/78/2 251/77/2
|
||||
f 238/425/22 256/389/22 258/392/22 236/426/22
|
||||
f 233/427/5 255/386/5 257/388/5 231/428/5
|
||||
f 235/429/4 236/430/4 258/383/4 257/382/4
|
||||
f 233/431/2 234/432/2 256/375/2 255/374/2
|
|
@ -1,36 +0,0 @@
|
|||
--[[
|
||||
Minetest Money
|
||||
Author: Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
player_money = {}
|
||||
local loaded = false
|
||||
|
||||
--saves data
|
||||
minetest.register_on_shutdown(function()
|
||||
local save_data = minetest.write_json(player_money)
|
||||
local save_path = minetest.get_worldpath() .. DIR_DELIM .. "save_data.json"
|
||||
minetest.safe_file_write(save_path, save_data)
|
||||
end)
|
||||
|
||||
--loads data and gives the player money
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
if loaded == false then
|
||||
local file = io.open(minetest.get_worldpath() .. DIR_DELIM .. "save_data.json", "r")
|
||||
if file then
|
||||
local data = minetest.parse_json(file:read "*a")
|
||||
if data then
|
||||
player_money = data
|
||||
else
|
||||
minetest.log("error", "Failed to read save_data.json")
|
||||
end
|
||||
io.close(file)
|
||||
end
|
||||
loaded = true
|
||||
end
|
||||
if not player_money[name] then
|
||||
player_money[name] = 1000
|
||||
end
|
||||
end)
|
After Width: | Height: | Size: 82 KiB |
|
@ -1,111 +0,0 @@
|
|||
--[[
|
||||
Shop Menu
|
||||
Author: Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
local index = 1
|
||||
local item_buttons = {}
|
||||
local item_btn_keys = {}
|
||||
local loaded = false
|
||||
|
||||
local items_for_sale = {
|
||||
["Collector"] = "minegistics:Collector",
|
||||
["Factory"] = "minegistics:Factory",
|
||||
["Town"] = "minegistics:town",
|
||||
["Warehouse"] = "minegistics:Warehouse",
|
||||
["Market"] = "minegistics:Market",
|
||||
["Rail"] = "carts:rail",
|
||||
["Powered Rail"] = "carts:powerrail",
|
||||
["Brake Rail"] = "carts:brakerail",
|
||||
["Cart"] = "carts:cart"
|
||||
}
|
||||
local item_prices = {
|
||||
["Collector"] = 2000,
|
||||
["Factory"] = 1000,
|
||||
["Town"] = 1000,
|
||||
["Warehouse"] = 1000,
|
||||
["Market"] = 5000,
|
||||
["Rail"] = 100,
|
||||
["Powered Rail"] = 500,
|
||||
["Brake Rail"] = 100,
|
||||
["Cart"] = 1000
|
||||
}
|
||||
|
||||
--defines the inventory formspec
|
||||
local function inventory_formspec(player)
|
||||
local formspec = {
|
||||
"size[8,7.5]",
|
||||
"bgcolor[#353535;false]",
|
||||
"list[current_player;main;0,3.5;8,4;]",
|
||||
"list[current_player;craft;3,0;3,3;]",
|
||||
"list[current_player;craftpreview;7,1;1,1;]",
|
||||
"button[0.5,1;2,0.5;Shop;Shop]"
|
||||
}
|
||||
return formspec
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
if loaded == false then
|
||||
for item_name,item in pairs(items_for_sale) do
|
||||
item_buttons[index] = "button[3," ..
|
||||
index .. ";4,2;" .. item_name ..
|
||||
";" .. item_name .. "]" ..
|
||||
"item_image[7," .. index + 0.6 ..
|
||||
";0.6,0.6;" .. item .. "]" ..
|
||||
"label[8," .. index + 0.6 .. ";" .. " $" ..
|
||||
item_prices[item_name] .."]"
|
||||
item_btn_keys[item_name] = item
|
||||
index = index + 1
|
||||
end
|
||||
loaded = true
|
||||
end
|
||||
local formspec = inventory_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
end)
|
||||
|
||||
--defines the shop formspec
|
||||
function shop_formspec(player)
|
||||
local formspec = {
|
||||
"size[10,16]",
|
||||
"bgcolor[#353535;false]",
|
||||
table.concat(item_buttons),
|
||||
"label[3.5,11.5;".."Your balance: $" .. player_money[player:get_player_name()].."]",
|
||||
"button[3,13;4,2;Back;Back]"
|
||||
}
|
||||
return formspec
|
||||
end
|
||||
|
||||
--handles clicked buttons
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "" then return end
|
||||
local player_name = player:get_player_name()
|
||||
for key, val in pairs(fields) do
|
||||
if key == "Shop" then
|
||||
local formspec = shop_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
elseif key == "Back" then
|
||||
local formspec = inventory_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
else
|
||||
for item_name,item in pairs(item_btn_keys) do
|
||||
if key == item_name then
|
||||
local item = ItemStack(item)
|
||||
if player_money[player_name] >= item_prices[item_name] then
|
||||
if player:get_inventory():add_item("main", item) then
|
||||
player_money[player_name] = player_money[player_name] - item_prices[item_name]
|
||||
minetest.chat_send_player(
|
||||
player_name,"You bought a " .. item_name .. "! " ..
|
||||
"$" .. player_money[player_name] .. " remaining."
|
||||
)
|
||||
local formspec = shop_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(player_name, "You can't afford that!")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
|
@ -0,0 +1,165 @@
|
|||
--[[
|
||||
Minegistics
|
||||
logalog
|
||||
Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
money = 100
|
||||
local item_buttons = {}
|
||||
local item_btn_keys = {}
|
||||
|
||||
local items_for_sale = {
|
||||
["Collector"] = "minegistics:Collector",
|
||||
["Power Plant"] = "minegistics:PowerPlant",
|
||||
["Factory"] = "minegistics:Factory",
|
||||
["Town"] = "minegistics:Town",
|
||||
["Warehouse"] = "minegistics:Warehouse",
|
||||
["Market"] = "minegistics:Market",
|
||||
["Rail"] = "minegistics_trains:rail",
|
||||
["Powered Rail"] = "minegistics_trains:powerrail",
|
||||
["Brake Rail"] = "minegistics_trains:brakerail",
|
||||
["Train"] = "minegistics_trains:train"
|
||||
}
|
||||
item_prices = {
|
||||
["Collector"] = 300,
|
||||
["Factory"] = 400,
|
||||
["Town"] = 200,
|
||||
["Warehouse"] = 100,
|
||||
["Market"] = 500,
|
||||
["Rail"] = 20,
|
||||
["Powered Rail"] = 200,
|
||||
["Brake Rail"] = 40,
|
||||
["Train"] = 100,
|
||||
["Power Plant"] = 350
|
||||
}
|
||||
|
||||
--defines the inventory formspec
|
||||
function inventory_formspec(player)
|
||||
local power_check = power_display == true and "#" or ""
|
||||
local formspec = {
|
||||
"size[8,7.5]",
|
||||
"bgcolor[#2d2d2d;false]",
|
||||
"list[current_player;main;0,3.5;8,4;]",
|
||||
"button[3,0.9;2,0.5;Power;Power " .. power_check .. "]",
|
||||
"tooltip[Power;" ..
|
||||
"View power grid status." ..
|
||||
";#353535;#FFFFFF]",
|
||||
"button[3,1.9;2,0.5;Shop;Shop]",
|
||||
"tooltip[Shop;" ..
|
||||
"Purchase buildings, trains and rails." ..
|
||||
";#353535;#FFFFFF]",
|
||||
}
|
||||
return formspec
|
||||
end
|
||||
|
||||
--defines the inventory formspec
|
||||
function power_formspec(player)
|
||||
local power_info = ""
|
||||
for index,pos in pairs(power_producers) do
|
||||
local local_consumers = 0
|
||||
local local_producers = 0
|
||||
for index,consumer in pairs(power_consumers) do
|
||||
if vector.distance(consumer, pos) < 200 then
|
||||
local_consumers = local_consumers + 1
|
||||
end
|
||||
end
|
||||
for index,producer in pairs(power_producers) do
|
||||
if vector.distance(producer, pos) < 200 then
|
||||
local_producers = local_producers + 1
|
||||
end
|
||||
end
|
||||
local stable = local_consumers <= local_producers * 5
|
||||
local stable_display = stable and "stable" or "unstable"
|
||||
power_info = power_info .. local_consumers .. " consumers and " ..
|
||||
local_producers .. " producers for power plant at (" ..
|
||||
pos.x .. ", " .. pos.y .. ", " .. pos.z .. ")" ..
|
||||
" (" .. stable_display .. ")\n"
|
||||
end
|
||||
local power_check = power_display == true and "#" or ""
|
||||
local formspec = {
|
||||
"size[11,11]",
|
||||
"bgcolor[#353535;false]",
|
||||
"label[5,0.5;Power]",
|
||||
"scroll_container[1,1;12,8;power_scroll;vertical;0.1]",
|
||||
"label[1,1;" .. power_info .. "]",
|
||||
"scroll_container_end[]",
|
||||
"button[3.5,10;4,2;Back;Back]"
|
||||
}
|
||||
return formspec
|
||||
end
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local formspec = inventory_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
end)
|
||||
|
||||
--defines the shop formspec
|
||||
function shop_formspec(player)
|
||||
item_buttons = {}
|
||||
local index = 1
|
||||
for item_name,item in pairs(items_for_sale) do
|
||||
local stack = ItemStack(item)
|
||||
item_buttons[index] = "button[3," ..
|
||||
index .. ";4,2;" .. item_name ..
|
||||
";" .. item_name .. "]" ..
|
||||
"item_image[7," .. index + 0.6 ..
|
||||
";0.6,0.6;" .. item .. "]" ..
|
||||
"tooltip[" .. item_name .. ";" ..
|
||||
stack:get_description() .. ";#353535;#FFFFFF]" ..
|
||||
"label[8," .. index + 0.6 .. ";" .. " $" ..
|
||||
item_prices[item_name] .."]"
|
||||
item_btn_keys[item_name] = item
|
||||
index = index + 1
|
||||
end
|
||||
local formspec = {
|
||||
"size[10,16]",
|
||||
"bgcolor[#353535;false]",
|
||||
"label[4.5,0.5;Shop]",
|
||||
table.concat(item_buttons),
|
||||
"label[3.5,12;".."Your balance: $" .. money.."]",
|
||||
"button[3,13;4,2;Back;Back]"
|
||||
}
|
||||
return formspec
|
||||
end
|
||||
|
||||
--handles clicked buttons
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
local player_name = player:get_player_name()
|
||||
if formname == "" then
|
||||
for key, val in pairs(fields) do
|
||||
if key == "Shop" then
|
||||
local formspec = shop_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
elseif key == "Back" then
|
||||
local formspec = inventory_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
elseif key == "Power" then
|
||||
local formspec = power_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
else
|
||||
for item_name,item in pairs(item_btn_keys) do
|
||||
if key == item_name then
|
||||
local stack = ItemStack(item)
|
||||
if item_name == "Rail" then
|
||||
stack:set_count(10)
|
||||
end
|
||||
if money >= item_prices[item_name] then
|
||||
if player:get_inventory():add_item("main", stack) then
|
||||
money = money - item_prices[item_name]
|
||||
minetest.chat_send_player(
|
||||
player_name,"You bought a " .. item_name .. "! " ..
|
||||
"$" .. money .. " remaining."
|
||||
)
|
||||
local formspec = shop_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(player_name, "You can't afford that!")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
|
@ -0,0 +1,61 @@
|
|||
--[[
|
||||
Minegistics
|
||||
logalog
|
||||
Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
resources = {
|
||||
"basenodes:coal_lump",
|
||||
"basenodes:copper_lump",
|
||||
"basenodes:tin_lump",
|
||||
"basenodes:iron_lump",
|
||||
"basenodes:gold_lump"
|
||||
}
|
||||
|
||||
products = {
|
||||
["basenodes:coal_lump"] = "minegistics:coal_product",
|
||||
["basenodes:copper_lump"] = "minegistics:copper_product",
|
||||
["basenodes:gold_lump"] = "minegistics:gold_product",
|
||||
["basenodes:iron_lump"] = "minegistics:iron_product",
|
||||
["basenodes:tin_lump"] = "minegistics:tin_product",
|
||||
}
|
||||
|
||||
item_worth = {
|
||||
["basenodes:coal_lump"] = 1,
|
||||
["basenodes:tin_lump"] = 2,
|
||||
["basenodes:copper_lump"] = 3,
|
||||
["basenodes:iron_lump"] = 4,
|
||||
["basenodes:gold_lump"] = 5,
|
||||
["minegistics:coal_product"] = 6,
|
||||
["minegistics:tin_product"] = 7,
|
||||
["minegistics:copper_product"] = 8,
|
||||
["minegistics:iron_product"] = 9,
|
||||
["minegistics:gold_product"] = 10
|
||||
}
|
||||
|
||||
minetest.register_craftitem("minegistics:coal_product", {
|
||||
description = ("Coal Product: Produced by factories."),
|
||||
inventory_image = "coal_product.png",
|
||||
groups = {coal = 1, flammable = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("minegistics:copper_product", {
|
||||
description = ("Copper Product: Produced by factories."),
|
||||
inventory_image = "copper_product.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("minegistics:tin_product", {
|
||||
description = ("Tin Product: Produced by factories."),
|
||||
inventory_image = "tin_product.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("minegistics:gold_product", {
|
||||
description = ("Gold Product: Produced by factories."),
|
||||
inventory_image = "gold_product.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("minegistics:iron_product", {
|
||||
description = ("Iron Product: Produced by factories."),
|
||||
inventory_image = "iron_product.png"
|
||||
})
|
|
@ -0,0 +1,52 @@
|
|||
--[[
|
||||
Minegistics
|
||||
logalog
|
||||
Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
local ores = {
|
||||
"basenodes:stone_with_coal",
|
||||
"basenodes:stone_with_iron",
|
||||
"basenodes:stone_with_copper",
|
||||
"basenodes:stone_with_tin",
|
||||
"basenodes:stone_with_gold"
|
||||
}
|
||||
|
||||
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||
if minp.y > 0 or maxp.y < 0 then return end
|
||||
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
||||
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
|
||||
local data = vm:get_data()
|
||||
for z = minp.z, maxp.z do
|
||||
for x = minp.x, maxp.x do
|
||||
for y = -2,-1,1 do
|
||||
local vi = area:index(x, y, z)
|
||||
local rand_gen = math.random(1,100)
|
||||
if rand_gen >= 2 then
|
||||
local rand_node = math.random(1,100)
|
||||
if rand_node >= 15 then
|
||||
data[area:index(x, y, z)] = minetest.get_content_id("basenodes:dirt_with_grass")
|
||||
else
|
||||
data[area:index(x, y, z)] = minetest.get_content_id("basenodes:stone")
|
||||
end
|
||||
else
|
||||
local rand_ore = math.random(1,100)
|
||||
if rand_ore >= 75 then
|
||||
local rand_node = math.random(1,5)
|
||||
data[area:index(x, y, z)] = minetest.get_content_id(ores[rand_node])
|
||||
else
|
||||
local rand_node = math.random(1,100)
|
||||
if rand_node >= 15 then
|
||||
data[area:index(x, y, z)] = minetest.get_content_id("basenodes:dirt_with_grass")
|
||||
else
|
||||
data[area:index(x, y, z)] = minetest.get_content_id("basenodes:stone")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
vm:set_data(data)
|
||||
vm:write_to_map(data)
|
||||
end)
|
|
@ -0,0 +1,127 @@
|
|||
--[[
|
||||
Minegistics
|
||||
logalog
|
||||
Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
power_producers = {}
|
||||
power_consumers = {}
|
||||
|
||||
minetest.register_node("minegistics:PowerPlant", {
|
||||
description = "Power Plant: Generates power. Requires coal for fuel.\n" ..
|
||||
"One power plant is needed for every 5 buildings.\n" ..
|
||||
"Must be placed within 200 meters of the buildings it powers.",
|
||||
tiles = {"buildings.png"},
|
||||
groups = {dig_immediate=2},
|
||||
drawtype = 'mesh',
|
||||
mesh = "power_plant.obj",
|
||||
wield_image = "power_plant_wield.png",
|
||||
inventory_image = "power_plant_wield.png",
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "power_plant")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 5*1)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
for i,p in pairs(power_producers) do
|
||||
if p.x == pos.x and p.y == pos.y and p.z == pos.z then
|
||||
table.remove(power_producers, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
minetest.forceload_free_block(pos, false)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
||||
|
||||
function power_stable(pos)
|
||||
local local_consumers = 0
|
||||
local local_producers = 0
|
||||
for index,consumer in pairs(power_consumers) do
|
||||
if vector.distance(consumer, pos) < 200 then
|
||||
local_consumers = local_consumers + 1
|
||||
end
|
||||
end
|
||||
for index,producer in pairs(power_producers) do
|
||||
if vector.distance(producer, pos) < 200 then
|
||||
local_producers = local_producers + 1
|
||||
end
|
||||
end
|
||||
local stable = local_consumers <= local_producers * 5
|
||||
local stable_display = stable and "stable" or "unstable"
|
||||
return stable
|
||||
end
|
||||
|
||||
function is_active(pos)
|
||||
for _,p in pairs(power_producers) do
|
||||
if p.x == pos.x and p.y == pos.y and p.z == pos.z then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:PowerPlant"},
|
||||
interval = 10,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.forceload_block(pos, false)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local has_fuel = false
|
||||
if inv:contains_item("main", "basenodes:coal_lump") then
|
||||
inv:remove_item("main", "basenodes:coal_lump")
|
||||
has_fuel = true
|
||||
end
|
||||
local active = is_active(pos)
|
||||
if has_fuel then
|
||||
if active == false then
|
||||
table.insert(power_producers, pos)
|
||||
end
|
||||
minetest.add_particlespawner({
|
||||
amount = 300,
|
||||
time = 6,
|
||||
minpos = {x=pos.x-1,y=pos.y+4,z=pos.z-1},
|
||||
maxpos = {x=pos.x+1,y=pos.y+5,z=pos.z+1},
|
||||
minvel = {x=0.1, y=0.1, z=0.1},
|
||||
maxvel = {x=0.1, y=0.2, z=0.1},
|
||||
minacc = {x=-0.1,y=0.1,z=-0.1},
|
||||
maxacc = {x=0.1,y=0.2,z=0.1},
|
||||
minexptime = 2,
|
||||
maxexptime = 4,
|
||||
minsize = 10,
|
||||
maxsize = 12,
|
||||
collisiondetection = false,
|
||||
vertical = false,
|
||||
texture = "black_smoke.png"
|
||||
})
|
||||
else
|
||||
if active == true then
|
||||
for i,p in pairs(power_producers) do
|
||||
if p.x == pos.x and p.y == pos.y and p.z == pos.z then
|
||||
table.remove(power_producers, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
|
@ -0,0 +1,354 @@
|
|||
--[[
|
||||
Minegistics
|
||||
logalog
|
||||
Droog71
|
||||
License: AGPLv3
|
||||
]]--
|
||||
|
||||
minetest.register_node("minegistics:Collector", {
|
||||
description = "Collector: Gathers resources.\n" ..
|
||||
"Place on a resource node and connect to a\n" ..
|
||||
"factory or market with rails and a train.",
|
||||
tiles = {"buildings.png"},
|
||||
groups = {dig_immediate=2},
|
||||
drawtype = 'mesh',
|
||||
mesh = "collector.obj",
|
||||
wield_image = "collector_wield.png",
|
||||
inventory_image = "collector_wield.png",
|
||||
groups = {dig_immediate=2},
|
||||
on_construct = function(pos)
|
||||
table.insert(power_consumers, pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "collector")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 5*1)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
for i,p in pairs(power_consumers) do
|
||||
if p.x == pos.x and p.y == pos.y and p.z == pos.z then
|
||||
table.remove(power_consumers, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
minetest.forceload_free_block(pos, false)
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("minegistics:Market", {
|
||||
description = "Market: Changes any item into money.\n" ..
|
||||
"Must be connected by rail to a factory or collector.\n" ..
|
||||
"Must also be connected to a town.",
|
||||
tiles = {"buildings.png"},
|
||||
groups = {dig_immediate=2},
|
||||
drawtype = 'mesh',
|
||||
mesh = "market.obj",
|
||||
wield_image = "market_wield.png",
|
||||
inventory_image = "market_wield.png",
|
||||
on_construct = function(pos)
|
||||
table.insert(power_consumers, pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "market")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 5*1)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
for i,p in pairs(power_consumers) do
|
||||
if p.x == pos.x and p.y == pos.y and p.z == pos.z then
|
||||
table.remove(power_consumers, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
minetest.forceload_free_block(pos, false)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("minegistics:Town", {
|
||||
description = "Town: Required to earn money from markets.\n" ..
|
||||
"Connect to a market with rails and add a train.",
|
||||
tiles = {"buildings.png"},
|
||||
groups = {dig_immediate=2},
|
||||
drawtype = 'mesh',
|
||||
mesh = "town.obj",
|
||||
wield_image = "town_wield.png",
|
||||
inventory_image = "town_wield.png",
|
||||
on_construct = function(pos)
|
||||
table.insert(power_consumers, pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("infotext", "town")
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
for i,p in pairs(power_consumers) do
|
||||
if p.x == pos.x and p.y == pos.y and p.z == pos.z then
|
||||
table.remove(power_consumers, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
minetest.forceload_free_block(pos, false)
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("minegistics:Warehouse", {
|
||||
description = "Warehouse: Stores items.",
|
||||
tiles = {"buildings.png"},
|
||||
groups = {dig_immediate=2},
|
||||
drawtype = 'mesh',
|
||||
mesh = "warehouse.obj",
|
||||
wield_image = "warehouse_wield.png",
|
||||
inventory_image = "warehouse_wield.png",
|
||||
on_construct = function(pos)
|
||||
table.insert(power_consumers, pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "warehouse")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 6*4)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
for i,p in pairs(power_consumers) do
|
||||
if p.x == pos.x and p.y == pos.y and p.z == pos.z then
|
||||
table.remove(power_consumers, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
minetest.forceload_free_block(pos, false)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("minegistics:Factory", {
|
||||
description = "Factory: Converts resources into products.\n" ..
|
||||
"Both can be sold but products are worth more.",
|
||||
tiles = {"buildings.png"},
|
||||
groups = {dig_immediate=2},
|
||||
drawtype = 'mesh',
|
||||
mesh = "factory.obj",
|
||||
wield_image = "factory_wield.png",
|
||||
inventory_image = "factory_wield.png",
|
||||
on_construct = function(pos)
|
||||
table.insert(power_consumers, pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "factory")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 5*1)
|
||||
end,
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
for i,p in pairs(power_consumers) do
|
||||
if p.x == pos.x and p.y == pos.y and p.z == pos.z then
|
||||
table.remove(power_consumers, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
minetest.forceload_free_block(pos, false)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
||||
|
||||
local function smoke(pos)
|
||||
local rand = math.random(1,6)
|
||||
minetest.after(rand, function()
|
||||
minetest.add_particlespawner({
|
||||
amount = 300,
|
||||
time = 3,
|
||||
minpos = {x=pos.x-0.5,y=pos.y+4,z=pos.z-0.5},
|
||||
maxpos = {x=pos.x+0.5,y=pos.y+5,z=pos.z+0.5},
|
||||
minvel = {x=0.1, y=0.1, z=0.1},
|
||||
maxvel = {x=0.1, y=0.2, z=0.1},
|
||||
minacc = {x=-0.1,y=0.1,z=-0.1},
|
||||
maxacc = {x=0.1,y=0.2,z=0.1},
|
||||
minexptime = 1,
|
||||
maxexptime = 2,
|
||||
minsize = 10,
|
||||
maxsize = 12,
|
||||
collisiondetection = false,
|
||||
vertical = false,
|
||||
texture = "dirt.png"
|
||||
})
|
||||
end)
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
interval = 10,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.forceload_block(pos, false)
|
||||
if power_stable(pos) then
|
||||
local under = vector.new(pos.x, pos.y - 1, pos.z)
|
||||
for node,ore in pairs(base_ores) do
|
||||
if minetest.get_node(under).name == node then
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
local stack = ItemStack(ore)
|
||||
stack:set_count(10)
|
||||
if inv:add_item("main", stack) then
|
||||
smoke(pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
--converts resources into money
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Market"},
|
||||
interval = 10,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.forceload_block(pos, false)
|
||||
if power_stable(pos) then
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
meta:set_int("has_town", 0)
|
||||
local items = {}
|
||||
local lumps = {}
|
||||
for _,lump in pairs(resources) do
|
||||
lumps[lump] = ItemStack(lump)
|
||||
end
|
||||
for _,product in pairs(products) do
|
||||
items[product] = ItemStack(product)
|
||||
end
|
||||
local money_earned = 0
|
||||
local inventories = inv:get_lists()
|
||||
for name, list in pairs(inventories) do
|
||||
for index, item in pairs(lumps) do
|
||||
while inv:contains_item(name, lumps[index]) do
|
||||
inv:remove_item(name, lumps[index])
|
||||
money_earned = money_earned + item_worth[item:get_name()]
|
||||
end
|
||||
end
|
||||
for index, item in pairs(items) do
|
||||
while inv:contains_item(name, items[index]) do
|
||||
inv:remove_item(name, items[index])
|
||||
money_earned = money_earned + item_worth[item:get_name()]
|
||||
end
|
||||
end
|
||||
end
|
||||
if money_earned > 0 then
|
||||
money = math.floor(money + money_earned)
|
||||
for index,price in pairs(item_prices) do
|
||||
local increase = money_earned * 0.01
|
||||
item_prices[index] = math.floor(item_prices[index] + increase)
|
||||
end
|
||||
for _,player in pairs(minetest.get_connected_players()) do
|
||||
local spec = player:get_inventory_formspec()
|
||||
local str = string.sub(spec,48,51)
|
||||
if str == "Shop" then
|
||||
local formspec = shop_formspec(player)
|
||||
player:set_inventory_formspec(table.concat(formspec, ""))
|
||||
end
|
||||
end
|
||||
minetest.chat_send_all(
|
||||
"Earned $" .. money_earned .. " from market at " ..
|
||||
"(" .. pos.x .. ", " .. pos.y .. ", " .. pos.z .. ")"
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
--converts resources into products
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Factory"},
|
||||
interval = 10,
|
||||
chance = 1,
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
minetest.forceload_block(pos, false)
|
||||
if power_stable(pos) then
|
||||
local meta = minetest.get_meta({ x = pos.x, y = pos.y, z = pos.z })
|
||||
local inv = meta:get_inventory()
|
||||
local items = {}
|
||||
local working = false
|
||||
for _,lump in pairs(resources) do
|
||||
items[lump] = ItemStack(lump)
|
||||
end
|
||||
local inventories = inv:get_lists()
|
||||
for name, list in pairs(inventories) do
|
||||
for index, item in pairs(items) do
|
||||
while inv:contains_item(name, items[index]) do
|
||||
local item_name = items[index]:get_name()
|
||||
local item_amount = items[index]:get_count()
|
||||
local product = products[item_name]
|
||||
inv:remove_item(name, items[index])
|
||||
stack = ItemStack(product)
|
||||
stack:set_count(item_amount)
|
||||
inv:add_item("main", stack)
|
||||
working = true
|
||||
end
|
||||
end
|
||||
end
|
||||
if working then
|
||||
minetest.add_particlespawner({
|
||||
amount = 300,
|
||||
time = 3,
|
||||
minpos = {x=pos.x-2,y=pos.y+3,z=pos.z-1},
|
||||
maxpos = {x=pos.x+2,y=pos.y+6,z=pos.z+2},
|
||||
minvel = {x=0.1, y=0.1, z=0.1},
|
||||
maxvel = {x=0.2, y=0.2, z=0.2},
|
||||
minacc = {x=-0.1,y=0.1,z=-0.1},
|
||||
maxacc = {x=0.2,y=0.2,z=0.2},
|
||||
minexptime = 6,
|
||||
maxexptime = 8,
|
||||
minsize = 10,
|
||||
maxsize = 12,
|
||||
collisiondetection = false,
|
||||
vertical = false,
|
||||
texture = "smoke.png"
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
|
@ -1,308 +0,0 @@
|
|||
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
||||
if node.name == "minegistics:Collector" then
|
||||
local item = ItemStack("minegistics_structures:Collector")
|
||||
if puncher:get_inventory():add_item("main", item) then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
elseif node.name == "minegistics:Market" then
|
||||
local item = ItemStack("minegistics:Market")
|
||||
if puncher:get_inventory():add_item("main", item) then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_node("minegistics:Collector", {
|
||||
description = " Building to gather resources",
|
||||
tiles = {"minegistics_structures_collector.png"},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "collector")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 5*1)
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "Allow take: " .. stack:to_string())
|
||||
return stack:get_count()
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "On take: " .. stack:to_string())
|
||||
end,
|
||||
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
neighbors = {"basenodes:stone_with_coal"},
|
||||
interval = 1, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 node
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if inv:contains_item("main", "basenodes:coal_lump") then
|
||||
inv:add_item("main", "basenodes:coal_lump")
|
||||
else
|
||||
inv:set_stack("main", 1, "basenodes:coal_lump")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
neighbors = {"basenodes:stone_with_iron"},
|
||||
interval = 1, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 node
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if inv:contains_item("main", "basenodes:iron_lump") then
|
||||
inv:add_item("main", "basenodes:iron_lump")
|
||||
else
|
||||
inv:set_stack("main", 2, "basenodes:iron_lump")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
neighbors = {"basenodes:stone_with_copper"},
|
||||
interval = 1, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 node
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if inv:contains_item("main", "basenodes:copper_lump") then
|
||||
inv:add_item("main", "basenodes:copper_lump")
|
||||
else
|
||||
inv:set_stack("main", 3, "basenodes:copper_lump")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
neighbors = {"basenodes:stone_with_tin"},
|
||||
interval = 1, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 node
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if inv:contains_item("main", "basenodes:tin_lump") then
|
||||
inv:add_item("main", "basenodes:tin_lump")
|
||||
else
|
||||
inv:set_stack("main", 4, "basenodes:tin_lump")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
neighbors = {"basenodes:stone_with_gold"},
|
||||
interval = 1, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 node
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
if inv:contains_item("main", "basenodes:gold_lump") then
|
||||
inv:add_item("main", "basenodes:gold_lump")
|
||||
else
|
||||
inv:set_stack("main", 5, "basenodes:gold_lump")
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
neighbors = {"basenodes:cobblestone"},
|
||||
interval = 1, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 node
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta({ x = pos.x, y = pos.y, z = pos.z })
|
||||
if meta:get_int("stone") < 100 then
|
||||
meta:set_int("stone", (meta:get_int("stone") + 1))
|
||||
else
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
neighbors = {"basenodes:gravel"},
|
||||
interval = 1, -- Run every 1 seconds
|
||||
chance = 1, -- Select every 1 in 1 node
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta({ x = pos.x, y = pos.y, z = pos.z })
|
||||
if meta:get_int("gravel") < 100 then
|
||||
meta:set_int("gravel", (meta:get_int("gravel") + 1))
|
||||
else
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Collector"},
|
||||
neighbors = {"basenode:sand"},
|
||||
interval = 1, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 nodes
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local meta = minetest.get_meta({ x = pos.x, y = pos.y, z = pos.z })
|
||||
if meta:get_int("sand") < 100 then
|
||||
meta:set_int("sand", (meta:get_int("sand") + 1))
|
||||
else
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
--converts resources into money
|
||||
minetest.register_abm({
|
||||
nodenames = {"minegistics:Market"},
|
||||
interval = 10, -- Run every 1 second
|
||||
chance = 1, -- Select every 1 in 1 nodes
|
||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||
local lumps = {
|
||||
"basenodes:coal_lump",
|
||||
"basenodes:copper_lump",
|
||||
"basenodes:tin_lump",
|
||||
"basenodes:iron_lump",
|
||||
"basenodes:gold_lump"
|
||||
}
|
||||
local meta = minetest.get_meta({ x = pos.x, y = pos.y, z = pos.z })
|
||||
local inv = meta:get_inventory()
|
||||
local items = {}
|
||||
for _,lump in pairs(lumps) do
|
||||
items[lump] = ItemStack(lump)
|
||||
end
|
||||
local money_earned = 0
|
||||
local inventories = inv:get_lists()
|
||||
for name, list in pairs(inventories) do
|
||||
for index, item in pairs(items) do
|
||||
while inv:contains_item(name, items[index]) do
|
||||
inv:remove_item(name, items[index])
|
||||
money_earned = money_earned + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
if money_earned > 0 then
|
||||
for name,money in pairs(player_money) do
|
||||
player_money[name] = player_money[name] + money_earned
|
||||
minetest.chat_send_all(
|
||||
"Earned $" .. money_earned .. " from market at " ..
|
||||
"(" .. pos.x .. ", " .. pos.y .. ", " .. pos.z .. ")"
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("minegistics:Factory", {
|
||||
description = " Take resources output goods",
|
||||
tiles = {"minegistics_structures_factory.png"},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "depot")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 2*1)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("minegistics:Market", {
|
||||
description = " Building changes any resources into money",
|
||||
tiles = {"minegistics_structures_market.png"},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "depot")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 5*1)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("minegistics:town", {
|
||||
description = " Building changes specific resources into money",
|
||||
tiles = {"minegistics_structures_town.png"},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "depot")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 1*1)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_node("minegistics:Warehouse", {
|
||||
description = " Building to store any resource",
|
||||
tiles = {"minegistics_structures_warehouse.png"},
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec",
|
||||
"size[8,9]"..
|
||||
"list[current_name;main;0,0;8,4;]"..
|
||||
"list[current_player;main;0,5;8,4;]" ..
|
||||
"listring[]")
|
||||
meta:set_string("infotext", "depot")
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("main", 5*4)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return stack:get_count()
|
||||
end
|
||||
})
|
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 169 B |
After Width: | Height: | Size: 199 B |
After Width: | Height: | Size: 140 B |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 150 B |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 150 B |
After Width: | Height: | Size: 150 B |
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1019 B |
Before Width: | Height: | Size: 975 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 981 B |
Before Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 206 B |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 150 B |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 13 KiB |
|
@ -1,4 +1,4 @@
|
|||
function carts:get_sign(z)
|
||||
function trains:get_sign(z)
|
||||
if z == 0 then
|
||||
return 0
|
||||
else
|
||||
|
@ -6,7 +6,7 @@ function carts:get_sign(z)
|
|||
end
|
||||
end
|
||||
|
||||
function carts:manage_attachment(player, obj)
|
||||
function trains:manage_attachment(player, obj)
|
||||
if not player then
|
||||
return
|
||||
end
|
||||
|
@ -26,15 +26,15 @@ function carts:manage_attachment(player, obj)
|
|||
end
|
||||
end
|
||||
|
||||
function carts:velocity_to_dir(v)
|
||||
function trains:velocity_to_dir(v)
|
||||
if math.abs(v.x) > math.abs(v.z) then
|
||||
return {x=carts:get_sign(v.x), y=carts:get_sign(v.y), z=0}
|
||||
return {x=trains:get_sign(v.x), y=trains:get_sign(v.y), z=0}
|
||||
else
|
||||
return {x=0, y=carts:get_sign(v.y), z=carts:get_sign(v.z)}
|
||||
return {x=0, y=trains:get_sign(v.y), z=trains:get_sign(v.z)}
|
||||
end
|
||||
end
|
||||
|
||||
function carts:is_rail(pos, railtype)
|
||||
function trains:is_rail(pos, railtype)
|
||||
local node = minetest.get_node(pos).name
|
||||
if node == "ignore" then
|
||||
local vm = minetest.get_voxel_manip()
|
||||
|
@ -56,34 +56,34 @@ function carts:is_rail(pos, railtype)
|
|||
return minetest.get_item_group(node, "connect_to_raillike") == railtype
|
||||
end
|
||||
|
||||
function carts:check_front_up_down(pos, dir_, check_up, railtype)
|
||||
function trains:check_front_up_down(pos, dir_, check_up, railtype)
|
||||
local dir = vector.new(dir_)
|
||||
local cur
|
||||
|
||||
-- Front
|
||||
dir.y = 0
|
||||
cur = vector.add(pos, dir)
|
||||
if carts:is_rail(cur, railtype) then
|
||||
if trains:is_rail(cur, railtype) then
|
||||
return dir
|
||||
end
|
||||
-- Up
|
||||
if check_up then
|
||||
dir.y = 1
|
||||
cur = vector.add(pos, dir)
|
||||
if carts:is_rail(cur, railtype) then
|
||||
if trains:is_rail(cur, railtype) then
|
||||
return dir
|
||||
end
|
||||
end
|
||||
-- Down
|
||||
dir.y = -1
|
||||
cur = vector.add(pos, dir)
|
||||
if carts:is_rail(cur, railtype) then
|
||||
if trains:is_rail(cur, railtype) then
|
||||
return dir
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
||||
function trains:get_rail_direction(pos_, dir, old_switch, railtype)
|
||||
local pos = vector.round(pos_)
|
||||
local cur
|
||||
local left_check, right_check = true, true
|
||||
|
@ -99,7 +99,7 @@ function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
|||
right.z = -dir.x
|
||||
end
|
||||
|
||||
local straight_priority = ctrl and dir.y ~= 0
|
||||
local straight_priority = dir.y ~= 0
|
||||
|
||||
-- Normal, to disallow rail switching up- & downhill
|
||||
if straight_priority then
|
||||
|
@ -109,28 +109,6 @@ function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
|||
end
|
||||
end
|
||||
|
||||
if ctrl then
|
||||
if old_switch == 1 then
|
||||
left_check = false
|
||||
elseif old_switch == 2 then
|
||||
right_check = false
|
||||
end
|
||||
if ctrl.left and left_check then
|
||||
cur = self:check_front_up_down(pos, left, false, railtype)
|
||||
if cur then
|
||||
return cur, 1
|
||||
end
|
||||
left_check = false
|
||||
end
|
||||
if ctrl.right and right_check then
|
||||
cur = self:check_front_up_down(pos, right, false, railtype)
|
||||
if cur then
|
||||
return cur, 2
|
||||
end
|
||||
right_check = true
|
||||
end
|
||||
end
|
||||
|
||||
-- Normal
|
||||
if not straight_priority then
|
||||
cur = self:check_front_up_down(pos, dir, true, railtype)
|
||||
|
@ -141,7 +119,7 @@ function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
|||
|
||||
-- Left, if not already checked
|
||||
if left_check then
|
||||
cur = carts:check_front_up_down(pos, left, false, railtype)
|
||||
cur = trains:check_front_up_down(pos, left, false, railtype)
|
||||
if cur then
|
||||
return cur
|
||||
end
|
||||
|
@ -149,7 +127,7 @@ function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
|||
|
||||
-- Right, if not already checked
|
||||
if right_check then
|
||||
cur = carts:check_front_up_down(pos, right, false, railtype)
|
||||
cur = trains:check_front_up_down(pos, right, false, railtype)
|
||||
if cur then
|
||||
return cur
|
||||
end
|
||||
|
@ -157,7 +135,7 @@ function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
|||
|
||||
-- Backwards
|
||||
if not old_switch then
|
||||
cur = carts:check_front_up_down(pos, {
|
||||
cur = trains:check_front_up_down(pos, {
|
||||
x = -dir.x,
|
||||
y = dir.y,
|
||||
z = -dir.z
|
||||
|
@ -170,7 +148,7 @@ function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
|||
return {x=0, y=0, z=0}
|
||||
end
|
||||
|
||||
function carts:pathfinder(pos_, old_pos, old_dir, distance, ctrl,
|
||||
function trains:pathfinder(pos_, old_pos, old_dir, distance,
|
||||
pf_switch, railtype)
|
||||
|
||||
local pos = vector.round(pos_)
|
||||
|
@ -180,12 +158,12 @@ function carts:pathfinder(pos_, old_pos, old_dir, distance, ctrl,
|
|||
|
||||
local pf_pos = vector.round(old_pos)
|
||||
local pf_dir = vector.new(old_dir)
|
||||
distance = math.min(carts.path_distance_max,
|
||||
distance = math.min(trains.path_distance_max,
|
||||
math.floor(distance + 1))
|
||||
|
||||
for i = 1, distance do
|
||||
pf_dir, pf_switch = self:get_rail_direction(
|
||||
pf_pos, pf_dir, ctrl, pf_switch or 0, railtype)
|
||||
pf_pos, pf_dir, pf_switch or 0, railtype)
|
||||
|
||||
if vector.equals(pf_dir, {x=0, y=0, z=0}) then
|
||||
-- No way forwards
|
||||
|
@ -195,15 +173,15 @@ function carts:pathfinder(pos_, old_pos, old_dir, distance, ctrl,
|
|||
pf_pos = vector.add(pf_pos, pf_dir)
|
||||
|
||||
if vector.equals(pf_pos, pos) then
|
||||
-- Success! Cart moved on correctly
|
||||
-- Success! train moved on correctly
|
||||
return
|
||||
end
|
||||
end
|
||||
-- Not found. Put cart to predicted position
|
||||
-- Not found. Put train to predicted position
|
||||
return pf_pos, pf_dir
|
||||
end
|
||||
|
||||
function carts:register_rail(name, def_overwrite, railparams)
|
||||
function trains:register_rail(name, def_overwrite, railparams)
|
||||
local def = {
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
|
@ -224,13 +202,13 @@ function carts:register_rail(name, def_overwrite, railparams)
|
|||
end
|
||||
|
||||
if railparams then
|
||||
carts.railparams[name] = table.copy(railparams)
|
||||
trains.railparams[name] = table.copy(railparams)
|
||||
end
|
||||
|
||||
minetest.register_node(name, def)
|
||||
end
|
||||
|
||||
function carts:get_rail_groups(additional_groups)
|
||||
function trains:get_rail_groups(additional_groups)
|
||||
-- Get the default rail groups and add more when a table is given
|
||||
local groups = {
|
||||
dig_immediate = 2,
|
|
@ -0,0 +1,17 @@
|
|||
-- trains/init.lua
|
||||
|
||||
trains = {}
|
||||
trains.modpath = minetest.get_modpath("minegistics_trains")
|
||||
trains.railparams = {}
|
||||
|
||||
-- Maximal speed of the train in m/s (min = -1)
|
||||
trains.speed_max = 6
|
||||
-- Set to -1 to disable punching the train from inside (min = -1)
|
||||
trains.punch_speed_max = 4
|
||||
-- Maximal distance for the path correction (for dtime peaks)
|
||||
trains.path_distance_max = 3
|
||||
|
||||
|
||||
dofile(trains.modpath.."/functions.lua")
|
||||
dofile(trains.modpath.."/rails.lua")
|
||||
dofile(trains.modpath.."/train_entity.lua")
|
|
@ -0,0 +1,30 @@
|
|||
-- trains/rails.lua
|
||||
|
||||
trains:register_rail("minegistics_trains:rail", {
|
||||
description = ("Rail: For trains."),
|
||||
tiles = {
|
||||
"trains_rail_straight.png", "trains_rail_curved.png",
|
||||
"trains_rail_t_junction.png", "trains_rail_crossing.png"
|
||||
},
|
||||
inventory_image = "trains_rail_straight.png",
|
||||
wield_image = "trains_rail_straight.png",
|
||||
groups = trains:get_rail_groups(),
|
||||
}, {})
|
||||
|
||||
trains:register_rail("minegistics_trains:powerrail", {
|
||||
description = ("Powered Rail: Increases the speed of a train."),
|
||||
tiles = {
|
||||
"trains_rail_straight_pwr.png", "trains_rail_curved_pwr.png",
|
||||
"trains_rail_t_junction_pwr.png", "trains_rail_crossing_pwr.png"
|
||||
},
|
||||
groups = trains:get_rail_groups(),
|
||||
}, {acceleration = 5})
|
||||
|
||||
trains:register_rail("minegistics_trains:brakerail", {
|
||||
description = ("Brake Rail: Reduces the speed of a train."),
|
||||
tiles = {
|
||||
"trains_rail_straight_brk.png", "trains_rail_curved_brk.png",
|
||||
"trains_rail_t_junction_brk.png", "trains_rail_crossing_brk.png"
|
||||
},
|
||||
groups = trains:get_rail_groups(),
|
||||
}, {acceleration = -3})
|
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 524 B |
After Width: | Height: | Size: 602 B |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 578 B |
After Width: | Height: | Size: 566 B |
After Width: | Height: | Size: 517 B |
After Width: | Height: | Size: 602 B |
After Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 649 B |
After Width: | Height: | Size: 681 B |
After Width: | Height: | Size: 655 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 587 B |