mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
- Additional updates to brewing code. Added two more machines: Squeezer, which will destroy the food items stuffed into it, but return some of the food item's reagents (not coded yet, need to go through all reagents to see which are applicable); and a centrifuge, which removes common catalyst reagents from food items (currently just enzymes)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5541 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
//This dm file includes some food processing machines:
|
||||
// - I. Mill
|
||||
// - II. Fermenter
|
||||
// - III. Still
|
||||
// - IV. Squeezer
|
||||
// - V. Centrifuge
|
||||
|
||||
|
||||
|
||||
// I. The mill is intended to be loaded with produce and returns ground up items. For example: Wheat should become flour and grapes should become raisins.
|
||||
|
||||
/obj/machinery/mill
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/list/obj/item/weapon/reagent_containers/food/output = list()
|
||||
@@ -58,7 +69,14 @@
|
||||
F.loc = src.loc
|
||||
output -= F
|
||||
|
||||
/obj/machinery/fermentary
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// II. The fermenter is intended to be loaded with food items and returns medium-strength alcohol items, sucha s wine and beer.
|
||||
|
||||
/obj/machinery/fermenter
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/list/obj/item/weapon/reagent_containers/food/output = list()
|
||||
var/obj/item/weapon/reagent_containers/food/fermenting_item
|
||||
@@ -66,7 +84,7 @@
|
||||
var/busy = 0
|
||||
var/progress = 0
|
||||
var/error = 0
|
||||
name = "\improper Fermentary"
|
||||
name = "\improper Fermenter"
|
||||
desc = "It is a machine that ferments produce into alcoholic drinks."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
@@ -75,7 +93,7 @@
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 500
|
||||
|
||||
/obj/machinery/fermentary/process()
|
||||
/obj/machinery/fermenter/process()
|
||||
if(error)
|
||||
return
|
||||
|
||||
@@ -108,7 +126,7 @@
|
||||
del(fermenting_item)
|
||||
busy = 0
|
||||
|
||||
/obj/machinery/fermentary/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
|
||||
/obj/machinery/fermenter/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food))
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
@@ -116,16 +134,14 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/fermentary/attack_hand(var/mob/user as mob)
|
||||
/obj/machinery/fermenter/attack_hand(var/mob/user as mob)
|
||||
for(var/obj/item/weapon/reagent_containers/food/F in output)
|
||||
F.loc = src.loc
|
||||
output -= F
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// III. The still is a machine that is loaded with food items and returns hard liquor, such as vodka.
|
||||
|
||||
/obj/machinery/still
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
@@ -182,4 +198,96 @@
|
||||
/obj/machinery/still/attack_hand(var/mob/user as mob)
|
||||
for(var/obj/item/weapon/reagent_containers/food/F in output)
|
||||
F.loc = src.loc
|
||||
output -= F
|
||||
output -= F
|
||||
|
||||
|
||||
|
||||
|
||||
// IV. The squeezer is intended to destroy inserted food items, but return some of the reagents they contain.
|
||||
|
||||
/obj/machinery/squeezer
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/obj/item/weapon/reagent_containers/food/squeezed_item
|
||||
var/water_level = 0
|
||||
var/busy = 0
|
||||
var/progress = 0
|
||||
var/error = 0
|
||||
name = "\improper Squeezer"
|
||||
desc = "It is a machine that squeezes extracts from produce."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 500
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// V. The centrifuge spins inserted food items. It is intended to squeeze out the reagents that are common food catalysts (enzymes currently)
|
||||
|
||||
/obj/machinery/centrifuge
|
||||
var/list/obj/item/weapon/reagent_containers/food/input = list()
|
||||
var/list/obj/item/weapon/reagent_containers/food/output = list()
|
||||
var/obj/item/weapon/reagent_containers/food/spinning_item
|
||||
var/busy = 0
|
||||
var/progress = 0
|
||||
var/error = 0
|
||||
var/enzymes = 0
|
||||
var/water = 0
|
||||
name = "\improper Centrifuge"
|
||||
desc = "It is a machine that spins produce."
|
||||
icon_state = "autolathe"
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 10000
|
||||
|
||||
/obj/machinery/centrifuge/process()
|
||||
if(error)
|
||||
return
|
||||
|
||||
if(!busy)
|
||||
use_power = 1
|
||||
if(input.len)
|
||||
spinning_item = input[1]
|
||||
input -= spinning_item
|
||||
progress = 0
|
||||
busy = 1
|
||||
use_power = 2
|
||||
return
|
||||
|
||||
progress++
|
||||
if(progress < 10) //Edit this value to make milling faster or slower
|
||||
return //Not done yet.
|
||||
|
||||
var/transfer_enzymes = spinning_item.reagents.get_reagent_amount("enzyme")
|
||||
|
||||
if(transfer_enzymes)
|
||||
enzymes += transfer_enzymes
|
||||
spinning_item.reagents.remove_reagent("enzyme",transfer_enzymes)
|
||||
|
||||
output += spinning_item
|
||||
busy = 0
|
||||
|
||||
/obj/machinery/centrifuge/attackby(var/obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/reagent_containers/food))
|
||||
user.u_equip(W)
|
||||
W.loc = src
|
||||
input += W
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/centrifuge/attack_hand(var/mob/user as mob)
|
||||
for(var/obj/item/weapon/reagent_containers/food/F in output)
|
||||
F.loc = src.loc
|
||||
output -= F
|
||||
while(enzymes >= 50)
|
||||
enzymes -= 50
|
||||
new/obj/item/weapon/reagent_containers/food/condiment/enzyme(src.loc)
|
||||
|
||||
// /obj/item/weapon/reagent_containers/food/condiment/enzyme
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user