404: Station not found
" diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index c27272a421..13607dcb76 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -267,7 +267,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) AddInteraction("Reopened by [key_name_admin(usr)]") if(initiator) - to_chat(initiator, "Ticket [TicketHref("#[id]")] was reopened by [key_name(usr)].") + to_chat(initiator, "Ticket [TicketHref("#[id]")] was reopened by [key_name(usr,FALSE,FALSE)].") var/msg = "Ticket [TicketHref("#[id]")] reopened by [key_name_admin(usr)]." message_admins(msg) log_admin(msg) @@ -293,7 +293,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) GLOB.ahelp_tickets.ListInsert(src) AddInteraction("Closed by [key_name_admin(usr)].") if(initiator) - to_chat(initiator, "Ticket [TicketHref("#[id]")] was closed by [key_name(usr)].") + to_chat(initiator, "Ticket [TicketHref("#[id]")] was closed by [key_name(usr,FALSE,FALSE)].") if(!silent) feedback_inc("ahelp_close") var/msg = "Ticket [TicketHref("#[id]")] closed by [key_name_admin(usr)]." @@ -310,7 +310,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) AddInteraction("Resolved by [key_name_admin(usr)].") if(initiator) - to_chat(initiator, "Ticket [TicketHref("#[id]")] was marked resolved by [key_name(usr)].") + to_chat(initiator, "Ticket [TicketHref("#[id]")] was marked resolved by [key_name(usr,FALSE,FALSE)].") if(!silent) feedback_inc("ahelp_resolve") var/msg = "Ticket [TicketHref("#[id]")] resolved by [key_name_admin(usr)]" @@ -360,13 +360,13 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) if(state != AHELP_ACTIVE) return - var/msg = "Your AdminHelp is being handled by [key_name(usr)] please be patient." + var/msg = "Your AdminHelp is being handled by [key_name(usr,FALSE,FALSE)] please be patient." if(initiator) to_chat(initiator, msg) feedback_inc("ahelp_icissue") - msg = "Ticket [TicketHref("#[id]")] being handled by [key_name(usr)]" + msg = "Ticket [TicketHref("#[id]")] being handled by [key_name(usr,FALSE,FALSE)]" message_admins(msg) log_admin(msg) AddInteraction("[key_name_admin(usr)] is now handling this ticket.") @@ -550,7 +550,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) . = list("total" = list(), "noflags" = list(), "afk" = list(), "stealth" = list(), "present" = list()) for(var/client/X in admins) .["total"] += X - if(requiredflags != 0 && !check_rights(rights_required = requiredflags, show_msg = FALSE, C = X)) //VOREStation Edit + if(requiredflags != 0 && !check_rights(rights_required = requiredflags, show_msg = FALSE, C = X)) .["noflags"] += X else if(X.is_afk()) .["afk"] += X @@ -659,4 +659,4 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) else return founds - return msg \ No newline at end of file + return msg diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm index 583f491d5e..058c1118ca 100644 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm @@ -94,7 +94,7 @@ usable = 1 engage_string = "Configure RCD" - device_type = /obj/item/weapon/rcd/mounted + device_type = /obj/item/weapon/rcd/electric/mounted/rig /obj/item/rig_module/device/New() ..() diff --git a/code/modules/clothing/spacesuits/void/station_vr.dm b/code/modules/clothing/spacesuits/void/station_vr.dm deleted file mode 100644 index d349971a05..0000000000 --- a/code/modules/clothing/spacesuits/void/station_vr.dm +++ /dev/null @@ -1,42 +0,0 @@ -//Exploration -/obj/item/clothing/head/helmet/space/void/exploration - name = "exploration voidsuit helmet" - desc = "A radiation-resistant helmet made especially for exploring unknown planetary environments." - icon_state = "helm_explorer" - item_state = "helm_explorer" - armor = list(melee = 40, bullet = 15, laser = 25,energy = 35, bomb = 30, bio = 100, rad = 70) - light_overlay = "helmet_light_dual" //explorer_light - -/obj/item/clothing/suit/space/void/exploration - name = "exploration voidsuit" - desc = "A lightweight, radiation-resistant voidsuit, featuring the Explorer emblem on its chest plate. Designed for exploring unknown planetary environments." - icon_state = "void_explorer" - armor = list(melee = 40, bullet = 15, laser = 25,energy = 35, bomb = 30, bio = 100, rad = 70) - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/stack/flag,/obj/item/device/healthanalyzer,/obj/item/device/gps,/obj/item/device/radio/beacon,/obj/item/weapon/shovel) - -/obj/item/clothing/suit/space/void/exploration/prepared - helmet = /obj/item/clothing/head/helmet/space/void/exploration - boots = /obj/item/clothing/shoes/magboots - -//Pilot -/obj/item/clothing/head/helmet/space/void/pilot - desc = "An atmos resistant helmet for space and planet exploration." - name = "pilot voidsuit helmet" - icon_state = "rig0_pilot" - item_state = "pilot_helm" - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 15, bio = 100, rad = 50) - max_heat_protection_temperature = FIRE_HELMET_MAX_HEAT_PROTECTION_TEMPERATURE - light_overlay = "helmet_light_dual" - -/obj/item/clothing/suit/space/void/pilot - desc = "An atmos resistant voidsuit for space and planet exploration." - icon_state = "rig-pilot" - item_state = "rig-pilot" - name = "pilot voidsuit" - armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 15, bio = 100, rad = 50) - max_heat_protection_temperature = FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/toolbox,/obj/item/weapon/storage/briefcase/inflatable,/obj/item/device/t_scanner,/obj/item/weapon/rcd) - -/obj/item/clothing/suit/space/void/pilot/prepared - helmet = /obj/item/clothing/head/helmet/space/void/pilot - boots = /obj/item/clothing/shoes/magboots \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/drinkingglass/drinkingglass.dm b/code/modules/food/drinkingglass/drinkingglass.dm similarity index 100% rename from code/modules/reagents/reagent_containers/drinkingglass/drinkingglass.dm rename to code/modules/food/drinkingglass/drinkingglass.dm diff --git a/code/modules/reagents/reagent_containers/drinkingglass/extras.dm b/code/modules/food/drinkingglass/extras.dm similarity index 100% rename from code/modules/reagents/reagent_containers/drinkingglass/extras.dm rename to code/modules/food/drinkingglass/extras.dm diff --git a/code/modules/reagents/reagent_containers/drinkingglass/glass_boxes.dm b/code/modules/food/drinkingglass/glass_boxes.dm similarity index 100% rename from code/modules/reagents/reagent_containers/drinkingglass/glass_boxes.dm rename to code/modules/food/drinkingglass/glass_boxes.dm diff --git a/code/modules/reagents/reagent_containers/drinkingglass/glass_types.dm b/code/modules/food/drinkingglass/glass_types.dm similarity index 100% rename from code/modules/reagents/reagent_containers/drinkingglass/glass_types.dm rename to code/modules/food/drinkingglass/glass_types.dm diff --git a/code/modules/reagents/reagent_containers/drinkingglass/metaglass.dm b/code/modules/food/drinkingglass/metaglass.dm similarity index 100% rename from code/modules/reagents/reagent_containers/drinkingglass/metaglass.dm rename to code/modules/food/drinkingglass/metaglass.dm diff --git a/code/modules/reagents/reagent_containers/drinkingglass/shaker.dm b/code/modules/food/drinkingglass/shaker.dm similarity index 100% rename from code/modules/reagents/reagent_containers/drinkingglass/shaker.dm rename to code/modules/food/drinkingglass/shaker.dm diff --git a/code/modules/reagents/reagent_containers/food.dm b/code/modules/food/food.dm similarity index 97% rename from code/modules/reagents/reagent_containers/food.dm rename to code/modules/food/food.dm index a99c9cdf24..330dfaab7e 100644 --- a/code/modules/reagents/reagent_containers/food.dm +++ b/code/modules/food/food.dm @@ -1,38 +1,38 @@ -#define CELLS 8 -#define CELLSIZE (32/CELLS) - -//////////////////////////////////////////////////////////////////////////////// -/// Food. -//////////////////////////////////////////////////////////////////////////////// -/obj/item/weapon/reagent_containers/food - possible_transfer_amounts = null - volume = 50 //Sets the default container amount for all food items. - var/filling_color = "#FFFFFF" //Used by sandwiches. - - var/list/center_of_mass = list() // Used for table placement - -/obj/item/weapon/reagent_containers/food/New() - ..() - if (center_of_mass.len && !pixel_x && !pixel_y) - src.pixel_x = rand(-6.0, 6) //Randomizes postion - src.pixel_y = rand(-6.0, 6) - -/obj/item/weapon/reagent_containers/food/afterattack(atom/A, mob/user, proximity, params) - if(center_of_mass.len && proximity && params && istype(A, /obj/structure/table)) - //Places the item on a grid - var/list/mouse_control = params2list(params) - - var/mouse_x = text2num(mouse_control["icon-x"]) - var/mouse_y = text2num(mouse_control["icon-y"]) - - if(!isnum(mouse_x) || !isnum(mouse_y)) - return - - var/cell_x = max(0, min(CELLS-1, round(mouse_x/CELLSIZE))) - var/cell_y = max(0, min(CELLS-1, round(mouse_y/CELLSIZE))) - - pixel_x = (CELLSIZE * (0.5 + cell_x)) - center_of_mass["x"] - pixel_y = (CELLSIZE * (0.5 + cell_y)) - center_of_mass["y"] - -#undef CELLS -#undef CELLSIZE +#define CELLS 8 +#define CELLSIZE (32/CELLS) + +//////////////////////////////////////////////////////////////////////////////// +/// Food. +//////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/food + possible_transfer_amounts = null + volume = 50 //Sets the default container amount for all food items. + var/filling_color = "#FFFFFF" //Used by sandwiches. + + var/list/center_of_mass = list() // Used for table placement + +/obj/item/weapon/reagent_containers/food/New() + ..() + if (center_of_mass.len && !pixel_x && !pixel_y) + src.pixel_x = rand(-6.0, 6) //Randomizes postion + src.pixel_y = rand(-6.0, 6) + +/obj/item/weapon/reagent_containers/food/afterattack(atom/A, mob/user, proximity, params) + if(center_of_mass.len && proximity && params && istype(A, /obj/structure/table)) + //Places the item on a grid + var/list/mouse_control = params2list(params) + + var/mouse_x = text2num(mouse_control["icon-x"]) + var/mouse_y = text2num(mouse_control["icon-y"]) + + if(!isnum(mouse_x) || !isnum(mouse_y)) + return + + var/cell_x = max(0, min(CELLS-1, round(mouse_x/CELLSIZE))) + var/cell_y = max(0, min(CELLS-1, round(mouse_y/CELLSIZE))) + + pixel_x = (CELLSIZE * (0.5 + cell_x)) - center_of_mass["x"] + pixel_y = (CELLSIZE * (0.5 + cell_y)) - center_of_mass["y"] + +#undef CELLS +#undef CELLSIZE diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/food/food/cans.dm similarity index 100% rename from code/modules/reagents/reagent_containers/food/cans.dm rename to code/modules/food/food/cans.dm diff --git a/code/modules/reagents/reagent_containers/food/condiment.dm b/code/modules/food/food/condiment.dm similarity index 97% rename from code/modules/reagents/reagent_containers/food/condiment.dm rename to code/modules/food/food/condiment.dm index 7257ac65b1..8ab7f34c79 100644 --- a/code/modules/reagents/reagent_containers/food/condiment.dm +++ b/code/modules/food/food/condiment.dm @@ -1,178 +1,178 @@ - -///////////////////////////////////////////////Condiments -//Notes by Darem: The condiments food-subtype is for stuff you don't actually eat but you use to modify existing food. They all -// leave empty containers when used up and can be filled/re-filled with other items. Formatting for first section is identical -// to mixed-drinks code. If you want an object that starts pre-loaded, you need to make it in addition to the other code. - -//Food items that aren't eaten normally and leave an empty container behind. -/obj/item/weapon/reagent_containers/food/condiment - name = "Condiment Container" - desc = "Just your average condiment container." - icon = 'icons/obj/food.dmi' - icon_state = "emptycondiment" - flags = OPENCONTAINER - possible_transfer_amounts = list(1,5,10) - center_of_mass = list("x"=16, "y"=6) - volume = 50 - -/obj/item/weapon/reagent_containers/food/condiment/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) - return - -/obj/item/weapon/reagent_containers/food/condiment/attack_self(var/mob/user as mob) - return - -/obj/item/weapon/reagent_containers/food/condiment/attack(var/mob/M as mob, var/mob/user as mob, var/def_zone) - if(standard_feed_mob(user, M)) - return - -/obj/item/weapon/reagent_containers/food/condiment/afterattack(var/obj/target, var/mob/user, var/flag) - if(standard_dispenser_refill(user, target)) - return - if(standard_pour_into(user, target)) - return - - if(istype(target, /obj/item/weapon/reagent_containers/food/snacks)) // These are not opencontainers but we can transfer to them - if(!reagents || !reagents.total_volume) - user << "There is no condiment left in \the [src]." - return - - if(!target.reagents.get_free_space()) - user << "You can't add more condiment to \the [target]." - return - - var/trans = reagents.trans_to_obj(target, amount_per_transfer_from_this) - user << "You add [trans] units of the condiment to \the [target]." - else - ..() - -/obj/item/weapon/reagent_containers/food/condiment/feed_sound(var/mob/user) - playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) - -/obj/item/weapon/reagent_containers/food/condiment/self_feed_message(var/mob/user) - user << "You swallow some of contents of \the [src]." - -/obj/item/weapon/reagent_containers/food/condiment/on_reagent_change() - if(reagents.reagent_list.len > 0) - switch(reagents.get_master_reagent_id()) - if("ketchup") - name = "Ketchup" - desc = "You feel more American already." - icon_state = "ketchup" - center_of_mass = list("x"=16, "y"=6) - if("capsaicin") - name = "Hotsauce" - desc = "You can almost TASTE the stomach ulcers now!" - icon_state = "hotsauce" - center_of_mass = list("x"=16, "y"=6) - if("enzyme") - name = "Universal Enzyme" - desc = "Used in cooking various dishes." - icon_state = "enzyme" - center_of_mass = list("x"=16, "y"=6) - if("soysauce") - name = "Soy Sauce" - desc = "A salty soy-based flavoring." - icon_state = "soysauce" - center_of_mass = list("x"=16, "y"=6) - if("frostoil") - name = "Coldsauce" - desc = "Leaves the tongue numb in its passage." - icon_state = "coldsauce" - center_of_mass = list("x"=16, "y"=6) - if("sodiumchloride") - name = "Salt Shaker" - desc = "Salt. From space oceans, presumably." - icon_state = "saltshaker" - center_of_mass = list("x"=16, "y"=10) - if("blackpepper") - name = "Pepper Mill" - desc = "Often used to flavor food or make people sneeze." - icon_state = "peppermillsmall" - center_of_mass = list("x"=16, "y"=10) - if("cornoil") - name = "Corn Oil" - desc = "A delicious oil used in cooking. Made from corn." - icon_state = "oliveoil" - center_of_mass = list("x"=16, "y"=6) - if("sugar") - name = "Sugar" - desc = "Tastey space sugar!" - center_of_mass = list("x"=16, "y"=6) - else - name = "Misc Condiment Bottle" - if (reagents.reagent_list.len==1) - desc = "Looks like it is [reagents.get_master_reagent_name()], but you are not sure." - else - desc = "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them." - icon_state = "mixedcondiments" - center_of_mass = list("x"=16, "y"=6) - else - icon_state = "emptycondiment" - name = "Condiment Bottle" - desc = "An empty condiment bottle." - center_of_mass = list("x"=16, "y"=6) - return - -/obj/item/weapon/reagent_containers/food/condiment/enzyme - name = "Universal Enzyme" - desc = "Used in cooking various dishes." - icon_state = "enzyme" - -/obj/item/weapon/reagent_containers/food/condiment/enzyme/New() - ..() - reagents.add_reagent("enzyme", 50) - -/obj/item/weapon/reagent_containers/food/condiment/sugar/New() - ..() - reagents.add_reagent("sugar", 50) - -/obj/item/weapon/reagent_containers/food/condiment/small - possible_transfer_amounts = list(1,20) - amount_per_transfer_from_this = 1 - volume = 20 - center_of_mass = list() - -/obj/item/weapon/reagent_containers/food/condiment/small/on_reagent_change() - return - -/obj/item/weapon/reagent_containers/food/condiment/small/saltshaker //Seperate from above since it's a small shaker rather then - name = "salt shaker" // a large one. - desc = "Salt. From space oceans, presumably." - icon_state = "saltshakersmall" - -/obj/item/weapon/reagent_containers/food/condiment/small/saltshaker/New() - ..() - reagents.add_reagent("sodiumchloride", 20) - -/obj/item/weapon/reagent_containers/food/condiment/small/peppermill - name = "pepper mill" - desc = "Often used to flavor food or make people sneeze." - icon_state = "peppermillsmall" - -/obj/item/weapon/reagent_containers/food/condiment/small/peppermill/New() - ..() - reagents.add_reagent("blackpepper", 20) - -/obj/item/weapon/reagent_containers/food/condiment/small/sugar - name = "sugar" - desc = "Sweetness in a bottle" - icon_state = "sugarsmall" - -/obj/item/weapon/reagent_containers/food/condiment/small/sugar/New() - ..() - reagents.add_reagent("sugar", 20) - -/obj/item/weapon/reagent_containers/food/condiment/flour - name = "flour sack" - desc = "A big bag of flour. Good for baking!" - icon = 'icons/obj/food.dmi' - icon_state = "flour" - -/obj/item/weapon/reagent_containers/food/condiment/flour/on_reagent_change() - return - -/obj/item/weapon/reagent_containers/food/condiment/flour/New() - ..() - reagents.add_reagent("flour", 30) - src.pixel_x = rand(-10.0, 10) - src.pixel_y = rand(-10.0, 10) + +///////////////////////////////////////////////Condiments +//Notes by Darem: The condiments food-subtype is for stuff you don't actually eat but you use to modify existing food. They all +// leave empty containers when used up and can be filled/re-filled with other items. Formatting for first section is identical +// to mixed-drinks code. If you want an object that starts pre-loaded, you need to make it in addition to the other code. + +//Food items that aren't eaten normally and leave an empty container behind. +/obj/item/weapon/reagent_containers/food/condiment + name = "Condiment Container" + desc = "Just your average condiment container." + icon = 'icons/obj/food.dmi' + icon_state = "emptycondiment" + flags = OPENCONTAINER + possible_transfer_amounts = list(1,5,10) + center_of_mass = list("x"=16, "y"=6) + volume = 50 + +/obj/item/weapon/reagent_containers/food/condiment/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) + return + +/obj/item/weapon/reagent_containers/food/condiment/attack_self(var/mob/user as mob) + return + +/obj/item/weapon/reagent_containers/food/condiment/attack(var/mob/M as mob, var/mob/user as mob, var/def_zone) + if(standard_feed_mob(user, M)) + return + +/obj/item/weapon/reagent_containers/food/condiment/afterattack(var/obj/target, var/mob/user, var/flag) + if(standard_dispenser_refill(user, target)) + return + if(standard_pour_into(user, target)) + return + + if(istype(target, /obj/item/weapon/reagent_containers/food/snacks)) // These are not opencontainers but we can transfer to them + if(!reagents || !reagents.total_volume) + user << "There is no condiment left in \the [src]." + return + + if(!target.reagents.get_free_space()) + user << "You can't add more condiment to \the [target]." + return + + var/trans = reagents.trans_to_obj(target, amount_per_transfer_from_this) + user << "You add [trans] units of the condiment to \the [target]." + else + ..() + +/obj/item/weapon/reagent_containers/food/condiment/feed_sound(var/mob/user) + playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) + +/obj/item/weapon/reagent_containers/food/condiment/self_feed_message(var/mob/user) + user << "You swallow some of contents of \the [src]." + +/obj/item/weapon/reagent_containers/food/condiment/on_reagent_change() + if(reagents.reagent_list.len > 0) + switch(reagents.get_master_reagent_id()) + if("ketchup") + name = "Ketchup" + desc = "You feel more American already." + icon_state = "ketchup" + center_of_mass = list("x"=16, "y"=6) + if("capsaicin") + name = "Hotsauce" + desc = "You can almost TASTE the stomach ulcers now!" + icon_state = "hotsauce" + center_of_mass = list("x"=16, "y"=6) + if("enzyme") + name = "Universal Enzyme" + desc = "Used in cooking various dishes." + icon_state = "enzyme" + center_of_mass = list("x"=16, "y"=6) + if("soysauce") + name = "Soy Sauce" + desc = "A salty soy-based flavoring." + icon_state = "soysauce" + center_of_mass = list("x"=16, "y"=6) + if("frostoil") + name = "Coldsauce" + desc = "Leaves the tongue numb in its passage." + icon_state = "coldsauce" + center_of_mass = list("x"=16, "y"=6) + if("sodiumchloride") + name = "Salt Shaker" + desc = "Salt. From space oceans, presumably." + icon_state = "saltshaker" + center_of_mass = list("x"=16, "y"=10) + if("blackpepper") + name = "Pepper Mill" + desc = "Often used to flavor food or make people sneeze." + icon_state = "peppermillsmall" + center_of_mass = list("x"=16, "y"=10) + if("cornoil") + name = "Corn Oil" + desc = "A delicious oil used in cooking. Made from corn." + icon_state = "oliveoil" + center_of_mass = list("x"=16, "y"=6) + if("sugar") + name = "Sugar" + desc = "Tastey space sugar!" + center_of_mass = list("x"=16, "y"=6) + else + name = "Misc Condiment Bottle" + if (reagents.reagent_list.len==1) + desc = "Looks like it is [reagents.get_master_reagent_name()], but you are not sure." + else + desc = "A mixture of various condiments. [reagents.get_master_reagent_name()] is one of them." + icon_state = "mixedcondiments" + center_of_mass = list("x"=16, "y"=6) + else + icon_state = "emptycondiment" + name = "Condiment Bottle" + desc = "An empty condiment bottle." + center_of_mass = list("x"=16, "y"=6) + return + +/obj/item/weapon/reagent_containers/food/condiment/enzyme + name = "Universal Enzyme" + desc = "Used in cooking various dishes." + icon_state = "enzyme" + +/obj/item/weapon/reagent_containers/food/condiment/enzyme/New() + ..() + reagents.add_reagent("enzyme", 50) + +/obj/item/weapon/reagent_containers/food/condiment/sugar/New() + ..() + reagents.add_reagent("sugar", 50) + +/obj/item/weapon/reagent_containers/food/condiment/small + possible_transfer_amounts = list(1,20) + amount_per_transfer_from_this = 1 + volume = 20 + center_of_mass = list() + +/obj/item/weapon/reagent_containers/food/condiment/small/on_reagent_change() + return + +/obj/item/weapon/reagent_containers/food/condiment/small/saltshaker //Seperate from above since it's a small shaker rather then + name = "salt shaker" // a large one. + desc = "Salt. From space oceans, presumably." + icon_state = "saltshakersmall" + +/obj/item/weapon/reagent_containers/food/condiment/small/saltshaker/New() + ..() + reagents.add_reagent("sodiumchloride", 20) + +/obj/item/weapon/reagent_containers/food/condiment/small/peppermill + name = "pepper mill" + desc = "Often used to flavor food or make people sneeze." + icon_state = "peppermillsmall" + +/obj/item/weapon/reagent_containers/food/condiment/small/peppermill/New() + ..() + reagents.add_reagent("blackpepper", 20) + +/obj/item/weapon/reagent_containers/food/condiment/small/sugar + name = "sugar" + desc = "Sweetness in a bottle" + icon_state = "sugarsmall" + +/obj/item/weapon/reagent_containers/food/condiment/small/sugar/New() + ..() + reagents.add_reagent("sugar", 20) + +/obj/item/weapon/reagent_containers/food/condiment/flour + name = "flour sack" + desc = "A big bag of flour. Good for baking!" + icon = 'icons/obj/food.dmi' + icon_state = "flour" + +/obj/item/weapon/reagent_containers/food/condiment/flour/on_reagent_change() + return + +/obj/item/weapon/reagent_containers/food/condiment/flour/New() + ..() + reagents.add_reagent("flour", 30) + src.pixel_x = rand(-10.0, 10) + src.pixel_y = rand(-10.0, 10) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/food/food/drinks.dm similarity index 97% rename from code/modules/reagents/reagent_containers/food/drinks.dm rename to code/modules/food/food/drinks.dm index 4146c967c8..af4dd0fb53 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/food/food/drinks.dm @@ -1,313 +1,313 @@ -//////////////////////////////////////////////////////////////////////////////// -/// Drinks. -//////////////////////////////////////////////////////////////////////////////// -/obj/item/weapon/reagent_containers/food/drinks - name = "drink" - desc = "yummy" - icon = 'icons/obj/drinks.dmi' - icon_state = null - flags = OPENCONTAINER - amount_per_transfer_from_this = 5 - volume = 50 - -/obj/item/weapon/reagent_containers/food/drinks/on_reagent_change() - if (reagents.reagent_list.len > 0) - var/datum/reagent/R = reagents.get_master_reagent() - if(R.price_tag) - price_tag = R.price_tag - else - price_tag = null - return - -/obj/item/weapon/reagent_containers/food/drinks/attack_self(mob/user as mob) - if(!is_open_container()) - open(user) - -/obj/item/weapon/reagent_containers/food/drinks/proc/open(mob/user) - playsound(loc,"canopen", rand(10,50), 1) - user << "You open [src] with an audible pop!" - flags |= OPENCONTAINER - -/obj/item/weapon/reagent_containers/food/drinks/attack(mob/M as mob, mob/user as mob, def_zone) - if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT) - return ..() - - if(standard_feed_mob(user, M)) - return - - return 0 - -/obj/item/weapon/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity) - if(!proximity) return - - if(standard_dispenser_refill(user, target)) - return - if(standard_pour_into(user, target)) - return - return ..() - -/obj/item/weapon/reagent_containers/food/drinks/standard_feed_mob(var/mob/user, var/mob/target) - if(!is_open_container()) - user << "You need to open [src]!" - return 1 - return ..() - -/obj/item/weapon/reagent_containers/food/drinks/standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target) - if(!is_open_container()) - user << "You need to open [src]!" - return 1 - return ..() - -/obj/item/weapon/reagent_containers/food/drinks/standard_pour_into(var/mob/user, var/atom/target) - if(!is_open_container()) - user << "You need to open [src]!" - return 1 - return ..() - -/obj/item/weapon/reagent_containers/food/drinks/self_feed_message(var/mob/user) - user << "You swallow a gulp from \the [src]." - -/obj/item/weapon/reagent_containers/food/drinks/feed_sound(var/mob/user) - playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) - -/obj/item/weapon/reagent_containers/food/drinks/examine(mob/user) - if(!..(user, 1)) - return - if(!reagents || reagents.total_volume == 0) - user << "\The [src] is empty!" - else if (reagents.total_volume <= volume * 0.25) - user << "\The [src] is almost empty!" - else if (reagents.total_volume <= volume * 0.66) - user << "\The [src] is half full!" - else if (reagents.total_volume <= volume * 0.90) - user << "\The [src] is almost full!" - else - user << "\The [src] is full!" - - -//////////////////////////////////////////////////////////////////////////////// -/// Drinks. END -//////////////////////////////////////////////////////////////////////////////// - -/obj/item/weapon/reagent_containers/food/drinks/golden_cup - desc = "A golden cup" - name = "golden cup" - icon_state = "golden_cup" - item_state = "" //nope :( - w_class = ITEMSIZE_LARGE - force = 14 - throwforce = 10 - amount_per_transfer_from_this = 20 - possible_transfer_amounts = null - volume = 150 - flags = CONDUCT | OPENCONTAINER - -/obj/item/weapon/reagent_containers/food/drinks/golden_cup/on_reagent_change() - ..() - -///////////////////////////////////////////////Drinks -//Notes by Darem: Drinks are simply containers that start preloaded. Unlike condiments, the contents can be ingested directly -// rather then having to add it to something else first. They should only contain liquids. They have a default container size of 50. -// Formatting is the same as food. - -/obj/item/weapon/reagent_containers/food/drinks/milk - name = "milk carton" - desc = "It's milk. White and nutritious goodness!" - icon_state = "milk" - item_state = "carton" - center_of_mass = list("x"=16, "y"=9) - -/obj/item/weapon/reagent_containers/food/drinks/milk/New() - ..() - reagents.add_reagent("milk", 50) - -/obj/item/weapon/reagent_containers/food/drinks/soymilk - name = "soymilk carton" - desc = "It's soy milk. White and nutritious goodness!" - icon_state = "soymilk" - item_state = "carton" - center_of_mass = list("x"=16, "y"=9) -/obj/item/weapon/reagent_containers/food/drinks/soymilk/New() - ..() - reagents.add_reagent("soymilk", 50) - -/obj/item/weapon/reagent_containers/food/drinks/smallmilk - name = "small milk carton" - desc = "It's milk. White and nutritious goodness!" - volume = 30 - icon_state = "mini-milk" - item_state = "carton" - center_of_mass = list("x"=16, "y"=9) -/obj/item/weapon/reagent_containers/food/drinks/smallmilk/New() - ..() - reagents.add_reagent("milk", 30) - -/obj/item/weapon/reagent_containers/food/drinks/smallchocmilk - name = "small chocolate milk carton" - desc = "It's milk! This one is in delicious chocolate flavour." - volume = 30 - icon_state = "mini-milk_choco" - item_state = "carton" - center_of_mass = list("x"=16, "y"=9) -/obj/item/weapon/reagent_containers/food/drinks/smallchocmilk/New() - ..() - reagents.add_reagent("chocolate_milk", 30) - -/obj/item/weapon/reagent_containers/food/drinks/coffee - name = "\improper Robust Coffee" - desc = "Careful, the beverage you're about to enjoy is extremely hot." - icon_state = "coffee" - center_of_mass = list("x"=15, "y"=10) -/obj/item/weapon/reagent_containers/food/drinks/coffee/New() - ..() - reagents.add_reagent("coffee", 30) - -/obj/item/weapon/reagent_containers/food/drinks/tea - name = "cup of Duke Purple Tea" - desc = "An insult to Duke Purple is an insult to the Space Queen! Any proper gentleman will fight you, if you sully this tea." - icon_state = "teacup" - item_state = "coffee" - center_of_mass = list("x"=16, "y"=14) - -/obj/item/weapon/reagent_containers/food/drinks/tea/New() - ..() - reagents.add_reagent("tea", 30) - -/obj/item/weapon/reagent_containers/food/drinks/ice - name = "cup of ice" - desc = "Careful, cold ice, do not chew." - icon_state = "coffee" - center_of_mass = list("x"=15, "y"=10) -/obj/item/weapon/reagent_containers/food/drinks/ice/New() - ..() - reagents.add_reagent("ice", 30) - -/obj/item/weapon/reagent_containers/food/drinks/h_chocolate - name = "cup of Dutch hot coco" - desc = "Made in Space South America." - icon_state = "hot_coco" - item_state = "coffee" - center_of_mass = list("x"=15, "y"=13) - -/obj/item/weapon/reagent_containers/food/drinks/h_chocolate/New() - ..() - reagents.add_reagent("hot_coco", 30) - -/obj/item/weapon/reagent_containers/food/drinks/dry_ramen - name = "Cup Ramen" - desc = "Just add 10ml water, self heats! A taste that reminds you of your school years." - icon_state = "ramen" - center_of_mass = list("x"=16, "y"=11) -/obj/item/weapon/reagent_containers/food/drinks/dry_ramen/New() - ..() - reagents.add_reagent("dry_ramen", 30) - -/obj/item/weapon/reagent_containers/food/drinks/sillycup - name = "paper cup" - desc = "A paper water cup." - icon_state = "water_cup_e" - possible_transfer_amounts = null - volume = 10 - center_of_mass = list("x"=16, "y"=12) - -/obj/item/weapon/reagent_containers/food/drinks/sillycup/New() - ..() - -/obj/item/weapon/reagent_containers/food/drinks/sillycup/on_reagent_change() - ..() - if(reagents.total_volume) - icon_state = "water_cup" - else - icon_state = "water_cup_e" - -/obj/item/weapon/reagent_containers/food/drinks/sillycup/MouseDrop(obj/over_object as obj) - if(!reagents.total_volume && istype(over_object, /obj/structure/reagent_dispensers/water_cooler)) - if(over_object.Adjacent(usr)) - var/obj/structure/reagent_dispensers/water_cooler/W = over_object - if(W.cupholder && W.cups < 10) - W.cups++ - usr << "You put the [src] in the cup dispenser." - qdel(src) - W.update_icon() - else - return ..() - -//////////////////////////drinkingglass and shaker// -//Note by Darem: This code handles the mixing of drinks. New drinks go in three places: In Chemistry-Reagents.dm (for the drink -// itself), in Chemistry-Recipes.dm (for the reaction that changes the components into the drink), and here (for the drinking glass -// icon states. - -/obj/item/weapon/reagent_containers/food/drinks/shaker - name = "shaker" - desc = "A metal shaker to mix drinks in." - icon_state = "shaker" - amount_per_transfer_from_this = 10 - volume = 120 - center_of_mass = list("x"=17, "y"=10) - -/obj/item/weapon/reagent_containers/food/drinks/shaker/on_reagent_change() - ..() - -/obj/item/weapon/reagent_containers/food/drinks/teapot - name = "teapot" - desc = "An elegant teapot. It simply oozes class." - icon_state = "teapot" - item_state = "teapot" - amount_per_transfer_from_this = 10 - volume = 120 - center_of_mass = list("x"=17, "y"=7) - -/obj/item/weapon/reagent_containers/food/drinks/teapot/on_reagent_change() - ..() - -/obj/item/weapon/reagent_containers/food/drinks/flask - name = "\improper Colony Director's flask" - desc = "A metal flask belonging to the Colony Director" - icon_state = "flask" - volume = 60 - center_of_mass = list("x"=17, "y"=7) - -/obj/item/weapon/reagent_containers/food/drinks/flask/on_reagent_change() - ..() - -/obj/item/weapon/reagent_containers/food/drinks/flask/shiny - name = "shiny flask" - desc = "A shiny metal flask. It appears to have a Greek symbol inscribed on it." - icon_state = "shinyflask" - -/obj/item/weapon/reagent_containers/food/drinks/flask/lithium - name = "lithium flask" - desc = "A flask with a Lithium Atom symbol on it." - icon_state = "lithiumflask" - -/obj/item/weapon/reagent_containers/food/drinks/flask/detflask - name = "\improper Detective's flask" - desc = "A metal flask with a leather band and golden badge belonging to the detective." - icon_state = "detflask" - volume = 60 - center_of_mass = list("x"=17, "y"=8) - -/obj/item/weapon/reagent_containers/food/drinks/flask/barflask - name = "flask" - desc = "For those who can't be bothered to hang out at the bar to drink." - icon_state = "barflask" - volume = 60 - center_of_mass = list("x"=17, "y"=7) - -/obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask - name = "vacuum flask" - desc = "Keeping your drinks at the perfect temperature since 1892." - icon_state = "vacuumflask" - volume = 60 - center_of_mass = list("x"=15, "y"=4) - -/obj/item/weapon/reagent_containers/food/drinks/britcup - name = "cup" - desc = "A cup with the British flag emblazoned on it." - icon_state = "britcup" - volume = 30 - center_of_mass = list("x"=15, "y"=13) - -/obj/item/weapon/reagent_containers/food/drinks/britcup/on_reagent_change() - ..() - +//////////////////////////////////////////////////////////////////////////////// +/// Drinks. +//////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/food/drinks + name = "drink" + desc = "yummy" + icon = 'icons/obj/drinks.dmi' + icon_state = null + flags = OPENCONTAINER + amount_per_transfer_from_this = 5 + volume = 50 + +/obj/item/weapon/reagent_containers/food/drinks/on_reagent_change() + if (reagents.reagent_list.len > 0) + var/datum/reagent/R = reagents.get_master_reagent() + if(R.price_tag) + price_tag = R.price_tag + else + price_tag = null + return + +/obj/item/weapon/reagent_containers/food/drinks/attack_self(mob/user as mob) + if(!is_open_container()) + open(user) + +/obj/item/weapon/reagent_containers/food/drinks/proc/open(mob/user) + playsound(loc,"canopen", rand(10,50), 1) + user << "You open [src] with an audible pop!" + flags |= OPENCONTAINER + +/obj/item/weapon/reagent_containers/food/drinks/attack(mob/M as mob, mob/user as mob, def_zone) + if(force && !(flags & NOBLUDGEON) && user.a_intent == I_HURT) + return ..() + + if(standard_feed_mob(user, M)) + return + + return 0 + +/obj/item/weapon/reagent_containers/food/drinks/afterattack(obj/target, mob/user, proximity) + if(!proximity) return + + if(standard_dispenser_refill(user, target)) + return + if(standard_pour_into(user, target)) + return + return ..() + +/obj/item/weapon/reagent_containers/food/drinks/standard_feed_mob(var/mob/user, var/mob/target) + if(!is_open_container()) + user << "You need to open [src]!" + return 1 + return ..() + +/obj/item/weapon/reagent_containers/food/drinks/standard_dispenser_refill(var/mob/user, var/obj/structure/reagent_dispensers/target) + if(!is_open_container()) + user << "You need to open [src]!" + return 1 + return ..() + +/obj/item/weapon/reagent_containers/food/drinks/standard_pour_into(var/mob/user, var/atom/target) + if(!is_open_container()) + user << "You need to open [src]!" + return 1 + return ..() + +/obj/item/weapon/reagent_containers/food/drinks/self_feed_message(var/mob/user) + user << "You swallow a gulp from \the [src]." + +/obj/item/weapon/reagent_containers/food/drinks/feed_sound(var/mob/user) + playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1) + +/obj/item/weapon/reagent_containers/food/drinks/examine(mob/user) + if(!..(user, 1)) + return + if(!reagents || reagents.total_volume == 0) + user << "\The [src] is empty!" + else if (reagents.total_volume <= volume * 0.25) + user << "\The [src] is almost empty!" + else if (reagents.total_volume <= volume * 0.66) + user << "\The [src] is half full!" + else if (reagents.total_volume <= volume * 0.90) + user << "\The [src] is almost full!" + else + user << "\The [src] is full!" + + +//////////////////////////////////////////////////////////////////////////////// +/// Drinks. END +//////////////////////////////////////////////////////////////////////////////// + +/obj/item/weapon/reagent_containers/food/drinks/golden_cup + desc = "A golden cup" + name = "golden cup" + icon_state = "golden_cup" + item_state = "" //nope :( + w_class = ITEMSIZE_LARGE + force = 14 + throwforce = 10 + amount_per_transfer_from_this = 20 + possible_transfer_amounts = null + volume = 150 + flags = CONDUCT | OPENCONTAINER + +/obj/item/weapon/reagent_containers/food/drinks/golden_cup/on_reagent_change() + ..() + +///////////////////////////////////////////////Drinks +//Notes by Darem: Drinks are simply containers that start preloaded. Unlike condiments, the contents can be ingested directly +// rather then having to add it to something else first. They should only contain liquids. They have a default container size of 50. +// Formatting is the same as food. + +/obj/item/weapon/reagent_containers/food/drinks/milk + name = "milk carton" + desc = "It's milk. White and nutritious goodness!" + icon_state = "milk" + item_state = "carton" + center_of_mass = list("x"=16, "y"=9) + +/obj/item/weapon/reagent_containers/food/drinks/milk/New() + ..() + reagents.add_reagent("milk", 50) + +/obj/item/weapon/reagent_containers/food/drinks/soymilk + name = "soymilk carton" + desc = "It's soy milk. White and nutritious goodness!" + icon_state = "soymilk" + item_state = "carton" + center_of_mass = list("x"=16, "y"=9) +/obj/item/weapon/reagent_containers/food/drinks/soymilk/New() + ..() + reagents.add_reagent("soymilk", 50) + +/obj/item/weapon/reagent_containers/food/drinks/smallmilk + name = "small milk carton" + desc = "It's milk. White and nutritious goodness!" + volume = 30 + icon_state = "mini-milk" + item_state = "carton" + center_of_mass = list("x"=16, "y"=9) +/obj/item/weapon/reagent_containers/food/drinks/smallmilk/New() + ..() + reagents.add_reagent("milk", 30) + +/obj/item/weapon/reagent_containers/food/drinks/smallchocmilk + name = "small chocolate milk carton" + desc = "It's milk! This one is in delicious chocolate flavour." + volume = 30 + icon_state = "mini-milk_choco" + item_state = "carton" + center_of_mass = list("x"=16, "y"=9) +/obj/item/weapon/reagent_containers/food/drinks/smallchocmilk/New() + ..() + reagents.add_reagent("chocolate_milk", 30) + +/obj/item/weapon/reagent_containers/food/drinks/coffee + name = "\improper Robust Coffee" + desc = "Careful, the beverage you're about to enjoy is extremely hot." + icon_state = "coffee" + center_of_mass = list("x"=15, "y"=10) +/obj/item/weapon/reagent_containers/food/drinks/coffee/New() + ..() + reagents.add_reagent("coffee", 30) + +/obj/item/weapon/reagent_containers/food/drinks/tea + name = "cup of Duke Purple Tea" + desc = "An insult to Duke Purple is an insult to the Space Queen! Any proper gentleman will fight you, if you sully this tea." + icon_state = "teacup" + item_state = "coffee" + center_of_mass = list("x"=16, "y"=14) + +/obj/item/weapon/reagent_containers/food/drinks/tea/New() + ..() + reagents.add_reagent("tea", 30) + +/obj/item/weapon/reagent_containers/food/drinks/ice + name = "cup of ice" + desc = "Careful, cold ice, do not chew." + icon_state = "coffee" + center_of_mass = list("x"=15, "y"=10) +/obj/item/weapon/reagent_containers/food/drinks/ice/New() + ..() + reagents.add_reagent("ice", 30) + +/obj/item/weapon/reagent_containers/food/drinks/h_chocolate + name = "cup of Dutch hot coco" + desc = "Made in Space South America." + icon_state = "hot_coco" + item_state = "coffee" + center_of_mass = list("x"=15, "y"=13) + +/obj/item/weapon/reagent_containers/food/drinks/h_chocolate/New() + ..() + reagents.add_reagent("hot_coco", 30) + +/obj/item/weapon/reagent_containers/food/drinks/dry_ramen + name = "Cup Ramen" + desc = "Just add 10ml water, self heats! A taste that reminds you of your school years." + icon_state = "ramen" + center_of_mass = list("x"=16, "y"=11) +/obj/item/weapon/reagent_containers/food/drinks/dry_ramen/New() + ..() + reagents.add_reagent("dry_ramen", 30) + +/obj/item/weapon/reagent_containers/food/drinks/sillycup + name = "paper cup" + desc = "A paper water cup." + icon_state = "water_cup_e" + possible_transfer_amounts = null + volume = 10 + center_of_mass = list("x"=16, "y"=12) + +/obj/item/weapon/reagent_containers/food/drinks/sillycup/New() + ..() + +/obj/item/weapon/reagent_containers/food/drinks/sillycup/on_reagent_change() + ..() + if(reagents.total_volume) + icon_state = "water_cup" + else + icon_state = "water_cup_e" + +/obj/item/weapon/reagent_containers/food/drinks/sillycup/MouseDrop(obj/over_object as obj) + if(!reagents.total_volume && istype(over_object, /obj/structure/reagent_dispensers/water_cooler)) + if(over_object.Adjacent(usr)) + var/obj/structure/reagent_dispensers/water_cooler/W = over_object + if(W.cupholder && W.cups < 10) + W.cups++ + usr << "You put the [src] in the cup dispenser." + qdel(src) + W.update_icon() + else + return ..() + +//////////////////////////drinkingglass and shaker// +//Note by Darem: This code handles the mixing of drinks. New drinks go in three places: In Chemistry-Reagents.dm (for the drink +// itself), in Chemistry-Recipes.dm (for the reaction that changes the components into the drink), and here (for the drinking glass +// icon states. + +/obj/item/weapon/reagent_containers/food/drinks/shaker + name = "shaker" + desc = "A metal shaker to mix drinks in." + icon_state = "shaker" + amount_per_transfer_from_this = 10 + volume = 120 + center_of_mass = list("x"=17, "y"=10) + +/obj/item/weapon/reagent_containers/food/drinks/shaker/on_reagent_change() + ..() + +/obj/item/weapon/reagent_containers/food/drinks/teapot + name = "teapot" + desc = "An elegant teapot. It simply oozes class." + icon_state = "teapot" + item_state = "teapot" + amount_per_transfer_from_this = 10 + volume = 120 + center_of_mass = list("x"=17, "y"=7) + +/obj/item/weapon/reagent_containers/food/drinks/teapot/on_reagent_change() + ..() + +/obj/item/weapon/reagent_containers/food/drinks/flask + name = "\improper Colony Director's flask" + desc = "A metal flask belonging to the Colony Director" + icon_state = "flask" + volume = 60 + center_of_mass = list("x"=17, "y"=7) + +/obj/item/weapon/reagent_containers/food/drinks/flask/on_reagent_change() + ..() + +/obj/item/weapon/reagent_containers/food/drinks/flask/shiny + name = "shiny flask" + desc = "A shiny metal flask. It appears to have a Greek symbol inscribed on it." + icon_state = "shinyflask" + +/obj/item/weapon/reagent_containers/food/drinks/flask/lithium + name = "lithium flask" + desc = "A flask with a Lithium Atom symbol on it." + icon_state = "lithiumflask" + +/obj/item/weapon/reagent_containers/food/drinks/flask/detflask + name = "\improper Detective's flask" + desc = "A metal flask with a leather band and golden badge belonging to the detective." + icon_state = "detflask" + volume = 60 + center_of_mass = list("x"=17, "y"=8) + +/obj/item/weapon/reagent_containers/food/drinks/flask/barflask + name = "flask" + desc = "For those who can't be bothered to hang out at the bar to drink." + icon_state = "barflask" + volume = 60 + center_of_mass = list("x"=17, "y"=7) + +/obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask + name = "vacuum flask" + desc = "Keeping your drinks at the perfect temperature since 1892." + icon_state = "vacuumflask" + volume = 60 + center_of_mass = list("x"=15, "y"=4) + +/obj/item/weapon/reagent_containers/food/drinks/britcup + name = "cup" + desc = "A cup with the British flag emblazoned on it." + icon_state = "britcup" + volume = 30 + center_of_mass = list("x"=15, "y"=13) + +/obj/item/weapon/reagent_containers/food/drinks/britcup/on_reagent_change() + ..() + diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/food/food/drinks/bottle.dm similarity index 97% rename from code/modules/reagents/reagent_containers/food/drinks/bottle.dm rename to code/modules/food/food/drinks/bottle.dm index 0a09b22fe9..d3b5e5bc66 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/food/food/drinks/bottle.dm @@ -1,551 +1,551 @@ -///////////////////////////////////////////////Alchohol bottles! -Agouri ////////////////////////// -//Functionally identical to regular drinks. The only difference is that the default bottle size is 100. - Darem -//Bottles now weaken and break when smashed on people's heads. - Giacom - -/obj/item/weapon/reagent_containers/food/drinks/bottle - amount_per_transfer_from_this = 10 - volume = 100 - item_state = "broken_beer" //Generic held-item sprite until unique ones are made. - force = 6 - var/smash_duration = 5 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets) - var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it - - var/obj/item/weapon/reagent_containers/glass/rag/rag = null - var/rag_underlay = "rag" - on_reagent_change() return // To suppress price updating. Bottles have their own price tags. - -/obj/item/weapon/reagent_containers/food/drinks/bottle/New() - ..() - if(isGlass) unacidable = 1 - -/obj/item/weapon/reagent_containers/food/drinks/bottle/Destroy() - if(rag) - rag.forceMove(src.loc) - rag = null - return ..() - -//when thrown on impact, bottles smash and spill their contents -/obj/item/weapon/reagent_containers/food/drinks/bottle/throw_impact(atom/hit_atom, var/speed) - ..() - - var/mob/M = thrower - if(isGlass && istype(M) && M.a_intent == I_HURT) - var/throw_dist = get_dist(throw_source, loc) - if(speed >= throw_speed && smash_check(throw_dist)) //not as reliable as smashing directly - if(reagents) - hit_atom.visible_message("The contents of \the [src] splash all over [hit_atom]!") - reagents.splash(hit_atom, reagents.total_volume) - src.smash(loc, hit_atom) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash_check(var/distance) - if(!isGlass || !smash_duration) - return 0 - - var/list/chance_table = list(100, 95, 90, 85, 75, 55, 35) //starting from distance 0 - var/idx = max(distance + 1, 1) //since list indices start at 1 - if(idx > chance_table.len) - return 0 - return prob(chance_table[idx]) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(var/newloc, atom/against = null) - if(ismob(loc)) - var/mob/M = loc - M.drop_from_inventory(src) - - //Creates a shattering noise and replaces the bottle with a broken_bottle - var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(newloc) - if(prob(33)) - new/obj/item/weapon/material/shard(newloc) // Create a glass shard at the target's location! - B.icon_state = src.icon_state - - var/icon/I = new('icons/obj/drinks.dmi', src.icon_state) - I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1) - I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0)) - B.icon = I - - if(rag && rag.on_fire && isliving(against)) - rag.forceMove(loc) - var/mob/living/L = against - L.IgniteMob() - - playsound(src, "shatter", 70, 1) - src.transfer_fingerprints_to(B) - - qdel(src) - return B - -/obj/item/weapon/reagent_containers/food/drinks/bottle/verb/smash_bottle() - set name = "Smash Bottle" - set category = "Object" - - var/list/things_to_smash_on = list() - for(var/atom/A in range (1, usr)) - if(A.density && usr.Adjacent(A) && !istype(A, /mob)) - things_to_smash_on += A - - var/atom/choice = input("Select what you want to smash the bottle on.") as null|anything in things_to_smash_on - if(!choice) - return - if(!(choice.density && usr.Adjacent(choice))) - usr << "You must stay close to your target! You moved away from \the [choice]" - return - - usr.put_in_hands(src.smash(usr.loc, choice)) - usr.visible_message("\The [usr] smashed \the [src] on \the [choice]!") - usr << "You smash \the [src] on \the [choice]!" - -/obj/item/weapon/reagent_containers/food/drinks/bottle/attackby(obj/item/W, mob/user) - if(!rag && istype(W, /obj/item/weapon/reagent_containers/glass/rag)) - insert_rag(W, user) - return - if(rag && istype(W, /obj/item/weapon/flame)) - rag.attackby(W, user) - return - ..() - -/obj/item/weapon/reagent_containers/food/drinks/bottle/attack_self(mob/user) - if(rag) - remove_rag(user) - else - ..() - -/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/insert_rag(obj/item/weapon/reagent_containers/glass/rag/R, mob/user) - if(!isGlass || rag) return - if(user.unEquip(R)) - user << "You stuff [R] into [src]." - rag = R - rag.forceMove(src) - flags &= ~OPENCONTAINER - update_icon() - -/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/remove_rag(mob/user) - if(!rag) return - user.put_in_hands(rag) - rag = null - flags |= (initial(flags) & OPENCONTAINER) - update_icon() - -/obj/item/weapon/reagent_containers/food/drinks/bottle/open(mob/user) - if(rag) return - ..() - -/obj/item/weapon/reagent_containers/food/drinks/bottle/update_icon() - underlays.Cut() - if(rag) - var/underlay_image = image(icon='icons/obj/drinks.dmi', icon_state=rag.on_fire? "[rag_underlay]_lit" : rag_underlay) - underlays += underlay_image - set_light(rag.light_range, rag.light_power, rag.light_color) - else - set_light(0) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) - var/blocked = ..() - - if(user.a_intent != I_HURT) - return - if(!smash_check(1)) - return //won't always break on the first hit - - // You are going to knock someone out for longer if they are not wearing a helmet. - var/weaken_duration = 0 - if(blocked < 100) - weaken_duration = smash_duration + min(0, force - target.getarmor(hit_zone, "melee") + 10) - - if(hit_zone == "head" && istype(target, /mob/living/carbon/)) - user.visible_message("\The [user] smashes [src] over [target]'s head!") - if(weaken_duration) - target.apply_effect(min(weaken_duration, 5), WEAKEN, blocked) // Never weaken more than a flash! - else - user.visible_message("\The [user] smashes [src] into [target]!") - - //The reagents in the bottle splash all over the target, thanks for the idea Nodrak - if(reagents) - user.visible_message("The contents of \the [src] splash all over [target]!") - reagents.splash(target, reagents.total_volume) - - //Finally, smash the bottle. This kills (qdel) the bottle. - var/obj/item/weapon/broken_bottle/B = smash(target.loc, target) - user.put_in_active_hand(B) - -//Keeping this here for now, I'll ask if I should keep it here. -/obj/item/weapon/broken_bottle - name = "Broken Bottle" - desc = "A bottle with a sharp broken bottom." - icon = 'icons/obj/drinks.dmi' - icon_state = "broken_bottle" - force = 10 - throwforce = 5 - throw_speed = 3 - throw_range = 5 - item_state = "beer" - attack_verb = list("stabbed", "slashed", "attacked") - sharp = 1 - edge = 0 - var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken") - -/obj/item/weapon/broken_bottle/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - return ..() - -/obj/item/weapon/reagent_containers/food/drinks/bottle/gin - name = "Griffeater Gin" - desc = "A bottle of high quality gin, produced in Alpha Centauri." - icon_state = "ginbottle" - center_of_mass = list("x"=16, "y"=4) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/gin/New() - ..() - reagents.add_reagent("gin", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey - name = "Uncle Git's Special Reserve" - desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter." - icon_state = "whiskeybottle" - center_of_mass = list("x"=16, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey/New() - ..() - reagents.add_reagent("whiskey", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey - name = "Special Blend Whiskey" - desc = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." - icon_state = "whiskeybottle2" - center_of_mass = list("x"=16, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey/New() - ..() - reagents.add_reagent("specialwhiskey", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka - name = "Tunguska Triple Distilled" - desc = "Aah, vodka. Prime choice of drink and fuel by Russians worldwide." - icon_state = "vodkabottle" - center_of_mass = list("x"=17, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/New() - ..() - reagents.add_reagent("vodka", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla - name = "Caccavo Guaranteed Quality Tequilla" - desc = "Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!" - icon_state = "tequillabottle" - center_of_mass = list("x"=16, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla/New() - ..() - reagents.add_reagent("tequilla", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing - name = "Bottle of Nothing" - desc = "A bottle filled with nothing" - icon_state = "bottleofnothing" - center_of_mass = list("x"=17, "y"=5) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing/New() - ..() - reagents.add_reagent("nothing", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/patron - name = "Wrapp Artiste Patron" - desc = "Silver laced tequilla, served in space night clubs across the galaxy." - icon_state = "patronbottle" - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/patron/New() - ..() - reagents.add_reagent("patron", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/rum - name = "Captain Pete's Cuban Spiced Rum" - desc = "This isn't just rum, oh no. It's practically Cuba in a bottle." - icon_state = "rumbottle" - center_of_mass = list("x"=16, "y"=8) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/rum/New() - ..() - reagents.add_reagent("rum", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater - name = "Flask of Holy Water" - desc = "A flask of the chaplain's holy water." - icon_state = "holyflask" - center_of_mass = list("x"=17, "y"=10) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater/New() - ..() - reagents.add_reagent("holywater", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth - name = "Goldeneye Vermouth" - desc = "Sweet, sweet dryness~" - icon_state = "vermouthbottle" - center_of_mass = list("x"=17, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth/New() - ..() - reagents.add_reagent("vermouth", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua - name = "Robert Robust's Coffee Liqueur" - desc = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936." - icon_state = "kahluabottle" - center_of_mass = list("x"=17, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua/New() - ..() - reagents.add_reagent("kahlua", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager - name = "College Girl Goldschlager" - desc = "Because they are the only ones who will drink 100 proof cinnamon schnapps." - icon_state = "goldschlagerbottle" - center_of_mass = list("x"=15, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager/New() - ..() - reagents.add_reagent("goldschlager", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac - name = "Chateau De Baton Premium Cognac" - desc = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing." - icon_state = "cognacbottle" - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac/New() - ..() - reagents.add_reagent("cognac", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/wine - name = "Doublebeard Bearded Special Wine" - desc = "Cheap cooking wine pretending to be drinkable." - icon_state = "winebottle" - center_of_mass = list("x"=16, "y"=4) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/wine/New() - ..() - reagents.add_reagent("wine", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe - name = "Jailbreaker Verte" - desc = "One sip of this and you just know you're gonna have a good time." - icon_state = "absinthebottle" - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe/New() - ..() - reagents.add_reagent("absinthe", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor - name = "Emeraldine Melon Liquor" - desc = "A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light." - icon_state = "alco-green" //Placeholder. - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor/New() - ..() - reagents.add_reagent("melonliquor", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao - name = "Miss Blue Curacao" - desc = "A fruity, exceptionally azure drink. Does not allow the imbiber to use the fifth magic." - icon_state = "alco-blue" //Placeholder. - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao/New() - ..() - reagents.add_reagent("bluecuracao", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine - name = "Briar Rose Grenadine Syrup" - desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." - icon_state = "grenadinebottle" - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine/New() - ..() - reagents.add_reagent("grenadine", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/cola - name = "\improper Space Cola" - desc = "Cola. in space" - icon_state = "colabottle" - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/cola/New() - ..() - reagents.add_reagent("cola", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up - name = "\improper Space-Up" - desc = "Tastes like a hull breach in your mouth." - icon_state = "space-up_bottle" - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up/New() - ..() - reagents.add_reagent("space_up", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind - name = "\improper Space Mountain Wind" - desc = "Blows right through you like a space wind." - icon_state = "space_mountain_wind_bottle" - center_of_mass = list("x"=16, "y"=6) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind/New() - ..() - reagents.add_reagent("spacemountainwind", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine - name = "Warlock's Velvet" - desc = "What a delightful packaging for a surely high quality wine! The vintage must be amazing!" - icon_state = "pwinebottle" - center_of_mass = list("x"=16, "y"=4) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine/New() - ..() - reagents.add_reagent("pwine", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew - name = "Redeemer's Brew" - desc = "Just opening the top of this bottle makes you feel a bit tipsy. Not for the faint of heart." - icon_state = "redeemersbrew" - center_of_mass = list("x"=16, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew/New() - ..() - reagents.add_reagent("unathiliquor", 100) - -//////////////////////////JUICES AND STUFF /////////////////////// - -/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice - name = "Orange Juice" - desc = "Full of vitamins and deliciousness!" - icon_state = "orangejuice" - item_state = "carton" - center_of_mass = list("x"=16, "y"=7) - isGlass = 0 - -/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice/New() - ..() - reagents.add_reagent("orangejuice", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/applejuice - name = "Apple Juice" - desc = "Squeezed, pressed and ground to perfection!" - icon_state = "applejuice" - item_state = "carton" - center_of_mass = list("x"=16, "y"=7) - isGlass = 0 - -/obj/item/weapon/reagent_containers/food/drinks/bottle/applejuice/New() - ..() - reagents.add_reagent("applejuice", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/milk - name = "Large Milk Carton" - desc = "It's milk. This carton's large enough to serve your biggest milk drinkers." - icon_state = "milk" - item_state = "carton" - center_of_mass = list("x"=16, "y"=9) - isGlass = 0 - -/obj/item/weapon/reagent_containers/food/drinks/bottle/milk/New() - ..() - reagents.add_reagent("milk", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/cream - name = "Milk Cream" - desc = "It's cream. Made from milk. What else did you think you'd find in there?" - icon_state = "cream" - item_state = "carton" - center_of_mass = list("x"=16, "y"=8) - isGlass = 0 - -/obj/item/weapon/reagent_containers/food/drinks/bottle/cream/New() - ..() - reagents.add_reagent("cream", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice - name = "Tomato Juice" - desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness." - icon_state = "tomatojuice" - item_state = "carton" - center_of_mass = list("x"=16, "y"=8) - isGlass = 0 - -/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice/New() - ..() - reagents.add_reagent("tomatojuice", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice - name = "Lime Juice" - desc = "Sweet-sour goodness." - icon_state = "limejuice" - item_state = "carton" - center_of_mass = list("x"=16, "y"=8) - isGlass = 0 - -/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice/New() - ..() - reagents.add_reagent("limejuice", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/lemonjuice - name = "Lemon Juice" - desc = "Sweet-sour goodness. Minus the sweet." - icon_state = "lemonjuice" - item_state = "carton" - center_of_mass = list("x"=16, "y"=8) - isGlass = 0 - -/obj/item/weapon/reagent_containers/food/drinks/bottle/lemonjuice/New() - ..() - reagents.add_reagent("lemonjuice", 100) - -//Small bottles -/obj/item/weapon/reagent_containers/food/drinks/bottle/small - volume = 50 - smash_duration = 1 - flags = 0 //starts closed - rag_underlay = "rag_small" - -/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer - name = "space beer" - desc = "Contains only water, malt and hops." - icon_state = "beer" - center_of_mass = list("x"=16, "y"=12) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer/New() - ..() - reagents.add_reagent("beer", 30) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale - name = "\improper Magm-Ale" - desc = "A true dorf's drink of choice." - icon_state = "alebottle" - item_state = "beer" - center_of_mass = list("x"=16, "y"=10) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale/New() - ..() - reagents.add_reagent("ale", 30) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/sake - name = "Mono-No-Aware Luxury Sake" - desc = "Dry alcohol made from rice, a favorite of businessmen." - icon_state = "sakebottle" - center_of_mass = list("x"=16, "y"=3) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/sake/New() - ..() - reagents.add_reagent("sake", 100) - -/obj/item/weapon/reagent_containers/food/drinks/bottle/champagne - name = "Gilthari Luxury Champagne" - desc = "For those special occassions." - icon_state = "champagne" - -/obj/item/weapon/reagent_containers/food/drinks/bottle/champagne/New() - ..() +///////////////////////////////////////////////Alchohol bottles! -Agouri ////////////////////////// +//Functionally identical to regular drinks. The only difference is that the default bottle size is 100. - Darem +//Bottles now weaken and break when smashed on people's heads. - Giacom + +/obj/item/weapon/reagent_containers/food/drinks/bottle + amount_per_transfer_from_this = 10 + volume = 100 + item_state = "broken_beer" //Generic held-item sprite until unique ones are made. + force = 6 + var/smash_duration = 5 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets) + var/isGlass = 1 //Whether the 'bottle' is made of glass or not so that milk cartons dont shatter when someone gets hit by it + + var/obj/item/weapon/reagent_containers/glass/rag/rag = null + var/rag_underlay = "rag" + on_reagent_change() return // To suppress price updating. Bottles have their own price tags. + +/obj/item/weapon/reagent_containers/food/drinks/bottle/New() + ..() + if(isGlass) unacidable = 1 + +/obj/item/weapon/reagent_containers/food/drinks/bottle/Destroy() + if(rag) + rag.forceMove(src.loc) + rag = null + return ..() + +//when thrown on impact, bottles smash and spill their contents +/obj/item/weapon/reagent_containers/food/drinks/bottle/throw_impact(atom/hit_atom, var/speed) + ..() + + var/mob/M = thrower + if(isGlass && istype(M) && M.a_intent == I_HURT) + var/throw_dist = get_dist(throw_source, loc) + if(speed >= throw_speed && smash_check(throw_dist)) //not as reliable as smashing directly + if(reagents) + hit_atom.visible_message("The contents of \the [src] splash all over [hit_atom]!") + reagents.splash(hit_atom, reagents.total_volume) + src.smash(loc, hit_atom) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash_check(var/distance) + if(!isGlass || !smash_duration) + return 0 + + var/list/chance_table = list(100, 95, 90, 85, 75, 55, 35) //starting from distance 0 + var/idx = max(distance + 1, 1) //since list indices start at 1 + if(idx > chance_table.len) + return 0 + return prob(chance_table[idx]) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/smash(var/newloc, atom/against = null) + if(ismob(loc)) + var/mob/M = loc + M.drop_from_inventory(src) + + //Creates a shattering noise and replaces the bottle with a broken_bottle + var/obj/item/weapon/broken_bottle/B = new /obj/item/weapon/broken_bottle(newloc) + if(prob(33)) + new/obj/item/weapon/material/shard(newloc) // Create a glass shard at the target's location! + B.icon_state = src.icon_state + + var/icon/I = new('icons/obj/drinks.dmi', src.icon_state) + I.Blend(B.broken_outline, ICON_OVERLAY, rand(5), 1) + I.SwapColor(rgb(255, 0, 220, 255), rgb(0, 0, 0, 0)) + B.icon = I + + if(rag && rag.on_fire && isliving(against)) + rag.forceMove(loc) + var/mob/living/L = against + L.IgniteMob() + + playsound(src, "shatter", 70, 1) + src.transfer_fingerprints_to(B) + + qdel(src) + return B + +/obj/item/weapon/reagent_containers/food/drinks/bottle/verb/smash_bottle() + set name = "Smash Bottle" + set category = "Object" + + var/list/things_to_smash_on = list() + for(var/atom/A in range (1, usr)) + if(A.density && usr.Adjacent(A) && !istype(A, /mob)) + things_to_smash_on += A + + var/atom/choice = input("Select what you want to smash the bottle on.") as null|anything in things_to_smash_on + if(!choice) + return + if(!(choice.density && usr.Adjacent(choice))) + usr << "You must stay close to your target! You moved away from \the [choice]" + return + + usr.put_in_hands(src.smash(usr.loc, choice)) + usr.visible_message("\The [usr] smashed \the [src] on \the [choice]!") + usr << "You smash \the [src] on \the [choice]!" + +/obj/item/weapon/reagent_containers/food/drinks/bottle/attackby(obj/item/W, mob/user) + if(!rag && istype(W, /obj/item/weapon/reagent_containers/glass/rag)) + insert_rag(W, user) + return + if(rag && istype(W, /obj/item/weapon/flame)) + rag.attackby(W, user) + return + ..() + +/obj/item/weapon/reagent_containers/food/drinks/bottle/attack_self(mob/user) + if(rag) + remove_rag(user) + else + ..() + +/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/insert_rag(obj/item/weapon/reagent_containers/glass/rag/R, mob/user) + if(!isGlass || rag) return + if(user.unEquip(R)) + user << "You stuff [R] into [src]." + rag = R + rag.forceMove(src) + flags &= ~OPENCONTAINER + update_icon() + +/obj/item/weapon/reagent_containers/food/drinks/bottle/proc/remove_rag(mob/user) + if(!rag) return + user.put_in_hands(rag) + rag = null + flags |= (initial(flags) & OPENCONTAINER) + update_icon() + +/obj/item/weapon/reagent_containers/food/drinks/bottle/open(mob/user) + if(rag) return + ..() + +/obj/item/weapon/reagent_containers/food/drinks/bottle/update_icon() + underlays.Cut() + if(rag) + var/underlay_image = image(icon='icons/obj/drinks.dmi', icon_state=rag.on_fire? "[rag_underlay]_lit" : rag_underlay) + underlays += underlay_image + set_light(rag.light_range, rag.light_power, rag.light_color) + else + set_light(0) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone) + var/blocked = ..() + + if(user.a_intent != I_HURT) + return + if(!smash_check(1)) + return //won't always break on the first hit + + // You are going to knock someone out for longer if they are not wearing a helmet. + var/weaken_duration = 0 + if(blocked < 100) + weaken_duration = smash_duration + min(0, force - target.getarmor(hit_zone, "melee") + 10) + + if(hit_zone == "head" && istype(target, /mob/living/carbon/)) + user.visible_message("\The [user] smashes [src] over [target]'s head!") + if(weaken_duration) + target.apply_effect(min(weaken_duration, 5), WEAKEN, blocked) // Never weaken more than a flash! + else + user.visible_message("\The [user] smashes [src] into [target]!") + + //The reagents in the bottle splash all over the target, thanks for the idea Nodrak + if(reagents) + user.visible_message("The contents of \the [src] splash all over [target]!") + reagents.splash(target, reagents.total_volume) + + //Finally, smash the bottle. This kills (qdel) the bottle. + var/obj/item/weapon/broken_bottle/B = smash(target.loc, target) + user.put_in_active_hand(B) + +//Keeping this here for now, I'll ask if I should keep it here. +/obj/item/weapon/broken_bottle + name = "Broken Bottle" + desc = "A bottle with a sharp broken bottom." + icon = 'icons/obj/drinks.dmi' + icon_state = "broken_bottle" + force = 10 + throwforce = 5 + throw_speed = 3 + throw_range = 5 + item_state = "beer" + attack_verb = list("stabbed", "slashed", "attacked") + sharp = 1 + edge = 0 + var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken") + +/obj/item/weapon/broken_bottle/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) + return ..() + +/obj/item/weapon/reagent_containers/food/drinks/bottle/gin + name = "Griffeater Gin" + desc = "A bottle of high quality gin, produced in Alpha Centauri." + icon_state = "ginbottle" + center_of_mass = list("x"=16, "y"=4) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/gin/New() + ..() + reagents.add_reagent("gin", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey + name = "Uncle Git's Special Reserve" + desc = "A premium single-malt whiskey, gently matured inside the tunnels of a nuclear shelter." + icon_state = "whiskeybottle" + center_of_mass = list("x"=16, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey/New() + ..() + reagents.add_reagent("whiskey", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey + name = "Special Blend Whiskey" + desc = "Just when you thought regular station whiskey was good... This silky, amber goodness has to come along and ruin everything." + icon_state = "whiskeybottle2" + center_of_mass = list("x"=16, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/specialwhiskey/New() + ..() + reagents.add_reagent("specialwhiskey", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka + name = "Tunguska Triple Distilled" + desc = "Aah, vodka. Prime choice of drink and fuel by Russians worldwide." + icon_state = "vodkabottle" + center_of_mass = list("x"=17, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka/New() + ..() + reagents.add_reagent("vodka", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla + name = "Caccavo Guaranteed Quality Tequilla" + desc = "Made from premium petroleum distillates, pure thalidomide and other fine quality ingredients!" + icon_state = "tequillabottle" + center_of_mass = list("x"=16, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla/New() + ..() + reagents.add_reagent("tequilla", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing + name = "Bottle of Nothing" + desc = "A bottle filled with nothing" + icon_state = "bottleofnothing" + center_of_mass = list("x"=17, "y"=5) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing/New() + ..() + reagents.add_reagent("nothing", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/patron + name = "Wrapp Artiste Patron" + desc = "Silver laced tequilla, served in space night clubs across the galaxy." + icon_state = "patronbottle" + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/patron/New() + ..() + reagents.add_reagent("patron", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/rum + name = "Captain Pete's Cuban Spiced Rum" + desc = "This isn't just rum, oh no. It's practically Cuba in a bottle." + icon_state = "rumbottle" + center_of_mass = list("x"=16, "y"=8) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/rum/New() + ..() + reagents.add_reagent("rum", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater + name = "Flask of Holy Water" + desc = "A flask of the chaplain's holy water." + icon_state = "holyflask" + center_of_mass = list("x"=17, "y"=10) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater/New() + ..() + reagents.add_reagent("holywater", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth + name = "Goldeneye Vermouth" + desc = "Sweet, sweet dryness~" + icon_state = "vermouthbottle" + center_of_mass = list("x"=17, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth/New() + ..() + reagents.add_reagent("vermouth", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua + name = "Robert Robust's Coffee Liqueur" + desc = "A widely known, Mexican coffee-flavoured liqueur. In production since 1936." + icon_state = "kahluabottle" + center_of_mass = list("x"=17, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua/New() + ..() + reagents.add_reagent("kahlua", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager + name = "College Girl Goldschlager" + desc = "Because they are the only ones who will drink 100 proof cinnamon schnapps." + icon_state = "goldschlagerbottle" + center_of_mass = list("x"=15, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager/New() + ..() + reagents.add_reagent("goldschlager", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac + name = "Chateau De Baton Premium Cognac" + desc = "A sweet and strongly alchoholic drink, made after numerous distillations and years of maturing." + icon_state = "cognacbottle" + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac/New() + ..() + reagents.add_reagent("cognac", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/wine + name = "Doublebeard Bearded Special Wine" + desc = "Cheap cooking wine pretending to be drinkable." + icon_state = "winebottle" + center_of_mass = list("x"=16, "y"=4) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/wine/New() + ..() + reagents.add_reagent("wine", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe + name = "Jailbreaker Verte" + desc = "One sip of this and you just know you're gonna have a good time." + icon_state = "absinthebottle" + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe/New() + ..() + reagents.add_reagent("absinthe", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor + name = "Emeraldine Melon Liquor" + desc = "A bottle of 46 proof Emeraldine Melon Liquor. Sweet and light." + icon_state = "alco-green" //Placeholder. + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor/New() + ..() + reagents.add_reagent("melonliquor", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao + name = "Miss Blue Curacao" + desc = "A fruity, exceptionally azure drink. Does not allow the imbiber to use the fifth magic." + icon_state = "alco-blue" //Placeholder. + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao/New() + ..() + reagents.add_reagent("bluecuracao", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine + name = "Briar Rose Grenadine Syrup" + desc = "Sweet and tangy, a bar syrup used to add color or flavor to drinks." + icon_state = "grenadinebottle" + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine/New() + ..() + reagents.add_reagent("grenadine", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cola + name = "\improper Space Cola" + desc = "Cola. in space" + icon_state = "colabottle" + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cola/New() + ..() + reagents.add_reagent("cola", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up + name = "\improper Space-Up" + desc = "Tastes like a hull breach in your mouth." + icon_state = "space-up_bottle" + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/space_up/New() + ..() + reagents.add_reagent("space_up", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind + name = "\improper Space Mountain Wind" + desc = "Blows right through you like a space wind." + icon_state = "space_mountain_wind_bottle" + center_of_mass = list("x"=16, "y"=6) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/space_mountain_wind/New() + ..() + reagents.add_reagent("spacemountainwind", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine + name = "Warlock's Velvet" + desc = "What a delightful packaging for a surely high quality wine! The vintage must be amazing!" + icon_state = "pwinebottle" + center_of_mass = list("x"=16, "y"=4) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine/New() + ..() + reagents.add_reagent("pwine", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew + name = "Redeemer's Brew" + desc = "Just opening the top of this bottle makes you feel a bit tipsy. Not for the faint of heart." + icon_state = "redeemersbrew" + center_of_mass = list("x"=16, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/redeemersbrew/New() + ..() + reagents.add_reagent("unathiliquor", 100) + +//////////////////////////JUICES AND STUFF /////////////////////// + +/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice + name = "Orange Juice" + desc = "Full of vitamins and deliciousness!" + icon_state = "orangejuice" + item_state = "carton" + center_of_mass = list("x"=16, "y"=7) + isGlass = 0 + +/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice/New() + ..() + reagents.add_reagent("orangejuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/applejuice + name = "Apple Juice" + desc = "Squeezed, pressed and ground to perfection!" + icon_state = "applejuice" + item_state = "carton" + center_of_mass = list("x"=16, "y"=7) + isGlass = 0 + +/obj/item/weapon/reagent_containers/food/drinks/bottle/applejuice/New() + ..() + reagents.add_reagent("applejuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/milk + name = "Large Milk Carton" + desc = "It's milk. This carton's large enough to serve your biggest milk drinkers." + icon_state = "milk" + item_state = "carton" + center_of_mass = list("x"=16, "y"=9) + isGlass = 0 + +/obj/item/weapon/reagent_containers/food/drinks/bottle/milk/New() + ..() + reagents.add_reagent("milk", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cream + name = "Milk Cream" + desc = "It's cream. Made from milk. What else did you think you'd find in there?" + icon_state = "cream" + item_state = "carton" + center_of_mass = list("x"=16, "y"=8) + isGlass = 0 + +/obj/item/weapon/reagent_containers/food/drinks/bottle/cream/New() + ..() + reagents.add_reagent("cream", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice + name = "Tomato Juice" + desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness." + icon_state = "tomatojuice" + item_state = "carton" + center_of_mass = list("x"=16, "y"=8) + isGlass = 0 + +/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice/New() + ..() + reagents.add_reagent("tomatojuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice + name = "Lime Juice" + desc = "Sweet-sour goodness." + icon_state = "limejuice" + item_state = "carton" + center_of_mass = list("x"=16, "y"=8) + isGlass = 0 + +/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice/New() + ..() + reagents.add_reagent("limejuice", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/lemonjuice + name = "Lemon Juice" + desc = "Sweet-sour goodness. Minus the sweet." + icon_state = "lemonjuice" + item_state = "carton" + center_of_mass = list("x"=16, "y"=8) + isGlass = 0 + +/obj/item/weapon/reagent_containers/food/drinks/bottle/lemonjuice/New() + ..() + reagents.add_reagent("lemonjuice", 100) + +//Small bottles +/obj/item/weapon/reagent_containers/food/drinks/bottle/small + volume = 50 + smash_duration = 1 + flags = 0 //starts closed + rag_underlay = "rag_small" + +/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer + name = "space beer" + desc = "Contains only water, malt and hops." + icon_state = "beer" + center_of_mass = list("x"=16, "y"=12) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer/New() + ..() + reagents.add_reagent("beer", 30) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale + name = "\improper Magm-Ale" + desc = "A true dorf's drink of choice." + icon_state = "alebottle" + item_state = "beer" + center_of_mass = list("x"=16, "y"=10) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/small/ale/New() + ..() + reagents.add_reagent("ale", 30) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/sake + name = "Mono-No-Aware Luxury Sake" + desc = "Dry alcohol made from rice, a favorite of businessmen." + icon_state = "sakebottle" + center_of_mass = list("x"=16, "y"=3) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/sake/New() + ..() + reagents.add_reagent("sake", 100) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/champagne + name = "Gilthari Luxury Champagne" + desc = "For those special occassions." + icon_state = "champagne" + +/obj/item/weapon/reagent_containers/food/drinks/bottle/champagne/New() + ..() reagents.add_reagent("champagne", 100) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle/robot.dm b/code/modules/food/food/drinks/bottle/robot.dm similarity index 100% rename from code/modules/reagents/reagent_containers/food/drinks/bottle/robot.dm rename to code/modules/food/food/drinks/bottle/robot.dm diff --git a/code/modules/reagents/reagent_containers/food/drinks/cup.dm b/code/modules/food/food/drinks/cup.dm similarity index 100% rename from code/modules/reagents/reagent_containers/food/drinks/cup.dm rename to code/modules/food/food/drinks/cup.dm diff --git a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm b/code/modules/food/food/drinks/drinkingglass.dm similarity index 96% rename from code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm rename to code/modules/food/food/drinks/drinkingglass.dm index b10feb2b59..b8183fd1fc 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm +++ b/code/modules/food/food/drinks/drinkingglass.dm @@ -1,178 +1,178 @@ - - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass - name = "glass" - desc = "Your standard drinking glass." - icon_state = "glass_empty" - amount_per_transfer_from_this = 5 - volume = 30 - unacidable = 1 //glass - center_of_mass = list("x"=16, "y"=10) - matter = list("glass" = 500) - - on_reagent_change() - /*if(reagents.reagent_list.len > 1 ) - icon_state = "glass_brown" - name = "Glass of Hooch" - desc = "Two or more drinks, mixed together."*/ - /*else if(reagents.reagent_list.len == 1) - for(var/datum/reagent/R in reagents.reagent_list) - switch(R.id)*/ - if (reagents.reagent_list.len > 0) - var/datum/reagent/R = reagents.get_master_reagent() - - if(R.glass_icon_state) - icon_state = R.glass_icon_state - else - icon_state = "glass_brown" - - if(R.glass_name) - name = R.glass_name - else - name = "Glass of.. what?" - - if(R.glass_desc) - desc = R.glass_desc - else - desc = "You can't really tell what this is." - - if(R.glass_center_of_mass) - center_of_mass = R.glass_center_of_mass - else - center_of_mass = list("x"=16, "y"=10) - - if(R.price_tag) - price_tag = R.price_tag - else - price_tag = null - else - icon_state = "glass_empty" - name = "glass" - desc = "Your standard drinking glass." - center_of_mass = list("x"=16, "y"=10) - return - -/obj/item/weapon/reagent_containers/food/drinks/cup - name = "coffee cup" - desc = "The container of oriental luxuries." - icon_state = "cup_empty" - amount_per_transfer_from_this = 5 - volume = 30 - center_of_mass = list("x"=16, "y"=16) - - on_reagent_change() - if (reagents.reagent_list.len > 0) - var/datum/reagent/R = reagents.get_master_reagent() - - if(R.cup_icon_state) - icon_state = R.cup_icon_state - else - icon_state = "cup_brown" - - if(R.cup_name) - name = R.cup_name - else - name = "Cup of.. what?" - - if(R.cup_desc) - desc = R.cup_desc - else - desc = "You can't really tell what this is." - - if(R.cup_center_of_mass) - center_of_mass = R.cup_center_of_mass - else - center_of_mass = list("x"=16, "y"=16) - - if(R.price_tag) - price_tag = R.price_tag - else - price_tag = null - - else - icon_state = "cup_empty" - name = "coffee cup" - desc = "The container of oriental luxuries." - center_of_mass = list("x"=16, "y"=16) - return - -// for /obj/machinery/vending/sovietsoda -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/soda - New() - ..() - reagents.add_reagent("sodawater", 50) - on_reagent_change() - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola - New() - ..() - reagents.add_reagent("cola", 50) - on_reagent_change() - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass - name = "shot glass" - desc = "No glasses were shot in the making of this glass." - icon_state = "shotglass" - amount_per_transfer_from_this = 10 - volume = 10 - matter = list("glass" = 175) - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change() - overlays.Cut() - - if(reagents.total_volume) - var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]1") - - switch(reagents.total_volume) - if(0 to 3) filling.icon_state = "[icon_state]1" - if(4 to 7) filling.icon_state = "[icon_state]5" - if(8 to INFINITY) filling.icon_state = "[icon_state]12" - - filling.color += reagents.get_color() - overlays += filling - name = "shot glass of " + reagents.get_master_reagent_name() //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future. - else - name = "shot glass" - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask - name = "fitness shaker" - desc = "Big enough to contain enough protein to get perfectly swole. Don't mind the bits." - icon_state = "fitness-cup_black" - volume = 100 - matter = list("plastic" = 2000) - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/New() - ..() - icon_state = pick("fitness-cup_black", "fitness-cup_red", "fitness-cup_black") - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/on_reagent_change() - overlays.Cut() - - if(reagents.total_volume) - var/image/filling = image('icons/obj/reagentfillings.dmi', src, "fitness-cup10") - - switch(reagents.total_volume) - if(0 to 10) filling.icon_state = "fitness-cup10" - if(11 to 20) filling.icon_state = "fitness-cup20" - if(21 to 29) filling.icon_state = "fitness-cup30" - if(30 to 39) filling.icon_state = "fitness-cup40" - if(40 to 49) filling.icon_state = "fitness-cup50" - if(50 to 59) filling.icon_state = "fitness-cup60" - if(60 to 69) filling.icon_state = "fitness-cup70" - if(70 to 79) filling.icon_state = "fitness-cup80" - if(80 to 89) filling.icon_state = "fitness-cup90" - if(90 to INFINITY) filling.icon_state = "fitness-cup100" - - filling.color += reagents.get_color() - overlays += filling - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake - name = "protein shake" - -/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake/New() - ..() - reagents.add_reagent("nutriment", 30) - reagents.add_reagent("iron", 10) - reagents.add_reagent("protein", 15) - reagents.add_reagent("water", 45) + + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass + name = "glass" + desc = "Your standard drinking glass." + icon_state = "glass_empty" + amount_per_transfer_from_this = 5 + volume = 30 + unacidable = 1 //glass + center_of_mass = list("x"=16, "y"=10) + matter = list("glass" = 500) + + on_reagent_change() + /*if(reagents.reagent_list.len > 1 ) + icon_state = "glass_brown" + name = "Glass of Hooch" + desc = "Two or more drinks, mixed together."*/ + /*else if(reagents.reagent_list.len == 1) + for(var/datum/reagent/R in reagents.reagent_list) + switch(R.id)*/ + if (reagents.reagent_list.len > 0) + var/datum/reagent/R = reagents.get_master_reagent() + + if(R.glass_icon_state) + icon_state = R.glass_icon_state + else + icon_state = "glass_brown" + + if(R.glass_name) + name = R.glass_name + else + name = "Glass of.. what?" + + if(R.glass_desc) + desc = R.glass_desc + else + desc = "You can't really tell what this is." + + if(R.glass_center_of_mass) + center_of_mass = R.glass_center_of_mass + else + center_of_mass = list("x"=16, "y"=10) + + if(R.price_tag) + price_tag = R.price_tag + else + price_tag = null + else + icon_state = "glass_empty" + name = "glass" + desc = "Your standard drinking glass." + center_of_mass = list("x"=16, "y"=10) + return + +/obj/item/weapon/reagent_containers/food/drinks/cup + name = "coffee cup" + desc = "The container of oriental luxuries." + icon_state = "cup_empty" + amount_per_transfer_from_this = 5 + volume = 30 + center_of_mass = list("x"=16, "y"=16) + + on_reagent_change() + if (reagents.reagent_list.len > 0) + var/datum/reagent/R = reagents.get_master_reagent() + + if(R.cup_icon_state) + icon_state = R.cup_icon_state + else + icon_state = "cup_brown" + + if(R.cup_name) + name = R.cup_name + else + name = "Cup of.. what?" + + if(R.cup_desc) + desc = R.cup_desc + else + desc = "You can't really tell what this is." + + if(R.cup_center_of_mass) + center_of_mass = R.cup_center_of_mass + else + center_of_mass = list("x"=16, "y"=16) + + if(R.price_tag) + price_tag = R.price_tag + else + price_tag = null + + else + icon_state = "cup_empty" + name = "coffee cup" + desc = "The container of oriental luxuries." + center_of_mass = list("x"=16, "y"=16) + return + +// for /obj/machinery/vending/sovietsoda +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/soda + New() + ..() + reagents.add_reagent("sodawater", 50) + on_reagent_change() + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/cola + New() + ..() + reagents.add_reagent("cola", 50) + on_reagent_change() + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass + name = "shot glass" + desc = "No glasses were shot in the making of this glass." + icon_state = "shotglass" + amount_per_transfer_from_this = 10 + volume = 10 + matter = list("glass" = 175) + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/shotglass/on_reagent_change() + overlays.Cut() + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]1") + + switch(reagents.total_volume) + if(0 to 3) filling.icon_state = "[icon_state]1" + if(4 to 7) filling.icon_state = "[icon_state]5" + if(8 to INFINITY) filling.icon_state = "[icon_state]12" + + filling.color += reagents.get_color() + overlays += filling + name = "shot glass of " + reagents.get_master_reagent_name() //No matter what, the glass will tell you the reagent's name. Might be too abusable in the future. + else + name = "shot glass" + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask + name = "fitness shaker" + desc = "Big enough to contain enough protein to get perfectly swole. Don't mind the bits." + icon_state = "fitness-cup_black" + volume = 100 + matter = list("plastic" = 2000) + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/New() + ..() + icon_state = pick("fitness-cup_black", "fitness-cup_red", "fitness-cup_black") + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/on_reagent_change() + overlays.Cut() + + if(reagents.total_volume) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "fitness-cup10") + + switch(reagents.total_volume) + if(0 to 10) filling.icon_state = "fitness-cup10" + if(11 to 20) filling.icon_state = "fitness-cup20" + if(21 to 29) filling.icon_state = "fitness-cup30" + if(30 to 39) filling.icon_state = "fitness-cup40" + if(40 to 49) filling.icon_state = "fitness-cup50" + if(50 to 59) filling.icon_state = "fitness-cup60" + if(60 to 69) filling.icon_state = "fitness-cup70" + if(70 to 79) filling.icon_state = "fitness-cup80" + if(80 to 89) filling.icon_state = "fitness-cup90" + if(90 to INFINITY) filling.icon_state = "fitness-cup100" + + filling.color += reagents.get_color() + overlays += filling + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake + name = "protein shake" + +/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/fitnessflask/proteinshake/New() + ..() + reagents.add_reagent("nutriment", 30) + reagents.add_reagent("iron", 10) + reagents.add_reagent("protein", 15) + reagents.add_reagent("water", 45) on_reagent_change() \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/drinks/jar.dm b/code/modules/food/food/drinks/jar.dm similarity index 96% rename from code/modules/reagents/reagent_containers/food/drinks/jar.dm rename to code/modules/food/food/drinks/jar.dm index b4d305bae7..2167eb48a4 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/jar.dm +++ b/code/modules/food/food/drinks/jar.dm @@ -1,25 +1,25 @@ -///jar -/obj/item/weapon/reagent_containers/food/drinks/jar - name = "empty jar" - desc = "A jar. You're not sure what it's supposed to hold." - icon_state = "jar" - item_state = "beaker" - center_of_mass = list("x"=15, "y"=8) - unacidable = 1 - -/obj/item/weapon/reagent_containers/food/drinks/jar/on_reagent_change() - if (reagents.reagent_list.len > 0) - switch(reagents.get_master_reagent_id()) - if("slime") - icon_state = "jar_slime" - name = "slime jam" - desc = "A jar of slime jam. Delicious!" - else - icon_state ="jar_what" - name = "jar of something" - desc = "You can't really tell what this is." - else - icon_state = "jar" - name = "empty jar" - desc = "A jar. You're not sure what it's supposed to hold." - return +///jar +/obj/item/weapon/reagent_containers/food/drinks/jar + name = "empty jar" + desc = "A jar. You're not sure what it's supposed to hold." + icon_state = "jar" + item_state = "beaker" + center_of_mass = list("x"=15, "y"=8) + unacidable = 1 + +/obj/item/weapon/reagent_containers/food/drinks/jar/on_reagent_change() + if (reagents.reagent_list.len > 0) + switch(reagents.get_master_reagent_id()) + if("slime") + icon_state = "jar_slime" + name = "slime jam" + desc = "A jar of slime jam. Delicious!" + else + icon_state ="jar_what" + name = "jar of something" + desc = "You can't really tell what this is." + else + icon_state = "jar" + name = "empty jar" + desc = "A jar. You're not sure what it's supposed to hold." + return diff --git a/code/modules/reagents/reagent_containers/food/lunch.dm b/code/modules/food/food/lunch.dm similarity index 100% rename from code/modules/reagents/reagent_containers/food/lunch.dm rename to code/modules/food/food/lunch.dm diff --git a/code/modules/reagents/reagent_containers/food/sandwich.dm b/code/modules/food/food/sandwich.dm similarity index 100% rename from code/modules/reagents/reagent_containers/food/sandwich.dm rename to code/modules/food/food/sandwich.dm diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/food/food/snacks.dm similarity index 100% rename from code/modules/reagents/reagent_containers/food/snacks.dm rename to code/modules/food/food/snacks.dm diff --git a/code/modules/reagents/reagent_containers/food/snacks/meat.dm b/code/modules/food/food/snacks/meat.dm similarity index 94% rename from code/modules/reagents/reagent_containers/food/snacks/meat.dm rename to code/modules/food/food/snacks/meat.dm index 9e1dc52536..d6ecacea48 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/meat.dm +++ b/code/modules/food/food/snacks/meat.dm @@ -1,37 +1,37 @@ -/obj/item/weapon/reagent_containers/food/snacks/meat - name = "meat" - desc = "A slab of meat." - icon_state = "meat" - health = 180 - filling_color = "#FF1C1C" - center_of_mass = list("x"=16, "y"=14) - -/obj/item/weapon/reagent_containers/food/snacks/meat/New() - ..() - reagents.add_reagent("protein", 9) - src.bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/material/knife)) - new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) - new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) - new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) - user << "You cut the meat into thin strips." - qdel(src) - else - ..() - -/obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh - name = "synthetic meat" - desc = "A synthetic slab of flesh." - -// Seperate definitions because some food likes to know if it's human. -// TODO: rewrite kitchen code to check a var on the meat item so we can remove -// all these sybtypes. -/obj/item/weapon/reagent_containers/food/snacks/meat/human -/obj/item/weapon/reagent_containers/food/snacks/meat/monkey - //same as plain meat - -/obj/item/weapon/reagent_containers/food/snacks/meat/corgi - name = "Corgi meat" +/obj/item/weapon/reagent_containers/food/snacks/meat + name = "meat" + desc = "A slab of meat." + icon_state = "meat" + health = 180 + filling_color = "#FF1C1C" + center_of_mass = list("x"=16, "y"=14) + +/obj/item/weapon/reagent_containers/food/snacks/meat/New() + ..() + reagents.add_reagent("protein", 9) + src.bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/meat/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W,/obj/item/weapon/material/knife)) + new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) + new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) + new /obj/item/weapon/reagent_containers/food/snacks/rawcutlet(src) + user << "You cut the meat into thin strips." + qdel(src) + else + ..() + +/obj/item/weapon/reagent_containers/food/snacks/meat/syntiflesh + name = "synthetic meat" + desc = "A synthetic slab of flesh." + +// Seperate definitions because some food likes to know if it's human. +// TODO: rewrite kitchen code to check a var on the meat item so we can remove +// all these sybtypes. +/obj/item/weapon/reagent_containers/food/snacks/meat/human +/obj/item/weapon/reagent_containers/food/snacks/meat/monkey + //same as plain meat + +/obj/item/weapon/reagent_containers/food/snacks/meat/corgi + name = "Corgi meat" desc = "Tastes like... well, you know." \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/food/snacks_vr.dm b/code/modules/food/food/snacks_vr.dm similarity index 100% rename from code/modules/reagents/reagent_containers/food/snacks_vr.dm rename to code/modules/food/food/snacks_vr.dm diff --git a/code/modules/reagents/reagent_containers/food/z_custom_food_vr.dm b/code/modules/food/food/z_custom_food_vr.dm similarity index 100% rename from code/modules/reagents/reagent_containers/food/z_custom_food_vr.dm rename to code/modules/food/food/z_custom_food_vr.dm diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/food/glass/bottle.dm similarity index 96% rename from code/modules/reagents/reagent_containers/glass/bottle.dm rename to code/modules/food/glass/bottle.dm index 159ac6acf3..fcf618c201 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/food/glass/bottle.dm @@ -1,175 +1,175 @@ - -//Not to be confused with /obj/item/weapon/reagent_containers/food/drinks/bottle - -/obj/item/weapon/reagent_containers/glass/bottle - name = "bottle" - desc = "A small bottle." - icon = 'icons/obj/chemical.dmi' - icon_state = null - item_state = "atoxinbottle" - amount_per_transfer_from_this = 10 - possible_transfer_amounts = list(5,10,15,25,30,60) - flags = 0 - volume = 60 - -/obj/item/weapon/reagent_containers/glass/bottle/on_reagent_change() - update_icon() - -/obj/item/weapon/reagent_containers/glass/bottle/pickup(mob/user) - ..() - update_icon() - -/obj/item/weapon/reagent_containers/glass/bottle/dropped(mob/user) - ..() - update_icon() - -/obj/item/weapon/reagent_containers/glass/bottle/attack_hand() - ..() - update_icon() - -/obj/item/weapon/reagent_containers/glass/bottle/New() - ..() - if(!icon_state) - icon_state = "bottle-[rand(1,4)]" - -/obj/item/weapon/reagent_containers/glass/bottle/update_icon() - overlays.Cut() - - if(reagents.total_volume && (icon_state == "bottle-1" || icon_state == "bottle-2" || icon_state == "bottle-3" || icon_state == "bottle-4")) - var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10") - - var/percent = round((reagents.total_volume / volume) * 100) - switch(percent) - if(0 to 9) filling.icon_state = "[icon_state]--10" - if(10 to 24) filling.icon_state = "[icon_state]-10" - if(25 to 49) filling.icon_state = "[icon_state]-25" - if(50 to 74) filling.icon_state = "[icon_state]-50" - if(75 to 79) filling.icon_state = "[icon_state]-75" - if(80 to 90) filling.icon_state = "[icon_state]-80" - if(91 to INFINITY) filling.icon_state = "[icon_state]-100" - - filling.color = reagents.get_color() - overlays += filling - - if (!is_open_container()) - var/image/lid = image(icon, src, "lid_bottle") - overlays += lid - -/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline - name = "inaprovaline bottle" - desc = "A small bottle. Contains inaprovaline - used to stabilize patients." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("inaprovaline" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/toxin - name = "toxin bottle" - desc = "A small bottle of toxins. Do not drink, it is poisonous." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-3" - prefill = list("toxin" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/cyanide - name = "cyanide bottle" - desc = "A small bottle of cyanide. Bitter almonds?" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-3" - prefill = list("cyanide" = 30) //volume changed to match chloral - -/obj/item/weapon/reagent_containers/glass/bottle/stoxin - name = "soporific bottle" - desc = "A small bottle of soporific. Just the fumes make you sleepy." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-3" - prefill = list("stoxin" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/chloralhydrate - name = "chloral hydrate bottle" - desc = "A small bottle of Choral Hydrate. Mickey's Favorite!" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-3" - prefill = list("chloralhydrate" = 30) //Intentionally low since it is so strong. Still enough to knock someone out. - -/obj/item/weapon/reagent_containers/glass/bottle/antitoxin - name = "dylovene bottle" - desc = "A small bottle of dylovene. Counters poisons, and repairs damage. A wonder drug." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("anti_toxin" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/mutagen - name = "unstable mutagen bottle" - desc = "A small bottle of unstable mutagen. Randomly changes the DNA structure of whoever comes in contact." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-1" - prefill = list("mutagen" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/ammonia - name = "ammonia bottle" - desc = "A small bottle." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-1" - prefill = list("ammonia" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/eznutrient - name = "\improper EZ NUtrient bottle" - desc = "A small bottle." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("eznutrient" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/left4zed - name = "\improper Left-4-Zed bottle" - desc = "A small bottle." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("left4zed" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/robustharvest - name = "\improper Robust Harvest" - desc = "A small bottle." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("robustharvest" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/diethylamine - name = "diethylamine bottle" - desc = "A small bottle." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("diethylamine" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/pacid - name = "polytrinic acid bottle" - desc = "A small bottle. Contains a small amount of Polytrinic Acid" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("pacid" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/adminordrazine - name = "adminordrazine bottle" - desc = "A small bottle. Contains the liquid essence of the gods." - icon = 'icons/obj/drinks.dmi' - icon_state = "holyflask" - prefill = list("adminordrazine" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/capsaicin - name = "capsaicin bottle" - desc = "A small bottle. Contains hot sauce." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("capsaicin" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/frostoil - name = "frost oil bottle" - desc = "A small bottle. Contains cold sauce." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - prefill = list("frostoil" = 60) - -/obj/item/weapon/reagent_containers/glass/bottle/biomass - name = "biomass bottle" - desc = "A bottle of raw biomass! Gross!" - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-3" + +//Not to be confused with /obj/item/weapon/reagent_containers/food/drinks/bottle + +/obj/item/weapon/reagent_containers/glass/bottle + name = "bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = null + item_state = "atoxinbottle" + amount_per_transfer_from_this = 10 + possible_transfer_amounts = list(5,10,15,25,30,60) + flags = 0 + volume = 60 + +/obj/item/weapon/reagent_containers/glass/bottle/on_reagent_change() + update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/pickup(mob/user) + ..() + update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/dropped(mob/user) + ..() + update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/attack_hand() + ..() + update_icon() + +/obj/item/weapon/reagent_containers/glass/bottle/New() + ..() + if(!icon_state) + icon_state = "bottle-[rand(1,4)]" + +/obj/item/weapon/reagent_containers/glass/bottle/update_icon() + overlays.Cut() + + if(reagents.total_volume && (icon_state == "bottle-1" || icon_state == "bottle-2" || icon_state == "bottle-3" || icon_state == "bottle-4")) + var/image/filling = image('icons/obj/reagentfillings.dmi', src, "[icon_state]10") + + var/percent = round((reagents.total_volume / volume) * 100) + switch(percent) + if(0 to 9) filling.icon_state = "[icon_state]--10" + if(10 to 24) filling.icon_state = "[icon_state]-10" + if(25 to 49) filling.icon_state = "[icon_state]-25" + if(50 to 74) filling.icon_state = "[icon_state]-50" + if(75 to 79) filling.icon_state = "[icon_state]-75" + if(80 to 90) filling.icon_state = "[icon_state]-80" + if(91 to INFINITY) filling.icon_state = "[icon_state]-100" + + filling.color = reagents.get_color() + overlays += filling + + if (!is_open_container()) + var/image/lid = image(icon, src, "lid_bottle") + overlays += lid + +/obj/item/weapon/reagent_containers/glass/bottle/inaprovaline + name = "inaprovaline bottle" + desc = "A small bottle. Contains inaprovaline - used to stabilize patients." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("inaprovaline" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/toxin + name = "toxin bottle" + desc = "A small bottle of toxins. Do not drink, it is poisonous." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-3" + prefill = list("toxin" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/cyanide + name = "cyanide bottle" + desc = "A small bottle of cyanide. Bitter almonds?" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-3" + prefill = list("cyanide" = 30) //volume changed to match chloral + +/obj/item/weapon/reagent_containers/glass/bottle/stoxin + name = "soporific bottle" + desc = "A small bottle of soporific. Just the fumes make you sleepy." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-3" + prefill = list("stoxin" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/chloralhydrate + name = "chloral hydrate bottle" + desc = "A small bottle of Choral Hydrate. Mickey's Favorite!" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-3" + prefill = list("chloralhydrate" = 30) //Intentionally low since it is so strong. Still enough to knock someone out. + +/obj/item/weapon/reagent_containers/glass/bottle/antitoxin + name = "dylovene bottle" + desc = "A small bottle of dylovene. Counters poisons, and repairs damage. A wonder drug." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("anti_toxin" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/mutagen + name = "unstable mutagen bottle" + desc = "A small bottle of unstable mutagen. Randomly changes the DNA structure of whoever comes in contact." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-1" + prefill = list("mutagen" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/ammonia + name = "ammonia bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-1" + prefill = list("ammonia" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/eznutrient + name = "\improper EZ NUtrient bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("eznutrient" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/left4zed + name = "\improper Left-4-Zed bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("left4zed" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/robustharvest + name = "\improper Robust Harvest" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("robustharvest" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/diethylamine + name = "diethylamine bottle" + desc = "A small bottle." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("diethylamine" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/pacid + name = "polytrinic acid bottle" + desc = "A small bottle. Contains a small amount of Polytrinic Acid" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("pacid" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/adminordrazine + name = "adminordrazine bottle" + desc = "A small bottle. Contains the liquid essence of the gods." + icon = 'icons/obj/drinks.dmi' + icon_state = "holyflask" + prefill = list("adminordrazine" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/capsaicin + name = "capsaicin bottle" + desc = "A small bottle. Contains hot sauce." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("capsaicin" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/frostoil + name = "frost oil bottle" + desc = "A small bottle. Contains cold sauce." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + prefill = list("frostoil" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/biomass + name = "biomass bottle" + desc = "A bottle of raw biomass! Gross!" + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-3" prefill = list("biomass" = 60) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass/bottle/robot.dm b/code/modules/food/glass/bottle/robot.dm similarity index 97% rename from code/modules/reagents/reagent_containers/glass/bottle/robot.dm rename to code/modules/food/glass/bottle/robot.dm index fec991ab3f..78638235a2 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle/robot.dm +++ b/code/modules/food/glass/bottle/robot.dm @@ -1,25 +1,25 @@ - -/obj/item/weapon/reagent_containers/glass/bottle/robot - amount_per_transfer_from_this = 10 - possible_transfer_amounts = list(5,10,15,25,30,50,100) - flags = OPENCONTAINER - volume = 60 - var/reagent = "" - - -/obj/item/weapon/reagent_containers/glass/bottle/robot/inaprovaline - name = "internal inaprovaline bottle" - desc = "A small bottle. Contains inaprovaline - used to stabilize patients." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - reagent = "inaprovaline" - prefill = list("inaprovaline" = 60) - - -/obj/item/weapon/reagent_containers/glass/bottle/robot/antitoxin - name = "internal anti-toxin bottle" - desc = "A small bottle of Anti-toxins. Counters poisons, and repairs damage, a wonder drug." - icon = 'icons/obj/chemical.dmi' - icon_state = "bottle-4" - reagent = "anti_toxin" - prefill = list("anti_toxin" = 60) + +/obj/item/weapon/reagent_containers/glass/bottle/robot + amount_per_transfer_from_this = 10 + possible_transfer_amounts = list(5,10,15,25,30,50,100) + flags = OPENCONTAINER + volume = 60 + var/reagent = "" + + +/obj/item/weapon/reagent_containers/glass/bottle/robot/inaprovaline + name = "internal inaprovaline bottle" + desc = "A small bottle. Contains inaprovaline - used to stabilize patients." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + reagent = "inaprovaline" + prefill = list("inaprovaline" = 60) + + +/obj/item/weapon/reagent_containers/glass/bottle/robot/antitoxin + name = "internal anti-toxin bottle" + desc = "A small bottle of Anti-toxins. Counters poisons, and repairs damage, a wonder drug." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle-4" + reagent = "anti_toxin" + prefill = list("anti_toxin" = 60) diff --git a/code/game/machinery/kitchen/cooking_machines/_cooker.dm b/code/modules/food/kitchen/cooking_machines/_cooker.dm similarity index 100% rename from code/game/machinery/kitchen/cooking_machines/_cooker.dm rename to code/modules/food/kitchen/cooking_machines/_cooker.dm diff --git a/code/game/machinery/kitchen/cooking_machines/_cooker_output.dm b/code/modules/food/kitchen/cooking_machines/_cooker_output.dm similarity index 100% rename from code/game/machinery/kitchen/cooking_machines/_cooker_output.dm rename to code/modules/food/kitchen/cooking_machines/_cooker_output.dm diff --git a/code/game/machinery/kitchen/cooking_machines/candy.dm b/code/modules/food/kitchen/cooking_machines/candy.dm similarity index 100% rename from code/game/machinery/kitchen/cooking_machines/candy.dm rename to code/modules/food/kitchen/cooking_machines/candy.dm diff --git a/code/game/machinery/kitchen/cooking_machines/cereal.dm b/code/modules/food/kitchen/cooking_machines/cereal.dm similarity index 100% rename from code/game/machinery/kitchen/cooking_machines/cereal.dm rename to code/modules/food/kitchen/cooking_machines/cereal.dm diff --git a/code/game/machinery/kitchen/cooking_machines/fryer.dm b/code/modules/food/kitchen/cooking_machines/fryer.dm similarity index 100% rename from code/game/machinery/kitchen/cooking_machines/fryer.dm rename to code/modules/food/kitchen/cooking_machines/fryer.dm diff --git a/code/game/machinery/kitchen/cooking_machines/grill.dm b/code/modules/food/kitchen/cooking_machines/grill.dm similarity index 100% rename from code/game/machinery/kitchen/cooking_machines/grill.dm rename to code/modules/food/kitchen/cooking_machines/grill.dm diff --git a/code/game/machinery/kitchen/cooking_machines/oven.dm b/code/modules/food/kitchen/cooking_machines/oven.dm similarity index 100% rename from code/game/machinery/kitchen/cooking_machines/oven.dm rename to code/modules/food/kitchen/cooking_machines/oven.dm diff --git a/code/game/machinery/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm similarity index 96% rename from code/game/machinery/kitchen/gibber.dm rename to code/modules/food/kitchen/gibber.dm index d695253aa9..4799002cb5 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/modules/food/kitchen/gibber.dm @@ -1,236 +1,236 @@ - -/obj/machinery/gibber - name = "gibber" - desc = "The name isn't descriptive enough?" - icon = 'icons/obj/kitchen.dmi' - icon_state = "grinder" - density = 1 - anchored = 1 - req_access = list(access_kitchen,access_morgue) - - var/operating = 0 //Is it on? - var/dirty = 0 // Does it need cleaning? - var/mob/living/occupant // Mob who has been put inside - var/gib_time = 40 // Time from starting until meat appears - var/gib_throw_dir = WEST // Direction to spit meat and gibs in. - - use_power = 1 - idle_power_usage = 2 - active_power_usage = 500 - -//auto-gibs anything that bumps into it -/obj/machinery/gibber/autogibber - var/turf/input_plate - -/obj/machinery/gibber/autogibber/New() - ..() - spawn(5) - for(var/i in cardinal) - var/obj/machinery/mineral/input/input_obj = locate( /obj/machinery/mineral/input, get_step(src.loc, i) ) - if(input_obj) - if(isturf(input_obj.loc)) - input_plate = input_obj.loc - gib_throw_dir = i - qdel(input_obj) - break - - if(!input_plate) - log_misc("a [src] didn't find an input plate.") - return - -/obj/machinery/gibber/autogibber/Bumped(var/atom/A) - if(!input_plate) return - - if(ismob(A)) - var/mob/M = A - - if(M.loc == input_plate - ) - M.loc = src - M.gib() - - -/obj/machinery/gibber/New() - ..() - src.overlays += image('icons/obj/kitchen.dmi', "grjam") - -/obj/machinery/gibber/update_icon() - overlays.Cut() - if (dirty) - src.overlays += image('icons/obj/kitchen.dmi', "grbloody") - if(stat & (NOPOWER|BROKEN)) - return - if (!occupant) - src.overlays += image('icons/obj/kitchen.dmi', "grjam") - else if (operating) - src.overlays += image('icons/obj/kitchen.dmi', "gruse") - else - src.overlays += image('icons/obj/kitchen.dmi', "gridle") - -/obj/machinery/gibber/relaymove(mob/user as mob) - src.go_out() - return - -/obj/machinery/gibber/attack_hand(mob/user as mob) - if(stat & (NOPOWER|BROKEN)) - return - if(operating) - user << "The gibber is locked and running, wait for it to finish." - return - else - src.startgibbing(user) - -/obj/machinery/gibber/examine() - ..() - usr << "The safety guard is [emagged ? "disabled" : "enabled"]." - -/obj/machinery/gibber/emag_act(var/remaining_charges, var/mob/user) - emagged = !emagged - user << "You [emagged ? "disable" : "enable"] the gibber safety guard." - return 1 - -/obj/machinery/gibber/attackby(var/obj/item/W, var/mob/user) - var/obj/item/weapon/grab/G = W - - if(default_unfasten_wrench(user, W, 40)) - return - - if(!istype(G)) - return ..() - - if(G.state < 2) - user << "You need a better grip to do that!" - return - - move_into_gibber(user,G.affecting) - // Grab() process should clean up the grab item, no need to del it. - -/obj/machinery/gibber/MouseDrop_T(mob/target, mob/user) - if(user.stat || user.restrained()) - return - move_into_gibber(user,target) - -/obj/machinery/gibber/proc/move_into_gibber(var/mob/user,var/mob/living/victim) - - if(src.occupant) - user << "The gibber is full, empty it first!" - return - - if(operating) - user << "The gibber is locked and running, wait for it to finish." - return - - if(!(istype(victim, /mob/living/carbon)) && !(istype(victim, /mob/living/simple_animal)) ) - user << "This is not suitable for the gibber!" - return - - if(istype(victim,/mob/living/carbon/human) && !emagged) - user << "The gibber safety guard is engaged!" - return - - - if(victim.abiotic(1)) - user << "Subject may not have abiotic items on." - return - - user.visible_message("[user] starts to put [victim] into the gibber!") - src.add_fingerprint(user) - if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant) - user.visible_message("[user] stuffs [victim] into the gibber!") - if(victim.client) - victim.client.perspective = EYE_PERSPECTIVE - victim.client.eye = src - victim.loc = src - src.occupant = victim - update_icon() - -/obj/machinery/gibber/verb/eject() - set category = "Object" - set name = "Empty Gibber" - set src in oview(1) - - if (usr.stat != 0) - return - src.go_out() - add_fingerprint(usr) - return - -/obj/machinery/gibber/proc/go_out() - if(operating || !src.occupant) - return - for(var/obj/O in src) - O.loc = src.loc - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null - update_icon() - return - - -/obj/machinery/gibber/proc/startgibbing(mob/user as mob) - if(src.operating) - return - if(!src.occupant) - visible_message("You hear a loud metallic grinding sound.") - return - - use_power(1000) - visible_message("You hear a loud [occupant.isSynthetic() ? "metallic" : "squelchy"] grinding sound.") - src.operating = 1 - update_icon() - - var/slab_name = occupant.name - var/slab_count = 3 - var/slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat - var/slab_nutrition = src.occupant.nutrition / 15 - - // Some mobs have specific meat item types. - if(istype(src.occupant,/mob/living/simple_animal)) - var/mob/living/simple_animal/critter = src.occupant - if(critter.meat_amount) - slab_count = critter.meat_amount - if(critter.meat_type) - slab_type = critter.meat_type - else if(istype(src.occupant,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = occupant - slab_name = src.occupant.real_name - slab_type = H.isSynthetic() ? /obj/item/stack/material/steel : H.species.meat_type - - // Small mobs don't give as much nutrition. - if(issmall(src.occupant)) - slab_nutrition *= 0.5 - slab_nutrition /= slab_count - - for(var/i=1 to slab_count) - var/obj/item/weapon/reagent_containers/food/snacks/meat/new_meat = new slab_type(src, rand(3,8)) - if(istype(new_meat)) - new_meat.name = "[slab_name] [new_meat.name]" - new_meat.reagents.add_reagent("nutriment",slab_nutrition) - if(src.occupant.reagents) - src.occupant.reagents.trans_to_obj(new_meat, round(occupant.reagents.total_volume/slab_count,1)) - - add_attack_logs(user,occupant,"Used [src] to gib") - - src.occupant.ghostize() - - spawn(gib_time) - - src.operating = 0 - src.occupant.gib() - qdel(src.occupant) - - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) - operating = 0 - for (var/obj/item/thing in contents) - // There's a chance that the gibber will fail to destroy some evidence. - if(istype(thing,/obj/item/organ) && prob(80)) - qdel(thing) - continue - thing.forceMove(get_turf(thing)) // Drop it onto the turf for throwing. - thing.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(0,3),emagged ? 100 : 50) // Being pelted with bits of meat and bone would hurt. - - update_icon() - - + +/obj/machinery/gibber + name = "gibber" + desc = "The name isn't descriptive enough?" + icon = 'icons/obj/kitchen.dmi' + icon_state = "grinder" + density = 1 + anchored = 1 + req_access = list(access_kitchen,access_morgue) + + var/operating = 0 //Is it on? + var/dirty = 0 // Does it need cleaning? + var/mob/living/occupant // Mob who has been put inside + var/gib_time = 40 // Time from starting until meat appears + var/gib_throw_dir = WEST // Direction to spit meat and gibs in. + + use_power = 1 + idle_power_usage = 2 + active_power_usage = 500 + +//auto-gibs anything that bumps into it +/obj/machinery/gibber/autogibber + var/turf/input_plate + +/obj/machinery/gibber/autogibber/New() + ..() + spawn(5) + for(var/i in cardinal) + var/obj/machinery/mineral/input/input_obj = locate( /obj/machinery/mineral/input, get_step(src.loc, i) ) + if(input_obj) + if(isturf(input_obj.loc)) + input_plate = input_obj.loc + gib_throw_dir = i + qdel(input_obj) + break + + if(!input_plate) + log_misc("a [src] didn't find an input plate.") + return + +/obj/machinery/gibber/autogibber/Bumped(var/atom/A) + if(!input_plate) return + + if(ismob(A)) + var/mob/M = A + + if(M.loc == input_plate + ) + M.loc = src + M.gib() + + +/obj/machinery/gibber/New() + ..() + src.overlays += image('icons/obj/kitchen.dmi', "grjam") + +/obj/machinery/gibber/update_icon() + overlays.Cut() + if (dirty) + src.overlays += image('icons/obj/kitchen.dmi', "grbloody") + if(stat & (NOPOWER|BROKEN)) + return + if (!occupant) + src.overlays += image('icons/obj/kitchen.dmi', "grjam") + else if (operating) + src.overlays += image('icons/obj/kitchen.dmi', "gruse") + else + src.overlays += image('icons/obj/kitchen.dmi', "gridle") + +/obj/machinery/gibber/relaymove(mob/user as mob) + src.go_out() + return + +/obj/machinery/gibber/attack_hand(mob/user as mob) + if(stat & (NOPOWER|BROKEN)) + return + if(operating) + user << "The gibber is locked and running, wait for it to finish." + return + else + src.startgibbing(user) + +/obj/machinery/gibber/examine() + ..() + usr << "The safety guard is [emagged ? "disabled" : "enabled"]." + +/obj/machinery/gibber/emag_act(var/remaining_charges, var/mob/user) + emagged = !emagged + user << "You [emagged ? "disable" : "enable"] the gibber safety guard." + return 1 + +/obj/machinery/gibber/attackby(var/obj/item/W, var/mob/user) + var/obj/item/weapon/grab/G = W + + if(default_unfasten_wrench(user, W, 40)) + return + + if(!istype(G)) + return ..() + + if(G.state < 2) + user << "You need a better grip to do that!" + return + + move_into_gibber(user,G.affecting) + // Grab() process should clean up the grab item, no need to del it. + +/obj/machinery/gibber/MouseDrop_T(mob/target, mob/user) + if(user.stat || user.restrained()) + return + move_into_gibber(user,target) + +/obj/machinery/gibber/proc/move_into_gibber(var/mob/user,var/mob/living/victim) + + if(src.occupant) + user << "The gibber is full, empty it first!" + return + + if(operating) + user << "The gibber is locked and running, wait for it to finish." + return + + if(!(istype(victim, /mob/living/carbon)) && !(istype(victim, /mob/living/simple_animal)) ) + user << "This is not suitable for the gibber!" + return + + if(istype(victim,/mob/living/carbon/human) && !emagged) + user << "The gibber safety guard is engaged!" + return + + + if(victim.abiotic(1)) + user << "Subject may not have abiotic items on." + return + + user.visible_message("[user] starts to put [victim] into the gibber!") + src.add_fingerprint(user) + if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant) + user.visible_message("[user] stuffs [victim] into the gibber!") + if(victim.client) + victim.client.perspective = EYE_PERSPECTIVE + victim.client.eye = src + victim.loc = src + src.occupant = victim + update_icon() + +/obj/machinery/gibber/verb/eject() + set category = "Object" + set name = "Empty Gibber" + set src in oview(1) + + if (usr.stat != 0) + return + src.go_out() + add_fingerprint(usr) + return + +/obj/machinery/gibber/proc/go_out() + if(operating || !src.occupant) + return + for(var/obj/O in src) + O.loc = src.loc + if (src.occupant.client) + src.occupant.client.eye = src.occupant.client.mob + src.occupant.client.perspective = MOB_PERSPECTIVE + src.occupant.loc = src.loc + src.occupant = null + update_icon() + return + + +/obj/machinery/gibber/proc/startgibbing(mob/user as mob) + if(src.operating) + return + if(!src.occupant) + visible_message("You hear a loud metallic grinding sound.") + return + + use_power(1000) + visible_message("You hear a loud [occupant.isSynthetic() ? "metallic" : "squelchy"] grinding sound.") + src.operating = 1 + update_icon() + + var/slab_name = occupant.name + var/slab_count = 3 + var/slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat + var/slab_nutrition = src.occupant.nutrition / 15 + + // Some mobs have specific meat item types. + if(istype(src.occupant,/mob/living/simple_animal)) + var/mob/living/simple_animal/critter = src.occupant + if(critter.meat_amount) + slab_count = critter.meat_amount + if(critter.meat_type) + slab_type = critter.meat_type + else if(istype(src.occupant,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = occupant + slab_name = src.occupant.real_name + slab_type = H.isSynthetic() ? /obj/item/stack/material/steel : H.species.meat_type + + // Small mobs don't give as much nutrition. + if(issmall(src.occupant)) + slab_nutrition *= 0.5 + slab_nutrition /= slab_count + + for(var/i=1 to slab_count) + var/obj/item/weapon/reagent_containers/food/snacks/meat/new_meat = new slab_type(src, rand(3,8)) + if(istype(new_meat)) + new_meat.name = "[slab_name] [new_meat.name]" + new_meat.reagents.add_reagent("nutriment",slab_nutrition) + if(src.occupant.reagents) + src.occupant.reagents.trans_to_obj(new_meat, round(occupant.reagents.total_volume/slab_count,1)) + + add_attack_logs(user,occupant,"Used [src] to gib") + + src.occupant.ghostize() + + spawn(gib_time) + + src.operating = 0 + src.occupant.gib() + qdel(src.occupant) + + playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) + operating = 0 + for (var/obj/item/thing in contents) + // There's a chance that the gibber will fail to destroy some evidence. + if(istype(thing,/obj/item/organ) && prob(80)) + qdel(thing) + continue + thing.forceMove(get_turf(thing)) // Drop it onto the turf for throwing. + thing.throw_at(get_edge_target_turf(src,gib_throw_dir),rand(0,3),emagged ? 100 : 50) // Being pelted with bits of meat and bone would hurt. + + update_icon() + + diff --git a/code/game/machinery/kitchen/icecream.dm b/code/modules/food/kitchen/icecream.dm similarity index 100% rename from code/game/machinery/kitchen/icecream.dm rename to code/modules/food/kitchen/icecream.dm diff --git a/code/game/machinery/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm similarity index 97% rename from code/game/machinery/kitchen/microwave.dm rename to code/modules/food/kitchen/microwave.dm index 1ece9225b1..7357dd5568 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/modules/food/kitchen/microwave.dm @@ -1,392 +1,392 @@ -/obj/machinery/microwave - name = "microwave" - icon = 'icons/obj/kitchen.dmi' - icon_state = "mw" - density = 1 - anchored = 1 - use_power = 1 - idle_power_usage = 5 - active_power_usage = 100 - flags = OPENCONTAINER | NOREACT - circuit = /obj/item/weapon/circuitboard/microwave - var/operating = 0 // Is it on? - var/dirty = 0 // = {0..100} Does it need cleaning? - var/broken = 0 // ={0,1,2} How broken is it??? - var/global/list/datum/recipe/available_recipes // List of the recipes you can use - var/global/list/acceptable_items // List of the items you can put in - var/global/list/acceptable_reagents // List of the reagents you can put in - var/global/max_n_of_items = 0 - - -// see code/modules/food/recipes_microwave.dm for recipes - -/******************* -* Initialising -********************/ - -/obj/machinery/microwave/New() - ..() - reagents = new/datum/reagents(100) - reagents.my_atom = src - - component_parts = list() - component_parts += new /obj/item/weapon/stock_parts/console_screen(src) - component_parts += new /obj/item/weapon/stock_parts/motor(src) - component_parts += new /obj/item/weapon/stock_parts/capacitor(src) - - if (!available_recipes) - available_recipes = new - for (var/type in (typesof(/datum/recipe)-/datum/recipe)) - available_recipes+= new type - acceptable_items = new - acceptable_reagents = new - for (var/datum/recipe/recipe in available_recipes) - for (var/item in recipe.items) - acceptable_items |= item - for (var/reagent in recipe.reagents) - acceptable_reagents |= reagent - if (recipe.items) - max_n_of_items = max(max_n_of_items,recipe.items.len) - // This will do until I can think of a fun recipe to use dionaea in - - // will also allow anything using the holder item to be microwaved into - // impure carbon. ~Z - acceptable_items |= /obj/item/weapon/holder - acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown - - RefreshParts() - -/******************* -* Item Adding -********************/ - -/obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(src.broken > 0) - if(src.broken == 2 && O.is_screwdriver()) // If it's broken and they're using a screwdriver - user.visible_message( \ - "\The [user] starts to fix part of the microwave.", \ - "You start to fix part of the microwave." \ - ) - playsound(src, O.usesound, 50, 1) - if (do_after(user,20 * O.toolspeed)) - user.visible_message( \ - "\The [user] fixes part of the microwave.", \ - "You have fixed part of the microwave." \ - ) - src.broken = 1 // Fix it a bit - else if(src.broken == 1 && O.is_wrench()) // If it's broken and they're doing the wrench - user.visible_message( \ - "\The [user] starts to fix part of the microwave.", \ - "You start to fix part of the microwave." \ - ) - if (do_after(user,20 * O.toolspeed)) - user.visible_message( \ - "\The [user] fixes the microwave.", \ - "You have fixed the microwave." \ - ) - src.icon_state = "mw" - src.broken = 0 // Fix it! - src.dirty = 0 // just to be sure - src.flags = OPENCONTAINER | NOREACT - else - to_chat(user, "It's broken!") - return 1 - else if(default_deconstruction_screwdriver(user, O)) - return - else if(default_deconstruction_crowbar(user, O)) - return - else if(default_unfasten_wrench(user, O, 10)) - return - - else if(src.dirty==100) // The microwave is all dirty so can't be used! - if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them - user.visible_message( \ - "\The [user] starts to clean the microwave.", \ - "You start to clean the microwave." \ - ) - if (do_after(user,20)) - user.visible_message( \ - "\The [user] has cleaned the microwave.", \ - "You have cleaned the microwave." \ - ) - src.dirty = 0 // It's clean! - src.broken = 0 // just to be sure - src.icon_state = "mw" - src.flags = OPENCONTAINER | NOREACT - else //Otherwise bad luck!! - to_chat(user, "It's dirty!") - return 1 - else if(is_type_in_list(O,acceptable_items)) - if (contents.len>=(max_n_of_items + component_parts.len + 1)) //Adds component_parts to the maximum number of items. The 1 is from the circuit - to_chat(user, "This [src] is full of ingredients, you cannot put more.") - return 1 - if(istype(O, /obj/item/stack) && O:get_amount() > 1) // This is bad, but I can't think of how to change it - var/obj/item/stack/S = O - new O.type (src) - S.use(1) - user.visible_message( \ - "\The [user] has added one of [O] to \the [src].", \ - "You add one of [O] to \the [src].") - return - else - // user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete - user.drop_item() - O.loc = src - user.visible_message( \ - "\The [user] has added \the [O] to \the [src].", \ - "You add \the [O] to \the [src].") - return - else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \ - istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \ - istype(O,/obj/item/weapon/reagent_containers/food/condiment) \ - ) - if (!O.reagents) - return 1 - for (var/datum/reagent/R in O.reagents.reagent_list) - if (!(R.id in acceptable_reagents)) - to_chat(user, "Your [O] contains components unsuitable for cookery.") - return 1 - return - else if(istype(O,/obj/item/weapon/grab)) - var/obj/item/weapon/grab/G = O - to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].") - return 1 - else - to_chat(user, "You have no idea what you can cook with this [O].") - ..() - src.updateUsrDialog() - -/obj/machinery/microwave/attack_ai(mob/user as mob) - if(istype(user, /mob/living/silicon/robot) && Adjacent(user)) - attack_hand(user) - -/obj/machinery/microwave/attack_hand(mob/user as mob) - user.set_machine(src) - interact(user) - -/******************* -* Microwave Menu -********************/ - -/obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu - var/dat = "" - if(src.broken > 0) - dat = {"Bzzzzttttt"} - else if(src.operating) - dat = {"Microwaving in progress!