diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index d8c4c69e0a..aa334224ad 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -288,4 +288,18 @@ var/global/list/##LIST_NAME = list();\ #define IS_SCREWDRIVER "screwdriver" #define IS_CROWBAR "crowbar" #define IS_WIRECUTTER "wirecutter" -#define IS_WRENCH "wrench" \ No newline at end of file +#define IS_WRENCH "wrench" + +// RCD modes. Used on the RCD, and gets passed to an object's rcd_act() when an RCD is used on it, to determine what happens. +#define RCD_FLOORWALL "Floor / Wall" // Builds plating on space/ground/open tiles. Builds a wall when on floors. Finishes walls when used on girders. +#define RCD_AIRLOCK "Airlock" // Builds an airlock on the tile if one isn't already there. +#define RCD_WINDOWGRILLE "Window / Grille" // Builds a full tile window and grille pair on floors. +#define RCD_DECONSTRUCT "Deconstruction" // Removes various things. Still consumes compressed matter. + +#define RCD_VALUE_MODE "mode" +#define RCD_VALUE_DELAY "delay" +#define RCD_VALUE_COST "cost" + + +#define RCD_SHEETS_PER_MATTER_UNIT 4 // Each physical material sheet is worth four matter units. +#define RCD_MAX_CAPACITY 30 * RCD_SHEETS_PER_MATTER_UNIT \ No newline at end of file diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm index 8d2edbeeb9..bf38ab7a1c 100644 --- a/code/datums/progressbar.dm +++ b/code/datums/progressbar.dm @@ -15,6 +15,7 @@ bar = image('icons/effects/progessbar.dmi', target, "prog_bar_0") bar.appearance_flags = APPEARANCE_UI_IGNORE_ALPHA bar.pixel_y = 32 + bar.plane = PLANE_PLAYER_HUD src.user = user if(user) client = user.client diff --git a/code/datums/supplypacks/munitions_vr.dm b/code/datums/supplypacks/munitions_vr.dm index 1c3e3051e8..8a86c73ad5 100644 --- a/code/datums/supplypacks/munitions_vr.dm +++ b/code/datums/supplypacks/munitions_vr.dm @@ -1,7 +1,7 @@ /datum/supply_pack/munitions/expeditionguns name = "Frontier phaser (station-locked) crate" contains = list( - /obj/item/weapon/gun/energy/frontier/locked/basic = 2, + /obj/item/weapon/gun/energy/frontier/locked = 2, /obj/item/weapon/gun/energy/frontier/locked/holdout = 1, ) cost = 35 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 983c92cdf5..d1289a23de 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -209,6 +209,16 @@ /atom/proc/fire_act() return + +// Returns an assoc list of RCD information. +// Example would be: list(RCD_VALUE_MODE = RCD_DECONSTRUCT, RCD_VALUE_DELAY = 50, RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 4) +// This occurs before rcd_act() is called, and it won't be called if it returns FALSE. +/atom/proc/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + return FALSE + +/atom/proc/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + return + /atom/proc/melt() return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 327b1e11cd..541e461f27 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1260,3 +1260,24 @@ About the new airlock wires panel: src.open() src.lock() return + + +/obj/machinery/door/airlock/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + switch(passed_mode) + if(RCD_DECONSTRUCT) + // Old RCD code made it cost 10 units to decon an airlock. + // Now the new one costs ten "sheets". + return list( + RCD_VALUE_MODE = RCD_DECONSTRUCT, + RCD_VALUE_DELAY = 5 SECONDS, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 10 + ) + return FALSE + +/obj/machinery/door/airlock/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + switch(passed_mode) + if(RCD_DECONSTRUCT) + to_chat(user, span("notice", "You deconstruct \the [src].")) + qdel(src) + return TRUE + return FALSE diff --git a/code/game/machinery/suit_storage_unit_vr.dm b/code/game/machinery/suit_storage_unit_vr.dm index 53acbb3aec..f1b01d9a3c 100644 --- a/code/game/machinery/suit_storage_unit_vr.dm +++ b/code/game/machinery/suit_storage_unit_vr.dm @@ -18,47 +18,12 @@ SPECIES_ZORREN_HIGH ) -/obj/machinery/suit_cycler/explorer - name = "Explorer suit cycler" - model_text = "Exploration" +// Old Exploration is too WIP to use right now +/obj/machinery/suit_cycler/exploration + req_access = list(access_explorer) + departments = list("Exploration") + +// Pilot Blue is still missing a few sprites on polaris end +/obj/machinery/suit_cycler/pilot req_access = list(access_pilot) - departments = list("Exploration","Pilot") - -/obj/machinery/suit_cycler/explorer/initialize() - species -= SPECIES_TESHARI - return ..() - -/obj/machinery/suit_cycler/apply_paintjob() - if(!target_species || !target_department) - return - - if(target_species) - if(helmet) helmet.refit_for_species(target_species) - if(suit) suit.refit_for_species(target_species) - - switch(target_department) - if("Exploration") - if(helmet) - helmet.name = "exploration voidsuit helmet" - helmet.icon_state = "helm_explorer" - helmet.item_state = "helm_explorer" - if(suit) - suit.name = "exploration voidsuit" - suit.icon_state = "void_explorer" - suit.item_state = "void_explorer" - suit.item_state_slots[slot_r_hand_str] = "wiz_voidsuit" - suit.item_state_slots[slot_l_hand_str] = "wiz_voidsuit" - if("Pilot") - if(helmet) - helmet.name = "pilot voidsuit helmet" - helmet.icon_state = "rig0_pilot" - helmet.item_state = "pilot_helm" - if(suit) - suit.name = "pilot voidsuit" - suit.icon_state = "rig-pilot" - suit.item_state = "rig-pilot" - suit.item_state_slots[slot_r_hand_str] = "sec_voidsuitTG" - suit.item_state_slots[slot_l_hand_str] = "sec_voidsuitTG" - else - return ..() - + departments = list("Pilot") diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index dd4472282c..73bddbb433 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -244,100 +244,43 @@ equip_cooldown = 10 energy_drain = 250 range = MELEE|RANGED - var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock. - var/disabled = 0 //malf - equip_type = EQUIP_SPECIAL + var/obj/item/weapon/rcd/electric/mounted/mecha/my_rcd = null + +/obj/item/mecha_parts/mecha_equipment/tool/rcd/initialize() + my_rcd = new(src) + return ..() + +/obj/item/mecha_parts/mecha_equipment/tool/rcd/Destroy() + QDEL_NULL(my_rcd) + return ..() /obj/item/mecha_parts/mecha_equipment/tool/rcd/action(atom/target) - if(istype(target,/area/shuttle)||istype(target, /turf/space/transit))//>implying these are ever made -Sieve - disabled = 1 - else - disabled = 0 - if(!istype(target, /turf) && !istype(target, /obj/machinery/door/airlock)) - target = get_turf(target) - if(!action_checks(target) || disabled || get_dist(chassis, target)>3) return - playsound(chassis, 'sound/machines/click.ogg', 50, 1) - //meh - switch(mode) - if(0) - if (istype(target, /turf/simulated/wall)) - occupant_message("Deconstructing [target]...") - set_ready_state(0) - if(do_after_cooldown(target)) - if(disabled) return - chassis.spark_system.start() - target:ChangeTurf(/turf/simulated/floor/plating) - playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) - chassis.use_power(energy_drain) - else if (istype(target, /turf/simulated/floor)) - occupant_message("Deconstructing [target]...") - set_ready_state(0) - if(do_after_cooldown(target)) - if(disabled) return - chassis.spark_system.start() - target:ChangeTurf(get_base_turf_by_area(target)) - playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) - chassis.use_power(energy_drain) - else if (istype(target, /obj/machinery/door/airlock)) - occupant_message("Deconstructing [target]...") - set_ready_state(0) - if(do_after_cooldown(target)) - if(disabled) return - chassis.spark_system.start() - qdel(target) - playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) - chassis.use_power(energy_drain) - if(1) - if(istype(target, /turf/space) || istype(target,get_base_turf_by_area(target))) - occupant_message("Building Floor...") - set_ready_state(0) - if(do_after_cooldown(target)) - if(disabled) return - target:ChangeTurf(/turf/simulated/floor/plating) - playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) - chassis.spark_system.start() - chassis.use_power(energy_drain*2) - else if(istype(target, /turf/simulated/floor)) - occupant_message("Building Wall...") - set_ready_state(0) - if(do_after_cooldown(target)) - if(disabled) return - target:ChangeTurf(/turf/simulated/wall) - playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) - chassis.spark_system.start() - chassis.use_power(energy_drain*2) - if(2) - if(istype(target, /turf/simulated/floor)) - occupant_message("Building Airlock...") - set_ready_state(0) - if(do_after_cooldown(target)) - if(disabled) return - chassis.spark_system.start() - var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock(target) - T.autoclose = 1 - playsound(target, 'sound/items/Deconstruct.ogg', 50, 1) - playsound(target, 'sound/effects/sparks2.ogg', 50, 1) - chassis.use_power(energy_drain*2) - return + if(!action_checks(target) || get_dist(chassis, target) > 3) + return FALSE + + my_rcd.use_rcd(target, chassis.occupant) /obj/item/mecha_parts/mecha_equipment/tool/rcd/Topic(href,href_list) ..() if(href_list["mode"]) - mode = text2num(href_list["mode"]) - switch(mode) - if(0) - occupant_message("Switched RCD to Deconstruct.") - if(1) - occupant_message("Switched RCD to Construct.") - if(2) - occupant_message("Switched RCD to Construct Airlock.") - return - + my_rcd.mode_index = text2num(href_list["mode"]) + occupant_message("RCD reconfigured to '[my_rcd.modes[my_rcd.mode_index]]'.") +/* /obj/item/mecha_parts/mecha_equipment/tool/rcd/get_equip_info() return "[..()] \[D|C|A\]" +*/ +/obj/item/mecha_parts/mecha_equipment/tool/rcd/get_equip_info() + var/list/content = list(..()) // This is all for one line, in the interest of string tree conservation. + var/i = 1 + content += "
" + for(var/mode in my_rcd.modes) + content += " [mode]" + if(i < my_rcd.modes.len) + content += "
" + i++ - + return content.Join() /obj/item/mecha_parts/mecha_equipment/teleporter diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 6061cbf7d5..231693305f 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -769,6 +769,7 @@ var/global/list/default_medbay_channels = list( icon_state = "red_phone" listening = 1 name = "phone" + anchored = FALSE /obj/item/device/radio/phone/medbay frequency = MED_I_FREQ diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index d9543fed20..a0587d5dbb 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -1,167 +1,291 @@ -//Contains the rapid construction device. +// Contains the rapid construction device. /obj/item/weapon/rcd name = "rapid construction device" - desc = "A device used to rapidly build walls and floors." - icon = 'icons/obj/items.dmi' + desc = "A device used to rapidly build and deconstruct. Reload with compressed matter cartridges." + icon = 'icons/obj/tools.dmi' icon_state = "rcd" - opacity = 0 - density = 0 - anchored = 0.0 - flags = CONDUCT - force = 10.0 - throwforce = 10.0 + item_state = "rcd" + flags = CONDUCT | NOBLUDGEON + force = 10 + throwforce = 10 throw_speed = 1 throw_range = 5 w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 2) matter = list(DEFAULT_WALL_MATERIAL = 50000) - preserve_item = 1 + preserve_item = TRUE // RCDs are pretty important. var/datum/effect/effect/system/spark_spread/spark_system var/stored_matter = 0 - var/max_stored_matter = 30 - var/working = 0 - var/mode = 1 - var/list/modes = list("Floor & Walls","Airlock","Deconstruct") - var/canRwall = 0 - var/disabled = 0 + var/max_stored_matter = RCD_MAX_CAPACITY + var/ranged = FALSE + var/busy = FALSE + var/allow_concurrent_building = FALSE // If true, allows for multiple RCD builds at the same time. + var/mode_index = 1 + var/list/modes = list(RCD_FLOORWALL, RCD_AIRLOCK, RCD_WINDOWGRILLE, RCD_DECONSTRUCT) + var/can_remove_rwalls = FALSE + var/airlock_type = /obj/machinery/door/airlock + var/window_type = /obj/structure/window/reinforced/full + var/material_to_use = DEFAULT_WALL_MATERIAL // So badmins can make RCDs that print diamond walls. + var/make_rwalls = FALSE // If true, when building walls, they will be reinforced. -/obj/item/weapon/rcd/attack() - return 0 - -/obj/item/weapon/rcd/proc/can_use(var/mob/user,var/turf/T) - var/usable = 0 - if(user.Adjacent(T) && user.get_active_hand() == src && !user.stat && !user.restrained()) - usable = 1 - if(!user.IsAdvancedToolUser() && istype(user, /mob/living/simple_animal)) - var/mob/living/simple_animal/S = user - if(!S.IsHumanoidToolUser(src)) - usable = 0 - return usable - -/obj/item/weapon/rcd/examine() - ..() - if(src.type == /obj/item/weapon/rcd && loc == usr) - usr << "It currently holds [stored_matter]/[max_stored_matter] matter-units." - -/obj/item/weapon/rcd/New() - ..() +/obj/item/weapon/rcd/initialize() src.spark_system = new /datum/effect/effect/system/spark_spread spark_system.set_up(5, 0, src) spark_system.attach(src) + return ..() /obj/item/weapon/rcd/Destroy() - qdel(spark_system) + QDEL_NULL(spark_system) spark_system = null return ..() -/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user) +/obj/item/weapon/rcd/examine(mob/user) + ..() + to_chat(user, display_resources()) +// Used to show how much stuff (matter units, cell charge, etc) is left inside. +/obj/item/weapon/rcd/proc/display_resources() + return "It currently holds [stored_matter]/[max_stored_matter] matter-units." + +// Used to add new cartridges. +/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user) if(istype(W, /obj/item/weapon/rcd_ammo)) var/obj/item/weapon/rcd_ammo/cartridge = W if((stored_matter + cartridge.remaining) > max_stored_matter) - to_chat(user, "The RCD can't hold that many additional matter-units.") - return + to_chat(user, span("warning", "The RCD can't hold that many additional matter-units.")) + return FALSE stored_matter += cartridge.remaining user.drop_from_inventory(W) qdel(W) playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - to_chat(user, "The RCD now holds [stored_matter]/[max_stored_matter] matter-units.") - return - ..() + to_chat(user, span("notice", "The RCD now holds [stored_matter]/[max_stored_matter] matter-units.")) + return TRUE + return ..() -/obj/item/weapon/rcd/attack_self(mob/user) - //Change the mode - if(++mode > 3) mode = 1 - user << "Changed mode to '[modes[mode]]'" - playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) - if(prob(20)) src.spark_system.start() - -/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity) - if(!proximity) return - if(disabled && !isrobot(user)) - return 0 - if(istype(get_area(A),/area/shuttle)||istype(get_area(A),/turf/space/transit)) - return 0 - return alter_turf(A,user,(mode == 3)) - -/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user) - if(stored_matter < amount) - return 0 - stored_matter -= amount - return 1 - -/obj/item/weapon/rcd/proc/alter_turf(var/turf/T,var/mob/user,var/deconstruct) - - var/build_cost = 0 - var/build_type - var/build_turf - var/build_delay - var/build_other - - if(working == 1) - return 0 - - if(mode == 3 && istype(T,/obj/machinery/door/airlock)) - build_cost = 10 - build_delay = 50 - build_type = "airlock" - else if(mode == 2 && !deconstruct && istype(T,/turf/simulated/floor)) - build_cost = 10 - build_delay = 50 - build_type = "airlock" - build_other = /obj/machinery/door/airlock - else if(!deconstruct && isturf(T) && (istype(T,/turf/space) || istype(T,get_base_turf_by_area(T)))) - build_cost = 1 - build_type = "floor" - build_turf = /turf/simulated/floor/airless - else if(!deconstruct && istype(T,/turf/simulated/mineral/floor)) - build_cost = 1 - build_type = "floor" - build_turf = /turf/simulated/floor/plating - else if(deconstruct && istype(T,/turf/simulated/wall)) - var/turf/simulated/wall/W = T - build_delay = deconstruct ? 50 : 40 - build_cost = 5 - build_type = (!canRwall && W.reinf_material) ? null : "wall" - build_turf = /turf/simulated/floor - else if(istype(T,/turf/simulated/floor) || (istype(T,/turf/simulated/mineral) && !T.density)) - var/turf/simulated/F = T - build_delay = deconstruct ? 50 : 20 - build_cost = deconstruct ? 10 : 3 - build_type = deconstruct ? "floor" : "wall" - build_turf = deconstruct ? get_base_turf_by_area(F) : /turf/simulated/wall - - if(!build_type) - working = 0 - return 0 - - if(!useResource(build_cost, user)) - user << "Insufficient resources." - return 0 - - playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - - working = 1 - user << "[(deconstruct ? "Deconstructing" : "Building")] [build_type]..." - - if(build_delay && !do_after(user, build_delay)) - working = 0 - return 0 - - working = 0 - if(build_delay && !can_use(user,T)) - return 0 - - if(build_turf) - T.ChangeTurf(build_turf, preserve_outdoors = TRUE) - else if(build_other) - new build_other(T) +// Changes which mode it is on. +/obj/item/weapon/rcd/attack_self(mob/living/user) + if(mode_index >= modes.len) // Shouldn't overflow unless someone messes with it in VV poorly but better safe than sorry. + mode_index = 1 else - qdel(T) + mode_index++ - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - return 1 + to_chat(user, span("notice", "Changed mode to '[modes[mode_index]]'.")) + playsound(src.loc, 'sound/effects/pop.ogg', 50, 0) + if(prob(20)) + src.spark_system.start() + +// Removes resources if the RCD can afford it. +/obj/item/weapon/rcd/proc/consume_resources(amount) + if(!can_afford(amount)) + return FALSE + stored_matter -= amount + return TRUE + +// Useful for testing before actually paying (e.g. before a do_after() ). +/obj/item/weapon/rcd/proc/can_afford(amount) + return stored_matter >= amount + +/obj/item/weapon/rcd/afterattack(atom/A, mob/living/user, proximity) + if(!ranged && !proximity) + return FALSE + use_rcd(A, user) + +// Used to call rcd_act() on the atom hit. +/obj/item/weapon/rcd/proc/use_rcd(atom/A, mob/living/user) + if(busy && !allow_concurrent_building) + to_chat(user, span("warning", "\The [src] is busy finishing its current operation, be patient.")) + return FALSE + + var/list/rcd_results = A.rcd_values(user, src, modes[mode_index]) + if(!rcd_results) + to_chat(user, span("warning", "\The [src] blinks a red light as you point it towards \the [A], indicating \ + that it won't work. Try changing the mode, or use it on something else.")) + return FALSE + if(!can_afford(rcd_results[RCD_VALUE_COST])) + to_chat(user, span("warning", "\The [src] lacks the required material to start.")) + return FALSE + + playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1) + + var/true_delay = rcd_results[RCD_VALUE_DELAY] * toolspeed + + var/datum/beam/rcd_beam = null + if(ranged) + var/atom/movable/beam_origin = user // This is needed because mecha pilots are inside an object and the beam won't be made if it tries to attach to them.. + if(!isturf(beam_origin.loc)) + beam_origin = user.loc + rcd_beam = beam_origin.Beam(A, icon_state = "rped_upgrade", time = max(true_delay, 5)) + busy = TRUE + + if(do_after(user, true_delay, target = A)) + busy = FALSE + // Doing another check in case we lost matter during the delay for whatever reason. + if(!can_afford(rcd_results[RCD_VALUE_COST])) + to_chat(user, span("warning", "\The [src] lacks the required material to finish the operation.")) + return FALSE + if(A.rcd_act(user, src, rcd_results[RCD_VALUE_MODE])) + consume_resources(rcd_results[RCD_VALUE_COST]) + playsound(get_turf(A), 'sound/items/deconstruct.ogg', 50, 1) + return TRUE + + // If they moved, kill the beam immediately. + qdel(rcd_beam) + busy = FALSE + return FALSE + +// RCD variants. + +// This one starts full. +/obj/item/weapon/rcd/loaded/initialize() + stored_matter = max_stored_matter + return ..() + +// This one makes cooler walls by using an alternative material. +/obj/item/weapon/rcd/shipwright + name = "shipwright's rapid construction device" + desc = "A device used to rapidly build and deconstruct. This version creates a stronger variant of wall, often \ + used in the construction of hulls for starships. Reload with compressed matter cartridges." + material_to_use = MAT_STEELHULL + +/obj/item/weapon/rcd/shipwright/loaded/initialize() + stored_matter = max_stored_matter + return ..() + + +/obj/item/weapon/rcd/advanced + name = "advanced rapid construction device" + desc = "A device used to rapidly build and deconstruct. This version works at a range, builds faster, and has a much larger capacity. \ + Reload with compressed matter cartridges." + icon_state = "adv_rcd" + ranged = TRUE + toolspeed = 0.5 // Twice as fast. + max_stored_matter = RCD_MAX_CAPACITY * 3 // Three times capacity. + +/obj/item/weapon/rcd/advanced/loaded/initialize() + stored_matter = max_stored_matter + return ..() + + +// Electric RCDs. +// Currently just a base for the mounted RCDs. +// Currently there isn't a way to swap out the cells. +// One could be added if there is demand to do so. +/obj/item/weapon/rcd/electric + name = "electric rapid construction device" + desc = "A device used to rapidly build and deconstruct. It runs directly off of electricity, no matter cartridges needed." + icon_state = "electric_rcd" + var/obj/item/weapon/cell/cell = null + var/make_cell = TRUE // If false, initialize() won't spawn a cell for this. + var/electric_cost_coefficent = 83.33 // Higher numbers make it less efficent. 86.3... means it should matche the standard RCD capacity on a 10k cell. + +/obj/item/weapon/rcd/electric/initialize() + if(make_cell) + cell = new /obj/item/weapon/cell/high(src) + return ..() + +/obj/item/weapon/rcd/electric/Destroy() + if(cell) + QDEL_NULL(cell) + return ..() + +/obj/item/weapon/rcd/electric/get_cell() + return cell + +/obj/item/weapon/rcd/electric/can_afford(amount) // This makes it so borgs won't drain their last sliver of charge by mistake, as a bonus. + var/obj/item/weapon/cell/cell = get_cell() + if(cell) + return cell.check_charge(amount * electric_cost_coefficent) + return FALSE + +/obj/item/weapon/rcd/electric/consume_resources(amount) + if(!can_afford(amount)) + return FALSE + var/obj/item/weapon/cell/cell = get_cell() + return cell.checked_use(amount * electric_cost_coefficent) + +/obj/item/weapon/rcd/electric/display_resources() + var/obj/item/weapon/cell/cell = get_cell() + if(cell) + return "The power source connected to \the [src] has a charge of [cell.percent()]%." + return "It lacks a source of power, and cannot function." + + + +// 'Mounted' RCDs, used for borgs/RIGs/Mechas, all of which use their cells to drive the RCD. +/obj/item/weapon/rcd/electric/mounted + name = "mounted electric rapid construction device" + desc = "A device used to rapidly build and deconstruct. It runs directly off of electricity from an external power source." + make_cell = FALSE + +/obj/item/weapon/rcd/electric/mounted/get_cell() + return get_external_power_supply() + +/obj/item/weapon/rcd/electric/mounted/proc/get_external_power_supply() + if(isrobot(loc)) // In a borg. + var/mob/living/silicon/robot/R = loc + return R.cell + if(istype(loc, /obj/item/rig_module)) // In a RIG. + var/obj/item/rig_module/module = loc + if(module.holder) // Is it attached to a RIG? + return module.holder.cell + if(istype(loc, /obj/item/mecha_parts/mecha_equipment)) // In a mech. + var/obj/item/mecha_parts/mecha_equipment/ME = loc + if(ME.chassis) // Is the part attached to a mech? + return ME.chassis.cell + return null + + +// RCDs for borgs. +/obj/item/weapon/rcd/electric/mounted/borg + can_remove_rwalls = TRUE + desc = "A device used to rapidly build and deconstruct. It runs directly off of electricity, drawing directly from your cell." + electric_cost_coefficent = 41.66 // Twice as efficent, out of pity. + toolspeed = 0.5 // Twice as fast, since borg versions typically have this. + +/obj/item/weapon/rcd/electric/mounted/borg/lesser + can_remove_rwalls = FALSE + + +// RCDs for RIGs. +/obj/item/weapon/rcd/electric/mounted/rig + + +// RCDs for Mechs. +/obj/item/weapon/rcd/electric/mounted/mecha + ranged = TRUE + toolspeed = 0.5 + + +// Infinite use RCD for debugging/adminbuse. +/obj/item/weapon/rcd/debug + name = "self-repleshing rapid construction device" + desc = "An RCD that appears to be plated with gold. For some reason it also seems to just \ + be vastly superior to all other RCDs ever created, possibly due to it being colored gold." + icon_state = "debug_rcd" + ranged = TRUE + can_remove_rwalls = TRUE + allow_concurrent_building = TRUE + toolspeed = 0.25 // Four times as fast. + +/obj/item/weapon/rcd/debug/can_afford(amount) + return TRUE + +/obj/item/weapon/rcd/debug/consume_resources(amount) + return TRUE + +/obj/item/weapon/rcd/debug/attackby(obj/item/weapon/W, mob/user) + if(istype(W, /obj/item/weapon/rcd_ammo)) + to_chat(user, span("notice", "\The [src] makes its own material, no need to add more.")) + return FALSE + return ..() + +/obj/item/weapon/rcd/debug/display_resources() + return "It has UNLIMITED POWER!" + + + +// Ammo for the (non-electric) RCDs. /obj/item/weapon/rcd_ammo name = "compressed matter cartridge" desc = "Highly compressed matter for the RCD." @@ -171,50 +295,11 @@ w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 2) matter = list(DEFAULT_WALL_MATERIAL = 30000,"glass" = 15000) - var/remaining = 10 + var/remaining = RCD_MAX_CAPACITY / 3 /obj/item/weapon/rcd_ammo/large name = "high-capacity matter cartridge" desc = "Do not ingest." matter = list(DEFAULT_WALL_MATERIAL = 45000,"glass" = 22500) - remaining = 30 origin_tech = list(TECH_MATERIAL = 4) - -/obj/item/weapon/rcd/borg - canRwall = 1 - -/obj/item/weapon/rcd/borg/lesser - canRwall = FALSE - -/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user) - if(isrobot(user)) - var/mob/living/silicon/robot/R = user - if(R.cell) - var/cost = amount*30 - if(R.cell.charge >= cost) - R.cell.use(cost) - return 1 - return 0 - -/obj/item/weapon/rcd/borg/attackby() - return - -/obj/item/weapon/rcd/borg/can_use(var/mob/user,var/turf/T) - return (user.Adjacent(T) && !user.stat) - - -/obj/item/weapon/rcd/mounted/useResource(var/amount, var/mob/user) - var/cost = amount*130 //so that a rig with default powercell can build ~2.5x the stuff a fully-loaded RCD can. - if(istype(loc,/obj/item/rig_module)) - var/obj/item/rig_module/module = loc - if(module.holder && module.holder.cell) - if(module.holder.cell.charge >= cost) - module.holder.cell.use(cost) - return 1 - return 0 - -/obj/item/weapon/rcd/mounted/attackby() - return - -/obj/item/weapon/rcd/mounted/can_use(var/mob/user,var/turf/T) - return (user.Adjacent(T) && !user.stat && !user.restrained()) + remaining = RCD_MAX_CAPACITY diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index e3afddba4c..ce2f0dabfc 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -140,7 +140,7 @@ icon_state = "tape" w_class = ITEMSIZE_TINY plane = MOB_PLANE - anchored = 1 //it's sticky, no you cant move it + anchored = FALSE var/obj/item/weapon/stuck = null @@ -180,6 +180,10 @@ qdel(I) to_chat(user, "You place \the [I] back into \the [src].") +/obj/item/weapon/ducttape/attack_hand(mob/living/L) + anchored = FALSE + return ..() // Pick it up now that it's unanchored. + /obj/item/weapon/ducttape/afterattack(var/A, mob/user, flag, params) if(!in_range(user, A) || istype(A, /obj/machinery/door) || !stuck) @@ -198,6 +202,7 @@ user.drop_from_inventory(src) playsound(src, 'sound/effects/tape.ogg',25) forceMove(source_turf) + anchored = TRUE if(params) var/list/mouse_control = params2list(params) diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index b61d01d2a4..058398d850 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -353,3 +353,54 @@ to_chat(user, "You drill through the girder!") new /obj/effect/decal/remains/human(get_turf(src)) dismantle() + + +/obj/structure/girder/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + var/turf/simulated/T = get_turf(src) + if(!istype(T) || T.density) + return FALSE + + switch(passed_mode) + if(RCD_FLOORWALL) + // Finishing a wall costs two sheets. + var/cost = RCD_SHEETS_PER_MATTER_UNIT * 2 + // Rwalls cost three to finish. + if(the_rcd.make_rwalls) + cost += RCD_SHEETS_PER_MATTER_UNIT * 1 + return list( + RCD_VALUE_MODE = RCD_FLOORWALL, + RCD_VALUE_DELAY = 2 SECONDS, + RCD_VALUE_COST = cost + ) + if(RCD_DECONSTRUCT) + return list( + RCD_VALUE_MODE = RCD_DECONSTRUCT, + RCD_VALUE_DELAY = 2 SECONDS, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 5 + ) + return FALSE + +/obj/structure/girder/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + var/turf/simulated/T = get_turf(src) + if(!istype(T) || T.density) // Should stop future bugs of people bringing girders to centcom and RCDing them, or somehow putting a girder on a durasteel wall and deconning it. + return FALSE + + switch(passed_mode) + if(RCD_FLOORWALL) + to_chat(user, span("notice", "You finish a wall.")) + // This is mostly the same as using on a floor. The girder's material is preserved, however. + T.ChangeTurf(/turf/simulated/wall) + var/turf/simulated/wall/new_T = get_turf(src) // Ref to the wall we just built. + // Apparently set_material(...) for walls requires refs to the material singletons and not strings. + // This is different from how other material objects with their own set_material(...) do it, but whatever. + var/material/M = name_to_material[the_rcd.material_to_use] + new_T.set_material(M, the_rcd.make_rwalls ? M : null, girder_material) + new_T.add_hiddenprint(user) + qdel(src) + return TRUE + + if(RCD_DECONSTRUCT) + to_chat(user, span("notice", "You deconstruct \the [src].")) + qdel(src) + return TRUE + diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index f8d532688c..50fa3e8c6e 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -96,7 +96,9 @@ /obj/structure/grille/attackby(obj/item/W as obj, mob/user as mob) if(!istype(W)) return - if(W.is_wirecutter()) + if(istype(W, /obj/item/weapon/rcd)) // To stop us from hitting the grille when building windows, because grilles don't let parent handle it properly. + return FALSE + else if(W.is_wirecutter()) if(!shock(user, 100)) playsound(src, W.usesound, 100, 1) new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2) @@ -252,3 +254,38 @@ /obj/structure/grille/broken/rustic icon_state = "grillerustic-b" + + +/obj/structure/grille/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + switch(passed_mode) + if(RCD_WINDOWGRILLE) + // A full tile window costs 4 glass sheets. + return list( + RCD_VALUE_MODE = RCD_WINDOWGRILLE, + RCD_VALUE_DELAY = 2 SECONDS, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 4 + ) + + if(RCD_DECONSTRUCT) + return list( + RCD_VALUE_MODE = RCD_DECONSTRUCT, + RCD_VALUE_DELAY = 2 SECONDS, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 2 + ) + return FALSE + +/obj/structure/grille/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + switch(passed_mode) + if(RCD_DECONSTRUCT) + to_chat(user, span("notice", "You deconstruct \the [src].")) + qdel(src) + return TRUE + if(RCD_WINDOWGRILLE) + if(locate(/obj/structure/window) in loc) + return FALSE + to_chat(user, span("notice", "You construct a window.")) + var/obj/structure/window/WD = new the_rcd.window_type(loc) + WD.anchored = TRUE + return TRUE + return FALSE + diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 5ada656156..5c7adf8f0e 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -647,3 +647,20 @@ MT.update_icon() return TRUE . = ..() + +/obj/structure/window/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + switch(passed_mode) + if(RCD_DECONSTRUCT) + return list( + RCD_VALUE_MODE = RCD_DECONSTRUCT, + RCD_VALUE_DELAY = 5 SECONDS, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 5 + ) + +/obj/structure/window/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + switch(passed_mode) + if(RCD_DECONSTRUCT) + to_chat(user, span("notice", "You deconstruct \the [src].")) + qdel(src) + return TRUE + return FALSE diff --git a/code/game/sound.dm b/code/game/sound.dm index 99a6a5efe8..d1569259a0 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -135,9 +135,9 @@ if ("thunder") soundin = pick('sound/effects/thunder/thunder1.ogg', 'sound/effects/thunder/thunder2.ogg', 'sound/effects/thunder/thunder3.ogg', 'sound/effects/thunder/thunder4.ogg', 'sound/effects/thunder/thunder5.ogg', 'sound/effects/thunder/thunder6.ogg', 'sound/effects/thunder/thunder7.ogg', 'sound/effects/thunder/thunder8.ogg', 'sound/effects/thunder/thunder9.ogg', 'sound/effects/thunder/thunder10.ogg') + if ("casing_sound") soundin = pick('sound/weapons/casingfall1.ogg','sound/weapons/casingfall2.ogg','sound/weapons/casingfall3.ogg') return soundin //Are these even used? -var/list/casing_sound = list ('sound/weapons/casingfall1.ogg','sound/weapons/casingfall2.ogg','sound/weapons/casingfall3.ogg') var/list/keyboard_sound = list ('sound/effects/keyboard/keyboard1.ogg','sound/effects/keyboard/keyboard2.ogg','sound/effects/keyboard/keyboard3.ogg', 'sound/effects/keyboard/keyboard4.ogg') var/list/bodyfall_sound = list('sound/effects/bodyfall1.ogg','sound/effects/bodyfall2.ogg','sound/effects/bodyfall3.ogg','sound/effects/bodyfall4.ogg') diff --git a/code/game/turfs/flooring/flooring_premade.dm b/code/game/turfs/flooring/flooring_premade.dm index c9f1e55209..409d5209a4 100644 --- a/code/game/turfs/flooring/flooring_premade.dm +++ b/code/game/turfs/flooring/flooring_premade.dm @@ -298,7 +298,7 @@ initial_flooring = /decl/flooring/tiling/asteroidfloor /turf/simulated/floor/tiled/asteroid_steel/airless - name = "airless plating" + name = "plating" oxygen = 0 nitrogen = 0 @@ -332,25 +332,25 @@ temperature = TCMB /turf/simulated/floor/airless - name = "airless plating" + name = "plating" oxygen = 0 nitrogen = 0 temperature = TCMB /turf/simulated/floor/tiled/airless - name = "airless floor" + name = "floor" oxygen = 0 nitrogen = 0 temperature = TCMB /turf/simulated/floor/bluegrid/airless - name = "airless floor" + name = "floor" oxygen = 0 nitrogen = 0 temperature = TCMB /turf/simulated/floor/greengrid/airless - name = "airless floor" + name = "floor" oxygen = 0 nitrogen = 0 temperature = TCMB @@ -359,7 +359,7 @@ oxygen = 0 /turf/simulated/floor/tiled/white/airless - name = "airless floor" + name = "floor" oxygen = 0 nitrogen = 0 temperature = TCMB diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 9f3a8e67b0..b615c0cc42 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -91,3 +91,71 @@ /turf/simulated/floor/levelupdate() for(var/obj/O in src) O.hide(O.hides_under_flooring() && src.flooring) + +/turf/simulated/floor/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + switch(passed_mode) + if(RCD_FLOORWALL) + // A wall costs four sheets to build (two for the grider and two for finishing it). + var/cost = RCD_SHEETS_PER_MATTER_UNIT * 4 + // R-walls cost five sheets, however. + if(the_rcd.make_rwalls) + cost += RCD_SHEETS_PER_MATTER_UNIT * 1 + return list( + RCD_VALUE_MODE = RCD_FLOORWALL, + RCD_VALUE_DELAY = 2 SECONDS, + RCD_VALUE_COST = cost + ) + if(RCD_AIRLOCK) + // Airlock assemblies cost four sheets. Let's just add another for the electronics/wires/etc. + return list( + RCD_VALUE_MODE = RCD_AIRLOCK, + RCD_VALUE_DELAY = 5 SECONDS, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 5 + ) + if(RCD_WINDOWGRILLE) + // One steel sheet for the girder (two rods, which is one sheet). + return list( + RCD_VALUE_MODE = RCD_WINDOWGRILLE, + RCD_VALUE_DELAY = 1 SECOND, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 1 + ) + if(RCD_DECONSTRUCT) + // Old RCDs made deconning the floor cost 10 units (IE, three times on full RCD). + // Now it's ten sheets worth of units (which is the same capacity-wise, three times on full RCD). + return list( + RCD_VALUE_MODE = RCD_DECONSTRUCT, + RCD_VALUE_DELAY = 5 SECONDS, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 10 + ) + return FALSE + + +/turf/simulated/floor/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + switch(passed_mode) + if(RCD_FLOORWALL) + to_chat(user, span("notice", "You build a wall.")) + ChangeTurf(/turf/simulated/wall) + var/turf/simulated/wall/T = get_turf(src) // Ref to the wall we just built. + // Apparently set_material(...) for walls requires refs to the material singletons and not strings. + // This is different from how other material objects with their own set_material(...) do it, but whatever. + var/material/M = name_to_material[the_rcd.material_to_use] + T.set_material(M, the_rcd.make_rwalls ? M : null, M) + T.add_hiddenprint(user) + return TRUE + if(RCD_AIRLOCK) + if(locate(/obj/machinery/door/airlock) in src) + return FALSE // No more airlock stacking. + to_chat(user, span("notice", "You build an airlock.")) + new the_rcd.airlock_type(src) + return TRUE + if(RCD_WINDOWGRILLE) + if(locate(/obj/structure/grille) in src) + return FALSE + to_chat(user, span("notice", "You construct the grille.")) + var/obj/structure/grille/G = new(src) + G.anchored = TRUE + return TRUE + if(RCD_DECONSTRUCT) + to_chat(user, span("notice", "You deconstruct \the [src].")) + ChangeTurf(get_base_turf_by_area(src), preserve_outdoors = TRUE) + return TRUE diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm index fc373c0577..968816dc6a 100644 --- a/code/game/turfs/simulated/outdoors/outdoors.dm +++ b/code/game/turfs/simulated/outdoors/outdoors.dm @@ -15,6 +15,7 @@ var/list/turf_edge_cache = list() edge_blending_priority = 1 outdoors = TRUE // This variable is used for weather effects. can_dirty = FALSE // Looks hideous with dirt on it. + can_build_into_floor = TRUE // When a turf gets demoted or promoted, this list gets adjusted. The top-most layer is the layer on the bottom of the list, due to how pop() works. var/list/turf_layers = list(/turf/simulated/floor/outdoors/rocks) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index b64ba73ee3..136b8eeba6 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -287,3 +287,27 @@ W.burn((temperature/4)) for(var/obj/machinery/door/airlock/phoron/D in range(3,src)) D.ignite(temperature/4) + +/turf/simulated/wall/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + if(material.integrity > 1000) // Don't decon things like elevatorium. + return FALSE + if(reinf_material && !the_rcd.can_remove_rwalls) // Gotta do it the old fashioned way if your RCD can't. + return FALSE + + if(passed_mode == RCD_DECONSTRUCT) + var/delay_to_use = material.integrity / 3 // Steel has 150 integrity, so it'll take five seconds to down a regular wall. + if(reinf_material) + delay_to_use += reinf_material.integrity / 3 + return list( + RCD_VALUE_MODE = RCD_DECONSTRUCT, + RCD_VALUE_DELAY = delay_to_use, + RCD_VALUE_COST = RCD_SHEETS_PER_MATTER_UNIT * 5 + ) + return FALSE + +/turf/simulated/wall/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + if(passed_mode == RCD_DECONSTRUCT) + to_chat(user, span("notice", "You deconstruct \the [src].")) + ChangeTurf(/turf/simulated/floor/airless, preserve_outdoors = TRUE) + return TRUE + return FALSE diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index ed48013050..d9a41718a8 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -6,6 +6,7 @@ temperature = T20C thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT + can_build_into_floor = TRUE var/keep_sprite = FALSE // heat_capacity = 700000 No. diff --git a/code/game/turfs/space/transit.dm b/code/game/turfs/space/transit.dm index 79550c3f30..0bfcb4e0f6 100644 --- a/code/game/turfs/space/transit.dm +++ b/code/game/turfs/space/transit.dm @@ -1,5 +1,6 @@ /turf/space/transit keep_sprite = TRUE + can_build_into_floor = FALSE var/pushdirection // push things that get caught in the transit tile this direction //Overwrite because we dont want people building rods in space. diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 6014320798..0a2bea6add 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -31,6 +31,7 @@ var/list/footstep_sounds = null var/block_tele = FALSE // If true, most forms of teleporting to or from this turf tile will fail. + var/can_build_into_floor = FALSE // Used for things like RCDs (and maybe lattices/floor tiles in the future), to see if a floor should replace it. /turf/New() ..() @@ -320,3 +321,28 @@ var/const/enterloopsanity = 100 /turf/AllowDrop() return TRUE + +// This is all the way up here since its the common ancestor for things that need to get replaced with a floor when an RCD is used on them. +// More specialized turfs like walls should instead override this. +// The code for applying lattices/floor tiles onto lattices could also utilize something similar in the future. +/turf/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + if(density || !can_build_into_floor) + return FALSE + if(passed_mode == RCD_FLOORWALL) + var/obj/structure/lattice/L = locate() in src + // A lattice costs one rod to make. A sheet can make two rods, meaning a lattice costs half of a sheet. + // A sheet also makes four floor tiles, meaning it costs 1/4th of a sheet to place a floor tile on a lattice. + // Therefore it should cost 3/4ths of a sheet if a lattice is not present, or 1/4th of a sheet if it does. + return list( + RCD_VALUE_MODE = RCD_FLOORWALL, + RCD_VALUE_DELAY = 0, + RCD_VALUE_COST = L ? RCD_SHEETS_PER_MATTER_UNIT * 0.25 : RCD_SHEETS_PER_MATTER_UNIT * 0.75 + ) + return FALSE + +/turf/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + if(passed_mode == RCD_FLOORWALL) + to_chat(user, span("notice", "You build a floor.")) + ChangeTurf(/turf/simulated/floor/airless, preserve_outdoors = TRUE) + return TRUE + return FALSE diff --git a/code/game/turfs/unsimulated.dm b/code/game/turfs/unsimulated.dm index b4c1999b48..894fac57b2 100644 --- a/code/game/turfs/unsimulated.dm +++ b/code/game/turfs/unsimulated.dm @@ -14,4 +14,11 @@ /turf/unsimulated/fake_space/New() ..() icon_state = "[((x + y) ^ ~(x * y) + z) % 25]" -//VOREStation Add End \ No newline at end of file +//VOREStation Add End + +// Better nip this just in case. +/turf/unsimulated/rcd_values(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + return FALSE + +/turf/unsimulated/rcd_act(mob/living/user, obj/item/weapon/rcd/the_rcd, passed_mode) + return FALSE diff --git a/code/game/verbs/character_directory.dm b/code/game/verbs/character_directory.dm index b973e3cb03..3c90f09591 100644 --- a/code/game/verbs/character_directory.dm +++ b/code/game/verbs/character_directory.dm @@ -23,11 +23,11 @@ html += "
" html += "

[H.real_name]


" if(H.flavor_texts["general"]) - html += "Flavor text" - html += "" + html += "Flavor text" + html += "" if(H.ooc_notes) - html += "OOC notes" - html += "" + html += "OOC notes" + html += "" html += "
" if(!curID) html += "

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!
Please wait...!
"} - else if(src.dirty==100) - dat = {"This microwave is dirty!
Please clean it before use!
"} - else - var/list/items_counts = new - var/list/items_measures = new - var/list/items_measures_p = new - for (var/obj/O in ((contents - component_parts) - circuit)) - var/display_name = O.name - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) - items_measures[display_name] = "egg" - items_measures_p[display_name] = "eggs" - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu)) - items_measures[display_name] = "tofu chunk" - items_measures_p[display_name] = "tofu chunks" - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat - items_measures[display_name] = "slab of meat" - items_measures_p[display_name] = "slabs of meat" - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket)) - display_name = "Turnovers" - items_measures[display_name] = "turnover" - items_measures_p[display_name] = "turnovers" - if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat)) - items_measures[display_name] = "fillet of meat" - items_measures_p[display_name] = "fillets of meat" - items_counts[display_name]++ - for (var/O in items_counts) - var/N = items_counts[O] - if (!(O in items_measures)) - dat += {"[capitalize(O)]: [N] [lowertext(O)]\s
"} - else - if (N==1) - dat += {"[capitalize(O)]: [N] [items_measures[O]]
"} - else - dat += {"[capitalize(O)]: [N] [items_measures_p[O]]
"} - - for (var/datum/reagent/R in reagents.reagent_list) - var/display_name = R.name - if (R.id == "capsaicin") - display_name = "Hotsauce" - if (R.id == "frostoil") - display_name = "Coldsauce" - dat += {"[display_name]: [R.volume] unit\s
"} - - if (items_counts.len==0 && reagents.reagent_list.len==0) - dat = {"The microwave is empty
"} - else - dat = {"Ingredients:
[dat]"} - dat += {"

\ -Turn on!
\ -
Eject ingredients!
\ -"} - - to_chat(user, browse("Microwave Controls[dat]", "window=microwave")) - onclose(user, "microwave") - return - - - -/*********************************** -* Microwave Menu Handling/Cooking -************************************/ - -/obj/machinery/microwave/proc/cook() - if(stat & (NOPOWER|BROKEN)) - return - start() - if (reagents.total_volume==0 && !(locate(/obj) in ((contents - component_parts) - circuit))) //dry run - if (!wzhzhzh(10)) - abort() - return - stop() - return - - var/datum/recipe/recipe = select_recipe(available_recipes,src) - var/obj/cooked - if (!recipe) - dirty += 1 - if (prob(max(10,dirty*5))) - if (!wzhzhzh(4)) - abort() - return - muck_start() - wzhzhzh(4) - muck_finish() - cooked = fail() - cooked.loc = src.loc - return - else if (has_extra_item()) - if (!wzhzhzh(4)) - abort() - return - broke() - cooked = fail() - cooked.loc = src.loc - return - else - if (!wzhzhzh(10)) - abort() - return - stop() - cooked = fail() - cooked.loc = src.loc - return - else - var/halftime = round(recipe.time/10/2) - if (!wzhzhzh(halftime)) - abort() - return - if (!wzhzhzh(halftime)) - abort() - cooked = fail() - cooked.loc = src.loc - return - cooked = recipe.make_food(src) - stop() - if(cooked) - cooked.loc = src.loc - return - -/obj/machinery/microwave/proc/wzhzhzh(var/seconds as num) // Whoever named this proc is fucking literally Satan. ~ Z - for (var/i=1 to seconds) - if (stat & (NOPOWER|BROKEN)) - return 0 - use_power(500) - sleep(10) - return 1 - -/obj/machinery/microwave/proc/has_extra_item() - for (var/obj/O in ((contents - component_parts) - circuit)) - if ( \ - !istype(O,/obj/item/weapon/reagent_containers/food) && \ - !istype(O, /obj/item/weapon/grown) \ - ) - return 1 - return 0 - -/obj/machinery/microwave/proc/start() - src.visible_message("The microwave turns on.", "You hear a microwave.") - src.operating = 1 - src.icon_state = "mw1" - src.updateUsrDialog() - -/obj/machinery/microwave/proc/abort() - src.operating = 0 // Turn it off again aferwards - src.icon_state = "mw" - src.updateUsrDialog() - -/obj/machinery/microwave/proc/stop() - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - src.operating = 0 // Turn it off again aferwards - src.icon_state = "mw" - src.updateUsrDialog() - -/obj/machinery/microwave/proc/dispose() - for (var/obj/O in ((contents-component_parts)-circuit)) - O.loc = src.loc - if (src.reagents.total_volume) - src.dirty++ - src.reagents.clear_reagents() - usr << "You dispose of the microwave contents." - src.updateUsrDialog() - -/obj/machinery/microwave/proc/muck_start() - playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound - src.icon_state = "mwbloody1" // Make it look dirty!! - -/obj/machinery/microwave/proc/muck_finish() - playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) - src.visible_message("The microwave gets covered in muck!") - src.dirty = 100 // Make it dirty so it can't be used util cleaned - src.flags = null //So you can't add condiments - src.icon_state = "mwbloody" // Make it look dirty too - src.operating = 0 // Turn it off again aferwards - src.updateUsrDialog() - -/obj/machinery/microwave/proc/broke() - var/datum/effect/effect/system/spark_spread/s = new - s.set_up(2, 1, src) - s.start() - src.icon_state = "mwb" // Make it look all busted up and shit - src.visible_message("The microwave breaks!") //Let them know they're stupid - src.broken = 2 // Make it broken so it can't be used util fixed - src.flags = null //So you can't add condiments - src.operating = 0 // Turn it off again aferwards - src.updateUsrDialog() - -/obj/machinery/microwave/proc/fail() - var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src) - var/amount = 0 - for (var/obj/O in (((contents - ffuu) - component_parts) - circuit)) - amount++ - if (O.reagents) - var/id = O.reagents.get_master_reagent_id() - if (id) - amount+=O.reagents.get_reagent_amount(id) - qdel(O) - src.reagents.clear_reagents() - ffuu.reagents.add_reagent("carbon", amount) - ffuu.reagents.add_reagent("toxin", amount/10) - return ffuu - -/obj/machinery/microwave/Topic(href, href_list) - if(..()) - return - - usr.set_machine(src) - if(src.operating) - src.updateUsrDialog() - return - - switch(href_list["action"]) - if ("cook") - cook() - - if ("dispose") - dispose() - return +/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!
Please wait...!
"} + else if(src.dirty==100) + dat = {"This microwave is dirty!
Please clean it before use!
"} + else + var/list/items_counts = new + var/list/items_measures = new + var/list/items_measures_p = new + for (var/obj/O in ((contents - component_parts) - circuit)) + var/display_name = O.name + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg)) + items_measures[display_name] = "egg" + items_measures_p[display_name] = "eggs" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu)) + items_measures[display_name] = "tofu chunk" + items_measures_p[display_name] = "tofu chunks" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat + items_measures[display_name] = "slab of meat" + items_measures_p[display_name] = "slabs of meat" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket)) + display_name = "Turnovers" + items_measures[display_name] = "turnover" + items_measures_p[display_name] = "turnovers" + if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat)) + items_measures[display_name] = "fillet of meat" + items_measures_p[display_name] = "fillets of meat" + items_counts[display_name]++ + for (var/O in items_counts) + var/N = items_counts[O] + if (!(O in items_measures)) + dat += {"[capitalize(O)]: [N] [lowertext(O)]\s
"} + else + if (N==1) + dat += {"[capitalize(O)]: [N] [items_measures[O]]
"} + else + dat += {"[capitalize(O)]: [N] [items_measures_p[O]]
"} + + for (var/datum/reagent/R in reagents.reagent_list) + var/display_name = R.name + if (R.id == "capsaicin") + display_name = "Hotsauce" + if (R.id == "frostoil") + display_name = "Coldsauce" + dat += {"[display_name]: [R.volume] unit\s
"} + + if (items_counts.len==0 && reagents.reagent_list.len==0) + dat = {"The microwave is empty
"} + else + dat = {"Ingredients:
[dat]"} + dat += {"

\ +
Turn on!
\ +
Eject ingredients!
\ +"} + + to_chat(user, browse("Microwave Controls[dat]", "window=microwave")) + onclose(user, "microwave") + return + + + +/*********************************** +* Microwave Menu Handling/Cooking +************************************/ + +/obj/machinery/microwave/proc/cook() + if(stat & (NOPOWER|BROKEN)) + return + start() + if (reagents.total_volume==0 && !(locate(/obj) in ((contents - component_parts) - circuit))) //dry run + if (!wzhzhzh(10)) + abort() + return + stop() + return + + var/datum/recipe/recipe = select_recipe(available_recipes,src) + var/obj/cooked + if (!recipe) + dirty += 1 + if (prob(max(10,dirty*5))) + if (!wzhzhzh(4)) + abort() + return + muck_start() + wzhzhzh(4) + muck_finish() + cooked = fail() + cooked.loc = src.loc + return + else if (has_extra_item()) + if (!wzhzhzh(4)) + abort() + return + broke() + cooked = fail() + cooked.loc = src.loc + return + else + if (!wzhzhzh(10)) + abort() + return + stop() + cooked = fail() + cooked.loc = src.loc + return + else + var/halftime = round(recipe.time/10/2) + if (!wzhzhzh(halftime)) + abort() + return + if (!wzhzhzh(halftime)) + abort() + cooked = fail() + cooked.loc = src.loc + return + cooked = recipe.make_food(src) + stop() + if(cooked) + cooked.loc = src.loc + return + +/obj/machinery/microwave/proc/wzhzhzh(var/seconds as num) // Whoever named this proc is fucking literally Satan. ~ Z + for (var/i=1 to seconds) + if (stat & (NOPOWER|BROKEN)) + return 0 + use_power(500) + sleep(10) + return 1 + +/obj/machinery/microwave/proc/has_extra_item() + for (var/obj/O in ((contents - component_parts) - circuit)) + if ( \ + !istype(O,/obj/item/weapon/reagent_containers/food) && \ + !istype(O, /obj/item/weapon/grown) \ + ) + return 1 + return 0 + +/obj/machinery/microwave/proc/start() + src.visible_message("The microwave turns on.", "You hear a microwave.") + src.operating = 1 + src.icon_state = "mw1" + src.updateUsrDialog() + +/obj/machinery/microwave/proc/abort() + src.operating = 0 // Turn it off again aferwards + src.icon_state = "mw" + src.updateUsrDialog() + +/obj/machinery/microwave/proc/stop() + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + src.operating = 0 // Turn it off again aferwards + src.icon_state = "mw" + src.updateUsrDialog() + +/obj/machinery/microwave/proc/dispose() + for (var/obj/O in ((contents-component_parts)-circuit)) + O.loc = src.loc + if (src.reagents.total_volume) + src.dirty++ + src.reagents.clear_reagents() + usr << "You dispose of the microwave contents." + src.updateUsrDialog() + +/obj/machinery/microwave/proc/muck_start() + playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound + src.icon_state = "mwbloody1" // Make it look dirty!! + +/obj/machinery/microwave/proc/muck_finish() + playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + src.visible_message("The microwave gets covered in muck!") + src.dirty = 100 // Make it dirty so it can't be used util cleaned + src.flags = null //So you can't add condiments + src.icon_state = "mwbloody" // Make it look dirty too + src.operating = 0 // Turn it off again aferwards + src.updateUsrDialog() + +/obj/machinery/microwave/proc/broke() + var/datum/effect/effect/system/spark_spread/s = new + s.set_up(2, 1, src) + s.start() + src.icon_state = "mwb" // Make it look all busted up and shit + src.visible_message("The microwave breaks!") //Let them know they're stupid + src.broken = 2 // Make it broken so it can't be used util fixed + src.flags = null //So you can't add condiments + src.operating = 0 // Turn it off again aferwards + src.updateUsrDialog() + +/obj/machinery/microwave/proc/fail() + var/obj/item/weapon/reagent_containers/food/snacks/badrecipe/ffuu = new(src) + var/amount = 0 + for (var/obj/O in (((contents - ffuu) - component_parts) - circuit)) + amount++ + if (O.reagents) + var/id = O.reagents.get_master_reagent_id() + if (id) + amount+=O.reagents.get_reagent_amount(id) + qdel(O) + src.reagents.clear_reagents() + ffuu.reagents.add_reagent("carbon", amount) + ffuu.reagents.add_reagent("toxin", amount/10) + return ffuu + +/obj/machinery/microwave/Topic(href, href_list) + if(..()) + return + + usr.set_machine(src) + if(src.operating) + src.updateUsrDialog() + return + + switch(href_list["action"]) + if ("cook") + cook() + + if ("dispose") + dispose() + return diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/modules/food/kitchen/smartfridge.dm similarity index 100% rename from code/game/machinery/kitchen/smartfridge.dm rename to code/modules/food/kitchen/smartfridge.dm diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index 4a8c3c59b6..0df256c131 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -9,6 +9,7 @@ /obj/item/weapon/mining_scanner/attack_self(mob/user as mob) user << "You begin sweeping \the [src] about, scanning for metal deposits." + playsound(loc, 'sound/items/goggles_charge.ogg', 50, 1, -6) if(!do_after(user, 50)) return diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index e8ec4fae88..ed84632e15 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -70,6 +70,7 @@ var/list/mining_overlay_cache = list() density = 0 opacity = 0 blocks_air = 0 + can_build_into_floor = TRUE /turf/simulated/mineral/floor/ignore_mapgen ignore_mapgen = 1 @@ -80,6 +81,7 @@ var/list/mining_overlay_cache = list() density = 0 opacity = 0 blocks_air = 0 + can_build_into_floor = TRUE update_general() /turf/simulated/mineral/proc/make_wall() @@ -88,6 +90,7 @@ var/list/mining_overlay_cache = list() density = 1 opacity = 1 blocks_air = 1 + can_build_into_floor = FALSE update_general() /turf/simulated/mineral/proc/update_general() @@ -460,6 +463,8 @@ var/list/mining_overlay_cache = list() //update overlays displaying excavation level if( !(excav_overlay && excavation_level > 0) || update_excav_overlay ) var/excav_quadrant = round(excavation_level / 25) + 1 + if(excav_quadrant > 5) + excav_quadrant = 5 cut_overlay(excav_overlay) excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]" add_overlay(excav_overlay) diff --git a/code/modules/mob/living/silicon/robot/robot_modules/station.dm b/code/modules/mob/living/silicon/robot/robot_modules/station.dm index 6bc45d0dd4..900ae2c043 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/station.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/station.dm @@ -426,7 +426,7 @@ var/global/list/robot_modules = list( src.modules += new /obj/item/weapon/inflatable_dispenser/robot(src) src.emag = new /obj/item/weapon/melee/baton/robot/arm(src) src.modules += new /obj/item/device/geiger(src) - src.modules += new /obj/item/weapon/rcd/borg(src) + src.modules += new /obj/item/weapon/rcd/electric/mounted/borg(src) src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src) src.modules += new /obj/item/weapon/gripper/no_use/loader(src) @@ -895,7 +895,7 @@ var/global/list/robot_modules = list( /obj/item/weapon/robot_module/drone/construction/New() ..() - src.modules += new /obj/item/weapon/rcd/borg(src) + src.modules += new /obj/item/weapon/rcd/electric/mounted/borg/lesser(src) /obj/item/weapon/robot_module/drone/respawn_consumable(var/mob/living/silicon/robot/R, var/amount) var/obj/item/device/lightreplacer/LR = locate() in src.modules diff --git a/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm b/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm index 3c8e981c3b..72caaa2d73 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules/syndicate.dm @@ -83,7 +83,7 @@ src.modules += new /obj/item/weapon/tool/wirecutters/cyborg(src) src.modules += new /obj/item/device/multitool/ai_detector(src) src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src) - src.modules += new /obj/item/weapon/rcd/borg/lesser(src) // Can't eat rwalls to prevent AI core cheese. + src.modules += new /obj/item/weapon/rcd/electric/mounted/borg/lesser(src) // Can't eat rwalls to prevent AI core cheese. src.modules += new /obj/item/weapon/melee/energy/sword/ionic_rapier(src) // FBP repair. diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm index ae44c58412..cbf7623267 100644 --- a/code/modules/multiz/turf.dm +++ b/code/modules/multiz/turf.dm @@ -26,6 +26,7 @@ plane = OPENSPACE_PLANE_START pathweight = 100000 //Seriously, don't try and path over this one numbnuts dynamic_lighting = 0 // Someday lets do proper lighting z-transfer. Until then we are leaving this off so it looks nicer. + can_build_into_floor = TRUE var/turf/below diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 707c89409e..8a2940b90d 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -78,6 +78,9 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins else if(href_list["remove"]) if(copyitem) + if(get_dist(usr, src) >= 2) + to_chat(usr, "\The [copyitem] is too far away for you to remove it.") + return copyitem.loc = usr.loc usr.put_in_hands(copyitem) to_chat(usr, "You take \the [copyitem] out of \the [src].") diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 52e02bd7ba..4f27c593c7 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -147,6 +147,11 @@ to_chat(user, "[src] is already empty!") return to_chat(user, "You empty [src].") + playsound(user.loc, "casing_sound", 50, 1) + spawn(7) + playsound(user.loc, "casing_sound", 50, 1) + spawn(10) + playsound(user.loc, "casing_sound", 50, 1) for(var/obj/item/ammo_casing/C in stored_ammo) C.loc = user.loc C.set_dir(pick(cardinal)) diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index 6f88fed227..cfd96ac2aa 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -327,7 +327,7 @@ /obj/item/ammo_magazine/m9mmR/saber desc = "A very high capacity double stack magazine made specially for the SABER SMG. Filled with 22 9mm bullets." - icon_state = "S9mm-22" + icon_state = "S9mm" mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/a9mm matter = list(DEFAULT_WALL_MATERIAL = 1200) @@ -338,14 +338,9 @@ /obj/item/ammo_magazine/m9mmR/saber/ap desc = "A high capacity double stack magazine made specially for the SABER SMG. Filled with 22 9mm armor piercing bullets." - icon_state = "S9mm-22" - mag_type = MAGAZINE + icon_state = "S9mm" ammo_type = /obj/item/ammo_casing/a9mm/ap matter = list(DEFAULT_WALL_MATERIAL = 2000) - caliber = "9mm" - max_ammo = 22 - origin_tech = list(TECH_COMBAT = 2, TECH_ILLEGAL = 1) - multiple_sprites = 1 /obj/item/ammo_magazine/m9mmR/saber/empty initial_ammo = 0 diff --git a/code/modules/vore/fluffstuff/custom_guns_vr.dm b/code/modules/vore/fluffstuff/custom_guns_vr.dm index 5330b80006..d897855aa0 100644 --- a/code/modules/vore/fluffstuff/custom_guns_vr.dm +++ b/code/modules/vore/fluffstuff/custom_guns_vr.dm @@ -743,6 +743,10 @@ var/recharging = 0 projectile_type = /obj/item/projectile/beam + firemodes = list( + list(mode_name="normal", fire_delay=12, projectile_type=/obj/item/projectile/beam, charge_cost = 300), + list(mode_name="low-power", fire_delay=8, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60), + ) /obj/item/weapon/gun/energy/frontier/unload_ammo(var/mob/user) if(recharging) @@ -774,13 +778,6 @@ /obj/item/weapon/gun/energy/frontier/ex_act() //|rugged| return -//Needed to fix a bug with the holdout phaser -/obj/item/weapon/gun/energy/frontier/basic - firemodes = list( - list(mode_name="normal", fire_delay=12, projectile_type=/obj/item/projectile/beam, charge_cost = 300), - list(mode_name="low-power", fire_delay=8, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60), - ) - /obj/item/weapon/gun/energy/frontier/locked desc = "An extraordinarily rugged laser weapon, built to last and requiring effectively no maintenance. Includes a built-in crank charger for recharging away from civilization. This one has a safety interlock that prevents firing while in proximity to the facility." req_access = list(access_armory) //for toggling safety @@ -811,13 +808,6 @@ return 0 return ..() -//Needed to fix a bug with the holdout phaser -/obj/item/weapon/gun/energy/frontier/locked/basic - firemodes = list( - list(mode_name="normal", fire_delay=12, projectile_type=/obj/item/projectile/beam, charge_cost = 300), - list(mode_name="low-power", fire_delay=8, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60), - ) - //Expeditionary Holdout Phaser /obj/item/weapon/gun/energy/frontier/locked/holdout name = "holdout frontier phaser" @@ -826,9 +816,10 @@ icon_state = "PDW" item_state = "gun" w_class = ITEMSIZE_SMALL + charge_cost = 600 firemodes = list( - list(mode_name="normal", fire_delay=12, projectile_type=/obj/item/projectile/beam, charge_cost = 1200), - list(mode_name="low-power", fire_delay=8, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 240), + list(mode_name="normal", fire_delay=12, projectile_type=/obj/item/projectile/beam, charge_cost = 600), + list(mode_name="low-power", fire_delay=8, projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 120), ) /obj/item/weapon/gun/energy/frontier/locked/holdout/proc/update_mode() diff --git a/html/changelogs/Neerti-RCDs.yml b/html/changelogs/Neerti-RCDs.yml new file mode 100644 index 0000000000..04c5778974 --- /dev/null +++ b/html/changelogs/Neerti-RCDs.yml @@ -0,0 +1,37 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Neerti + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "RCDs can now build grilles and windows, with a new mode. They can also finish walls when used on girders on floor/wall mode." + - rscadd: "Adds various new RCDs that are not obtainable at the moment." diff --git a/icons/obj/items.dmi b/icons/obj/items.dmi index a8e41841c3..d33437164e 100644 Binary files a/icons/obj/items.dmi and b/icons/obj/items.dmi differ diff --git a/icons/obj/tools.dmi b/icons/obj/tools.dmi index 9cbb46748a..b25a6cbc56 100644 Binary files a/icons/obj/tools.dmi and b/icons/obj/tools.dmi differ diff --git a/maps/southern_cross/structures/closets/misc_vr.dm b/maps/southern_cross/structures/closets/misc_vr.dm index 751009ef2e..27b0150331 100644 --- a/maps/southern_cross/structures/closets/misc_vr.dm +++ b/maps/southern_cross/structures/closets/misc_vr.dm @@ -7,7 +7,7 @@ icon_opened = "secureexpopen" icon_broken = "secureexpbroken" icon_off = "secureexpoff" - req_access = list(access_explorer) + req_access = list(access_gateway) starts_with = list( /obj/item/clothing/under/explorer, diff --git a/maps/tether/tether-05-station1.dmm b/maps/tether/tether-05-station1.dmm index af0666610c..2337b17787 100644 --- a/maps/tether/tether-05-station1.dmm +++ b/maps/tether/tether-05-station1.dmm @@ -1948,7 +1948,7 @@ dir = 8 }, /obj/effect/floor_decal/steeldecal/steel_decals9, -/obj/machinery/suit_cycler/explorer, +/obj/machinery/suit_cycler/exploration, /turf/simulated/floor/tiled, /area/tether/station/explorer_prep) "aeC" = ( @@ -22129,9 +22129,23 @@ }, /turf/simulated/floor/tiled, /area/tether/station/explorer_meeting) +"pTz" = ( +/obj/effect/floor_decal/steeldecal/steel_decals9, +/obj/effect/floor_decal/steeldecal/steel_decals9{ + dir = 8 + }, +/obj/effect/floor_decal/steeldecal/steel_decals9{ + dir = 4 + }, +/obj/effect/floor_decal/steeldecal/steel_decals9{ + dir = 1 + }, +/obj/machinery/suit_cycler/pilot, +/turf/simulated/floor/tiled, +/area/tether/station/excursion_dock) "pYE" = ( /obj/structure/closet/secure_closet/pathfinder{ - req_access = list(18,43,67) + req_access = list(62) }, /obj/effect/floor_decal/industrial/outline/yellow, /obj/effect/floor_decal/steeldecal/steel_decals9, @@ -22462,7 +22476,7 @@ /obj/machinery/door/firedoor/glass, /obj/machinery/door/airlock/research{ name = "Pathfinder's Office"; - req_access = list(18,43,67) + req_access = list(62) }, /obj/structure/cable/green{ d1 = 4; @@ -35486,7 +35500,7 @@ aad aaH aah aah -aah +pTz abc aad abU diff --git a/maps/tether/tether_shuttles.dm b/maps/tether/tether_shuttles.dm index 9969b50eb2..9d6b0560f2 100644 --- a/maps/tether/tether_shuttles.dm +++ b/maps/tether/tether_shuttles.dm @@ -174,7 +174,7 @@ name = "shuttle control console" shuttle_tag = "Excursion Shuttle" req_access = list() - req_one_access = list(access_heads,access_explorer,access_pilot) + req_one_access = list(access_explorer,access_pilot) var/wait_time = 45 MINUTES /obj/machinery/computer/shuttle_control/web/excursion/ui_interact() diff --git a/maps/tether/tether_things.dm b/maps/tether/tether_things.dm index 14d1b1bb81..859ef9667c 100644 --- a/maps/tether/tether_things.dm +++ b/maps/tether/tether_things.dm @@ -395,7 +395,7 @@ var/global/list/latejoin_tram = list() /obj/structure/closet/secure_closet/guncabinet/excursion/New() ..() for(var/i = 1 to 4) - new /obj/item/weapon/gun/energy/frontier/locked/basic(src) + new /obj/item/weapon/gun/energy/frontier/locked(src) for(var/i = 1 to 4) new /obj/item/weapon/gun/energy/frontier/locked/holdout(src) diff --git a/vorestation.dme b/vorestation.dme index 7b47f046b9..ce2782d8df 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -846,18 +846,6 @@ #include "code\game\machinery\embedded_controller\embedded_controller_base.dm" #include "code\game\machinery\embedded_controller\embedded_program_base.dm" #include "code\game\machinery\embedded_controller\simple_docking_controller.dm" -#include "code\game\machinery\kitchen\gibber.dm" -#include "code\game\machinery\kitchen\icecream.dm" -#include "code\game\machinery\kitchen\microwave.dm" -#include "code\game\machinery\kitchen\smartfridge.dm" -#include "code\game\machinery\kitchen\smartfridge_vr.dm" -#include "code\game\machinery\kitchen\cooking_machines\_cooker.dm" -#include "code\game\machinery\kitchen\cooking_machines\_cooker_output.dm" -#include "code\game\machinery\kitchen\cooking_machines\candy.dm" -#include "code\game\machinery\kitchen\cooking_machines\cereal.dm" -#include "code\game\machinery\kitchen\cooking_machines\fryer.dm" -#include "code\game\machinery\kitchen\cooking_machines\grill.dm" -#include "code\game\machinery\kitchen\cooking_machines\oven.dm" #include "code\game\machinery\pipe\construction.dm" #include "code\game\machinery\pipe\pipe_dispenser.dm" #include "code\game\machinery\pipe\pipe_recipes.dm" @@ -1635,7 +1623,6 @@ #include "code\modules\clothing\spacesuits\void\merc.dm" #include "code\modules\clothing\spacesuits\void\military_vr.dm" #include "code\modules\clothing\spacesuits\void\station.dm" -#include "code\modules\clothing\spacesuits\void\station_vr.dm" #include "code\modules\clothing\spacesuits\void\void.dm" #include "code\modules\clothing\spacesuits\void\void_vr.dm" #include "code\modules\clothing\spacesuits\void\wizard.dm" @@ -1786,9 +1773,43 @@ #include "code\modules\flufftext\Hallucination.dm" #include "code\modules\flufftext\look_up.dm" #include "code\modules\flufftext\TextFilters.dm" +#include "code\modules\food\food.dm" #include "code\modules\food\recipe_dump.dm" #include "code\modules\food\recipes_microwave.dm" #include "code\modules\food\recipes_microwave_vr.dm" +#include "code\modules\food\drinkingglass\drinkingglass.dm" +#include "code\modules\food\drinkingglass\extras.dm" +#include "code\modules\food\drinkingglass\glass_boxes.dm" +#include "code\modules\food\drinkingglass\glass_types.dm" +#include "code\modules\food\drinkingglass\metaglass.dm" +#include "code\modules\food\drinkingglass\shaker.dm" +#include "code\modules\food\food\cans.dm" +#include "code\modules\food\food\condiment.dm" +#include "code\modules\food\food\drinks.dm" +#include "code\modules\food\food\lunch.dm" +#include "code\modules\food\food\sandwich.dm" +#include "code\modules\food\food\snacks.dm" +#include "code\modules\food\food\snacks_vr.dm" +#include "code\modules\food\food\z_custom_food_vr.dm" +#include "code\modules\food\food\drinks\bottle.dm" +#include "code\modules\food\food\drinks\cup.dm" +#include "code\modules\food\food\drinks\drinkingglass.dm" +#include "code\modules\food\food\drinks\jar.dm" +#include "code\modules\food\food\drinks\bottle\robot.dm" +#include "code\modules\food\food\snacks\meat.dm" +#include "code\modules\food\glass\bottle.dm" +#include "code\modules\food\glass\bottle\robot.dm" +#include "code\modules\food\kitchen\gibber.dm" +#include "code\modules\food\kitchen\icecream.dm" +#include "code\modules\food\kitchen\microwave.dm" +#include "code\modules\food\kitchen\smartfridge.dm" +#include "code\modules\food\kitchen\cooking_machines\_cooker.dm" +#include "code\modules\food\kitchen\cooking_machines\_cooker_output.dm" +#include "code\modules\food\kitchen\cooking_machines\candy.dm" +#include "code\modules\food\kitchen\cooking_machines\cereal.dm" +#include "code\modules\food\kitchen\cooking_machines\fryer.dm" +#include "code\modules\food\kitchen\cooking_machines\grill.dm" +#include "code\modules\food\kitchen\cooking_machines\oven.dm" #include "code\modules\gamemaster\controller.dm" #include "code\modules\gamemaster\defines.dm" #include "code\modules\gamemaster\game_master.dm" @@ -2654,7 +2675,6 @@ #include "code\modules\reagents\reagent_containers\blood_pack_vr.dm" #include "code\modules\reagents\reagent_containers\borghydro.dm" #include "code\modules\reagents\reagent_containers\dropper.dm" -#include "code\modules\reagents\reagent_containers\food.dm" #include "code\modules\reagents\reagent_containers\glass.dm" #include "code\modules\reagents\reagent_containers\glass_vr.dm" #include "code\modules\reagents\reagent_containers\hypospray.dm" @@ -2663,30 +2683,6 @@ #include "code\modules\reagents\reagent_containers\spray.dm" #include "code\modules\reagents\reagent_containers\spray_vr.dm" #include "code\modules\reagents\reagent_containers\syringes.dm" -#include "code\modules\reagents\reagent_containers\syringes_vr.dm" -#include "code\modules\reagents\reagent_containers\drinkingglass\drinkingglass.dm" -#include "code\modules\reagents\reagent_containers\drinkingglass\extras.dm" -#include "code\modules\reagents\reagent_containers\drinkingglass\glass_boxes.dm" -#include "code\modules\reagents\reagent_containers\drinkingglass\glass_types.dm" -#include "code\modules\reagents\reagent_containers\drinkingglass\metaglass.dm" -#include "code\modules\reagents\reagent_containers\drinkingglass\shaker.dm" -#include "code\modules\reagents\reagent_containers\food\cans.dm" -#include "code\modules\reagents\reagent_containers\food\condiment.dm" -#include "code\modules\reagents\reagent_containers\food\drinks.dm" -#include "code\modules\reagents\reagent_containers\food\lunch.dm" -#include "code\modules\reagents\reagent_containers\food\sandwich.dm" -#include "code\modules\reagents\reagent_containers\food\snacks.dm" -#include "code\modules\reagents\reagent_containers\food\snacks_vr.dm" -#include "code\modules\reagents\reagent_containers\food\z_custom_food_vr.dm" -#include "code\modules\reagents\reagent_containers\food\drinks\bluespacecoffee.dm" -#include "code\modules\reagents\reagent_containers\food\drinks\bottle.dm" -#include "code\modules\reagents\reagent_containers\food\drinks\cup.dm" -#include "code\modules\reagents\reagent_containers\food\drinks\jar.dm" -#include "code\modules\reagents\reagent_containers\food\drinks\bottle\robot.dm" -#include "code\modules\reagents\reagent_containers\food\snacks\meat.dm" -#include "code\modules\reagents\reagent_containers\glass\bottle.dm" -#include "code\modules\reagents\reagent_containers\glass\bottle_vr.dm" -#include "code\modules\reagents\reagent_containers\glass\bottle\robot.dm" #include "code\modules\recycling\conveyor2.dm" #include "code\modules\recycling\disposal-construction.dm" #include "code\modules\recycling\disposal.dm"