Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sounds = require("__base__.prototypes.entity.sounds");
- local testunit = {
- type = "unit",
- name = "pig",
- icon = "__TestMod__/graphics/icons/testunit.png",
- icon_size = 64,
- flags = {"placeable-player", "placeable-enemy", "placeable-off-grid", "breaths-air", "not-repairable"},
- max_health = 50,
- order = "b-b-a",
- subgroup = "enemies",
- healing_per_tick = 0.01,
- collision_box = {{-0.3, -0.3}, {0.3, 0.3}},
- selection_box = {{-0.5, -1.5}, {0.5, 0.5}},
- attack_parameters =
- {
- type = "projectile",
- ammo_category = "melee",
- ammo_type = make_unit_melee_ammo_type(20),
- cooldown = 35,
- damage_modifier = 1,
- projectile_center = {0, 1},
- projectile_creation_distance = 0.6,
- range = 1,
- sound = sounds.biter_roars(0.4),
- animation = biterattackanimation(0.5, {r = 1, g = 1, b = 1, a = 1}, {r = 1, g = 1, b = 1, a = 1})
- },
- vision_distance = 30,
- movement_speed = 0.2,
- distance_per_frame = 0.1,
- pollution_to_join_attack = 200,
- distraction_cooldown = 300,
- min_pursue_time = 10 * 60,
- max_pursue_distance = 50,
- corpse = "medium-biter-corpse",
- dying_explosion = "blood-explosion-small",
- working_sound = sounds.biter_calls(0.4),
- dying_sound = sounds.biter_dying(0.9),
- run_animation =
- {
- layers =
- {
- {
- filenames = {
- "__TestMod__/graphics/unit/pig-01.png",
- "__TestMod__/graphics/unit/pig-02.png",
- "__TestMod__/graphics/unit/pig-03.png",
- "__TestMod__/graphics/unit/pig-04.png",
- },
- slice = 4,
- lines_per_file = 4,
- width = 238,
- height = 134,
- frame_count = 4,
- direction_count = 4,
- line_length = 4,
- animation_speed = 0.4,
- scale = 0.5
- }
- }
- },
- friendly = false,
- call_for_help_radius = 0
- }
- data:extend({
- testunit
- })
Advertisement
Add Comment
Please, Sign In to add comment