Skip to content

Commit

Permalink
science updates
Browse files Browse the repository at this point in the history
  • Loading branch information
PyroFire232 committed Jul 24, 2019
1 parent 84e7a96 commit 75991d0
Show file tree
Hide file tree
Showing 7 changed files with 1,204 additions and 70 deletions.
26 changes: 22 additions & 4 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ function tpcls.se() local c=warptorio.corn.se warptorio.SpawnTurretTeleporter("s

function warptorio.BuildPlatform() local m=gwarptorio.Floors.main local f=m:GetSurface() local z=m.z
local lv=(gwarptorio.Research["platform-size"] or 0)
for k,v in pairs(f.find_entities_filtered{type="character",invert=true,area={{-z/2,-z/2},{z/2,z/2}}})do
for k,v in pairs(f.find_entities_filtered{type="character",invert=true,area={{math.floor(-z/2),math.floor(-z/2)},{(z/2)-1,(z/2)-1}}})do
if(not v.last_user and v.name:sub(1,9)~="warptorio")then v.destroy() end
end
warptorio.LayFloor("warp-tile",f,math.floor(-z/2),math.floor(-z/2),z,z,true) -- main platform
Expand Down Expand Up @@ -667,7 +667,7 @@ function warptorio.BuildB2() local m=gwarptorio.Floors.b2 local f,z=m:GetSurface
end

warptorio.LayFloor("hazard-concrete-left",f,vx,4,vw,3) -- entrance
--warptorio.LayFloor("hazard-concrete-left",f,-3,-3,5,5) -- old center
warptorio.LayFloor("hazard-concrete-left",f,-2,-2,3,3) -- old center
warptorio.playsound("warp_in",f.name)
end

Expand Down Expand Up @@ -964,6 +964,12 @@ upcs["factory-beacon"]=function(lv,f) local m=gwarptorio.Floors.b1 local inv={}
warptorio.playsound("warp_in",m:GetSurface().name)
end

upcs["boiler-station"]=function(lv,f) local m=gwarptorio.Floors.b2
if(m.station and m.station.valid)then return end
warptorio.cleanbbox(m:GetSurface(),-2,-2,1,1) m.station=warptorio.SpawnEntity(m:GetSurface(),"warptorio-warpstation",-1,-1) m.station.minable=false m.station.destructible=false
warptorio.playsound("warp_in",m:GetSurface().name)
end

upcs["reactor"]=function(lv) local m=gwarptorio.Floors.main warptorio.playsound("warp_in",m:GetSurface().name)
if(lv>=6 and not gwarptorio.warp_reactor)then
local f=m:GetSurface()
Expand Down Expand Up @@ -1022,6 +1028,8 @@ ups["warptorio-boiler-5"] = {"boiler-size",function() return 56 end}
ups["warptorio-boiler-6"] = {"boiler-size",function() return 64 end}
ups["warptorio-boiler-7"] = {"boiler-size",function() return 72 end}

ups["warptorio-boiler-station"] = {"boiler-station"}

ups["warptorio-reactor-1"] = {"reactor"}
ups["warptorio-reactor-2"] = {"reactor"}
ups["warptorio-reactor-3"] = {"reactor"}
Expand Down Expand Up @@ -1314,8 +1322,8 @@ function warptorio.InitFloors() -- init_floors(f)
local z=m.OuterSize
m:SetSize(m.OuterSize)

warptorio.BuildPlatform(z)
warptorio.cleanbbox(f,math.floor(-z/2),math.floor(-z/2),z-1,z-1)
warptorio.BuildPlatform()
--warptorio.cleanbbox(f,math.floor(-z/2),math.floor(-z/2),z-1,z-1)

local m=new(FLOOR,"b1",17)
local f=m:BuildSurface("warpfloor-b1")
Expand Down Expand Up @@ -1597,3 +1605,13 @@ function warptorio.Initialize()
end script.on_init(warptorio.Initialize)




local cheatItems={["roboport"]=10,["construction-robot"]=50,["logistic-chest-passive-provider"]=50,["logistic-chest-requester"]=50,["red-wire"]=100,["pipe"]=200,
["iron-plate"]=400,["copper-plate"]=300,["wood"]=300,["electronic-circuit"]=400,["stone"]=100,["steel-plate"]=200,["pipe-to-ground"]=50,
["transport-belt"]=400,
}

function warptorio.cheat() for i,p in pairs(game.players)do for k,v in pairs(cheatItems)do p.get_main_inventory().insert{name=k,count=v} end end end
remote.add_interface("warptorio",{cheat=warptorio.cheat})
--remote.call("warptorio","cheat")
316 changes: 253 additions & 63 deletions data.lua

Large diffs are not rendered by default.

266 changes: 266 additions & 0 deletions data_warptorio-logistics-pipe.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
local rtint={r=0.5,g=0.5,b=1,a=1}
local rctint=rtint --{r=0.39,g=0,b=0,a=1}

data:extend{

{
icons = {{icon="__base__/graphics/icons/pipe-to-ground.png",tint=rtint}},
icon_size = 32,
name = "warptorio-logistics-pipe",
order = "a[pipe]-b[pipe-to-ground]",
place_result = "warptorio-logistics-pipe",
stack_size = 50,
subgroup = "energy-pipe-distribution",
type = "item"
},


{
collision_box = {
{
-0.29,
-0.29
},
{
0.29,
0.2
}
},
corpse = "pipe-remnants",
fast_replaceable_group = "pipe",
flags = {
"placeable-neutral",
"player-creation"
},
fluid_box = {
base_area = 50,
pipe_connections = {
{
position = {
0,
-1
}
}
},


pipe_covers = {
east = {
layers = {
{ tint=rctint,
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-east.png",
height = 64,
hr_version = { tint=rctint,
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "extra-high",
width = 64
},
{
draw_as_shadow = true,
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-east-shadow.png",
height = 64,
hr_version = {
draw_as_shadow = true,
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-east-shadow.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "extra-high",
width = 64
}
}
},
north = {
layers = {
{ tint=rctint,
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-north.png",
height = 64,
hr_version = { tint=rctint,
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-north.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "extra-high",
width = 64
},
{
draw_as_shadow = true,
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-north-shadow.png",
height = 64,
hr_version = {
draw_as_shadow = true,
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-north-shadow.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "extra-high",
width = 64
}
}
},
south = {
layers = {
{ tint=rctint,
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-south.png",
height = 64,
hr_version = { tint=rctint,
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "extra-high",
width = 64
},
{
draw_as_shadow = true,
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-south-shadow.png",
height = 64,
hr_version = {
draw_as_shadow = true,
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-south-shadow.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "extra-high",
width = 64
}
}
},
west = {
layers = {
{ tint=rctint,
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-west.png",
height = 64,
hr_version = { tint=rctint,
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "extra-high",
width = 64
},
{
draw_as_shadow = true,
filename = "__base__/graphics/entity/pipe-covers/pipe-cover-west-shadow.png",
height = 64,
hr_version = {
draw_as_shadow = true,
filename = "__base__/graphics/entity/pipe-covers/hr-pipe-cover-west-shadow.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "extra-high",
width = 64
}
}
}
}
},
icon = "__base__/graphics/icons/pipe-to-ground.png",
icon_size = 32,
max_health = 150,
minable = {
mining_time = 0.1,
result = "pipe-to-ground"
},
name = "warptorio-logistics-pipe",
pictures = {
down = { tint=rctint,
filename = "__base__/graphics/entity/pipe-to-ground/pipe-to-ground-down.png",
height = 64,
hr_version = { tint=rtint,
filename = "__base__/graphics/entity/pipe-to-ground/hr-pipe-to-ground-down.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "high",
width = 64
},
left = { tint=rctint,
filename = "__base__/graphics/entity/pipe-to-ground/pipe-to-ground-left.png",
height = 64,
hr_version = { tint=rtint,
filename = "__base__/graphics/entity/pipe-to-ground/hr-pipe-to-ground-left.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "high",
width = 64
},
right = { tint=rctint,
filename = "__base__/graphics/entity/pipe-to-ground/pipe-to-ground-right.png",
height = 64,
hr_version = { tint=rtint,
filename = "__base__/graphics/entity/pipe-to-ground/hr-pipe-to-ground-right.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "high",
width = 64
},
up = { tint=rctint,
filename = "__base__/graphics/entity/pipe-to-ground/pipe-to-ground-up.png",
height = 64,
hr_version = { tint=rtint,
filename = "__base__/graphics/entity/pipe-to-ground/hr-pipe-to-ground-up.png",
height = 128,
priority = "extra-high",
scale = 0.5,
width = 128
},
priority = "high",
width = 64
}
},
resistances = {
{
percent = 80,
type = "fire"
},
{
percent = 40,
type = "impact"
}
},
selection_box = {
{
-0.5,
-0.5
},
{
0.5,
0.5
}
},
type = "pipe-to-ground",
vehicle_impact_sound = {
filename = "__base__/sound/car-metal-impact.ogg",
volume = 0.65
}
}
}
Loading

0 comments on commit 75991d0

Please sign in to comment.