Skip to content

Commit

Permalink
Bob's Greenhouse 2.0 (#249)
Browse files Browse the repository at this point in the history
* Remove productivity from greenhouse recipes that can't use it

* Update entities.lua

Add circuit connector, update fluid boxes, replace allowed_effects with blank table (in case we want to add quality later), add impact_category.

* Add item sounds

* Add recipe locales

* Add more recipe locales

* Fixing greenhouse emissions_per_minute

* Fixing greenhouse prerequisites

---------

Co-authored-by: KiwiHawk <[email protected]>
  • Loading branch information
Qatavin and KiwiHawk authored Dec 15, 2024
1 parent 8399a93 commit c053dbf
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 10 deletions.
4 changes: 3 additions & 1 deletion bobgreenhouse/locale/en/bobgreenhouse.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ wood-pellets=Wood fuel pellets

[recipe-name]
bob-basic-greenhouse-cycle=Grow trees
bob-advanced-greenhouse-cycle=Grow trees with Fertiliser
bob-advanced-greenhouse-cycle=Grow trees with fertiliser
bob-fertiliser=Fertiliser
bob-seedling=Germinate seedlings


[entity-name]
Expand Down
22 changes: 16 additions & 6 deletions bobgreenhouse/prototypes/entities.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
circuit_connector_definitions["bob-greenhouse"] =
circuit_connector_definitions.create_vector(universal_connector_template, {
{ variation = 27, main_offset = util.by_pixel(30.5, 15.5), shadow_offset = util.by_pixel(37, 20.5), show_shadow = false },
{ variation = 27, main_offset = util.by_pixel(30.5, 15.5), shadow_offset = util.by_pixel(37, 20.5), show_shadow = false },
{ variation = 27, main_offset = util.by_pixel(30.5, 15.5), shadow_offset = util.by_pixel(37, 20.5), show_shadow = false },
{ variation = 27, main_offset = util.by_pixel(30.5, 15.5), shadow_offset = util.by_pixel(37, 20.5), show_shadow = false },
})

data:extend({
{
type = "assembling-machine",
Expand All @@ -9,6 +17,8 @@ data:extend({
collision_box = { { -1.2, -1.2 }, { 1.2, 1.2 } },
selection_box = { { -1.5, -1.5 }, { 1.5, 1.5 } },
max_health = 250,
circuit_wire_max_distance = assembling_machine_circuit_wire_max_distance,
circuit_connector = circuit_connector_definitions["bob-greenhouse"],
corpse = "big-remnants",
dying_explosion = "medium-explosion",
fast_replaceable_group = "bob-greenhouse",
Expand All @@ -17,7 +27,7 @@ data:extend({
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions_per_minute = -10,
emissions_per_minute = { pollution = -10 },
},
energy_usage = "100kW", --"25kW",
resistances = {
Expand All @@ -31,12 +41,12 @@ data:extend({
production_type = "input",
pipe_picture = assembler3pipepictures(),
pipe_covers = pipecoverspictures(),
base_area = 10,
base_level = -1,
pipe_connections = { { type = "input", position = { 0, -2 } } },
volume = 1000,
pipe_connections = { { flow_direction = "input", position = { 0, -1 }, direction = defines.direction.north } },
secondary_draw_orders = { north = -1 },
},
},
allowed_effects = { "consumption", "speed", "productivity", "pollution" },
allowed_effects = {},
graphics_set = {
animation = {
filename = "__bobgreenhouse__/graphics/entity/greenhouse.png",
Expand All @@ -60,6 +70,6 @@ data:extend({
},
open_sound = { filename = "__base__/sound/machine-open.ogg", volume = 0.85 },
close_sound = { filename = "__base__/sound/machine-close.ogg", volume = 0.75 },
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
impact_category = "glass",
},
})
60 changes: 60 additions & 0 deletions bobgreenhouse/prototypes/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ data:extend({
order = "g[greenhouse]",
place_result = "bob-greenhouse",
stack_size = 20,
drop_sound = {
filename = "__base__/sound/item/wood-inventory-move.ogg",
volume = 0.85,
speed = 1.6,
},
inventory_move_sound = {
filename = "__base__/sound/item/wood-inventory-move.ogg",
volume = 0.85,
speed = 1.6,
},
pick_sound = {
filename = "__base__/sound/item/wood-inventory-pickup.ogg",
volume = 0.85,
speed = 1.6,
},
},
{
type = "item",
Expand All @@ -17,6 +32,21 @@ data:extend({
subgroup = "bob-greenhouse-items",
order = "g[fertiliser]",
stack_size = 100,
drop_sound = {
filename = "__base__/sound/item/low-density-inventory-pickup.ogg",
volume = 0.65,
speed = 0.7,
},
inventory_move_sound = {
filename = "__base__/sound/item/low-density-inventory-pickup.ogg",
volume = 0.65,
speed = 0.7,
},
pick_sound = {
filename = "__base__/sound/item/wire-inventory-move.ogg",
volume = 0.7,
speed = 0.6,
},
},
{
type = "item",
Expand All @@ -28,6 +58,21 @@ data:extend({
subgroup = "bob-greenhouse-items",
order = "a[seedling]",
stack_size = 200,
drop_sound = {
filename = "__base__/sound/item/resource-inventory-move.ogg",
volume = 0.9,
speed = 1.5,
},
inventory_move_sound = {
filename = "__base__/sound/item/resource-inventory-move.ogg",
volume = 0.9,
speed = 1.5,
},
pick_sound = {
filename = "__base__/sound/item/wire-inventory-pickup.ogg",
volume = 0.9,
speed = 0.6,
},
},
{
type = "item",
Expand All @@ -40,5 +85,20 @@ data:extend({
subgroup = "raw-resource",
order = "a[wood-pellets]",
stack_size = 100,
drop_sound = {
filename = "__base__/sound/item/low-density-inventory-pickup.ogg",
volume = 0.65,
speed = 0.7,
},
inventory_move_sound = {
filename = "__base__/sound/item/low-density-inventory-pickup.ogg",
volume = 0.65,
speed = 0.7,
},
pick_sound = {
filename = "__base__/sound/item/wire-inventory-move.ogg",
volume = 0.7,
speed = 0.6,
},
},
})
2 changes: 0 additions & 2 deletions bobgreenhouse/prototypes/recipes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ data:extend({
{ type = "item", name = "wood", amount_min = 10, amount_max = 20 },
},
allow_decomposition = false,
allow_productivity = true,
},

{
Expand All @@ -80,7 +79,6 @@ data:extend({
{ type = "item", name = "wood", amount_min = 10, amount_max = 50 },
},
allow_decomposition = false,
allow_productivity = true,
},

{
Expand Down
2 changes: 1 addition & 1 deletion bobgreenhouse/prototypes/technology.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data:extend({
icon = "__bobgreenhouse__/graphics/icons/technology/greenhouse.png",
icon_size = 128,
prerequisites = {
"steam-power",
"automation-science-pack",
},
effects = {
{
Expand Down

0 comments on commit c053dbf

Please sign in to comment.