mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Merge pull request #3673 from VOREStation/aro-fridgetoss
Allow throwing items into smartfridges (sometimes)
This commit is contained in:
32
code/game/machinery/kitchen/smartfridge_vr.dm
Normal file
32
code/game/machinery/kitchen/smartfridge_vr.dm
Normal file
@@ -0,0 +1,32 @@
|
||||
/obj/machinery/smartfridge
|
||||
var/expert_job = "Chef"
|
||||
/obj/machinery/smartfridge/seeds
|
||||
expert_job = "Botanist"
|
||||
/obj/machinery/smartfridge/secure/extract
|
||||
expert_job = "Xenobiologist"
|
||||
/obj/machinery/smartfridge/secure/medbay
|
||||
expert_job = "Chemist"
|
||||
/obj/machinery/smartfridge/secure/virology
|
||||
expert_job = "Medical Doctor" //Virologist is an alt-title unfortunately
|
||||
/obj/machinery/smartfridge/chemistry
|
||||
expert_job = "Chemist" //Unsure what this one is used for, actually
|
||||
/obj/machinery/smartfridge/drinks
|
||||
expert_job = "Bartender"
|
||||
|
||||
// Allow thrown items into smartfridges
|
||||
/obj/machinery/smartfridge/throw_impact(var/atom/movable/A)
|
||||
. = ..()
|
||||
if(accept_check(A) && A.thrower)
|
||||
//Try to find what job they are via ID
|
||||
var/obj/item/weapon/card/id/thrower_id
|
||||
if(ismob(A.thrower))
|
||||
var/mob/T = A.thrower
|
||||
thrower_id = T.GetIdCard()
|
||||
|
||||
//98% chance the expert makes it
|
||||
if(expert_job && thrower_id && thrower_id.rank == expert_job && prob(98))
|
||||
stock(A)
|
||||
|
||||
//20% chance a non-expert makes it
|
||||
else if(prob(20))
|
||||
stock(A)
|
||||
Reference in New Issue
Block a user