LuaGameScript.get_data_raw()
Re: LuaGameScript.get_data_raw()
If you want to get ahold of me I'm almost always on Discord.
Re: LuaGameScript.get_data_raw()
There's no mention of them in the API documentation. Some do seem to work but others don'tRseding91 wrote:All of these already exists through http://lua-api.factorio.com/latest/LuaI ... parametersEarendel wrote: gun.attack_parameters.sound
gun.attack_parameters.shell_particle
gun.attack_parameters.shell_particle.name
gun.attack_parameters.shell_particle.speed
gun.attack_parameters.shell_particle.starting_frame_speed
gun.attack_parameters.projectile_center
gun.attack_parameters.gun_center_shift
gun.attack_parameters.projectile_creation_distance
/c game.print(game.item_prototypes["pistol"].attack_parameters["projectile_center"]) -- works
flamethrower definition:
gun_barrel_length = 0.8,
gun_center_shift = { 0, -1 },
/c game.print(game.item_prototypes["flamethrower"].attack_parameters["gun_barrel_length"]) -- fails
/c game.print(game.item_prototypes["flamethrower"].attack_parameters["gun_center_shift"]) -- fails
Just off the top of my head, data.raw definition uses "source_effects", but the API version uses "source_effect":Rseding91 wrote:I mirrored the input format as far as I remember so there should be no confusion.Earendel wrote:ammo.ammo_type -- I'm not sure how much (if any) is missing here, the API format is different and there are a lot of possibilities to check due to nesting.
/c game.print(#game.item_prototypes["firearm-magazine"].get_ammo_type().action[1].action_delivery[1].source_effects) -- error
/c game.print(#game.item_prototypes["firearm-magazine"].get_ammo_type().action[1].action_delivery[1].source_effect) -- prints 2
The icon is mainly to get access to the tint. Animation speed is so that an animation can be forced to run on a vehicle by artificially boosting it's speed. If there was some other way to force a minimum animation speed or 'idle' animation an a vehicle then this would not be required.Rseding91 wrote:What use could those be? We don't support rendering specific images so I'm having a hard time trying to figure out what they would ever be useful for.Earendel wrote:car.turret_animation
car.animation
car.animation.layers
car.animation.layers[].animation_speed
*.icon
*.icon[] -- getting layers of icons
Re: LuaGameScript.get_data_raw()
Thanks for pointing out the flamethrower ones - the property tree changes in 0.15 broke those. I've fixed them for 0.15.10.
They're not mentioned in the API documentation because it's the same as prototype documentation: filling all that out would take more time than it's worth because we keep changing them.
Also I fixed the two "source_effect" -> "source_effects" and "target_effect" -> "target_effects" for 0.15.10 as well.
They're not mentioned in the API documentation because it's the same as prototype documentation: filling all that out would take more time than it's worth because we keep changing them.
Also I fixed the two "source_effect" -> "source_effects" and "target_effect" -> "target_effects" for 0.15.10 as well.
If you want to get ahold of me I'm almost always on Discord.
Re: LuaGameScript.get_data_raw()
Thanks, would you like me to add the ones already mentioned to the new thread?
Re: LuaGameScript.get_data_raw()
Yes please.Earendel wrote:Thanks, would you like me to add the ones already mentioned to the new thread?
If you want to get ahold of me I'm almost always on Discord.