package com.tiedup.remake.state; import com.tiedup.remake.util.tasks.ItemTask; import org.jetbrains.annotations.Nullable; /** * Standalone sale state interface for entities that can be put up for sale. * * @see IRestrainable */ public interface ISaleable { /** * Check if this entity is marked for sale by a captor. * * @return true if captive is being sold */ boolean isForSell(); /** * Get the sale price for this captive. * * @return The sale price ItemTask, or null if not for sale */ @Nullable ItemTask getSalePrice(); /** * Mark this captive as for sale with the given price. * * @param price The sale price */ void putForSale(ItemTask price); /** * Cancel the sale and reset sale state. */ void cancelSale(); }