mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
[MIRROR] Tweaks to robo-tourists (#3993)
* Tweaks to robo-tourists (#57497) balance: Robotourists pay more for food now qol: Only one robo-tourist will wait at the door at any time, preventing constant spam if you only have 2 seats. qol: more variation in robo-tourist colors * Tweaks to robo-tourists Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
@@ -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 ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user