Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from abaines/Combat-Robot-Artillery-Projectile
Combat robot artillery projectile
- Loading branch information
Showing
18 changed files
with
186 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
-- Kizrak | ||
|
||
-- prototypes\combat-robot-misc.lua | ||
|
||
local sb = serpent.block -- luacheck: ignore 211 | ||
|
||
--------------------------------------------------------------------------------------------------- | ||
|
||
-- item/shell/ammo | ||
-- research | ||
-- recipe | ||
|
||
-- item the player carries | ||
local ammo = table.deepcopy(data.raw["ammo"]["artillery-shell"]) | ||
|
||
ammo.name = "la-combat-robot-artillery-shell" | ||
ammo.ammo_type.action.action_delivery.projectile="la-combat-robot-projectile-1" | ||
ammo.stack_size = 10 | ||
ammo.icon = "__lightArtillery__/graphics/icons/defender.png" | ||
ammo.icon_mipmaps = 1 | ||
|
||
data:extend{ammo} | ||
log("ammo:\n"..sb(ammo)) | ||
|
||
--------------------------------------------------------------------------------------------------- | ||
|
||
local recipe = { | ||
enabled = false, | ||
energy_required = 20, | ||
ingredients = { | ||
{"derpy-artillery-ammo",1}, | ||
{"defender-capsule",1}, | ||
{"repair-pack",1}, | ||
{type="fluid", name="water", amount=5}, | ||
}, | ||
category = "advanced-crafting", | ||
name = "la-combat-robot-artillery-shell-recipe", | ||
result = "la-combat-robot-artillery-shell", | ||
type = "recipe" | ||
} | ||
|
||
data:extend{recipe} | ||
log("recipe:\n"..sb(recipe)) | ||
|
||
--------------------------------------------------------------------------------------------------- | ||
|
||
local technology = { | ||
effects = {{ | ||
recipe = "la-combat-robot-artillery-shell-recipe", | ||
type = "unlock-recipe" | ||
}}, | ||
icon = "__lightArtillery__/graphics/defender-ammo.png", | ||
icon_size = 128, | ||
name = "la-combat-robot-artillery-shell-research", | ||
prerequisites = { | ||
"combat-robotics", | ||
"derpy-artillery" | ||
}, | ||
type = "technology", | ||
unit = { | ||
count = 5, | ||
ingredients = { | ||
{"automation-science-pack",1}, | ||
{"logistic-science-pack",1}, | ||
{"military-science-pack",1}, | ||
}, | ||
time = 5 | ||
} | ||
} | ||
|
||
data:extend{technology} | ||
log("technology:\n"..sb(technology)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
-- Kizrak | ||
|
||
-- prototypes\combat-robot-weapon.lua | ||
|
||
local sb = serpent.block -- luacheck: ignore 211 | ||
|
||
--------------------------------------------------------------------------------------------------- | ||
|
||
-- projectile/artillery-projectile | ||
-- damage/robot | ||
-- actions & triggers | ||
|
||
-- thing that flies through air and does damage | ||
local artillery_projectile = table.deepcopy(data.raw["artillery-projectile"]["artillery-projectile"]) | ||
|
||
artillery_projectile.name = "la-combat-robot-projectile-1" | ||
|
||
artillery_projectile.action.action_delivery.target_effects = { | ||
{ | ||
action = { | ||
action_delivery = { | ||
target_effects = { | ||
{ | ||
damage = { | ||
amount = 4, | ||
type = "electric" | ||
}, | ||
type = "damage" | ||
}, | ||
}, | ||
type = "instant" | ||
}, | ||
radius = 8, | ||
type = "area" | ||
}, | ||
type = "nested-result" | ||
}, | ||
{ | ||
initial_height = 0, | ||
max_radius = 3.5, | ||
offset_deviation = { { -4, -4 }, { 4, 4 } }, | ||
repeat_count = 240, | ||
smoke_name = "artillery-smoke", | ||
speed_from_center = 0.05, | ||
speed_from_center_deviation = 0.005, | ||
type = "create-trivial-smoke" | ||
}, | ||
{ | ||
entity_name = "big-artillery-explosion", | ||
type = "create-entity" | ||
}, | ||
{ | ||
type = "create-entity", | ||
show_in_tooltip = true, | ||
entity_name = "la-defender", | ||
offset_deviation = {{-4, -4}, {4, 4}}, | ||
}, | ||
} | ||
|
||
data:extend{artillery_projectile} | ||
--log("artillery_projectile.action:\n"..sb(artillery_projectile.action)) | ||
|
||
--------------------------------------------------------------------------------------------------- | ||
|
||
local defender = table.deepcopy(data.raw["combat-robot"]["defender"]) | ||
|
||
defender.name = "la-defender" | ||
defender.follows_player = false | ||
defender.range_from_player = nil | ||
defender.speed = 0 | ||
defender.friction = 1 | ||
|
||
data:extend{defender} | ||
|
||
local defenderL = table.deepcopy(defender) | ||
|
||
defenderL.destroy_action.action_delivery.source_effects = nil | ||
defenderL.attack_parameters.sound = nil | ||
|
||
defenderL.damaged_trigger_effect = nil | ||
defenderL.dying_trigger_effect = nil | ||
defenderL.collision_box = nil | ||
|
||
defenderL.idle = nil | ||
defenderL.in_motion = nil | ||
defenderL.shadow_idle = nil | ||
defenderL.shadow_in_motion = nil | ||
defenderL.water_reflection = nil | ||
|
||
log("defender:\n"..sb(defenderL)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters