diff options
Diffstat (limited to 'client/map/tiles')
| -rw-r--r-- | client/map/tiles/deep_fryer.gd | 5 | ||||
| -rw-r--r-- | client/map/tiles/floor_like.gd | 1 | ||||
| -rw-r--r-- | client/map/tiles/tile.gd | 10 | 
3 files changed, 14 insertions, 2 deletions
| diff --git a/client/map/tiles/deep_fryer.gd b/client/map/tiles/deep_fryer.gd index b5951630..82204cb8 100644 --- a/client/map/tiles/deep_fryer.gd +++ b/client/map/tiles/deep_fryer.gd @@ -22,5 +22,10 @@ func _init(ctx: TileFactory.TileCC):  	super(ctx)  	base.add_child(deep_fryer) +func set_item(i: Item): +	super(i) +	if i != null: +		i.rotation_target = item_base.global_rotation.y + PI +  static func interact_target() -> Vector3:  	return Vector3(0., 0.55, 0.) diff --git a/client/map/tiles/floor_like.gd b/client/map/tiles/floor_like.gd index d3da5fe0..228a95e9 100644 --- a/client/map/tiles/floor_like.gd +++ b/client/map/tiles/floor_like.gd @@ -13,6 +13,7 @@  # You should have received a copy of the GNU Affero General Public License  # along with this program.  If not, see <https://www.gnu.org/licenses/>.  # +@abstract  class_name FloorLike  extends Tile diff --git a/client/map/tiles/tile.gd b/client/map/tiles/tile.gd index 7cf7be9b..9d4d732e 100644 --- a/client/map/tiles/tile.gd +++ b/client/map/tiles/tile.gd @@ -77,9 +77,15 @@ func pass_to(tile: Tile):  	tile.set_item(i)  func set_item(i: Item): -	if item != null: item.remove() +	if item != null: +		if i != null: +			i.rotation.y = item.rotation.y +			i.rotation_target = item.rotation_target +		item.remove()  	item = i -	if i != null: i.owned_by = item_base +	if i != null: +		i.owned_by = item_base +		i.position_target = item_base.global_position  func take_item() -> Item:  	var i = item | 
