diff --git a/code/__DEFINES/food.dm b/code/__DEFINES/food.dm index b59162b943c..6853c609b32 100644 --- a/code/__DEFINES/food.dm +++ b/code/__DEFINES/food.dm @@ -64,11 +64,11 @@ ///Food price classes -#define FOOD_PRICE_TRASH 10 //cheap and quick. -#define FOOD_PRICE_CHEAP 40 //In line with prices of cheap snacks and foods you find in vending machine, practically disposable. -#define FOOD_PRICE_NORMAL 100 //Half a crate of profit, selling 4 of these lets you buy a kitchen crate from cargo. -#define FOOD_PRICE_EXOTIC 300 //Making one of these should be worth the time investment, solid chunk of profit. -#define FOOD_PRICE_LEGENDARY 1000 //Large windfall for making something from this list. +#define FOOD_PRICE_TRASH 25 //cheap and quick. +#define FOOD_PRICE_CHEAP 70 //In line with prices of cheap snacks and foods you find in vending machine, practically disposable. +#define FOOD_PRICE_NORMAL 150 //Half a crate of profit, selling 4 of these lets you buy a kitchen crate from cargo. +#define FOOD_PRICE_EXOTIC 450 //Making one of these should be worth the time investment, solid chunk of profit. +#define FOOD_PRICE_LEGENDARY 1300 //Large windfall for making something from this list. #define DRINK_PRICE_STOCK 20 diff --git a/code/controllers/subsystem/restaurant.dm b/code/controllers/subsystem/restaurant.dm index 7917c0fc77e..564155c62f9 100644 --- a/code/controllers/subsystem/restaurant.dm +++ b/code/controllers/subsystem/restaurant.dm @@ -11,8 +11,6 @@ SUBSYSTEM_DEF(restaurant) var/list/all_venues = list() ///All customer data datums that exist, assoc list of type - reference var/list/all_customers = list() - ///Seats claimed by robots. They want these. Don't be rude about it to them. assoc list of seat key and robot mob value - var/list/claimed_seats = list() ///Caches appearances of food, assoc list where key is the type of food, and value is the appearance. Used so we don't have to keep creating new food. Gets filled whenever a new food that hasn't been ordered gets ordered for the first time. var/list/food_appearance_cache = list() diff --git a/code/datums/ai/robot_customer/robot_customer_behaviors.dm b/code/datums/ai/robot_customer/robot_customer_behaviors.dm index 36608ff8101..be4e2c04e68 100644 --- a/code/datums/ai/robot_customer/robot_customer_behaviors.dm +++ b/code/datums/ai/robot_customer/robot_customer_behaviors.dm @@ -5,15 +5,16 @@ . = ..() var/mob/living/simple_animal/robot_customer/customer_pawn = controller.pawn var/datum/customer_data/customer_data = controller.blackboard[BB_CUSTOMER_CUSTOMERINFO] + var/datum/venue/attending_venue = controller.blackboard[BB_CUSTOMER_ATTENDING_VENUE] var/obj/structure/holosign/robot_seat/found_seat for(var/obj/structure/holosign/robot_seat/potential_seat in oview(7, controller.pawn)) - if(potential_seat.linked_venue != controller.blackboard[BB_CUSTOMER_ATTENDING_VENUE]) //Incorrect venue + if(potential_seat.linked_venue != attending_venue) //Incorrect venue continue - if(SSrestaurant.claimed_seats[potential_seat]) //Someone called dibs + if(attending_venue.linked_seats[potential_seat]) //Someone called dibs continue var/turf/seat_turf = get_turf(potential_seat) @@ -26,7 +27,7 @@ if(found_seat) customer_pawn.say(pick(customer_data.found_seat_lines)) controller.blackboard[BB_CUSTOMER_MY_SEAT] = found_seat - SSrestaurant.claimed_seats[found_seat] = customer_pawn + attending_venue.linked_seats[found_seat] = customer_pawn finish_action(controller, TRUE) else customer_pawn.say(pick(customer_data.cant_find_seat_lines)) diff --git a/code/modules/food_and_drinks/restaurant/_venue.dm b/code/modules/food_and_drinks/restaurant/_venue.dm index df7eb0272ce..690b9e0beaa 100644 --- a/code/modules/food_and_drinks/restaurant/_venue.dm +++ b/code/modules/food_and_drinks/restaurant/_venue.dm @@ -20,13 +20,15 @@ var/max_time_between_visitor = 90 SECONDS ///Required access to mess with the venue var/req_access = ACCESS_KITCHEN + ///Seats linked to this venue, assoc list of key holosign of seat position, and value of robot assigned to it, if any. + var/list/linked_seats = list() /datum/venue/process(delta_time) if(!COOLDOWN_FINISHED(src, visit_cooldown)) return COOLDOWN_START(src, visit_cooldown, rand(min_time_between_visitor, max_time_between_visitor)) - if(current_visitors.len < max_guests) + if(current_visitors.len < max_guests && current_visitors.len < linked_seats.len + 1) //Not above max guests, and not more than one waiting customer. create_new_customer() ///Spawns a new customer at the portal @@ -59,7 +61,7 @@ /datum/venue/proc/open() open = TRUE restaurant_portal.update_icon() - COOLDOWN_START(src, visit_cooldown, 10 SECONDS) //First one comes faster + COOLDOWN_START(src, visit_cooldown, 4 SECONDS) //First one comes faster START_PROCESSING(SSobj, src) /datum/venue/proc/close() @@ -179,11 +181,16 @@ /obj/structure/holosign/robot_seat/Initialize(loc, source_projector) . = ..() linked_venue = SSrestaurant.all_venues[linked_venue] + linked_venue.linked_seats[src] += null /obj/structure/holosign/robot_seat/attack_holosign(mob/living/user, list/modifiers) return /obj/structure/holosign/robot_seat/attacked_by(obj/item/I, mob/living/user) . = ..() - if(I.type == projector?.type && !SSrestaurant.claimed_seats[src]) + if(I.type == projector?.type && !linked_venue.linked_seats[src]) qdel(src) + +/obj/structure/holosign/robot_seat/Destroy() + linked_venue.linked_seats -= src + return ..() diff --git a/code/modules/food_and_drinks/restaurant/generic_venues.dm b/code/modules/food_and_drinks/restaurant/generic_venues.dm index d319d269a84..b9778418d3f 100644 --- a/code/modules/food_and_drinks/restaurant/generic_venues.dm +++ b/code/modules/food_and_drinks/restaurant/generic_venues.dm @@ -2,6 +2,9 @@ /datum/venue/restaurant name = "restaurant" req_access = ACCESS_KITCHEN + min_time_between_visitor = 80 SECONDS + max_time_between_visitor = 100 SECONDS + /datum/venue/restaurant/order_food(mob/living/simple_animal/robot_customer/customer_pawn, datum/customer_data/customer_data) var/obj/item/object_to_order = pickweight(customer_data.orderable_objects[type]) //Get what object we are ordering diff --git a/code/modules/mob/living/simple_animal/friendly/robot_customer.dm b/code/modules/mob/living/simple_animal/friendly/robot_customer.dm index 089e76e1185..9363cb1d654 100644 --- a/code/modules/mob/living/simple_animal/friendly/robot_customer.dm +++ b/code/modules/mob/living/simple_animal/friendly/robot_customer.dm @@ -35,14 +35,14 @@ ai_controller.blackboard[BB_CUSTOMER_PATIENCE] = customer_info.total_patience icon_state = customer_info.base_icon name = "[pick(customer_info.name_prefixes)]-bot ([customer_info.nationality])" - color = rgb(rand(150,255), rand(150,255), rand(150,255)) + color = rgb(rand(80,255), rand(80,255), rand(80,255)) update_icon() ///Clean up on the mobs seat etc when its deleted (Either by murder or because it left) /mob/living/simple_animal/robot_customer/Destroy() var/datum/venue/attending_venue = ai_controller.blackboard[BB_CUSTOMER_ATTENDING_VENUE] attending_venue.current_visitors -= src - SSrestaurant.claimed_seats[ai_controller.blackboard[BB_CUSTOMER_MY_SEAT]] = null + attending_venue.linked_seats[ai_controller.blackboard[BB_CUSTOMER_MY_SEAT]] = null QDEL_NULL(hud_to_show_on_hover) return ..()