[0.12.22]Custom player-entity item interactions inconsistent
Posted: Tue Jan 26, 2016 8:18 am
Creating a custom entity in a mod and changing a player to control that entity works great, and you can customize almost everything you want (e.g. YARM & Fat Controller remote viewing). However, one behavior strikes me as very inconsistent: even if you set the build_distance, drop_item_distance, reach_distance, and reach_resource_distance properties all to zero, the player-entity can still pick up items off of the ground.
I was expecting that since the build distance, drop distance, and reach distance are all zero, making building, dropping, and interacting with items impossible, that picking up items from the ground would also be impossible; however, this was not the case. I believe that the game should also prevent the player-entity from picking up items on the ground when all of these parameters are set to zero.
To be specific, I have defined the following entity:
The intention is to give an "eye in the sky" that can move around anywhere on the map and observe, but not interact. When moving the player controller over into this entity, things pretty much work as I would expect -- max health of zero means cannot be attacked, null collision means movement is unrestricted and one can "fly over" any part of the map, null animation gives the appearance of the god-controller. The only issue is picking up items off the ground... well, and the player-entity is still pushed around by belts and is affected by the concrete movement modifier, but that's a story for another bug report.
I was expecting that since the build distance, drop distance, and reach distance are all zero, making building, dropping, and interacting with items impossible, that picking up items from the ground would also be impossible; however, this was not the case. I believe that the game should also prevent the player-entity from picking up items on the ground when all of these parameters are set to zero.
To be specific, I have defined the following entity:
Code: Select all
{
type = "player",
name = "orbital-uplink",
icon = "__base__/graphics/icons/player.png",
flags = {"placeable-off-grid", "not-on-map", "not-repairable"},
max_health = 0,
healing_per_tick = 0,
collision_box = {{-0, -0}, {0, 0}},
selection_box = {{-0, -0}, {0, 0}},
crafting_categories = {},
mining_categories = {},
inventory_size = 0,
build_distance = 0,
drop_item_distance = 0,
reach_distance = 0,
reach_resource_distance = 0,
ticks_to_keep_gun = 0,
ticks_to_keep_aiming_direction = 0,
damage_hit_tint = {r = 0, g = 0, b = 0, a = 0},
running_speed = 1,
distance_per_frame = 0.13,
maximum_corner_sliding_distance = 0.7,
subgroup = "creatures",
order="z",
eat =
{
{
filename = "__base__/sound/eat.ogg",
volume = 0
}
},
heartbeat =
{
{
filename = "__base__/sound/heartbeat.ogg",
volume = 0
}
},
animations = {
level1 = null,
level2addon = null,
level3addon = null,
},
light = {{ intensity=0, size=0 }},
mining_speed = 0,
collision_mask = {},
mining_with_hands_particles_animation_positions = {},
mining_with_tool_particles_animation_positions = {},
running_sound_animation_positions = {}
}