mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 16:12:17 +00:00
[MIRROR] Ports cooker changes (#8005)
Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
var/container_type = null
|
||||
|
||||
var/combine_first = FALSE // If TRUE, this appliance will do combination cooking before checking recipes
|
||||
var/food_safety = FALSE //RS ADD - If true, the appliance automatically ejects food instead of burning it
|
||||
|
||||
/obj/machinery/appliance/Initialize()
|
||||
. = ..()
|
||||
@@ -354,7 +355,7 @@
|
||||
//Rescaling cooking work to avoid insanely long times for large things
|
||||
var/buffer = CI.max_cookwork
|
||||
CI.max_cookwork = 0
|
||||
var/multiplier = 1
|
||||
var/multiplier = 0.35
|
||||
var/step = 4
|
||||
while (buffer > step)
|
||||
buffer -= step
|
||||
@@ -404,7 +405,10 @@
|
||||
finish_cooking(CI)
|
||||
|
||||
else if (!CI.burned && CI.cookwork > min(CI.max_cookwork * CI.overcook_mult, CI.max_cookwork + 30))
|
||||
burn_food(CI)
|
||||
if(!food_safety)
|
||||
burn_food(CI)
|
||||
else
|
||||
eject(CI, null)
|
||||
|
||||
// Gotta hurt.
|
||||
for(var/obj/item/weapon/holder/H in CI.container.contents)
|
||||
@@ -644,7 +648,15 @@
|
||||
delete = 0
|
||||
else//If the container is empty OR contains more than one thing, then we must extract the container
|
||||
thing = CI.container
|
||||
if (!user || !user.put_in_hands(thing))
|
||||
|
||||
if (user)
|
||||
if(!user.put_in_hands(thing))
|
||||
thing.forceMove(get_turf(src))
|
||||
else if(istype(thing, /obj/item/weapon/reagent_containers/cooking_container))
|
||||
var/obj/item/weapon/reagent_containers/cooking_container/cc = thing
|
||||
cc.do_empty()
|
||||
delete = 0
|
||||
else
|
||||
thing.forceMove(get_turf(src))
|
||||
|
||||
if (delete)
|
||||
@@ -652,7 +664,13 @@
|
||||
qdel(CI)
|
||||
else
|
||||
CI.reset()//reset instead of deleting if the container is left inside
|
||||
user.visible_message("<span class='notice'>\The [user] remove \the [thing] from \the [src].</span>")
|
||||
|
||||
if(user)
|
||||
user.visible_message("<span class='notice'>\The [user] remove \the [thing] from \the [src].</span>")
|
||||
else
|
||||
src.visible_message("<b>\The [src]</b> pings as it automatically ejects its contents!")
|
||||
if(cooked_sound)
|
||||
playsound(get_turf(src), cooked_sound, 50, 1)
|
||||
|
||||
/obj/machinery/appliance/proc/cook_mob(var/mob/living/victim, var/mob/user)
|
||||
return
|
||||
@@ -782,3 +800,16 @@
|
||||
heating_power = initial(heating_power) + cap_rating * 25
|
||||
cooking_power = cooking_coeff * (1 + (scan_rating + cap_rating) / 20) // 100% eff. becomes 120%, 140%, 160% w/ better parts, thus rewarding upgrading the appliances during your shift.
|
||||
// to_world("RefreshParts returned cooking power of [cooking_power] during this step.") // Debug lines, uncomment if you need to test.
|
||||
|
||||
|
||||
/obj/machinery/appliance/verb/toggle_safety()
|
||||
set name = "Toggle Safety"
|
||||
set desc = "Toggles whether the appliance automatically ejects food when it starts to burn."
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!isliving(usr))
|
||||
return
|
||||
|
||||
food_safety = !food_safety
|
||||
to_chat(usr, "<span class = 'notice'>You flip \the [src]'s safe mode switch. Safe mode is now [food_safety ? "on" : "off"].</span>")
|
||||
@@ -5,7 +5,7 @@
|
||||
var/optimal_power = 0.6 //cooking power at 100% - This variable determines the MAXIMUM increase in do_cooking_ticks, once math goes through. If you want ticks of 0.5, set it to 0.5, etc.
|
||||
|
||||
var/loss = 1 //Temp lost per proc when equalising
|
||||
var/resistance = 32000 //Resistance to heating. combines with heating power to determine how long heating takes. 32k by default.
|
||||
var/resistance = 1200 //Resistance to heating. combines with heating power to determine how long heating takes. 32k by default.
|
||||
|
||||
var/light_x = 0
|
||||
var/light_y = 0
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// Power used to maintain temperature once it's heated.
|
||||
// Going with 25% of the active power. This is a somewhat arbitrary value.
|
||||
|
||||
resistance = 10 KILOWATTS // Approx. 10 minutes to heat up.
|
||||
resistance = 2 KILOWATTS // Approx. 2 minutes to heat up.
|
||||
|
||||
max_contents = 2
|
||||
container_type = /obj/item/weapon/reagent_containers/cooking_container/fryer
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// Grill is faster to heat and setup than the rest.
|
||||
optimal_temp = 120 + T0C
|
||||
min_temp = 60 + T0C
|
||||
resistance = 8 KILOWATTS // Very fast to heat up.
|
||||
resistance = 2 KILOWATTS // Very fast to heat up.
|
||||
|
||||
max_contents = 3 // Arbitrary number, 3 grill 'racks'
|
||||
container_type = /obj/item/weapon/reagent_containers/cooking_container/grill
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
heating_power = 6 KILOWATTS
|
||||
//Based on a double deck electric convection oven
|
||||
|
||||
resistance = 12 KILOWATTS // Approx. 12 minutes to heat up.
|
||||
resistance = 2 KILOWATTS // Approx. 2 minutes to heat up.
|
||||
idle_power_usage = 2 KILOWATTS
|
||||
//uses ~30% power to stay warm
|
||||
optimal_power = 0.8 // Oven cooks .2 faster than the default speed.
|
||||
|
||||
Reference in New Issue
Block a user