mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-16 08:02:36 +00:00
Moved 'building' entity definitions into 'structures', renamed building component to structure, moved svgs the same.
This commit is contained in:
27
lib/entities/structures/helipad.rb
Normal file
27
lib/entities/structures/helipad.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
tiles = [
|
||||
[false, false, false, false, false],
|
||||
[false, false, true, false, false],
|
||||
[false, true, true, true, false],
|
||||
[false, false, true, false, false],
|
||||
[false, false, false, false, false],
|
||||
]
|
||||
|
||||
IMICRTS::Entity.define_entity(:helipad, :structure, 1_000, 100, "Builds and rearms aircraft", tiles) do |entity|
|
||||
unless entity.proto_entity
|
||||
entity.has(:structure)
|
||||
entity.has(:waypoint)
|
||||
entity.has(:spawner)
|
||||
entity.has(:build_queue)
|
||||
entity.has(:sidebar_actions)
|
||||
entity.component(:sidebar_actions).add(:add_to_build_queue, { entity: :helicopter })
|
||||
end
|
||||
|
||||
entity.radius = 26
|
||||
entity.max_health = 100.0
|
||||
|
||||
entity.shell_image = "buildings/helipad/helipad_shell.png"
|
||||
entity.overlay_image = "buildings/helipad/helipad_overlay.png"
|
||||
|
||||
entity.on_tick do
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user