#69 добавление табличек holographic_signs в технологию
#73 Вырезана механика потребления дополнительных конвееров и труб при размещении сверхдлинных конвееров и труб Вырезаны связанные с ней конфиги Убран флаг not-deconstructable со сверхдлинных конвееров и труб, что упрощает их использование с дронами Изменено английское описание сверхдлинных конвееров и труб (русское изменений не требует)
This commit is contained in:
		
							parent
							
								
									a1aa7138ce
								
							
						
					
					
						commit
						c84ab187b6
					
				@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					--[[
 | 
				
			||||||
function Set(list)
 | 
					function Set(list)
 | 
				
			||||||
	local set = {}
 | 
						local set = {}
 | 
				
			||||||
	for _, l in ipairs(list) do
 | 
						for _, l in ipairs(list) do
 | 
				
			||||||
@ -275,3 +276,4 @@ function bobsLogisticsOnMine(event)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	insert_items(game.players[event.player_index], respectiveBelts, calc)
 | 
						insert_items(game.players[event.player_index], respectiveBelts, calc)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					]]-- --drd
 | 
				
			||||||
@ -2,13 +2,13 @@ local entity = data.raw["underground-belt"]["green-underground-belt"]
 | 
				
			|||||||
if entity ~= nil then --bob's logistics is installed
 | 
					if entity ~= nil then --bob's logistics is installed
 | 
				
			||||||
	local entity = data.raw["underground-belt"]["green-underground-belt"]
 | 
						local entity = data.raw["underground-belt"]["green-underground-belt"]
 | 
				
			||||||
	entity.max_distance = 250
 | 
						entity.max_distance = 250
 | 
				
			||||||
	table.insert(entity.flags, "not-deconstructable")
 | 
						--table.insert(entity.flags, "not-deconstructable")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
entity = data.raw["underground-belt"]["purple-underground-belt"]
 | 
					entity = data.raw["underground-belt"]["purple-underground-belt"]
 | 
				
			||||||
if entity ~= nil then --bob's logistics is installed
 | 
					if entity ~= nil then --bob's logistics is installed
 | 
				
			||||||
	entity.max_distance = 250
 | 
						entity.max_distance = 250
 | 
				
			||||||
	table.insert(entity.flags, "not-deconstructable")
 | 
						--table.insert(entity.flags, "not-deconstructable")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
entity = data.raw["pipe-to-ground"]["nitinol-pipe-to-ground"]
 | 
					entity = data.raw["pipe-to-ground"]["nitinol-pipe-to-ground"]
 | 
				
			||||||
 | 
				
			|||||||
@ -5,24 +5,24 @@ express-subterranean-belt=Express subterranean belt
 | 
				
			|||||||
subterranean-pipe=Subterranean pipe
 | 
					subterranean-pipe=Subterranean pipe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[entity-description]
 | 
					[entity-description]
 | 
				
			||||||
subterranean-pipe=A pipe that can travel underground up to 250 tiles, but charges the player pipes based on distance.
 | 
					subterranean-pipe=A pipe that can travel underground up to 250 tiles.
 | 
				
			||||||
subterranean-belt=A belt that can travel underground up to 250 tiles, but charges the player standard belts based on distance.
 | 
					subterranean-belt=A belt that can travel underground up to 250 tiles.
 | 
				
			||||||
fast-subterranean-belt=A faster belt that can travel underground up to 250 tiles, but charges the player fast belts based on distance.
 | 
					fast-subterranean-belt=A faster belt that can travel underground up to 250 tiles.
 | 
				
			||||||
express-subterranean-belt=An express belt that can travel underground up to 250 tiles, but charges the player express belts based on distance.
 | 
					express-subterranean-belt=An express belt that can travel underground up to 250 tiles.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[item-description]
 | 
					[item-description]
 | 
				
			||||||
subterranean-pipe=A pipe that can travel underground up to 250 tiles, but charges the player pipes based on distance.
 | 
					subterranean-pipe=A pipe that can travel underground up to 250 tiles.
 | 
				
			||||||
subterranean-belt=A belt that can travel underground up to 250 tiles, but charges the player standard belts based on distance.
 | 
					subterranean-belt=A belt that can travel underground up to 250 tiles.
 | 
				
			||||||
fast-subterranean-belt=A faster belt that can travel underground up to 250 tiles, but charges the player fast belts based on distance.
 | 
					fast-subterranean-belt=A faster belt that can travel underground up to 250 tiles.
 | 
				
			||||||
express-subterranean-belt=An express belt that can travel underground up to 250 tiles, but charges the player express belts based on distance.
 | 
					express-subterranean-belt=An express belt that can travel underground up to 250 tiles.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[technology-name]
 | 
					[technology-name]
 | 
				
			||||||
subterranean-logistics=Subterranean logistics
 | 
					subterranean-logistics=Subterranean logistics
 | 
				
			||||||
subterranean-liquid-logistics=Subterranean liquid logistics
 | 
					subterranean-liquid-logistics=Subterranean liquid logistics
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[technology-description]
 | 
					[technology-description]
 | 
				
			||||||
subterranean-liquid-logistics=Unlocks the subterranean pipe, which can span 250 tiles and charges the player pipes based on distance.
 | 
					subterranean-liquid-logistics=Unlocks the subterranean pipe, which can span 250 tiles.
 | 
				
			||||||
subterranean-logistics=Unlocks subterranean belts that can span 250 tiles and charges the player the respective type of belts based on distance.
 | 
					subterranean-logistics=Unlocks subterranean belts that can span 250 tiles.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[mod-setting-name]
 | 
					[mod-setting-name]
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ local sub_belt_1 = table.deepcopy(data.raw["underground-belt"]["underground-belt
 | 
				
			|||||||
sub_belt_1.name = "subterranean-belt"
 | 
					sub_belt_1.name = "subterranean-belt"
 | 
				
			||||||
sub_belt_1.minable = {hardness = 0.2, mining_time = 2, result = "subterranean-belt"}
 | 
					sub_belt_1.minable = {hardness = 0.2, mining_time = 2, result = "subterranean-belt"}
 | 
				
			||||||
sub_belt_1.max_distance = 250
 | 
					sub_belt_1.max_distance = 250
 | 
				
			||||||
sub_belt_1.flags = {"placeable-neutral", "player-creation","not-deconstructable"}
 | 
					--sub_belt_1.flags = {"placeable-neutral", "player-creation","not-deconstructable"}   --drd
 | 
				
			||||||
sub_belt_1.max_health = 100
 | 
					sub_belt_1.max_health = 100
 | 
				
			||||||
sub_belt_1.structure.direction_in.sheet.tint = {r=1,g=0.3,b=0.1,a=1}
 | 
					sub_belt_1.structure.direction_in.sheet.tint = {r=1,g=0.3,b=0.1,a=1}
 | 
				
			||||||
sub_belt_1.structure.direction_out.sheet.tint = {r=1,g=0.3,b=0.1,a=1}
 | 
					sub_belt_1.structure.direction_out.sheet.tint = {r=1,g=0.3,b=0.1,a=1}
 | 
				
			||||||
@ -18,7 +18,7 @@ local sub_belt_2 = table.deepcopy(data.raw["underground-belt"]["fast-underground
 | 
				
			|||||||
sub_belt_2.name = "fast-subterranean-belt"
 | 
					sub_belt_2.name = "fast-subterranean-belt"
 | 
				
			||||||
sub_belt_2.minable = {hardness = 0.2, mining_time = 2, result = "fast-subterranean-belt"}
 | 
					sub_belt_2.minable = {hardness = 0.2, mining_time = 2, result = "fast-subterranean-belt"}
 | 
				
			||||||
sub_belt_2.max_distance = 250
 | 
					sub_belt_2.max_distance = 250
 | 
				
			||||||
sub_belt_2.flags = {"placeable-neutral", "player-creation","not-deconstructable"}
 | 
					--sub_belt_2.flags = {"placeable-neutral", "player-creation","not-deconstructable"}   --drd
 | 
				
			||||||
sub_belt_2.max_health = 150
 | 
					sub_belt_2.max_health = 150
 | 
				
			||||||
sub_belt_2.structure.direction_in.sheet.tint = {r=1,g=0.1,b=1,a=1}
 | 
					sub_belt_2.structure.direction_in.sheet.tint = {r=1,g=0.1,b=1,a=1}
 | 
				
			||||||
sub_belt_2.structure.direction_out.sheet.tint = {r=1,g=0.1,b=1,a=1}
 | 
					sub_belt_2.structure.direction_out.sheet.tint = {r=1,g=0.1,b=1,a=1}
 | 
				
			||||||
@ -32,7 +32,7 @@ local sub_belt_3 = table.deepcopy(data.raw["underground-belt"]["express-undergro
 | 
				
			|||||||
sub_belt_3.name = "express-subterranean-belt"
 | 
					sub_belt_3.name = "express-subterranean-belt"
 | 
				
			||||||
sub_belt_3.minable = {hardness = 0.2, mining_time = 2, result = "express-subterranean-belt"}
 | 
					sub_belt_3.minable = {hardness = 0.2, mining_time = 2, result = "express-subterranean-belt"}
 | 
				
			||||||
sub_belt_3.max_distance = 250
 | 
					sub_belt_3.max_distance = 250
 | 
				
			||||||
sub_belt_3.flags = {"placeable-neutral", "player-creation","not-deconstructable"}
 | 
					--sub_belt_3.flags = {"placeable-neutral", "player-creation","not-deconstructable"}   --drd
 | 
				
			||||||
sub_belt_3.max_health = 200
 | 
					sub_belt_3.max_health = 200
 | 
				
			||||||
sub_belt_3.structure.direction_in.sheet.tint = {r=0,g=1,b=1,a=1}
 | 
					sub_belt_3.structure.direction_in.sheet.tint = {r=0,g=1,b=1,a=1}
 | 
				
			||||||
sub_belt_3.structure.direction_out.sheet.tint = {r=0,g=1,b=1,a=1}
 | 
					sub_belt_3.structure.direction_out.sheet.tint = {r=0,g=1,b=1,a=1}
 | 
				
			||||||
@ -45,7 +45,7 @@ data:extend{sub_belt_3}
 | 
				
			|||||||
-- Pipe
 | 
					-- Pipe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local subPipe = table.deepcopy(data.raw["pipe-to-ground"]["pipe-to-ground"])
 | 
					local subPipe = table.deepcopy(data.raw["pipe-to-ground"]["pipe-to-ground"])
 | 
				
			||||||
subPipe.flags = {"placeable-neutral", "player-creation",  "not-deconstructable"}
 | 
					--subPipe.flags = {"placeable-neutral", "player-creation",  "not-deconstructable"}   --drd
 | 
				
			||||||
subPipe.name = "subterranean-pipe"
 | 
					subPipe.name = "subterranean-pipe"
 | 
				
			||||||
subPipe.minable = {hardness = 0.2, mining_time = 2, result = "subterranean-pipe"}
 | 
					subPipe.minable = {hardness = 0.2, mining_time = 2, result = "subterranean-pipe"}
 | 
				
			||||||
subPipe.max_distance = 250
 | 
					subPipe.max_distance = 250
 | 
				
			||||||
 | 
				
			|||||||
@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					--[[
 | 
				
			||||||
data:extend({
 | 
					data:extend({
 | 
				
			||||||
	  {
 | 
						  {
 | 
				
			||||||
		 type = "int-setting",
 | 
							 type = "int-setting",
 | 
				
			||||||
@ -49,3 +50,4 @@ data:extend({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	  
 | 
						  
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					]]-- --drd
 | 
				
			||||||
							
								
								
									
										126
									
								
								holographic_signs/changelog.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								holographic_signs/changelog.txt
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,126 @@
 | 
				
			|||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.2.3
 | 
				
			||||||
 | 
					Date: 11. 01. 2024
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Turned off holo sign now removes the map tag
 | 
				
			||||||
 | 
					    - New imputs: Power production/consumption, accumulator charge
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.2.2
 | 
				
			||||||
 | 
					Date: 15. 08. 2023
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - New imputs: Holographic image (any ingame icon). If playing Warp-Drive-Machine: planet image
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.2.1
 | 
				
			||||||
 | 
					Date: 02. 08. 2023
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed a reported crash on adding/removing mods (configuration changed)
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - updates reduced from 5 to 2 seconds
 | 
				
			||||||
 | 
					    - added remote interface to request hologram refresh
 | 
				
			||||||
 | 
					    - New inputs for Warp-Drive-Machine mod: time on planet, warp time, natives evolution
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.2.0
 | 
				
			||||||
 | 
					Date: 09. 06. 2023
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - New input: Production/consumption ratio
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.1.1
 | 
				
			||||||
 | 
					Date: 22. 04. 2023
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - New input: Pollution
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.1.0
 | 
				
			||||||
 | 
					Date: 28. 03. 2023
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - New inputs: Fluid consumption, Rocket item launched, Time to finish the research, Played time, Time from last player death
 | 
				
			||||||
 | 
					    - Some inputs organized in categories (click / expand)
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.0.5
 | 
				
			||||||
 | 
					Date: 08. 11. 2022
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Added new input: wind speed (if nullius, windturbines-redux or WindSpeedChanging mods are active)
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.0.4
 | 
				
			||||||
 | 
					Date: 31. 10. 2022
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Close the holographic panel GUI in response to E and ESC
 | 
				
			||||||
 | 
					    - Added blueprint support
 | 
				
			||||||
 | 
					    - Added new input: day time
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.0.3
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed a reported crash when a gui is changed and the hologram is invalid
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.0.2
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed text color change preview
 | 
				
			||||||
 | 
					    - Fixed gui not responding on god mode scenarios
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Added mod option to change text effects: Default, Fast or No animation (thanks to LCStark)
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.0.1
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed a crash when a mod is removed and the hologram was using some of its icons/names
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Added mod option to enable/disbale hologram animation
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 1.0.0
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - New graphics
 | 
				
			||||||
 | 
					    - Added switch to turn on / off the hologram
 | 
				
			||||||
 | 
					    - You can turn OFF the hologram with circuit signal-red=1 and ON with signal-green=1
 | 
				
			||||||
 | 
					    - You can use these commands to turn ON/OFF all holograms (admin only): /hologram-turn-on /hologram-turn-off
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.1.0
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed lab progress print to integer values from 1 - 100%
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.9
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed a reported crash regarding '%' text replacement
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.8
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed a problem with fluid production/consumption, that could cause a crash
 | 
				
			||||||
 | 
					    - Fixed text format on some input values
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Added option to print plain text instead of hologram
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.7
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed a reported crash
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - New button icons
 | 
				
			||||||
 | 
					    - Added RGB text color editor
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.6
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Copy-paste implemented
 | 
				
			||||||
 | 
					    - You can now print input values in the middle of your custom text, using the tag |#|
 | 
				
			||||||
 | 
					    - Added new inputs: kill count, player casualties, enemy evolution
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.5
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed a reported crash regarding empty world tag
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Empty text/icon will clear the hologram bubble
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.4
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Added new inputs for production/consumption statistics
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.3
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Added the ability to read and print circuit values, logistic item count and other force stats
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.2
 | 
				
			||||||
 | 
					  Bugfix:
 | 
				
			||||||
 | 
					    - Fixed a crash with a possible invalid signal icon
 | 
				
			||||||
 | 
					  Changes:
 | 
				
			||||||
 | 
					    - Added textbox option
 | 
				
			||||||
 | 
					    - Made compatible with space exploration to allow building on space platform
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					Version: 0.0.1
 | 
				
			||||||
 | 
					Date: 18.10.2021
 | 
				
			||||||
 | 
					  Info:
 | 
				
			||||||
 | 
					    - Initial release
 | 
				
			||||||
							
								
								
									
										1076
									
								
								holographic_signs/control.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1076
									
								
								holographic_signs/control.lua
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										4
									
								
								holographic_signs/data-final-fixes.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								holographic_signs/data-final-fixes.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					if mods['space-exploration'] then 
 | 
				
			||||||
 | 
						data.raw["container"]["hs_holo_sign"].collision_mask = data.raw["container"]["iron-chest"].collision_mask
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
							
								
								
									
										6
									
								
								holographic_signs/data-updates.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								holographic_signs/data-updates.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					if data.raw.technology['optics'] then 
 | 
				
			||||||
 | 
						table.insert (data.raw.technology['optics'].effects,{type = "unlock-recipe", recipe = "hs_holo_sign"})
 | 
				
			||||||
 | 
						data.raw.recipe["hs_holo_sign"].enabled = false
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								holographic_signs/data.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								holographic_signs/data.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					path = '__holographic_signs__/'
 | 
				
			||||||
 | 
					util = require("util")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					require "prototypes.holo_sign"
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								holographic_signs/graphics/holobase.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								holographic_signs/graphics/holobase.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 3.5 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								holographic_signs/graphics/hologram.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								holographic_signs/graphics/hologram.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 25 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								holographic_signs/graphics/hologram_ico.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								holographic_signs/graphics/hologram_ico.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 8.9 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								holographic_signs/graphics/hr-holobase.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								holographic_signs/graphics/hr-holobase.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 11 KiB  | 
							
								
								
									
										11
									
								
								holographic_signs/info.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								holographic_signs/info.json
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
						"name": "holographic_signs",
 | 
				
			||||||
 | 
						"version": "1.2.3",
 | 
				
			||||||
 | 
						"title": "Holographic Signs",
 | 
				
			||||||
 | 
						"author":"MFerrari",
 | 
				
			||||||
 | 
						"dependencies": ["base >= 1.1.0" ,"(?) space-exploration" ,"(?) shield-projector"],
 | 
				
			||||||
 | 
						"description": "This mod adds holographic signs to show configurable icon and text.",
 | 
				
			||||||
 | 
						"factorio_version": "1.1",
 | 
				
			||||||
 | 
						"homepage":"https://discord.gg/vDfm5tNEqK",
 | 
				
			||||||
 | 
						"contact": "Discord: MFerrari#6561"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										64
									
								
								holographic_signs/locale/en/config.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								holographic_signs/locale/en/config.cfg
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,64 @@
 | 
				
			|||||||
 | 
					holographic_sign=Holographic sign
 | 
				
			||||||
 | 
					hs_icon=Icon
 | 
				
			||||||
 | 
					hs_text=Text
 | 
				
			||||||
 | 
					hs_color=Text color
 | 
				
			||||||
 | 
					hs_add_tag=Add world map tag
 | 
				
			||||||
 | 
					hs_on_off=Turn off/on
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bt_holo_sign_textbox=Show/hide text box
 | 
				
			||||||
 | 
					bt_holo_sign_inputs=Show/hide input box
 | 
				
			||||||
 | 
					hs_input_box=Choose an input to print:
 | 
				
			||||||
 | 
					hs_plain_text=Plain text
 | 
				
			||||||
 | 
					bt_holo_sign_confirm=Confirm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hs_hologram_image=Hologram image
 | 
				
			||||||
 | 
					hs_signal=Read circuit signal
 | 
				
			||||||
 | 
					hs_logistic=Count item on logistic
 | 
				
			||||||
 | 
					hs_research_progress=Research progress
 | 
				
			||||||
 | 
					hs_rockets_launched=Rockets launched
 | 
				
			||||||
 | 
					hs_connected_players=Connected players
 | 
				
			||||||
 | 
					hs_production=Item production
 | 
				
			||||||
 | 
					hs_consumption=Item consumption
 | 
				
			||||||
 | 
					hs_production_f=Fluid production
 | 
				
			||||||
 | 
					hs_production_p=Power production
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hs_player_casualties=Player casualties
 | 
				
			||||||
 | 
					hs_enemy_evolution=Enemy evolution
 | 
				
			||||||
 | 
					hs_kill_count=Kill count
 | 
				
			||||||
 | 
					hs_wind_speed=Wind speed
 | 
				
			||||||
 | 
					hs_day_time=Day time
 | 
				
			||||||
 | 
					hs_pollution=Pollution
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hs_research=Research
 | 
				
			||||||
 | 
					hs_timers=Timers
 | 
				
			||||||
 | 
					hs_rockets=Rockets
 | 
				
			||||||
 | 
					hs_production_m=Get production
 | 
				
			||||||
 | 
					hs_consumption_m=Get consumption
 | 
				
			||||||
 | 
					hs_players=Players
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hs_consumption_f=Fluid consumption
 | 
				
			||||||
 | 
					hs_consumption_p=Power consumption
 | 
				
			||||||
 | 
					hs_item_launched=Rocket item launched
 | 
				
			||||||
 | 
					hs_research_time_remaining=Time to finish the research
 | 
				
			||||||
 | 
					hs_total_time=Played time
 | 
				
			||||||
 | 
					hs_time_from_last_death=Time from last player death
 | 
				
			||||||
 | 
					hs_production_ratio=Item production/consumption ratio
 | 
				
			||||||
 | 
					hs_production_ratio_f=Fluid production/consumption ratio
 | 
				
			||||||
 | 
					hs_charge=Accumulator charge
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hs_warpdrive=Warp Drive Machine
 | 
				
			||||||
 | 
					hs_wdm_warping_in=Warping time
 | 
				
			||||||
 | 
					hs_wdm_time_on_planet=Time on planet
 | 
				
			||||||
 | 
					hs_native_evolution=Natives evolution
 | 
				
			||||||
 | 
					hs_planet_image=Planet image
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[item-name]
 | 
				
			||||||
 | 
					hs_holo_sign=Holographic sign
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[entity-name]
 | 
				
			||||||
 | 
					hs_holo_sign=Holographic sign
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[mod-setting-name]
 | 
				
			||||||
 | 
					hs-opt-animation=Enable hologram animation
 | 
				
			||||||
 | 
					hs-opt-text-animation=Text animation
 | 
				
			||||||
							
								
								
									
										54
									
								
								holographic_signs/locale/pt-BR/pt-BR.cfg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								holographic_signs/locale/pt-BR/pt-BR.cfg
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,54 @@
 | 
				
			|||||||
 | 
					holographic_sign=Sinal holográfico
 | 
				
			||||||
 | 
					hs_icon=Ícone
 | 
				
			||||||
 | 
					hs_text=Texto
 | 
				
			||||||
 | 
					hs_color=Cor do texto
 | 
				
			||||||
 | 
					hs_add_tag=Incluir no mapa do mundo
 | 
				
			||||||
 | 
					hs_on_off=Desligar / Ligar
 | 
				
			||||||
 | 
					bt_holo_sign_textbox=Mostrar/ocultar quadro de texto
 | 
				
			||||||
 | 
					bt_holo_sign_inputs=Mostrar/ocultar quadro de entradas
 | 
				
			||||||
 | 
					hs_input_box=Escolha um valor de entrada
 | 
				
			||||||
 | 
					hs_plain_text=Texto plano
 | 
				
			||||||
 | 
					bt_holo_sign_confirm=Confirma
 | 
				
			||||||
 | 
					hs_hologram_image=Imagem holográfica
 | 
				
			||||||
 | 
					hs_signal=Ler sinal de circuito
 | 
				
			||||||
 | 
					hs_logistic=Contar item na logística
 | 
				
			||||||
 | 
					hs_research_progress=Progresso de pesquisa
 | 
				
			||||||
 | 
					hs_rockets_launched=Foguetes lançados
 | 
				
			||||||
 | 
					hs_connected_players=Jogadores conectados
 | 
				
			||||||
 | 
					hs_production=Produção de item
 | 
				
			||||||
 | 
					hs_consumption=Consumo de item
 | 
				
			||||||
 | 
					hs_production_f=Produção de fluído
 | 
				
			||||||
 | 
					hs_production_p=Produção de energia
 | 
				
			||||||
 | 
					hs_player_casualties=Morte de jogadores
 | 
				
			||||||
 | 
					hs_enemy_evolution=Evolução do inimigo
 | 
				
			||||||
 | 
					hs_kill_count=Contagem de mortes
 | 
				
			||||||
 | 
					hs_wind_speed=Velocidade do vento
 | 
				
			||||||
 | 
					hs_day_time=Hora do dia
 | 
				
			||||||
 | 
					hs_pollution=Poluição
 | 
				
			||||||
 | 
					hs_research=Pesquisa
 | 
				
			||||||
 | 
					hs_timers=Tempos
 | 
				
			||||||
 | 
					hs_rockets=Foguetes
 | 
				
			||||||
 | 
					hs_production_m=Produção
 | 
				
			||||||
 | 
					hs_consumption_m=Consumo
 | 
				
			||||||
 | 
					hs_players=Jogadores
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					hs_consumption_f=Consumo de fluído
 | 
				
			||||||
 | 
					hs_consumption_p=Consumo de energia
 | 
				
			||||||
 | 
					hs_item_launched=Itens lançados
 | 
				
			||||||
 | 
					hs_research_time_remaining=Tempo para terminar pesquisa
 | 
				
			||||||
 | 
					hs_total_time=Tempo de jogo
 | 
				
			||||||
 | 
					hs_time_from_last_death=Tempo desde a última morte
 | 
				
			||||||
 | 
					hs_production_ratio=Taxa de produção/consumo de item
 | 
				
			||||||
 | 
					hs_production_ratio_f=Taxa de produção/consumo de fluído
 | 
				
			||||||
 | 
					hs_charge=Carga dos acumuladores
 | 
				
			||||||
 | 
					hs_planet_image=Imagem do planeta
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[item-name]
 | 
				
			||||||
 | 
					hs_holo_sign=Sinal holográfico
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[entity-name]
 | 
				
			||||||
 | 
					hs_holo_sign=Sinal holográfico
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[mod-setting-name]
 | 
				
			||||||
 | 
					hs-opt-animation=Ativar animação do holograma
 | 
				
			||||||
 | 
					hs-opt-text-animation=Animação do texto
 | 
				
			||||||
							
								
								
									
										140
									
								
								holographic_signs/prototypes/holo_sign.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										140
									
								
								holographic_signs/prototypes/holo_sign.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,140 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					local hit_effects = require ("__base__/prototypes/entity/hit-effects")
 | 
				
			||||||
 | 
					local sounds = require("__base__/prototypes/entity/sounds")
 | 
				
			||||||
 | 
					local text_animation = settings.startup["hs-opt-text-animation"].value
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if mods['shield-projector'] then 
 | 
				
			||||||
 | 
					data:extend({
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						type = "animation",
 | 
				
			||||||
 | 
						name = "hs_hologram_animated",
 | 
				
			||||||
 | 
						filename = "__shield-projector__/graphics/entity/shield-projector/hr/shield/wall-south.png",
 | 
				
			||||||
 | 
					    scale = 0.5,
 | 
				
			||||||
 | 
					    animation_speed = 0.3,
 | 
				
			||||||
 | 
					    frame_count = 24,
 | 
				
			||||||
 | 
					    width = 2816/4,
 | 
				
			||||||
 | 
					    height = 3456/6,
 | 
				
			||||||
 | 
					    shift = {0,0},
 | 
				
			||||||
 | 
						line_length = 4
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local wrapper_flow_style = "compilatron_speech_bubble_wrapper"
 | 
				
			||||||
 | 
					if text_animation == 'No animation' then
 | 
				
			||||||
 | 
						wrapper_flow_style = "hs_speech_bubble_wrapper"
 | 
				
			||||||
 | 
						data.raw["gui-style"]["default"][wrapper_flow_style] ={type = "flow_style",effect = nil}
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local fade_in_out_ticks = data.raw['speech-bubble'].fade_in_out_ticks
 | 
				
			||||||
 | 
					if text_animation == 'Fast animation' then fade_in_out_ticks=5 end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					data:extend({
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    type = "speech-bubble",
 | 
				
			||||||
 | 
					    name = "hs-speech-bubble",
 | 
				
			||||||
 | 
					    style = "compilatron_speech_bubble",
 | 
				
			||||||
 | 
					    wrapper_flow_style = wrapper_flow_style,
 | 
				
			||||||
 | 
					    fade_in_out_ticks = fade_in_out_ticks,
 | 
				
			||||||
 | 
					    flags = {"not-on-map", "placeable-off-grid"}
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
 | 
					      type = "sprite",
 | 
				
			||||||
 | 
					      name = "hs_hologram",
 | 
				
			||||||
 | 
					      filename = path.."graphics/hologram.png",
 | 
				
			||||||
 | 
					      priority = "extra-high",
 | 
				
			||||||
 | 
					      width = 200,
 | 
				
			||||||
 | 
					      height = 186,
 | 
				
			||||||
 | 
					   },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type = "container", 
 | 
				
			||||||
 | 
						--logistic_mode = "passive-provider",
 | 
				
			||||||
 | 
					    name = "hs_holo_sign",
 | 
				
			||||||
 | 
					    icon = path.."graphics/hologram_ico.png",
 | 
				
			||||||
 | 
					    icon_size = 64, --icon_mipmaps = 4,
 | 
				
			||||||
 | 
					    flags = {"placeable-player", "player-creation", "not-rotatable", "hide-alt-info"},  --"not-blueprintable"
 | 
				
			||||||
 | 
					    minable = {mining_time = 0.2, result = "hs_holo_sign"},
 | 
				
			||||||
 | 
					    max_health = 100,
 | 
				
			||||||
 | 
					    corpse = "lamp-remnants",
 | 
				
			||||||
 | 
					    dying_explosion = "lamp-explosion",
 | 
				
			||||||
 | 
					    collision_box = {{-0.15, -0.15}, {0.15, 0.15}},
 | 
				
			||||||
 | 
					    selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
 | 
				
			||||||
 | 
					    damaged_trigger_effect = hit_effects.entity(),
 | 
				
			||||||
 | 
					    vehicle_impact_sound = sounds.generic_impact,
 | 
				
			||||||
 | 
					    inventory_size = 0,
 | 
				
			||||||
 | 
					    open_sound = sounds.machine_open,
 | 
				
			||||||
 | 
					    close_sound = sounds.machine_close,
 | 
				
			||||||
 | 
					    resistances =
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        type = "fire",
 | 
				
			||||||
 | 
					        percent = 80
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        type = "impact",
 | 
				
			||||||
 | 
					        percent = 30
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },	
 | 
				
			||||||
 | 
					    --circuit_wire_connection_point = circuit_connector_definitions["chest"].points,
 | 
				
			||||||
 | 
						circuit_wire_connection_point = data.raw.lamp['small-lamp'].circuit_wire_connection_point,
 | 
				
			||||||
 | 
					    circuit_connector_sprites = data.raw.lamp['small-lamp'].circuit_connector_sprites,
 | 
				
			||||||
 | 
					    circuit_wire_max_distance = data.raw.lamp['small-lamp'].circuit_wire_max_distance,
 | 
				
			||||||
 | 
					    picture =
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      layers =
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          filename = path.."graphics/holobase.png",
 | 
				
			||||||
 | 
					          priority = "extra-high",
 | 
				
			||||||
 | 
					          width = 42,
 | 
				
			||||||
 | 
					          height = 36,
 | 
				
			||||||
 | 
					          frame_count = 1,
 | 
				
			||||||
 | 
					          axially_symmetrical = false,
 | 
				
			||||||
 | 
					          direction_count = 1,
 | 
				
			||||||
 | 
					          shift = util.by_pixel(0,3),		  
 | 
				
			||||||
 | 
					          hr_version =
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            filename = path.."graphics/hr-holobase.png",
 | 
				
			||||||
 | 
					            priority = "high",
 | 
				
			||||||
 | 
					            width = 83,
 | 
				
			||||||
 | 
					            height = 70,
 | 
				
			||||||
 | 
					            frame_count = 1,
 | 
				
			||||||
 | 
					            axially_symmetrical = false,
 | 
				
			||||||
 | 
					            direction_count = 1,
 | 
				
			||||||
 | 
					            shift = util.by_pixel(0.25,3),
 | 
				
			||||||
 | 
					            scale = 0.5
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type = "item",
 | 
				
			||||||
 | 
					    name = "hs_holo_sign",
 | 
				
			||||||
 | 
					    icon = path.."graphics/hologram_ico.png",
 | 
				
			||||||
 | 
					    icon_size = 64, --icon_mipmaps = 4,
 | 
				
			||||||
 | 
					    subgroup = "circuit-network",
 | 
				
			||||||
 | 
					    order = "a[items]-h[holo_sign]",
 | 
				
			||||||
 | 
					    place_result = "hs_holo_sign",
 | 
				
			||||||
 | 
					    stack_size= 100
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type = "recipe",
 | 
				
			||||||
 | 
					    name = "hs_holo_sign",
 | 
				
			||||||
 | 
						energy_required = 2,
 | 
				
			||||||
 | 
						enabled = true,
 | 
				
			||||||
 | 
					    ingredients = {{"iron-plate", 4}, {"electronic-circuit", 1}, {"small-lamp", 1}},
 | 
				
			||||||
 | 
					    result = "hs_holo_sign"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
							
								
								
									
										21
									
								
								holographic_signs/settings.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								holographic_signs/settings.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					local allowed_values = function() return {"Default", "Fast animation", "No animation"} end
 | 
				
			||||||
 | 
					data:extend({
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						type = "bool-setting",
 | 
				
			||||||
 | 
						name = "hs-opt-animation",
 | 
				
			||||||
 | 
						setting_type = "runtime-global",
 | 
				
			||||||
 | 
						default_value = true,
 | 
				
			||||||
 | 
						order = "a"
 | 
				
			||||||
 | 
					},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        type = "string-setting",
 | 
				
			||||||
 | 
					        name = "hs-opt-text-animation",
 | 
				
			||||||
 | 
					        setting_type = "startup",
 | 
				
			||||||
 | 
					        default_value = "Default",
 | 
				
			||||||
 | 
					        allowed_values = allowed_values(),
 | 
				
			||||||
 | 
					        order = "h"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
							
								
								
									
										49
									
								
								holographic_signs/speech-bubbles.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								holographic_signs/speech-bubbles.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,49 @@
 | 
				
			|||||||
 | 
					-- v 1.2  -- custom hs-speech-bubble using unit_number 10/12/2021, 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function Entity_Speak(entity,text,seconds)
 | 
				
			||||||
 | 
					if entity and entity.valid then 
 | 
				
			||||||
 | 
						local id = entity.unit_number
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						if global.entity_speech[entity] then  --- clears olf format
 | 
				
			||||||
 | 
							global.entity_speech[entity].bubble.destroy()
 | 
				
			||||||
 | 
							global.entity_speech[entity] = nil
 | 
				
			||||||
 | 
							end	
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if global.entity_speech[id] then 
 | 
				
			||||||
 | 
							global.entity_speech[id].bubble.destroy()
 | 
				
			||||||
 | 
							global.entity_speech[id] = nil
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						  local bubble = entity.surface.create_entity({
 | 
				
			||||||
 | 
							name="hs-speech-bubble",
 | 
				
			||||||
 | 
							text=text,
 | 
				
			||||||
 | 
							position={0,0},
 | 
				
			||||||
 | 
							source=entity })
 | 
				
			||||||
 | 
						  
 | 
				
			||||||
 | 
							global.entity_speech[id] = {}
 | 
				
			||||||
 | 
							global.entity_speech[id].bubble=bubble
 | 
				
			||||||
 | 
							if seconds and seconds>0 then global.entity_speech[id].tick=game.tick+seconds*60 end
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					script.on_nth_tick(61, function (event)
 | 
				
			||||||
 | 
					for k, entity_speech in pairs (global.entity_speech) do
 | 
				
			||||||
 | 
						local bubble = entity_speech.bubble
 | 
				
			||||||
 | 
						local tick   = entity_speech.tick
 | 
				
			||||||
 | 
						if tick and game.tick >= tick then 
 | 
				
			||||||
 | 
							bubble.destroy()
 | 
				
			||||||
 | 
							entity_speech=nil
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					end)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function clear_speach_bubble(entity)
 | 
				
			||||||
 | 
					if entity and entity.valid then 
 | 
				
			||||||
 | 
						local id = entity.unit_number
 | 
				
			||||||
 | 
						if global.entity_speech[id] and global.entity_speech[id].bubble and global.entity_speech[id].bubble.valid then 
 | 
				
			||||||
 | 
							global.entity_speech[id].bubble.destroy()
 | 
				
			||||||
 | 
							global.entity_speech[id] = nil
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								holographic_signs/thumbnail.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								holographic_signs/thumbnail.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 27 KiB  | 
							
								
								
									
										186
									
								
								holographic_signs/utils.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										186
									
								
								holographic_signs/utils.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,186 @@
 | 
				
			|||||||
 | 
					require "util"
 | 
				
			||||||
 | 
					local format_number = util.format_number
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					local format_time   = util.formattime
 | 
				
			||||||
 | 
					function format_time_from_tick(ThatTick)
 | 
				
			||||||
 | 
					  if game.tick > ThatTick then return format_time(game.tick-ThatTick)
 | 
				
			||||||
 | 
					  else return format_time(ThatTick - game.tick)
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function format_t(tick)
 | 
				
			||||||
 | 
					return format_time(tick)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function getDayTimeString(surface)
 | 
				
			||||||
 | 
					 local daytime = surface.daytime + 0.5
 | 
				
			||||||
 | 
					 local dayminutes = math.floor(daytime * 24 * 60) % 60
 | 
				
			||||||
 | 
					 local dayhour = math.floor(daytime * 24 ) % 24
 | 
				
			||||||
 | 
					return string.format("%02d:%02d", dayhour, dayminutes)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function format_time_hour(tick)
 | 
				
			||||||
 | 
					return string.format("%d:%02d:%02d", math.floor(tick / 216000), math.floor(tick / 3600) % 60, math.floor(tick / 60) % 60)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function format_evolution(force)
 | 
				
			||||||
 | 
					 return string.format("%.2f", math.floor(force.evolution_factor * 1000) / 10)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function shortnumberstring(number)
 | 
				
			||||||
 | 
					    local steps = {
 | 
				
			||||||
 | 
					        {1,""},
 | 
				
			||||||
 | 
					        {1e3,"k"},
 | 
				
			||||||
 | 
					        {1e6,"m"},
 | 
				
			||||||
 | 
					        {1e9,"g"},
 | 
				
			||||||
 | 
					        {1e12,"t"},
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    for _,b in ipairs(steps) do
 | 
				
			||||||
 | 
					        if b[1] <= number+1 then
 | 
				
			||||||
 | 
					            steps.use = _
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    local result = string.format("%.1f", number / steps[steps.use][1])
 | 
				
			||||||
 | 
					    if tonumber(result) >= 1e3 and steps.use < #steps then
 | 
				
			||||||
 | 
					        steps.use = steps.use + 1
 | 
				
			||||||
 | 
					        result = string.format("%.1f", tonumber(result) / 1e3)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					    return result .. steps[steps.use][2]
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function my_format_number(number, maxed)
 | 
				
			||||||
 | 
					if not maxed then maxed=1000000000 end
 | 
				
			||||||
 | 
					local result 
 | 
				
			||||||
 | 
					if number < maxed then result=format_number(number)  --- 
 | 
				
			||||||
 | 
						else result=shortnumberstring(number) end
 | 
				
			||||||
 | 
					return result
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function get_gps_tag(position)
 | 
				
			||||||
 | 
					if get_gps_tag then 
 | 
				
			||||||
 | 
						return '[gps='..math.floor(position.x)..','..math.floor(position.y)..']'
 | 
				
			||||||
 | 
						else return ''
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					function iif( cond, val1, val2 )
 | 
				
			||||||
 | 
						if cond then
 | 
				
			||||||
 | 
							return val1
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
							return val2
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--for k,v in Sort_a_Table(your_table, function(t,a,b) return t[b] > t[a] end) do
 | 
				
			||||||
 | 
					function Sort_a_Table(t, order)
 | 
				
			||||||
 | 
					    -- collect the keys
 | 
				
			||||||
 | 
					    local keys = {}
 | 
				
			||||||
 | 
					    for k in pairs(t) do keys[#keys+1] = k end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    -- if order function given, sort by it by passing the table and keys a, b,
 | 
				
			||||||
 | 
					    -- otherwise just sort the keys 
 | 
				
			||||||
 | 
					    if order then
 | 
				
			||||||
 | 
					        table.sort(keys, function(a,b) return order(t, a, b) end)
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        table.sort(keys)
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    -- return the iterator function
 | 
				
			||||||
 | 
					    local i = 0
 | 
				
			||||||
 | 
					    return function()
 | 
				
			||||||
 | 
					        i = i + 1
 | 
				
			||||||
 | 
					        if keys[i] then
 | 
				
			||||||
 | 
					            return keys[i], t[keys[i]]
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					function add_list(list, obj)
 | 
				
			||||||
 | 
						-- to avoid duplicates...
 | 
				
			||||||
 | 
						for i, obj2 in pairs(list) do
 | 
				
			||||||
 | 
							if obj2 == obj then
 | 
				
			||||||
 | 
								return(false)
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
						table.insert(list,obj)
 | 
				
			||||||
 | 
						return(true)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					function del_list(list, obj)
 | 
				
			||||||
 | 
						for i, obj2 in pairs(list) do
 | 
				
			||||||
 | 
							if obj2 == obj then
 | 
				
			||||||
 | 
								table.remove( list, i )
 | 
				
			||||||
 | 
								return(true)
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
						return(false)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					--------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					function del_list2(list, list2)
 | 
				
			||||||
 | 
						for i, obj2 in pairs(list2) do del_list(list, obj2) end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					--------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					function in_list(list, obj)
 | 
				
			||||||
 | 
						for k, obj2 in pairs(list) do
 | 
				
			||||||
 | 
							if obj2 == obj then
 | 
				
			||||||
 | 
								return(k)
 | 
				
			||||||
 | 
							end
 | 
				
			||||||
 | 
						end
 | 
				
			||||||
 | 
						return(nil)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function Log(what)
 | 
				
			||||||
 | 
					game.write_file("hs.log", serpent.block(what), true)
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function dLog(what)
 | 
				
			||||||
 | 
					log(serpent.block(what))
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- research utils
 | 
				
			||||||
 | 
					function is_multilevel(technology)
 | 
				
			||||||
 | 
					  if technology.object_name == "LuaTechnology" then
 | 
				
			||||||
 | 
					    technology = technology.prototype
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					  return technology.level ~= technology.max_level
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					--- @param technology LuaTechnology
 | 
				
			||||||
 | 
					--- @param level uint
 | 
				
			||||||
 | 
					--- @return double
 | 
				
			||||||
 | 
					function get_research_progress(technology, level)
 | 
				
			||||||
 | 
					  local force = technology.force
 | 
				
			||||||
 | 
					  local current_research = force.current_research
 | 
				
			||||||
 | 
					  if current_research and current_research.name == technology.name then
 | 
				
			||||||
 | 
					    if not is_multilevel(technology) or technology.level == level then
 | 
				
			||||||
 | 
					      return force.research_progress
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      return 0
 | 
				
			||||||
 | 
					    end
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    return force.get_saved_technology_progress(technology) or 0
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					function get_research_unit_count(technology, level)
 | 
				
			||||||
 | 
					  local formula = technology.research_unit_count_formula
 | 
				
			||||||
 | 
					  if formula then
 | 
				
			||||||
 | 
					    local level = level or technology.level
 | 
				
			||||||
 | 
					    return math.floor(game.evaluate_expression(formula, { l = level, L = level }))
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    return math.floor(technology.research_unit_count) --[[@as double]]
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
@ -453,6 +453,11 @@
 | 
				
			|||||||
      "enabled": true
 | 
					      "enabled": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      "name": "holographic_signs",
 | 
				
			||||||
 | 
					      "enabled": true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      "name": "immersive-sounds",
 | 
					      "name": "immersive-sounds",
 | 
				
			||||||
      "enabled": true
 | 
					      "enabled": true
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								mod-settings.dat
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								mod-settings.dat
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							@ -1411,6 +1411,12 @@ bobmods.lib.tech.add_recipe_unlock("nitinol-processing", "angels-nitinol-pipe-to
 | 
				
			|||||||
--Для сборщика электроники нужны фиол. манипуляторы (AKMF)
 | 
					--Для сборщика электроники нужны фиол. манипуляторы (AKMF)
 | 
				
			||||||
bobmods.lib.tech.add_prerequisite("electronics-machine-3", "turbo-inserter")
 | 
					bobmods.lib.tech.add_prerequisite("electronics-machine-3", "turbo-inserter")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					--добавление табличек holographic_signs в технологию (AKMF)
 | 
				
			||||||
 | 
					if data.raw.recipe["hs_holo_sign"] then
 | 
				
			||||||
 | 
						data.raw["recipe"]["hs_holo_sign"].enabled = false
 | 
				
			||||||
 | 
						bobmods.lib.tech.add_recipe_unlock("circuit-network", "hs_holo_sign")
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
--Убрана левая печь из электо печи для сплавов (AKMF)
 | 
					--Убрана левая печь из электо печи для сплавов (AKMF)
 | 
				
			||||||
bobmods.lib.recipe.remove_ingredient("electric-mixing-furnace", "electric-chemical-furnace")
 | 
					bobmods.lib.recipe.remove_ingredient("electric-mixing-furnace", "electric-chemical-furnace")
 | 
				
			||||||
KaoExtended.recipe.addtorecipe("electric-mixing-furnace", {"electric-furnace", 1})
 | 
					KaoExtended.recipe.addtorecipe("electric-mixing-furnace", {"electric-furnace", 1})
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user