forked from cacklingfiend/lignumis
		
	Add burner lamp
This commit is contained in:
		
							parent
							
								
									14880dbdde
								
							
						
					
					
						commit
						87bddaf7d3
					
				
					 4 changed files with 214 additions and 5 deletions
				
			
		
							
								
								
									
										10
									
								
								README.md
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
										
									
									
									
								
							|  | @ -226,10 +226,6 @@ _________________ | |||
| 
 | ||||
| - [Mute icon](https://icons8.com/icon/9414/no-audio) | ||||
| 
 | ||||
| [_CodeGreen](https://mods.factorio.com/user/_CodeGreen) | ||||
| 
 | ||||
| - Lignumis as starting planet inspired by [Any Planet Start](https://mods.factorio.com/mod/any-planet-start) | ||||
| 
 | ||||
| [Free Music Archive](https://freemusicarchive.org) | ||||
| 
 | ||||
| - [The Owl: telescope](https://freemusicarchive.org/music/The_Owl/Fairy_Forest/the_owl_-_fairy_forest_-_04_the_owl_-_telescope/) (CC BY-NC-ND) | ||||
|  | @ -245,4 +241,8 @@ _________________ | |||
| [SafTheLamb](https://mods.factorio.com/user/SafTheLamb) | ||||
| 
 | ||||
| - [Early Agriculture](https://mods.factorio.com/mod/early-agriculture): Fix for trees not being plantable on Nauvis with Alien Biomes active. | ||||
| - [Wooden Logistics](https://mods.factorio.com/mod/wood-logistics): Code for AAI Loader. | ||||
| - [Wooden Logistics](https://mods.factorio.com/mod/wood-logistics): Code for AAI Loader. | ||||
| 
 | ||||
| [Larger Lamps](https://mods.factorio.com/mod/DeadlockLargerLamp) | ||||
| 
 | ||||
| - Burner lamp | ||||
|  | @ -49,6 +49,7 @@ wood-lane-splitter=Wood lane splitter | |||
| lignumis-spawner-small=Lignumis egg raft | ||||
| lignumis-small-wriggler-pentapod=Lignumis small wiggler pentapod | ||||
| lignumis-medium-wriggler-pentapod=Lignumis medium wiggler pentapod | ||||
| burner-lamp=Burner lamp | ||||
| 
 | ||||
| [entity-description] | ||||
| lumber-mill=Advanced machine to process wood. | ||||
|  | @ -107,6 +108,7 @@ active-noise-cancelling=Active noise cancelling | |||
| casting-gold=Casting gold | ||||
| gold-ore-crushing=Gold ore crushing | ||||
| processing-unit-gold=Processing unit (gold) | ||||
| burner-lamp-burning=Generating light | ||||
| 
 | ||||
| [recipe-description] | ||||
| moist-stromatolite-remnant-desiccation-without-steam=Used for balancing the production of steam. | ||||
|  |  | |||
							
								
								
									
										206
									
								
								lignumis/prototypes/content/burner-lamp.lua
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										206
									
								
								lignumis/prototypes/content/burner-lamp.lua
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,206 @@ | |||
| local Technology = require("__cf-lib__/data/Technology") | ||||
| 
 | ||||
| local gfx = Lignumis.graphics .. "entity/burner-lamp/" | ||||
| 
 | ||||
| data:extend({ | ||||
|     { | ||||
|         type = "recipe-category", | ||||
|         name = "lamp-burning" | ||||
|     }, | ||||
|     { | ||||
|         name = "burner-lamp", | ||||
|         type = "assembling-machine", | ||||
|         minable = { | ||||
|             mining_time = 2.0, | ||||
|             result = "burner-lamp", | ||||
|         }, | ||||
|         icon = Lignumis.graphics .. "icons/burner-lamp.png", | ||||
|         icon_size = 64, | ||||
|         icon_mipmaps = 4, | ||||
|         fast_replaceable_group = "large-lamp", | ||||
|         --next_upgrade = "lamp", | ||||
|         collision_mask = { layers = { object = true, water_tile = true, meltable = true, player = true } }, | ||||
|         crafting_speed = 1, | ||||
|         crafting_categories = { "lamp-burning" }, | ||||
|         fixed_recipe = "burner-lamp-burning", | ||||
|         dying_explosion = "medium-explosion", | ||||
|         show_recipe_icon = false, | ||||
|         show_recipe_icon_on_map = false, | ||||
|         source_inventory_size = 1, | ||||
|         result_inventory_size = 1, | ||||
|         energy_source = { | ||||
|             emissions_per_minute = { pollution = 0.02 }, | ||||
|             type = "burner", | ||||
|             fuel_inventory_size = 1, | ||||
|             burnt_inventory_size = 1, | ||||
|             fuel_categories = { "chemical" }, | ||||
|             light_flicker = { | ||||
|                 color = { 0, 0, 0, 0 }, -- to remove default burner glow | ||||
|             }, | ||||
|             render_no_power_icon = false, | ||||
|         }, | ||||
|         energy_usage = "9.6kW", | ||||
|         max_health = 100, | ||||
|         resistances = { | ||||
|             { | ||||
|                 type = "fire", | ||||
|                 percent = 95 | ||||
|             }, | ||||
|         }, | ||||
|         corpse = "small-remnants", | ||||
|         flags = { "placeable-player", "placeable-neutral", "player-creation" }, | ||||
|         collision_box = { { -0.15, -0.15 }, { 0.15, 0.15 } }, | ||||
|         selection_box = { { -0.5, -0.5 }, { 0.5, 0.5 } }, | ||||
|         graphics_set = { | ||||
|             animation = { | ||||
|                 layers = { | ||||
|                     { | ||||
|                         draw_as_glow = false, | ||||
|                         draw_as_light = false, | ||||
|                         draw_as_shadow = false, | ||||
|                         filename = gfx .. "burner-lamp-base.png", | ||||
|                         height = 128, | ||||
|                         priority = "high", | ||||
|                         scale = 0.5, | ||||
|                         shift = { 0, 0 }, | ||||
|                         width = 128, | ||||
|                         x = 0, | ||||
|                         y = 0 | ||||
|                     }, | ||||
|                     { | ||||
|                         draw_as_glow = false, | ||||
|                         draw_as_light = false, | ||||
|                         draw_as_shadow = true, | ||||
|                         filename = gfx .. "burner-lamp-shadow.png", | ||||
|                         height = 128, | ||||
|                         priority = "high", | ||||
|                         scale = 0.5, | ||||
|                         shift = { 0, 0 }, | ||||
|                         width = 128, | ||||
|                         x = 0, | ||||
|                         y = 0 | ||||
|                     } | ||||
|                 } | ||||
|             }, | ||||
|             working_visualisations = { | ||||
|                 { | ||||
|                     animation = { | ||||
|                         animation_speed = 1, | ||||
|                         blend_mode = "additive-soft", | ||||
|                         draw_as_glow = true, | ||||
|                         draw_as_light = false, | ||||
|                         draw_as_shadow = false, | ||||
|                         filename = gfx .. "burner-lamp-working.png", | ||||
|                         frame_count = 30, | ||||
|                         height = 128, | ||||
|                         line_length = 6, | ||||
|                         priority = "high", | ||||
|                         scale = 0.5, | ||||
|                         shift = { 0, 0 }, | ||||
|                         width = 128, | ||||
|                         x = 0, | ||||
|                         y = 0 | ||||
|                     }, | ||||
|                     light = { | ||||
|                         color = { 1.0, 0.82, 0.5 }, | ||||
|                         intensity = 0.4, | ||||
|                         size = 40, | ||||
|                         type = "oriented", | ||||
|                         picture = { | ||||
|                             filename = gfx .. "light.png", | ||||
|                             width = 256, | ||||
|                             height = 256, | ||||
|                             scale = 0.125 | ||||
|                         }, | ||||
|                     }, | ||||
|                 } | ||||
|             } | ||||
|         }, | ||||
|         working_sound = { | ||||
|             sound = { | ||||
|                 filename = "__base__/sound/furnace.ogg", | ||||
|                 volume = 1.0 | ||||
|             } | ||||
|         }, | ||||
|         open_sound = { | ||||
|             filename = "__base__/sound/machine-open.ogg", | ||||
|             volume = 0.75 | ||||
|         }, | ||||
|         close_sound = { | ||||
|             filename = "__base__/sound/machine-close.ogg", | ||||
|             volume = 0.75 | ||||
|         }, | ||||
|         mined_sound = { | ||||
|             filename = "__base__/sound/deconstruct-bricks.ogg" | ||||
|         }, | ||||
|         vehicle_impact_sound = { | ||||
|             filename = "__base__/sound/car-metal-impact.ogg", | ||||
|             volume = 0.65 | ||||
|         }, | ||||
|         squeak_behaviour = false, | ||||
|     }, | ||||
|     { | ||||
|         type = "item", | ||||
|         name = "burner-lamp", | ||||
|         icon = Lignumis.graphics .. "icons/burner-lamp.png", | ||||
|         icon_size = 64, | ||||
|         icon_mipmaps = 4, | ||||
|         subgroup = "circuit-network",     -- Copper lamp under circuit-network | ||||
|         order = "a[lamp]-b[copper-lamp]", -- Copper lamp after large lamp | ||||
|         place_result = "burner-lamp", | ||||
|         stack_size = 50 | ||||
|     }, | ||||
|     { | ||||
|         name = "burner-lamp", | ||||
|         type = "recipe", | ||||
|         enabled = true, | ||||
|         ingredients = { | ||||
|             { type = "item", name = "gold-plate",  amount = 4 }, | ||||
|             { type = "item", name = "stone-brick", amount = 2 }, | ||||
|         }, | ||||
|         results = { | ||||
|             { type = "item", name = "burner-lamp", amount = 1 } | ||||
|         }, | ||||
|         subgroup = "circuit-network",     -- Copper lamp under circuit-network | ||||
|         order = "a[lamp]-b[copper-lamp]", -- Place after large lamp | ||||
|         category = "crafting"             -- Category for crafting | ||||
|     }, | ||||
|     { | ||||
|         name = "burner-lamp-copper", | ||||
|         type = "recipe", | ||||
|         enabled = false, | ||||
|         localised_name = { "entity-name.burner-lamp" }, | ||||
|         icons = { | ||||
|             { icon = Lignumis.graphics .. "icons/burner-lamp.png" }, | ||||
|             { icon = "__base__/graphics/icons/copper-plate.png",  scale = 0.25, shift = { 8, 8 } } | ||||
|         }, | ||||
|         ingredients = { | ||||
|             { type = "item", name = "copper-plate", amount = 4 }, | ||||
|             { type = "item", name = "stone-brick",  amount = 2 }, | ||||
|         }, | ||||
|         results = { | ||||
|             { type = "item", name = "burner-lamp", amount = 1 } | ||||
|         }, | ||||
|         subgroup = "circuit-network",     -- Copper lamp under circuit-network | ||||
|         order = "a[lamp]-b[copper-lamp]", -- Place after large lamp | ||||
|         category = "crafting"             -- Category for crafting | ||||
|     }, | ||||
|     -- Define the hidden burning recipe for the copper lamp | ||||
|     { | ||||
|         name = "burner-lamp-burning", -- Make sure this name matches the recipe you are referencing | ||||
|         type = "recipe", | ||||
|         enabled = true, | ||||
|         hidden = true, | ||||
|         hide_from_stats = true, | ||||
|         icon = Lignumis.graphics .. "icons/burner-lamp.png", -- Icon path for the recipe | ||||
|         icon_size = 64, | ||||
|         icon_mipmaps = 4, | ||||
|         category = "lamp-burning", -- Custom category for lamp burning | ||||
|         ingredients = {}, | ||||
|         results = {}, | ||||
|         subgroup = "other",           -- Optional: Adjust this if needed | ||||
|         energy_required = 25000 / 60, -- Represents one "Factorio day" | ||||
|     } | ||||
| }) | ||||
| 
 | ||||
| Technology:new("copper-processing"):addRecipe("burner-lamp-copper") | ||||
|  | @ -8,6 +8,7 @@ require("wood-lab") | |||
| require("wood-science") | ||||
| require("burner-agricultural-tower") | ||||
| require("burner-assembling-machine") | ||||
| require("burner-lamp") | ||||
| require("burner-long-handed-inserter") | ||||
| require("lumber-mill") | ||||
| require("gold") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Brodtmann
						Simon Brodtmann