diff --git a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm index 454d04ff44..391f10bc6e 100644 --- a/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm +++ b/code/ATMOSPHERICS/components/binary_devices/algae_generator_vr.dm @@ -200,7 +200,7 @@ "moles" = round(air2.gas[output_gas], 0.01)) // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "algae_farm_vr.tmpl", "Algae Farm Control Panel", 500, 600) ui.set_initial_data(data) diff --git a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm index accedb543d..5abaa00c60 100644 --- a/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm +++ b/code/ATMOSPHERICS/components/binary_devices/passive_gate.dm @@ -197,7 +197,7 @@ ) // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/ATMOSPHERICS/components/binary_devices/pump.dm b/code/ATMOSPHERICS/components/binary_devices/pump.dm index cacdf5240b..1f1c4ff1ae 100644 --- a/code/ATMOSPHERICS/components/binary_devices/pump.dm +++ b/code/ATMOSPHERICS/components/binary_devices/pump.dm @@ -140,7 +140,7 @@ Thus, the two variables affect pump operation are set in New(): ) // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/ATMOSPHERICS/components/omni_devices/filter.dm b/code/ATMOSPHERICS/components/omni_devices/filter.dm index 428f37fcfa..6fbd91f861 100644 --- a/code/ATMOSPHERICS/components/omni_devices/filter.dm +++ b/code/ATMOSPHERICS/components/omni_devices/filter.dm @@ -93,7 +93,7 @@ data = build_uidata() - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "omni_filter.tmpl", "Omni Filter Control", 330, 330) @@ -181,7 +181,7 @@ switch_filter(dir_flag(href_list["dir"]), mode_return_switch(new_filter)) update_icon() - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/atmospherics/omni/atmos_filter/proc/mode_return_switch(var/mode) diff --git a/code/ATMOSPHERICS/components/omni_devices/mixer.dm b/code/ATMOSPHERICS/components/omni_devices/mixer.dm index fc00be6ba4..47c78427f0 100644 --- a/code/ATMOSPHERICS/components/omni_devices/mixer.dm +++ b/code/ATMOSPHERICS/components/omni_devices/mixer.dm @@ -131,7 +131,7 @@ data = build_uidata() - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "omni_mixer.tmpl", "Omni Mixer Control", 360, 330) @@ -200,7 +200,7 @@ con_lock(dir_flag(href_list["dir"])) update_icon() - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/atmospherics/omni/mixer/proc/switch_mode(var/port = NORTH, var/mode = ATM_NONE) diff --git a/code/ATMOSPHERICS/components/unary/cold_sink.dm b/code/ATMOSPHERICS/components/unary/cold_sink.dm index 8ff0aa7479..d4bfb73311 100644 --- a/code/ATMOSPHERICS/components/unary/cold_sink.dm +++ b/code/ATMOSPHERICS/components/unary/cold_sink.dm @@ -83,7 +83,7 @@ data["gasTemperatureClass"] = temp_class // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/ATMOSPHERICS/components/unary/heat_source.dm b/code/ATMOSPHERICS/components/unary/heat_source.dm index 69e638bc22..9729e1d387 100644 --- a/code/ATMOSPHERICS/components/unary/heat_source.dm +++ b/code/ATMOSPHERICS/components/unary/heat_source.dm @@ -103,7 +103,7 @@ data["gasTemperatureClass"] = temp_class // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/__defines/_planes+layers_vr.dm b/code/__defines/_planes+layers_vr.dm index 0ec8664fd9..125f492cd7 100644 --- a/code/__defines/_planes+layers_vr.dm +++ b/code/__defines/_planes+layers_vr.dm @@ -5,5 +5,3 @@ #define PLANE_CH_VANTAG 29 //Vore Antag hud #define PLANE_AUGMENTED 40 //Augmented-reality plane - -#define ABOVE_WINDOW_LAYER 3.25 //Above full tile windows so wall items are clickable diff --git a/code/__defines/_tick.dm b/code/__defines/_tick.dm index 54ac7d398d..1f112f711b 100644 --- a/code/__defines/_tick.dm +++ b/code/__defines/_tick.dm @@ -1,5 +1,5 @@ -#define TICK_LIMIT_RUNNING 80 +#define TICK_LIMIT_RUNNING 85 //VOREStation Emergency Edit #define TICK_LIMIT_TO_RUN 70 #define TICK_LIMIT_MC 70 #define TICK_LIMIT_MC_INIT_DEFAULT 98 diff --git a/code/__defines/belly_modes_vr.dm b/code/__defines/belly_modes_vr.dm index cd444abc18..c65a87d6c8 100644 --- a/code/__defines/belly_modes_vr.dm +++ b/code/__defines/belly_modes_vr.dm @@ -29,9 +29,9 @@ #define DM_TRANSFORM_FEMALE_EGG "Transform (Female) (EGG)" //Addon mode flags -#define DM_FLAG_NUMBING 0x1 -#define DM_FLAG_STRIPPING 0x2 -//#define DM_FLAG_ITEMWEAK 0x4 +#define DM_FLAG_NUMBING 0x1 +#define DM_FLAG_STRIPPING 0x2 +#define DM_FLAG_LEAVEREMAINS 0x4 //Item related modes #define IM_HOLD "Hold" diff --git a/code/__defines/map.dm b/code/__defines/map.dm index 13b1bfd795..7d0f3706af 100644 --- a/code/__defines/map.dm +++ b/code/__defines/map.dm @@ -6,6 +6,7 @@ #define MAP_LEVEL_SEALED 0x010 // Z-levels that don't allow random transit at edge #define MAP_LEVEL_EMPTY 0x020 // Empty Z-levels that may be used for various things (currently used by bluespace jump) #define MAP_LEVEL_CONSOLES 0x040 // Z-levels available to various consoles, such as the crew monitor (when that gets coded in). Defaults to station_levels if unset. +#define MAP_LEVEL_XENOARCH_EXEMPT 0x080 // Z-levels exempt from xenoarch digsite generation. // Misc map defines. #define SUBMAP_MAP_EDGE_PAD 15 // Automatically created submaps are forbidden from being this close to the main map's edge. \ No newline at end of file diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 0e3234ed83..c17e6d1594 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -145,7 +145,10 @@ #define DEFAULT_TABLE_MATERIAL "plastic" #define DEFAULT_WALL_MATERIAL "steel" +#define MAT_IRON "iron" +#define MAT_MARBLE "marble" #define MAT_STEEL "steel" +#define MAT_PLASTIC "plastic" #define MAT_GLASS "glass" #define MAT_SILVER "silver" #define MAT_GOLD "gold" @@ -164,6 +167,13 @@ #define MAT_DURASTEEL "durasteel" #define MAT_DURASTEELHULL "durasteel hull" #define MAT_TITANIUMHULL "titanium hull" +#define MAT_VERDANTIUM "verdantium" +#define MAT_MORPHIUM "morphium" +#define MAT_MORPHIUMHULL "morphium hull" +#define MAT_VALHOLLIDE "valhollide" +#define MAT_LEAD "lead" +#define MAT_SUPERMATTER "supermatter" +#define MAT_METALHYDROGEN "mhydrogen" #define SHARD_SHARD "shard" #define SHARD_SHRAPNEL "shrapnel" diff --git a/code/__defines/mobs_vr.dm b/code/__defines/mobs_vr.dm index 0a2e49d907..fadd802c84 100644 --- a/code/__defines/mobs_vr.dm +++ b/code/__defines/mobs_vr.dm @@ -30,3 +30,8 @@ #define SPECIES_ZORREN_FLAT "Flatland Zorren" #define SPECIES_ZORREN_HIGH "Highlander Zorren" #define SPECIES_CUSTOM "Custom Species" + +#define SPECIES_MONKEY_AKULA "Sobaka" +#define SPECIES_MONKEY_NEVREAN "Sparra" +#define SPECIES_MONKEY_SERGAL "Saru" +#define SPECIES_MONKEY_VULPKANIN "Wolpin" diff --git a/code/__defines/research.dm b/code/__defines/research.dm index 9c3bec3066..b55f6601f8 100644 --- a/code/__defines/research.dm +++ b/code/__defines/research.dm @@ -11,6 +11,7 @@ #define TECH_DATA "programming" #define TECH_ILLEGAL "syndicate" #define TECH_ARCANE "arcane" +#define TECH_PRECURSOR "precursor" #define IMPRINTER 0x0001 //For circuits. Uses glass/chemicals. #define PROTOLATHE 0x0002 //New stuff. Uses glass/metal/chemicals diff --git a/code/__defines/subsystems.dm b/code/__defines/subsystems.dm index ac480237b5..767941d58f 100644 --- a/code/__defines/subsystems.dm +++ b/code/__defines/subsystems.dm @@ -73,6 +73,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G // Subsystem fire priority, from lowest to highest priority // If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child) #define FIRE_PRIORITY_SHUTTLES 5 +#define FIRE_PRIORITY_TIMERS 7 //VOREStation Emergency Edit #define FIRE_PRIORITY_ORBIT 8 #define FIRE_PRIORITY_VOTE 9 #define FIRE_PRIORITY_AI 10 diff --git a/code/__defines/xenoarcheaology.dm b/code/__defines/xenoarcheaology.dm index b8b781795f..45e40cfbde 100644 --- a/code/__defines/xenoarcheaology.dm +++ b/code/__defines/xenoarcheaology.dm @@ -34,7 +34,9 @@ #define ARCHAEO_REMAINS_XENO 34 #define ARCHAEO_GASMASK 35 #define ARCHAEO_ALIEN_ITEM 36 -#define MAX_ARCHAEO 36 +#define ARCHAEO_ALIEN_BOAT 37 +#define ARCHAEO_IMPERION_CIRCUIT 38 +#define MAX_ARCHAEO 38 #define DIGSITE_GARDEN 1 #define DIGSITE_ANIMAL 2 diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 057e468bb4..a3687b9b99 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -13,8 +13,6 @@ var/global/list/dead_mob_list = list() //List of all dead mobs, including cli var/global/list/listening_objects = list() //List of all objects which care about receiving messages (communicators, radios, etc) var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time -var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions -var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff var/global/list/landmarks_list = list() //list of all landmarks created var/global/list/surgery_steps = list() //list of all surgery steps |BS12 var/global/list/side_effects = list() //list of all medical sideeffects types by thier names |BS12 diff --git a/code/_helpers/global_lists_vr.dm b/code/_helpers/global_lists_vr.dm index f5b8f8afd8..4618bb536d 100644 --- a/code/_helpers/global_lists_vr.dm +++ b/code/_helpers/global_lists_vr.dm @@ -137,6 +137,7 @@ var/global/list/edible_trash = list(/obj/item/broken_device, /obj/item/stack/material/cardboard, /obj/item/toy, /obj/item/trash, + /obj/item/weapon/digestion_remains, /obj/item/weapon/bananapeel, /obj/item/weapon/bone, /obj/item/weapon/broken_bottle, @@ -394,6 +395,27 @@ var/global/list/contamination_colors = list("green", "beige", "pink") +//For the mechanic of leaving remains. Ones listed below are basically ones that got no bones. +var/global/list/remainless_species = list(SPECIES_PROMETHEAN, + SPECIES_DIONA, + SPECIES_ALRAUNE, + SPECIES_PROTEAN, + SPECIES_MONKEY, //Exclude all monkey subtypes, to prevent abuse of it. They aren't, + SPECIES_MONKEY_TAJ, //set to have remains anyway, but making double sure, + SPECIES_MONKEY_SKRELL, + SPECIES_MONKEY_UNATHI, + SPECIES_MONKEY_AKULA, + SPECIES_MONKEY_NEVREAN, + SPECIES_MONKEY_SERGAL, + SPECIES_MONKEY_VULPKANIN, + SPECIES_XENO, //Same for xenos, + SPECIES_XENO_DRONE, + SPECIES_XENO_HUNTER, + SPECIES_XENO_SENTINEL, + SPECIES_XENO_QUEEN, + SPECIES_SHADOW, + SPECIES_GOLEM) //Some special species that may or may not be ever used in event too + /hook/startup/proc/init_vore_datum_ref_lists() var/paths diff --git a/code/controllers/Processes/chemistry.dm b/code/controllers/Processes/chemistry.dm deleted file mode 100644 index 89d3cc01be..0000000000 --- a/code/controllers/Processes/chemistry.dm +++ /dev/null @@ -1,33 +0,0 @@ -var/datum/controller/process/chemistry/chemistryProcess - -/datum/controller/process/chemistry - var/list/active_holders - var/list/chemical_reactions - var/list/chemical_reagents - -/datum/controller/process/chemistry/setup() - name = "chemistry" - schedule_interval = 20 // every 2 seconds - chemistryProcess = src - active_holders = list() - chemical_reactions = chemical_reactions_list - chemical_reagents = chemical_reagents_list - -/datum/controller/process/chemistry/statProcess() - ..() - stat(null, "[active_holders.len] reagent holder\s") - -/datum/controller/process/chemistry/doWork() - for(last_object in active_holders) - var/datum/reagents/holder = last_object - if(!holder.process_reactions()) - active_holders -= holder - SCHECK - -/datum/controller/process/chemistry/proc/mark_for_update(var/datum/reagents/holder) - if(holder in active_holders) - return - - //Process once, right away. If we still need to continue then add to the active_holders list and continue later - if(holder.process_reactions()) - active_holders += holder \ No newline at end of file diff --git a/code/controllers/Processes/nanoui.dm b/code/controllers/Processes/nanoui.dm deleted file mode 100644 index 0f720600bc..0000000000 --- a/code/controllers/Processes/nanoui.dm +++ /dev/null @@ -1,19 +0,0 @@ -/datum/controller/process/nanoui/setup() - name = "nanoui" - schedule_interval = 20 // every 2 seconds - -/datum/controller/process/nanoui/statProcess() - ..() - stat(null, "[GLOB.nanomanager.processing_uis.len] UIs") - -/datum/controller/process/nanoui/doWork() - for(last_object in GLOB.nanomanager.processing_uis) - var/datum/nanoui/NUI = last_object - if(istype(NUI) && !QDELETED(NUI)) - try - NUI.process() - catch(var/exception/e) - catchException(e, NUI) - else - catchBadType(NUI) - GLOB.nanomanager.processing_uis -= NUI \ No newline at end of file diff --git a/code/controllers/Processes/supply.dm b/code/controllers/Processes/supply.dm index 781e285371..f71cd8fd1d 100644 --- a/code/controllers/Processes/supply.dm +++ b/code/controllers/Processes/supply.dm @@ -78,6 +78,8 @@ var/datum/controller/supply/supply_controller = new() return 1 if(istype(A,/obj/item/device/radio/beacon)) return 1 + if(istype(A,/obj/item/device/perfect_tele_beacon)) //VOREStation Addition: Translocator beacons + return 1 //VOREStation Addition: Translocator beacons for(var/atom/B in A.contents) if(.(B)) @@ -99,6 +101,7 @@ var/datum/controller/supply/supply_controller = new() EC.name = "\proper[MA.name]" EC.value = 0 EC.contents = list() + var/base_value = 0 // Must be in a crate! if(istype(MA,/obj/structure/closet/crate)) @@ -106,6 +109,8 @@ var/datum/controller/supply/supply_controller = new() callHook("sell_crate", list(CR, area_shuttle)) points += CR.points_per_crate + if(CR.points_per_crate) + base_value = CR.points_per_crate var/find_slip = 1 for(var/atom/A in CR) @@ -149,6 +154,7 @@ var/datum/controller/supply/supply_controller = new() exported_crates += EC points += EC.value + EC.value += base_value // Duplicate the receipt for the admin-side log var/datum/exported_crate/adm = new() diff --git a/code/controllers/subsystems/nanoui.dm b/code/controllers/subsystems/nanoui.dm new file mode 100644 index 0000000000..b4ceee4d63 --- /dev/null +++ b/code/controllers/subsystems/nanoui.dm @@ -0,0 +1,51 @@ +SUBSYSTEM_DEF(nanoui) + name = "NanoUI" + wait = 5 + // a list of current open /nanoui UIs, grouped by src_object and ui_key + var/list/open_uis = list() + // a list of current open /nanoui UIs, not grouped, for use in processing + var/list/processing_uis = list() + // a list of asset filenames which are to be sent to the client on user logon + var/list/asset_files = list() + +/datum/controller/subsystem/nanoui/Initialize() + var/list/nano_asset_dirs = list(\ + "nano/css/",\ + "nano/images/",\ + "nano/js/",\ + "nano/templates/"\ + ) + + var/list/filenames = null + for (var/path in nano_asset_dirs) + filenames = flist(path) + for(var/filename in filenames) + if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore + if(fexists(path + filename)) + asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect + .=..() //VOREStation Edit start: fixing some kevinzing + for(var/i in GLOB.clients) + send_resources(i) //VOREStation Edit end: fixing some kevinzing + +/datum/controller/subsystem/nanoui/Recover() + if(SSnanoui.open_uis) + open_uis |= SSnanoui.open_uis + if(SSnanoui.processing_uis) + processing_uis |= SSnanoui.processing_uis + if(SSnanoui.asset_files) + asset_files |= SSnanoui.asset_files + +/datum/controller/subsystem/nanoui/stat_entry() + return ..("[processing_uis.len] UIs") + +/datum/controller/subsystem/nanoui/fire(resumed) + for(var/thing in processing_uis) + var/datum/nanoui/UI = thing + UI.process() + +//Sends asset files to a client, called on client/New() +/datum/controller/subsystem/nanoui/proc/send_resources(client) + if(!subsystem_initialized) + return + for(var/file in asset_files) + client << browse_rsc(file) // send the file to the client \ No newline at end of file diff --git a/code/controllers/subsystems/persist_vr.dm b/code/controllers/subsystems/persist_vr.dm index b2bcc4b2c0..6baceae332 100644 --- a/code/controllers/subsystems/persist_vr.dm +++ b/code/controllers/subsystems/persist_vr.dm @@ -41,24 +41,30 @@ SUBSYSTEM_DEF(persist) return continue + // Do not collect useless PTO + var/department_earning = J.department + if(J.department == "Command") + department_earning = "Civilian" + clear_unused_pto(M) + // Update client whatever var/client/C = M.client var/wait_in_hours = (wait / (1 HOUR)) * J.timeoff_factor LAZYINITLIST(C.department_hours) var/dept_hours = C.department_hours - if(isnum(C.department_hours[J.department])) - dept_hours[J.department] += wait_in_hours + if(isnum(C.department_hours[department_earning])) + dept_hours[department_earning] += wait_in_hours else - dept_hours[J.department] = wait_in_hours + dept_hours[department_earning] = wait_in_hours //Cap it - dept_hours[J.department] = min(config.pto_cap, dept_hours[J.department]) + dept_hours[department_earning] = min(config.pto_cap, dept_hours[department_earning]) // Okay we figured it out, lets update database! var/sql_ckey = sql_sanitize_text(C.ckey) - var/sql_dpt = sql_sanitize_text(J.department) - var/sql_bal = text2num("[C.department_hours[J.department]]") + var/sql_dpt = sql_sanitize_text(department_earning) + var/sql_bal = text2num("[C.department_hours[department_earning]]") var/DBQuery/query = dbcon.NewQuery("INSERT INTO vr_player_hours (ckey, department, hours) VALUES ('[sql_ckey]', '[sql_dpt]', [sql_bal]) ON DUPLICATE KEY UPDATE hours = VALUES(hours)") query.Execute() @@ -79,3 +85,10 @@ SUBSYSTEM_DEF(persist) // Let's check the mind. if(M.mind && M.mind.assigned_role) . = job_master.GetJob(M.mind.assigned_role) + +// This proc tries makes sure old Command PTO doesn't linger +/datum/controller/subsystem/persist/proc/clear_unused_pto(var/mob/M) + var/client/C = M.client + LAZYINITLIST(C.department_hours) + if(C.department_hours["Command"]) + C.department_hours["Command"] = null \ No newline at end of file diff --git a/code/controllers/subsystems/processing/chemistry.dm b/code/controllers/subsystems/processing/chemistry.dm new file mode 100644 index 0000000000..34094f9fe3 --- /dev/null +++ b/code/controllers/subsystems/processing/chemistry.dm @@ -0,0 +1,45 @@ +PROCESSING_SUBSYSTEM_DEF(chemistry) + name = "Chemistry" + wait = 20 + flags = SS_BACKGROUND|SS_POST_FIRE_TIMING + init_order = INIT_ORDER_CHEMISTRY + var/list/chemical_reactions = list() + var/list/chemical_reactions_by_reagent = list() + var/list/chemical_reagents = list() + +/datum/controller/subsystem/processing/chemistry/Recover() + chemical_reactions = SSchemistry.chemical_reactions + chemical_reagents = SSchemistry.chemical_reagents + +/datum/controller/subsystem/processing/chemistry/Initialize() + initialize_chemical_reactions() + initialize_chemical_reagents() + +//Chemical Reactions - Initialises all /datum/chemical_reaction into a list +// It is filtered into multiple lists within a list. +// For example: +// chemical_reaction_list["phoron"] is a list of all reactions relating to phoron +// Note that entries in the list are NOT duplicated. So if a reaction pertains to +// more than one chemical it will still only appear in only one of the sublists. +/datum/controller/subsystem/processing/chemistry/proc/initialize_chemical_reactions() + var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction + chemical_reactions = list() + chemical_reactions_by_reagent = list() + + for(var/path in paths) + var/datum/chemical_reaction/D = new path + chemical_reactions += D + if(D.required_reagents && D.required_reagents.len) + var/reagent_id = D.required_reagents[1] + LAZYINITLIST(chemical_reactions_by_reagent[reagent_id]) + chemical_reactions_by_reagent[reagent_id] += D + +//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id +/datum/controller/subsystem/processing/chemistry/proc/initialize_chemical_reagents() + var/paths = typesof(/datum/reagent) - /datum/reagent + chemical_reagents = list() + for(var/path in paths) + var/datum/reagent/D = new path() + if(!D.name) + continue + chemical_reagents[D.id] = D diff --git a/code/controllers/subsystems/timer.dm b/code/controllers/subsystems/timer.dm index 3cd4ffe6ba..b743e8ff9e 100644 --- a/code/controllers/subsystems/timer.dm +++ b/code/controllers/subsystems/timer.dm @@ -6,6 +6,7 @@ SUBSYSTEM_DEF(timer) name = "Timer" wait = 1 //SS_TICKER subsystem, so wait is in ticks + priority = FIRE_PRIORITY_TIMERS //VOREStation Emergency Edit init_order = INIT_ORDER_TIMER flags = SS_TICKER|SS_NO_INIT diff --git a/code/controllers/subsystems/transcore_vr.dm b/code/controllers/subsystems/transcore_vr.dm index 044734e7a6..a248360bef 100644 --- a/code/controllers/subsystems/transcore_vr.dm +++ b/code/controllers/subsystems/transcore_vr.dm @@ -56,7 +56,7 @@ SUBSYSTEM_DEF(transcore) implants -= imp continue - //In a human + //In a human BITSET(H.hud_updateflag, BACKUP_HUD) if(H == imp.imp_in && H.mind && H.stat < DEAD) @@ -93,6 +93,7 @@ SUBSYSTEM_DEF(transcore) else if(curr_MR.dead_state != MR_DEAD) //First time switching to dead notify(name) + curr_MR.last_notification = world.time curr_MR.dead_state = MR_DEAD if(MC_TICK_CHECK) @@ -159,9 +160,12 @@ SUBSYSTEM_DEF(transcore) return 1 // Send a past-due notification to the medical radio channel. -/datum/controller/subsystem/transcore/proc/notify(var/name) +/datum/controller/subsystem/transcore/proc/notify(var/name, var/repeated = FALSE) ASSERT(name) - global_announcer.autosay("[name] is past-due for a mind backup. This will be the only notification.", "TransCore Oversight", "Medical") + if(repeated) + global_announcer.autosay("This is a repeat notification that [name] is past-due for a mind backup.", "TransCore Oversight", "Medical") + else + global_announcer.autosay("[name] is past-due for a mind backup.", "TransCore Oversight", "Medical") // Called from mind_record to add itself to the transcore. /datum/controller/subsystem/transcore/proc/add_backup(var/datum/transhuman/mind_record/MR) diff --git a/code/controllers/subsystems/xenoarch.dm b/code/controllers/subsystems/xenoarch.dm index 7f3e292c1a..d863ad8269 100644 --- a/code/controllers/subsystems/xenoarch.dm +++ b/code/controllers/subsystems/xenoarch.dm @@ -31,7 +31,7 @@ SUBSYSTEM_DEF(xenoarch) /datum/controller/subsystem/xenoarch/proc/SetupXenoarch() for(var/turf/simulated/mineral/M in turfs) - if(!M.density) + if(!M.density || M.z in using_map.xenoarch_exempt_levels) continue if(isnull(M.geologic_data)) diff --git a/code/controllers/verbs.dm b/code/controllers/verbs.dm index 4153900657..7e2e1a42e3 100644 --- a/code/controllers/verbs.dm +++ b/code/controllers/verbs.dm @@ -102,8 +102,6 @@ options["LEGACY: gas_data"] = gas_data options["LEGACY: plant_controller"] = plant_controller options["LEGACY: alarm_manager"] = alarm_manager - options["LEGACY: nanomanager"] = GLOB.nanomanager - options["LEGACY: chemistryProcess"] = chemistryProcess var/pick = input(mob, "Choose a controller to debug/view variables of.", "VV controller:") as null|anything in options if(!pick) diff --git a/code/datums/datum.dm b/code/datums/datum.dm index 2ec99d81d4..61eb4c6953 100644 --- a/code/datums/datum.dm +++ b/code/datums/datum.dm @@ -31,5 +31,5 @@ weakref = null // Clear this reference to ensure it's kept for as brief duration as possible. tag = null - GLOB.nanomanager.close_uis(src) + SSnanoui.close_uis(src) return QDEL_HINT_QUEUE diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index d2f99a347b..541ba77194 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -188,9 +188,28 @@ return 0 */ //VOREStation Removal End //VOREStation Edit Start - if(!local || (destination.z in using_map.player_levels)) //VOREStation Edit + var/obstructed = 0 + var/turf/dest_turf = get_turf(destination) + if(local && !(dest_turf.z in using_map.player_levels)) + if(istype(teleatom, /mob/living)) + to_chat(teleatom, "The portal refuses to carry you that far away!") + return 0 + else if(istype(destination.loc, /obj/belly)) + var/obj/belly/destination_belly = destination.loc + var/mob/living/telenommer = destination_belly.owner + if(istype(telenommer)) + if(!isliving(teleatom)) + return 1 + else + var/mob/living/telemob = teleatom + if(telemob.can_be_drop_prey && telenommer.can_be_drop_pred) + return 1 + obstructed = 1 + else if(!isturf(destination.loc) || !destination.x || !destination.y || !destination.z) //If we're inside something or outside universe + obstructed = 1 + to_chat(teleatom, "Something is blocking way on the other side!") + if(obstructed) + return 0 + else return 1 - if(istype(teleatom, /mob/living)) - to_chat(teleatom, "The portal refuses to carry you that far away!") - return 0 //VOREStation Edit End \ No newline at end of file diff --git a/code/datums/helper_datums/teleport_vr.dm b/code/datums/helper_datums/teleport_vr.dm index eba2570c18..4075bc70f0 100644 --- a/code/datums/helper_datums/teleport_vr.dm +++ b/code/datums/helper_datums/teleport_vr.dm @@ -1,12 +1,8 @@ /datum/teleport/proc/try_televore() //Destination is in a belly - if(isbelly(destination.loc) && isliving(teleatom)) - var/mob/living/L = teleatom + if(isbelly(destination.loc)) var/obj/belly/B = destination.loc - - if(!L.can_be_drop_prey) //Overloading this as a pref for 'want to be unexpectedly eaten' - return FALSE - + teleatom.forceMove(get_turf(B)) //So we can splash the sound and sparks and everything. playSpecials(destination,effectout,soundout) teleatom.forceMove(B) @@ -14,4 +10,3 @@ //No fun! return FALSE - \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index fdca613460..67cf23a3cb 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -85,7 +85,7 @@ current.verbs -= /datum/changeling/proc/EvolutionMenu current.mind = null - GLOB.nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user + SSnanoui.user_transferred(current, new_character) // transfer active NanoUI instances to new user if(new_character.mind) //remove any mind currently in our new body's mind variable new_character.mind.current = null diff --git a/code/datums/observation/destroyed.dm b/code/datums/observation/destroyed.dm index ff8778645c..650909f86d 100644 --- a/code/datums/observation/destroyed.dm +++ b/code/datums/observation/destroyed.dm @@ -10,5 +10,6 @@ name = "Destroyed" /datum/Destroy() - GLOB.destroyed_event.raise_event(src) + if(GLOB.destroyed_event) + GLOB.destroyed_event.raise_event(src) . = ..() diff --git a/code/datums/wires/radio.dm b/code/datums/wires/radio.dm index dcd708c5f6..d059a0b091 100644 --- a/code/datums/wires/radio.dm +++ b/code/datums/wires/radio.dm @@ -24,7 +24,7 @@ var/const/WIRE_TRANSMIT = 4 if(WIRE_TRANSMIT) R.broadcasting = !R.broadcasting && !IsIndexCut(WIRE_SIGNAL) - GLOB.nanomanager.update_uis(holder) + SSnanoui.update_uis(holder) /datum/wires/radio/UpdateCut(var/index, var/mended) var/obj/item/device/radio/R = holder @@ -38,4 +38,4 @@ var/const/WIRE_TRANSMIT = 4 if(WIRE_TRANSMIT) R.broadcasting = mended && !IsIndexCut(WIRE_SIGNAL) - GLOB.nanomanager.update_uis(holder) + SSnanoui.update_uis(holder) diff --git a/code/datums/wires/seedstorage.dm b/code/datums/wires/seedstorage.dm index e21bbb9faf..8268d936b0 100644 --- a/code/datums/wires/seedstorage.dm +++ b/code/datums/wires/seedstorage.dm @@ -10,10 +10,6 @@ /datum/wires/seedstorage/CanUse(var/mob/living/L) var/obj/machinery/seed_storage/V = holder - if(!istype(L, /mob/living/silicon)) - if(V.seconds_electrified) - if(V.shock(L, 100)) - return 0 if(V.panel_open) return 1 return 0 diff --git a/code/datums/wires/smartfridge.dm b/code/datums/wires/smartfridge.dm index b611497e79..15f10cd800 100644 --- a/code/datums/wires/smartfridge.dm +++ b/code/datums/wires/smartfridge.dm @@ -12,10 +12,6 @@ var/const/SMARTFRIDGE_WIRE_IDSCAN = 4 /datum/wires/smartfridge/CanUse(var/mob/living/L) var/obj/machinery/smartfridge/S = holder - if(!istype(L, /mob/living/silicon)) - if(S.seconds_electrified) - if(S.shock(L, 100)) - return 0 if(S.panel_open) return 1 return 0 diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm index 6715669fc1..bad3a0078b 100644 --- a/code/datums/wires/vending.dm +++ b/code/datums/wires/vending.dm @@ -9,10 +9,6 @@ var/const/VENDING_WIRE_IDSCAN = 8 /datum/wires/vending/CanUse(var/mob/living/L) var/obj/machinery/vending/V = holder - if(!istype(L, /mob/living/silicon)) - if(V.seconds_electrified) - if(V.shock(L, 100)) - return 0 if(V.panel_open) return 1 return 0 @@ -43,7 +39,7 @@ var/const/VENDING_WIRE_IDSCAN = 8 if(VENDING_WIRE_THROW) V.shoot_inventory = !mended if(VENDING_WIRE_CONTRABAND) - V.categories &= ~CAT_HIDDEN + V.categories &= ~CAT_HIDDEN if(VENDING_WIRE_ELECTRIFY) if(mended) V.seconds_electrified = 0 diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 493d5ccd38..8d31ecb9f4 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -555,6 +555,91 @@ rating = 3 matter = list(DEFAULT_WALL_MATERIAL = 80) +// Rating 4 - Anomaly + +/obj/item/weapon/stock_parts/capacitor/hyper + name = "hyper capacitor" + desc = "A hyper-capacity capacitor used in the construction of a variety of devices." + icon_state = "capacitor_hyper" + origin_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 80, MAT_GLASS = 40) + +/obj/item/weapon/stock_parts/scanning_module/hyper + name = "quantum scanning module" + desc = "A compact, near-perfect resolution quantum scanning module used in the construction of certain devices." + icon_state = "scan_module_hyper" + origin_tech = list(TECH_MAGNET = 6, TECH_BLUESPACE = 1, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 100,"glass" = 40) + +/obj/item/weapon/stock_parts/manipulator/hyper + name = "planck-manipulator" + desc = "A miniscule manipulator used in the construction of certain devices." + icon_state = "hyper_mani" + origin_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 30) + +/obj/item/weapon/stock_parts/micro_laser/hyper + name = "hyper-power micro-laser" + icon_state = "hyper_micro_laser" + desc = "A tiny laser used in certain devices." + origin_tech = list(TECH_MAGNET = 6, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 30, MAT_GLASS = 40) + +/obj/item/weapon/stock_parts/matter_bin/hyper + name = "hyper matter bin" + desc = "A container for holding compressed matter awaiting re-construction." + icon_state = "hyper_matter_bin" + origin_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 1) + rating = 4 + matter = list(DEFAULT_WALL_MATERIAL = 100) + +// Rating 5 - Precursor + +/obj/item/weapon/stock_parts/capacitor/omni + name = "omni-capacitor" + desc = "A capacitor of immense capacity used in the construction of a variety of devices." + icon_state = "capacitor_omni" + origin_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 80, MAT_GLASS = 40) + +/obj/item/weapon/stock_parts/scanning_module/omni + name = "omni-scanning module" + desc = "A compact, perfect resolution temporospatial scanning module used in the construction of certain devices." + icon_state = "scan_module_omni" + origin_tech = list(TECH_MAGNET = 7, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 100,"glass" = 40) + +/obj/item/weapon/stock_parts/manipulator/omni + name = "omni-manipulator" + desc = "A strange, infinitesimal manipulator used in the construction of certain devices." + icon_state = "omni_mani" + origin_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 30) + +/obj/item/weapon/stock_parts/micro_laser/omni + name = "omni-power micro-laser" + icon_state = "omni_micro_laser" + desc = "A strange laser used in certain devices." + origin_tech = list(TECH_MAGNET = 7, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 30, MAT_GLASS = 40) + +/obj/item/weapon/stock_parts/matter_bin/omni + name = "omni-matter bin" + desc = "A strange container for holding compressed matter awaiting re-construction." + icon_state = "omni_matter_bin" + origin_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 1) + rating = 5 + matter = list(DEFAULT_WALL_MATERIAL = 100) + + // Subspace stock parts /obj/item/weapon/stock_parts/subspace/ansible diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index a48c7e8988..23b888efd1 100755 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -979,6 +979,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station icon_state = "entry_D2" base_turf = /turf/space +/area/hallway/secondary/entry/D2/arrivals + name = "\improper Shuttle Dock Hallway - Dock Two" + icon_state = "entry_D2" + base_turf = /turf/space + requires_power = 0 + /area/hallway/secondary/entry/D3 name = "\improper Shuttle Dock Hallway - Dock Three" icon_state = "entry_D3" diff --git a/code/game/area/Space Station 13 areas_vr.dm b/code/game/area/Space Station 13 areas_vr.dm index c7d8b08398..ecca320658 100644 --- a/code/game/area/Space Station 13 areas_vr.dm +++ b/code/game/area/Space Station 13 areas_vr.dm @@ -79,6 +79,9 @@ /area/security/nuke_storage flags = BLUE_SHIELDED +/area/supply + flags = BLUE_SHIELDED + // Add rad shielding to maintenance and construction sites /area/vacant flags = RAD_SHIELDED diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 623ccc11a3..998b712828 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -270,7 +270,7 @@ I.loc = src src.disk = I user << "You insert [I]." - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src return else ..() @@ -428,7 +428,7 @@ data["beakerVolume"] += R.volume // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -465,7 +465,7 @@ irradiating = src.radiation_duration var/lock_state = src.connected.locked src.connected.locked = 1//lock it - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src sleep(10*src.radiation_duration) // sleep for radiation_duration seconds @@ -566,7 +566,7 @@ irradiating = src.radiation_duration var/lock_state = src.connected.locked src.connected.locked = 1//lock it - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src sleep(10*src.radiation_duration) // sleep for radiation_duration seconds @@ -624,7 +624,7 @@ irradiating = src.radiation_duration var/lock_state = src.connected.locked src.connected.locked = 1 //lock it - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src sleep(10*src.radiation_duration) // sleep for radiation_duration seconds @@ -751,7 +751,7 @@ irradiating = 2 var/lock_state = src.connected.locked src.connected.locked = 1//lock it - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src sleep(10*2) // sleep for 2 seconds diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 49a4b342ef..561a72edb3 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -109,7 +109,7 @@ break data["stasis"] = stasis_level_name - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "sleeper.tmpl", "Sleeper UI", 600, 600, state = state) ui.set_initial_data(data) @@ -170,6 +170,7 @@ ..() beaker = new /obj/item/weapon/reagent_containers/glass/beaker/large(src) component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/manipulator(src) component_parts += new /obj/item/weapon/stock_parts/scanning_module(src) component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(src) @@ -179,7 +180,49 @@ component_parts += new /obj/item/weapon/reagent_containers/syringe(src) component_parts += new /obj/item/stack/material/glass/reinforced(src, 2) - RefreshParts() + RefreshParts(0) + +/obj/machinery/sleeper/RefreshParts(var/limited = 1) + var/man_rating = 0 + var/cap_rating = 0 + + available_chemicals = initial(available_chemicals) + idle_power_usage = initial(idle_power_usage) + active_power_usage = initial(active_power_usage) + + for(var/obj/item/weapon/stock_parts/P in component_parts) + if(istype(P, /obj/item/weapon/stock_parts/capacitor)) + cap_rating += P.rating + + cap_rating = max(1, round(cap_rating / 2)) + + idle_power_usage /= cap_rating + active_power_usage /= cap_rating + + if(!limited) + for(var/obj/item/weapon/stock_parts/P in component_parts) + if(istype(P, /obj/item/weapon/stock_parts/manipulator)) + man_rating += P.rating - 1 + + var/new_chemicals = list() + + if(man_rating >= 4) // Alien tech. + var/reag_ID = pickweight( + "healing_nanites" = 10, + "shredding_nanites" = 5, + "irradiated_nanites" = 5, + "neurophage_nanites" = 2 + ) + new_chemicals[reag_ID] = "Nanite" + if(man_rating >= 3) // Anomalous tech. + new_chemicals["immunosuprizine"] = "Immunosuprizine" + if(man_rating >= 2) // Tier 3. + new_chemicals["spaceacillin"] = "Spaceacillin" + if(man_rating >= 1) // Tier 2. + new_chemicals["leporazine"] = "Leporazine" + + available_chemicals += new_chemicals + return /obj/machinery/sleeper/Initialize() . = ..() @@ -351,3 +394,7 @@ desc = "A limited functionality sleeper, all it can do is put patients into stasis. It lacks the medication and configuration of the larger units." icon_state = "sleeper" stasis_level = 100 //Just one setting + +/obj/machinery/sleeper/survival_pod/Initialize() + ..() + RefreshParts() diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 2062f92db4..c101202b38 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -389,7 +389,7 @@ occupantData = attempt_vr(scanner,"get_occupant_data_vr",list(occupantData,H)) //VOREStation Insert data["occupant"] = occupantData - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 800) ui.set_initial_data(data) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 1ce64f4aed..e74174d921 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -497,7 +497,7 @@ if(!(locked && !remote_connection) || remote_access || issilicon(user)) populate_controls(data) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "air_alarm.tmpl", name, 325, 625, master_ui = master_ui, state = state) ui.set_initial_data(data) diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index 839470f356..c18d2b9e93 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -117,7 +117,7 @@ obj/machinery/computer/general_air_control/Destroy() data["sensors"] = sensors_ui - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "atmo_control.tmpl", name, 525, 600) ui.set_initial_data(data) @@ -174,7 +174,7 @@ obj/machinery/computer/general_air_control/Destroy() data["input_flow_setting"] = round(input_flow_setting, 0.1) data["pressure_setting"] = pressure_setting - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "atmo_control.tmpl", name, 660, 500) ui.set_initial_data(data) @@ -284,7 +284,7 @@ obj/machinery/computer/general_air_control/Destroy() data["input_flow_setting"] = round(input_flow_setting, 0.1) data["pressure_setting"] = pressure_setting - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500) ui.set_initial_data(data) @@ -416,7 +416,7 @@ obj/machinery/computer/general_air_control/Destroy() else data["device_info"] = null - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "atmo_control.tmpl", name, 650, 500) ui.set_initial_data(data) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index 21d3e81591..ed23884103 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -260,7 +260,7 @@ update_flag ..() - GLOB.nanomanager.update_uis(src) // Update all NanoUIs attached to src + SSnanoui.update_uis(src) // Update all NanoUIs attached to src /obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob) return src.attack_hand(user) @@ -288,7 +288,7 @@ update_flag data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure())) // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/atmoalter/pump.dm b/code/game/machinery/atmoalter/pump.dm index 7e2c786734..758c2a57cb 100644 --- a/code/game/machinery/atmoalter/pump.dm +++ b/code/game/machinery/atmoalter/pump.dm @@ -138,7 +138,7 @@ if (holding) data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0)) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "portpump.tmpl", "Portable Pump", 480, 410, state = physical_state) ui.set_initial_data(data) diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index 0a47342086..55afd7f35f 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -114,7 +114,7 @@ if (holding) data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure() > 0 ? holding.air_contents.return_pressure() : 0)) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "portscrubber.tmpl", "Portable Scrubber", 480, 400, state = physical_state) ui.set_initial_data(data) @@ -195,7 +195,7 @@ update_use_power(new_use_power) if(!on) return - + var/power_draw = -1 var/datum/gas_mixture/environment = loc.return_air() diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 0ce85959ef..c04760b4ef 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -304,7 +304,7 @@ storage_capacity[DEFAULT_WALL_MATERIAL] = mb_rating * 25000 storage_capacity["glass"] = mb_rating * 12500 build_time = 50 / man_rating - mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.8. Maximum rating of parts is 3 + mat_efficiency = 1.1 - man_rating * 0.1// Normally, price is 1.25 the amount of material, so this shouldn't go higher than 0.6. Maximum rating of parts is 5 /obj/machinery/autolathe/dismantle() for(var/mat in stored_material) diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm index cc982ce207..f60fcabbfa 100644 --- a/code/game/machinery/bioprinter.dm +++ b/code/game/machinery/bioprinter.dm @@ -19,6 +19,7 @@ var/base_print_delay = 100 // For Adminbus reasons var/printing var/loaded_dna //Blood sample for DNA hashing. + var/malfunctioning = FALSE // May cause rejection, or the printing of some alien limb instead! // These should be subtypes of /obj/item/organ // Costs roughly 20u Phoron (1 sheet) per internal organ, limbs are 60u for limb and extremity @@ -76,10 +77,19 @@ /obj/machinery/organ_printer/RefreshParts() // Print Delay updating print_delay = base_print_delay + var/manip_rating = 0 for(var/obj/item/weapon/stock_parts/manipulator/manip in component_parts) + manip_rating += manip.rating print_delay -= (manip.rating-1)*10 print_delay = max(0,print_delay) + manip_rating = round(manip_rating / 2) + + if(manip_rating >= 5) + malfunctioning = TRUE + else + malfunctioning = initial(malfunctioning) + . = ..() /obj/machinery/organ_printer/attack_hand(mob/user) @@ -182,7 +192,17 @@ O.set_dna(C.dna) O.species = C.species - if(istype(O, /obj/item/organ/external)) + var/malfunctioned = FALSE + + if(malfunctioning && prob(30)) // Alien Tech is a hell of a drug. + malfunctioned = TRUE + var/possible_species = list(SPECIES_HUMAN, SPECIES_VOX, SPECIES_SKRELL, SPECIES_ZADDAT, SPECIES_UNATHI, SPECIES_GOLEM, SPECIES_SHADOW) + var/new_species = pick(possible_species) + if(!all_species[new_species]) + new_species = SPECIES_HUMAN + O.species = all_species[new_species] + + if(istype(O, /obj/item/organ/external) && !malfunctioned) var/obj/item/organ/external/E = O E.sync_colour_to_human(C) diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index ef1beeaac0..d81070e1f2 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -55,7 +55,7 @@ data["table"] = table data["victim"] = victim_ui - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "operating.tmpl", src.name, 380, 400) ui.set_initial_data(data) @@ -69,4 +69,4 @@ usr.set_machine(src) src.add_fingerprint(usr) - GLOB.nanomanager.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) \ No newline at end of file diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index a1f9f227fc..00d1623e5b 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -140,7 +140,7 @@ data["enemyHP"] = enemy_hp data["gameOver"] = gameover - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "arcade_battle.tmpl", src.name, 400, 300) ui.set_initial_data(data) @@ -202,7 +202,7 @@ emagged = 0 src.add_fingerprint(usr) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) return /obj/machinery/computer/arcade/battle/proc/arcade_action() diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index d757ae777d..e2b3fc4638 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -37,7 +37,7 @@ var/global/list/minor_air_alarms = list() data["priority_alarms"] = major_alarms data["minor_alarms"] = minor_alarms - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_alert.tmpl", src.name, 500, 500) ui.set_initial_data(data) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index c05a886046..4ac34cf157 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -49,7 +49,7 @@ switch_to_camera(user, current_camera) data["map_levels"] = using_map.get_map_levels(src.z) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "sec_camera.tmpl", "Camera Console", 900, 800) @@ -152,7 +152,7 @@ /obj/machinery/computer/security/process() if(cache_id != camera_repository.camera_cache_id) cache_id = camera_repository.camera_cache_id - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C) var/list/shared_networks = src.network & C.network diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 9f43bd077e..42a418c7ad 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -68,7 +68,7 @@ id_card.forceMove(src) modify = id_card - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) attack_hand(user) /obj/machinery/computer/card/attack_ai(var/mob/user as mob) @@ -139,7 +139,7 @@ data["regions"] = regions - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "identification_computer.tmpl", src.name, 600, 700) ui.set_initial_data(data) @@ -235,7 +235,7 @@ modify.registered_name = temp_name else src.visible_message("[src] buzzes rudely.") - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) if ("account") if (is_authenticated()) @@ -243,7 +243,7 @@ if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf))) var/account_num = text2num(href_list["account"]) modify.associated_account_number = account_num - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) if ("mode") mode = text2num(href_list["mode_target"]) @@ -253,7 +253,7 @@ printing = 1 spawn(50) printing = null - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) var/obj/item/weapon/paper/P = new(loc) if (mode) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 44a1f69945..96e6f6b5f9 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -146,7 +146,7 @@ data["diskette"] = diskette data["temp"] = temp - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "cloning.tmpl", src.name, 400, 450) ui.set_initial_data(data) @@ -284,7 +284,7 @@ temp = "" scantemp = "" - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) add_fingerprint(usr) /obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob) diff --git a/code/game/machinery/computer/guestpass.dm b/code/game/machinery/computer/guestpass.dm index eaea426c07..a1fd7199b2 100644 --- a/code/game/machinery/computer/guestpass.dm +++ b/code/game/machinery/computer/guestpass.dm @@ -104,7 +104,7 @@ if(!giver && user.unEquip(I)) I.forceMove(src) giver = I - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) else if(giver) user << "There is already ID card inside." return @@ -150,7 +150,7 @@ data["log"] = internal_log data["uid"] = uid - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "guest_pass.tmpl", src.name, 400, 520) ui.set_initial_data(data) @@ -242,4 +242,4 @@ usr << "Cannot issue pass without issuing ID." src.add_fingerprint(usr) - GLOB.nanomanager.update_uis(src) \ No newline at end of file + SSnanoui.update_uis(src) \ No newline at end of file diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index c6c2c94a9e..3e06e19e52 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -19,7 +19,7 @@ data["is_ai"] = issilicon(user) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "robot_control.tmpl", "Robotic Control Console", 400, 500) ui.set_initial_data(data) diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm index f4a68b12d5..6170b302a2 100644 --- a/code/game/machinery/computer/supply.dm +++ b/code/game/machinery/computer/supply.dm @@ -171,7 +171,7 @@ data["contraband"] = can_order_contraband || (authorization & SUP_CONTRABAND) // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/computer/timeclock_vr.dm b/code/game/machinery/computer/timeclock_vr.dm index 8e49a138e3..caeecb2e27 100644 --- a/code/game/machinery/computer/timeclock_vr.dm +++ b/code/game/machinery/computer/timeclock_vr.dm @@ -48,7 +48,7 @@ if(!card && user.unEquip(I)) I.forceMove(src) card = I - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) update_icon() else if(card) to_chat(user, "There is already ID card inside.") @@ -88,7 +88,7 @@ // if(job && job.timeoff_factor < 0) // Currently are Off Duty, so gotta lookup what on-duty jobs are open // data["job_choices"] = getOpenOnDutyJobs(user, job.department) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "timeclock_vr.tmpl", capitalize(src.name), 500, 520) ui.set_initial_data(data) diff --git a/code/game/machinery/computer3/lapvend.dm b/code/game/machinery/computer3/lapvend.dm index 79f297157c..7c4e458832 100644 --- a/code/game/machinery/computer3/lapvend.dm +++ b/code/game/machinery/computer3/lapvend.dm @@ -34,11 +34,11 @@ if(vendmode == 1 && I) scan_id(I, W) vendmode = 0 - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(vendmode == 2 && I) if(reimburse_id(I, W)) vendmode = 0 - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(vendmode == 0) if(istype(W, /obj/item/device/laptop)) var/obj/item/device/laptop/L = W @@ -48,7 +48,7 @@ L.loc = src vendmode = 2 to_chat(user, "You slot your [L.name] into \The [src.name]") - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) else ..() @@ -77,7 +77,7 @@ data["power"] = power data["total"] = total() - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "laptop_vendor.tmpl", src.name, 480, 425) ui.set_initial_data(data) @@ -136,7 +136,7 @@ vendmode = 0 src.add_fingerprint(usr) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/lapvend/proc/vend() if(cardreader > 0) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 31942366a9..b4927f441c 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -141,7 +141,7 @@ data["beakerVolume"] += R.volume // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -205,7 +205,7 @@ var/mob/M = grab.affecting qdel(grab) put_mob(M) - + return /obj/machinery/atmospherics/unary/cryo_cell/MouseDrop_T(var/mob/target, var/mob/user) //Allows borgs to put people into cryo without external assistance diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index ec127a4599..cda908f800 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -513,6 +513,12 @@ //visible_message("\The [initial(name)] hums and hisses as it moves [to_despawn.real_name] into storage.", 3) visible_message("\The [initial(name)] [on_store_visible_message_1] [to_despawn.real_name] [on_store_visible_message_2].", 3) + //VOREStation Edit begin: Dont delete mobs-in-mobs + if(to_despawn.client && to_despawn.stat<2) + var/mob/observer/dead/newghost = to_despawn.ghostize() + newghost.timeofdeath = world.time + //VOREStation Edit end: Dont delete mobs-in-mobs + //This should guarantee that ghosts don't spawn. to_despawn.ckey = null diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 0dff930291..c31c8f650b 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -746,7 +746,7 @@ About the new airlock wires panel: data["commands"] = commands - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "door_control.tmpl", "Door Controls", 450, 350, state = state) ui.set_initial_data(data) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index c25bde5ed6..d276efef35 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -27,7 +27,7 @@ var/destroy_hits = 10 //How many strong hits it takes to destroy the door var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon - var/obj/item/stack/material/steel/repairing + var/repairing = 0 var/block_air_zones = 1 //If set, air zones cannot merge across the door even when it is opened. var/close_door_at = 0 //When to automatically close the door, if possible @@ -209,18 +209,18 @@ /obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob) src.add_fingerprint(user) - if (attempt_vr(src,"attackby_vr",list(I, user))) return - if(istype(I)) + if(attackby_vr(I, user)) //VOREStation begin: Fireproofing + return //VOREStation begin: Fireproofing if(istype(I, /obj/item/stack/material) && I.get_material_name() == src.get_material_name()) if(stat & BROKEN) - user << "It looks like \the [src] is pretty busted. It's going to need more than just patching up now." + to_chat(user, "It looks like \the [src] is pretty busted. It's going to need more than just patching up now.") return if(health >= maxhealth) - user << "Nothing to fix!" + to_chat(user, "Nothing to fix!") return if(!density) - user << "\The [src] must be closed before you can repair it." + to_chat(user, "\The [src] must be closed before you can repair it.") return //figure out how much metal we need @@ -228,44 +228,45 @@ amount_needed = (round(amount_needed) == amount_needed)? amount_needed : round(amount_needed) + 1 //Why does BYOND not have a ceiling proc? var/obj/item/stack/stack = I - var/transfer - if (repairing) - transfer = stack.transfer_to(repairing, amount_needed - repairing.amount) - if (!transfer) - user << "You must weld or remove \the [repairing] from \the [src] before you can add anything else." + var/amount_given = amount_needed - repairing + var/mats_given = stack.get_amount() + if(repairing && amount_given <= 0) + to_chat(user, "You must weld or remove \the [get_material_name()] from \the [src] before you can add anything else.") else - repairing = stack.split(amount_needed) - if (repairing) - repairing.loc = src - transfer = repairing.amount - - if (transfer) - user << "You fit [transfer] [stack.singular_name]\s to damaged and broken parts on \the [src]." + if(mats_given >= amount_given) + if(stack.use(amount_given)) + repairing += amount_given + else + if(stack.use(mats_given)) + repairing += mats_given + amount_given = mats_given + if(amount_given) + to_chat(user, "You fit [amount_given] [stack.singular_name]\s to damaged and broken parts on \the [src].") return if(repairing && istype(I, /obj/item/weapon/weldingtool)) if(!density) - user << "\The [src] must be closed before you can repair it." + to_chat(user, "\The [src] must be closed before you can repair it.") return var/obj/item/weapon/weldingtool/welder = I if(welder.remove_fuel(0,user)) - user << "You start to fix dents and weld \the [repairing] into place." + to_chat(user, "You start to fix dents and weld \the [get_material_name()] into place.") playsound(src, welder.usesound, 50, 1) - if(do_after(user, (5 * repairing.amount) * welder.toolspeed) && welder && welder.isOn()) - user << "You finish repairing the damage to \the [src]." - health = between(health, health + repairing.amount*DOOR_REPAIR_AMOUNT, maxhealth) + if(do_after(user, (5 * repairing) * welder.toolspeed) && welder && welder.isOn()) + to_chat(user, "You finish repairing the damage to \the [src].") + health = between(health, health + repairing*DOOR_REPAIR_AMOUNT, maxhealth) update_icon() - qdel(repairing) - repairing = null + repairing = 0 return if(repairing && I.is_crowbar()) - user << "You remove \the [repairing]." + var/obj/item/stack/material/repairing_sheet = get_material().place_sheet(loc) + repairing_sheet.amount += repairing-1 + repairing = 0 + to_chat(user, "You remove \the [repairing_sheet].") playsound(src, I.usesound, 100, 1) - repairing.loc = user.loc - repairing = null return //psa to whoever coded this, there are plenty of objects that need to call attack() on doors without bludgeoning them. @@ -325,13 +326,13 @@ /obj/machinery/door/examine(mob/user) . = ..() if(src.health <= 0) - user << "\The [src] is broken!" + to_chat(user, "\The [src] is broken!") if(src.health < src.maxhealth / 4) - user << "\The [src] looks like it's about to break!" + to_chat(user, "\The [src] looks like it's about to break!") else if(src.health < src.maxhealth / 2) - user << "\The [src] looks seriously damaged!" + to_chat(user, "\The [src] looks seriously damaged!") else if(src.health < src.maxhealth * 3/4) - user << "\The [src] shows signs of damage!" + to_chat(user, "\The [src] shows signs of damage!") /obj/machinery/door/proc/set_broken() diff --git a/code/game/machinery/doors/door_vr.dm b/code/game/machinery/doors/door_vr.dm index 58d84e2d7c..024162bc35 100644 --- a/code/game/machinery/doors/door_vr.dm +++ b/code/game/machinery/doors/door_vr.dm @@ -3,7 +3,7 @@ D.fire_act(adj_air, adj_temp, adj_volume) /obj/machinery/door - var/obj/item/stack/material/plasteel/reinforcing //vorestation addition + var/reinforcing = 0 //vorestation addition /obj/machinery/door/firedoor heat_proof = 1 @@ -33,113 +33,68 @@ return ..() +// Returns true only if one of the actions unique to reinforcing is done, otherwise false and continuing normal attackby /obj/machinery/door/proc/attackby_vr(obj/item/I as obj, mob/user as mob) - if(istype(I, /obj/item/stack/material) && I.get_material_name() == "plasteel") // Add heat shielding if it isn't already. - if(!heat_proof) - var/obj/item/stack/stack = I - var/transfer - var/amount_needed = 2 - if(stat & BROKEN) - user << "It looks like \the [src] is pretty busted." - if (reinforcing) - transfer = stack.transfer_to(reinforcing, amount_needed - reinforcing.amount) - if (!transfer) - user << "You must weld or remove \the [reinforcing] from \the [src] before you can add anything else." - return 1 + if(istype(I, /obj/item/stack/material) && I.get_material_name() == "plasteel") + if(heat_proof) + to_chat(user, "\The [src] is already reinforced.") + return TRUE + if((stat & BROKEN) || (health < maxhealth)) + to_chat(user, "It looks like \the [src] broken. Repair it before reinforcing it.") + return TRUE + if(!density) + to_chat(user, "\The [src] must be closed before you can reinforce it.") + return TRUE + + var/amount_needed = 2 + + var/obj/item/stack/stack = I + var/amount_given = amount_needed - reinforcing + var/mats_given = stack.get_amount() + if(reinforcing && amount_given <= 0) + to_chat(user, "You must weld or remove \the plasteel from \the [src] before you can add anything else.") + else + if(mats_given >= amount_given) + if(stack.use(amount_given)) + reinforcing += amount_given else - reinforcing = stack.split(amount_needed) - if (reinforcing) - reinforcing.loc = src - transfer = reinforcing.amount - - if (transfer) - user << "You fit [transfer] [stack.singular_name]\s to \the [src]." - return 1 - - if(istype(I, /obj/item/stack/material) && I.get_material_name() == src.get_material_name()) - if(stat & BROKEN) - if(health >= maxhealth && destroy_hits >= 10) - user << "The [src] is about as shored up as it's going to get." - return 1 - if(!density) - user << "\The [src] must be closed before you can repair it." - return 1 - - //figure out how much metal we need - var/amount_needed = (maxhealth - health) / DOOR_REPAIR_AMOUNT - if (destroy_hits < 10) - amount_needed += (20*(10 - destroy_hits) / DOOR_REPAIR_AMOUNT) - amount_needed = (round(amount_needed) == amount_needed)? amount_needed : round(amount_needed) + 1 //Why does BYOND not have a ceiling proc? - - var/obj/item/stack/stack = I - var/transfer - if (repairing) - transfer = stack.transfer_to(repairing, amount_needed - repairing.amount) - if (!transfer) - user << "You must weld or remove \the [repairing] from \the [src] before you can add anything else." - else - repairing = stack.split(amount_needed) - if (repairing) - repairing.loc = src - transfer = repairing.amount - - if (transfer) - user << "\The [src] is completely broken inside, but you manage to fit [transfer] [stack.singular_name]\s to shore it up." - - return 1 - - return 0 + if(stack.use(mats_given)) + reinforcing += mats_given + amount_given = mats_given + if(amount_given) + to_chat(user, "You fit [amount_given] [stack.singular_name]\s on \the [src].") + return TRUE if(reinforcing && istype(I, /obj/item/weapon/weldingtool)) - var/amount_needed = 2 if(!density) - user << "\The [src] must be closed before you can repair it." - return 1 - if (reinforcing.amount < amount_needed) - user << "You need [amount_needed] [reinforcing.singular_name]\s to reinforce \the [src]." - return 1 + to_chat(user, "\The [src] must be closed before you can reinforce it.") + return TRUE + + if(reinforcing < 2) + to_chat(user, "You will need more plasteel to reinforce \the [src].") + return TRUE + var/obj/item/weapon/weldingtool/welder = I if(welder.remove_fuel(0,user)) - user << "You start to weld \the [reinforcing] into place." - playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, 5 * reinforcing.amount) && welder && welder.isOn()) - user << "You finish reinforcing \the [src]." + to_chat(user, "You start weld \the plasteel into place.") + playsound(src, welder.usesound, 50, 1) + if(do_after(user, 10 * welder.toolspeed) && welder && welder.isOn()) + to_chat(user, "You finish reinforcing \the [src].") heat_proof = 1 update_icon() - qdel(reinforcing) - reinforcing = null - return 1 - - if(repairing && istype(I, /obj/item/weapon/weldingtool) && (stat & BROKEN)) - if(!density) - user << "\The [src] must be closed before you can shore it up." - return 1 - - var/obj/item/weapon/weldingtool/welder = I - if(welder.remove_fuel(0,user)) - user << "You start to weld \the [repairing] into place." - playsound(src, 'sound/items/Welder.ogg', 100, 1) - if(do_after(user, 5 * repairing.amount) && welder && welder.isOn()) - user << "You finish shoring up \the [src]. It'll hold for at least a little while." - var/damagerepaired = repairing.amount*DOOR_REPAIR_AMOUNT - if (destroy_hits < 10) - var/severedamage = 10 - destroy_hits - destroy_hits = between(destroy_hits, destroy_hits + (damagerepaired)/20, 10) - damagerepaired -= 20 * severedamage - health = between(health, health + damagerepaired, maxhealth) - update_icon() - qdel(repairing) - repairing = null - return 1 + reinforcing = 0 + return TRUE if(reinforcing && I.is_crowbar()) - user << "You remove \the [reinforcing]." - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - reinforcing.loc = user.loc - reinforcing = null - return 1 - return 0 + var/obj/item/stack/material/plasteel/reinforcing_sheet = new /obj/item/stack/material/plasteel(src.loc) + reinforcing_sheet.amount = reinforcing + reinforcing = 0 + to_chat(user, "You remove \the [reinforcing_sheet].") + playsound(src, I.usesound, 100, 1) + return TRUE + + return FALSE /obj/machinery/door/blast/regular/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume) return // blast doors are immune to fire completely. diff --git a/code/game/machinery/embedded_controller/airlock_controllers.dm b/code/game/machinery/embedded_controller/airlock_controllers.dm index 11893fa5ca..0f8b797289 100644 --- a/code/game/machinery/embedded_controller/airlock_controllers.dm +++ b/code/game/machinery/embedded_controller/airlock_controllers.dm @@ -33,7 +33,7 @@ "secure" = program.memory["secure"] ) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290) @@ -89,7 +89,7 @@ "processing" = program.memory["processing"], ) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290) @@ -153,7 +153,7 @@ "processing" = program.memory["processing"] ) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220) diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller.dm b/code/game/machinery/embedded_controller/airlock_docking_controller.dm index fa7d5dfa04..e88b046c10 100644 --- a/code/game/machinery/embedded_controller/airlock_docking_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_docking_controller.dm @@ -24,7 +24,7 @@ "override_enabled" = docking_program.override_enabled, ) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290) diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm index bdce39de14..5614d0be63 100644 --- a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm +++ b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm @@ -35,7 +35,7 @@ "airlocks" = airlocks, ) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "multi_docking_console.tmpl", name, 470, 290) @@ -73,7 +73,7 @@ "override_enabled" = airlock_program.override_enabled, ) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "docking_airlock_console.tmpl", name, 470, 290) diff --git a/code/game/machinery/embedded_controller/simple_docking_controller.dm b/code/game/machinery/embedded_controller/simple_docking_controller.dm index 8e5c941bbf..14b27b2512 100644 --- a/code/game/machinery/embedded_controller/simple_docking_controller.dm +++ b/code/game/machinery/embedded_controller/simple_docking_controller.dm @@ -19,7 +19,7 @@ "door_lock" = docking_program.memory["door_status"]["lock"], ) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "simple_docking_console.tmpl", name, 470, 290) diff --git a/code/game/machinery/exonet_node.dm b/code/game/machinery/exonet_node.dm index fee3fbd0ec..fbfbc04abf 100644 --- a/code/game/machinery/exonet_node.dm +++ b/code/game/machinery/exonet_node.dm @@ -123,7 +123,7 @@ // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -167,7 +167,7 @@ log_game(msg) update_icon() - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) add_fingerprint(usr) // Proc: get_exonet_node() diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index b952f678bb..475f22a7d7 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -265,7 +265,7 @@ data["tracks"] = nano_tracks // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "jukebox.tmpl", title, 450, 600) ui.set_initial_data(data) diff --git a/code/game/machinery/oxygen_pump.dm b/code/game/machinery/oxygen_pump.dm index 0720b03b26..74cc399beb 100644 --- a/code/game/machinery/oxygen_pump.dm +++ b/code/game/machinery/oxygen_pump.dm @@ -202,7 +202,7 @@ // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/machinery/partslathe_vr.dm b/code/game/machinery/partslathe_vr.dm index 736474f453..d2d9079ab1 100644 --- a/code/game/machinery/partslathe_vr.dm +++ b/code/game/machinery/partslathe_vr.dm @@ -280,7 +280,7 @@ recipies_ui[++recipies_ui.len] = list("name" = R.name, "type" = "[T]") data["recipies"] = recipies_ui - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "partslathe.tmpl", "Parts Lathe UI", 500, 450) ui.set_initial_data(data) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index b044cc4c90..948ef595c8 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -327,7 +327,7 @@ settings[++settings.len] = list("category" = "Neutralize All Entities", "setting" = "check_all", "value" = check_all) data["settings"] = settings - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300) ui.set_initial_data(data) diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index c201264c3c..0b985d3047 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -44,7 +44,7 @@ obj/machinery/recharger if(E.self_recharge) to_chat(user, "Your gun has no recharge port.") return - if(!G.get_cell()) + if(!G.get_cell() && !istype(G, /obj/item/ammo_casing/nsfw_batt)) //VOREStation Edit: NSFW charging to_chat(user, "This device does not have a battery installed.") return diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 5c81cfe31f..a150aaf566 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -127,7 +127,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() data["msgVerified"] = msgVerified data["announceAuth"] = announceAuth - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "request_console.tmpl", "[department] Request Console", 520, 410) ui.set_initial_data(data) @@ -215,24 +215,23 @@ var/list/obj/machinery/requests_console/allConsoles = list() if(computer_deconstruction_screwdriver(user, O)) return if(istype(O, /obj/item/device/multitool)) - if(panel_open) - var/input = sanitize(input(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department)) - if(!input) - to_chat(usr, "No input found. Please hang up and try your call again.") - return - department = input - announcement.title = "[department] announcement" - announcement.newscast = 1 - - name = "[department] Requests Console" - allConsoles += src - if(departmentType & RC_ASSIST) - req_console_assistance |= department - if(departmentType & RC_SUPPLY) - req_console_supplies |= department - if(departmentType & RC_INFO) - req_console_information |= department + var/input = sanitize(input(usr, "What Department ID would you like to give this request console?", "Multitool-Request Console Interface", department)) + if(!input) + to_chat(usr, "No input found. Please hang up and try your call again.") return + department = input + announcement.title = "[department] announcement" + announcement.newscast = 1 + + name = "[department] Requests Console" + allConsoles += src + if(departmentType & RC_ASSIST) + req_console_assistance |= department + if(departmentType & RC_SUPPLY) + req_console_supplies |= department + if(departmentType & RC_INFO) + req_console_information |= department + return if(istype(O, /obj/item/weapon/card/id)) if(inoperable(MAINT)) return diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 1d3556b45e..302823c82d 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -14,7 +14,7 @@ id = "[rand(1000, 9999)]" ..() underlays.Cut() - underlays += image('icons/obj/stationobjs.dmi', icon_state = "telecomp-wires") + underlays += image('icons/obj/stationobjs_vr.dmi', icon_state = "telecomp-wires") //VOREStation Edit: different direction for wires to account for dirs return /obj/machinery/computer/teleporter/Initialize() diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index c1911d6a05..4319e11127 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -137,7 +137,7 @@ data["settings"] = settings - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "turret_control.tmpl", "Turret Controls", 500, 300) ui.set_initial_data(data) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 383e2844d7..d397c03cb1 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -169,7 +169,7 @@ vend(currently_vending, usr) return else if(handled) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) return // don't smack that machine with your 2 thalers if(I || istype(W, /obj/item/weapon/spacecash)) @@ -183,7 +183,7 @@ if(panel_open) overlays += image(icon, "[initial(icon_state)]-panel") - GLOB.nanomanager.update_uis(src) // Speaker switch is on the main UI, not wires UI + SSnanoui.update_uis(src) // Speaker switch is on the main UI, not wires UI return else if(istype(W, /obj/item/device/multitool) || W.is_wirecutter()) if(panel_open) @@ -195,7 +195,7 @@ coin = W categories |= CAT_COIN to_chat(user, "You insert \the [W] into \the [src].") - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) return else if(W.is_wrench()) playsound(src, W.usesound, 100, 1) @@ -399,7 +399,7 @@ else data["panel"] = 0 - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "vending_machine.tmpl", name, 440, 600) ui.set_initial_data(data) @@ -459,7 +459,7 @@ shut_up = !shut_up add_fingerprint(usr) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/vending/proc/vend(datum/stored_item/vending_product/R, mob/user) if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH @@ -470,7 +470,7 @@ vend_ready = 0 //One thing at a time!! status_message = "Vending..." status_error = 0 - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(R.category & CAT_COIN) if(!coin) @@ -512,7 +512,7 @@ status_error = 0 vend_ready = 1 currently_vending = null - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 @@ -568,7 +568,7 @@ if(has_logs) do_logging(R, user) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/vending/process() if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 825dfde5f5..02b5285d98 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -4,6 +4,10 @@ #define EQUIP_WEAPON 2 #define EQUIP_UTILITY 3 #define EQUIP_SPECIAL 4 +//VOREStation Addition begin: MICROMECHS +#define EQUIP_MICRO_UTILITY 5 +#define EQUIP_MICRO_WEAPON 6 +//VOREStation Addition end: MICROMECHS /obj/item/mecha_parts/mecha_equipment name = "mecha equipment" @@ -64,6 +68,14 @@ if(equip_type == EQUIP_SPECIAL) chassis.special_equipment -= src listclearnulls(chassis.special_equipment) + //VOREStation Addition begin: MICROMECHS + if(equip_type == EQUIP_MICRO_UTILITY) + chassis.micro_utility_equipment -= src + listclearnulls(chassis.micro_utility_equipment) + if(equip_type == EQUIP_MICRO_WEAPON) + chassis.micro_weapon_equipment -= src + listclearnulls(chassis.micro_weapon_equipment) + //VOREStation Addition end: MICROMECHS chassis.universal_equipment -= src chassis.equipment -= src listclearnulls(chassis.equipment) @@ -140,6 +152,12 @@ return 1 if(equip_type == EQUIP_SPECIAL && M.special_equipment.len < M.max_special_equip) return 1 + //VOREStation Addition begin: MICROMECHS + if(equip_type == EQUIP_MICRO_UTILITY && M.micro_utility_equipment.len < M.max_micro_utility_equip) + return 1 + if(equip_type == EQUIP_MICRO_WEAPON && M.micro_weapon_equipment.len < M.max_micro_weapon_equip) + return 1 + //VOREStation Addition end: MICROMECHS if(equip_type != EQUIP_SPECIAL && M.universal_equipment.len < M.max_universal_equip) //The exosuit needs to be military grade to actually have a universal slot capable of accepting a true weapon. if(equip_type == EQUIP_WEAPON && !istype(M, /obj/mecha/combat)) return 0 @@ -168,6 +186,14 @@ if(equip_type == EQUIP_SPECIAL && M.special_equipment.len < M.max_special_equip && !has_equipped) M.special_equipment += src has_equipped = 1 + //VOREStation Addition begin: MICROMECHS + if(equip_type == EQUIP_MICRO_UTILITY && M.micro_utility_equipment.len < M.max_micro_utility_equip && !has_equipped) + M.micro_utility_equipment += src + has_equipped = 1 + if(equip_type == EQUIP_MICRO_WEAPON && M.micro_weapon_equipment.len < M.max_micro_weapon_equip && !has_equipped) + M.micro_weapon_equipment += src + has_equipped = 1 + //VOREStation Addition end: MICROMECHS if(equip_type != EQUIP_SPECIAL && M.universal_equipment.len < M.max_universal_equip && !has_equipped) M.universal_equipment += src M.equipment += src @@ -194,6 +220,12 @@ chassis.utility_equipment -= src if(EQUIP_SPECIAL) chassis.special_equipment -= src + //VOREStation Addition begin: MICROMECHS + if(EQUIP_UTILITY) + chassis.micro_utility_equipment -= src + if(EQUIP_SPECIAL) + chassis.micro_weapon_equipment -= src + //VOREStation Addition end: MICROMECHS if(chassis.selected == src) chassis.selected = null update_chassis_page() diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 5a80ed7cc3..c326574eeb 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -13,7 +13,8 @@ var/speed = 1 var/mat_efficiency = 1 - var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "diamond" = 0, "phoron" = 0, "uranium" = 0) + var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, MAT_PLASTEEL = 0, "gold" = 0, "silver" = 0, MAT_LEAD = 0, "osmium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, "phoron" = 0, "uranium" = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) + var/list/hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER) var/res_max_amount = 200000 var/datum/research/files @@ -75,7 +76,7 @@ var/T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating - mat_efficiency = 1 - (T - 1) / 4 // 1 -> 0.5 + mat_efficiency = max(1 - (T - 1) / 4, 0.2) // 1 -> 0.2 for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) // Not resetting T is intended; speed is affected by both T += M.rating speed = T / 2 // 1 -> 3 @@ -103,7 +104,7 @@ if(current) data["builtperc"] = round((progress / current.time) * 100) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "mechfab.tmpl", "Exosuit Fabricator UI", 800, 600) ui.set_initial_data(data) @@ -273,7 +274,13 @@ /obj/machinery/mecha_part_fabricator/proc/get_materials() . = list() for(var/T in materials) - . += list(list("mat" = capitalize(T), "amt" = materials[T])) + var/hidden_mat = FALSE + for(var/HM in hidden_materials) // Direct list contents comparison was failing. + if(T == HM && materials[T] == 0) + hidden_mat = TRUE + continue + if(!hidden_mat) + . += list(list("mat" = capitalize(T), "amt" = materials[T])) /obj/machinery/mecha_part_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything var/recursive = amount == -1 ? 1 : 0 diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm index c77bf27a92..d2d0b8b55f 100644 --- a/code/game/mecha/mech_prosthetics.dm +++ b/code/game/mecha/mech_prosthetics.dm @@ -13,7 +13,8 @@ var/speed = 1 var/mat_efficiency = 1 - var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "diamond" = 0, "phoron" = 0, "uranium" = 0, "plasteel" = 0) + var/list/materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, MAT_PLASTEEL = 0, "gold" = 0, "silver" = 0, MAT_LEAD = 0, "osmium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, "phoron" = 0, "uranium" = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0) + var/list/hidden_materials = list(MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM) var/res_max_amount = 200000 var/datum/research/files @@ -77,7 +78,7 @@ var/T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating - mat_efficiency = 1 - (T - 1) / 4 // 1 -> 0.5 + mat_efficiency = max(0.2, 1 - (T - 1) / 4) // 1 -> 0.2 for(var/obj/item/weapon/stock_parts/micro_laser/M in component_parts) // Not resetting T is intended; speed is affected by both T += M.rating speed = T / 2 // 1 -> 3 @@ -113,7 +114,7 @@ if(current) data["builtperc"] = round((progress / current.time) * 100) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "mechfab.tmpl", "Prosthetics Fab UI", 800, 600) ui.set_initial_data(data) @@ -299,7 +300,13 @@ /obj/machinery/pros_fabricator/proc/get_materials() . = list() for(var/T in materials) - . += list(list("mat" = capitalize(T), "amt" = materials[T])) + var/hidden_mat = FALSE + for(var/HM in hidden_materials) // Direct list contents comparison was failing. + if(T == HM && materials[T] == 0) + hidden_mat = TRUE + continue + if(!hidden_mat) + . += list(list("mat" = capitalize(T), "amt" = materials[T])) /obj/machinery/pros_fabricator/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything var/recursive = amount == -1 ? 1 : 0 diff --git a/code/game/mecha/micro/micro.dm b/code/game/mecha/micro/micro.dm index 6da9b830c6..9c8a44899d 100644 --- a/code/game/mecha/micro/micro.dm +++ b/code/game/mecha/micro/micro.dm @@ -1,3 +1,11 @@ +/obj/mecha + var/max_micro_utility_equip = 0 + var/max_micro_weapon_equip = 0 + var/list/micro_utility_equipment = new + var/list/micro_weapon_equipment = new + + + /obj/mecha/micro icon = 'icons/mecha/micro.dmi' force = 10 //still a robot @@ -9,6 +17,13 @@ var/list/destroyable_obj = list(/obj/mecha, /obj/structure/window, /obj/structure/grille, /turf/simulated/wall) internal_damage_threshold = 50 maint_access = 0 + max_hull_equip = 1 + max_weapon_equip = 0 + max_utility_equip = 0 + max_universal_equip = 0 + max_special_equip = 1 + max_micro_utility_equip = 1 + max_micro_weapon_equip = 1 //add_req_access = 0 //operation_req_access = list(access_hos) damage_absorption = list("brute"=1,"fire"=1,"bullet"=1,"laser"=1,"energy"=1,"bomb"=1) diff --git a/code/game/mecha/micro/micro_equipment.dm b/code/game/mecha/micro/micro_equipment.dm index 9d2cfe40cd..b8e4557b47 100644 --- a/code/game/mecha/micro/micro_equipment.dm +++ b/code/game/mecha/micro/micro_equipment.dm @@ -14,6 +14,7 @@ energy_drain = 50 projectile = /obj/item/projectile/beam fire_sound = 'sound/weapons/Laser.ogg' + equip_type = EQUIP_MICRO_WEAPON required_type = list(/obj/mecha/micro/sec) /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/microheavy @@ -26,6 +27,7 @@ energy_drain = 120 projectile = /obj/item/projectile/beam/heavylaser fire_sound = 'sound/weapons/lasercannonfire.ogg' + equip_type = EQUIP_MICRO_WEAPON required_type = list(/obj/mecha/micro/sec) /obj/item/mecha_parts/mecha_equipment/weapon/energy/microtaser @@ -38,6 +40,7 @@ equip_cooldown = 10 projectile = /obj/item/projectile/beam/stun fire_sound = 'sound/weapons/Taser.ogg' + equip_type = EQUIP_MICRO_WEAPON required_type = list(/obj/mecha/micro/sec) /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/microshotgun @@ -55,6 +58,7 @@ projectiles_per_shot = 1 deviation = 0.7 projectile_energy_cost = 100 + equip_type = EQUIP_MICRO_WEAPON required_type = list(/obj/mecha/micro/sec) Topic(href,href_list) @@ -89,6 +93,7 @@ projectile_energy_cost = 800 equip_cooldown = 30 det_time = 15 + equip_type = EQUIP_MICRO_WEAPON required_type = list(/obj/mecha/micro/sec) @@ -105,6 +110,7 @@ equip_cooldown = 30 energy_drain = 10 force = 15 + equip_type = EQUIP_MICRO_UTILITY required_type = list(/obj/mecha/micro/utility) action(atom/target) @@ -155,6 +161,7 @@ icon_state = "microscoop" equip_cooldown = 5 energy_drain = 0 + equip_type = EQUIP_MICRO_UTILITY required_type = list(/obj/mecha/micro/utility) var/orecapacity = 500 diff --git a/code/game/mecha/micro/security.dm b/code/game/mecha/micro/security.dm index e3b43846d2..713c08d3d9 100644 --- a/code/game/mecha/micro/security.dm +++ b/code/game/mecha/micro/security.dm @@ -30,6 +30,8 @@ wreckage = /obj/effect/decal/mecha_wreckage/micro/sec/polecat internal_damage_threshold = 35 max_equip = 3 + max_micro_utility_equip = 0 + max_micro_weapon_equip = 3 /obj/effect/decal/mecha_wreckage/micro/sec/polecat name = "Polecat wreckage" @@ -52,6 +54,8 @@ wreckage = /obj/effect/decal/mecha_wreckage/micro/sec/weasel internal_damage_threshold = 20 max_equip = 2 + max_micro_utility_equip = 0 + max_micro_weapon_equip = 2 /obj/effect/decal/mecha_wreckage/micro/sec/weasel name = "Weasel wreckage" diff --git a/code/game/mecha/micro/utility.dm b/code/game/mecha/micro/utility.dm index d2bbe7d507..0d7290a1cf 100644 --- a/code/game/mecha/micro/utility.dm +++ b/code/game/mecha/micro/utility.dm @@ -16,6 +16,8 @@ var/overload_coeff = 2 wreckage = /obj/effect/decal/mecha_wreckage/micro/utility/gopher internal_damage_threshold = 35 + max_micro_utility_equip = 2 + max_micro_weapon_equip = 0 max_equip = 2 /obj/effect/decal/mecha_wreckage/micro/utility/gopher diff --git a/code/game/objects/effects/portals.dm b/code/game/objects/effects/portals.dm index dc4bf5146a..7dc82a0ffb 100644 --- a/code/game/objects/effects/portals.dm +++ b/code/game/objects/effects/portals.dm @@ -13,18 +13,24 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal) anchored = 1.0 /obj/effect/portal/Bumped(mob/M as mob|obj) + if(istype(M,/mob) && !(istype(M,/mob/living))) + return //do not send ghosts, zshadows, ai eyes, etc spawn(0) src.teleport(M) return return /obj/effect/portal/Crossed(AM as mob|obj) + if(istype(AM,/mob) && !(istype(AM,/mob/living))) + return //do not send ghosts, zshadows, ai eyes, etc spawn(0) src.teleport(AM) return return /obj/effect/portal/attack_hand(mob/user as mob) + if(istype(user) && !(istype(user,/mob/living))) + return //do not send ghosts, zshadows, ai eyes, etc spawn(0) src.teleport(user) return diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 14c341ce34..c2a77936c4 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -467,7 +467,7 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) ui_tick++ - var/datum/nanoui/old_ui = GLOB.nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/old_ui = SSnanoui.get_open_ui(user, src, "main") var/auto_update = 1 if(mode in no_auto_update) auto_update = 0 @@ -647,7 +647,7 @@ var/global/list/obj/item/device/pda/PDAs = list() nanoUI = data // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one @@ -685,7 +685,7 @@ var/global/list/obj/item/device/pda/PDAs = list() ..() var/mob/user = usr - var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main") var/mob/living/U = usr //Looking for master was kind of pointless since PDAs don't appear to have one. //if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) ) @@ -1130,7 +1130,7 @@ var/global/list/obj/item/device/pda/PDAs = list() ai.show_message("Intercepted message from [who]: [t]") P.new_message_from_pda(src, t) - GLOB.nanomanager.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message + SSnanoui.update_user_uis(U, src) // Update the sending user's PDA UI so that they can see the new message else to_chat(U, "ERROR: Messaging server is not responding.") @@ -1150,7 +1150,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if(L) if(reception_message) L << reception_message - GLOB.nanomanager.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message + SSnanoui.update_user_uis(L, src) // Update the receiving user's PDA UI so that they can see the new message /obj/item/device/pda/proc/new_news(var/message) new_info(news_silent, newstone, news_silent ? "" : "\icon[src] [message]") @@ -1196,7 +1196,7 @@ var/global/list/obj/item/device/pda/PDAs = list() if(can_use(usr)) mode = 0 - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) to_chat(usr, "You press the reset button on \the [src].") else to_chat(usr, "You cannot do this while restrained.") @@ -1297,7 +1297,7 @@ var/global/list/obj/item/device/pda/PDAs = list() user.drop_item() cartridge.loc = src to_chat(usr, "You insert [cartridge] into [src].") - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src if(cartridge.radio) cartridge.radio.hostpda = src @@ -1325,7 +1325,7 @@ var/global/list/obj/item/device/pda/PDAs = list() C.loc = src pai = C to_chat(user, "You slot \the [C] into \the [src].") - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src else if(istype(C, /obj/item/weapon/pen)) var/obj/item/weapon/pen/O = locate() in src if(O) diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 0ced4be973..cc7ac0e4a4 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -43,7 +43,7 @@ data["laws"] = laws data["has_laws"] = laws.len - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state) ui.set_initial_data(data) diff --git a/code/game/objects/items/devices/communicator/UI.dm b/code/game/objects/items/devices/communicator/UI.dm index d414232a80..69f5bd0d4b 100644 --- a/code/game/objects/items/devices/communicator/UI.dm +++ b/code/game/objects/items/devices/communicator/UI.dm @@ -125,7 +125,7 @@ // The value element is the actual data, and can take any form necessary for the template // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm @@ -261,7 +261,7 @@ notehtml = note if(href_list["switch_template"]) - var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main") if(ui) ui.add_template("Body", href_list["switch_template"]) @@ -276,5 +276,5 @@ if(href_list["cartridge_topic"] && cartridge) // Has to have a cartridge to perform these functions cartridge.Topic(href, href_list) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) add_fingerprint(usr) diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index 6324af7fb5..b9a8eff8a4 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -234,7 +234,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list() cartridge.forceMove(src) to_chat(usr, "You slot \the [cartridge] into \the [src].") modules[++modules.len] = list("module" = "External Device", "icon" = "external64", "number" = EXTRTAB) - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src return // Proc: attack_self() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 579e65787b..971eb26a46 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -121,7 +121,7 @@ var/global/list/default_medbay_channels = list( if(syndie) data["useSyndMode"] = 1 - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 430) ui.set_initial_data(data) @@ -232,7 +232,7 @@ var/global/list/default_medbay_channels = list( return 1 if(.) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT var/datum/radio_frequency/connection = null @@ -724,7 +724,7 @@ var/global/list/default_medbay_channels = list( . = 1 if(.) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/item/device/radio/borg/interact(mob/user as mob) if(!on) @@ -753,7 +753,7 @@ var/global/list/default_medbay_channels = list( data["has_subspace"] = 1 data["subspace"] = subspace_transmission - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "radio_basic.tmpl", "[name]", 400, 430) ui.set_initial_data(data) diff --git a/code/game/objects/items/devices/radio/radio_vr.dm b/code/game/objects/items/devices/radio/radio_vr.dm index d3681423f3..7e00c83c97 100644 --- a/code/game/objects/items/devices/radio/radio_vr.dm +++ b/code/game/objects/items/devices/radio/radio_vr.dm @@ -22,8 +22,9 @@ name = "subspace radio" desc = "A powerful new radio recently gifted to Nanotrasen from KHI, this communications device has the ability to send and recieve transmissions from anywhere." icon = 'icons/vore/custom_items_vr.dmi' + icon_override = 'icons/mob/back_vr.dmi' icon_state = "radiopack" - item_state = "parachute" + item_state = "radiopack" slot_flags = SLOT_BACK force = 5 throwforce = 6 diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 8abc2eabc2..ccd339e180 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -37,7 +37,7 @@ log_game("[key_name_admin(user)] attached both tanks to a transfer valve.") update_icon() - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src //TODO: Have this take an assemblyholder else if(isassembly(item)) var/obj/item/device/assembly/A = item @@ -58,7 +58,7 @@ message_admins("[key_name_admin(user)] attached a [item] to a transfer valve. (JMP)") log_game("[key_name_admin(user)] attached a [item] to a transfer valve.") attacher = user - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src return @@ -81,7 +81,7 @@ data["valveOpen"] = valve_open ? 1 : 0 // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/objects/items/devices/uplink.dm b/code/game/objects/items/devices/uplink.dm index 0bdb5a6b72..ea7006a73b 100644 --- a/code/game/objects/items/devices/uplink.dm +++ b/code/game/objects/items/devices/uplink.dm @@ -72,7 +72,7 @@ discount_amount = pick(90;0.9, 80;0.8, 70;0.7, 60;0.6, 50;0.5, 40;0.4, 30;0.3, 20;0.2, 10;0.1) next_offer_time = world.time + offer_time update_nano_data() - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) // Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated. /obj/item/device/uplink/hidden/proc/toggle() @@ -110,7 +110,7 @@ data += nanoui_data // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // No auto-refresh ui = new(user, src, ui_key, "uplink.tmpl", title, 450, 600, state = inventory_state) data["menu"] = 0 @@ -138,7 +138,7 @@ UI.buy(src, usr) else if(href_list["lock"]) toggle() - var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main") ui.close() else if(href_list["return"]) nanoui_menu = round(nanoui_menu/10) diff --git a/code/game/objects/items/robot/robot_upgrades_vr.dm b/code/game/objects/items/robot/robot_upgrades_vr.dm index 6f92178f09..a3c7709944 100644 --- a/code/game/objects/items/robot/robot_upgrades_vr.dm +++ b/code/game/objects/items/robot/robot_upgrades_vr.dm @@ -9,3 +9,21 @@ return 1 else return 0 + +//Robot resizing module + +/obj/item/borg/upgrade/sizeshift + name = "robot size alteration module" + desc = "Using technology similar to one used in sizeguns, allows cyborgs to adjust their own size as neccesary." + icon_state = "cyborg_upgrade2" + item_state = "cyborg_upgrade" + require_module = 1 + +/obj/item/borg/upgrade/sizeshift/action(var/mob/living/silicon/robot/R) + if(..()) return 0 + + if(/mob/living/proc/set_size in R.verbs) + return 0 + + R.verbs += /mob/living/proc/set_size + return 1 \ No newline at end of file diff --git a/code/game/objects/items/weapons/circuitboards/frame.dm b/code/game/objects/items/weapons/circuitboards/frame.dm index b22c4ca649..913506c9e6 100644 --- a/code/game/objects/items/weapons/circuitboards/frame.dm +++ b/code/game/objects/items/weapons/circuitboards/frame.dm @@ -197,6 +197,7 @@ board_type = new /datum/frame/frame_types/medical_pod origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2) req_components = list( + /obj/item/weapon/stock_parts/manipulator = 1, /obj/item/weapon/stock_parts/scanning_module = 1, /obj/item/weapon/reagent_containers/glass/beaker = 3, /obj/item/weapon/reagent_containers/syringe = 3, diff --git a/code/game/objects/items/weapons/circuitboards/mecha.dm b/code/game/objects/items/weapons/circuitboards/mecha.dm index 1415edea84..ed158a347b 100644 --- a/code/game/objects/items/weapons/circuitboards/mecha.dm +++ b/code/game/objects/items/weapons/circuitboards/mecha.dm @@ -79,5 +79,28 @@ name = T_BOARD_MECHA("Odysseus central control") icon_state = "mainboard" +/obj/item/weapon/circuitboard/mecha/imperion + name = "Alien Circuit" + origin_tech = list(TECH_DATA = 5, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + icon = 'icons/obj/abductor.dmi' + icon_state = "circuit" + +/obj/item/weapon/circuitboard/mecha/imperion/main + desc = "It is marked with a strange glyph." + +/obj/item/weapon/circuitboard/mecha/imperion/peripherals + desc = "It is marked with a pulsing glyph." + +/obj/item/weapon/circuitboard/mecha/imperion/targeting + desc = "It is marked with an ominous glyph." + +/obj/item/weapon/circuitboard/mecha/imperion/phasing + desc = "It is marked with a disturbing glyph." + +/obj/item/weapon/circuitboard/mecha/imperion/damaged + name = "Damaged Alien Circuit" + desc = "It is marked with a constantly shifting glyph." + origin_tech = list(TECH_DATA = 3, TECH_BLUESPACE = 1, TECH_PRECURSOR = 2) + //Undef the macro, shouldn't be needed anywhere else #undef T_BOARD_MECHA diff --git a/code/game/objects/items/weapons/id cards/syndicate_ids.dm b/code/game/objects/items/weapons/id cards/syndicate_ids.dm index e1ceb489dd..bbf05718fc 100644 --- a/code/game/objects/items/weapons/id cards/syndicate_ids.dm +++ b/code/game/objects/items/weapons/id cards/syndicate_ids.dm @@ -58,7 +58,7 @@ data["electronic_warfare"] = electronic_warfare data["entries"] = entries - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "agent_id_card.tmpl", "Fake ID", 600, 400) ui.set_initial_data(data) @@ -185,7 +185,7 @@ . = 1 // Always update the UI, or buttons will spin indefinitely - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /var/global/list/id_card_states /proc/id_card_states() diff --git a/code/game/objects/items/weapons/implants/implant_vr.dm b/code/game/objects/items/weapons/implants/implant_vr.dm index bf67f83953..bec23b4c2b 100644 --- a/code/game/objects/items/weapons/implants/implant_vr.dm +++ b/code/game/objects/items/weapons/implants/implant_vr.dm @@ -104,10 +104,7 @@ var/static/regex/size_mult = new/regex("\\d+") if(size_mult.Find(msg)) var/resizing_value = text2num(size_mult.match) - if(findtext(msg, "centimeter")) //Because metric system rules - H.resize(CLAMP(resizing_value/170 , 0.25, 2)) //170 cm is average crewmember, I think - else - H.resize(CLAMP(resizing_value , 0.25, 2)) + H.resize(CLAMP(resizing_value/100 , 0.25, 2)) @@ -128,7 +125,7 @@ description_info = {"Only accessable by those who implanted the victim. Self-implanting allows everyone to change host size. The following special commands are available: 'Shrink' - host size decreases. 'Grow' - host size increases. -'Resize (NUMBER)' or 'Resize (NUMBER) centimeter(s)' - for accurate size control. +'Resize (NUMBER)' - for accurate size control. 'Ignore' - keywords in the speech won't have any effect. 'Implant-toggle' - toggles implant."} diff --git a/code/game/objects/items/weapons/material/material_armor.dm b/code/game/objects/items/weapons/material/material_armor.dm index d8fba58175..d981cafc07 100644 --- a/code/game/objects/items/weapons/material/material_armor.dm +++ b/code/game/objects/items/weapons/material/material_armor.dm @@ -105,6 +105,31 @@ Protectiveness | Armor % if(!material) // No point checking for reflection. return ..() + if(material.negation && prob(material.negation)) // Strange and Alien materials, or just really strong materials. + user.visible_message("\The [src] completely absorbs [attack_text]!") + return TRUE + + if(material.spatial_instability && prob(material.spatial_instability)) + user.visible_message("\The [src] flashes [user] clear of [attack_text]!") + var/list/turfs = new/list() + for(var/turf/T in orange(round(material.spatial_instability / 10) + 1, user)) + if(istype(T,/turf/space)) continue + if(T.density) continue + if(T.x>world.maxx-6 || T.x<6) continue + if(T.y>world.maxy-6 || T.y<6) continue + turfs += T + if(!turfs.len) turfs += pick(/turf in orange(6)) + var/turf/picked = pick(turfs) + if(!isturf(picked)) return + + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() + spark_system.set_up(5, 0, user.loc) + spark_system.start() + playsound(user.loc, 'sound/effects/teleport.ogg', 50, 1) + + user.loc = picked + return PROJECTILE_FORCE_MISS + if(material.reflectivity) if(istype(damage_source, /obj/item/projectile/energy) || istype(damage_source, /obj/item/projectile/beam)) var/obj/item/projectile/P = damage_source diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index dae4a19d15..72fe26da36 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -134,7 +134,7 @@ /obj/item/weapon/melee/energy/sword/New() if(random_color) - blade_color = pick("red","blue","green","purple") + blade_color = pick("red","blue","green","purple","white") lcolor = blade_color /obj/item/weapon/melee/energy/sword/green/New() @@ -153,6 +153,10 @@ blade_color = "purple" lcolor = "#800080" +/obj/item/weapon/melee/energy/sword/white/New() + blade_color = "white" + lcolor = "#FFFFFF" + /obj/item/weapon/melee/energy/sword/activate(mob/living/user) if(!active) to_chat(user, "\The [src] is now energised.") @@ -161,7 +165,6 @@ attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") icon_state = "[active_state][blade_color]" - /obj/item/weapon/melee/energy/sword/deactivate(mob/living/user) if(active) to_chat(user, "\The [src] deactivates!") @@ -237,6 +240,80 @@ target.taunt(user) target.adjustFireLoss(force * 6) // 30 Burn, for 50 total. +/* + * Charge blade. Uses a cell, and costs energy per strike. + */ + +/obj/item/weapon/melee/energy/sword/charge + name = "charge sword" + desc = "A small, handheld device which emits a high-energy 'blade'." + origin_tech = list(TECH_COMBAT = 5, TECH_MAGNET = 3, TECH_ILLEGAL = 4) + active_force = 25 + armor_penetration = 25 + + var/hitcost = 75 + var/obj/item/weapon/cell/bcell = null + var/cell_type = /obj/item/weapon/cell/device + +/obj/item/weapon/melee/energy/sword/charge/proc/use_charge(var/cost) + if(active) + if(bcell) + if(bcell.checked_use(cost)) + return 1 + else + return 0 + return null + +/obj/item/weapon/melee/energy/sword/charge/examine(mob/user) + if(!..(user, 1)) + return + + if(bcell) + to_chat(user, "The blade is [round(bcell.percent())]% charged.") + if(!bcell) + to_chat(user, "The blade does not have a power source installed.") + +/obj/item/weapon/melee/energy/sword/charge/attack_self(mob/user as mob) + if((!bcell || bcell.charge < hitcost) && !active) + to_chat(user, "\The [src] does not seem to have power.") + return + ..() + +/obj/item/weapon/melee/energy/sword/charge/attack(mob/M, mob/user) + if(active) + if(!use_charge(hitcost)) + deactivate(user) + visible_message("\The [src]'s blade flickers, before retracting.") + return ..() + +/obj/item/weapon/melee/energy/sword/charge/attackby(obj/item/weapon/W, mob/user) + if(istype(W, cell_type)) + if(!bcell) + user.drop_item() + W.loc = src + bcell = W + to_chat(user, "You install a cell in [src].") + update_icon() + else + to_chat(user, "[src] already has a cell.") + else if(W.is_screwdriver() && bcell) + bcell.update_icon() + bcell.forceMove(get_turf(loc)) + bcell = null + to_chat(user, "You remove the cell from \the [src].") + deactivate() + update_icon() + return + else + ..() + +/obj/item/weapon/melee/energy/sword/charge/get_cell() + return bcell + +/obj/item/weapon/melee/energy/sword/charge/loaded/New() + ..() + bcell = new/obj/item/weapon/cell/device/weapon(src) + /* *Energy Blade */ diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 0962eef6f3..fb7a9accd4 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -263,7 +263,7 @@ var/list/global/tank_gauge_cache = list() data["maskConnected"] = 1 // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/game/objects/items/weapons/tools/crowbar.dm b/code/game/objects/items/weapons/tools/crowbar.dm index 477815e62f..73b62f0741 100644 --- a/code/game/objects/items/weapons/tools/crowbar.dm +++ b/code/game/objects/items/weapons/tools/crowbar.dm @@ -51,6 +51,24 @@ toolspeed = 0.1 origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4) +/obj/item/weapon/tool/crowbar/hybrid + name = "strange crowbar" + desc = "A crowbar whose head seems to phase in and out of view." + catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_crowbar) + icon_state = "hybcrowbar" + usesound = 'sound/weapons/sonic_jackhammer.ogg' + toolspeed = 0.4 + origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 3) + reach = 2 + +/obj/item/weapon/tool/crowbar/hybrid/is_crowbar() + if(prob(10)) + var/turf/T = get_turf(src) + radiation_repository.radiate(get_turf(src), 5) + T.visible_message("\The [src] shudders!") + return FALSE + return TRUE + /obj/item/weapon/tool/crowbar/cyborg name = "hydraulic crowbar" desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics." diff --git a/code/game/objects/items/weapons/tools/screwdriver.dm b/code/game/objects/items/weapons/tools/screwdriver.dm index cb6a7f7c90..a9bdd6cee8 100644 --- a/code/game/objects/items/weapons/tools/screwdriver.dm +++ b/code/game/objects/items/weapons/tools/screwdriver.dm @@ -92,6 +92,27 @@ toolspeed = 0.1 random_color = FALSE +/obj/item/weapon/tool/screwdriver/hybrid + name = "strange screwdriver" + desc = "A strange conglomerate of a screwdriver." + icon_state = "hybscrewdriver" + item_state = "screwdriver_black" + origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3) + slowdown = 0.1 + w_class = ITEMSIZE_NORMAL + usesound = 'sound/effects/uncloak.ogg' + toolspeed = 0.4 + random_color = FALSE + reach = 2 + +/obj/item/weapon/tool/screwdriver/hybrid/is_screwdriver() + if(prob(10)) + var/turf/T = get_turf(src) + radiation_repository.radiate(get_turf(src), 5) + T.visible_message("\The [src] shudders!") + return FALSE + return TRUE + /obj/item/weapon/tool/screwdriver/cyborg name = "powered screwdriver" desc = "An electrical screwdriver, designed to be both precise and quick." diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm index 8dc3496d1a..966ba4ebd0 100644 --- a/code/game/objects/items/weapons/tools/weldingtool.dm +++ b/code/game/objects/items/weapons/tools/weldingtool.dm @@ -1,626 +1,639 @@ -#define WELDER_FUEL_BURN_INTERVAL 13 -/* - * Welding Tool - */ -/obj/item/weapon/weldingtool - name = "\improper welding tool" - icon = 'icons/obj/tools.dmi' - icon_state = "welder" - item_state = "welder" - slot_flags = SLOT_BELT - - //Amount of OUCH when it's thrown - force = 3.0 - throwforce = 5.0 - throw_speed = 1 - throw_range = 5 - w_class = ITEMSIZE_SMALL - - //Cost to make in the autolathe - matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 30) - - //R&D tech level - origin_tech = list(TECH_ENGINEERING = 1) - - //Welding tool specific stuff - var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) - var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) - var/max_fuel = 20 //The max amount of fuel the welder can hold - - var/acti_sound = 'sound/items/welderactivate.ogg' - var/deac_sound = 'sound/items/welderdeactivate.ogg' - usesound = 'sound/items/Welder2.ogg' - var/change_icons = TRUE - var/flame_intensity = 2 //how powerful the emitted light is when used. - var/flame_color = "#FF9933" // What color the welder light emits when its on. Default is an orange-ish color. - var/eye_safety_modifier = 0 // Increasing this will make less eye protection needed to stop eye damage. IE at 1, sunglasses will fully protect. - var/burned_fuel_for = 0 // Keeps track of how long the welder's been on, used to gradually empty the welder if left one, without RNG. - var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel. - toolspeed = 1 - -/obj/item/weapon/weldingtool/Initialize() - . = ..() -// var/random_fuel = min(rand(10,20),max_fuel) - var/datum/reagents/R = new/datum/reagents(max_fuel) - reagents = R - R.my_atom = src - R.add_reagent("fuel", max_fuel) - update_icon() - if(always_process) - START_PROCESSING(SSobj, src) - -/obj/item/weapon/weldingtool/Destroy() - if(welding || always_process) - STOP_PROCESSING(SSobj, src) - return ..() - -/obj/item/weapon/weldingtool/examine(mob/user) - if(..(user, 0)) - if(max_fuel) - to_chat(user, text("\icon[] The [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )) - -/obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone) - if(ishuman(A) && user.a_intent == I_HELP) - var/mob/living/carbon/human/H = A - var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting] - - if(!S || S.robotic < ORGAN_ROBOT || S.open == 3) - return ..() - - if(!welding) - to_chat(user, "You'll need to turn [src] on to patch the damage on [H]'s [S.name]!") - return 1 - - if(S.robo_repair(15, BRUTE, "some dents", src, user)) - remove_fuel(1, user) - return 1 - - return ..() - -/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob) - if(istype(W,/obj/item/weapon/tool/screwdriver)) - if(welding) - to_chat(user, "Stop welding first!") - return - status = !status - if(status) - to_chat(user, "You secure the welder.") - else - to_chat(user, "The welder can now be attached and modified.") - src.add_fingerprint(user) - return - - if((!status) && (istype(W,/obj/item/stack/rods))) - var/obj/item/stack/rods/R = W - R.use(1) - var/obj/item/weapon/flamethrower/F = new/obj/item/weapon/flamethrower(user.loc) - src.loc = F - F.weldtool = src - if (user.client) - user.client.screen -= src - if (user.r_hand == src) - user.remove_from_mob(src) - else - user.remove_from_mob(src) - src.master = F - src.layer = initial(src.layer) - user.remove_from_mob(src) - if (user.client) - user.client.screen -= src - src.loc = F - src.add_fingerprint(user) - return - - ..() - return - -/obj/item/weapon/weldingtool/process() - if(welding) - ++burned_fuel_for - if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) - remove_fuel(1) - if(get_fuel() < 1) - setWelding(0) - //I'm not sure what this does. I assume it has to do with starting fires... - //...but it doesnt check to see if the welder is on or not. - var/turf/location = src.loc - if(istype(location, /mob/living)) - var/mob/living/M = location - if(M.item_is_in_hands(src)) - location = get_turf(M) - if (istype(location, /turf)) - location.hotspot_expose(700, 5) - -/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity) - if(!proximity) return - if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1) - if(!welding && max_fuel) - O.reagents.trans_to_obj(src, max_fuel) - to_chat(user, "Welder refueled") - playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) - return - else if(!welding) - to_chat(user, "[src] doesn't use fuel.") - return - else - message_admins("[key_name_admin(user)] triggered a fueltank explosion with a welding tool.") - log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.") - //Yawn edit: removed weldertank booms - to_chat(user, "You begin welding on the fueltank and with a moment of lucidity you realize, you are gaypwnd.") - //End yawn edit - return - if (src.welding) - remove_fuel(1) - var/turf/location = get_turf(user) - if(isliving(O)) - var/mob/living/L = O - L.IgniteMob() - if (istype(location, /turf)) - location.hotspot_expose(700, 50, 1) -/obj/item/weapon/weldingtool/attack_self(mob/user) - setWelding(!welding, user) - -//Returns the amount of fuel in the welder -/obj/item/weapon/weldingtool/proc/get_fuel() - return reagents.get_reagent_amount("fuel") - -/obj/item/weapon/weldingtool/proc/get_max_fuel() - return max_fuel - -//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use() -/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null) - if(!welding) - return 0 - if(amount) - burned_fuel_for = 0 // Reset the counter since we're removing fuel. - if(get_fuel() >= amount) - reagents.remove_reagent("fuel", amount) - if(M) - eyecheck(M) - update_icon() - return 1 - else - if(M) - to_chat(M, "You need more welding fuel to complete this task.") - update_icon() - return 0 - -//Returns whether or not the welding tool is currently on. -/obj/item/weapon/weldingtool/proc/isOn() - return welding - -/obj/item/weapon/weldingtool/update_icon() - ..() - overlays.Cut() - // Welding overlay. - if(welding) - var/image/I = image(icon, src, "[icon_state]-on") - overlays.Add(I) - item_state = "[initial(item_state)]1" - else - item_state = initial(item_state) - - // Fuel counter overlay. - if(change_icons && get_max_fuel()) - var/ratio = get_fuel() / get_max_fuel() - ratio = CEILING(ratio * 4, 1) * 25 - var/image/I = image(icon, src, "[icon_state][ratio]") - overlays.Add(I) - - // Lights - if(welding && flame_intensity) - set_light(flame_intensity, flame_intensity, flame_color) - else - set_light(0) - -// icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]" - var/mob/M = loc - if(istype(M)) - M.update_inv_l_hand() - M.update_inv_r_hand() - -/obj/item/weapon/weldingtool/MouseDrop(obj/over_object as obj) - if(!canremove) - return - - if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist - - if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why? - return - - if (!( istype(over_object, /obj/screen) )) - return ..() - - //makes sure that the thing is equipped, so that we can't drag it into our hand from miles away. - //there's got to be a better way of doing this. - if (!(src.loc == usr) || (src.loc && src.loc.loc == usr)) - return - - if (( usr.restrained() ) || ( usr.stat )) - return - - if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src)) - return - - switch(over_object.name) - if("r_hand") - usr.u_equip(src) - usr.put_in_r_hand(src) - if("l_hand") - usr.u_equip(src) - usr.put_in_l_hand(src) - src.add_fingerprint(usr) - -//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1) -//so that the welding tool updates accordingly -/obj/item/weapon/weldingtool/proc/setWelding(var/set_welding, var/mob/M) - if(!status) return - - var/turf/T = get_turf(src) - //If we're turning it on - if(set_welding && !welding) - if (get_fuel() > 0) - if(M) - to_chat(M, "You switch the [src] on.") - else if(T) - T.visible_message("\The [src] turns on.") - playsound(loc, acti_sound, 50, 1) - src.force = 15 - src.damtype = "fire" - src.w_class = ITEMSIZE_LARGE - src.hitsound = 'sound/items/welder.ogg' - welding = 1 - update_icon() - if(!always_process) - START_PROCESSING(SSobj, src) - else - if(M) - var/msg = max_fuel ? "welding fuel" : "charge" - to_chat(M, "You need more [msg] to complete this task.") - return - //Otherwise - else if(!set_welding && welding) - if(!always_process) - STOP_PROCESSING(SSobj, src) - if(M) - to_chat(M, "You switch \the [src] off.") - else if(T) - T.visible_message("\The [src] turns off.") - playsound(loc, deac_sound, 50, 1) - src.force = 3 - src.damtype = "brute" - src.w_class = initial(src.w_class) - src.welding = 0 - src.hitsound = initial(src.hitsound) - update_icon() - -//Decides whether or not to damage a player's eyes based on what they're wearing as protection -//Note: This should probably be moved to mob -/obj/item/weapon/weldingtool/proc/eyecheck(mob/living/carbon/user) - if(!istype(user)) - return 1 - var/safety = user.eyecheck() - safety = between(-1, safety + eye_safety_modifier, 2) - if(istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES] - if(!E) - return - if(H.nif && H.nif.flag_check(NIF_V_UVFILTER,NIF_FLAGS_VISION)) return //VOREStation Add - NIF - switch(safety) - if(1) - to_chat(usr, "Your eyes sting a little.") - E.damage += rand(1, 2) - if(E.damage > 12) - user.eye_blurry += rand(3,6) - if(0) - to_chat(usr, "Your eyes burn.") - E.damage += rand(2, 4) - if(E.damage > 10) - E.damage += rand(4,10) - if(-1) - to_chat(usr, "Your thermals intensify the welder's glow. Your eyes itch and burn severely.") - user.eye_blurry += rand(12,20) - E.damage += rand(12, 16) - if(safety<2) - - if(E.damage > 10) - to_chat(user, "Your eyes are really starting to hurt. This can't be good for you!") - - if (E.damage >= E.min_broken_damage) - to_chat(user, "You go blind!") - user.sdisabilities |= BLIND - else if (E.damage >= E.min_bruised_damage) - to_chat(user, "You go blind!") - user.Blind(5) - user.eye_blurry = 5 - user.disabilities |= NEARSIGHTED - spawn(100) - user.disabilities &= ~NEARSIGHTED - return - -/obj/item/weapon/weldingtool/is_hot() - return isOn() - -/obj/item/weapon/weldingtool/largetank - name = "industrial welding tool" - desc = "A slightly larger welder with a larger tank." - icon_state = "indwelder" - max_fuel = 40 - origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2) - matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60) - -/obj/item/weapon/weldingtool/largetank/cyborg - name = "integrated welding tool" - desc = "An advanced welder designed to be used in robotic systems." - toolspeed = 0.5 - -/obj/item/weapon/weldingtool/hugetank - name = "upgraded welding tool" - desc = "A much larger welder with a huge tank." - icon_state = "indwelder" - max_fuel = 80 - w_class = ITEMSIZE_NORMAL - origin_tech = list(TECH_ENGINEERING = 3) - matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) - -/obj/item/weapon/weldingtool/mini - name = "emergency welding tool" - desc = "A miniature welder used during emergencies." - icon_state = "miniwelder" - max_fuel = 10 - w_class = ITEMSIZE_SMALL - matter = list(MAT_METAL = 30, MAT_GLASS = 10) - change_icons = 0 - toolspeed = 2 - eye_safety_modifier = 1 // Safer on eyes. - -/datum/category_item/catalogue/anomalous/precursor_a/alien_welder - name = "Precursor Alpha Object - Self Refueling Exothermic Tool" - desc = "An unwieldly tool which somewhat resembles a weapon, due to \ - having a prominent trigger attached to the part which would presumably \ - have been held by whatever had created this object. When the trigger is \ - held down, a small but very high temperature flame shoots out from the \ - tip of the tool. The grip is able to be held by human hands, however the \ - shape makes it somewhat awkward to hold.\ -

\ - The tool appears to utilize an unknown fuel to light and maintain the \ - flame. What is more unusual, is that the fuel appears to replenish itself. \ - How it does this is not known presently, however experimental human-made \ - welders have been known to have a similar quality.\ -

\ - Interestingly, the flame is able to cut through a wide array of materials, \ - such as iron, steel, stone, lead, plasteel, and even durasteel. Yet, it is unable \ - to cut the unknown material that itself and many other objects made by this \ - precursor civilization have made. This raises questions on the properties of \ - that material, and how difficult it would have been to work with. This tool \ - does demonstrate, however, that the alien fuel cannot melt precursor beams, walls, \ - or other structual elements, making it rather limited for their \ - deconstruction purposes." - value = CATALOGUER_REWARD_EASY - -/obj/item/weapon/weldingtool/alien - name = "alien welding tool" - desc = "An alien welding tool. Whatever fuel it uses, it never runs out." - catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_welder) - icon = 'icons/obj/abductor.dmi' - icon_state = "welder" - toolspeed = 0.1 - flame_color = "#6699FF" // Light bluish. - eye_safety_modifier = 2 - change_icons = 0 - origin_tech = list(TECH_PHORON = 5 ,TECH_ENGINEERING = 5) - always_process = TRUE - -/obj/item/weapon/weldingtool/alien/process() - if(get_fuel() <= get_max_fuel()) - reagents.add_reagent("fuel", 1) - ..() - -/obj/item/weapon/weldingtool/experimental - name = "experimental welding tool" - desc = "An experimental welder capable of synthesizing its own fuel from waste compounds. It can output a flame hotter than regular welders." - icon_state = "exwelder" - max_fuel = 40 - w_class = ITEMSIZE_NORMAL - origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3) - matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) - toolspeed = 0.5 - change_icons = 0 - flame_intensity = 3 - always_process = TRUE - var/nextrefueltick = 0 - -/obj/item/weapon/weldingtool/experimental/process() - ..() - if(get_fuel() < get_max_fuel() && nextrefueltick < world.time) - nextrefueltick = world.time + 10 - reagents.add_reagent("fuel", 1) - -/* - * Backpack Welder. - */ - -/obj/item/weapon/weldingtool/tubefed - name = "tube-fed welding tool" - desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank." - icon_state = "tubewelder" - max_fuel = 10 - w_class = ITEMSIZE_NO_CONTAINER - matter = null - toolspeed = 1.25 - change_icons = 0 - flame_intensity = 1 - eye_safety_modifier = 1 - always_process = TRUE - var/obj/item/weapon/weldpack/mounted_pack = null - -/obj/item/weapon/weldingtool/tubefed/New(location) - ..() - if(istype(location, /obj/item/weapon/weldpack)) - var/obj/item/weapon/weldpack/holder = location - mounted_pack = holder - else - qdel(src) - -/obj/item/weapon/weldingtool/tubefed/Destroy() - mounted_pack.nozzle = null - mounted_pack = null - return ..() - -/obj/item/weapon/weldingtool/tubefed/process() - if(mounted_pack) - if(!istype(mounted_pack.loc,/mob/living/carbon/human)) - mounted_pack.return_nozzle() - else - var/mob/living/carbon/human/H = mounted_pack.loc - if(H.back != mounted_pack) - mounted_pack.return_nozzle() - - if(mounted_pack.loc != src.loc && src.loc != mounted_pack) - mounted_pack.return_nozzle() - visible_message("\The [src] retracts to its fueltank.") - - if(get_fuel() <= get_max_fuel()) - mounted_pack.reagents.trans_to_obj(src, 1) - - ..() - -/obj/item/weapon/weldingtool/tubefed/dropped(mob/user) - ..() - if(src.loc != user) - mounted_pack.return_nozzle() - to_chat(user, "\The [src] retracts to its fueltank.") - -/* - * Electric/Arc Welder - */ - -/obj/item/weapon/weldingtool/electric //AND HIS WELDING WAS ELECTRIC - name = "electric welding tool" - desc = "A welder which runs off of electricity." - icon_state = "arcwelder" - max_fuel = 0 //We'll handle the consumption later. - item_state = "ewelder" - var/obj/item/weapon/cell/power_supply //What type of power cell this uses - var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery - var/cell_type = /obj/item/weapon/cell/device - var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1 - flame_color = "#00CCFF" // Blue-ish, to set it apart from the gas flames. - acti_sound = 'sound/effects/sparks4.ogg' - deac_sound = 'sound/effects/sparks4.ogg' - -/obj/item/weapon/weldingtool/electric/unloaded/New() - cell_type = null - -/obj/item/weapon/weldingtool/electric/New() - ..() - if(cell_type == null) - update_icon() - else if(cell_type) - power_supply = new cell_type(src) - else - power_supply = new /obj/item/weapon/cell/device(src) - update_icon() - -/obj/item/weapon/weldingtool/electric/get_cell() - return power_supply - -/obj/item/weapon/weldingtool/electric/examine(mob/user) - if(get_dist(src, user) > 1) - to_chat(user, desc) - else // The << need to stay, for some reason - if(power_supply) - user << text("\icon[] The [] has [] charge left.", src, src.name, get_fuel()) - else - user << text("\icon[] The [] has no power cell!", src, src.name) - -/obj/item/weapon/weldingtool/electric/get_fuel() - if(use_external_power) - var/obj/item/weapon/cell/external = get_external_power_supply() - if(external) - return external.charge - else if(power_supply) - return power_supply.charge - else - return 0 - -/obj/item/weapon/weldingtool/electric/get_max_fuel() - if(use_external_power) - var/obj/item/weapon/cell/external = get_external_power_supply() - if(external) - return external.maxcharge - else if(power_supply) - return power_supply.maxcharge - return 0 - -/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null) - if(!welding) - return 0 - if(get_fuel() >= amount) - power_supply.checked_use(charge_cost) - if(use_external_power) - var/obj/item/weapon/cell/external = get_external_power_supply() - if(!external || !external.use(charge_cost)) //Take power from the borg... - power_supply.give(charge_cost) //Give it back to the cell. - if(M) - eyecheck(M) - update_icon() - return 1 - else - if(M) - to_chat(M, "You need more energy to complete this task.") - update_icon() - return 0 - -/obj/item/weapon/weldingtool/electric/attack_hand(mob/user as mob) - if(user.get_inactive_hand() == src) - if(power_supply) - power_supply.update_icon() - user.put_in_hands(power_supply) - power_supply = null - to_chat(user, "You remove the cell from the [src].") - setWelding(0) - update_icon() - return - ..() - else - return ..() - -/obj/item/weapon/weldingtool/electric/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/cell)) - if(istype(W, /obj/item/weapon/cell/device)) - if(!power_supply) - user.drop_item() - W.loc = src - power_supply = W - to_chat(user, "You install a cell in \the [src].") - update_icon() - else - to_chat(user, "\The [src] already has a cell.") - else - to_chat(user, "\The [src] cannot use that type of cell.") - else - ..() - -/obj/item/weapon/weldingtool/electric/proc/get_external_power_supply() - if(isrobot(src.loc)) - var/mob/living/silicon/robot/R = src.loc - return R.cell - if(istype(src.loc, /obj/item/rig_module)) - var/obj/item/rig_module/module = src.loc - if(module.holder && module.holder.wearer) - var/mob/living/carbon/human/H = module.holder.wearer - if(istype(H) && H.back) - var/obj/item/weapon/rig/suit = H.back - if(istype(suit)) - return suit.cell - return null - -/obj/item/weapon/weldingtool/electric/mounted - use_external_power = 1 - -/obj/item/weapon/weldingtool/electric/mounted/cyborg - toolspeed = 0.5 - +#define WELDER_FUEL_BURN_INTERVAL 13 +/* + * Welding Tool + */ +/obj/item/weapon/weldingtool + name = "\improper welding tool" + icon = 'icons/obj/tools.dmi' + icon_state = "welder" + item_state = "welder" + slot_flags = SLOT_BELT + + //Amount of OUCH when it's thrown + force = 3.0 + throwforce = 5.0 + throw_speed = 1 + throw_range = 5 + w_class = ITEMSIZE_SMALL + + //Cost to make in the autolathe + matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 30) + + //R&D tech level + origin_tech = list(TECH_ENGINEERING = 1) + + //Welding tool specific stuff + var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2) + var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower) + var/max_fuel = 20 //The max amount of fuel the welder can hold + + var/acti_sound = 'sound/items/welderactivate.ogg' + var/deac_sound = 'sound/items/welderdeactivate.ogg' + usesound = 'sound/items/Welder2.ogg' + var/change_icons = TRUE + var/flame_intensity = 2 //how powerful the emitted light is when used. + var/flame_color = "#FF9933" // What color the welder light emits when its on. Default is an orange-ish color. + var/eye_safety_modifier = 0 // Increasing this will make less eye protection needed to stop eye damage. IE at 1, sunglasses will fully protect. + var/burned_fuel_for = 0 // Keeps track of how long the welder's been on, used to gradually empty the welder if left one, without RNG. + var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel. + toolspeed = 1 + +/obj/item/weapon/weldingtool/Initialize() + . = ..() +// var/random_fuel = min(rand(10,20),max_fuel) + var/datum/reagents/R = new/datum/reagents(max_fuel) + reagents = R + R.my_atom = src + R.add_reagent("fuel", max_fuel) + update_icon() + if(always_process) + START_PROCESSING(SSobj, src) + +/obj/item/weapon/weldingtool/Destroy() + if(welding || always_process) + STOP_PROCESSING(SSobj, src) + return ..() + +/obj/item/weapon/weldingtool/examine(mob/user) + if(..(user, 0)) + if(max_fuel) + to_chat(user, text("\icon[] The [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )) + +/obj/item/weapon/weldingtool/attack(atom/A, mob/living/user, def_zone) + if(ishuman(A) && user.a_intent == I_HELP) + var/mob/living/carbon/human/H = A + var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting] + + if(!S || S.robotic < ORGAN_ROBOT || S.open == 3) + return ..() + + if(!welding) + to_chat(user, "You'll need to turn [src] on to patch the damage on [H]'s [S.name]!") + return 1 + + if(S.robo_repair(15, BRUTE, "some dents", src, user)) + remove_fuel(1, user) + return 1 + + return ..() + +/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob) + if(istype(W,/obj/item/weapon/tool/screwdriver)) + if(welding) + to_chat(user, "Stop welding first!") + return + status = !status + if(status) + to_chat(user, "You secure the welder.") + else + to_chat(user, "The welder can now be attached and modified.") + src.add_fingerprint(user) + return + + if((!status) && (istype(W,/obj/item/stack/rods))) + var/obj/item/stack/rods/R = W + R.use(1) + var/obj/item/weapon/flamethrower/F = new/obj/item/weapon/flamethrower(user.loc) + src.loc = F + F.weldtool = src + if (user.client) + user.client.screen -= src + if (user.r_hand == src) + user.remove_from_mob(src) + else + user.remove_from_mob(src) + src.master = F + src.layer = initial(src.layer) + user.remove_from_mob(src) + if (user.client) + user.client.screen -= src + src.loc = F + src.add_fingerprint(user) + return + + ..() + return + +/obj/item/weapon/weldingtool/process() + if(welding) + ++burned_fuel_for + if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL) + remove_fuel(1) + if(get_fuel() < 1) + setWelding(0) + //I'm not sure what this does. I assume it has to do with starting fires... + //...but it doesnt check to see if the welder is on or not. + var/turf/location = src.loc + if(istype(location, /mob/living)) + var/mob/living/M = location + if(M.item_is_in_hands(src)) + location = get_turf(M) + if (istype(location, /turf)) + location.hotspot_expose(700, 5) + +/obj/item/weapon/weldingtool/afterattack(obj/O as obj, mob/user as mob, proximity) + if(!proximity) return + if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1) + if(!welding && max_fuel) + O.reagents.trans_to_obj(src, max_fuel) + to_chat(user, "Welder refueled") + playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6) + return + else if(!welding) + to_chat(user, "[src] doesn't use fuel.") + return + else + message_admins("[key_name_admin(user)] triggered a fueltank explosion with a welding tool.") + log_game("[key_name(user)] triggered a fueltank explosion with a welding tool.") + //Yawn edit: removed weldertank booms + to_chat(user, "You begin welding on the fueltank and with a moment of lucidity you realize, you are gaypwnd.") + //End yawn edit + return + if (src.welding) + remove_fuel(1) + var/turf/location = get_turf(user) + if(isliving(O)) + var/mob/living/L = O + L.IgniteMob() + if (istype(location, /turf)) + location.hotspot_expose(700, 50, 1) +/obj/item/weapon/weldingtool/attack_self(mob/user) + setWelding(!welding, user) + +//Returns the amount of fuel in the welder +/obj/item/weapon/weldingtool/proc/get_fuel() + return reagents.get_reagent_amount("fuel") + +/obj/item/weapon/weldingtool/proc/get_max_fuel() + return max_fuel + +//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use() +/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null) + if(!welding) + return 0 + if(amount) + burned_fuel_for = 0 // Reset the counter since we're removing fuel. + if(get_fuel() >= amount) + reagents.remove_reagent("fuel", amount) + if(M) + eyecheck(M) + update_icon() + return 1 + else + if(M) + to_chat(M, "You need more welding fuel to complete this task.") + update_icon() + return 0 + +//Returns whether or not the welding tool is currently on. +/obj/item/weapon/weldingtool/proc/isOn() + return welding + +/obj/item/weapon/weldingtool/update_icon() + ..() + overlays.Cut() + // Welding overlay. + if(welding) + var/image/I = image(icon, src, "[icon_state]-on") + overlays.Add(I) + item_state = "[initial(item_state)]1" + else + item_state = initial(item_state) + + // Fuel counter overlay. + if(change_icons && get_max_fuel()) + var/ratio = get_fuel() / get_max_fuel() + ratio = CEILING(ratio * 4, 1) * 25 + var/image/I = image(icon, src, "[icon_state][ratio]") + overlays.Add(I) + + // Lights + if(welding && flame_intensity) + set_light(flame_intensity, flame_intensity, flame_color) + else + set_light(0) + +// icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]" + var/mob/M = loc + if(istype(M)) + M.update_inv_l_hand() + M.update_inv_r_hand() + +/obj/item/weapon/weldingtool/MouseDrop(obj/over_object as obj) + if(!canremove) + return + + if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist + + if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why? + return + + if (!( istype(over_object, /obj/screen) )) + return ..() + + //makes sure that the thing is equipped, so that we can't drag it into our hand from miles away. + //there's got to be a better way of doing this. + if (!(src.loc == usr) || (src.loc && src.loc.loc == usr)) + return + + if (( usr.restrained() ) || ( usr.stat )) + return + + if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src)) + return + + switch(over_object.name) + if("r_hand") + usr.u_equip(src) + usr.put_in_r_hand(src) + if("l_hand") + usr.u_equip(src) + usr.put_in_l_hand(src) + src.add_fingerprint(usr) + +//Sets the welding state of the welding tool. If you see W.welding = 1 anywhere, please change it to W.setWelding(1) +//so that the welding tool updates accordingly +/obj/item/weapon/weldingtool/proc/setWelding(var/set_welding, var/mob/M) + if(!status) return + + var/turf/T = get_turf(src) + //If we're turning it on + if(set_welding && !welding) + if (get_fuel() > 0) + if(M) + to_chat(M, "You switch the [src] on.") + else if(T) + T.visible_message("\The [src] turns on.") + playsound(loc, acti_sound, 50, 1) + src.force = 15 + src.damtype = "fire" + src.w_class = ITEMSIZE_LARGE + src.hitsound = 'sound/items/welder.ogg' + welding = 1 + update_icon() + if(!always_process) + START_PROCESSING(SSobj, src) + else + if(M) + var/msg = max_fuel ? "welding fuel" : "charge" + to_chat(M, "You need more [msg] to complete this task.") + return + //Otherwise + else if(!set_welding && welding) + if(!always_process) + STOP_PROCESSING(SSobj, src) + if(M) + to_chat(M, "You switch \the [src] off.") + else if(T) + T.visible_message("\The [src] turns off.") + playsound(loc, deac_sound, 50, 1) + src.force = 3 + src.damtype = "brute" + src.w_class = initial(src.w_class) + src.welding = 0 + src.hitsound = initial(src.hitsound) + update_icon() + +//Decides whether or not to damage a player's eyes based on what they're wearing as protection +//Note: This should probably be moved to mob +/obj/item/weapon/weldingtool/proc/eyecheck(mob/living/carbon/user) + if(!istype(user)) + return 1 + var/safety = user.eyecheck() + safety = between(-1, safety + eye_safety_modifier, 2) + if(istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES] + if(!E) + return + if(H.nif && H.nif.flag_check(NIF_V_UVFILTER,NIF_FLAGS_VISION)) return //VOREStation Add - NIF + switch(safety) + if(1) + to_chat(usr, "Your eyes sting a little.") + E.damage += rand(1, 2) + if(E.damage > 12) + user.eye_blurry += rand(3,6) + if(0) + to_chat(usr, "Your eyes burn.") + E.damage += rand(2, 4) + if(E.damage > 10) + E.damage += rand(4,10) + if(-1) + to_chat(usr, "Your thermals intensify the welder's glow. Your eyes itch and burn severely.") + user.eye_blurry += rand(12,20) + E.damage += rand(12, 16) + if(safety<2) + + if(E.damage > 10) + to_chat(user, "Your eyes are really starting to hurt. This can't be good for you!") + + if (E.damage >= E.min_broken_damage) + to_chat(user, "You go blind!") + user.sdisabilities |= BLIND + else if (E.damage >= E.min_bruised_damage) + to_chat(user, "You go blind!") + user.Blind(5) + user.eye_blurry = 5 + user.disabilities |= NEARSIGHTED + spawn(100) + user.disabilities &= ~NEARSIGHTED + return + +/obj/item/weapon/weldingtool/is_hot() + return isOn() + +/obj/item/weapon/weldingtool/largetank + name = "industrial welding tool" + desc = "A slightly larger welder with a larger tank." + icon_state = "indwelder" + max_fuel = 40 + origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2) + matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60) + +/obj/item/weapon/weldingtool/largetank/cyborg + name = "integrated welding tool" + desc = "An advanced welder designed to be used in robotic systems." + toolspeed = 0.5 + +/obj/item/weapon/weldingtool/hugetank + name = "upgraded welding tool" + desc = "A much larger welder with a huge tank." + icon_state = "indwelder" + max_fuel = 80 + w_class = ITEMSIZE_NORMAL + origin_tech = list(TECH_ENGINEERING = 3) + matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) + +/obj/item/weapon/weldingtool/mini + name = "emergency welding tool" + desc = "A miniature welder used during emergencies." + icon_state = "miniwelder" + max_fuel = 10 + w_class = ITEMSIZE_SMALL + matter = list(MAT_METAL = 30, MAT_GLASS = 10) + change_icons = 0 + toolspeed = 2 + eye_safety_modifier = 1 // Safer on eyes. + +/datum/category_item/catalogue/anomalous/precursor_a/alien_welder + name = "Precursor Alpha Object - Self Refueling Exothermic Tool" + desc = "An unwieldly tool which somewhat resembles a weapon, due to \ + having a prominent trigger attached to the part which would presumably \ + have been held by whatever had created this object. When the trigger is \ + held down, a small but very high temperature flame shoots out from the \ + tip of the tool. The grip is able to be held by human hands, however the \ + shape makes it somewhat awkward to hold.\ +

\ + The tool appears to utilize an unknown fuel to light and maintain the \ + flame. What is more unusual, is that the fuel appears to replenish itself. \ + How it does this is not known presently, however experimental human-made \ + welders have been known to have a similar quality.\ +

\ + Interestingly, the flame is able to cut through a wide array of materials, \ + such as iron, steel, stone, lead, plasteel, and even durasteel. Yet, it is unable \ + to cut the unknown material that itself and many other objects made by this \ + precursor civilization have made. This raises questions on the properties of \ + that material, and how difficult it would have been to work with. This tool \ + does demonstrate, however, that the alien fuel cannot melt precursor beams, walls, \ + or other structual elements, making it rather limited for their \ + deconstruction purposes." + value = CATALOGUER_REWARD_EASY + +/obj/item/weapon/weldingtool/alien + name = "alien welding tool" + desc = "An alien welding tool. Whatever fuel it uses, it never runs out." + catalogue_data = list(/datum/category_item/catalogue/anomalous/precursor_a/alien_welder) + icon = 'icons/obj/abductor.dmi' + icon_state = "welder" + toolspeed = 0.1 + flame_color = "#6699FF" // Light bluish. + eye_safety_modifier = 2 + change_icons = 0 + origin_tech = list(TECH_PHORON = 5 ,TECH_ENGINEERING = 5) + always_process = TRUE + +/obj/item/weapon/weldingtool/alien/process() + if(get_fuel() <= get_max_fuel()) + reagents.add_reagent("fuel", 1) + ..() + +/obj/item/weapon/weldingtool/experimental + name = "experimental welding tool" + desc = "An experimental welder capable of synthesizing its own fuel from waste compounds. It can output a flame hotter than regular welders." + icon_state = "exwelder" + max_fuel = 40 + w_class = ITEMSIZE_NORMAL + origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3) + matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) + toolspeed = 0.5 + change_icons = 0 + flame_intensity = 3 + always_process = TRUE + var/nextrefueltick = 0 + +/obj/item/weapon/weldingtool/experimental/process() + ..() + if(get_fuel() < get_max_fuel() && nextrefueltick < world.time) + nextrefueltick = world.time + 10 + reagents.add_reagent("fuel", 1) + +/obj/item/weapon/weldingtool/experimental/hybrid + name = "strange welding tool" + desc = "An experimental welder capable of synthesizing its own fuel from spatial waveforms. It's like welding with a star!" + icon_state = "hybwelder" + max_fuel = 20 + eye_safety_modifier = -2 // Brighter than the sun. Literally, you can look at the sun with a welding mask of proper grade, this will burn through that. + slowdown = 0.1 + toolspeed = 0.25 + w_class = ITEMSIZE_LARGE + flame_intensity = 5 + origin_tech = list(TECH_ENGINEERING = 5, TECH_PHORON = 4, TECH_PRECURSOR = 1) + reach = 2 + +/* + * Backpack Welder. + */ + +/obj/item/weapon/weldingtool/tubefed + name = "tube-fed welding tool" + desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank." + icon_state = "tubewelder" + max_fuel = 10 + w_class = ITEMSIZE_NO_CONTAINER + matter = null + toolspeed = 1.25 + change_icons = 0 + flame_intensity = 1 + eye_safety_modifier = 1 + always_process = TRUE + var/obj/item/weapon/weldpack/mounted_pack = null + +/obj/item/weapon/weldingtool/tubefed/New(location) + ..() + if(istype(location, /obj/item/weapon/weldpack)) + var/obj/item/weapon/weldpack/holder = location + mounted_pack = holder + else + qdel(src) + +/obj/item/weapon/weldingtool/tubefed/Destroy() + mounted_pack.nozzle = null + mounted_pack = null + return ..() + +/obj/item/weapon/weldingtool/tubefed/process() + if(mounted_pack) + if(!istype(mounted_pack.loc,/mob/living/carbon/human)) + mounted_pack.return_nozzle() + else + var/mob/living/carbon/human/H = mounted_pack.loc + if(H.back != mounted_pack) + mounted_pack.return_nozzle() + + if(mounted_pack.loc != src.loc && src.loc != mounted_pack) + mounted_pack.return_nozzle() + visible_message("\The [src] retracts to its fueltank.") + + if(get_fuel() <= get_max_fuel()) + mounted_pack.reagents.trans_to_obj(src, 1) + + ..() + +/obj/item/weapon/weldingtool/tubefed/dropped(mob/user) + ..() + if(src.loc != user) + mounted_pack.return_nozzle() + to_chat(user, "\The [src] retracts to its fueltank.") + +/* + * Electric/Arc Welder + */ + +/obj/item/weapon/weldingtool/electric //AND HIS WELDING WAS ELECTRIC + name = "electric welding tool" + desc = "A welder which runs off of electricity." + icon_state = "arcwelder" + max_fuel = 0 //We'll handle the consumption later. + item_state = "ewelder" + var/obj/item/weapon/cell/power_supply //What type of power cell this uses + var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery + var/cell_type = /obj/item/weapon/cell/device + var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1 + flame_color = "#00CCFF" // Blue-ish, to set it apart from the gas flames. + acti_sound = 'sound/effects/sparks4.ogg' + deac_sound = 'sound/effects/sparks4.ogg' + +/obj/item/weapon/weldingtool/electric/unloaded/New() + cell_type = null + +/obj/item/weapon/weldingtool/electric/New() + ..() + if(cell_type == null) + update_icon() + else if(cell_type) + power_supply = new cell_type(src) + else + power_supply = new /obj/item/weapon/cell/device(src) + update_icon() + +/obj/item/weapon/weldingtool/electric/get_cell() + return power_supply + +/obj/item/weapon/weldingtool/electric/examine(mob/user) + if(get_dist(src, user) > 1) + to_chat(user, desc) + else // The << need to stay, for some reason + if(power_supply) + user << text("\icon[] The [] has [] charge left.", src, src.name, get_fuel()) + else + user << text("\icon[] The [] has no power cell!", src, src.name) + +/obj/item/weapon/weldingtool/electric/get_fuel() + if(use_external_power) + var/obj/item/weapon/cell/external = get_external_power_supply() + if(external) + return external.charge + else if(power_supply) + return power_supply.charge + else + return 0 + +/obj/item/weapon/weldingtool/electric/get_max_fuel() + if(use_external_power) + var/obj/item/weapon/cell/external = get_external_power_supply() + if(external) + return external.maxcharge + else if(power_supply) + return power_supply.maxcharge + return 0 + +/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null) + if(!welding) + return 0 + if(get_fuel() >= amount) + power_supply.checked_use(charge_cost) + if(use_external_power) + var/obj/item/weapon/cell/external = get_external_power_supply() + if(!external || !external.use(charge_cost)) //Take power from the borg... + power_supply.give(charge_cost) //Give it back to the cell. + if(M) + eyecheck(M) + update_icon() + return 1 + else + if(M) + to_chat(M, "You need more energy to complete this task.") + update_icon() + return 0 + +/obj/item/weapon/weldingtool/electric/attack_hand(mob/user as mob) + if(user.get_inactive_hand() == src) + if(power_supply) + power_supply.update_icon() + user.put_in_hands(power_supply) + power_supply = null + to_chat(user, "You remove the cell from the [src].") + setWelding(0) + update_icon() + return + ..() + else + return ..() + +/obj/item/weapon/weldingtool/electric/attackby(obj/item/weapon/W, mob/user as mob) + if(istype(W, /obj/item/weapon/cell)) + if(istype(W, /obj/item/weapon/cell/device)) + if(!power_supply) + user.drop_item() + W.loc = src + power_supply = W + to_chat(user, "You install a cell in \the [src].") + update_icon() + else + to_chat(user, "\The [src] already has a cell.") + else + to_chat(user, "\The [src] cannot use that type of cell.") + else + ..() + +/obj/item/weapon/weldingtool/electric/proc/get_external_power_supply() + if(isrobot(src.loc)) + var/mob/living/silicon/robot/R = src.loc + return R.cell + if(istype(src.loc, /obj/item/rig_module)) + var/obj/item/rig_module/module = src.loc + if(module.holder && module.holder.wearer) + var/mob/living/carbon/human/H = module.holder.wearer + if(istype(H) && H.back) + var/obj/item/weapon/rig/suit = H.back + if(istype(suit)) + return suit.cell + return null + +/obj/item/weapon/weldingtool/electric/mounted + use_external_power = 1 + +/obj/item/weapon/weldingtool/electric/mounted/cyborg + toolspeed = 0.5 + #undef WELDER_FUEL_BURN_INTERVAL \ No newline at end of file diff --git a/code/game/objects/items/weapons/tools/wirecutters.dm b/code/game/objects/items/weapons/tools/wirecutters.dm index f53225ab41..181c786c4c 100644 --- a/code/game/objects/items/weapons/tools/wirecutters.dm +++ b/code/game/objects/items/weapons/tools/wirecutters.dm @@ -73,6 +73,26 @@ usesound = 'sound/items/jaws_cut.ogg' toolspeed = 0.5 +/obj/item/weapon/tool/wirecutters/hybrid + name = "strange wirecutters" + desc = "This cuts wires. With Science!" + icon_state = "hybcutters" + w_class = ITEMSIZE_NORMAL + slowdown = 0.1 + origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_PHORON = 2) + attack_verb = list("pinched", "nipped", "warped", "blasted") + usesound = 'sound/effects/stealthoff.ogg' + toolspeed = 0.4 + reach = 2 + +/obj/item/weapon/tool/wirecutters/hybrid/is_wirecutter() + if(prob(10)) + var/turf/T = get_turf(src) + radiation_repository.radiate(get_turf(src), 5) + T.visible_message("\The [src] shudders!") + return FALSE + return TRUE + /obj/item/weapon/tool/wirecutters/power name = "jaws of life" desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head." diff --git a/code/game/objects/items/weapons/tools/wrench.dm b/code/game/objects/items/weapons/tools/wrench.dm index 7b1ab6a07c..652e32cf75 100644 --- a/code/game/objects/items/weapons/tools/wrench.dm +++ b/code/game/objects/items/weapons/tools/wrench.dm @@ -25,6 +25,29 @@ usesound = 'sound/items/drill_use.ogg' toolspeed = 0.5 +/obj/item/weapon/tool/wrench/hybrid // Slower and bulkier than normal power tools, but it has the power of reach. + name = "strange wrench" + desc = "A wrench with many common uses. Can be usually found in your hand." + icon = 'icons/obj/tools.dmi' + icon_state = "hybwrench" + slot_flags = SLOT_BELT + force = 8 + throwforce = 10 + w_class = ITEMSIZE_NORMAL + slowdown = 0.1 + origin_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_PHORON = 2) + attack_verb = list("bashed", "battered", "bludgeoned", "whacked", "warped", "blasted") + usesound = 'sound/effects/stealthoff.ogg' + toolspeed = 0.5 + reach = 2 + +/obj/item/weapon/tool/wrench/hybrid/is_wrench() + if(prob(10)) + var/turf/T = get_turf(src) + radiation_repository.radiate(get_turf(src), 5) + T.visible_message("\The [src] shudders!") + return FALSE + return TRUE /datum/category_item/catalogue/anomalous/precursor_a/alien_wrench name = "Precursor Alpha Object - Fastener Torque Tool" diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index 5f051a4e78..8ff7ee844f 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -102,7 +102,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart) data["replacer"] = myreplacer ? capitalize(myreplacer.name) : null data["signs"] = signs ? "[signs] sign\s" : null - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "janitorcart.tmpl", "Janitorial cart", 240, 160) ui.set_initial_data(data) diff --git a/code/game/objects/structures/props/alien_props.dm b/code/game/objects/structures/props/alien_props.dm index 1eb811838e..38f0b1b893 100644 --- a/code/game/objects/structures/props/alien_props.dm +++ b/code/game/objects/structures/props/alien_props.dm @@ -114,4 +114,12 @@ for(var/i = 1 to rand(1, 4)) var/new_tech = pick(techs) techs -= new_tech - origin_tech[new_tech] = rand(5, 9) \ No newline at end of file + origin_tech[new_tech] = rand(5, 9) + + origin_tech[TECH_PRECURSOR] = rand(0,2) + +/obj/item/prop/alien/phasecoil + name = "reverberating device" + desc = "A device pulsing with an ominous energy." + icon_state = "circuit_phase" + origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 6, TECH_PHORON = 3, TECH_POWER = 5, TECH_MAGNET = 5, TECH_DATA = 5, TECH_PRECURSOR = 2, TECH_ARCANE = 1) diff --git a/code/game/verbs/character_directory.dm b/code/game/verbs/character_directory.dm index 967715901d..1b45091cf7 100644 --- a/code/game/verbs/character_directory.dm +++ b/code/game/verbs/character_directory.dm @@ -29,6 +29,29 @@ html += "OOC notes" html += "" html += "" + if(isAI(C.mob)) + var/mob/living/silicon/ai/A = C.mob + curID++ + html += "
" + html += "

[A.name] (Artificial Intelligence)


" + if(A.ooc_notes) + html += "OOC notes" + html += "" + html += "
" + if(isrobot(C.mob)) + var/mob/living/silicon/robot/R = C.mob + if(R.scrambledcodes || (R.module && R.module.hide_on_manifest)) + continue + curID++ + html += "
" + html += "

[R.name] ([R.modtype] [R.braintype])


" + if(R.flavor_text) + html += "Flavor text" + html += "" + if(R.ooc_notes) + html += "OOC notes" + html += "" + html += "
" if(!curID) html += "

404: Station not found

" diff --git a/code/global_init.dm b/code/global_init.dm index 6e3f13d506..c562209183 100644 --- a/code/global_init.dm +++ b/code/global_init.dm @@ -18,8 +18,6 @@ var/global/datum/global_init/init = new () makeDatumRefLists() load_configuration() - initialize_chemical_reagents() - initialize_chemical_reactions() initialize_integrated_circuits_list() qdel(src) //we're done diff --git a/code/global_vr.dm b/code/global_vr.dm index 154613a4bb..9506dd62d3 100644 --- a/code/global_vr.dm +++ b/code/global_vr.dm @@ -10,13 +10,13 @@ var/global/list/acceptable_fruit_types= list( "ambrosia", "apple", "banana", - "berry", + "berries", "cabbage", "carrot", "cherry", "chili", "eggplant", - "grape", + "grapes", "greengrapes", "lemon", "lime", diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm index 35cff902d8..ce2c684c09 100644 --- a/code/modules/admin/view_variables/topic.dm +++ b/code/modules/admin/view_variables/topic.dm @@ -448,7 +448,7 @@ usr << "This can only be done on mobs with clients" return - GLOB.nanomanager.send_resources(H.client) + SSnanoui.send_resources(H.client) usr << "Resource files sent" H << "Your NanoUI Resource files have been refreshed" diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 2e71e4e464..95e4fb0f16 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -153,7 +153,7 @@ log_client_to_db() send_resources() - GLOB.nanomanager.send_resources(src) + SSnanoui.send_resources(src) if(!void) void = new() @@ -167,7 +167,7 @@ src.changes() hook_vr("client_new",list(src)) //VOREStation Code - + if(config.paranoia_logging) if(isnum(player_age) && player_age == 0) log_and_message_admins("PARANOIA: [key_name(src)] has connected here for the first time.") diff --git a/code/modules/client/preference_setup/loadout/loadout_suit.dm b/code/modules/client/preference_setup/loadout/loadout_suit.dm index dac3f2123c..81099280c3 100644 --- a/code/modules/client/preference_setup/loadout/loadout_suit.dm +++ b/code/modules/client/preference_setup/loadout/loadout_suit.dm @@ -274,6 +274,14 @@ datum/gear/suit/duster display_name = "cloak, medical" path = /obj/item/clothing/accessory/poncho/roles/cloak/medical +/datum/gear/suit/roles/poncho/cloak/custom //A colorable cloak + display_name = "cloak (colorable)" + path = /obj/item/clothing/accessory/poncho/roles/cloak/custom + +/datum/gear/suit/roles/poncho/cloak/custom/New() + ..() + gear_tweaks = list(gear_tweak_free_color_choice) + /datum/gear/suit/unathi_robe display_name = "roughspun robe" path = /obj/item/clothing/suit/unathi/robe diff --git a/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm b/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm index 5dbe0c69fb..e446cd81b1 100644 --- a/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm +++ b/code/modules/client/preference_setup/loadout/loadout_uniform_vr.dm @@ -21,7 +21,7 @@ /datum/gear/uniform/job_khi/med display_name = "khi uniform, med" path = /obj/item/clothing/under/rank/khi/med - allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist") + allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Field Medic") /datum/gear/uniform/job_khi/eng display_name = "khi uniform, eng" @@ -31,7 +31,7 @@ /datum/gear/uniform/job_khi/sci display_name = "khi uniform, sci" path = /obj/item/clothing/under/rank/khi/sci - allowed_roles = list("Research Director","Scientist", "Roboticist", "Xenobiologist") + allowed_roles = list("Research Director", "Scientist", "Roboticist", "Xenobiologist", "Pathfinder", "Explorer") //Federation jackets /datum/gear/suit/job_fed/sec @@ -42,7 +42,7 @@ /datum/gear/suit/job_fed/medsci display_name = "fed uniform, med/sci" path = /obj/item/clothing/suit/storage/fluff/fedcoat/fedblue - allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist") + allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist","Pathfinder","Explorer","Field Medic") /datum/gear/suit/job_fed/eng display_name = "fed uniform, eng" @@ -59,7 +59,7 @@ /datum/gear/uniform/job_trek/medsci/tos display_name = "TOS uniform, med/sci" path = /obj/item/clothing/under/rank/trek/medsci - allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist") + allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist", "Pathfinder", "Explorer", "Field Medic") /datum/gear/uniform/job_trek/eng/tos display_name = "TOS uniform, eng/sec" @@ -75,7 +75,7 @@ /datum/gear/uniform/job_trek/medsci/tng display_name = "TNG uniform, med/sci" path = /obj/item/clothing/under/rank/trek/medsci/next - allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist") + allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist", "Pathfinder", "Explorer", "Field Medic") /datum/gear/uniform/job_trek/eng/tng display_name = "TNG uniform, eng/sec" @@ -91,7 +91,7 @@ /datum/gear/uniform/job_trek/medsci/voy display_name = "VOY uniform, med/sci" path = /obj/item/clothing/under/rank/trek/medsci/voy - allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist") + allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist", "Pathfinder", "Explorer", "Field Medic") /datum/gear/uniform/job_trek/eng/voy display_name = "VOY uniform, eng/sec" @@ -106,7 +106,7 @@ allowed_roles = list("Head of Security","Colony Director","Head of Personnel","Chief Engineer","Research Director", "Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist", "Scientist","Roboticist","Xenobiologist","Atmospheric Technician", - "Station Engineer","Warden","Detective","Security Officer","Blueshield Guard") + "Station Engineer","Warden","Detective","Security Officer", "Pathfinder", "Explorer", "Field Medic", "Blueshield Guard") /datum/gear/uniform/job_trek/cmd/ds9 @@ -117,7 +117,7 @@ /datum/gear/uniform/job_trek/medsci/ds9 display_name = "DS9 uniform, med/sci" path = /obj/item/clothing/under/rank/trek/medsci/ds9 - allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist") + allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist", "Pathfinder", "Explorer", "Field Medic") /datum/gear/uniform/job_trek/eng/ds9 display_name = "DS9 uniform, eng/sec" @@ -134,7 +134,7 @@ /datum/gear/uniform/job_trek/medsci/ent display_name = "ENT uniform, med/sci" path = /obj/item/clothing/under/rank/trek/medsci/ent - allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist") + allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Paramedic","Geneticist","Research Director","Scientist", "Roboticist", "Xenobiologist", "Pathfinder", "Explorer", "Field Medic") /datum/gear/uniform/job_trek/eng/ent display_name = "ENT uniform, eng/sec" diff --git a/code/modules/clothing/glasses/hud_vr.dm b/code/modules/clothing/glasses/hud_vr.dm index 1863ec3c14..dfdd02c461 100644 --- a/code/modules/clothing/glasses/hud_vr.dm +++ b/code/modules/clothing/glasses/hud_vr.dm @@ -23,7 +23,7 @@ /obj/item/clothing/glasses/omnihud/dropped() if(arscreen) - GLOB.nanomanager.close_uis(src) + SSnanoui.close_uis(src) ..() /obj/item/clothing/glasses/omnihud/emp_act(var/severity) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 1130e1e19d..a7c3287133 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -616,7 +616,7 @@ if(module_list.len) data["modules"] = module_list - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, ((src.loc != user) ? ai_interface_path : interface_path), interface_title, 480, 550, state = nano_state) ui.set_initial_data(data) diff --git a/code/modules/clothing/under/accessories/clothing.dm b/code/modules/clothing/under/accessories/clothing.dm index 29057e8469..66636aac6f 100644 --- a/code/modules/clothing/under/accessories/clothing.dm +++ b/code/modules/clothing/under/accessories/clothing.dm @@ -216,6 +216,13 @@ icon_state = "medcloak" item_state = "medcloak" + +/obj/item/clothing/accessory/poncho/roles/cloak/custom //A colorable cloak + name = "cloak" + desc = "A simple, bland cloak." + icon_state = "colorcloak" + item_state = "colorcloak" + /obj/item/clothing/accessory/hawaii name = "flower-pattern shirt" desc = "You probably need some welder googles to look at this." diff --git a/code/modules/detectivework/microscope/dnascanner.dm b/code/modules/detectivework/microscope/dnascanner.dm index d45555f40d..413fe14d01 100644 --- a/code/modules/detectivework/microscope/dnascanner.dm +++ b/code/modules/detectivework/microscope/dnascanner.dm @@ -61,7 +61,7 @@ data["bloodsamp_desc"] = (bloodsamp ? (bloodsamp.desc ? bloodsamp.desc : "No information on record.") : "") data["lidstate"] = closed - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data) if (!ui) ui = new(user, src, ui_key, "dnaforensics.tmpl", "QuikScan DNA Analyzer", 540, 326) ui.set_initial_data(data) diff --git a/code/modules/economy/Accounts_DB.dm b/code/modules/economy/Accounts_DB.dm index 2d6676adec..a293226d48 100644 --- a/code/modules/economy/Accounts_DB.dm +++ b/code/modules/economy/Accounts_DB.dm @@ -53,7 +53,7 @@ O.loc = src held_card = O - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) attack_hand(user) @@ -107,7 +107,7 @@ if (accounts.len > 0) data["accounts"] = accounts - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "accounts_terminal.tmpl", src.name, 400, 640) ui.set_initial_data(data) @@ -117,7 +117,7 @@ if(..()) return 1 - var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(usr, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(usr, src, "main") if(href_list["choice"]) switch(href_list["choice"]) diff --git a/code/modules/events/supply_demand.dm b/code/modules/events/supply_demand.dm index becec3b192..2d38c1f491 100644 --- a/code/modules/events/supply_demand.dm +++ b/code/modules/events/supply_demand.dm @@ -284,7 +284,7 @@ var/list/medicineReagents = list() for(var/path in typesof(/datum/chemical_reaction) - /datum/chemical_reaction) var/datum/chemical_reaction/CR = path // Stupid casting required for reading - var/datum/reagent/R = chemical_reagents_list[initial(CR.result)] + var/datum/reagent/R = SSchemistry.chemical_reagents[initial(CR.result)] if(R && R.scannable) medicineReagents += R for(var/i in 1 to differentTypes) @@ -298,7 +298,7 @@ var/list/drinkReagents = list() for(var/path in typesof(/datum/chemical_reaction) - /datum/chemical_reaction) var/datum/chemical_reaction/CR = path // Stupid casting required for reading - var/datum/reagent/R = chemical_reagents_list[initial(CR.result)] + var/datum/reagent/R = SSchemistry.chemical_reagents[initial(CR.result)] if(istype(R, /datum/reagent/drink) || istype(R, /datum/reagent/ethanol)) drinkReagents += R for(var/i in 1 to differentTypes) diff --git a/code/modules/food/drinkingglass/drinkingglass.dm b/code/modules/food/drinkingglass/drinkingglass.dm index d4c8389a51..604b85665f 100644 --- a/code/modules/food/drinkingglass/drinkingglass.dm +++ b/code/modules/food/drinkingglass/drinkingglass.dm @@ -65,7 +65,7 @@ return 1 return 0 -/obj/item/weapon/reagent_containers/food/drinks/glass2/New() +/obj/item/weapon/reagent_containers/food/drinks/glass2/Initialize() ..() icon_state = base_icon diff --git a/code/modules/food/drinkingglass/shaker.dm b/code/modules/food/drinkingglass/shaker.dm index b653f14c60..3b81c6bdec 100644 --- a/code/modules/food/drinkingglass/shaker.dm +++ b/code/modules/food/drinkingglass/shaker.dm @@ -11,7 +11,7 @@ rim_pos = null // no fruit slices var/lid_color = "black" -/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/New() +/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/Initialize() ..() lid_color = pick("black", "red", "blue") update_icon() @@ -23,7 +23,7 @@ /obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake name = "protein shake" -/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake/New() +/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake/Initialize() ..() reagents.add_reagent("nutriment", 30) reagents.add_reagent("iron", 10) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index 6945776ecd..76667c687d 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -1,3864 +1,3864 @@ -//Food items that are eaten normally and don't leave anything behind. -/obj/item/weapon/reagent_containers/food/snacks - name = "snack" - desc = "yummy" - icon = 'icons/obj/food.dmi' - icon_state = null - var/bitesize = 1 - var/bitecount = 0 - var/trash = null - var/slice_path - var/slices_num - var/dried_type = null - var/dry = 0 - var/nutriment_amt = 0 - var/list/nutriment_desc = list("food" = 1) - center_of_mass = list("x"=16, "y"=16) - w_class = ITEMSIZE_SMALL - force = 1 - -/obj/item/weapon/reagent_containers/food/snacks/Initialize() - . = ..() - if(nutriment_amt) - reagents.add_reagent("nutriment",nutriment_amt,nutriment_desc) - -/obj/item/weapon/reagent_containers/food/snacks/Initialize() - . = ..() - if(nutriment_amt) - reagents.add_reagent("nutriment", nutriment_amt) - - //Placeholder for effect that trigger on eating that aren't tied to reagents. -/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/M) - if(!usr) - usr = M - if(!reagents.total_volume) - M.visible_message("[M] finishes eating \the [src].","You finish eating \the [src].") - usr.drop_from_inventory(src) //so icons update :[ - - if(trash) - if(ispath(trash,/obj/item)) - var/obj/item/TrashItem = new trash(usr) - usr.put_in_hands(TrashItem) - else if(istype(trash,/obj/item)) - usr.put_in_hands(trash) - qdel(src) - return - -/obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user as mob) - return - -/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) - if(reagents && !reagents.total_volume) - user << "None of [src] left!" - user.drop_from_inventory(src) - qdel(src) - return 0 - - if(istype(M, /mob/living/carbon)) - //TODO: replace with standard_feed_mob() call. - - var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) - if(M == user) //If you're eating it yourself - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(!H.check_has_mouth()) - user << "Where do you intend to put \the [src]? You don't have a mouth!" - return - var/obj/item/blocked = H.check_mouth_coverage() - if(blocked) - user << "\The [blocked] is in the way!" - return - - user.setClickCooldown(user.get_attack_speed(src)) //puts a limit on how fast people can eat/drink things - //VOREStation Edit Begin - if (fullness <= 50) - M << "You hungrily chew out a piece of [src] and gobble it!" - if (fullness > 50 && fullness <= 150) - M << "You hungrily begin to eat [src]." - if (fullness > 150 && fullness <= 350) - M << "You take a bite of [src]." - if (fullness > 350 && fullness <= 550) - M << "You unwillingly chew a bit of [src]." - if (fullness > (550 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat - M << "You cannot force any more of [src] to go down your throat." - return 0 - //VOREStation Edit End - - else if(user.a_intent == I_HURT) - return ..() - - else - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(!H.check_has_mouth()) - user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!" - return - var/obj/item/blocked = H.check_mouth_coverage() - if(blocked) - user << "\The [blocked] is in the way!" - return - - if (fullness <= (550 * (1 + M.overeatduration / 1000))) - user.visible_message("[user] attempts to feed [M] [src].") - else - user.visible_message("[user] cannot force anymore of [src] down [M]'s throat.") - return 0 - - user.setClickCooldown(user.get_attack_speed(src)) - if(!do_mob(user, M)) return - - //Do we really care about this - add_attack_logs(user,M,"Fed with [src.name] containing [reagentlist(src)]", admin_notify = FALSE) - - user.visible_message("[user] feeds [M] [src].") - - else - user << "This creature does not seem to have a mouth!" - return - - if(reagents) //Handle ingestion of the reagent. - playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1) - if(reagents.total_volume) - if(reagents.total_volume > bitesize) - reagents.trans_to_mob(M, bitesize, CHEM_INGEST) - else - reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) - bitecount++ - On_Consume(M) - return 1 - - return 0 - -/obj/item/weapon/reagent_containers/food/snacks/examine(mob/user) - if(!..(user, 1)) - return - if (bitecount==0) - return - else if (bitecount==1) - user << "\The [src] was bitten by someone!" - else if (bitecount<=3) - user << "\The [src] was bitten [bitecount] times!" - else - user << "\The [src] was bitten multiple times!" - -/obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/storage)) - ..() // -> item/attackby() - return - - // Eating with forks - if(istype(W,/obj/item/weapon/material/kitchen/utensil)) - var/obj/item/weapon/material/kitchen/utensil/U = W - if(U.scoop_food) - if(!U.reagents) - U.create_reagents(5) - - if (U.reagents.total_volume > 0) - user << "You already have something on your [U]." - return - - user.visible_message( \ - "[user] scoops up some [src] with \the [U]!", \ - "You scoop up some [src] with \the [U]!" \ - ) - - src.bitecount++ - U.overlays.Cut() - U.loaded = "[src]" - var/image/I = new(U.icon, "loadedfood") - I.color = src.filling_color - U.overlays += I - - reagents.trans_to_obj(U, min(reagents.total_volume,5)) - - if (reagents.total_volume <= 0) - qdel(src) - return - - if (is_sliceable()) - //these are used to allow hiding edge items in food that is not on a table/tray - var/can_slice_here = isturf(src.loc) && ((locate(/obj/structure/table) in src.loc) || (locate(/obj/machinery/optable) in src.loc) || (locate(/obj/item/weapon/tray) in src.loc)) - var/hide_item = !has_edge(W) || !can_slice_here - - if (hide_item) - if (W.w_class >= src.w_class || is_robot_module(W)) - return - - to_chat(user, "You slip \the [W] inside \the [src].") - user.drop_from_inventory(W, src) - add_fingerprint(user) - contents += W - return - - if (has_edge(W)) - if (!can_slice_here) - to_chat(user, "You cannot slice \the [src] here! You need a table or at least a tray to do it.") - return - - var/slices_lost = 0 - if (W.w_class > 3) - user.visible_message("\The [user] crudely slices \the [src] with [W]!", "You crudely slice \the [src] with your [W]!") - slices_lost = rand(1,min(1,round(slices_num/2))) - else - user.visible_message("\The [user] slices \the [src]!", "You slice \the [src]!") - - var/reagents_per_slice = reagents.total_volume/slices_num - for(var/i=1 to (slices_num-slices_lost)) - var/obj/slice = new slice_path (src.loc) - reagents.trans_to_obj(slice, reagents_per_slice) - qdel(src) - return - -/obj/item/weapon/reagent_containers/food/snacks/proc/is_sliceable() - return (slices_num && slice_path && slices_num > 0) - -/obj/item/weapon/reagent_containers/food/snacks/Destroy() - if(contents) - for(var/atom/movable/something in contents) - something.dropInto(loc) - . = ..() - -//////////////////////////////////////////////////////////////////////////////// -/// FOOD END -//////////////////////////////////////////////////////////////////////////////// -/obj/item/weapon/reagent_containers/food/snacks/attack_generic(var/mob/living/user) - if(!isanimal(user) && !isalien(user)) - return - user.visible_message("[user] nibbles away at \the [src].","You nibble away at \the [src].") - bitecount++ - if(reagents) - reagents.trans_to_mob(user, bitesize, CHEM_INGEST) - spawn(5) - if(!src && !user.client) - user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]") - qdel(src) - On_Consume(user) - -////////////////////////////////////////////////// -////////////////////////////////////////////Snacks -////////////////////////////////////////////////// -//Items in the "Snacks" subcategory are food items that people actually eat. The key points are that they are created -// already filled with reagents and are destroyed when empty. Additionally, they make a "munching" noise when eaten. - -//Notes by Darem: Food in the "snacks" subtype can hold a maximum of 50 units Generally speaking, you don't want to go over 40 -// total for the item because you want to leave space for extra condiments. If you want effect besides healing, add a reagent for -// it. Try to stick to existing reagents when possible (so if you want a stronger healing effect, just use Tricordrazine). On use -// effect (such as the old officer eating a donut code) requires a unique reagent (unless you can figure out a better way). - -//The nutriment reagent and bitesize variable replace the old heal_amt and amount variables. Each unit of nutriment is equal to -// 2 of the old heal_amt variable. Bitesize is the rate at which the reagents are consumed. So if you have 6 nutriment and a -// bitesize of 2, then it'll take 3 bites to eat. Unlike the old system, the contained reagents are evenly spread among all -// the bites. No more contained reagents = no more bites. - -//Here is an example of the new formatting for anyone who wants to add more food items. -///obj/item/weapon/reagent_containers/food/snacks/xenoburger //Identification path for the object. -// name = "Xenoburger" //Name that displays in the UI. -// desc = "Smells caustic. Tastes like heresy." //Duh -// icon_state = "xburger" //Refers to an icon in food.dmi -// New() //Don't mess with this. -// ..() //Same here. -// reagents.add_reagent("xenomicrobes", 10) //This is what is in the food item. you may copy/paste -// reagents.add_reagent("nutriment", 2) // this line of code for all the contents. -// bitesize = 3 //This is the amount each bite consumes. - - - - -/obj/item/weapon/reagent_containers/food/snacks/aesirsalad - name = "Aesir salad" - desc = "Probably too incredible for mortal men to fully enjoy." - icon_state = "aesirsalad" - trash = /obj/item/trash/snack_bowl - filling_color = "#468C00" - center_of_mass = list("x"=17, "y"=11) - nutriment_amt = 8 - nutriment_desc = list("apples" = 3,"salad" = 5) - -/obj/item/weapon/reagent_containers/food/snacks/aesirsalad/Initialize() - . = ..() - reagents.add_reagent("doctorsdelight", 8) - reagents.add_reagent("tricordrazine", 8) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/candy - name = "candy" - desc = "Nougat, love it or hate it." - icon_state = "candy" - trash = /obj/item/trash/candy - filling_color = "#7D5F46" - center_of_mass = list("x"=15, "y"=15) - nutriment_amt = 1 - nutriment_desc = list("candy" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/candy/Initialize() - . = ..() - reagents.add_reagent("sugar", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar - name = "protein bar" - desc = "SwoleMAX brand protein bars, guaranteed to get you feeling perfectly overconfident." - icon_state = "proteinbar" - trash = /obj/item/trash/candy/proteinbar - nutriment_amt = 9 - nutriment_desc = list("candy" = 1, "protein" = 8) - -/obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar/Initialize() - . = ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("sugar", 4) - bitesize = 6 - -/obj/item/weapon/reagent_containers/food/snacks/candy/donor - name = "Donor Candy" - desc = "A little treat for blood donors." - trash = /obj/item/trash/candy - nutriment_amt = 9 - nutriment_desc = list("candy" = 10) - -/obj/item/weapon/reagent_containers/food/snacks/candy/donor/Initialize() - . = ..() - reagents.add_reagent("sugar", 3) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/candy_corn - name = "candy corn" - desc = "It's a handful of candy corn. Cannot be stored in a detective's hat, alas." - icon_state = "candy_corn" - filling_color = "#FFFCB0" - center_of_mass = list("x"=14, "y"=10) - nutriment_amt = 4 - nutriment_desc = list("candy corn" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/candy_corn/Initialize() - ..() - reagents.add_reagent("sugar", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/chips - name = "chips" - desc = "Commander Riker's What-The-Crisps" - icon_state = "chips" - trash = /obj/item/trash/chips - filling_color = "#E8C31E" - center_of_mass = list("x"=15, "y"=15) - nutriment_amt = 3 - nutriment_desc = list("salt" = 1, "chips" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/chips/Initialize() - . = ..() - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/cookie - name = "cookie" - desc = "COOKIE!!!" - icon_state = "COOKIE!!!" - filling_color = "#DBC94F" - center_of_mass = list("x"=17, "y"=18) - nutriment_amt = 5 - nutriment_desc = list("sweetness" = 3, "cookie" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/cookie/Initialize() - . = ..() - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/chocolatebar - name = "Chocolate Bar" - desc = "Such sweet, fattening food." - icon_state = "chocolatebar" - filling_color = "#7D5F46" - center_of_mass = list("x"=15, "y"=15) - nutriment_amt = 2 - nutriment_desc = list("chocolate" = 5) - -/obj/item/weapon/reagent_containers/food/snacks/chocolatebar/Initialize() - . = ..() - reagents.add_reagent("sugar", 2) - reagents.add_reagent("coco", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/chocolatepiece - name = "chocolate piece" - desc = "A luscious milk chocolate piece filled with gooey caramel." - icon_state = "chocolatepiece" - filling_color = "#7D5F46" - center_of_mass = list("x"=15, "y"=15) - nutriment_amt = 1 - nutriment_desc = list("chocolate" = 3, "caramel" = 2, "lusciousness" = 1) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white - name = "white chocolate piece" - desc = "A creamy white chocolate piece drizzled in milk chocolate." - icon_state = "chocolatepiece_white" - filling_color = "#E2DAD3" - nutriment_desc = list("white chocolate" = 3, "creaminess" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle - name = "chocolate truffle" - desc = "A bite-sized milk chocolate truffle that could buy anyone's love." - icon_state = "chocolatepiece_truffle" - nutriment_desc = list("chocolate" = 3, "undying devotion" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/chocolateegg - name = "Chocolate Egg" - desc = "Such sweet, fattening food." - icon_state = "chocolateegg" - filling_color = "#7D5F46" - center_of_mass = list("x"=16, "y"=13) - nutriment_amt = 3 - nutriment_desc = list("chocolate" = 5) - -/obj/item/weapon/reagent_containers/food/snacks/chocolateegg/Initialize() - . = ..() - reagents.add_reagent("sugar", 2) - reagents.add_reagent("coco", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/donut - name = "donut" - desc = "Goes great with Robust Coffee." - icon_state = "donut1" - filling_color = "#D9C386" - var/overlay_state = "box-donut1" - center_of_mass = list("x"=13, "y"=16) - nutriment_desc = list("sweetness", "donut") - -/obj/item/weapon/reagent_containers/food/snacks/donut/normal - name = "donut" - desc = "Goes great with Robust Coffee." - icon_state = "donut1" - nutriment_amt = 3 - -/obj/item/weapon/reagent_containers/food/snacks/donut/normal/Initialize() - . = ..() - reagents.add_reagent("nutriment", 3) - reagents.add_reagent("sprinkles", 1) - src.bitesize = 3 - if(prob(30)) - src.icon_state = "donut2" - src.overlay_state = "box-donut2" - src.name = "frosted donut" - reagents.add_reagent("sprinkles", 2) - center_of_mass = list("x"=19, "y"=16) - -/obj/item/weapon/reagent_containers/food/snacks/donut/chaos - name = "Chaos Donut" - desc = "Like life, it never quite tastes the same." - icon_state = "donut1" - filling_color = "#ED11E6" - nutriment_amt = 2 - -/obj/item/weapon/reagent_containers/food/snacks/donut/chaos/Initialize() - . = ..() - reagents.add_reagent("sprinkles", 1) - bitesize = 10 - var/chaosselect = pick(1,2,3,4,5,6,7,8,9,10) - switch(chaosselect) - if(1) - reagents.add_reagent("nutriment", 3) - if(2) - reagents.add_reagent("capsaicin", 3) - if(3) - reagents.add_reagent("frostoil", 3) - if(4) - reagents.add_reagent("sprinkles", 3) - if(5) - reagents.add_reagent("phoron", 3) - if(6) - reagents.add_reagent("coco", 3) - if(7) - reagents.add_reagent("slimejelly", 3) - if(8) - reagents.add_reagent("banana", 3) - if(9) - reagents.add_reagent("berryjuice", 3) - if(10) - reagents.add_reagent("tricordrazine", 3) - if(prob(30)) - src.icon_state = "donut2" - src.overlay_state = "box-donut2" - src.name = "Frosted Chaos Donut" - reagents.add_reagent("sprinkles", 2) - -/obj/item/weapon/reagent_containers/food/snacks/donut/jelly - name = "Jelly Donut" - desc = "You jelly?" - icon_state = "jdonut1" - filling_color = "#ED1169" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 3 - -/obj/item/weapon/reagent_containers/food/snacks/donut/jelly/Initialize() - . = ..() - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("berryjuice", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.overlay_state = "box-donut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) - -/obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly - name = "Jelly Donut" - desc = "You jelly?" - icon_state = "jdonut1" - filling_color = "#ED1169" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 3 - -/obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly/Initialize() - . = ..() - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("slimejelly", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.overlay_state = "box-donut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) - -/obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly - name = "Jelly Donut" - desc = "You jelly?" - icon_state = "jdonut1" - filling_color = "#ED1169" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 3 - -/obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly/Initialize() - . = ..() - reagents.add_reagent("sprinkles", 1) - reagents.add_reagent("cherryjelly", 5) - bitesize = 5 - if(prob(30)) - src.icon_state = "jdonut2" - src.overlay_state = "box-donut2" - src.name = "Frosted Jelly Donut" - reagents.add_reagent("sprinkles", 2) - -/obj/item/weapon/reagent_containers/food/snacks/egg - name = "egg" - desc = "An egg!" - icon_state = "egg" - filling_color = "#FDFFD1" - volume = 10 - center_of_mass = list("x"=16, "y"=13) - -/obj/item/weapon/reagent_containers/food/snacks/egg/Initialize() - . = ..() - reagents.add_reagent("egg", 3) - -/obj/item/weapon/reagent_containers/food/snacks/egg/afterattack(obj/O as obj, mob/user as mob, proximity) - if(istype(O,/obj/machinery/microwave)) - return ..() - if(!(proximity && O.is_open_container())) - return - user << "You crack \the [src] into \the [O]." - reagents.trans_to(O, reagents.total_volume) - user.drop_from_inventory(src) - qdel(src) - -/obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom) - ..() - new/obj/effect/decal/cleanable/egg_smudge(src.loc) - src.reagents.splash(hit_atom, reagents.total_volume) - src.visible_message("[src.name] has been squashed.","You hear a smack.") - qdel(src) - -/obj/item/weapon/reagent_containers/food/snacks/egg/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype( W, /obj/item/weapon/pen/crayon )) - var/obj/item/weapon/pen/crayon/C = W - var/clr = C.colourName - - if(!(clr in list("blue","green","mime","orange","purple","rainbow","red","yellow"))) - usr << "The egg refuses to take on this color!" - return - - usr << "You color \the [src] [clr]" - icon_state = "egg-[clr]" - else - ..() - -/obj/item/weapon/reagent_containers/food/snacks/egg/blue - icon_state = "egg-blue" - -/obj/item/weapon/reagent_containers/food/snacks/egg/green - icon_state = "egg-green" - -/obj/item/weapon/reagent_containers/food/snacks/egg/mime - icon_state = "egg-mime" - -/obj/item/weapon/reagent_containers/food/snacks/egg/orange - icon_state = "egg-orange" - -/obj/item/weapon/reagent_containers/food/snacks/egg/purple - icon_state = "egg-purple" - -/obj/item/weapon/reagent_containers/food/snacks/egg/rainbow - icon_state = "egg-rainbow" - -/obj/item/weapon/reagent_containers/food/snacks/egg/red - icon_state = "egg-red" - -/obj/item/weapon/reagent_containers/food/snacks/egg/yellow - icon_state = "egg-yellow" - -/obj/item/weapon/reagent_containers/food/snacks/friedegg - name = "Fried egg" - desc = "A fried egg, with a touch of salt and pepper." - icon_state = "friedegg" - filling_color = "#FFDF78" - center_of_mass = list("x"=16, "y"=14) - -/obj/item/weapon/reagent_containers/food/snacks/friedegg/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/boiledegg - name = "Boiled egg" - desc = "A hard boiled egg." - icon_state = "egg" - filling_color = "#FFFFFF" - -/obj/item/weapon/reagent_containers/food/snacks/boiledegg/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - -/obj/item/weapon/reagent_containers/food/snacks/organ - name = "organ" - desc = "It's good for you." - icon = 'icons/obj/surgery.dmi' - icon_state = "appendix" - filling_color = "#E00D34" - center_of_mass = list("x"=16, "y"=16) - -/obj/item/weapon/reagent_containers/food/snacks/organ/Initialize() - . = ..() - reagents.add_reagent("protein", rand(3,5)) - reagents.add_reagent("toxin", rand(1,3)) - src.bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/tofu - name = "Tofu" - icon_state = "tofu" - desc = "We all love tofu." - filling_color = "#FFFEE0" - center_of_mass = list("x"=17, "y"=10) - nutriment_amt = 3 - nutriment_desc = list("tofu" = 3, "goeyness" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/tofu/Initialize() - . = ..() - src.bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/tofurkey - name = "Tofurkey" - desc = "A fake turkey made from tofu." - icon_state = "tofurkey" - filling_color = "#FFFEE0" - center_of_mass = list("x"=16, "y"=8) - nutriment_amt = 12 - nutriment_desc = list("turkey" = 3, "tofu" = 5, "goeyness" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/tofurkey/Initialize() - . = ..() - reagents.add_reagent("stoxin", 3) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/stuffing - name = "Stuffing" - desc = "Moist, peppery breadcrumbs for filling the body cavities of dead birds. Dig in!" - icon_state = "stuffing" - filling_color = "#C9AC83" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 3 - nutriment_desc = list("dryness" = 2, "bread" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/stuffing/Initialize() - . = ..() - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/carpmeat - name = "carp fillet" - desc = "A fillet of spess carp meat" - icon_state = "fishfillet" - filling_color = "#FFDEFE" - center_of_mass = list("x"=17, "y"=13) - -/obj/item/weapon/reagent_containers/food/snacks/carpmeat/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("carpotoxin", 3) - src.bitesize = 6 - -/obj/item/weapon/reagent_containers/food/snacks/fishfingers - name = "Fish Fingers" - desc = "A finger of fish." - icon_state = "fishfingers" - filling_color = "#FFDEFE" - center_of_mass = list("x"=16, "y"=13) - -/obj/item/weapon/reagent_containers/food/snacks/fishfingers/Initialize() - . = ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice - name = "huge mushroom slice" - desc = "A slice from a huge mushroom." - icon_state = "hugemushroomslice" - filling_color = "#E0D7C5" - center_of_mass = list("x"=17, "y"=16) - nutriment_amt = 3 - nutriment_desc = list("raw" = 2, "mushroom" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice/Initialize() - . = ..() - reagents.add_reagent("psilocybin", 3) - src.bitesize = 6 - -/obj/item/weapon/reagent_containers/food/snacks/tomatomeat - name = "tomato slice" - desc = "A slice from a huge tomato" - icon_state = "tomatomeat" - filling_color = "#DB0000" - center_of_mass = list("x"=17, "y"=16) - nutriment_amt = 3 - nutriment_desc = list("raw" = 2, "tomato" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/tomatomeat/Initialize() - . = ..() - src.bitesize = 6 - -/obj/item/weapon/reagent_containers/food/snacks/bearmeat - name = "bear meat" - desc = "A very manly slab of meat." - icon_state = "bearmeat" - filling_color = "#DB0000" - center_of_mass = list("x"=16, "y"=10) - -/obj/item/weapon/reagent_containers/food/snacks/bearmeat/Initialize() - . = ..() - reagents.add_reagent("protein", 12) - reagents.add_reagent("hyperzine", 5) - src.bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/xenomeat - name = "xenomeat" - desc = "A slab of green meat. Smells like acid." - icon_state = "xenomeat" - filling_color = "#43DE18" - center_of_mass = list("x"=16, "y"=10) - -/obj/item/weapon/reagent_containers/food/snacks/xenomeat/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("pacid",6) - src.bitesize = 6 - -/obj/item/weapon/reagent_containers/food/snacks/xenomeat/spidermeat // Substitute for recipes requiring xeno meat. - name = "spider meat" - desc = "A slab of green meat." - icon_state = "xenomeat" - filling_color = "#43DE18" - center_of_mass = list("x"=16, "y"=10) - -/obj/item/weapon/reagent_containers/food/snacks/xenomeat/spidermeat/Initialize() - . = ..() - reagents.add_reagent("spidertoxin",6) - reagents.remove_reagent("pacid",6) - src.bitesize = 6 - -/obj/item/weapon/reagent_containers/food/snacks/meatball - name = "meatball" - desc = "A great meal all round." - icon_state = "meatball" - filling_color = "#DB0000" - center_of_mass = list("x"=16, "y"=16) - -/obj/item/weapon/reagent_containers/food/snacks/meatball/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/sausage - name = "Sausage" - desc = "A piece of mixed, long meat." - icon_state = "sausage" - filling_color = "#DB0000" - center_of_mass = list("x"=16, "y"=16) - -/obj/item/weapon/reagent_containers/food/snacks/sausage/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/donkpocket - name = "Donk-pocket" - desc = "The food of choice for the seasoned traitor." - icon_state = "donkpocket" - filling_color = "#DEDEAB" - center_of_mass = list("x"=16, "y"=10) - var/warm - var/list/heated_reagents - -/obj/item/weapon/reagent_containers/food/snacks/donkpocket/Initialize() - . = ..() - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("protein", 2) - - warm = 0 - heated_reagents = list("tricordrazine" = 5) - -/obj/item/weapon/reagent_containers/food/snacks/donkpocket/proc/heat() - warm = 1 - for(var/reagent in heated_reagents) - reagents.add_reagent(reagent, heated_reagents[reagent]) - bitesize = 6 - name = "Warm " + name - cooltime() - -/obj/item/weapon/reagent_containers/food/snacks/donkpocket/proc/cooltime() - if (src.warm) - spawn(4200) - src.warm = 0 - for(var/reagent in heated_reagents) - src.reagents.del_reagent(reagent) - src.name = initial(name) - return - -/obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket - name = "\improper Sin-pocket" - desc = "The food of choice for the veteran. Do NOT overconsume." - filling_color = "#6D6D00" - heated_reagents = list("doctorsdelight" = 5, "hyperzine" = 0.75, "synaptizine" = 0.25) - var/has_been_heated = 0 - -/obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket/attack_self(mob/user) - if(has_been_heated) - user << "The heating chemicals have already been spent." - return - has_been_heated = 1 - user.visible_message("[user] crushes \the [src] package.", "You crush \the [src] package and feel a comfortable heat build up.") - spawn(200) - user << "You think \the [src] is ready to eat about now." - heat() - -/obj/item/weapon/reagent_containers/food/snacks/brainburger - name = "brainburger" - desc = "A strange looking burger. It looks almost sentient." - icon_state = "brainburger" - filling_color = "#F2B6EA" - center_of_mass = list("x"=15, "y"=11) - -/obj/item/weapon/reagent_containers/food/snacks/brainburger/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("alkysine", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/ghostburger - name = "Ghost Burger" - desc = "Spooky! It doesn't look very filling." - icon_state = "ghostburger" - filling_color = "#FFF2FF" - center_of_mass = list("x"=16, "y"=11) - nutriment_desc = list("buns" = 3, "spookiness" = 3) - nutriment_amt = 2 - -/obj/item/weapon/reagent_containers/food/snacks/ghostburger/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/human - var/hname = "" - var/job = null - filling_color = "#D63C3C" - -/obj/item/weapon/reagent_containers/food/snacks/human/burger - name = "-burger" - desc = "A bloody burger." - icon_state = "hburger" - center_of_mass = list("x"=16, "y"=11) - -/obj/item/weapon/reagent_containers/food/snacks/human/burger/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/cheeseburger - name = "cheeseburger" - desc = "The cheese adds a good flavor." - icon_state = "cheeseburger" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 2 - nutriment_desc = list("cheese" = 2, "bun" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/cheeseburger/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - -/obj/item/weapon/reagent_containers/food/snacks/monkeyburger - name = "burger" - desc = "The cornerstone of every nutritious breakfast." - icon_state = "hburger" - filling_color = "#D63C3C" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 3 - nutriment_desc = list("bun" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/monkeyburger/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/fishburger - name = "Fillet -o- Carp Sandwich" - desc = "Almost like a carp is yelling somewhere... Give me back that fillet -o- carp, give me that carp." - icon_state = "fishburger" - filling_color = "#FFDEFE" - center_of_mass = list("x"=16, "y"=10) - -/obj/item/weapon/reagent_containers/food/snacks/fishburger/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/tofuburger - name = "Tofu Burger" - desc = "What.. is that meat?" - icon_state = "tofuburger" - filling_color = "#FFFEE0" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 6 - nutriment_desc = list("bun" = 2, "pseudo-soy meat" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/tofuburger/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/roburger - name = "roburger" - desc = "The lettuce is the only organic component. Beep." - icon_state = "roburger" - filling_color = "#CCCCCC" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 2 - nutriment_desc = list("bun" = 2, "metal" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/roburger/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/roburgerbig - name = "roburger" - desc = "This massive patty looks like poison. Beep." - icon_state = "roburger" - filling_color = "#CCCCCC" - volume = 100 - center_of_mass = list("x"=16, "y"=11) - -/obj/item/weapon/reagent_containers/food/snacks/roburgerbig/Initialize() - . = ..() - bitesize = 0.1 - -/obj/item/weapon/reagent_containers/food/snacks/xenoburger - name = "xenoburger" - desc = "Smells caustic. Tastes like heresy." - icon_state = "xburger" - filling_color = "#43DE18" - center_of_mass = list("x"=16, "y"=11) - -/obj/item/weapon/reagent_containers/food/snacks/xenoburger/Initialize() - . = ..() - reagents.add_reagent("protein", 8) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/clownburger - name = "Clown Burger" - desc = "This tastes funny..." - icon_state = "clownburger" - filling_color = "#FF00FF" - center_of_mass = list("x"=17, "y"=12) - nutriment_amt = 6 - nutriment_desc = list("bun" = 2, "clown shoe" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/clownburger/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/mimeburger - name = "Mime Burger" - desc = "Its taste defies language." - icon_state = "mimeburger" - filling_color = "#FFFFFF" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 6 - nutriment_desc = list("bun" = 2, "face paint" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/mimeburger/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/omelette - name = "Omelette Du Fromage" - desc = "That's all you can say!" - icon_state = "omelette" - trash = /obj/item/trash/plate - filling_color = "#FFF9A8" - center_of_mass = list("x"=16, "y"=13) - -/obj/item/weapon/reagent_containers/food/snacks/omelette/Initialize() - . = ..() - reagents.add_reagent("protein", 8) - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/muffin - name = "Muffin" - desc = "A delicious and spongy little cake" - icon_state = "muffin" - filling_color = "#E0CF9B" - center_of_mass = list("x"=17, "y"=4) - nutriment_amt = 6 - nutriment_desc = list("sweetness" = 3, "muffin" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/muffin/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/pie - name = "Banana Cream Pie" - desc = "Just like back home, on clown planet! HONK!" - icon_state = "pie" - trash = /obj/item/trash/plate - filling_color = "#FBFFB8" - center_of_mass = list("x"=16, "y"=13) - nutriment_amt = 4 - nutriment_desc = list("pie" = 3, "cream" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/pie/Initialize() - . = ..() - reagents.add_reagent("banana",5) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/pie/throw_impact(atom/hit_atom) - ..() - new/obj/effect/decal/cleanable/pie_smudge(src.loc) - src.visible_message("\The [src.name] splats.","You hear a splat.") - qdel(src) - -/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis - name = "Berry Clafoutis" - desc = "No black birds, this is a good sign." - icon_state = "berryclafoutis" - trash = /obj/item/trash/plate - center_of_mass = list("x"=16, "y"=13) - nutriment_amt = 4 - nutriment_desc = list("sweetness" = 2, "pie" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis/Initialize() - . = ..() - reagents.add_reagent("berryjuice", 5) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/waffles - name = "waffles" - desc = "Mmm, waffles" - icon_state = "waffles" - trash = /obj/item/trash/waffles - filling_color = "#E6DEB5" - center_of_mass = list("x"=15, "y"=11) - nutriment_amt = 8 - nutriment_desc = list("waffle" = 8) - -/obj/item/weapon/reagent_containers/food/snacks/waffles/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/eggplantparm - name = "Eggplant Parmigiana" - desc = "The only good recipe for eggplant." - icon_state = "eggplantparm" - trash = /obj/item/trash/plate - filling_color = "#4D2F5E" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 6 - nutriment_desc = list("cheese" = 3, "eggplant" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/eggplantparm/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/soylentgreen - name = "Soylent Green" - desc = "Not made of people. Honest." //Totally people. - icon_state = "soylent_green" - trash = /obj/item/trash/waffles - filling_color = "#B8E6B5" - center_of_mass = list("x"=15, "y"=11) - -/obj/item/weapon/reagent_containers/food/snacks/soylentgreen/Initialize() - . = ..() - reagents.add_reagent("protein", 10) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/soylenviridians - name = "Soylen Virdians" - desc = "Not made of people. Honest." //Actually honest for once. - icon_state = "soylent_yellow" - trash = /obj/item/trash/waffles - filling_color = "#E6FA61" - center_of_mass = list("x"=15, "y"=11) - nutriment_amt = 10 - nutriment_desc = list("some sort of protein" = 10) //seasoned VERY well. - -/obj/item/weapon/reagent_containers/food/snacks/soylenviridians/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/meatpie - name = "Meat-pie" - icon_state = "meatpie" - desc = "An old barber recipe, very delicious!" - trash = /obj/item/trash/plate - filling_color = "#948051" - center_of_mass = list("x"=16, "y"=13) - -/obj/item/weapon/reagent_containers/food/snacks/meatpie/Initialize() - . = ..() - reagents.add_reagent("protein", 10) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/tofupie - name = "Tofu-pie" - icon_state = "meatpie" - desc = "A delicious tofu pie." - trash = /obj/item/trash/plate - filling_color = "#FFFEE0" - center_of_mass = list("x"=16, "y"=13) - nutriment_amt = 10 - nutriment_desc = list("tofu" = 2, "pie" = 8) - -/obj/item/weapon/reagent_containers/food/snacks/tofupie/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/amanita_pie - name = "amanita pie" - desc = "Sweet and tasty poison pie." - icon_state = "amanita_pie" - filling_color = "#FFCCCC" - center_of_mass = list("x"=17, "y"=9) - nutriment_amt = 5 - nutriment_desc = list("sweetness" = 3, "mushroom" = 3, "pie" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/amanita_pie/Initialize() - ..() - reagents.add_reagent("amatoxin", 3) - reagents.add_reagent("psilocybin", 1) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/plump_pie - name = "plump pie" - desc = "I bet you love stuff made out of plump helmets!" - icon_state = "plump_pie" - filling_color = "#B8279B" - center_of_mass = list("x"=17, "y"=9) - nutriment_amt = 8 - nutriment_desc = list("heartiness" = 2, "mushroom" = 3, "pie" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/plump_pie/Initialize() - ..() - if(prob(10)) - name = "exceptional plump pie" - desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" - reagents.add_reagent("nutriment", 8) - reagents.add_reagent("tricordrazine", 5) - bitesize = 2 - else - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/xemeatpie - name = "Xeno-pie" - icon_state = "xenomeatpie" - desc = "A delicious meatpie. Probably heretical." - trash = /obj/item/trash/plate - filling_color = "#43DE18" - center_of_mass = list("x"=16, "y"=13) - -/obj/item/weapon/reagent_containers/food/snacks/xemeatpie/Initialize() - . = ..() - reagents.add_reagent("protein", 10) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/wingfangchu - name = "Wing Fang Chu" - desc = "A savory dish of alien wing wang in soy." - icon_state = "wingfangchu" - trash = /obj/item/trash/snack_bowl - filling_color = "#43DE18" - center_of_mass = list("x"=17, "y"=9) - -/obj/item/weapon/reagent_containers/food/snacks/wingfangchu/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/human/kabob - name = "-kabob" - icon_state = "kabob" - desc = "A human meat, on a stick." - trash = /obj/item/stack/rods - filling_color = "#A85340" - center_of_mass = list("x"=17, "y"=15) - -/obj/item/weapon/reagent_containers/food/snacks/human/kabob/Initialize() - . = ..() - reagents.add_reagent("protein", 8) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/monkeykabob - name = "Meat-kabob" - icon_state = "kabob" - desc = "Delicious meat, on a stick." - trash = /obj/item/stack/rods - filling_color = "#A85340" - center_of_mass = list("x"=17, "y"=15) - -/obj/item/weapon/reagent_containers/food/snacks/monkeykabob/Initialize() - . = ..() - reagents.add_reagent("protein", 8) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/tofukabob - name = "Tofu-kabob" - icon_state = "kabob" - desc = "Vegan meat, on a stick." - trash = /obj/item/stack/rods - filling_color = "#FFFEE0" - - center_of_mass = list("x"=17, "y"=15) - nutriment_amt = 8 - nutriment_desc = list("tofu" = 3, "metal" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/tofukabob/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/cubancarp - name = "Cuban Carp" - desc = "A sandwich that burns your tongue and then leaves it numb!" - icon_state = "cubancarp" - trash = /obj/item/trash/plate - filling_color = "#E9ADFF" - center_of_mass = list("x"=12, "y"=5) - nutriment_amt = 3 - nutriment_desc = list("toasted bread" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/cubancarp/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("carpotoxin", 3) - reagents.add_reagent("capsaicin", 3) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/popcorn - name = "Popcorn" - desc = "Now let's find some cinema." - icon_state = "popcorn" - trash = /obj/item/trash/popcorn - var/unpopped = 0 - filling_color = "#FFFAD4" - center_of_mass = list("x"=16, "y"=8) - nutriment_amt = 2 - nutriment_desc = list("popcorn" = 3) - - -/obj/item/weapon/reagent_containers/food/snacks/popcorn/Initialize() - . = ..() - unpopped = rand(1,10) - bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 - -/obj/item/weapon/reagent_containers/food/snacks/popcorn/On_Consume() - if(prob(unpopped)) //lol ...what's the point? - usr << "You bite down on an un-popped kernel!" - unpopped = max(0, unpopped-1) - ..() - -/obj/item/weapon/reagent_containers/food/snacks/sosjerky - name = "Scaredy's Private Reserve Beef Jerky" - icon_state = "sosjerky" - desc = "Beef jerky made from the finest space cows." - trash = /obj/item/trash/sosjerky - filling_color = "#631212" - center_of_mass = list("x"=15, "y"=9) - -/obj/item/weapon/reagent_containers/food/snacks/sosjerky/Initialize() - ..() - reagents.add_reagent("protein", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/no_raisin - name = "4no Raisins" - icon_state = "4no_raisins" - desc = "Best raisins in the universe. Not sure why." - trash = /obj/item/trash/raisins - filling_color = "#343834" - center_of_mass = list("x"=15, "y"=4) - nutriment_amt = 6 - nutriment_desc = list("dried raisins" = 6) - -/obj/item/weapon/reagent_containers/food/snacks/no_raisin/Initialize() - ..() - reagents.add_reagent("nutriment", 6) - -/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie - name = "Space Twinkie" - icon_state = "space_twinkie" - desc = "Guaranteed to survive longer then you will." - filling_color = "#FFE591" - center_of_mass = list("x"=15, "y"=11) - -/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie/Initialize() - . = ..() - reagents.add_reagent("sugar", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers - name = "Cheesie Honkers" - icon_state = "cheesie_honkers" - desc = "Bite sized cheesie snacks that will honk all over your mouth" - trash = /obj/item/trash/cheesie - filling_color = "#FFA305" - center_of_mass = list("x"=15, "y"=9) - nutriment_amt = 4 - nutriment_desc = list("cheese" = 5, "chips" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/syndicake - name = "Syndi-Cakes" - icon_state = "syndi_cakes" - desc = "An extremely moist snack cake that tastes just as good after being nuked." - filling_color = "#FF5D05" - center_of_mass = list("x"=16, "y"=10) - trash = /obj/item/trash/syndi_cakes - nutriment_amt = 4 - nutriment_desc = list("sweetness" = 3, "cake" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/syndicake/Initialize() - . = ..() - reagents.add_reagent("doctorsdelight", 5) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato - name = "Loaded Baked Potato" - desc = "Totally baked." - icon_state = "loadedbakedpotato" - filling_color = "#9C7A68" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 3 - nutriment_desc = list("baked potato" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/fries - name = "Space Fries" - desc = "AKA: French Fries, Freedom Fries, etc." - icon_state = "fries" - trash = /obj/item/trash/plate - filling_color = "#EDDD00" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 4 - nutriment_desc = list("fresh fries" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/fries/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/mashedpotato - name = "Mashed Potato" - desc = "Pillowy mounds of mashed potato." - icon_state = "mashedpotato" - trash = /obj/item/trash/plate - filling_color = "#EDDD00" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 4 - nutriment_desc = list("fluffy mashed potatoes" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/mashedpotato/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/bangersandmash - name = "Bangers and Mash" - desc = "An English treat." - icon_state = "bangersandmash" - trash = /obj/item/trash/plate - filling_color = "#EDDD00" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 4 - nutriment_desc = list("fluffy potato" = 3, "sausage" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/bangersandmash/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - bitesize = 4 - -/obj/item/weapon/reagent_containers/food/snacks/cheesymash - name = "Cheesy Mashed Potato" - desc = "The only thing that could make mash better." - icon_state = "cheesymash" - trash = /obj/item/trash/plate - filling_color = "#EDDD00" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 4 - nutriment_desc = list("cheesy potato" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/cheesymash/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/blackpudding - name = "Black Pudding" - desc = "This doesn't seem like a pudding at all." - icon_state = "blackpudding" - filling_color = "#FF0000" - center_of_mass = list("x"=16, "y"=7) - -/obj/item/weapon/reagent_containers/food/snacks/blackpudding/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("blood", 5) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/soydope - name = "Soy Dope" - desc = "Dope from a soy." - icon_state = "soydope" - trash = /obj/item/trash/plate - filling_color = "#C4BF76" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 2 - nutriment_desc = list("slime" = 2, "soy" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/soydope/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/spagetti - name = "Spaghetti" - desc = "A bundle of raw spaghetti." - icon_state = "spagetti" - filling_color = "#EDDD00" - center_of_mass = list("x"=16, "y"=16) - nutriment_amt = 1 - nutriment_desc = list("noodles" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/spagetti/Initialize() - . = ..() - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/cheesyfries - name = "Cheesy Fries" - desc = "Fries. Covered in cheese. Duh." - icon_state = "cheesyfries" - trash = /obj/item/trash/plate - filling_color = "#EDDD00" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 4 - nutriment_desc = list("fresh fries" = 3, "cheese" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/cheesyfries/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/fortunecookie - name = "Fortune cookie" - desc = "A true prophecy in each cookie!" - icon_state = "fortune_cookie" - filling_color = "#E8E79E" - center_of_mass = list("x"=15, "y"=14) - nutriment_amt = 3 - nutriment_desc = list("fortune cookie" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/badrecipe - name = "Burned mess" - desc = "Someone should be demoted from chef for this." - icon_state = "badrecipe" - filling_color = "#211F02" - center_of_mass = list("x"=16, "y"=12) - -/obj/item/weapon/reagent_containers/food/snacks/badrecipe/Initialize() - . = ..() - reagents.add_reagent("toxin", 1) - reagents.add_reagent("carbon", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/meatsteak - name = "Meat steak" - desc = "A piece of hot spicy meat." - icon_state = "meatstake" - trash = /obj/item/trash/plate - filling_color = "#7A3D11" - center_of_mass = list("x"=16, "y"=13) - -/obj/item/weapon/reagent_containers/food/snacks/meatsteak/Initialize() - . = ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("sodiumchloride", 1) - reagents.add_reagent("blackpepper", 1) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff - name = "Spacy Liberty Duff" - desc = "Jello gelatin, from Alfred Hubbard's cookbook" - icon_state = "spacylibertyduff" - trash = /obj/item/trash/snack_bowl - filling_color = "#42B873" - center_of_mass = list("x"=16, "y"=8) - nutriment_amt = 6 - nutriment_desc = list("mushroom" = 6) - -/obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff/Initialize() - . = ..() - reagents.add_reagent("psilocybin", 6) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/amanitajelly - name = "Amanita Jelly" - desc = "Looks curiously toxic" - icon_state = "amanitajelly" - trash = /obj/item/trash/snack_bowl - filling_color = "#ED0758" - center_of_mass = list("x"=16, "y"=5) - nutriment_amt = 6 - nutriment_desc = list("jelly" = 3, "mushroom" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/Initialize() - . = ..() - reagents.add_reagent("amatoxin", 6) - reagents.add_reagent("psilocybin", 3) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/poppypretzel - name = "Poppy pretzel" - desc = "It's all twisted up!" - icon_state = "poppypretzel" - bitesize = 2 - filling_color = "#916E36" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 5 - nutriment_desc = list("poppy seeds" = 2, "pretzel" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/poppypretzel/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/meatballsoup - name = "Meatball soup" - desc = "You've got balls kid, BALLS!" - icon_state = "meatballsoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#785210" - center_of_mass = list("x"=16, "y"=8) - -/obj/item/weapon/reagent_containers/food/snacks/meatballsoup/Initialize() - . = ..() - reagents.add_reagent("protein", 8) - reagents.add_reagent("water", 5) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/slimesoup - name = "slime soup" - desc = "If no water is available, you may substitute tears." - icon_state = "slimesoup" //nonexistant? - filling_color = "#C4DBA0" - -/obj/item/weapon/reagent_containers/food/snacks/slimesoup/Initialize() - . = ..() - reagents.add_reagent("slimejelly", 5) - reagents.add_reagent("water", 10) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/bloodsoup - name = "Tomato soup" - desc = "Smells like copper." - icon_state = "tomatosoup" - filling_color = "#FF0000" - center_of_mass = list("x"=16, "y"=7) - -/obj/item/weapon/reagent_containers/food/snacks/bloodsoup/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("blood", 10) - reagents.add_reagent("water", 5) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/clownstears - name = "Clown's Tears" - desc = "Not very funny." - icon_state = "clownstears" - filling_color = "#C4FBFF" - center_of_mass = list("x"=16, "y"=7) - nutriment_amt = 4 - nutriment_desc = list("salt" = 1, "the worst joke" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/clownstears/Initialize() - . = ..() - reagents.add_reagent("banana", 5) - reagents.add_reagent("water", 10) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/vegetablesoup - name = "Vegetable soup" - desc = "A true vegan meal" //TODO - icon_state = "vegetablesoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#AFC4B5" - center_of_mass = list("x"=16, "y"=8) - nutriment_amt = 8 - nutriment_desc = list("carot" = 2, "corn" = 2, "eggplant" = 2, "potato" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/vegetablesoup/Initialize() - . = ..() - reagents.add_reagent("water", 5) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/nettlesoup - name = "Nettle soup" - desc = "To think, the botanist would've beat you to death with one of these." - icon_state = "nettlesoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#AFC4B5" - center_of_mass = list("x"=16, "y"=7) - nutriment_amt = 8 - nutriment_desc = list("salad" = 4, "egg" = 2, "potato" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/nettlesoup/Initialize() - . = ..() - reagents.add_reagent("water", 5) - reagents.add_reagent("tricordrazine", 5) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/mysterysoup - name = "Mystery soup" - desc = "The mystery is, why aren't you eating it?" - icon_state = "mysterysoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#F082FF" - center_of_mass = list("x"=16, "y"=6) - nutriment_amt = 1 - nutriment_desc = list("backwash" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/mysterysoup/Initialize() - . = ..() - var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) - switch(mysteryselect) - if(1) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("capsaicin", 3) - reagents.add_reagent("tomatojuice", 2) - if(2) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("frostoil", 3) - reagents.add_reagent("tomatojuice", 2) - if(3) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("water", 5) - reagents.add_reagent("tricordrazine", 5) - if(4) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("water", 10) - if(5) - reagents.add_reagent("nutriment", 2) - reagents.add_reagent("banana", 10) - if(6) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("blood", 10) - if(7) - reagents.add_reagent("slimejelly", 10) - reagents.add_reagent("water", 10) - if(8) - reagents.add_reagent("carbon", 10) - reagents.add_reagent("toxin", 10) - if(9) - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("tomatojuice", 10) - if(10) - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("tomatojuice", 5) - reagents.add_reagent("imidazoline", 5) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/wishsoup - name = "Wish Soup" - desc = "I wish this was soup." - icon_state = "wishsoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#D1F4FF" - center_of_mass = list("x"=16, "y"=11) - -/obj/item/weapon/reagent_containers/food/snacks/wishsoup/Initialize() - . = ..() - reagents.add_reagent("water", 10) - bitesize = 5 - if(prob(25)) - src.desc = "A wish come true!" - reagents.add_reagent("nutriment", 8, list("something good" = 8)) - -/obj/item/weapon/reagent_containers/food/snacks/hotchili - name = "Hot Chili" - desc = "A five alarm Texan Chili!" - icon_state = "hotchili" - trash = /obj/item/trash/snack_bowl - filling_color = "#FF3C00" - center_of_mass = list("x"=15, "y"=9) - nutriment_amt = 3 - nutriment_desc = list("chilli peppers" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/hotchili/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("capsaicin", 3) - reagents.add_reagent("tomatojuice", 2) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/coldchili - name = "Cold Chili" - desc = "This slush is barely a liquid!" - icon_state = "coldchili" - filling_color = "#2B00FF" - center_of_mass = list("x"=15, "y"=9) - trash = /obj/item/trash/snack_bowl - nutriment_amt = 3 - nutriment_desc = list("ice peppers" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/coldchili/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("frostoil", 3) - reagents.add_reagent("tomatojuice", 2) - bitesize = 5 - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube - name = "monkey cube" - desc = "Just add water!" - flags = OPENCONTAINER - icon_state = "monkeycube" - bitesize = 12 - filling_color = "#ADAC7F" - center_of_mass = list("x"=16, "y"=14) - - var/wrapped = 0 - var/monkey_type = "Monkey" - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/Initialize() - . = ..() - reagents.add_reagent("protein", 10) - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/attack_self(mob/user as mob) - if(wrapped) - Unwrap(user) - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Expand() - src.visible_message("\The [src] expands!") - var/mob/living/carbon/human/H = new(get_turf(src)) - H.set_species(monkey_type) - H.real_name = H.species.get_random_name() - H.name = H.real_name - if(ismob(loc)) - var/mob/M = loc - M.unEquip(src) - qdel(src) - return 1 - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Unwrap(mob/user as mob) - icon_state = "monkeycube" - desc = "Just add water!" - to_chat(user, "You unwrap the cube.") - wrapped = 0 - flags |= OPENCONTAINER - return - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/On_Consume(var/mob/M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - H.visible_message("A screeching creature bursts out of [M]'s chest!") - var/obj/item/organ/external/organ = H.get_organ(BP_TORSO) - organ.take_damage(50, 0, 0, "Animal escaping the ribcage") - Expand() - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/on_reagent_change() - if(reagents.has_reagent("water")) - Expand() - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped - desc = "Still wrapped in some paper." - icon_state = "monkeycubewrap" - flags = 0 - wrapped = 1 - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/farwacube - name = "farwa cube" - monkey_type = "Farwa" - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube - name = "farwa cube" - monkey_type = "Farwa" - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/stokcube - name = "stok cube" - monkey_type = "Stok" - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube - name = "stok cube" - monkey_type = "Stok" - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/neaeracube - name = "neaera cube" - monkey_type = "Neaera" - -/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube - name = "neaera cube" - monkey_type = "Neaera" - -/obj/item/weapon/reagent_containers/food/snacks/spellburger - name = "Spell Burger" - desc = "This is absolutely Ei Nath." - icon_state = "spellburger" - filling_color = "#D505FF" - nutriment_amt = 6 - nutriment_desc = list("magic" = 3, "buns" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/spellburger/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/bigbiteburger - name = "Big Bite Burger" - desc = "Forget the Big Mac. THIS is the future!" - icon_state = "bigbiteburger" - filling_color = "#E3D681" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 4 - nutriment_desc = list("buns" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/bigbiteburger/Initialize() - . = ..() - reagents.add_reagent("protein", 10) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/enchiladas - name = "Enchiladas" - desc = "Viva La Mexico!" - icon_state = "enchiladas" - trash = /obj/item/trash/tray - filling_color = "#A36A1F" - center_of_mass = list("x"=16, "y"=13) - nutriment_amt = 2 - nutriment_desc = list("tortilla" = 3, "corn" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/enchiladas/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - reagents.add_reagent("capsaicin", 6) - bitesize = 4 - -/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight - name = "monkey's Delight" - desc = "Eeee Eee!" - icon_state = "monkeysdelight" - trash = /obj/item/trash/tray - filling_color = "#5C3C11" - center_of_mass = list("x"=16, "y"=13) - -/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight/Initialize() - . = ..() - reagents.add_reagent("protein", 10) - reagents.add_reagent("banana", 5) - reagents.add_reagent("blackpepper", 1) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 6 - -/obj/item/weapon/reagent_containers/food/snacks/baguette - name = "Baguette" - desc = "Bon appetit!" - icon_state = "baguette" - filling_color = "#E3D796" - center_of_mass = list("x"=18, "y"=12) - nutriment_amt = 6 - nutriment_desc = list("french bread" = 6) - -/obj/item/weapon/reagent_containers/food/snacks/baguette/Initialize() - . = ..() - reagents.add_reagent("blackpepper", 1) - reagents.add_reagent("sodiumchloride", 1) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/fishandchips - name = "Fish and Chips" - desc = "I do say so myself chap." - icon_state = "fishandchips" - filling_color = "#E3D796" - center_of_mass = list("x"=16, "y"=16) - nutriment_amt = 3 - nutriment_desc = list("salt" = 1, "chips" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/fishandchips/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("carpotoxin", 3) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/sandwich - name = "Sandwich" - desc = "A grand creation of meat, cheese, bread, and several leaves of lettuce! Arthur Dent would be proud." - icon_state = "sandwich" - trash = /obj/item/trash/plate - filling_color = "#D9BE29" - center_of_mass = list("x"=16, "y"=4) - nutriment_amt = 3 - nutriment_desc = list("bread" = 3, "cheese" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/sandwich/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/toastedsandwich - name = "Toasted Sandwich" - desc = "Now if you only had a pepper bar." - icon_state = "toastedsandwich" - trash = /obj/item/trash/plate - filling_color = "#D9BE29" - center_of_mass = list("x"=16, "y"=4) - nutriment_amt = 3 - nutriment_desc = list("toasted bread" = 3, "cheese" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/toastedsandwich/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - reagents.add_reagent("carbon", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/grilledcheese - name = "Grilled Cheese Sandwich" - desc = "Goes great with Tomato soup!" - icon_state = "toastedsandwich" - trash = /obj/item/trash/plate - filling_color = "#D9BE29" - nutriment_amt = 3 - nutriment_desc = list("toasted bread" = 3, "cheese" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/grilledcheese/Initialize() - . = ..() - reagents.add_reagent("protein", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/tomatosoup - name = "Tomato Soup" - desc = "Drinking this feels like being a vampire! A tomato vampire..." - icon_state = "tomatosoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#D92929" - center_of_mass = list("x"=16, "y"=7) - nutriment_amt = 5 - nutriment_desc = list("soup" = 5) - -/obj/item/weapon/reagent_containers/food/snacks/tomatosoup/Initialize() - . = ..() - reagents.add_reagent("tomatojuice", 10) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/onionsoup - name = "Onion Soup" - desc = "A soup with layers." - icon_state = "onionsoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#E0C367" - center_of_mass = list("x"=16, "y"=7) - nutriment_amt = 5 - nutriment_desc = list("onion" = 2, "soup" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/onionsoup/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/onionrings - name = "Onion Rings" - desc = "Crispy rings." - icon_state = "onionrings" - trash = /obj/item/trash/plate - filling_color = "#E0C367" - center_of_mass = list("x"=16, "y"=7) - nutriment_amt = 5 - nutriment_desc = list("onion" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/onionrings/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/rofflewaffles - name = "Roffle Waffles" - desc = "Waffles from Roffle. Co." - icon_state = "rofflewaffles" - trash = /obj/item/trash/waffles - filling_color = "#FF00F7" - center_of_mass = list("x"=15, "y"=11) - nutriment_amt = 8 - nutriment_desc = list("waffle" = 7, "sweetness" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/rofflewaffles/Initialize() - . = ..() - reagents.add_reagent("psilocybin", 8) - bitesize = 4 - -/obj/item/weapon/reagent_containers/food/snacks/stew - name = "Stew" - desc = "A nice and warm stew. Healthy and strong." - icon_state = "stew" - filling_color = "#9E673A" - center_of_mass = list("x"=16, "y"=5) - nutriment_amt = 6 - nutriment_desc = list("tomato" = 2, "potato" = 2, "carrot" = 2, "eggplant" = 2, "mushroom" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/stew/Initialize() - . = ..() - reagents.add_reagent("protein", 4) - reagents.add_reagent("tomatojuice", 5) - reagents.add_reagent("imidazoline", 5) - reagents.add_reagent("water", 5) - bitesize = 10 - -/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast - name = "Jellied Toast" - desc = "A slice of bread covered with delicious jam." - icon_state = "jellytoast" - trash = /obj/item/trash/plate - filling_color = "#B572AB" - center_of_mass = list("x"=16, "y"=8) - nutriment_amt = 1 - nutriment_desc = list("toasted bread" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/cherry/Initialize() - . = ..() - reagents.add_reagent("cherryjelly", 5) - -/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/slime/Initialize() - . = ..() - reagents.add_reagent("slimejelly", 5) - -/obj/item/weapon/reagent_containers/food/snacks/jellyburger - name = "Jelly Burger" - desc = "Culinary delight..?" - icon_state = "jellyburger" - filling_color = "#B572AB" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 5 - nutriment_desc = list("buns" = 5) - -/obj/item/weapon/reagent_containers/food/snacks/jellyburger/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime/Initialize() - . = ..() - reagents.add_reagent("slimejelly", 5) - -/obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry/Initialize() - . = ..() - reagents.add_reagent("cherryjelly", 5) - -/obj/item/weapon/reagent_containers/food/snacks/milosoup - name = "Milosoup" - desc = "The universes best soup! Yum!!!" - icon_state = "milosoup" - trash = /obj/item/trash/snack_bowl - center_of_mass = list("x"=16, "y"=7) - nutriment_amt = 8 - nutriment_desc = list("soy" = 8) - -/obj/item/weapon/reagent_containers/food/snacks/milosoup/Initialize() - . = ..() - reagents.add_reagent("water", 5) - bitesize = 4 - -/obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat - name = "Stewed Soy Meat" - desc = "Even non-vegetarians will LOVE this!" - icon_state = "stewedsoymeat" - trash = /obj/item/trash/plate - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 8 - nutriment_desc = list("soy" = 4, "tomato" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti - name = "Boiled Spaghetti" - desc = "A plain dish of noodles, this sucks." - icon_state = "spagettiboiled" - trash = /obj/item/trash/plate - filling_color = "#FCEE81" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 2 - nutriment_desc = list("noodles" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/boiledrice - name = "Boiled Rice" - desc = "A boring dish of boring rice." - icon_state = "boiledrice" - trash = /obj/item/trash/snack_bowl - filling_color = "#FFFBDB" - center_of_mass = list("x"=17, "y"=11) - nutriment_amt = 2 - nutriment_desc = list("rice" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/boiledrice/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/ricepudding - name = "Rice Pudding" - desc = "Where's the jam?" - icon_state = "rpudding" - trash = /obj/item/trash/snack_bowl - filling_color = "#FFFBDB" - center_of_mass = list("x"=17, "y"=11) - nutriment_amt = 4 - nutriment_desc = list("rice" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/ricepudding/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/pastatomato - name = "Spaghetti" - desc = "Spaghetti and crushed tomatoes. Just like your abusive father used to make!" - icon_state = "pastatomato" - trash = /obj/item/trash/plate - filling_color = "#DE4545" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 6 - nutriment_desc = list("tomato" = 3, "noodles" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/pastatomato/Initialize() - . = ..() - reagents.add_reagent("tomatojuice", 10) - bitesize = 4 - -/obj/item/weapon/reagent_containers/food/snacks/meatballspagetti - name = "Spaghetti & Meatballs" - desc = "Now thats a nic'e meatball!" - icon_state = "meatballspagetti" - trash = /obj/item/trash/plate - filling_color = "#DE4545" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 4 - nutriment_desc = list("noodles" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/meatballspagetti/Initialize() - . = ..() - reagents.add_reagent("protein", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/spesslaw - name = "Spesslaw" - desc = "A lawyers favourite" - icon_state = "spesslaw" - filling_color = "#DE4545" - center_of_mass = list("x"=16, "y"=10) - nutriment_amt = 4 - nutriment_desc = list("noodles" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/spesslaw/Initialize() - . = ..() - reagents.add_reagent("protein", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/carrotfries - name = "Carrot Fries" - desc = "Tasty fries from fresh Carrots." - icon_state = "carrotfries" - trash = /obj/item/trash/plate - filling_color = "#FAA005" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 3 - nutriment_desc = list("carrot" = 3, "salt" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/carrotfries/Initialize() - . = ..() - reagents.add_reagent("imidazoline", 3) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/superbiteburger - name = "Super Bite Burger" - desc = "This is a mountain of a burger. FOOD!" - icon_state = "superbiteburger" - filling_color = "#CCA26A" - center_of_mass = list("x"=16, "y"=3) - nutriment_amt = 25 - nutriment_desc = list("buns" = 25) - -/obj/item/weapon/reagent_containers/food/snacks/superbiteburger/Initialize() - . = ..() - reagents.add_reagent("protein", 25) - bitesize = 10 - -/obj/item/weapon/reagent_containers/food/snacks/candiedapple - name = "Candied Apple" - desc = "An apple coated in sugary sweetness." - icon_state = "candiedapple" - filling_color = "#F21873" - center_of_mass = list("x"=15, "y"=13) - nutriment_amt = 3 - nutriment_desc = list("apple" = 3, "caramel" = 3, "sweetness" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/candiedapple/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/applepie - name = "Apple Pie" - desc = "A pie containing sweet sweet love... or apple." - icon_state = "applepie" - filling_color = "#E0EDC5" - center_of_mass = list("x"=16, "y"=13) - nutriment_amt = 4 - nutriment_desc = list("sweetness" = 2, "apple" = 2, "pie" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/applepie/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/cherrypie - name = "Cherry Pie" - desc = "Taste so good, make a grown man cry." - icon_state = "cherrypie" - filling_color = "#FF525A" - center_of_mass = list("x"=16, "y"=11) - nutriment_amt = 4 - nutriment_desc = list("sweetness" = 2, "cherry" = 2, "pie" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/cherrypie/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/twobread - name = "Two Bread" - desc = "It is very bitter and winy." - icon_state = "twobread" - filling_color = "#DBCC9A" - center_of_mass = list("x"=15, "y"=12) - nutriment_amt = 2 - nutriment_desc = list("sourness" = 2, "bread" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/twobread/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/jellysandwich - name = "Jelly Sandwich" - desc = "You wish you had some peanut butter to go with this..." - icon_state = "jellysandwich" - trash = /obj/item/trash/plate - filling_color = "#9E3A78" - center_of_mass = list("x"=16, "y"=8) - nutriment_amt = 2 - nutriment_desc = list("bread" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime/Initialize() - . = ..() - reagents.add_reagent("slimejelly", 5) - -/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry/Initialize() - . = ..() - reagents.add_reagent("cherryjelly", 5) - -/obj/item/weapon/reagent_containers/food/snacks/boiledslimecore - name = "Boiled slime Core" - desc = "A boiled red thing." - icon_state = "boiledslimecore" //nonexistant? - -/obj/item/weapon/reagent_containers/food/snacks/boiledslimecore/Initialize() - . = ..() - reagents.add_reagent("slimejelly", 5) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/mint - name = "mint" - desc = "it is only wafer thin." - icon_state = "mint" - filling_color = "#F2F2F2" - center_of_mass = list("x"=16, "y"=14) - -/obj/item/weapon/reagent_containers/food/snacks/mint/Initialize() - . = ..() - reagents.add_reagent("mint", 1) - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/mushroomsoup - name = "chantrelle soup" - desc = "A delicious and hearty mushroom soup." - icon_state = "mushroomsoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#E386BF" - center_of_mass = list("x"=17, "y"=10) - nutriment_amt = 8 - nutriment_desc = list("mushroom" = 8, "milk" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/mushroomsoup/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit - name = "plump helmet biscuit" - desc = "This is a finely-prepared plump helmet biscuit. The ingredients are exceptionally minced plump helmet, and well-minced dwarven wheat flour." - icon_state = "phelmbiscuit" - filling_color = "#CFB4C4" - center_of_mass = list("x"=16, "y"=13) - nutriment_amt = 5 - nutriment_desc = list("mushroom" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit/Initialize() - . = ..() - if(prob(10)) - name = "exceptional plump helmet biscuit" - desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" - reagents.add_reagent("nutriment", 8) - bitesize = 2 - else - reagents.add_reagent("nutriment", 5) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/chawanmushi - name = "chawanmushi" - desc = "A legendary egg custard that makes friends out of enemies. Probably too hot for a cat to eat." - icon_state = "chawanmushi" - trash = /obj/item/trash/snack_bowl - filling_color = "#F0F2E4" - center_of_mass = list("x"=17, "y"=10) - -/obj/item/weapon/reagent_containers/food/snacks/chawanmushi/Initialize() - . = ..() - reagents.add_reagent("protein", 5) - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/beetsoup - name = "beet soup" - desc = "Wait, how do you spell it again..?" - icon_state = "beetsoup" - trash = /obj/item/trash/snack_bowl - filling_color = "#FAC9FF" - center_of_mass = list("x"=15, "y"=8) - nutriment_amt = 8 - nutriment_desc = list("tomato" = 4, "beet" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/beetsoup/Initialize() - . = ..() - name = pick(list("borsch","bortsch","borstch","borsh","borshch","borscht")) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/tossedsalad - name = "tossed salad" - desc = "A proper salad, basic and simple, with little bits of carrot, tomato and apple intermingled. Vegan!" - icon_state = "herbsalad" - trash = /obj/item/trash/snack_bowl - filling_color = "#76B87F" - center_of_mass = list("x"=17, "y"=11) - nutriment_amt = 8 - nutriment_desc = list("salad" = 2, "tomato" = 2, "carrot" = 2, "apple" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/tossedsalad/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/validsalad - name = "valid salad" - desc = "It's just a salad of questionable 'herbs' with meatballs and fried potato slices. Nothing suspicious about it." - icon_state = "validsalad" - trash = /obj/item/trash/snack_bowl - filling_color = "#76B87F" - center_of_mass = list("x"=17, "y"=11) - nutriment_amt = 6 - nutriment_desc = list("100% real salad") - -/obj/item/weapon/reagent_containers/food/snacks/validsalad/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/appletart - name = "golden apple streusel tart" - desc = "A tasty dessert that won't make it through a metal detector." - icon_state = "gappletart" - trash = /obj/item/trash/plate - filling_color = "#FFFF00" - center_of_mass = list("x"=16, "y"=18) - nutriment_amt = 8 - nutriment_desc = list("apple" = 8) - -/obj/item/weapon/reagent_containers/food/snacks/appletart/Initialize() - . = ..() - reagents.add_reagent("gold", 5) - bitesize = 3 - -/////////////////////////////////////////////////Sliceable//////////////////////////////////////// -// All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels - -// sliceable is just an organization type path, it doesn't have any additional code or variables tied to it. - -/obj/item/weapon/reagent_containers/food/snacks/sliceable - w_class = ITEMSIZE_NORMAL //Whole pizzas and cakes shouldn't fit in a pocket, you can slice them if you want to do that. - -/** - * A food item slice - * - * This path contains some extra code for spawning slices pre-filled with - * reagents. - */ -/obj/item/weapon/reagent_containers/food/snacks/slice - name = "slice of... something" - var/whole_path // path for the item from which this slice comes - var/filled = FALSE // should the slice spawn with any reagents - -/** - * Spawn a new slice of food - * - * If the slice's filled is TRUE, this will also fill the slice with the - * appropriate amount of reagents. Note that this is done by spawning a new - * whole item, transferring the reagents and deleting the whole item, which may - * have performance implications. - */ -/obj/item/weapon/reagent_containers/food/snacks/slice/Initialize() - . = ..() - if(filled) - var/obj/item/weapon/reagent_containers/food/snacks/whole = new whole_path() - if(whole && whole.slices_num) - var/reagent_amount = whole.reagents.total_volume/whole.slices_num - whole.reagents.trans_to_obj(src, reagent_amount) - - qdel(whole) - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread - name = "meatbread loaf" - desc = "The culinary base of every self-respecting eloquent gentleman." - icon_state = "meatbread" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/meatbread - slices_num = 5 - filling_color = "#FF7575" - center_of_mass = list("x"=19, "y"=9) - nutriment_desc = list("bread" = 10) - nutriment_amt = 10 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread/Initialize() - . = ..() - reagents.add_reagent("protein", 20) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/meatbread - name = "meatbread slice" - desc = "A slice of delicious meatbread." - icon_state = "meatbreadslice" - trash = /obj/item/trash/plate - filling_color = "#FF7575" - bitesize = 2 - center_of_mass = list("x"=16, "y"=16) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread - -/obj/item/weapon/reagent_containers/food/snacks/slice/meatbread/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/xenomeatbread - name = "xenomeatbread loaf" - desc = "The culinary base of every self-respecting eloquent gentleman. Extra Heretical." - icon_state = "xenomeatbread" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/xenomeatbread - slices_num = 5 - filling_color = "#8AFF75" - center_of_mass = list("x"=16, "y"=9) - nutriment_desc = list("bread" = 10) - nutriment_amt = 10 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/xenomeatbread/Initialize() - . = ..() - reagents.add_reagent("protein", 20) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/xenomeatbread - name = "xenomeatbread slice" - desc = "A slice of delicious meatbread. Extra Heretical." - icon_state = "xenobreadslice" - trash = /obj/item/trash/plate - filling_color = "#8AFF75" - bitesize = 2 - center_of_mass = list("x"=16, "y"=13) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/xenomeatbread - - -/obj/item/weapon/reagent_containers/food/snacks/slice/xenomeatbread/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread - name = "Banana-nut bread" - desc = "A heavenly and filling treat." - icon_state = "bananabread" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/bananabread - slices_num = 5 - filling_color = "#EDE5AD" - center_of_mass = list("x"=16, "y"=9) - nutriment_desc = list("bread" = 10) - nutriment_amt = 10 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread/Initialize() - . = ..() - reagents.add_reagent("banana", 20) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/bananabread - name = "Banana-nut bread slice" - desc = "A slice of delicious banana bread." - icon_state = "bananabreadslice" - trash = /obj/item/trash/plate - filling_color = "#EDE5AD" - bitesize = 2 - center_of_mass = list("x"=16, "y"=8) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread - -/obj/item/weapon/reagent_containers/food/snacks/slice/bananabread/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/tofubread - name = "Tofubread" - icon_state = "Like meatbread but for vegetarians. Not guaranteed to give superpowers." - icon_state = "tofubread" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/tofubread - slices_num = 5 - filling_color = "#F7FFE0" - center_of_mass = list("x"=16, "y"=9) - nutriment_desc = list("tofu" = 10) - nutriment_amt = 10 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/tofubread/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/tofubread - name = "Tofubread slice" - desc = "A slice of delicious tofubread." - icon_state = "tofubreadslice" - trash = /obj/item/trash/plate - filling_color = "#F7FFE0" - bitesize = 2 - center_of_mass = list("x"=16, "y"=13) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/tofubread - -/obj/item/weapon/reagent_containers/food/snacks/slice/tofubread/filled - filled = TRUE - - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake - name = "Carrot Cake" - desc = "A favorite desert of a certain wascally wabbit. Not a lie." - icon_state = "carrotcake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/carrotcake - slices_num = 5 - filling_color = "#FFD675" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10, "carrot" = 15) - nutriment_amt = 25 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake/Initialize() - . = ..() - reagents.add_reagent("imidazoline", 10) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/carrotcake - name = "Carrot Cake slice" - desc = "Carrotty slice of Carrot Cake, carrots are good for your eyes! Also not a lie." - icon_state = "carrotcake_slice" - trash = /obj/item/trash/plate - filling_color = "#FFD675" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake - -/obj/item/weapon/reagent_containers/food/snacks/slice/carrotcake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/braincake - name = "Brain Cake" - desc = "A squishy cake-thing." - icon_state = "braincake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/braincake - slices_num = 5 - filling_color = "#E6AEDB" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10, "slime" = 15) - nutriment_amt = 5 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/braincake/Initialize() - . = ..() - reagents.add_reagent("protein", 25) - reagents.add_reagent("alkysine", 10) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/braincake - name = "Brain Cake slice" - desc = "Lemme tell you something about prions. THEY'RE DELICIOUS." - icon_state = "braincakeslice" - trash = /obj/item/trash/plate - filling_color = "#E6AEDB" - bitesize = 2 - center_of_mass = list("x"=16, "y"=12) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/braincake - -/obj/item/weapon/reagent_containers/food/snacks/slice/braincake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesecake - name = "Cheese Cake" - desc = "DANGEROUSLY cheesy." - icon_state = "cheesecake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/cheesecake - slices_num = 5 - filling_color = "#FAF7AF" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "cream" = 10, "cheese" = 15) - nutriment_amt = 10 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesecake/Initialize() - . = ..() - reagents.add_reagent("protein", 15) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/cheesecake - name = "Cheese Cake slice" - desc = "Slice of pure cheestisfaction." - icon_state = "cheesecake_slice" - trash = /obj/item/trash/plate - filling_color = "#FAF7AF" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesecake - -/obj/item/weapon/reagent_containers/food/snacks/slice/cheesecake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/plaincake - name = "Vanilla Cake" - desc = "A plain cake, not a lie." - icon_state = "plaincake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/plaincake - slices_num = 5 - filling_color = "#F7EDD5" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10, "vanilla" = 15) - nutriment_amt = 20 - -/obj/item/weapon/reagent_containers/food/snacks/slice/plaincake - name = "Vanilla Cake slice" - desc = "Just a slice of cake, it is enough for everyone." - icon_state = "plaincake_slice" - trash = /obj/item/trash/plate - filling_color = "#F7EDD5" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/plaincake - -/obj/item/weapon/reagent_containers/food/snacks/slice/plaincake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/orangecake - name = "Orange Cake" - desc = "A cake with added orange." - icon_state = "orangecake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/orangecake - slices_num = 5 - filling_color = "#FADA8E" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10, "orange" = 15) - nutriment_amt = 20 - -/obj/item/weapon/reagent_containers/food/snacks/slice/orangecake - name = "Orange Cake slice" - desc = "Just a slice of cake, it is enough for everyone." - icon_state = "orangecake_slice" - trash = /obj/item/trash/plate - filling_color = "#FADA8E" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/orangecake - -/obj/item/weapon/reagent_containers/food/snacks/slice/orangecake/filled - filled = TRUE - - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/limecake - name = "Lime Cake" - desc = "A cake with added lime." - icon_state = "limecake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/limecake - slices_num = 5 - filling_color = "#CBFA8E" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10, "lime" = 15) - nutriment_amt = 20 - - -/obj/item/weapon/reagent_containers/food/snacks/slice/limecake - name = "Lime Cake slice" - desc = "Just a slice of cake, it is enough for everyone." - icon_state = "limecake_slice" - trash = /obj/item/trash/plate - filling_color = "#CBFA8E" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/limecake - -/obj/item/weapon/reagent_containers/food/snacks/slice/limecake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/lemoncake - name = "Lemon Cake" - desc = "A cake with added lemon." - icon_state = "lemoncake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/lemoncake - slices_num = 5 - filling_color = "#FAFA8E" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10, "lemon" = 15) - nutriment_amt = 20 - - -/obj/item/weapon/reagent_containers/food/snacks/slice/lemoncake - name = "Lemon Cake slice" - desc = "Just a slice of cake, it is enough for everyone." - icon_state = "lemoncake_slice" - trash = /obj/item/trash/plate - filling_color = "#FAFA8E" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/lemoncake - -/obj/item/weapon/reagent_containers/food/snacks/slice/lemoncake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/chocolatecake - name = "Chocolate Cake" - desc = "A cake with added chocolate." - icon_state = "chocolatecake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/chocolatecake - slices_num = 5 - filling_color = "#805930" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10, "chocolate" = 15) - nutriment_amt = 20 - -/obj/item/weapon/reagent_containers/food/snacks/slice/chocolatecake - name = "Chocolate Cake slice" - desc = "Just a slice of cake, it is enough for everyone." - icon_state = "chocolatecake_slice" - trash = /obj/item/trash/plate - filling_color = "#805930" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/chocolatecake - -/obj/item/weapon/reagent_containers/food/snacks/slice/chocolatecake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel - name = "Cheese wheel" - desc = "A big wheel of delcious Cheddar." - icon_state = "cheesewheel" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesewedge - slices_num = 5 - filling_color = "#FFF700" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cheese" = 10) - nutriment_amt = 10 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel/Initialize() - . = ..() - reagents.add_reagent("protein", 10) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/cheesewedge - name = "Cheese wedge" - desc = "A wedge of delicious Cheddar. The cheese wheel it was cut from can't have gone far." - icon_state = "cheesewedge" - filling_color = "#FFF700" - bitesize = 2 - center_of_mass = list("x"=16, "y"=10) - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake - name = "Birthday Cake" - desc = "Happy Birthday..." - icon_state = "birthdaycake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/birthdaycake - slices_num = 5 - filling_color = "#FFD6D6" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10) - nutriment_amt = 20 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake/Initialize() - . = ..() - reagents.add_reagent("sprinkles", 10) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/slice/birthdaycake - name = "Birthday Cake slice" - desc = "A slice of your birthday." - icon_state = "birthdaycakeslice" - trash = /obj/item/trash/plate - filling_color = "#FFD6D6" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake - -/obj/item/weapon/reagent_containers/food/snacks/slice/birthdaycake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread - name = "Bread" - icon_state = "Some plain old Earthen bread." - icon_state = "bread" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/bread - slices_num = 5 - filling_color = "#FFE396" - center_of_mass = list("x"=16, "y"=9) - nutriment_desc = list("bread" = 6) - nutriment_amt = 6 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/bread - name = "Bread slice" - desc = "A slice of home." - icon_state = "breadslice" - trash = /obj/item/trash/plate - filling_color = "#D27332" - bitesize = 2 - center_of_mass = list("x"=16, "y"=4) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/bread - -/obj/item/weapon/reagent_containers/food/snacks/slice/bread/filled - filled = TRUE - - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread - name = "Cream Cheese Bread" - desc = "Yum yum yum!" - icon_state = "creamcheesebread" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/creamcheesebread - slices_num = 5 - filling_color = "#FFF896" - center_of_mass = list("x"=16, "y"=9) - nutriment_desc = list("bread" = 6, "cream" = 3, "cheese" = 3) - nutriment_amt = 5 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread/Initialize() - . = ..() - reagents.add_reagent("protein", 15) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/creamcheesebread - name = "Cream Cheese Bread slice" - desc = "A slice of yum!" - icon_state = "creamcheesebreadslice" - trash = /obj/item/trash/plate - filling_color = "#FFF896" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread - - -/obj/item/weapon/reagent_containers/food/snacks/slice/creamcheesebread/filled - filled = TRUE - - -/obj/item/weapon/reagent_containers/food/snacks/watermelonslice - name = "Watermelon Slice" - desc = "A slice of watery goodness." - icon_state = "watermelonslice" - filling_color = "#FF3867" - bitesize = 2 - center_of_mass = list("x"=16, "y"=10) - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake - name = "Apple Cake" - desc = "A cake centred with apples." - icon_state = "applecake" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/applecake - slices_num = 5 - filling_color = "#EBF5B8" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("cake" = 10, "sweetness" = 10, "apple" = 15) - nutriment_amt = 15 - -/obj/item/weapon/reagent_containers/food/snacks/slice/applecake - name = "Apple Cake slice" - desc = "A slice of heavenly cake." - icon_state = "applecakeslice" - trash = /obj/item/trash/plate - filling_color = "#EBF5B8" - bitesize = 2 - center_of_mass = list("x"=16, "y"=14) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake - -/obj/item/weapon/reagent_containers/food/snacks/slice/applecake/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie - name = "Pumpkin Pie" - desc = "A delicious treat for the autumn months." - icon_state = "pumpkinpie" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/pumpkinpie - slices_num = 5 - filling_color = "#F5B951" - center_of_mass = list("x"=16, "y"=10) - nutriment_desc = list("pie" = 5, "cream" = 5, "pumpkin" = 5) - nutriment_amt = 15 - -/obj/item/weapon/reagent_containers/food/snacks/slice/pumpkinpie - name = "Pumpkin Pie slice" - desc = "A slice of pumpkin pie, with whipped cream on top. Perfection." - icon_state = "pumpkinpieslice" - trash = /obj/item/trash/plate - filling_color = "#F5B951" - bitesize = 2 - center_of_mass = list("x"=16, "y"=12) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie - -/obj/item/weapon/reagent_containers/food/snacks/slice/pumpkinpie/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/cracker - name = "Cracker" - desc = "It's a salted cracker." - icon_state = "cracker" - filling_color = "#F5DEB8" - center_of_mass = list("x"=16, "y"=6) - nutriment_desc = list("salt" = 1, "cracker" = 2) - nutriment_amt = 1 - - - -/////////////////////////////////////////////////PIZZA//////////////////////////////////////// - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza - slices_num = 6 - filling_color = "#BAA14C" - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita - name = "Margherita" - desc = "The golden standard of pizzas." - icon_state = "pizzamargherita" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/margherita - slices_num = 6 - center_of_mass = list("x"=16, "y"=11) - nutriment_desc = list("pizza crust" = 10, "tomato" = 10, "cheese" = 15) - nutriment_amt = 35 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita/Initialize() - . = ..() - reagents.add_reagent("protein", 5) - reagents.add_reagent("tomatojuice", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/margherita - name = "Margherita slice" - desc = "A slice of the classic pizza." - icon_state = "pizzamargheritaslice" - filling_color = "#BAA14C" - bitesize = 2 - center_of_mass = list("x"=16, "y"=13) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita - -/obj/item/weapon/reagent_containers/food/snacks/slice/margherita/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza - name = "Meatpizza" - desc = "A pizza with meat topping." - icon_state = "meatpizza" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/meatpizza - slices_num = 6 - center_of_mass = list("x"=16, "y"=11) - nutriment_desc = list("pizza crust" = 10, "tomato" = 10, "cheese" = 15) - nutriment_amt = 10 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza/Initialize() - . = ..() - reagents.add_reagent("protein", 34) - reagents.add_reagent("tomatojuice", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/meatpizza - name = "Meatpizza slice" - desc = "A slice of a meaty pizza." - icon_state = "meatpizzaslice" - filling_color = "#BAA14C" - bitesize = 2 - center_of_mass = list("x"=16, "y"=13) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza - -/obj/item/weapon/reagent_containers/food/snacks/slice/meatpizza/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza - name = "Mushroompizza" - desc = "Very special pizza." - icon_state = "mushroompizza" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/mushroompizza - slices_num = 6 - center_of_mass = list("x"=16, "y"=11) - nutriment_desc = list("pizza crust" = 10, "tomato" = 10, "cheese" = 5, "mushroom" = 10) - nutriment_amt = 35 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza/Initialize() - . = ..() - reagents.add_reagent("protein", 5) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/mushroompizza - name = "Mushroompizza slice" - desc = "Maybe it is the last slice of pizza in your life." - icon_state = "mushroompizzaslice" - filling_color = "#BAA14C" - bitesize = 2 - center_of_mass = list("x"=16, "y"=13) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza - -/obj/item/weapon/reagent_containers/food/snacks/slice/mushroompizza/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza - name = "Vegetable pizza" - desc = "No one of Tomato Sapiens were harmed during making this pizza." - icon_state = "vegetablepizza" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/vegetablepizza - slices_num = 6 - center_of_mass = list("x"=16, "y"=11) - nutriment_desc = list("pizza crust" = 10, "tomato" = 10, "cheese" = 5, "eggplant" = 5, "carrot" = 5, "corn" = 5) - nutriment_amt = 25 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza/Initialize() - . = ..() - reagents.add_reagent("protein", 5) - reagents.add_reagent("tomatojuice", 6) - reagents.add_reagent("imidazoline", 12) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/vegetablepizza - name = "Vegetable pizza slice" - desc = "A slice of the most green pizza of all pizzas not containing green ingredients." - icon_state = "vegetablepizzaslice" - filling_color = "#BAA14C" - bitesize = 2 - center_of_mass = list("x"=16, "y"=13) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza - -/obj/item/weapon/reagent_containers/food/snacks/slice/vegetablepizza/filled - filled = TRUE - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza - name = "moldy pizza" - desc = "This pizza might actually be alive. There's mold all over." - icon_state = "oldpizza" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/oldpizza - slices_num = 6 - center_of_mass = list("x"=16, "y"=11) - nutriment_desc = list("stale pizza crust" = 10, "moldy tomato" = 10, "moldy cheese" = 5) - nutriment_amt = 10 - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza/Initialize() - . = ..() - reagents.add_reagent("protein", 5) - reagents.add_reagent("tomatojuice", 6) - reagents.add_reagent("mold", 8) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/slice/oldpizza - name = "moldy pizza slice" - desc = "This used to be pizza..." - icon_state = "old_pizza" - filling_color = "#BAA14C" - bitesize = 2 - center_of_mass = list("x"=16, "y"=13) - whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza - -/obj/item/pizzabox - name = "pizza box" - desc = "A box suited for pizzas." - icon = 'icons/obj/food.dmi' - icon_state = "pizzabox1" - - var/open = 0 // Is the box open? - var/ismessy = 0 // Fancy mess on the lid - var/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/pizza // Content pizza - var/list/boxes = list() // If the boxes are stacked, they come here - var/boxtag = "" - -/obj/item/pizzabox/update_icon() - - overlays = list() - - // Set appropriate description - if( open && pizza ) - desc = "A box suited for pizzas. It appears to have a [pizza.name] inside." - else if( boxes.len > 0 ) - desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile." - - var/obj/item/pizzabox/topbox = boxes[boxes.len] - var/toptag = topbox.boxtag - if( toptag != "" ) - desc = "[desc] The box on top has a tag, it reads: '[toptag]'." - else - desc = "A box suited for pizzas." - - if( boxtag != "" ) - desc = "[desc] The box has a tag, it reads: '[boxtag]'." - - // Icon states and overlays - if( open ) - if( ismessy ) - icon_state = "pizzabox_messy" - else - icon_state = "pizzabox_open" - - if( pizza ) - var/image/pizzaimg = image("food.dmi", icon_state = pizza.icon_state) - pizzaimg.pixel_y = -3 - overlays += pizzaimg - - return - else - // Stupid code because byondcode sucks - var/doimgtag = 0 - if( boxes.len > 0 ) - var/obj/item/pizzabox/topbox = boxes[boxes.len] - if( topbox.boxtag != "" ) - doimgtag = 1 - else - if( boxtag != "" ) - doimgtag = 1 - - if( doimgtag ) - var/image/tagimg = image("food.dmi", icon_state = "pizzabox_tag") - tagimg.pixel_y = boxes.len * 3 - overlays += tagimg - - icon_state = "pizzabox[boxes.len+1]" - -/obj/item/pizzabox/attack_hand( mob/user as mob ) - - if( open && pizza ) - user.put_in_hands( pizza ) - - to_chat(user, "You take \the [src.pizza] out of \the [src].") - src.pizza = null - update_icon() - return - - if( boxes.len > 0 ) - if( user.get_inactive_hand() != src ) - ..() - return - - var/obj/item/pizzabox/box = boxes[boxes.len] - boxes -= box - - user.put_in_hands( box ) - to_chat(user, "You remove the topmost [src] from your hand.") - box.update_icon() - update_icon() - return - ..() - -/obj/item/pizzabox/attack_self( mob/user as mob ) - - if( boxes.len > 0 ) - return - - open = !open - - if( open && pizza ) - ismessy = 1 - - update_icon() - -/obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob ) - if( istype(I, /obj/item/pizzabox/) ) - var/obj/item/pizzabox/box = I - - if( !box.open && !src.open ) - // Make a list of all boxes to be added - var/list/boxestoadd = list() - boxestoadd += box - for(var/obj/item/pizzabox/i in box.boxes) - boxestoadd += i - - if( (boxes.len+1) + boxestoadd.len <= 5 ) - user.drop_item() - - box.loc = src - box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit - src.boxes.Add( boxestoadd ) - - box.update_icon() - update_icon() - - to_chat(user, "You put \the [box] ontop of \the [src]!") - else - to_chat(user, "The stack is too high!") - else - to_chat(user, "Close \the [box] first!") - - return - - if( istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/) ) // Long ass fucking object name - - if( src.open ) - user.drop_item() - I.loc = src - src.pizza = I - - update_icon() - - to_chat(user, "You put \the [I] in \the [src]!") - else - to_chat(user, "You try to push \the [I] through the lid but it doesn't work!") - return - - if( istype(I, /obj/item/weapon/pen/) ) - - if( src.open ) - return - - var/t = sanitize(input("Enter what you want to add to the tag:", "Write", null, null) as text, 30) - - var/obj/item/pizzabox/boxtotagto = src - if( boxes.len > 0 ) - boxtotagto = boxes[boxes.len] - - boxtotagto.boxtag = copytext("[boxtotagto.boxtag][t]", 1, 30) - - update_icon() - return - ..() - -/obj/item/pizzabox/margherita/New() - pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita(src) - boxtag = "Margherita Deluxe" - -/obj/item/pizzabox/vegetable/New() - pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza(src) - boxtag = "Gourmet Vegatable" - -/obj/item/pizzabox/mushroom/New() - pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza(src) - boxtag = "Mushroom Special" - -/obj/item/pizzabox/meat/New() - pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src) - boxtag = "Meatlover's Supreme" - -/obj/item/pizzabox/old/New() - pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza(src) - boxtag = "Deluxe Gourmet" - -/obj/item/weapon/reagent_containers/food/snacks/dionaroast - name = "roast diona" - desc = "It's like an enormous, leathery carrot. With an eye." - icon_state = "dionaroast" - trash = /obj/item/trash/plate - filling_color = "#75754B" - center_of_mass = list("x"=16, "y"=7) - nutriment_amt = 6 - nutriment_desc = list("a chorus of flavor" = 6) - -/obj/item/weapon/reagent_containers/food/snacks/dionaroast/Initialize() - . = ..() - reagents.add_reagent("radium", 2) - bitesize = 2 - -/////////////////////////////////////////// -// new old food stuff from bs12 -/////////////////////////////////////////// -/obj/item/weapon/reagent_containers/food/snacks/dough - name = "dough" - desc = "A piece of dough." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "dough" - bitesize = 2 - center_of_mass = list("x"=16, "y"=13) - nutriment_amt = 3 - nutriment_desc = list("uncooked dough" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/dough/Initialize() - . = ..() - reagents.add_reagent("protein", 1) - -// Dough + rolling pin = flat dough -/obj/item/weapon/reagent_containers/food/snacks/dough/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(istype(W,/obj/item/weapon/material/kitchen/rollingpin)) - new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(src) - user << "You flatten the dough." - qdel(src) - -// slicable into 3xdoughslices -/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough - name = "flat dough" - desc = "A flattened dough." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "flat dough" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/doughslice - slices_num = 3 - center_of_mass = list("x"=16, "y"=16) - -/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/Initialize() - . = ..() - reagents.add_reagent("protein", 1) - reagents.add_reagent("nutriment", 3) - -/obj/item/weapon/reagent_containers/food/snacks/doughslice - name = "dough slice" - desc = "A building block of an impressive dish." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "doughslice" - slice_path = /obj/item/weapon/reagent_containers/food/snacks/spagetti - slices_num = 1 - bitesize = 2 - center_of_mass = list("x"=17, "y"=19) - nutriment_amt = 1 - nutriment_desc = list("uncooked dough" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/doughslice/Initialize() - . = ..() - -/obj/item/weapon/reagent_containers/food/snacks/bun - name = "bun" - desc = "A base for any self-respecting burger." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "bun" - bitesize = 2 - center_of_mass = list("x"=16, "y"=12) - nutriment_amt = 4 - nutriment_desc = "bun" - -/obj/item/weapon/reagent_containers/food/snacks/bun/Initialize() - . = ..() - -/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/weapon/W as obj, mob/user as mob) - // Bun + meatball = burger - if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meatball)) - new /obj/item/weapon/reagent_containers/food/snacks/monkeyburger(src) - user << "You make a burger." - qdel(W) - qdel(src) - - // Bun + cutlet = hamburger - else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/cutlet)) - new /obj/item/weapon/reagent_containers/food/snacks/monkeyburger(src) - user << "You make a burger." - qdel(W) - qdel(src) - - // Bun + sausage = hotdog - else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/sausage)) - new /obj/item/weapon/reagent_containers/food/snacks/hotdog(src) - user << "You make a hotdog." - qdel(W) - qdel(src) - -// Burger + cheese wedge = cheeseburger -/obj/item/weapon/reagent_containers/food/snacks/monkeyburger/attackby(obj/item/weapon/reagent_containers/food/snacks/cheesewedge/W as obj, mob/user as mob) - if(istype(W))// && !istype(src,/obj/item/weapon/reagent_containers/food/snacks/cheesewedge)) - new /obj/item/weapon/reagent_containers/food/snacks/cheeseburger(src) - user << "You make a cheeseburger." - qdel(W) - qdel(src) - return - else - ..() - -// Human Burger + cheese wedge = cheeseburger -/obj/item/weapon/reagent_containers/food/snacks/human/burger/attackby(obj/item/weapon/reagent_containers/food/snacks/cheesewedge/W as obj, mob/user as mob) - if(istype(W)) - new /obj/item/weapon/reagent_containers/food/snacks/cheeseburger(src) - user << "You make a cheeseburger." - qdel(W) - qdel(src) - return - else - ..() - -/obj/item/weapon/reagent_containers/food/snacks/bunbun - name = "\improper Bun Bun" - desc = "A small bread monkey fashioned from two burger buns." - icon_state = "bunbun" - bitesize = 2 - center_of_mass = list("x"=16, "y"=8) - nutriment_amt = 8 - nutriment_desc = list("bun" = 8) - -/obj/item/weapon/reagent_containers/food/snacks/bunbun/Initialize() - . = ..() - -/obj/item/weapon/reagent_containers/food/snacks/taco - name = "taco" - desc = "Take a bite!" - icon_state = "taco" - bitesize = 3 - center_of_mass = list("x"=21, "y"=12) - nutriment_amt = 4 - nutriment_desc = list("cheese" = 2,"taco shell" = 2) -/obj/item/weapon/reagent_containers/food/snacks/taco/Initialize() - . = ..() - reagents.add_reagent("protein", 3) - -/obj/item/weapon/reagent_containers/food/snacks/rawcutlet - name = "raw cutlet" - desc = "A thin piece of raw meat." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "rawcutlet" - bitesize = 1 - center_of_mass = list("x"=17, "y"=20) - -/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/Initialize() - . = ..() - reagents.add_reagent("protein", 1) - -/obj/item/weapon/reagent_containers/food/snacks/cutlet - name = "cutlet" - desc = "A tasty meat slice." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "cutlet" - bitesize = 2 - center_of_mass = list("x"=17, "y"=20) - -/obj/item/weapon/reagent_containers/food/snacks/cutlet/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - -/obj/item/weapon/reagent_containers/food/snacks/rawmeatball - name = "raw meatball" - desc = "A raw meatball." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "rawmeatball" - bitesize = 2 - center_of_mass = list("x"=16, "y"=15) - -/obj/item/weapon/reagent_containers/food/snacks/rawmeatball/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - -/obj/item/weapon/reagent_containers/food/snacks/hotdog - name = "hotdog" - desc = "Unrelated to dogs, maybe." - icon_state = "hotdog" - bitesize = 2 - center_of_mass = list("x"=16, "y"=17) - -/obj/item/weapon/reagent_containers/food/snacks/hotdog/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - -/obj/item/weapon/reagent_containers/food/snacks/hotdog/old - name = "old hotdog" - desc = "Covered in mold. You're not gonna eat that, are you?" - -/obj/item/weapon/reagent_containers/food/snacks/hotdog/old/Initialize() - . = ..() - reagents.add_reagent("mold", 6) - -/obj/item/weapon/reagent_containers/food/snacks/flatbread - name = "flatbread" - desc = "Bland but filling." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "flatbread" - bitesize = 2 - center_of_mass = list("x"=16, "y"=16) - nutriment_amt = 3 - nutriment_desc = list("bread" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/flatbread/Initialize() - . = ..() - -// potato + knife = raw sticks -/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(obj/item/weapon/W, mob/user) - if(seed && seed.kitchen_tag && seed.kitchen_tag == "potato" && istype(W,/obj/item/weapon/material/knife)) - new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(get_turf(src)) - user << "You cut the potato." - qdel(src) - else - ..() - -/obj/item/weapon/reagent_containers/food/snacks/rawsticks - name = "raw potato sticks" - desc = "Raw fries, not very tasty." - icon = 'icons/obj/food_ingredients.dmi' - icon_state = "rawsticks" - bitesize = 2 - center_of_mass = list("x"=16, "y"=12) - nutriment_amt = 3 - nutriment_desc = list("raw potato" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/rawsticks/Initialize() - . = ..() - -/obj/item/weapon/reagent_containers/food/snacks/liquidfood - name = "\improper LiquidFood Ration" - desc = "A prepackaged grey slurry of all the essential nutrients for a spacefarer on the go. Should this be crunchy?" - icon_state = "liquidfood" - trash = /obj/item/trash/liquidfood - filling_color = "#A8A8A8" - center_of_mass = list("x"=16, "y"=15) - nutriment_amt = 20 - nutriment_desc = list("chalk" = 6) - -/obj/item/weapon/reagent_containers/food/snacks/liquidfood/Initialize() - . = ..() - reagents.add_reagent("iron", 3) - bitesize = 4 - -/obj/item/weapon/reagent_containers/food/snacks/tastybread - name = "bread tube" - desc = "Bread in a tube. Chewy...and surprisingly tasty." - icon_state = "tastybread" - trash = /obj/item/trash/tastybread - filling_color = "#A66829" - center_of_mass = list("x"=17, "y"=16) - nutriment_amt = 6 - nutriment_desc = list("bread" = 2, "sweetness" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/tastybread/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks - name = "\improper SkrellSnax" - desc = "Cured fungus shipped all the way from Qerr'balak, almost like jerky! Almost." - icon_state = "skrellsnacks" - filling_color = "#A66829" - center_of_mass = list("x"=15, "y"=12) - nutriment_amt = 10 - nutriment_desc = list("mushroom" = 5, "salt" = 5) - -/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks/Initialize() - . = ..() - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/unajerky - name = "Moghes Imported Sissalik Jerky" - icon_state = "unathitinred" - desc = "An incredibly well made jerky, shipped in all the way from Moghes." - trash = /obj/item/trash/unajerky - filling_color = "#631212" - center_of_mass = list("x"=15, "y"=9) - -/obj/item/weapon/reagent_containers/food/snacks/unajerky/Initialize() - ..() - reagents.add_reagent("protein", 8) - reagents.add_reagent("capsaicin", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/croissant - name = "croissant" - desc = "True French cuisine." - filling_color = "#E3D796" - icon_state = "croissant" - nutriment_amt = 6 - nutriment_desc = list("french bread" = 6) - -/obj/item/weapon/reagent_containers/food/snacks/croissant/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/meatbun - name = "meat bun" - desc = "Chinese street food, in neither China nor a street." - filling_color = "#DEDEAB" - icon_state = "meatbun" - nutriment_amt = 4 - -/obj/item/weapon/reagent_containers/food/snacks/meatbun/Initialize() - . = ..() - bitesize = 2 - reagents.add_reagent("protein", 4) - -/obj/item/weapon/reagent_containers/food/snacks/sashimi - name = "carp sashimi" - desc = "Expertly prepared. Still toxic." - filling_color = "#FFDEFE" - icon_state = "sashimi" - nutriment_amt = 6 - -/obj/item/weapon/reagent_containers/food/snacks/sashimi/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - reagents.add_reagent("carpotoxin", 2) - bitesize = 3 - -/obj/item/weapon/reagent_containers/food/snacks/benedict - name = "eggs benedict" - desc = "Hey, there's only one egg in this!" - filling_color = "#FFDF78" - icon_state = "benedict" - nutriment_amt = 4 - -/obj/item/weapon/reagent_containers/food/snacks/benedict/Initialize() - . = ..() - reagents.add_reagent("protein", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/beans - name = "baked beans" - desc = "Musical fruit in a slightly less musical container." - filling_color = "#FC6F28" - icon_state = "beans" - nutriment_amt = 4 - nutriment_desc = list("beans" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/beans/Initialize() - . = ..() - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/sugarcookie - name = "sugar cookie" - desc = "Just like your little sister used to make." - filling_color = "#DBC94F" - icon_state = "sugarcookie" - nutriment_amt = 5 - nutriment_desc = list("sweetness" = 4, "cookie" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/sugarcookie/Initialize() - . = ..() - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/berrymuffin - name = "berry muffin" - desc = "A delicious and spongy little cake, with berries." - icon_state = "berrymuffin" - filling_color = "#E0CF9B" - center_of_mass = list("x"=17, "y"=4) - nutriment_amt = 6 - nutriment_desc = list("sweetness" = 2, "muffin" = 2, "berries" = 2) - -/obj/item/weapon/reagent_containers/food/snacks/berrymuffin/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/ghostmuffin - name = "booberry muffin" - desc = "My stomach is a graveyard! No living being can quench my bloodthirst!" - icon_state = "berrymuffin" - filling_color = "#799ACE" - center_of_mass = list("x"=17, "y"=4) - nutriment_amt = 6 - nutriment_desc = list("spookiness" = 4, "muffin" = 1, "berries" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/ghostmuffin/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/eggroll - name = "egg roll" - desc = "Free with orders over 10 thalers." - icon_state = "eggroll" - filling_color = "#799ACE" - center_of_mass = list("x"=17, "y"=4) - nutriment_amt = 4 - nutriment_desc = list("egg" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/eggroll/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("protein", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/fruitsalad - name = "fruit salad" - desc = "Your standard fruit salad." - icon_state = "fruitsalad" - filling_color = "#FF3867" - nutriment_amt = 10 - nutriment_desc = list("fruit" = 10) - -/obj/item/weapon/reagent_containers/food/snacks/fruitsalad/Initialize() - . = ..() - reagents.add_reagent("nutriment", 10) - bitesize = 4 - -/obj/item/weapon/reagent_containers/food/snacks/eggbowl - name = "egg bowl" - desc = "A bowl of fried rice with egg mixed in." - icon_state = "eggbowl" - trash = /obj/item/trash/snack_bowl - filling_color = "#FFFBDB" - nutriment_amt = 6 - nutriment_desc = list("rice" = 2, "egg" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/eggbowl/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("protein", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/porkbowl - name = "pork bowl" - desc = "A bowl of fried rice with cuts of meat." - icon_state = "porkbowl" - trash = /obj/item/trash/snack_bowl - filling_color = "#FFFBDB" - nutriment_amt = 6 - nutriment_desc = list("rice" = 2, "meat" = 4) - -/obj/item/weapon/reagent_containers/food/snacks/porkbowl/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("protein", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/tortilla - name = "tortilla" - desc = "The base for all your burritos." - icon_state = "tortilla" - nutriment_amt = 1 - nutriment_desc = list("bread" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/tortilla/Initialize() - . = ..() - reagents.add_reagent("nutriment", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/meatburrito - name = "carne asada burrito" - desc = "The best burrito for meat lovers." - icon_state = "carneburrito" - nutriment_amt = 6 - nutriment_desc = list("tortilla" = 3, "meat" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/meatburrito/Initialize() - . = ..() - reagents.add_reagent("protein", 6) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/cheeseburrito - name = "Cheese burrito" - desc = "It's a burrito filled with cheese." - icon_state = "cheeseburrito" - nutriment_amt = 6 - nutriment_desc = list("tortilla" = 3, "cheese" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/cheeseburrito/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("protein", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/fuegoburrito - name = "fuego phoron burrito" - desc = "A super spicy burrito." - icon_state = "fuegoburrito" - nutriment_amt = 6 - nutriment_desc = list("chili peppers" = 5, "tortilla" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/fuegoburrito/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("capsaicin", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/nachos - name = "nachos" - desc = "Chips from Old Mexico." - icon_state = "nachos" - nutriment_amt = 2 - nutriment_desc = list("salt" = 1) - -/obj/item/weapon/reagent_containers/food/snacks/nachos/Initialize() - . = ..() - reagents.add_reagent("nutriment", 1) - bitesize = 1 - -/obj/item/weapon/reagent_containers/food/snacks/cheesenachos - name = "cheesy nachos" - desc = "The delicious combination of nachos and melting cheese." - icon_state = "cheesenachos" - nutriment_amt = 5 - nutriment_desc = list("salt" = 2, "cheese" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/cheesenachos/Initialize() - . = ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("protein", 2) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/cubannachos - name = "cuban nachos" - desc = "That's some dangerously spicy nachos." - icon_state = "cubannachos" - nutriment_amt = 6 - nutriment_desc = list("salt" = 1, "cheese" = 2, "chili peppers" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/cubannachos/Initialize() - . = ..() - reagents.add_reagent("nutriment", 5) - reagents.add_reagent("capsaicin", 4) - bitesize = 2 - -/obj/item/weapon/reagent_containers/food/snacks/piginblanket - name = "pig in a blanket" - desc = "A sausage embedded in soft, fluffy pastry. Free this pig from its blanket prison by eating it." - icon_state = "piginblanket" - nutriment_amt = 6 - nutriment_desc = list("meat" = 3, "pastry" = 3) - -/obj/item/weapon/reagent_containers/food/snacks/piginblanket/Initialize() - . = ..() - reagents.add_reagent("nutriment", 6) - reagents.add_reagent("protein", 4) +//Food items that are eaten normally and don't leave anything behind. +/obj/item/weapon/reagent_containers/food/snacks + name = "snack" + desc = "yummy" + icon = 'icons/obj/food.dmi' + icon_state = null + var/bitesize = 1 + var/bitecount = 0 + var/trash = null + var/slice_path + var/slices_num + var/dried_type = null + var/dry = 0 + var/nutriment_amt = 0 + var/list/nutriment_desc = list("food" = 1) + center_of_mass = list("x"=16, "y"=16) + w_class = ITEMSIZE_SMALL + force = 1 + +/obj/item/weapon/reagent_containers/food/snacks/Initialize() + . = ..() + if(nutriment_amt) + reagents.add_reagent("nutriment",nutriment_amt,nutriment_desc) + +/obj/item/weapon/reagent_containers/food/snacks/Initialize() + . = ..() + if(nutriment_amt) + reagents.add_reagent("nutriment", nutriment_amt) + + //Placeholder for effect that trigger on eating that aren't tied to reagents. +/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/M) + if(!usr) + usr = M + if(!reagents.total_volume) + M.visible_message("[M] finishes eating \the [src].","You finish eating \the [src].") + usr.drop_from_inventory(src) //so icons update :[ + + if(trash) + if(ispath(trash,/obj/item)) + var/obj/item/TrashItem = new trash(usr) + usr.put_in_hands(TrashItem) + else if(istype(trash,/obj/item)) + usr.put_in_hands(trash) + qdel(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/attack_self(mob/user as mob) + return + +/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M as mob, mob/user as mob, def_zone) + if(reagents && !reagents.total_volume) + user << "None of [src] left!" + user.drop_from_inventory(src) + qdel(src) + return 0 + + if(istype(M, /mob/living/carbon)) + //TODO: replace with standard_feed_mob() call. + + var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25) + if(M == user) //If you're eating it yourself + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(!H.check_has_mouth()) + user << "Where do you intend to put \the [src]? You don't have a mouth!" + return + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" + return + + user.setClickCooldown(user.get_attack_speed(src)) //puts a limit on how fast people can eat/drink things + //VOREStation Edit Begin + if (fullness <= 50) + M << "You hungrily chew out a piece of [src] and gobble it!" + if (fullness > 50 && fullness <= 150) + M << "You hungrily begin to eat [src]." + if (fullness > 150 && fullness <= 350) + M << "You take a bite of [src]." + if (fullness > 350 && fullness <= 550) + M << "You unwillingly chew a bit of [src]." + if (fullness > (550 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat + M << "You cannot force any more of [src] to go down your throat." + return 0 + //VOREStation Edit End + + else if(user.a_intent == I_HURT) + return ..() + + else + if(istype(M,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(!H.check_has_mouth()) + user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!" + return + var/obj/item/blocked = H.check_mouth_coverage() + if(blocked) + user << "\The [blocked] is in the way!" + return + + if (fullness <= (550 * (1 + M.overeatduration / 1000))) + user.visible_message("[user] attempts to feed [M] [src].") + else + user.visible_message("[user] cannot force anymore of [src] down [M]'s throat.") + return 0 + + user.setClickCooldown(user.get_attack_speed(src)) + if(!do_mob(user, M)) return + + //Do we really care about this + add_attack_logs(user,M,"Fed with [src.name] containing [reagentlist(src)]", admin_notify = FALSE) + + user.visible_message("[user] feeds [M] [src].") + + else + user << "This creature does not seem to have a mouth!" + return + + if(reagents) //Handle ingestion of the reagent. + playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1) + if(reagents.total_volume) + if(reagents.total_volume > bitesize) + reagents.trans_to_mob(M, bitesize, CHEM_INGEST) + else + reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST) + bitecount++ + On_Consume(M) + return 1 + + return 0 + +/obj/item/weapon/reagent_containers/food/snacks/examine(mob/user) + if(!..(user, 1)) + return + if (bitecount==0) + return + else if (bitecount==1) + user << "\The [src] was bitten by someone!" + else if (bitecount<=3) + user << "\The [src] was bitten [bitecount] times!" + else + user << "\The [src] was bitten multiple times!" + +/obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W,/obj/item/weapon/storage)) + ..() // -> item/attackby() + return + + // Eating with forks + if(istype(W,/obj/item/weapon/material/kitchen/utensil)) + var/obj/item/weapon/material/kitchen/utensil/U = W + if(U.scoop_food) + if(!U.reagents) + U.create_reagents(5) + + if (U.reagents.total_volume > 0) + user << "You already have something on your [U]." + return + + user.visible_message( \ + "[user] scoops up some [src] with \the [U]!", \ + "You scoop up some [src] with \the [U]!" \ + ) + + src.bitecount++ + U.overlays.Cut() + U.loaded = "[src]" + var/image/I = new(U.icon, "loadedfood") + I.color = src.filling_color + U.overlays += I + + reagents.trans_to_obj(U, min(reagents.total_volume,5)) + + if (reagents.total_volume <= 0) + qdel(src) + return + + if (is_sliceable()) + //these are used to allow hiding edge items in food that is not on a table/tray + var/can_slice_here = isturf(src.loc) && ((locate(/obj/structure/table) in src.loc) || (locate(/obj/machinery/optable) in src.loc) || (locate(/obj/item/weapon/tray) in src.loc)) + var/hide_item = !has_edge(W) || !can_slice_here + + if (hide_item) + if (W.w_class >= src.w_class || is_robot_module(W)) + return + + to_chat(user, "You slip \the [W] inside \the [src].") + user.drop_from_inventory(W, src) + add_fingerprint(user) + contents += W + return + + if (has_edge(W)) + if (!can_slice_here) + to_chat(user, "You cannot slice \the [src] here! You need a table or at least a tray to do it.") + return + + var/slices_lost = 0 + if (W.w_class > 3) + user.visible_message("\The [user] crudely slices \the [src] with [W]!", "You crudely slice \the [src] with your [W]!") + slices_lost = rand(1,min(1,round(slices_num/2))) + else + user.visible_message("\The [user] slices \the [src]!", "You slice \the [src]!") + + var/reagents_per_slice = reagents.total_volume/slices_num + for(var/i=1 to (slices_num-slices_lost)) + var/obj/slice = new slice_path (src.loc) + reagents.trans_to_obj(slice, reagents_per_slice) + qdel(src) + return + +/obj/item/weapon/reagent_containers/food/snacks/proc/is_sliceable() + return (slices_num && slice_path && slices_num > 0) + +/obj/item/weapon/reagent_containers/food/snacks/Destroy() + if(contents) + for(var/atom/movable/something in contents) + something.dropInto(loc) + . = ..() + +//////////////////////////////////////////////////////////////////////////////// +/// FOOD END +//////////////////////////////////////////////////////////////////////////////// +/obj/item/weapon/reagent_containers/food/snacks/attack_generic(var/mob/living/user) + if(!isanimal(user) && !isalien(user)) + return + user.visible_message("[user] nibbles away at \the [src].","You nibble away at \the [src].") + bitecount++ + if(reagents) + reagents.trans_to_mob(user, bitesize, CHEM_INGEST) + spawn(5) + if(!src && !user.client) + user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]") + qdel(src) + On_Consume(user) + +////////////////////////////////////////////////// +////////////////////////////////////////////Snacks +////////////////////////////////////////////////// +//Items in the "Snacks" subcategory are food items that people actually eat. The key points are that they are created +// already filled with reagents and are destroyed when empty. Additionally, they make a "munching" noise when eaten. + +//Notes by Darem: Food in the "snacks" subtype can hold a maximum of 50 units Generally speaking, you don't want to go over 40 +// total for the item because you want to leave space for extra condiments. If you want effect besides healing, add a reagent for +// it. Try to stick to existing reagents when possible (so if you want a stronger healing effect, just use Tricordrazine). On use +// effect (such as the old officer eating a donut code) requires a unique reagent (unless you can figure out a better way). + +//The nutriment reagent and bitesize variable replace the old heal_amt and amount variables. Each unit of nutriment is equal to +// 2 of the old heal_amt variable. Bitesize is the rate at which the reagents are consumed. So if you have 6 nutriment and a +// bitesize of 2, then it'll take 3 bites to eat. Unlike the old system, the contained reagents are evenly spread among all +// the bites. No more contained reagents = no more bites. + +//Here is an example of the new formatting for anyone who wants to add more food items. +///obj/item/weapon/reagent_containers/food/snacks/xenoburger //Identification path for the object. +// name = "Xenoburger" //Name that displays in the UI. +// desc = "Smells caustic. Tastes like heresy." //Duh +// icon_state = "xburger" //Refers to an icon in food.dmi +// New() //Don't mess with this. +// ..() //Same here. +// reagents.add_reagent("xenomicrobes", 10) //This is what is in the food item. you may copy/paste +// reagents.add_reagent("nutriment", 2) // this line of code for all the contents. +// bitesize = 3 //This is the amount each bite consumes. + + + + +/obj/item/weapon/reagent_containers/food/snacks/aesirsalad + name = "Aesir salad" + desc = "Probably too incredible for mortal men to fully enjoy." + icon_state = "aesirsalad" + trash = /obj/item/trash/snack_bowl + filling_color = "#468C00" + center_of_mass = list("x"=17, "y"=11) + nutriment_amt = 8 + nutriment_desc = list("apples" = 3,"salad" = 5) + +/obj/item/weapon/reagent_containers/food/snacks/aesirsalad/Initialize() + . = ..() + reagents.add_reagent("doctorsdelight", 8) + reagents.add_reagent("tricordrazine", 8) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/candy + name = "candy" + desc = "Nougat, love it or hate it." + icon_state = "candy" + trash = /obj/item/trash/candy + filling_color = "#7D5F46" + center_of_mass = list("x"=15, "y"=15) + nutriment_amt = 1 + nutriment_desc = list("candy" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/candy/Initialize() + . = ..() + reagents.add_reagent("sugar", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar + name = "protein bar" + desc = "SwoleMAX brand protein bars, guaranteed to get you feeling perfectly overconfident." + icon_state = "proteinbar" + trash = /obj/item/trash/candy/proteinbar + nutriment_amt = 9 + nutriment_desc = list("candy" = 1, "protein" = 8) + +/obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar/Initialize() + . = ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("sugar", 4) + bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/candy/donor + name = "Donor Candy" + desc = "A little treat for blood donors." + trash = /obj/item/trash/candy + nutriment_amt = 9 + nutriment_desc = list("candy" = 10) + +/obj/item/weapon/reagent_containers/food/snacks/candy/donor/Initialize() + . = ..() + reagents.add_reagent("sugar", 3) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/candy_corn + name = "candy corn" + desc = "It's a handful of candy corn. Cannot be stored in a detective's hat, alas." + icon_state = "candy_corn" + filling_color = "#FFFCB0" + center_of_mass = list("x"=14, "y"=10) + nutriment_amt = 4 + nutriment_desc = list("candy corn" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/candy_corn/Initialize() + ..() + reagents.add_reagent("sugar", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/chips + name = "chips" + desc = "Commander Riker's What-The-Crisps" + icon_state = "chips" + trash = /obj/item/trash/chips + filling_color = "#E8C31E" + center_of_mass = list("x"=15, "y"=15) + nutriment_amt = 3 + nutriment_desc = list("salt" = 1, "chips" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/chips/Initialize() + . = ..() + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/cookie + name = "cookie" + desc = "COOKIE!!!" + icon_state = "COOKIE!!!" + filling_color = "#DBC94F" + center_of_mass = list("x"=17, "y"=18) + nutriment_amt = 5 + nutriment_desc = list("sweetness" = 3, "cookie" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/cookie/Initialize() + . = ..() + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/chocolatebar + name = "Chocolate Bar" + desc = "Such sweet, fattening food." + icon_state = "chocolatebar" + filling_color = "#7D5F46" + center_of_mass = list("x"=15, "y"=15) + nutriment_amt = 2 + nutriment_desc = list("chocolate" = 5) + +/obj/item/weapon/reagent_containers/food/snacks/chocolatebar/Initialize() + . = ..() + reagents.add_reagent("sugar", 2) + reagents.add_reagent("coco", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/chocolatepiece + name = "chocolate piece" + desc = "A luscious milk chocolate piece filled with gooey caramel." + icon_state = "chocolatepiece" + filling_color = "#7D5F46" + center_of_mass = list("x"=15, "y"=15) + nutriment_amt = 1 + nutriment_desc = list("chocolate" = 3, "caramel" = 2, "lusciousness" = 1) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/white + name = "white chocolate piece" + desc = "A creamy white chocolate piece drizzled in milk chocolate." + icon_state = "chocolatepiece_white" + filling_color = "#E2DAD3" + nutriment_desc = list("white chocolate" = 3, "creaminess" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/chocolatepiece/truffle + name = "chocolate truffle" + desc = "A bite-sized milk chocolate truffle that could buy anyone's love." + icon_state = "chocolatepiece_truffle" + nutriment_desc = list("chocolate" = 3, "undying devotion" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/chocolateegg + name = "Chocolate Egg" + desc = "Such sweet, fattening food." + icon_state = "chocolateegg" + filling_color = "#7D5F46" + center_of_mass = list("x"=16, "y"=13) + nutriment_amt = 3 + nutriment_desc = list("chocolate" = 5) + +/obj/item/weapon/reagent_containers/food/snacks/chocolateegg/Initialize() + . = ..() + reagents.add_reagent("sugar", 2) + reagents.add_reagent("coco", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/donut + name = "donut" + desc = "Goes great with Robust Coffee." + icon_state = "donut1" + filling_color = "#D9C386" + var/overlay_state = "box-donut1" + center_of_mass = list("x"=13, "y"=16) + nutriment_desc = list("sweetness", "donut") + +/obj/item/weapon/reagent_containers/food/snacks/donut/normal + name = "donut" + desc = "Goes great with Robust Coffee." + icon_state = "donut1" + nutriment_amt = 3 + +/obj/item/weapon/reagent_containers/food/snacks/donut/normal/Initialize() + . = ..() + reagents.add_reagent("nutriment", 3) + reagents.add_reagent("sprinkles", 1) + src.bitesize = 3 + if(prob(30)) + src.icon_state = "donut2" + src.overlay_state = "box-donut2" + src.name = "frosted donut" + reagents.add_reagent("sprinkles", 2) + center_of_mass = list("x"=19, "y"=16) + +/obj/item/weapon/reagent_containers/food/snacks/donut/chaos + name = "Chaos Donut" + desc = "Like life, it never quite tastes the same." + icon_state = "donut1" + filling_color = "#ED11E6" + nutriment_amt = 2 + +/obj/item/weapon/reagent_containers/food/snacks/donut/chaos/Initialize() + . = ..() + reagents.add_reagent("sprinkles", 1) + bitesize = 10 + var/chaosselect = pick(1,2,3,4,5,6,7,8,9,10) + switch(chaosselect) + if(1) + reagents.add_reagent("nutriment", 3) + if(2) + reagents.add_reagent("capsaicin", 3) + if(3) + reagents.add_reagent("frostoil", 3) + if(4) + reagents.add_reagent("sprinkles", 3) + if(5) + reagents.add_reagent("phoron", 3) + if(6) + reagents.add_reagent("coco", 3) + if(7) + reagents.add_reagent("slimejelly", 3) + if(8) + reagents.add_reagent("banana", 3) + if(9) + reagents.add_reagent("berryjuice", 3) + if(10) + reagents.add_reagent("tricordrazine", 3) + if(prob(30)) + src.icon_state = "donut2" + src.overlay_state = "box-donut2" + src.name = "Frosted Chaos Donut" + reagents.add_reagent("sprinkles", 2) + +/obj/item/weapon/reagent_containers/food/snacks/donut/jelly + name = "Jelly Donut" + desc = "You jelly?" + icon_state = "jdonut1" + filling_color = "#ED1169" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 3 + +/obj/item/weapon/reagent_containers/food/snacks/donut/jelly/Initialize() + . = ..() + reagents.add_reagent("sprinkles", 1) + reagents.add_reagent("berryjuice", 5) + bitesize = 5 + if(prob(30)) + src.icon_state = "jdonut2" + src.overlay_state = "box-donut2" + src.name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) + +/obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly + name = "Jelly Donut" + desc = "You jelly?" + icon_state = "jdonut1" + filling_color = "#ED1169" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 3 + +/obj/item/weapon/reagent_containers/food/snacks/donut/slimejelly/Initialize() + . = ..() + reagents.add_reagent("sprinkles", 1) + reagents.add_reagent("slimejelly", 5) + bitesize = 5 + if(prob(30)) + src.icon_state = "jdonut2" + src.overlay_state = "box-donut2" + src.name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) + +/obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly + name = "Jelly Donut" + desc = "You jelly?" + icon_state = "jdonut1" + filling_color = "#ED1169" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 3 + +/obj/item/weapon/reagent_containers/food/snacks/donut/cherryjelly/Initialize() + . = ..() + reagents.add_reagent("sprinkles", 1) + reagents.add_reagent("cherryjelly", 5) + bitesize = 5 + if(prob(30)) + src.icon_state = "jdonut2" + src.overlay_state = "box-donut2" + src.name = "Frosted Jelly Donut" + reagents.add_reagent("sprinkles", 2) + +/obj/item/weapon/reagent_containers/food/snacks/egg + name = "egg" + desc = "An egg!" + icon_state = "egg" + filling_color = "#FDFFD1" + volume = 10 + center_of_mass = list("x"=16, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/egg/Initialize() + . = ..() + reagents.add_reagent("egg", 3) + +/obj/item/weapon/reagent_containers/food/snacks/egg/afterattack(obj/O as obj, mob/user as mob, proximity) + if(istype(O,/obj/machinery/microwave)) + return ..() + if(!(proximity && O.is_open_container())) + return + user << "You crack \the [src] into \the [O]." + reagents.trans_to(O, reagents.total_volume) + user.drop_from_inventory(src) + qdel(src) + +/obj/item/weapon/reagent_containers/food/snacks/egg/throw_impact(atom/hit_atom) + ..() + new/obj/effect/decal/cleanable/egg_smudge(src.loc) + src.reagents.splash(hit_atom, reagents.total_volume) + src.visible_message("[src.name] has been squashed.","You hear a smack.") + qdel(src) + +/obj/item/weapon/reagent_containers/food/snacks/egg/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype( W, /obj/item/weapon/pen/crayon )) + var/obj/item/weapon/pen/crayon/C = W + var/clr = C.colourName + + if(!(clr in list("blue","green","mime","orange","purple","rainbow","red","yellow"))) + usr << "The egg refuses to take on this color!" + return + + usr << "You color \the [src] [clr]" + icon_state = "egg-[clr]" + else + ..() + +/obj/item/weapon/reagent_containers/food/snacks/egg/blue + icon_state = "egg-blue" + +/obj/item/weapon/reagent_containers/food/snacks/egg/green + icon_state = "egg-green" + +/obj/item/weapon/reagent_containers/food/snacks/egg/mime + icon_state = "egg-mime" + +/obj/item/weapon/reagent_containers/food/snacks/egg/orange + icon_state = "egg-orange" + +/obj/item/weapon/reagent_containers/food/snacks/egg/purple + icon_state = "egg-purple" + +/obj/item/weapon/reagent_containers/food/snacks/egg/rainbow + icon_state = "egg-rainbow" + +/obj/item/weapon/reagent_containers/food/snacks/egg/red + icon_state = "egg-red" + +/obj/item/weapon/reagent_containers/food/snacks/egg/yellow + icon_state = "egg-yellow" + +/obj/item/weapon/reagent_containers/food/snacks/friedegg + name = "Fried egg" + desc = "A fried egg, with a touch of salt and pepper." + icon_state = "friedegg" + filling_color = "#FFDF78" + center_of_mass = list("x"=16, "y"=14) + +/obj/item/weapon/reagent_containers/food/snacks/friedegg/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("sodiumchloride", 1) + reagents.add_reagent("blackpepper", 1) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/boiledegg + name = "Boiled egg" + desc = "A hard boiled egg." + icon_state = "egg" + filling_color = "#FFFFFF" + +/obj/item/weapon/reagent_containers/food/snacks/boiledegg/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + +/obj/item/weapon/reagent_containers/food/snacks/organ + name = "organ" + desc = "It's good for you." + icon = 'icons/obj/surgery.dmi' + icon_state = "appendix" + filling_color = "#E00D34" + center_of_mass = list("x"=16, "y"=16) + +/obj/item/weapon/reagent_containers/food/snacks/organ/Initialize() + . = ..() + reagents.add_reagent("protein", rand(3,5)) + reagents.add_reagent("toxin", rand(1,3)) + src.bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/tofu + name = "Tofu" + icon_state = "tofu" + desc = "We all love tofu." + filling_color = "#FFFEE0" + center_of_mass = list("x"=17, "y"=10) + nutriment_amt = 3 + nutriment_desc = list("tofu" = 3, "goeyness" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/tofu/Initialize() + . = ..() + src.bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/tofurkey + name = "Tofurkey" + desc = "A fake turkey made from tofu." + icon_state = "tofurkey" + filling_color = "#FFFEE0" + center_of_mass = list("x"=16, "y"=8) + nutriment_amt = 12 + nutriment_desc = list("turkey" = 3, "tofu" = 5, "goeyness" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/tofurkey/Initialize() + . = ..() + reagents.add_reagent("stoxin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/stuffing + name = "Stuffing" + desc = "Moist, peppery breadcrumbs for filling the body cavities of dead birds. Dig in!" + icon_state = "stuffing" + filling_color = "#C9AC83" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 3 + nutriment_desc = list("dryness" = 2, "bread" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/stuffing/Initialize() + . = ..() + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/carpmeat + name = "carp fillet" + desc = "A fillet of spess carp meat" + icon_state = "fishfillet" + filling_color = "#FFDEFE" + center_of_mass = list("x"=17, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/carpmeat/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("carpotoxin", 3) + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/fishfingers + name = "Fish Fingers" + desc = "A finger of fish." + icon_state = "fishfingers" + filling_color = "#FFDEFE" + center_of_mass = list("x"=16, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/fishfingers/Initialize() + . = ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice + name = "huge mushroom slice" + desc = "A slice from a huge mushroom." + icon_state = "hugemushroomslice" + filling_color = "#E0D7C5" + center_of_mass = list("x"=17, "y"=16) + nutriment_amt = 3 + nutriment_desc = list("raw" = 2, "mushroom" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice/Initialize() + . = ..() + reagents.add_reagent("psilocybin", 3) + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/tomatomeat + name = "tomato slice" + desc = "A slice from a huge tomato" + icon_state = "tomatomeat" + filling_color = "#DB0000" + center_of_mass = list("x"=17, "y"=16) + nutriment_amt = 3 + nutriment_desc = list("raw" = 2, "tomato" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/tomatomeat/Initialize() + . = ..() + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/bearmeat + name = "bear meat" + desc = "A very manly slab of meat." + icon_state = "bearmeat" + filling_color = "#DB0000" + center_of_mass = list("x"=16, "y"=10) + +/obj/item/weapon/reagent_containers/food/snacks/bearmeat/Initialize() + . = ..() + reagents.add_reagent("protein", 12) + reagents.add_reagent("hyperzine", 5) + src.bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/xenomeat + name = "xenomeat" + desc = "A slab of green meat. Smells like acid." + icon_state = "xenomeat" + filling_color = "#43DE18" + center_of_mass = list("x"=16, "y"=10) + +/obj/item/weapon/reagent_containers/food/snacks/xenomeat/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("pacid",6) + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/xenomeat/spidermeat // Substitute for recipes requiring xeno meat. + name = "spider meat" + desc = "A slab of green meat." + icon_state = "xenomeat" + filling_color = "#43DE18" + center_of_mass = list("x"=16, "y"=10) + +/obj/item/weapon/reagent_containers/food/snacks/xenomeat/spidermeat/Initialize() + . = ..() + reagents.add_reagent("spidertoxin",6) + reagents.remove_reagent("pacid",6) + src.bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/meatball + name = "meatball" + desc = "A great meal all round." + icon_state = "meatball" + filling_color = "#DB0000" + center_of_mass = list("x"=16, "y"=16) + +/obj/item/weapon/reagent_containers/food/snacks/meatball/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sausage + name = "Sausage" + desc = "A piece of mixed, long meat." + icon_state = "sausage" + filling_color = "#DB0000" + center_of_mass = list("x"=16, "y"=16) + +/obj/item/weapon/reagent_containers/food/snacks/sausage/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket + name = "Donk-pocket" + desc = "The food of choice for the seasoned traitor." + icon_state = "donkpocket" + filling_color = "#DEDEAB" + center_of_mass = list("x"=16, "y"=10) + var/warm + var/list/heated_reagents + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket/Initialize() + . = ..() + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("protein", 2) + + warm = 0 + heated_reagents = list("tricordrazine" = 5) + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket/proc/heat() + warm = 1 + for(var/reagent in heated_reagents) + reagents.add_reagent(reagent, heated_reagents[reagent]) + bitesize = 6 + name = "Warm " + name + cooltime() + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket/proc/cooltime() + if (src.warm) + spawn(4200) + src.warm = 0 + for(var/reagent in heated_reagents) + src.reagents.del_reagent(reagent) + src.name = initial(name) + return + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket + name = "\improper Sin-pocket" + desc = "The food of choice for the veteran. Do NOT overconsume." + filling_color = "#6D6D00" + heated_reagents = list("doctorsdelight" = 5, "hyperzine" = 0.75, "synaptizine" = 0.25) + var/has_been_heated = 0 + +/obj/item/weapon/reagent_containers/food/snacks/donkpocket/sinpocket/attack_self(mob/user) + if(has_been_heated) + user << "The heating chemicals have already been spent." + return + has_been_heated = 1 + user.visible_message("[user] crushes \the [src] package.", "You crush \the [src] package and feel a comfortable heat build up.") + spawn(200) + user << "You think \the [src] is ready to eat about now." + heat() + +/obj/item/weapon/reagent_containers/food/snacks/brainburger + name = "brainburger" + desc = "A strange looking burger. It looks almost sentient." + icon_state = "brainburger" + filling_color = "#F2B6EA" + center_of_mass = list("x"=15, "y"=11) + +/obj/item/weapon/reagent_containers/food/snacks/brainburger/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("alkysine", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/ghostburger + name = "Ghost Burger" + desc = "Spooky! It doesn't look very filling." + icon_state = "ghostburger" + filling_color = "#FFF2FF" + center_of_mass = list("x"=16, "y"=11) + nutriment_desc = list("buns" = 3, "spookiness" = 3) + nutriment_amt = 2 + +/obj/item/weapon/reagent_containers/food/snacks/ghostburger/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/human + var/hname = "" + var/job = null + filling_color = "#D63C3C" + +/obj/item/weapon/reagent_containers/food/snacks/human/burger + name = "-burger" + desc = "A bloody burger." + icon_state = "hburger" + center_of_mass = list("x"=16, "y"=11) + +/obj/item/weapon/reagent_containers/food/snacks/human/burger/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cheeseburger + name = "cheeseburger" + desc = "The cheese adds a good flavor." + icon_state = "cheeseburger" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 2 + nutriment_desc = list("cheese" = 2, "bun" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/cheeseburger/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + +/obj/item/weapon/reagent_containers/food/snacks/monkeyburger + name = "burger" + desc = "The cornerstone of every nutritious breakfast." + icon_state = "hburger" + filling_color = "#D63C3C" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 3 + nutriment_desc = list("bun" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/monkeyburger/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/fishburger + name = "Fillet -o- Carp Sandwich" + desc = "Almost like a carp is yelling somewhere... Give me back that fillet -o- carp, give me that carp." + icon_state = "fishburger" + filling_color = "#FFDEFE" + center_of_mass = list("x"=16, "y"=10) + +/obj/item/weapon/reagent_containers/food/snacks/fishburger/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/tofuburger + name = "Tofu Burger" + desc = "What.. is that meat?" + icon_state = "tofuburger" + filling_color = "#FFFEE0" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 6 + nutriment_desc = list("bun" = 2, "pseudo-soy meat" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/tofuburger/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/roburger + name = "roburger" + desc = "The lettuce is the only organic component. Beep." + icon_state = "roburger" + filling_color = "#CCCCCC" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 2 + nutriment_desc = list("bun" = 2, "metal" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/roburger/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/roburgerbig + name = "roburger" + desc = "This massive patty looks like poison. Beep." + icon_state = "roburger" + filling_color = "#CCCCCC" + volume = 100 + center_of_mass = list("x"=16, "y"=11) + +/obj/item/weapon/reagent_containers/food/snacks/roburgerbig/Initialize() + . = ..() + bitesize = 0.1 + +/obj/item/weapon/reagent_containers/food/snacks/xenoburger + name = "xenoburger" + desc = "Smells caustic. Tastes like heresy." + icon_state = "xburger" + filling_color = "#43DE18" + center_of_mass = list("x"=16, "y"=11) + +/obj/item/weapon/reagent_containers/food/snacks/xenoburger/Initialize() + . = ..() + reagents.add_reagent("protein", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/clownburger + name = "Clown Burger" + desc = "This tastes funny..." + icon_state = "clownburger" + filling_color = "#FF00FF" + center_of_mass = list("x"=17, "y"=12) + nutriment_amt = 6 + nutriment_desc = list("bun" = 2, "clown shoe" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/clownburger/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/mimeburger + name = "Mime Burger" + desc = "Its taste defies language." + icon_state = "mimeburger" + filling_color = "#FFFFFF" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 6 + nutriment_desc = list("bun" = 2, "face paint" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/mimeburger/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/omelette + name = "Omelette Du Fromage" + desc = "That's all you can say!" + icon_state = "omelette" + trash = /obj/item/trash/plate + filling_color = "#FFF9A8" + center_of_mass = list("x"=16, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/omelette/Initialize() + . = ..() + reagents.add_reagent("protein", 8) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/muffin + name = "Muffin" + desc = "A delicious and spongy little cake" + icon_state = "muffin" + filling_color = "#E0CF9B" + center_of_mass = list("x"=17, "y"=4) + nutriment_amt = 6 + nutriment_desc = list("sweetness" = 3, "muffin" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/muffin/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/pie + name = "Banana Cream Pie" + desc = "Just like back home, on clown planet! HONK!" + icon_state = "pie" + trash = /obj/item/trash/plate + filling_color = "#FBFFB8" + center_of_mass = list("x"=16, "y"=13) + nutriment_amt = 4 + nutriment_desc = list("pie" = 3, "cream" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/pie/Initialize() + . = ..() + reagents.add_reagent("banana",5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/pie/throw_impact(atom/hit_atom) + ..() + new/obj/effect/decal/cleanable/pie_smudge(src.loc) + src.visible_message("\The [src.name] splats.","You hear a splat.") + qdel(src) + +/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis + name = "Berry Clafoutis" + desc = "No black birds, this is a good sign." + icon_state = "berryclafoutis" + trash = /obj/item/trash/plate + center_of_mass = list("x"=16, "y"=13) + nutriment_amt = 4 + nutriment_desc = list("sweetness" = 2, "pie" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/berryclafoutis/Initialize() + . = ..() + reagents.add_reagent("berryjuice", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/waffles + name = "waffles" + desc = "Mmm, waffles" + icon_state = "waffles" + trash = /obj/item/trash/waffles + filling_color = "#E6DEB5" + center_of_mass = list("x"=15, "y"=11) + nutriment_amt = 8 + nutriment_desc = list("waffle" = 8) + +/obj/item/weapon/reagent_containers/food/snacks/waffles/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/eggplantparm + name = "Eggplant Parmigiana" + desc = "The only good recipe for eggplant." + icon_state = "eggplantparm" + trash = /obj/item/trash/plate + filling_color = "#4D2F5E" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 6 + nutriment_desc = list("cheese" = 3, "eggplant" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/eggplantparm/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/soylentgreen + name = "Soylent Green" + desc = "Not made of people. Honest." //Totally people. + icon_state = "soylent_green" + trash = /obj/item/trash/waffles + filling_color = "#B8E6B5" + center_of_mass = list("x"=15, "y"=11) + +/obj/item/weapon/reagent_containers/food/snacks/soylentgreen/Initialize() + . = ..() + reagents.add_reagent("protein", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/soylenviridians + name = "Soylen Virdians" + desc = "Not made of people. Honest." //Actually honest for once. + icon_state = "soylent_yellow" + trash = /obj/item/trash/waffles + filling_color = "#E6FA61" + center_of_mass = list("x"=15, "y"=11) + nutriment_amt = 10 + nutriment_desc = list("some sort of protein" = 10) //seasoned VERY well. + +/obj/item/weapon/reagent_containers/food/snacks/soylenviridians/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/meatpie + name = "Meat-pie" + icon_state = "meatpie" + desc = "An old barber recipe, very delicious!" + trash = /obj/item/trash/plate + filling_color = "#948051" + center_of_mass = list("x"=16, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/meatpie/Initialize() + . = ..() + reagents.add_reagent("protein", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tofupie + name = "Tofu-pie" + icon_state = "meatpie" + desc = "A delicious tofu pie." + trash = /obj/item/trash/plate + filling_color = "#FFFEE0" + center_of_mass = list("x"=16, "y"=13) + nutriment_amt = 10 + nutriment_desc = list("tofu" = 2, "pie" = 8) + +/obj/item/weapon/reagent_containers/food/snacks/tofupie/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/amanita_pie + name = "amanita pie" + desc = "Sweet and tasty poison pie." + icon_state = "amanita_pie" + filling_color = "#FFCCCC" + center_of_mass = list("x"=17, "y"=9) + nutriment_amt = 5 + nutriment_desc = list("sweetness" = 3, "mushroom" = 3, "pie" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/amanita_pie/Initialize() + ..() + reagents.add_reagent("amatoxin", 3) + reagents.add_reagent("psilocybin", 1) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/plump_pie + name = "plump pie" + desc = "I bet you love stuff made out of plump helmets!" + icon_state = "plump_pie" + filling_color = "#B8279B" + center_of_mass = list("x"=17, "y"=9) + nutriment_amt = 8 + nutriment_desc = list("heartiness" = 2, "mushroom" = 3, "pie" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/plump_pie/Initialize() + ..() + if(prob(10)) + name = "exceptional plump pie" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump pie!" + reagents.add_reagent("nutriment", 8) + reagents.add_reagent("tricordrazine", 5) + bitesize = 2 + else + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/xemeatpie + name = "Xeno-pie" + icon_state = "xenomeatpie" + desc = "A delicious meatpie. Probably heretical." + trash = /obj/item/trash/plate + filling_color = "#43DE18" + center_of_mass = list("x"=16, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/xemeatpie/Initialize() + . = ..() + reagents.add_reagent("protein", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/wingfangchu + name = "Wing Fang Chu" + desc = "A savory dish of alien wing wang in soy." + icon_state = "wingfangchu" + trash = /obj/item/trash/snack_bowl + filling_color = "#43DE18" + center_of_mass = list("x"=17, "y"=9) + +/obj/item/weapon/reagent_containers/food/snacks/wingfangchu/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/human/kabob + name = "-kabob" + icon_state = "kabob" + desc = "A human meat, on a stick." + trash = /obj/item/stack/rods + filling_color = "#A85340" + center_of_mass = list("x"=17, "y"=15) + +/obj/item/weapon/reagent_containers/food/snacks/human/kabob/Initialize() + . = ..() + reagents.add_reagent("protein", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/monkeykabob + name = "Meat-kabob" + icon_state = "kabob" + desc = "Delicious meat, on a stick." + trash = /obj/item/stack/rods + filling_color = "#A85340" + center_of_mass = list("x"=17, "y"=15) + +/obj/item/weapon/reagent_containers/food/snacks/monkeykabob/Initialize() + . = ..() + reagents.add_reagent("protein", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tofukabob + name = "Tofu-kabob" + icon_state = "kabob" + desc = "Vegan meat, on a stick." + trash = /obj/item/stack/rods + filling_color = "#FFFEE0" + + center_of_mass = list("x"=17, "y"=15) + nutriment_amt = 8 + nutriment_desc = list("tofu" = 3, "metal" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/tofukabob/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cubancarp + name = "Cuban Carp" + desc = "A sandwich that burns your tongue and then leaves it numb!" + icon_state = "cubancarp" + trash = /obj/item/trash/plate + filling_color = "#E9ADFF" + center_of_mass = list("x"=12, "y"=5) + nutriment_amt = 3 + nutriment_desc = list("toasted bread" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/cubancarp/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("carpotoxin", 3) + reagents.add_reagent("capsaicin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/popcorn + name = "Popcorn" + desc = "Now let's find some cinema." + icon_state = "popcorn" + trash = /obj/item/trash/popcorn + var/unpopped = 0 + filling_color = "#FFFAD4" + center_of_mass = list("x"=16, "y"=8) + nutriment_amt = 2 + nutriment_desc = list("popcorn" = 3) + + +/obj/item/weapon/reagent_containers/food/snacks/popcorn/Initialize() + . = ..() + unpopped = rand(1,10) + bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0 + +/obj/item/weapon/reagent_containers/food/snacks/popcorn/On_Consume() + if(prob(unpopped)) //lol ...what's the point? + usr << "You bite down on an un-popped kernel!" + unpopped = max(0, unpopped-1) + ..() + +/obj/item/weapon/reagent_containers/food/snacks/sosjerky + name = "Scaredy's Private Reserve Beef Jerky" + icon_state = "sosjerky" + desc = "Beef jerky made from the finest space cows." + trash = /obj/item/trash/sosjerky + filling_color = "#631212" + center_of_mass = list("x"=15, "y"=9) + +/obj/item/weapon/reagent_containers/food/snacks/sosjerky/Initialize() + ..() + reagents.add_reagent("protein", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/no_raisin + name = "4no Raisins" + icon_state = "4no_raisins" + desc = "Best raisins in the universe. Not sure why." + trash = /obj/item/trash/raisins + filling_color = "#343834" + center_of_mass = list("x"=15, "y"=4) + nutriment_amt = 6 + nutriment_desc = list("dried raisins" = 6) + +/obj/item/weapon/reagent_containers/food/snacks/no_raisin/Initialize() + ..() + reagents.add_reagent("nutriment", 6) + +/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie + name = "Space Twinkie" + icon_state = "space_twinkie" + desc = "Guaranteed to survive longer then you will." + filling_color = "#FFE591" + center_of_mass = list("x"=15, "y"=11) + +/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie/Initialize() + . = ..() + reagents.add_reagent("sugar", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers + name = "Cheesie Honkers" + icon_state = "cheesie_honkers" + desc = "Bite sized cheesie snacks that will honk all over your mouth" + trash = /obj/item/trash/cheesie + filling_color = "#FFA305" + center_of_mass = list("x"=15, "y"=9) + nutriment_amt = 4 + nutriment_desc = list("cheese" = 5, "chips" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/syndicake + name = "Syndi-Cakes" + icon_state = "syndi_cakes" + desc = "An extremely moist snack cake that tastes just as good after being nuked." + filling_color = "#FF5D05" + center_of_mass = list("x"=16, "y"=10) + trash = /obj/item/trash/syndi_cakes + nutriment_amt = 4 + nutriment_desc = list("sweetness" = 3, "cake" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/syndicake/Initialize() + . = ..() + reagents.add_reagent("doctorsdelight", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato + name = "Loaded Baked Potato" + desc = "Totally baked." + icon_state = "loadedbakedpotato" + filling_color = "#9C7A68" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 3 + nutriment_desc = list("baked potato" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/loadedbakedpotato/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/fries + name = "Space Fries" + desc = "AKA: French Fries, Freedom Fries, etc." + icon_state = "fries" + trash = /obj/item/trash/plate + filling_color = "#EDDD00" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 4 + nutriment_desc = list("fresh fries" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/fries/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/mashedpotato + name = "Mashed Potato" + desc = "Pillowy mounds of mashed potato." + icon_state = "mashedpotato" + trash = /obj/item/trash/plate + filling_color = "#EDDD00" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 4 + nutriment_desc = list("fluffy mashed potatoes" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/mashedpotato/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/bangersandmash + name = "Bangers and Mash" + desc = "An English treat." + icon_state = "bangersandmash" + trash = /obj/item/trash/plate + filling_color = "#EDDD00" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 4 + nutriment_desc = list("fluffy potato" = 3, "sausage" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/bangersandmash/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/cheesymash + name = "Cheesy Mashed Potato" + desc = "The only thing that could make mash better." + icon_state = "cheesymash" + trash = /obj/item/trash/plate + filling_color = "#EDDD00" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 4 + nutriment_desc = list("cheesy potato" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/cheesymash/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/blackpudding + name = "Black Pudding" + desc = "This doesn't seem like a pudding at all." + icon_state = "blackpudding" + filling_color = "#FF0000" + center_of_mass = list("x"=16, "y"=7) + +/obj/item/weapon/reagent_containers/food/snacks/blackpudding/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + reagents.add_reagent("blood", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/soydope + name = "Soy Dope" + desc = "Dope from a soy." + icon_state = "soydope" + trash = /obj/item/trash/plate + filling_color = "#C4BF76" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 2 + nutriment_desc = list("slime" = 2, "soy" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/soydope/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/spagetti + name = "Spaghetti" + desc = "A bundle of raw spaghetti." + icon_state = "spagetti" + filling_color = "#EDDD00" + center_of_mass = list("x"=16, "y"=16) + nutriment_amt = 1 + nutriment_desc = list("noodles" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/spagetti/Initialize() + . = ..() + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/cheesyfries + name = "Cheesy Fries" + desc = "Fries. Covered in cheese. Duh." + icon_state = "cheesyfries" + trash = /obj/item/trash/plate + filling_color = "#EDDD00" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 4 + nutriment_desc = list("fresh fries" = 3, "cheese" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/cheesyfries/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/fortunecookie + name = "Fortune cookie" + desc = "A true prophecy in each cookie!" + icon_state = "fortune_cookie" + filling_color = "#E8E79E" + center_of_mass = list("x"=15, "y"=14) + nutriment_amt = 3 + nutriment_desc = list("fortune cookie" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/fortunecookie/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/badrecipe + name = "Burned mess" + desc = "Someone should be demoted from chef for this." + icon_state = "badrecipe" + filling_color = "#211F02" + center_of_mass = list("x"=16, "y"=12) + +/obj/item/weapon/reagent_containers/food/snacks/badrecipe/Initialize() + . = ..() + reagents.add_reagent("toxin", 1) + reagents.add_reagent("carbon", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/meatsteak + name = "Meat steak" + desc = "A piece of hot spicy meat." + icon_state = "meatstake" + trash = /obj/item/trash/plate + filling_color = "#7A3D11" + center_of_mass = list("x"=16, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/meatsteak/Initialize() + . = ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("sodiumchloride", 1) + reagents.add_reagent("blackpepper", 1) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff + name = "Spacy Liberty Duff" + desc = "Jello gelatin, from Alfred Hubbard's cookbook" + icon_state = "spacylibertyduff" + trash = /obj/item/trash/snack_bowl + filling_color = "#42B873" + center_of_mass = list("x"=16, "y"=8) + nutriment_amt = 6 + nutriment_desc = list("mushroom" = 6) + +/obj/item/weapon/reagent_containers/food/snacks/spacylibertyduff/Initialize() + . = ..() + reagents.add_reagent("psilocybin", 6) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/amanitajelly + name = "Amanita Jelly" + desc = "Looks curiously toxic" + icon_state = "amanitajelly" + trash = /obj/item/trash/snack_bowl + filling_color = "#ED0758" + center_of_mass = list("x"=16, "y"=5) + nutriment_amt = 6 + nutriment_desc = list("jelly" = 3, "mushroom" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/amanitajelly/Initialize() + . = ..() + reagents.add_reagent("amatoxin", 6) + reagents.add_reagent("psilocybin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/poppypretzel + name = "Poppy pretzel" + desc = "It's all twisted up!" + icon_state = "poppypretzel" + bitesize = 2 + filling_color = "#916E36" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 5 + nutriment_desc = list("poppy seeds" = 2, "pretzel" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/poppypretzel/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/meatballsoup + name = "Meatball soup" + desc = "You've got balls kid, BALLS!" + icon_state = "meatballsoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#785210" + center_of_mass = list("x"=16, "y"=8) + +/obj/item/weapon/reagent_containers/food/snacks/meatballsoup/Initialize() + . = ..() + reagents.add_reagent("protein", 8) + reagents.add_reagent("water", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/slimesoup + name = "slime soup" + desc = "If no water is available, you may substitute tears." + icon_state = "slimesoup" //nonexistant? + filling_color = "#C4DBA0" + +/obj/item/weapon/reagent_containers/food/snacks/slimesoup/Initialize() + . = ..() + reagents.add_reagent("slimejelly", 5) + reagents.add_reagent("water", 10) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/bloodsoup + name = "Tomato soup" + desc = "Smells like copper." + icon_state = "tomatosoup" + filling_color = "#FF0000" + center_of_mass = list("x"=16, "y"=7) + +/obj/item/weapon/reagent_containers/food/snacks/bloodsoup/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + reagents.add_reagent("blood", 10) + reagents.add_reagent("water", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/clownstears + name = "Clown's Tears" + desc = "Not very funny." + icon_state = "clownstears" + filling_color = "#C4FBFF" + center_of_mass = list("x"=16, "y"=7) + nutriment_amt = 4 + nutriment_desc = list("salt" = 1, "the worst joke" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/clownstears/Initialize() + . = ..() + reagents.add_reagent("banana", 5) + reagents.add_reagent("water", 10) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/vegetablesoup + name = "Vegetable soup" + desc = "A true vegan meal" //TODO + icon_state = "vegetablesoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#AFC4B5" + center_of_mass = list("x"=16, "y"=8) + nutriment_amt = 8 + nutriment_desc = list("carot" = 2, "corn" = 2, "eggplant" = 2, "potato" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/vegetablesoup/Initialize() + . = ..() + reagents.add_reagent("water", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/nettlesoup + name = "Nettle soup" + desc = "To think, the botanist would've beat you to death with one of these." + icon_state = "nettlesoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#AFC4B5" + center_of_mass = list("x"=16, "y"=7) + nutriment_amt = 8 + nutriment_desc = list("salad" = 4, "egg" = 2, "potato" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/nettlesoup/Initialize() + . = ..() + reagents.add_reagent("water", 5) + reagents.add_reagent("tricordrazine", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/mysterysoup + name = "Mystery soup" + desc = "The mystery is, why aren't you eating it?" + icon_state = "mysterysoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#F082FF" + center_of_mass = list("x"=16, "y"=6) + nutriment_amt = 1 + nutriment_desc = list("backwash" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/mysterysoup/Initialize() + . = ..() + var/mysteryselect = pick(1,2,3,4,5,6,7,8,9,10) + switch(mysteryselect) + if(1) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("capsaicin", 3) + reagents.add_reagent("tomatojuice", 2) + if(2) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("frostoil", 3) + reagents.add_reagent("tomatojuice", 2) + if(3) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 5) + reagents.add_reagent("tricordrazine", 5) + if(4) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("water", 10) + if(5) + reagents.add_reagent("nutriment", 2) + reagents.add_reagent("banana", 10) + if(6) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("blood", 10) + if(7) + reagents.add_reagent("slimejelly", 10) + reagents.add_reagent("water", 10) + if(8) + reagents.add_reagent("carbon", 10) + reagents.add_reagent("toxin", 10) + if(9) + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("tomatojuice", 10) + if(10) + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("tomatojuice", 5) + reagents.add_reagent("imidazoline", 5) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/wishsoup + name = "Wish Soup" + desc = "I wish this was soup." + icon_state = "wishsoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#D1F4FF" + center_of_mass = list("x"=16, "y"=11) + +/obj/item/weapon/reagent_containers/food/snacks/wishsoup/Initialize() + . = ..() + reagents.add_reagent("water", 10) + bitesize = 5 + if(prob(25)) + src.desc = "A wish come true!" + reagents.add_reagent("nutriment", 8, list("something good" = 8)) + +/obj/item/weapon/reagent_containers/food/snacks/hotchili + name = "Hot Chili" + desc = "A five alarm Texan Chili!" + icon_state = "hotchili" + trash = /obj/item/trash/snack_bowl + filling_color = "#FF3C00" + center_of_mass = list("x"=15, "y"=9) + nutriment_amt = 3 + nutriment_desc = list("chilli peppers" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/hotchili/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("capsaicin", 3) + reagents.add_reagent("tomatojuice", 2) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/coldchili + name = "Cold Chili" + desc = "This slush is barely a liquid!" + icon_state = "coldchili" + filling_color = "#2B00FF" + center_of_mass = list("x"=15, "y"=9) + trash = /obj/item/trash/snack_bowl + nutriment_amt = 3 + nutriment_desc = list("ice peppers" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/coldchili/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("frostoil", 3) + reagents.add_reagent("tomatojuice", 2) + bitesize = 5 + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube + name = "monkey cube" + desc = "Just add water!" + flags = OPENCONTAINER + icon_state = "monkeycube" + bitesize = 12 + filling_color = "#ADAC7F" + center_of_mass = list("x"=16, "y"=14) + + var/wrapped = 0 + var/monkey_type = "Monkey" + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/Initialize() + . = ..() + reagents.add_reagent("protein", 10) + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/attack_self(mob/user as mob) + if(wrapped) + Unwrap(user) + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Expand() + src.visible_message("\The [src] expands!") + var/mob/living/carbon/human/H = new(get_turf(src)) + H.set_species(monkey_type) + H.real_name = H.species.get_random_name() + H.name = H.real_name + if(ismob(loc)) + var/mob/M = loc + M.unEquip(src) + qdel(src) + return 1 + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/proc/Unwrap(mob/user as mob) + icon_state = "monkeycube" + desc = "Just add water!" + to_chat(user, "You unwrap the cube.") + wrapped = 0 + flags |= OPENCONTAINER + return + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/On_Consume(var/mob/M) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + H.visible_message("A screeching creature bursts out of [M]'s chest!") + var/obj/item/organ/external/organ = H.get_organ(BP_TORSO) + organ.take_damage(50, 0, 0, "Animal escaping the ribcage") + Expand() + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/on_reagent_change() + if(reagents.has_reagent("water")) + Expand() + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped + desc = "Still wrapped in some paper." + icon_state = "monkeycubewrap" + flags = 0 + wrapped = 1 + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/farwacube + name = "farwa cube" + monkey_type = "Farwa" + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/farwacube + name = "farwa cube" + monkey_type = "Farwa" + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/stokcube + name = "stok cube" + monkey_type = "Stok" + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/stokcube + name = "stok cube" + monkey_type = "Stok" + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/neaeracube + name = "neaera cube" + monkey_type = "Neaera" + +/obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/neaeracube + name = "neaera cube" + monkey_type = "Neaera" + +/obj/item/weapon/reagent_containers/food/snacks/spellburger + name = "Spell Burger" + desc = "This is absolutely Ei Nath." + icon_state = "spellburger" + filling_color = "#D505FF" + nutriment_amt = 6 + nutriment_desc = list("magic" = 3, "buns" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/spellburger/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/bigbiteburger + name = "Big Bite Burger" + desc = "Forget the Big Mac. THIS is the future!" + icon_state = "bigbiteburger" + filling_color = "#E3D681" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 4 + nutriment_desc = list("buns" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/bigbiteburger/Initialize() + . = ..() + reagents.add_reagent("protein", 10) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/enchiladas + name = "Enchiladas" + desc = "Viva La Mexico!" + icon_state = "enchiladas" + trash = /obj/item/trash/tray + filling_color = "#A36A1F" + center_of_mass = list("x"=16, "y"=13) + nutriment_amt = 2 + nutriment_desc = list("tortilla" = 3, "corn" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/enchiladas/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + reagents.add_reagent("capsaicin", 6) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight + name = "monkey's Delight" + desc = "Eeee Eee!" + icon_state = "monkeysdelight" + trash = /obj/item/trash/tray + filling_color = "#5C3C11" + center_of_mass = list("x"=16, "y"=13) + +/obj/item/weapon/reagent_containers/food/snacks/monkeysdelight/Initialize() + . = ..() + reagents.add_reagent("protein", 10) + reagents.add_reagent("banana", 5) + reagents.add_reagent("blackpepper", 1) + reagents.add_reagent("sodiumchloride", 1) + bitesize = 6 + +/obj/item/weapon/reagent_containers/food/snacks/baguette + name = "Baguette" + desc = "Bon appetit!" + icon_state = "baguette" + filling_color = "#E3D796" + center_of_mass = list("x"=18, "y"=12) + nutriment_amt = 6 + nutriment_desc = list("french bread" = 6) + +/obj/item/weapon/reagent_containers/food/snacks/baguette/Initialize() + . = ..() + reagents.add_reagent("blackpepper", 1) + reagents.add_reagent("sodiumchloride", 1) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/fishandchips + name = "Fish and Chips" + desc = "I do say so myself chap." + icon_state = "fishandchips" + filling_color = "#E3D796" + center_of_mass = list("x"=16, "y"=16) + nutriment_amt = 3 + nutriment_desc = list("salt" = 1, "chips" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/fishandchips/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("carpotoxin", 3) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/sandwich + name = "Sandwich" + desc = "A grand creation of meat, cheese, bread, and several leaves of lettuce! Arthur Dent would be proud." + icon_state = "sandwich" + trash = /obj/item/trash/plate + filling_color = "#D9BE29" + center_of_mass = list("x"=16, "y"=4) + nutriment_amt = 3 + nutriment_desc = list("bread" = 3, "cheese" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/sandwich/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/toastedsandwich + name = "Toasted Sandwich" + desc = "Now if you only had a pepper bar." + icon_state = "toastedsandwich" + trash = /obj/item/trash/plate + filling_color = "#D9BE29" + center_of_mass = list("x"=16, "y"=4) + nutriment_amt = 3 + nutriment_desc = list("toasted bread" = 3, "cheese" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/toastedsandwich/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + reagents.add_reagent("carbon", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/grilledcheese + name = "Grilled Cheese Sandwich" + desc = "Goes great with Tomato soup!" + icon_state = "toastedsandwich" + trash = /obj/item/trash/plate + filling_color = "#D9BE29" + nutriment_amt = 3 + nutriment_desc = list("toasted bread" = 3, "cheese" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/grilledcheese/Initialize() + . = ..() + reagents.add_reagent("protein", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tomatosoup + name = "Tomato Soup" + desc = "Drinking this feels like being a vampire! A tomato vampire..." + icon_state = "tomatosoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#D92929" + center_of_mass = list("x"=16, "y"=7) + nutriment_amt = 5 + nutriment_desc = list("soup" = 5) + +/obj/item/weapon/reagent_containers/food/snacks/tomatosoup/Initialize() + . = ..() + reagents.add_reagent("tomatojuice", 10) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/onionsoup + name = "Onion Soup" + desc = "A soup with layers." + icon_state = "onionsoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#E0C367" + center_of_mass = list("x"=16, "y"=7) + nutriment_amt = 5 + nutriment_desc = list("onion" = 2, "soup" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/onionsoup/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/onionrings + name = "Onion Rings" + desc = "Crispy rings." + icon_state = "onionrings" + trash = /obj/item/trash/plate + filling_color = "#E0C367" + center_of_mass = list("x"=16, "y"=7) + nutriment_amt = 5 + nutriment_desc = list("onion" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/onionrings/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/rofflewaffles + name = "Roffle Waffles" + desc = "Waffles from Roffle. Co." + icon_state = "rofflewaffles" + trash = /obj/item/trash/waffles + filling_color = "#FF00F7" + center_of_mass = list("x"=15, "y"=11) + nutriment_amt = 8 + nutriment_desc = list("waffle" = 7, "sweetness" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/rofflewaffles/Initialize() + . = ..() + reagents.add_reagent("psilocybin", 8) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/stew + name = "Stew" + desc = "A nice and warm stew. Healthy and strong." + icon_state = "stew" + filling_color = "#9E673A" + center_of_mass = list("x"=16, "y"=5) + nutriment_amt = 6 + nutriment_desc = list("tomato" = 2, "potato" = 2, "carrot" = 2, "eggplant" = 2, "mushroom" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/stew/Initialize() + . = ..() + reagents.add_reagent("protein", 4) + reagents.add_reagent("tomatojuice", 5) + reagents.add_reagent("imidazoline", 5) + reagents.add_reagent("water", 5) + bitesize = 10 + +/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast + name = "Jellied Toast" + desc = "A slice of bread covered with delicious jam." + icon_state = "jellytoast" + trash = /obj/item/trash/plate + filling_color = "#B572AB" + center_of_mass = list("x"=16, "y"=8) + nutriment_amt = 1 + nutriment_desc = list("toasted bread" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/cherry/Initialize() + . = ..() + reagents.add_reagent("cherryjelly", 5) + +/obj/item/weapon/reagent_containers/food/snacks/jelliedtoast/slime/Initialize() + . = ..() + reagents.add_reagent("slimejelly", 5) + +/obj/item/weapon/reagent_containers/food/snacks/jellyburger + name = "Jelly Burger" + desc = "Culinary delight..?" + icon_state = "jellyburger" + filling_color = "#B572AB" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 5 + nutriment_desc = list("buns" = 5) + +/obj/item/weapon/reagent_containers/food/snacks/jellyburger/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime/Initialize() + . = ..() + reagents.add_reagent("slimejelly", 5) + +/obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry/Initialize() + . = ..() + reagents.add_reagent("cherryjelly", 5) + +/obj/item/weapon/reagent_containers/food/snacks/milosoup + name = "Milosoup" + desc = "The universes best soup! Yum!!!" + icon_state = "milosoup" + trash = /obj/item/trash/snack_bowl + center_of_mass = list("x"=16, "y"=7) + nutriment_amt = 8 + nutriment_desc = list("soy" = 8) + +/obj/item/weapon/reagent_containers/food/snacks/milosoup/Initialize() + . = ..() + reagents.add_reagent("water", 5) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat + name = "Stewed Soy Meat" + desc = "Even non-vegetarians will LOVE this!" + icon_state = "stewedsoymeat" + trash = /obj/item/trash/plate + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 8 + nutriment_desc = list("soy" = 4, "tomato" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/stewedsoymeat/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti + name = "Boiled Spaghetti" + desc = "A plain dish of noodles, this sucks." + icon_state = "spagettiboiled" + trash = /obj/item/trash/plate + filling_color = "#FCEE81" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 2 + nutriment_desc = list("noodles" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/boiledrice + name = "Boiled Rice" + desc = "A boring dish of boring rice." + icon_state = "boiledrice" + trash = /obj/item/trash/snack_bowl + filling_color = "#FFFBDB" + center_of_mass = list("x"=17, "y"=11) + nutriment_amt = 2 + nutriment_desc = list("rice" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/boiledrice/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/ricepudding + name = "Rice Pudding" + desc = "Where's the jam?" + icon_state = "rpudding" + trash = /obj/item/trash/snack_bowl + filling_color = "#FFFBDB" + center_of_mass = list("x"=17, "y"=11) + nutriment_amt = 4 + nutriment_desc = list("rice" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/ricepudding/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/pastatomato + name = "Spaghetti" + desc = "Spaghetti and crushed tomatoes. Just like your abusive father used to make!" + icon_state = "pastatomato" + trash = /obj/item/trash/plate + filling_color = "#DE4545" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 6 + nutriment_desc = list("tomato" = 3, "noodles" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/pastatomato/Initialize() + . = ..() + reagents.add_reagent("tomatojuice", 10) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/meatballspagetti + name = "Spaghetti & Meatballs" + desc = "Now thats a nic'e meatball!" + icon_state = "meatballspagetti" + trash = /obj/item/trash/plate + filling_color = "#DE4545" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 4 + nutriment_desc = list("noodles" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/meatballspagetti/Initialize() + . = ..() + reagents.add_reagent("protein", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/spesslaw + name = "Spesslaw" + desc = "A lawyers favourite" + icon_state = "spesslaw" + filling_color = "#DE4545" + center_of_mass = list("x"=16, "y"=10) + nutriment_amt = 4 + nutriment_desc = list("noodles" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/spesslaw/Initialize() + . = ..() + reagents.add_reagent("protein", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/carrotfries + name = "Carrot Fries" + desc = "Tasty fries from fresh Carrots." + icon_state = "carrotfries" + trash = /obj/item/trash/plate + filling_color = "#FAA005" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 3 + nutriment_desc = list("carrot" = 3, "salt" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/carrotfries/Initialize() + . = ..() + reagents.add_reagent("imidazoline", 3) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/superbiteburger + name = "Super Bite Burger" + desc = "This is a mountain of a burger. FOOD!" + icon_state = "superbiteburger" + filling_color = "#CCA26A" + center_of_mass = list("x"=16, "y"=3) + nutriment_amt = 25 + nutriment_desc = list("buns" = 25) + +/obj/item/weapon/reagent_containers/food/snacks/superbiteburger/Initialize() + . = ..() + reagents.add_reagent("protein", 25) + bitesize = 10 + +/obj/item/weapon/reagent_containers/food/snacks/candiedapple + name = "Candied Apple" + desc = "An apple coated in sugary sweetness." + icon_state = "candiedapple" + filling_color = "#F21873" + center_of_mass = list("x"=15, "y"=13) + nutriment_amt = 3 + nutriment_desc = list("apple" = 3, "caramel" = 3, "sweetness" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/candiedapple/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/applepie + name = "Apple Pie" + desc = "A pie containing sweet sweet love... or apple." + icon_state = "applepie" + filling_color = "#E0EDC5" + center_of_mass = list("x"=16, "y"=13) + nutriment_amt = 4 + nutriment_desc = list("sweetness" = 2, "apple" = 2, "pie" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/applepie/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/cherrypie + name = "Cherry Pie" + desc = "Taste so good, make a grown man cry." + icon_state = "cherrypie" + filling_color = "#FF525A" + center_of_mass = list("x"=16, "y"=11) + nutriment_amt = 4 + nutriment_desc = list("sweetness" = 2, "cherry" = 2, "pie" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/cherrypie/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/twobread + name = "Two Bread" + desc = "It is very bitter and winy." + icon_state = "twobread" + filling_color = "#DBCC9A" + center_of_mass = list("x"=15, "y"=12) + nutriment_amt = 2 + nutriment_desc = list("sourness" = 2, "bread" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/twobread/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/jellysandwich + name = "Jelly Sandwich" + desc = "You wish you had some peanut butter to go with this..." + icon_state = "jellysandwich" + trash = /obj/item/trash/plate + filling_color = "#9E3A78" + center_of_mass = list("x"=16, "y"=8) + nutriment_amt = 2 + nutriment_desc = list("bread" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime/Initialize() + . = ..() + reagents.add_reagent("slimejelly", 5) + +/obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry/Initialize() + . = ..() + reagents.add_reagent("cherryjelly", 5) + +/obj/item/weapon/reagent_containers/food/snacks/boiledslimecore + name = "Boiled slime Core" + desc = "A boiled red thing." + icon_state = "boiledslimecore" //nonexistant? + +/obj/item/weapon/reagent_containers/food/snacks/boiledslimecore/Initialize() + . = ..() + reagents.add_reagent("slimejelly", 5) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/mint + name = "mint" + desc = "it is only wafer thin." + icon_state = "mint" + filling_color = "#F2F2F2" + center_of_mass = list("x"=16, "y"=14) + +/obj/item/weapon/reagent_containers/food/snacks/mint/Initialize() + . = ..() + reagents.add_reagent("mint", 1) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/mushroomsoup + name = "chantrelle soup" + desc = "A delicious and hearty mushroom soup." + icon_state = "mushroomsoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#E386BF" + center_of_mass = list("x"=17, "y"=10) + nutriment_amt = 8 + nutriment_desc = list("mushroom" = 8, "milk" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/mushroomsoup/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit + name = "plump helmet biscuit" + desc = "This is a finely-prepared plump helmet biscuit. The ingredients are exceptionally minced plump helmet, and well-minced dwarven wheat flour." + icon_state = "phelmbiscuit" + filling_color = "#CFB4C4" + center_of_mass = list("x"=16, "y"=13) + nutriment_amt = 5 + nutriment_desc = list("mushroom" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/plumphelmetbiscuit/Initialize() + . = ..() + if(prob(10)) + name = "exceptional plump helmet biscuit" + desc = "Microwave is taken by a fey mood! It has cooked an exceptional plump helmet biscuit!" + reagents.add_reagent("nutriment", 8) + bitesize = 2 + else + reagents.add_reagent("nutriment", 5) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/chawanmushi + name = "chawanmushi" + desc = "A legendary egg custard that makes friends out of enemies. Probably too hot for a cat to eat." + icon_state = "chawanmushi" + trash = /obj/item/trash/snack_bowl + filling_color = "#F0F2E4" + center_of_mass = list("x"=17, "y"=10) + +/obj/item/weapon/reagent_containers/food/snacks/chawanmushi/Initialize() + . = ..() + reagents.add_reagent("protein", 5) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/beetsoup + name = "beet soup" + desc = "Wait, how do you spell it again..?" + icon_state = "beetsoup" + trash = /obj/item/trash/snack_bowl + filling_color = "#FAC9FF" + center_of_mass = list("x"=15, "y"=8) + nutriment_amt = 8 + nutriment_desc = list("tomato" = 4, "beet" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/beetsoup/Initialize() + . = ..() + name = pick(list("borsch","bortsch","borstch","borsh","borshch","borscht")) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tossedsalad + name = "tossed salad" + desc = "A proper salad, basic and simple, with little bits of carrot, tomato and apple intermingled. Vegan!" + icon_state = "herbsalad" + trash = /obj/item/trash/snack_bowl + filling_color = "#76B87F" + center_of_mass = list("x"=17, "y"=11) + nutriment_amt = 8 + nutriment_desc = list("salad" = 2, "tomato" = 2, "carrot" = 2, "apple" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/tossedsalad/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/validsalad + name = "valid salad" + desc = "It's just a salad of questionable 'herbs' with meatballs and fried potato slices. Nothing suspicious about it." + icon_state = "validsalad" + trash = /obj/item/trash/snack_bowl + filling_color = "#76B87F" + center_of_mass = list("x"=17, "y"=11) + nutriment_amt = 6 + nutriment_desc = list("100% real salad") + +/obj/item/weapon/reagent_containers/food/snacks/validsalad/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/appletart + name = "golden apple streusel tart" + desc = "A tasty dessert that won't make it through a metal detector." + icon_state = "gappletart" + trash = /obj/item/trash/plate + filling_color = "#FFFF00" + center_of_mass = list("x"=16, "y"=18) + nutriment_amt = 8 + nutriment_desc = list("apple" = 8) + +/obj/item/weapon/reagent_containers/food/snacks/appletart/Initialize() + . = ..() + reagents.add_reagent("gold", 5) + bitesize = 3 + +/////////////////////////////////////////////////Sliceable//////////////////////////////////////// +// All the food items that can be sliced into smaller bits like Meatbread and Cheesewheels + +// sliceable is just an organization type path, it doesn't have any additional code or variables tied to it. + +/obj/item/weapon/reagent_containers/food/snacks/sliceable + w_class = ITEMSIZE_NORMAL //Whole pizzas and cakes shouldn't fit in a pocket, you can slice them if you want to do that. + +/** + * A food item slice + * + * This path contains some extra code for spawning slices pre-filled with + * reagents. + */ +/obj/item/weapon/reagent_containers/food/snacks/slice + name = "slice of... something" + var/whole_path // path for the item from which this slice comes + var/filled = FALSE // should the slice spawn with any reagents + +/** + * Spawn a new slice of food + * + * If the slice's filled is TRUE, this will also fill the slice with the + * appropriate amount of reagents. Note that this is done by spawning a new + * whole item, transferring the reagents and deleting the whole item, which may + * have performance implications. + */ +/obj/item/weapon/reagent_containers/food/snacks/slice/Initialize() + . = ..() + if(filled) + var/obj/item/weapon/reagent_containers/food/snacks/whole = new whole_path() + if(whole && whole.slices_num) + var/reagent_amount = whole.reagents.total_volume/whole.slices_num + whole.reagents.trans_to_obj(src, reagent_amount) + + qdel(whole) + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread + name = "meatbread loaf" + desc = "The culinary base of every self-respecting eloquent gentleman." + icon_state = "meatbread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/meatbread + slices_num = 5 + filling_color = "#FF7575" + center_of_mass = list("x"=19, "y"=9) + nutriment_desc = list("bread" = 10) + nutriment_amt = 10 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread/Initialize() + . = ..() + reagents.add_reagent("protein", 20) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/meatbread + name = "meatbread slice" + desc = "A slice of delicious meatbread." + icon_state = "meatbreadslice" + trash = /obj/item/trash/plate + filling_color = "#FF7575" + bitesize = 2 + center_of_mass = list("x"=16, "y"=16) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread + +/obj/item/weapon/reagent_containers/food/snacks/slice/meatbread/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/xenomeatbread + name = "xenomeatbread loaf" + desc = "The culinary base of every self-respecting eloquent gentleman. Extra Heretical." + icon_state = "xenomeatbread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/xenomeatbread + slices_num = 5 + filling_color = "#8AFF75" + center_of_mass = list("x"=16, "y"=9) + nutriment_desc = list("bread" = 10) + nutriment_amt = 10 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/xenomeatbread/Initialize() + . = ..() + reagents.add_reagent("protein", 20) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/xenomeatbread + name = "xenomeatbread slice" + desc = "A slice of delicious meatbread. Extra Heretical." + icon_state = "xenobreadslice" + trash = /obj/item/trash/plate + filling_color = "#8AFF75" + bitesize = 2 + center_of_mass = list("x"=16, "y"=13) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/xenomeatbread + + +/obj/item/weapon/reagent_containers/food/snacks/slice/xenomeatbread/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread + name = "Banana-nut bread" + desc = "A heavenly and filling treat." + icon_state = "bananabread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/bananabread + slices_num = 5 + filling_color = "#EDE5AD" + center_of_mass = list("x"=16, "y"=9) + nutriment_desc = list("bread" = 10) + nutriment_amt = 10 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread/Initialize() + . = ..() + reagents.add_reagent("banana", 20) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/bananabread + name = "Banana-nut bread slice" + desc = "A slice of delicious banana bread." + icon_state = "bananabreadslice" + trash = /obj/item/trash/plate + filling_color = "#EDE5AD" + bitesize = 2 + center_of_mass = list("x"=16, "y"=8) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/bananabread + +/obj/item/weapon/reagent_containers/food/snacks/slice/bananabread/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/tofubread + name = "Tofubread" + icon_state = "Like meatbread but for vegetarians. Not guaranteed to give superpowers." + icon_state = "tofubread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/tofubread + slices_num = 5 + filling_color = "#F7FFE0" + center_of_mass = list("x"=16, "y"=9) + nutriment_desc = list("tofu" = 10) + nutriment_amt = 10 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/tofubread/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/tofubread + name = "Tofubread slice" + desc = "A slice of delicious tofubread." + icon_state = "tofubreadslice" + trash = /obj/item/trash/plate + filling_color = "#F7FFE0" + bitesize = 2 + center_of_mass = list("x"=16, "y"=13) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/tofubread + +/obj/item/weapon/reagent_containers/food/snacks/slice/tofubread/filled + filled = TRUE + + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake + name = "Carrot Cake" + desc = "A favorite desert of a certain wascally wabbit. Not a lie." + icon_state = "carrotcake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/carrotcake + slices_num = 5 + filling_color = "#FFD675" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10, "carrot" = 15) + nutriment_amt = 25 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake/Initialize() + . = ..() + reagents.add_reagent("imidazoline", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/carrotcake + name = "Carrot Cake slice" + desc = "Carrotty slice of Carrot Cake, carrots are good for your eyes! Also not a lie." + icon_state = "carrotcake_slice" + trash = /obj/item/trash/plate + filling_color = "#FFD675" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/carrotcake + +/obj/item/weapon/reagent_containers/food/snacks/slice/carrotcake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/braincake + name = "Brain Cake" + desc = "A squishy cake-thing." + icon_state = "braincake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/braincake + slices_num = 5 + filling_color = "#E6AEDB" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10, "slime" = 15) + nutriment_amt = 5 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/braincake/Initialize() + . = ..() + reagents.add_reagent("protein", 25) + reagents.add_reagent("alkysine", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/braincake + name = "Brain Cake slice" + desc = "Lemme tell you something about prions. THEY'RE DELICIOUS." + icon_state = "braincakeslice" + trash = /obj/item/trash/plate + filling_color = "#E6AEDB" + bitesize = 2 + center_of_mass = list("x"=16, "y"=12) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/braincake + +/obj/item/weapon/reagent_containers/food/snacks/slice/braincake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesecake + name = "Cheese Cake" + desc = "DANGEROUSLY cheesy." + icon_state = "cheesecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/cheesecake + slices_num = 5 + filling_color = "#FAF7AF" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "cream" = 10, "cheese" = 15) + nutriment_amt = 10 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesecake/Initialize() + . = ..() + reagents.add_reagent("protein", 15) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/cheesecake + name = "Cheese Cake slice" + desc = "Slice of pure cheestisfaction." + icon_state = "cheesecake_slice" + trash = /obj/item/trash/plate + filling_color = "#FAF7AF" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesecake + +/obj/item/weapon/reagent_containers/food/snacks/slice/cheesecake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/plaincake + name = "Vanilla Cake" + desc = "A plain cake, not a lie." + icon_state = "plaincake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/plaincake + slices_num = 5 + filling_color = "#F7EDD5" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10, "vanilla" = 15) + nutriment_amt = 20 + +/obj/item/weapon/reagent_containers/food/snacks/slice/plaincake + name = "Vanilla Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "plaincake_slice" + trash = /obj/item/trash/plate + filling_color = "#F7EDD5" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/plaincake + +/obj/item/weapon/reagent_containers/food/snacks/slice/plaincake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/orangecake + name = "Orange Cake" + desc = "A cake with added orange." + icon_state = "orangecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/orangecake + slices_num = 5 + filling_color = "#FADA8E" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10, "orange" = 15) + nutriment_amt = 20 + +/obj/item/weapon/reagent_containers/food/snacks/slice/orangecake + name = "Orange Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "orangecake_slice" + trash = /obj/item/trash/plate + filling_color = "#FADA8E" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/orangecake + +/obj/item/weapon/reagent_containers/food/snacks/slice/orangecake/filled + filled = TRUE + + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/limecake + name = "Lime Cake" + desc = "A cake with added lime." + icon_state = "limecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/limecake + slices_num = 5 + filling_color = "#CBFA8E" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10, "lime" = 15) + nutriment_amt = 20 + + +/obj/item/weapon/reagent_containers/food/snacks/slice/limecake + name = "Lime Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "limecake_slice" + trash = /obj/item/trash/plate + filling_color = "#CBFA8E" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/limecake + +/obj/item/weapon/reagent_containers/food/snacks/slice/limecake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/lemoncake + name = "Lemon Cake" + desc = "A cake with added lemon." + icon_state = "lemoncake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/lemoncake + slices_num = 5 + filling_color = "#FAFA8E" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10, "lemon" = 15) + nutriment_amt = 20 + + +/obj/item/weapon/reagent_containers/food/snacks/slice/lemoncake + name = "Lemon Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "lemoncake_slice" + trash = /obj/item/trash/plate + filling_color = "#FAFA8E" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/lemoncake + +/obj/item/weapon/reagent_containers/food/snacks/slice/lemoncake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/chocolatecake + name = "Chocolate Cake" + desc = "A cake with added chocolate." + icon_state = "chocolatecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/chocolatecake + slices_num = 5 + filling_color = "#805930" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10, "chocolate" = 15) + nutriment_amt = 20 + +/obj/item/weapon/reagent_containers/food/snacks/slice/chocolatecake + name = "Chocolate Cake slice" + desc = "Just a slice of cake, it is enough for everyone." + icon_state = "chocolatecake_slice" + trash = /obj/item/trash/plate + filling_color = "#805930" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/chocolatecake + +/obj/item/weapon/reagent_containers/food/snacks/slice/chocolatecake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel + name = "Cheese wheel" + desc = "A big wheel of delcious Cheddar." + icon_state = "cheesewheel" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/cheesewedge + slices_num = 5 + filling_color = "#FFF700" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cheese" = 10) + nutriment_amt = 10 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/cheesewheel/Initialize() + . = ..() + reagents.add_reagent("protein", 10) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cheesewedge + name = "Cheese wedge" + desc = "A wedge of delicious Cheddar. The cheese wheel it was cut from can't have gone far." + icon_state = "cheesewedge" + filling_color = "#FFF700" + bitesize = 2 + center_of_mass = list("x"=16, "y"=10) + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake + name = "Birthday Cake" + desc = "Happy Birthday..." + icon_state = "birthdaycake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/birthdaycake + slices_num = 5 + filling_color = "#FFD6D6" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10) + nutriment_amt = 20 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake/Initialize() + . = ..() + reagents.add_reagent("sprinkles", 10) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/slice/birthdaycake + name = "Birthday Cake slice" + desc = "A slice of your birthday." + icon_state = "birthdaycakeslice" + trash = /obj/item/trash/plate + filling_color = "#FFD6D6" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/birthdaycake + +/obj/item/weapon/reagent_containers/food/snacks/slice/birthdaycake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread + name = "Bread" + icon_state = "Some plain old Earthen bread." + icon_state = "bread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/bread + slices_num = 5 + filling_color = "#FFE396" + center_of_mass = list("x"=16, "y"=9) + nutriment_desc = list("bread" = 6) + nutriment_amt = 6 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/bread/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/bread + name = "Bread slice" + desc = "A slice of home." + icon_state = "breadslice" + trash = /obj/item/trash/plate + filling_color = "#D27332" + bitesize = 2 + center_of_mass = list("x"=16, "y"=4) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/bread + +/obj/item/weapon/reagent_containers/food/snacks/slice/bread/filled + filled = TRUE + + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread + name = "Cream Cheese Bread" + desc = "Yum yum yum!" + icon_state = "creamcheesebread" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/creamcheesebread + slices_num = 5 + filling_color = "#FFF896" + center_of_mass = list("x"=16, "y"=9) + nutriment_desc = list("bread" = 6, "cream" = 3, "cheese" = 3) + nutriment_amt = 5 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread/Initialize() + . = ..() + reagents.add_reagent("protein", 15) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/creamcheesebread + name = "Cream Cheese Bread slice" + desc = "A slice of yum!" + icon_state = "creamcheesebreadslice" + trash = /obj/item/trash/plate + filling_color = "#FFF896" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/creamcheesebread + + +/obj/item/weapon/reagent_containers/food/snacks/slice/creamcheesebread/filled + filled = TRUE + + +/obj/item/weapon/reagent_containers/food/snacks/watermelonslice + name = "Watermelon Slice" + desc = "A slice of watery goodness." + icon_state = "watermelonslice" + filling_color = "#FF3867" + bitesize = 2 + center_of_mass = list("x"=16, "y"=10) + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake + name = "Apple Cake" + desc = "A cake centred with apples." + icon_state = "applecake" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/applecake + slices_num = 5 + filling_color = "#EBF5B8" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("cake" = 10, "sweetness" = 10, "apple" = 15) + nutriment_amt = 15 + +/obj/item/weapon/reagent_containers/food/snacks/slice/applecake + name = "Apple Cake slice" + desc = "A slice of heavenly cake." + icon_state = "applecakeslice" + trash = /obj/item/trash/plate + filling_color = "#EBF5B8" + bitesize = 2 + center_of_mass = list("x"=16, "y"=14) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/applecake + +/obj/item/weapon/reagent_containers/food/snacks/slice/applecake/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie + name = "Pumpkin Pie" + desc = "A delicious treat for the autumn months." + icon_state = "pumpkinpie" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/pumpkinpie + slices_num = 5 + filling_color = "#F5B951" + center_of_mass = list("x"=16, "y"=10) + nutriment_desc = list("pie" = 5, "cream" = 5, "pumpkin" = 5) + nutriment_amt = 15 + +/obj/item/weapon/reagent_containers/food/snacks/slice/pumpkinpie + name = "Pumpkin Pie slice" + desc = "A slice of pumpkin pie, with whipped cream on top. Perfection." + icon_state = "pumpkinpieslice" + trash = /obj/item/trash/plate + filling_color = "#F5B951" + bitesize = 2 + center_of_mass = list("x"=16, "y"=12) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie + +/obj/item/weapon/reagent_containers/food/snacks/slice/pumpkinpie/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/cracker + name = "Cracker" + desc = "It's a salted cracker." + icon_state = "cracker" + filling_color = "#F5DEB8" + center_of_mass = list("x"=16, "y"=6) + nutriment_desc = list("salt" = 1, "cracker" = 2) + nutriment_amt = 1 + + + +/////////////////////////////////////////////////PIZZA//////////////////////////////////////// + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza + slices_num = 6 + filling_color = "#BAA14C" + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita + name = "Margherita" + desc = "The golden standard of pizzas." + icon_state = "pizzamargherita" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/margherita + slices_num = 6 + center_of_mass = list("x"=16, "y"=11) + nutriment_desc = list("pizza crust" = 10, "tomato" = 10, "cheese" = 15) + nutriment_amt = 35 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita/Initialize() + . = ..() + reagents.add_reagent("protein", 5) + reagents.add_reagent("tomatojuice", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/margherita + name = "Margherita slice" + desc = "A slice of the classic pizza." + icon_state = "pizzamargheritaslice" + filling_color = "#BAA14C" + bitesize = 2 + center_of_mass = list("x"=16, "y"=13) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita + +/obj/item/weapon/reagent_containers/food/snacks/slice/margherita/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza + name = "Meatpizza" + desc = "A pizza with meat topping." + icon_state = "meatpizza" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/meatpizza + slices_num = 6 + center_of_mass = list("x"=16, "y"=11) + nutriment_desc = list("pizza crust" = 10, "tomato" = 10, "cheese" = 15) + nutriment_amt = 10 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza/Initialize() + . = ..() + reagents.add_reagent("protein", 34) + reagents.add_reagent("tomatojuice", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/meatpizza + name = "Meatpizza slice" + desc = "A slice of a meaty pizza." + icon_state = "meatpizzaslice" + filling_color = "#BAA14C" + bitesize = 2 + center_of_mass = list("x"=16, "y"=13) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza + +/obj/item/weapon/reagent_containers/food/snacks/slice/meatpizza/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza + name = "Mushroompizza" + desc = "Very special pizza." + icon_state = "mushroompizza" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/mushroompizza + slices_num = 6 + center_of_mass = list("x"=16, "y"=11) + nutriment_desc = list("pizza crust" = 10, "tomato" = 10, "cheese" = 5, "mushroom" = 10) + nutriment_amt = 35 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza/Initialize() + . = ..() + reagents.add_reagent("protein", 5) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/mushroompizza + name = "Mushroompizza slice" + desc = "Maybe it is the last slice of pizza in your life." + icon_state = "mushroompizzaslice" + filling_color = "#BAA14C" + bitesize = 2 + center_of_mass = list("x"=16, "y"=13) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza + +/obj/item/weapon/reagent_containers/food/snacks/slice/mushroompizza/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza + name = "Vegetable pizza" + desc = "No one of Tomato Sapiens were harmed during making this pizza." + icon_state = "vegetablepizza" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/vegetablepizza + slices_num = 6 + center_of_mass = list("x"=16, "y"=11) + nutriment_desc = list("pizza crust" = 10, "tomato" = 10, "cheese" = 5, "eggplant" = 5, "carrot" = 5, "corn" = 5) + nutriment_amt = 25 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza/Initialize() + . = ..() + reagents.add_reagent("protein", 5) + reagents.add_reagent("tomatojuice", 6) + reagents.add_reagent("imidazoline", 12) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/vegetablepizza + name = "Vegetable pizza slice" + desc = "A slice of the most green pizza of all pizzas not containing green ingredients." + icon_state = "vegetablepizzaslice" + filling_color = "#BAA14C" + bitesize = 2 + center_of_mass = list("x"=16, "y"=13) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza + +/obj/item/weapon/reagent_containers/food/snacks/slice/vegetablepizza/filled + filled = TRUE + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza + name = "moldy pizza" + desc = "This pizza might actually be alive. There's mold all over." + icon_state = "oldpizza" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/slice/oldpizza + slices_num = 6 + center_of_mass = list("x"=16, "y"=11) + nutriment_desc = list("stale pizza crust" = 10, "moldy tomato" = 10, "moldy cheese" = 5) + nutriment_amt = 10 + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza/Initialize() + . = ..() + reagents.add_reagent("protein", 5) + reagents.add_reagent("tomatojuice", 6) + reagents.add_reagent("mold", 8) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/slice/oldpizza + name = "moldy pizza slice" + desc = "This used to be pizza..." + icon_state = "old_pizza" + filling_color = "#BAA14C" + bitesize = 2 + center_of_mass = list("x"=16, "y"=13) + whole_path = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza + +/obj/item/pizzabox + name = "pizza box" + desc = "A box suited for pizzas." + icon = 'icons/obj/food.dmi' + icon_state = "pizzabox1" + + var/open = 0 // Is the box open? + var/ismessy = 0 // Fancy mess on the lid + var/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/pizza // Content pizza + var/list/boxes = list() // If the boxes are stacked, they come here + var/boxtag = "" + +/obj/item/pizzabox/update_icon() + + overlays = list() + + // Set appropriate description + if( open && pizza ) + desc = "A box suited for pizzas. It appears to have a [pizza.name] inside." + else if( boxes.len > 0 ) + desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile." + + var/obj/item/pizzabox/topbox = boxes[boxes.len] + var/toptag = topbox.boxtag + if( toptag != "" ) + desc = "[desc] The box on top has a tag, it reads: '[toptag]'." + else + desc = "A box suited for pizzas." + + if( boxtag != "" ) + desc = "[desc] The box has a tag, it reads: '[boxtag]'." + + // Icon states and overlays + if( open ) + if( ismessy ) + icon_state = "pizzabox_messy" + else + icon_state = "pizzabox_open" + + if( pizza ) + var/image/pizzaimg = image(icon = pizza.icon, icon_state = pizza.icon_state) //VOREStation Edit: Icons for bad pizza + pizzaimg.pixel_y = -3 + overlays += pizzaimg + + return + else + // Stupid code because byondcode sucks + var/doimgtag = 0 + if( boxes.len > 0 ) + var/obj/item/pizzabox/topbox = boxes[boxes.len] + if( topbox.boxtag != "" ) + doimgtag = 1 + else + if( boxtag != "" ) + doimgtag = 1 + + if( doimgtag ) + var/image/tagimg = image("food.dmi", icon_state = "pizzabox_tag") + tagimg.pixel_y = boxes.len * 3 + overlays += tagimg + + icon_state = "pizzabox[boxes.len+1]" + +/obj/item/pizzabox/attack_hand( mob/user as mob ) + + if( open && pizza ) + user.put_in_hands( pizza ) + + to_chat(user, "You take \the [src.pizza] out of \the [src].") + src.pizza = null + update_icon() + return + + if( boxes.len > 0 ) + if( user.get_inactive_hand() != src ) + ..() + return + + var/obj/item/pizzabox/box = boxes[boxes.len] + boxes -= box + + user.put_in_hands( box ) + to_chat(user, "You remove the topmost [src] from your hand.") + box.update_icon() + update_icon() + return + ..() + +/obj/item/pizzabox/attack_self( mob/user as mob ) + + if( boxes.len > 0 ) + return + + open = !open + + if( open && pizza ) + ismessy = 1 + + update_icon() + +/obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob ) + if( istype(I, /obj/item/pizzabox/) ) + var/obj/item/pizzabox/box = I + + if( !box.open && !src.open ) + // Make a list of all boxes to be added + var/list/boxestoadd = list() + boxestoadd += box + for(var/obj/item/pizzabox/i in box.boxes) + boxestoadd += i + + if( (boxes.len+1) + boxestoadd.len <= 5 ) + user.drop_item() + + box.loc = src + box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit + src.boxes.Add( boxestoadd ) + + box.update_icon() + update_icon() + + to_chat(user, "You put \the [box] ontop of \the [src]!") + else + to_chat(user, "The stack is too high!") + else + to_chat(user, "Close \the [box] first!") + + return + + if( istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/) ) // Long ass fucking object name + + if( src.open ) + user.drop_item() + I.loc = src + src.pizza = I + + update_icon() + + to_chat(user, "You put \the [I] in \the [src]!") + else + to_chat(user, "You try to push \the [I] through the lid but it doesn't work!") + return + + if( istype(I, /obj/item/weapon/pen/) ) + + if( src.open ) + return + + var/t = sanitize(input("Enter what you want to add to the tag:", "Write", null, null) as text, 30) + + var/obj/item/pizzabox/boxtotagto = src + if( boxes.len > 0 ) + boxtotagto = boxes[boxes.len] + + boxtotagto.boxtag = copytext("[boxtotagto.boxtag][t]", 1, 30) + + update_icon() + return + ..() + +/obj/item/pizzabox/margherita/Initialize() + pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/margherita(src) + boxtag = "Margherita Deluxe" + +/obj/item/pizzabox/vegetable/Initialize() + pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/vegetablepizza(src) + boxtag = "Gourmet Vegatable" + +/obj/item/pizzabox/mushroom/Initialize() + pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/mushroompizza(src) + boxtag = "Mushroom Special" + +/obj/item/pizzabox/meat/Initialize() + pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/meatpizza(src) + boxtag = "Meatlover's Supreme" + +/obj/item/pizzabox/old/Initialize() + pizza = new /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/oldpizza(src) + boxtag = "Deluxe Gourmet" + +/obj/item/weapon/reagent_containers/food/snacks/dionaroast + name = "roast diona" + desc = "It's like an enormous, leathery carrot. With an eye." + icon_state = "dionaroast" + trash = /obj/item/trash/plate + filling_color = "#75754B" + center_of_mass = list("x"=16, "y"=7) + nutriment_amt = 6 + nutriment_desc = list("a chorus of flavor" = 6) + +/obj/item/weapon/reagent_containers/food/snacks/dionaroast/Initialize() + . = ..() + reagents.add_reagent("radium", 2) + bitesize = 2 + +/////////////////////////////////////////// +// new old food stuff from bs12 +/////////////////////////////////////////// +/obj/item/weapon/reagent_containers/food/snacks/dough + name = "dough" + desc = "A piece of dough." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "dough" + bitesize = 2 + center_of_mass = list("x"=16, "y"=13) + nutriment_amt = 3 + nutriment_desc = list("uncooked dough" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/dough/Initialize() + . = ..() + reagents.add_reagent("protein", 1) + +// Dough + rolling pin = flat dough +/obj/item/weapon/reagent_containers/food/snacks/dough/attackby(obj/item/weapon/W as obj, mob/user as mob) + if(istype(W,/obj/item/weapon/material/kitchen/rollingpin)) + new /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough(src) + user << "You flatten the dough." + qdel(src) + +// slicable into 3xdoughslices +/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough + name = "flat dough" + desc = "A flattened dough." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "flat dough" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/doughslice + slices_num = 3 + center_of_mass = list("x"=16, "y"=16) + +/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough/Initialize() + . = ..() + reagents.add_reagent("protein", 1) + reagents.add_reagent("nutriment", 3) + +/obj/item/weapon/reagent_containers/food/snacks/doughslice + name = "dough slice" + desc = "A building block of an impressive dish." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "doughslice" + slice_path = /obj/item/weapon/reagent_containers/food/snacks/spagetti + slices_num = 1 + bitesize = 2 + center_of_mass = list("x"=17, "y"=19) + nutriment_amt = 1 + nutriment_desc = list("uncooked dough" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/doughslice/Initialize() + . = ..() + +/obj/item/weapon/reagent_containers/food/snacks/bun + name = "bun" + desc = "A base for any self-respecting burger." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "bun" + bitesize = 2 + center_of_mass = list("x"=16, "y"=12) + nutriment_amt = 4 + nutriment_desc = "bun" + +/obj/item/weapon/reagent_containers/food/snacks/bun/Initialize() + . = ..() + +/obj/item/weapon/reagent_containers/food/snacks/bun/attackby(obj/item/weapon/W as obj, mob/user as mob) + // Bun + meatball = burger + if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/meatball)) + new /obj/item/weapon/reagent_containers/food/snacks/monkeyburger(src) + user << "You make a burger." + qdel(W) + qdel(src) + + // Bun + cutlet = hamburger + else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/cutlet)) + new /obj/item/weapon/reagent_containers/food/snacks/monkeyburger(src) + user << "You make a burger." + qdel(W) + qdel(src) + + // Bun + sausage = hotdog + else if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/sausage)) + new /obj/item/weapon/reagent_containers/food/snacks/hotdog(src) + user << "You make a hotdog." + qdel(W) + qdel(src) + +// Burger + cheese wedge = cheeseburger +/obj/item/weapon/reagent_containers/food/snacks/monkeyburger/attackby(obj/item/weapon/reagent_containers/food/snacks/cheesewedge/W as obj, mob/user as mob) + if(istype(W))// && !istype(src,/obj/item/weapon/reagent_containers/food/snacks/cheesewedge)) + new /obj/item/weapon/reagent_containers/food/snacks/cheeseburger(src) + user << "You make a cheeseburger." + qdel(W) + qdel(src) + return + else + ..() + +// Human Burger + cheese wedge = cheeseburger +/obj/item/weapon/reagent_containers/food/snacks/human/burger/attackby(obj/item/weapon/reagent_containers/food/snacks/cheesewedge/W as obj, mob/user as mob) + if(istype(W)) + new /obj/item/weapon/reagent_containers/food/snacks/cheeseburger(src) + user << "You make a cheeseburger." + qdel(W) + qdel(src) + return + else + ..() + +/obj/item/weapon/reagent_containers/food/snacks/bunbun + name = "\improper Bun Bun" + desc = "A small bread monkey fashioned from two burger buns." + icon_state = "bunbun" + bitesize = 2 + center_of_mass = list("x"=16, "y"=8) + nutriment_amt = 8 + nutriment_desc = list("bun" = 8) + +/obj/item/weapon/reagent_containers/food/snacks/bunbun/Initialize() + . = ..() + +/obj/item/weapon/reagent_containers/food/snacks/taco + name = "taco" + desc = "Take a bite!" + icon_state = "taco" + bitesize = 3 + center_of_mass = list("x"=21, "y"=12) + nutriment_amt = 4 + nutriment_desc = list("cheese" = 2,"taco shell" = 2) +/obj/item/weapon/reagent_containers/food/snacks/taco/Initialize() + . = ..() + reagents.add_reagent("protein", 3) + +/obj/item/weapon/reagent_containers/food/snacks/rawcutlet + name = "raw cutlet" + desc = "A thin piece of raw meat." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "rawcutlet" + bitesize = 1 + center_of_mass = list("x"=17, "y"=20) + +/obj/item/weapon/reagent_containers/food/snacks/rawcutlet/Initialize() + . = ..() + reagents.add_reagent("protein", 1) + +/obj/item/weapon/reagent_containers/food/snacks/cutlet + name = "cutlet" + desc = "A tasty meat slice." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "cutlet" + bitesize = 2 + center_of_mass = list("x"=17, "y"=20) + +/obj/item/weapon/reagent_containers/food/snacks/cutlet/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + +/obj/item/weapon/reagent_containers/food/snacks/rawmeatball + name = "raw meatball" + desc = "A raw meatball." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "rawmeatball" + bitesize = 2 + center_of_mass = list("x"=16, "y"=15) + +/obj/item/weapon/reagent_containers/food/snacks/rawmeatball/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + +/obj/item/weapon/reagent_containers/food/snacks/hotdog + name = "hotdog" + desc = "Unrelated to dogs, maybe." + icon_state = "hotdog" + bitesize = 2 + center_of_mass = list("x"=16, "y"=17) + +/obj/item/weapon/reagent_containers/food/snacks/hotdog/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + +/obj/item/weapon/reagent_containers/food/snacks/hotdog/old + name = "old hotdog" + desc = "Covered in mold. You're not gonna eat that, are you?" + +/obj/item/weapon/reagent_containers/food/snacks/hotdog/old/Initialize() + . = ..() + reagents.add_reagent("mold", 6) + +/obj/item/weapon/reagent_containers/food/snacks/flatbread + name = "flatbread" + desc = "Bland but filling." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "flatbread" + bitesize = 2 + center_of_mass = list("x"=16, "y"=16) + nutriment_amt = 3 + nutriment_desc = list("bread" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/flatbread/Initialize() + . = ..() + +// potato + knife = raw sticks +/obj/item/weapon/reagent_containers/food/snacks/grown/attackby(obj/item/weapon/W, mob/user) + if(seed && seed.kitchen_tag && seed.kitchen_tag == "potato" && istype(W,/obj/item/weapon/material/knife)) + new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(get_turf(src)) + user << "You cut the potato." + qdel(src) + else + ..() + +/obj/item/weapon/reagent_containers/food/snacks/rawsticks + name = "raw potato sticks" + desc = "Raw fries, not very tasty." + icon = 'icons/obj/food_ingredients.dmi' + icon_state = "rawsticks" + bitesize = 2 + center_of_mass = list("x"=16, "y"=12) + nutriment_amt = 3 + nutriment_desc = list("raw potato" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/rawsticks/Initialize() + . = ..() + +/obj/item/weapon/reagent_containers/food/snacks/liquidfood + name = "\improper LiquidFood Ration" + desc = "A prepackaged grey slurry of all the essential nutrients for a spacefarer on the go. Should this be crunchy?" + icon_state = "liquidfood" + trash = /obj/item/trash/liquidfood + filling_color = "#A8A8A8" + center_of_mass = list("x"=16, "y"=15) + nutriment_amt = 20 + nutriment_desc = list("chalk" = 6) + +/obj/item/weapon/reagent_containers/food/snacks/liquidfood/Initialize() + . = ..() + reagents.add_reagent("iron", 3) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/tastybread + name = "bread tube" + desc = "Bread in a tube. Chewy...and surprisingly tasty." + icon_state = "tastybread" + trash = /obj/item/trash/tastybread + filling_color = "#A66829" + center_of_mass = list("x"=17, "y"=16) + nutriment_amt = 6 + nutriment_desc = list("bread" = 2, "sweetness" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/tastybread/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks + name = "\improper SkrellSnax" + desc = "Cured fungus shipped all the way from Qerr'balak, almost like jerky! Almost." + icon_state = "skrellsnacks" + filling_color = "#A66829" + center_of_mass = list("x"=15, "y"=12) + nutriment_amt = 10 + nutriment_desc = list("mushroom" = 5, "salt" = 5) + +/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks/Initialize() + . = ..() + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/unajerky + name = "Moghes Imported Sissalik Jerky" + icon_state = "unathitinred" + desc = "An incredibly well made jerky, shipped in all the way from Moghes." + trash = /obj/item/trash/unajerky + filling_color = "#631212" + center_of_mass = list("x"=15, "y"=9) + +/obj/item/weapon/reagent_containers/food/snacks/unajerky/Initialize() + ..() + reagents.add_reagent("protein", 8) + reagents.add_reagent("capsaicin", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/croissant + name = "croissant" + desc = "True French cuisine." + filling_color = "#E3D796" + icon_state = "croissant" + nutriment_amt = 6 + nutriment_desc = list("french bread" = 6) + +/obj/item/weapon/reagent_containers/food/snacks/croissant/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/meatbun + name = "meat bun" + desc = "Chinese street food, in neither China nor a street." + filling_color = "#DEDEAB" + icon_state = "meatbun" + nutriment_amt = 4 + +/obj/item/weapon/reagent_containers/food/snacks/meatbun/Initialize() + . = ..() + bitesize = 2 + reagents.add_reagent("protein", 4) + +/obj/item/weapon/reagent_containers/food/snacks/sashimi + name = "carp sashimi" + desc = "Expertly prepared. Still toxic." + filling_color = "#FFDEFE" + icon_state = "sashimi" + nutriment_amt = 6 + +/obj/item/weapon/reagent_containers/food/snacks/sashimi/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + reagents.add_reagent("carpotoxin", 2) + bitesize = 3 + +/obj/item/weapon/reagent_containers/food/snacks/benedict + name = "eggs benedict" + desc = "Hey, there's only one egg in this!" + filling_color = "#FFDF78" + icon_state = "benedict" + nutriment_amt = 4 + +/obj/item/weapon/reagent_containers/food/snacks/benedict/Initialize() + . = ..() + reagents.add_reagent("protein", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/beans + name = "baked beans" + desc = "Musical fruit in a slightly less musical container." + filling_color = "#FC6F28" + icon_state = "beans" + nutriment_amt = 4 + nutriment_desc = list("beans" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/beans/Initialize() + . = ..() + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/sugarcookie + name = "sugar cookie" + desc = "Just like your little sister used to make." + filling_color = "#DBC94F" + icon_state = "sugarcookie" + nutriment_amt = 5 + nutriment_desc = list("sweetness" = 4, "cookie" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/sugarcookie/Initialize() + . = ..() + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/berrymuffin + name = "berry muffin" + desc = "A delicious and spongy little cake, with berries." + icon_state = "berrymuffin" + filling_color = "#E0CF9B" + center_of_mass = list("x"=17, "y"=4) + nutriment_amt = 6 + nutriment_desc = list("sweetness" = 2, "muffin" = 2, "berries" = 2) + +/obj/item/weapon/reagent_containers/food/snacks/berrymuffin/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/ghostmuffin + name = "booberry muffin" + desc = "My stomach is a graveyard! No living being can quench my bloodthirst!" + icon_state = "berrymuffin" + filling_color = "#799ACE" + center_of_mass = list("x"=17, "y"=4) + nutriment_amt = 6 + nutriment_desc = list("spookiness" = 4, "muffin" = 1, "berries" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/ghostmuffin/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/eggroll + name = "egg roll" + desc = "Free with orders over 10 thalers." + icon_state = "eggroll" + filling_color = "#799ACE" + center_of_mass = list("x"=17, "y"=4) + nutriment_amt = 4 + nutriment_desc = list("egg" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/eggroll/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/fruitsalad + name = "fruit salad" + desc = "Your standard fruit salad." + icon_state = "fruitsalad" + filling_color = "#FF3867" + nutriment_amt = 10 + nutriment_desc = list("fruit" = 10) + +/obj/item/weapon/reagent_containers/food/snacks/fruitsalad/Initialize() + . = ..() + reagents.add_reagent("nutriment", 10) + bitesize = 4 + +/obj/item/weapon/reagent_containers/food/snacks/eggbowl + name = "egg bowl" + desc = "A bowl of fried rice with egg mixed in." + icon_state = "eggbowl" + trash = /obj/item/trash/snack_bowl + filling_color = "#FFFBDB" + nutriment_amt = 6 + nutriment_desc = list("rice" = 2, "egg" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/eggbowl/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/porkbowl + name = "pork bowl" + desc = "A bowl of fried rice with cuts of meat." + icon_state = "porkbowl" + trash = /obj/item/trash/snack_bowl + filling_color = "#FFFBDB" + nutriment_amt = 6 + nutriment_desc = list("rice" = 2, "meat" = 4) + +/obj/item/weapon/reagent_containers/food/snacks/porkbowl/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/tortilla + name = "tortilla" + desc = "The base for all your burritos." + icon_state = "tortilla" + nutriment_amt = 1 + nutriment_desc = list("bread" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/tortilla/Initialize() + . = ..() + reagents.add_reagent("nutriment", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/meatburrito + name = "carne asada burrito" + desc = "The best burrito for meat lovers." + icon_state = "carneburrito" + nutriment_amt = 6 + nutriment_desc = list("tortilla" = 3, "meat" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/meatburrito/Initialize() + . = ..() + reagents.add_reagent("protein", 6) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cheeseburrito + name = "Cheese burrito" + desc = "It's a burrito filled with cheese." + icon_state = "cheeseburrito" + nutriment_amt = 6 + nutriment_desc = list("tortilla" = 3, "cheese" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/cheeseburrito/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/fuegoburrito + name = "fuego phoron burrito" + desc = "A super spicy burrito." + icon_state = "fuegoburrito" + nutriment_amt = 6 + nutriment_desc = list("chili peppers" = 5, "tortilla" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/fuegoburrito/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("capsaicin", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/nachos + name = "nachos" + desc = "Chips from Old Mexico." + icon_state = "nachos" + nutriment_amt = 2 + nutriment_desc = list("salt" = 1) + +/obj/item/weapon/reagent_containers/food/snacks/nachos/Initialize() + . = ..() + reagents.add_reagent("nutriment", 1) + bitesize = 1 + +/obj/item/weapon/reagent_containers/food/snacks/cheesenachos + name = "cheesy nachos" + desc = "The delicious combination of nachos and melting cheese." + icon_state = "cheesenachos" + nutriment_amt = 5 + nutriment_desc = list("salt" = 2, "cheese" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/cheesenachos/Initialize() + . = ..() + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("protein", 2) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/cubannachos + name = "cuban nachos" + desc = "That's some dangerously spicy nachos." + icon_state = "cubannachos" + nutriment_amt = 6 + nutriment_desc = list("salt" = 1, "cheese" = 2, "chili peppers" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/cubannachos/Initialize() + . = ..() + reagents.add_reagent("nutriment", 5) + reagents.add_reagent("capsaicin", 4) + bitesize = 2 + +/obj/item/weapon/reagent_containers/food/snacks/piginblanket + name = "pig in a blanket" + desc = "A sausage embedded in soft, fluffy pastry. Free this pig from its blanket prison by eating it." + icon_state = "piginblanket" + nutriment_amt = 6 + nutriment_desc = list("meat" = 3, "pastry" = 3) + +/obj/item/weapon/reagent_containers/food/snacks/piginblanket/Initialize() + . = ..() + reagents.add_reagent("nutriment", 6) + reagents.add_reagent("protein", 4) bitesize = 3 \ No newline at end of file diff --git a/code/modules/food/food/snacks_vr.dm b/code/modules/food/food/snacks_vr.dm index 9c5b398f5a..52f3752095 100644 --- a/code/modules/food/food/snacks_vr.dm +++ b/code/modules/food/food/snacks_vr.dm @@ -308,7 +308,7 @@ /obj/item/weapon/reagent_containers/food/snacks/monkeycube/wrapped/wolpincube name = "wolpin cube" monkey_type = "Wolpin" - + /obj/item/weapon/reagent_containers/food/snacks/pizza/margfrozen name = "frozen margherita pizza" desc = "It's frozen rock solid, better thaw it in a microwave." @@ -317,7 +317,7 @@ center_of_mass = list("x"=16, "y"=11) nutriment_amt = 15 nutriment_desc = list("ice" = 5, "toothache" = 1, "frozen cheese" = 5, "frozen tomato" = 5) - + /obj/item/weapon/reagent_containers/food/snacks/pizza/margfrozen/Initialize() ..() bitesize = 20 @@ -353,7 +353,7 @@ /obj/item/weapon/reagent_containers/food/snacks/slice/margcargo/filled filled = TRUE - + /obj/item/weapon/reagent_containers/food/snacks/pizza/meatfrozen name = "frozen meat pizza" desc = "It's frozen rock solid, better thaw it in a microwave." @@ -362,7 +362,7 @@ center_of_mass = list("x"=16, "y"=11) nutriment_amt = 15 nutriment_desc = list("ice" = 5, "toothache" = 1, "frozen meat" = 5, "frozen cow screams" = 5) - + /obj/item/weapon/reagent_containers/food/snacks/pizza/meatfrozen/Initialize() ..() bitesize = 20 @@ -398,7 +398,7 @@ /obj/item/weapon/reagent_containers/food/snacks/slice/meatcargo/filled filled = TRUE - + /obj/item/weapon/reagent_containers/food/snacks/pizza/mushfrozen name = "frozen mushroom pizza" desc = "It's frozen rock solid, better thaw it in a microwave." @@ -407,7 +407,7 @@ center_of_mass = list("x"=16, "y"=11) nutriment_amt = 15 nutriment_desc = list("ice" = 5, "toothache" = 1, "frozen mushrooms" = 5, "frozen cream" = 5) - + /obj/item/weapon/reagent_containers/food/snacks/pizza/mushfrozen/Initialize() ..() bitesize = 20 @@ -451,7 +451,7 @@ center_of_mass = list("x"=16, "y"=11) nutriment_amt = 15 nutriment_desc = list("ice" = 5, "toothache" = 1, "frozen vegtable chunks" = 5) - + /obj/item/weapon/reagent_containers/food/snacks/pizza/vegfrozen/Initialize() ..() bitesize = 20 diff --git a/code/modules/food/kitchen/smartfridge.dm b/code/modules/food/kitchen/smartfridge.dm index d1b9381216..0213ef089b 100644 --- a/code/modules/food/kitchen/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge.dm @@ -216,7 +216,7 @@ overlays.Cut() if(panel_open) overlays += image(icon, icon_panel) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) return if(wrenchable && default_unfasten_wrench(user, O, 20)) @@ -282,11 +282,11 @@ var/datum/stored_item/item = new/datum/stored_item(src, O.type, O.name) item.add_product(O) item_records.Add(item) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/smartfridge/proc/vend(datum/stored_item/I) I.get_product(get_turf(src)) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/smartfridge/attack_ai(mob/user as mob) attack_hand(user) @@ -321,7 +321,7 @@ if(items.len > 0) data["contents"] = items - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "smartfridge.tmpl", src.name, 400, 500) ui.set_initial_data(data) @@ -331,7 +331,7 @@ if(..()) return 0 var/mob/user = usr - var/datum/nanoui/ui = GLOB.nanomanager.get_open_ui(user, src, "main") + var/datum/nanoui/ui = SSnanoui.get_open_ui(user, src, "main") src.add_fingerprint(user) diff --git a/code/modules/food/recipe_dump.dm b/code/modules/food/recipe_dump.dm index 19f7988826..a458a568cf 100644 --- a/code/modules/food/recipe_dump.dm +++ b/code/modules/food/recipe_dump.dm @@ -68,14 +68,14 @@ //Reagents can be resolved to nicer names as well for(var/Rp in food_recipes) for(var/rid in food_recipes[Rp]["Reagents"]) - var/datum/reagent/Rd = chemical_reagents_list[rid] + var/datum/reagent/Rd = SSchemistry.chemical_reagents[rid] var/R_name = Rd.name var/amt = food_recipes[Rp]["Reagents"][rid] food_recipes[Rp]["Reagents"] -= rid food_recipes[Rp]["Reagents"][R_name] = amt for(var/Rp in drink_recipes) for(var/rid in drink_recipes[Rp]["Reagents"]) - var/datum/reagent/Rd = chemical_reagents_list[rid] + var/datum/reagent/Rd = SSchemistry.chemical_reagents[rid] var/R_name = Rd.name var/amt = drink_recipes[Rp]["Reagents"][rid] drink_recipes[Rp]["Reagents"] -= rid diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index e9b3ae537e..08d762e093 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -254,8 +254,9 @@ return -/obj/item/weapon/deck/verb_pickup(mob/user as mob) // Snowflaked so pick up verb work as intended - if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) +/obj/item/weapon/deck/verb_pickup() // Snowflaked so pick up verb work as intended + var/mob/user = usr + if((istype(user) && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr)))))) if(!istype(usr, /mob/living/simple_mob)) if( !usr.get_active_hand() ) //if active hand is empty var/mob/living/carbon/human/H = user diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm index ee33b66cba..4cce81a2a6 100644 --- a/code/modules/holodeck/HolodeckControl.dm +++ b/code/modules/holodeck/HolodeckControl.dm @@ -112,7 +112,7 @@ else data["gravity"] = null - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "holodeck.tmpl", src.name, 400, 550) ui.set_initial_data(data) @@ -152,7 +152,7 @@ src.add_fingerprint(usr) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/computer/HolodeckControl/emag_act(var/remaining_charges, var/mob/user as mob) playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 0118088b27..9ed2d836a6 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -437,7 +437,7 @@ for(var/x=1;x<=additional_chems;x++) - var/new_chem = pick(chemical_reagents_list) + var/new_chem = pick(SSchemistry.chemical_reagents) if(new_chem in banned_chems) continue banned_chems += new_chem diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 8d7ebdf314..4601f23484 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -162,7 +162,7 @@ data["hasGenetics"] = 0 data["sourceName"] = 0 - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "botany_isolator.tmpl", "Lysis-isolation Centrifuge UI", 470, 450) ui.set_initial_data(data) @@ -292,7 +292,7 @@ else data["loaded"] = 0 - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "botany_editor.tmpl", "Bioballistic Delivery UI", 470, 450) ui.set_initial_data(data) diff --git a/code/modules/materials/material_recipes.dm b/code/modules/materials/material_recipes.dm index 232ef46e3e..f62356d83c 100644 --- a/code/modules/materials/material_recipes.dm +++ b/code/modules/materials/material_recipes.dm @@ -190,3 +190,7 @@ recipes += new/datum/stack_recipe("alien wood floor tile", /obj/item/stack/tile/wood/sif, 1, 4, 20) recipes -= new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20) recipes -= new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1) + +/material/supermatter/generate_recipes() + recipes = list() + recipes += new/datum/stack_recipe("supermatter shard", /obj/machinery/power/supermatter/shard, 30 , one_per_turf = 1, time = 600, on_floor = 1) diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index 0b1daf10fa..1035c70eba 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -214,7 +214,101 @@ no_variants = FALSE /obj/item/stack/material/durasteel/hull - name = "MAT_DURASTEELHULL" + name = MAT_DURASTEELHULL + +/obj/item/stack/material/titanium + name = MAT_TITANIUM + icon_state = "sheet-silver" + item_state = "sheet-silver" + default_type = MAT_TITANIUM + no_variants = FALSE + +/obj/item/stack/material/titanium/hull + name = MAT_TITANIUMHULL + default_type = MAT_TITANIUMHULL + +// Particle Smasher and Exotic material. +/obj/item/stack/material/verdantium + name = MAT_VERDANTIUM + icon_state = "sheet-wavy" + item_state = "mhydrogen" + default_type = MAT_VERDANTIUM + no_variants = FALSE + apply_colour = TRUE + +/obj/item/stack/material/morphium + name = MAT_MORPHIUM + icon_state = "sheet-wavy" + item_state = "mhydrogen" + default_type = MAT_MORPHIUM + no_variants = FALSE + apply_colour = TRUE + +/obj/item/stack/material/morphium/hull + name = MAT_MORPHIUMHULL + default_type = MAT_MORPHIUMHULL + +/obj/item/stack/material/valhollide + name = MAT_VALHOLLIDE + icon_state = "sheet-gem" + item_state = "diamond" + default_type = MAT_VALHOLLIDE + no_variants = FALSE + apply_colour = TRUE + +// Forged in the equivalent of Hell, one piece at a time. +/obj/item/stack/material/supermatter + name = MAT_SUPERMATTER + icon_state = "sheet-super" + item_state = "diamond" + default_type = MAT_SUPERMATTER + apply_colour = TRUE + +/obj/item/stack/material/supermatter/proc/update_mass() // Due to how dangerous they can be, the item will get heavier and larger the more are in the stack. + slowdown = amount / 10 + w_class = min(5, round(amount / 10) + 1) + throw_range = round(amount / 7) + 1 + +/obj/item/stack/material/supermatter/use(var/used) + . = ..() + update_mass() + return + +/obj/item/stack/material/supermatter/attack_hand(mob/user) + update_mass() + radiation_repository.radiate(src, 5 + amount) + var/mob/living/M = user + if(!istype(M)) + return + + var/burn_user = TRUE + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + var/obj/item/clothing/gloves/G = H.gloves + if(istype(G) && ((G.flags & THICKMATERIAL && prob(70)) || istype(G, /obj/item/clothing/gloves/gauntlets))) + burn_user = FALSE + + if(burn_user) + H.visible_message("\The [src] flashes as it scorches [H]'s hands!") + H.apply_damage(amount / 2 + 5, BURN, "r_hand", used_weapon="Supermatter Chunk") + H.apply_damage(amount / 2 + 5, BURN, "l_hand", used_weapon="Supermatter Chunk") + H.drop_from_inventory(src, get_turf(H)) + return + + if(istype(user, /mob/living/silicon/robot)) + burn_user = FALSE + + if(burn_user) + M.apply_damage(amount, BURN, null, used_weapon="Supermatter Chunk") + +/obj/item/stack/material/supermatter/ex_act(severity) // An incredibly hard to manufacture material, SM chunks are unstable by their 'stabilized' nature. + if(prob((4 / severity) * 20)) + radiation_repository.radiate(get_turf(src), amount * 4) + explosion(get_turf(src),round(amount / 12) , round(amount / 6), round(amount / 3), round(amount / 25)) + qdel(src) + return + radiation_repository.radiate(get_turf(src), amount * 2) + ..() /obj/item/stack/material/wood name = "wooden plank" diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm index 6f55572ef9..5428e110db 100644 --- a/code/modules/materials/materials.dm +++ b/code/modules/materials/materials.dm @@ -105,6 +105,8 @@ var/list/name_to_material var/opacity = 1 // Is the material transparent? 0.5< makes transparent walls/doors. var/reflectivity = 0 // How reflective to light is the material? Currently used for laser reflection and defense. var/explosion_resistance = 5 // Only used by walls currently. + var/negation = 0 // Objects that respect this will randomly absorb impacts with this var as the percent chance. + var/spatial_instability = 0 // Objects that have trouble staying in the same physical space by sheer laws of nature have this. Percent for respecting items to cause teleportation. var/conductive = 1 // Objects with this var add CONDUCTS to flags on spawn. var/conductivity = null // How conductive the material is. Iron acts as the baseline, at 10. var/list/composite_material // If set, object matter var will be a list containing these values. @@ -293,6 +295,8 @@ var/list/name_to_material /material/supermatter name = "supermatter" icon_colour = "#FFFF00" + stack_type = /obj/item/stack/material/supermatter + shard_type = SHARD_SHARD radioactivity = 20 stack_type = null luminescence = 3 @@ -304,6 +308,7 @@ var/list/name_to_material sheet_singular_name = "crystal" sheet_plural_name = "crystals" is_fusion_fuel = 1 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_PHORON = 5, TECH_BLUESPACE = 4) /material/phoron name = "phoron" @@ -358,7 +363,6 @@ var/list/name_to_material integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system stack_type = /obj/item/stack/material/marble - /material/steel name = DEFAULT_WALL_MATERIAL stack_type = /obj/item/stack/material/steel @@ -455,8 +459,8 @@ var/list/name_to_material reflectivity = 0.9 /material/plasteel/titanium - name = "titanium" - stack_type = null + name = MAT_TITANIUM + stack_type = /obj/item/stack/material/titanium conductivity = 2.38 icon_base = "metal" door_icon_base = "metal" @@ -465,7 +469,7 @@ var/list/name_to_material /material/plasteel/titanium/hull name = MAT_TITANIUMHULL - stack_type = null + stack_type = /obj/item/stack/material/titanium/hull icon_base = "hull" icon_reinf = "reinf_mesh" @@ -686,7 +690,7 @@ var/list/name_to_material sheet_plural_name = "ingots" /material/lead - name = "lead" + name = MAT_LEAD stack_type = /obj/item/stack/material/lead icon_colour = "#273956" weight = 23 // Lead is a bit more dense than silver IRL, and silver has 22 ingame. @@ -695,6 +699,74 @@ var/list/name_to_material sheet_plural_name = "ingots" radiation_resistance = 25 // Lead is Special and so gets to block more radiation than it normally would with just weight, totalling in 48 protection. +// Particle Smasher and other exotic materials. + +/material/verdantium + name = MAT_VERDANTIUM + stack_type = /obj/item/stack/material/verdantium + icon_base = "metal" + door_icon_base = "metal" + icon_reinf = "reinf_metal" + icon_colour = "#4FE95A" + integrity = 80 + protectiveness = 15 + weight = 15 + hardness = 30 + shard_type = SHARD_SHARD + negation = 15 + conductivity = 60 + reflectivity = 0.3 + radiation_resistance = 5 + stack_origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 5, TECH_BIO = 4) + sheet_singular_name = "sheet" + sheet_plural_name = "sheets" + +/material/morphium + name = MAT_MORPHIUM + stack_type = /obj/item/stack/material/morphium + icon_base = "metal" + door_icon_base = "metal" + icon_colour = "#37115A" + icon_reinf = "reinf_metal" + protectiveness = 60 + integrity = 300 + conductivity = 1.5 + hardness = 90 + shard_type = SHARD_SHARD + weight = 30 + negation = 25 + explosion_resistance = 85 + reflectivity = 0.2 + radiation_resistance = 10 + stack_origin_tech = list(TECH_MATERIAL = 8, TECH_ILLEGAL = 1, TECH_PHORON = 4, TECH_BLUESPACE = 4, TECH_ARCANE = 1) + +/material/morphium/hull + name = MAT_MORPHIUMHULL + stack_type = /obj/item/stack/material/morphium/hull + icon_base = "hull" + icon_reinf = "reinf_mesh" + +/material/valhollide + name = MAT_VALHOLLIDE + stack_type = /obj/item/stack/material/valhollide + icon_base = "stone" + door_icon_base = "stone" + icon_reinf = "reinf_mesh" + icon_colour = "##FFF3B2" + protectiveness = 30 + integrity = 240 + weight = 30 + hardness = 45 + negation = 2 + conductivity = 5 + reflectivity = 0.5 + radiation_resistance = 20 + spatial_instability = 30 + stack_origin_tech = list(TECH_MATERIAL = 7, TECH_PHORON = 5, TECH_BLUESPACE = 5) + sheet_singular_name = "gem" + sheet_plural_name = "gems" + + // Adminspawn only, do not let anyone get this. /material/alienalloy name = "alienalloy" @@ -994,4 +1066,4 @@ var/list/name_to_material icon_colour = "#ff9900" hardness = 1 weight = 1 - protectiveness = 0 // 0% \ No newline at end of file + protectiveness = 0 // 0% diff --git a/code/modules/mining/drilling/drill.dm b/code/modules/mining/drilling/drill.dm index 5e28944ae0..08580c7f97 100644 --- a/code/modules/mining/drilling/drill.dm +++ b/code/modules/mining/drilling/drill.dm @@ -17,7 +17,7 @@ var/list/resource_field = list() var/obj/item/device/radio/intercom/faultreporter = new /obj/item/device/radio/intercom{channels=list("Supply")}(null) - var/ore_types = list( + var/list/ore_types = list( "hematite" = /obj/item/weapon/ore/iron, "uranium" = /obj/item/weapon/ore/uranium, "gold" = /obj/item/weapon/ore/gold, @@ -34,8 +34,20 @@ var/harvest_speed var/capacity var/charge_use + var/exotic_drilling var/obj/item/weapon/cell/cell = null + // Found with an advanced laser. exotic_drilling >= 1 + var/list/ore_types_uncommon = list( + MAT_MARBLE = /obj/item/weapon/ore/marble, + MAT_LEAD = /obj/item/weapon/ore/lead + ) + + // Found with an ultra laser. exotic_drilling >= 2 + var/list/ore_types_rare = list( + MAT_VERDANTIUM = /obj/item/weapon/ore/verdantium + ) + //Flags var/need_update_field = 0 var/need_player_check = 0 @@ -127,7 +139,7 @@ var/oretype = ore_types[metal] new oretype(src) - if(!found_resource) + if(!found_resource) // If a drill can't see an advanced material, it will destroy it while going through. harvesting.has_resources = 0 harvesting.resources = null resource_field -= harvesting @@ -219,6 +231,14 @@ for(var/obj/item/weapon/stock_parts/P in component_parts) if(istype(P, /obj/item/weapon/stock_parts/micro_laser)) harvest_speed = P.rating + exotic_drilling = P.rating - 1 + if(exotic_drilling >= 1) + ore_types |= ore_types_uncommon + if(exotic_drilling >= 2) + ore_types |= ore_types_rare + else + ore_types -= ore_types_uncommon + ore_types -= ore_types_rare if(istype(P, /obj/item/weapon/stock_parts/matter_bin)) capacity = 200 * P.rating if(istype(P, /obj/item/weapon/stock_parts/capacitor)) diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm index 0df256c131..56f371fe91 100644 --- a/code/modules/mining/drilling/scanner.dm +++ b/code/modules/mining/drilling/scanner.dm @@ -18,7 +18,8 @@ "surface minerals" = 0, "precious metals" = 0, "nuclear fuel" = 0, - "exotic matter" = 0 + "exotic matter" = 0, + "anomalous matter" = 0 ) for(var/turf/simulated/T in range(2, get_turf(user))) @@ -30,10 +31,11 @@ var/ore_type switch(metal) - if("silicates", "carbon", "hematite") ore_type = "surface minerals" - if("gold", "silver", "diamond") ore_type = "precious metals" + if("silicates", "carbon", "hematite", "marble") ore_type = "surface minerals" + if("gold", "silver", "diamond", "lead") ore_type = "precious metals" if("uranium") ore_type = "nuclear fuel" if("phoron", "osmium", "hydrogen") ore_type = "exotic matter" + if("verdantium") ore_type = "anomalous matter" if(ore_type) metals[ore_type] += T.resources[metal] diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 3f76672610..d515f42925 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -171,10 +171,13 @@ "phoron" = 15, "silver" = 16, "gold" = 18, + "marble" = 20, "uranium" = 30, "diamond" = 50, "platinum" = 40, - "mhydrogen" = 40) + "lead" = 40, + "mhydrogen" = 40, + "verdantium" = 60) /obj/machinery/mineral/processing_unit/New() ..() diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index 9bd8e396b7..4208e01d2d 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -211,7 +211,7 @@ var/obj/item/stack/flag/newflag = new src.type(T) newflag.amount = 1 newflag.upright = 1 - anchored = 1 + newflag.anchored = 1 newflag.name = newflag.singular_name newflag.icon_state = "[newflag.base_state]_open" newflag.visible_message("[user] plants [newflag] firmly in the ground.") diff --git a/code/modules/mining/mine_items_vr.dm b/code/modules/mining/mine_items_vr.dm index d8046a7b06..3fbf95d826 100644 --- a/code/modules/mining/mine_items_vr.dm +++ b/code/modules/mining/mine_items_vr.dm @@ -1,7 +1,7 @@ //upgrades the speed of all drills and pickaxes. /obj/item/weapon/pickaxe - digspeed = 36 + digspeed = 36 /obj/item/weapon/pickaxe/silver digspeed = 27 @@ -10,14 +10,15 @@ digspeed = 27 /obj/item/weapon/pickaxe/jackhammer - digspeed = 18 + digspeed = 18 + destroy_artefacts = TRUE /obj/item/weapon/pickaxe/gold digspeed = 18 /obj/item/weapon/pickaxe/plasmacutter - digspeed = 18 - + digspeed = 18 + /obj/item/weapon/pickaxe/diamond digspeed = 9 @@ -26,3 +27,4 @@ /obj/item/weapon/pickaxe/borgdrill digspeed = 13 + destroy_artefacts = TRUE diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index a113da92d8..79a85d0b3a 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -54,7 +54,9 @@ var/list/mining_overlay_cache = list() "osmium" = /obj/item/weapon/ore/osmium, "hydrogen" = /obj/item/weapon/ore/hydrogen, "silicates" = /obj/item/weapon/ore/glass, - "carbon" = /obj/item/weapon/ore/coal + "carbon" = /obj/item/weapon/ore/coal, + "verdantium" = /obj/item/weapon/ore/verdantium, + "marble" = /obj/item/weapon/ore/marble ) has_resources = 1 @@ -616,10 +618,10 @@ var/list/mining_overlay_cache = list() var/mineral_name if(rare_ore) - mineral_name = pickweight(list("uranium" = 10, "platinum" = 10, "hematite" = 20, "carbon" = 20, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20)) + mineral_name = pickweight(list("marble" = 5, "uranium" = 10, "platinum" = 10, "hematite" = 20, "carbon" = 20, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 5, "verdantium" = 1)) else - mineral_name = pickweight(list("uranium" = 5, "platinum" = 5, "hematite" = 35, "carbon" = 35, "diamond" = 1, "gold" = 5, "silver" = 5, "phoron" = 10)) + mineral_name = pickweight(list("marble" = 3, "uranium" = 10, "platinum" = 10, "hematite" = 70, "carbon" = 70, "diamond" = 2, "gold" = 10, "silver" = 10, "phoron" = 20, "lead" = 2, "verdantium" = 1)) if(mineral_name && (mineral_name in ore_data)) mineral = ore_data[mineral_name] diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index e531e5208f..099ce46ba5 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -24,6 +24,12 @@ origin_tech = list(TECH_MATERIAL = 1) material = "carbon" +/obj/item/weapon/ore/marble + name = "recrystallized carbonate" + icon_state = "ore_marble" + origin_tech = list(TECH_MATERIAL = 1) + material = "carbon" + /obj/item/weapon/ore/glass name = "sand" icon_state = "ore_glass" @@ -77,6 +83,29 @@ icon_state = "ore_hydrogen" material = "mhydrogen" +/obj/item/weapon/ore/verdantium + name = "verdantite dust" + icon_state = "ore_verdantium" + material = MAT_VERDANTIUM + origin_tech = list(TECH_MATERIAL = 7) + +// POCKET ... Crystal dust. +/obj/item/weapon/ore/verdantium/throw_impact(atom/hit_atom) + ..() + var/mob/living/carbon/human/H = hit_atom + if(istype(H) && H.has_eyes() && prob(85)) + H << "Some of \the [src] gets in your eyes!" + H.Blind(10) + H.eye_blurry += 15 + spawn(1) + if(istype(loc, /turf/)) qdel(src) + +/obj/item/weapon/ore/lead + name = "lead glance" + icon_state = "ore_lead" + material = MAT_LEAD + origin_tech = list(TECH_MATERIAL = 3) + /obj/item/weapon/ore/slag name = "Slag" desc = "Someone screwed up..." diff --git a/code/modules/mining/ore_datum.dm b/code/modules/mining/ore_datum.dm index a3528eb55b..b54ac6c5f0 100644 --- a/code/modules/mining/ore_datum.dm +++ b/code/modules/mining/ore_datum.dm @@ -132,4 +132,34 @@ var/global/list/ore_data = list() display_name = "metallic hydrogen" smelts_to = "tritium" compresses_to = "mhydrogen" - scan_icon = "mineral_rare" \ No newline at end of file + scan_icon = "mineral_rare" + +/ore/verdantium + name = MAT_VERDANTIUM + display_name = "crystalline verdantite" + compresses_to = MAT_VERDANTIUM + result_amount = 2 + spread_chance = 5 + scan_icon = "mineral_rare" + xarch_ages = list( + "billion" = 13, + "billion_lower" = 10 + ) + +/ore/marble + name = MAT_MARBLE + display_name = "recrystallized carbonate" + compresses_to = "marble" + result_amount = 1 + spread_chance = 10 + ore = /obj/item/weapon/ore/marble + scan_icon = "mineral_common" + +/ore/lead + name = MAT_LEAD + display_name = "lead glance" + smelts_to = "lead" + result_amount = 3 + spread_chance = 20 + ore = /obj/item/weapon/ore/lead + scan_icon = "mineral_rare" diff --git a/code/modules/mob/dead/observer/observer_vr.dm b/code/modules/mob/dead/observer/observer_vr.dm index 97280c78b9..611bbb39a7 100644 --- a/code/modules/mob/dead/observer/observer_vr.dm +++ b/code/modules/mob/dead/observer/observer_vr.dm @@ -56,3 +56,21 @@ mind.active = TRUE SC.catch_mob(src) //This will result in us being deleted so... + +/mob/observer/dead/verb/backup_ping() + set category = "Ghost" + set name = "Notify Transcore" + set desc = "If your past-due backup notification was missed or ignored, you can use this to send a new one." + + if(src.mind.name in SStranscore.backed_up) + var/datum/transhuman/mind_record/record = SStranscore.backed_up[src.mind.name] + if(!(record.dead_state == MR_DEAD)) + to_chat(src, "Your backup is not past-due yet.") + else if((world.time - record.last_notification) < 10 MINUTES) + to_chat(src, "Too little time has passed since your last notification.") + else + SStranscore.notify(record.mindname, TRUE) + record.last_notification = world.time + to_chat(src, "New notification has been sent.") + else + to_chat(src, "No mind record found!") \ No newline at end of file diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index e7c097c2b3..5408742654 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -275,6 +275,8 @@ var/final_message = "[part_a][speaker_name][part_b][formatted]" if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention)) final_message = "[time][final_message]" + else + final_message = "[time][final_message]" to_chat(src, final_message) /mob/living/silicon/ai/on_hear_radio(part_a, speaker_name, track, part_b, formatted) @@ -282,6 +284,8 @@ var/final_message = "[part_a][track][part_b][formatted]" if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention)) final_message = "[time][final_message]" + else + final_message = "[time][final_message]" to_chat(src, final_message) /mob/proc/hear_signlang(var/message, var/verb = "gestures", var/datum/language/language, var/mob/speaker = null) diff --git a/code/modules/mob/language/station_vr.dm b/code/modules/mob/language/station_vr.dm index 60f6623c3b..321c5ab08c 100644 --- a/code/modules/mob/language/station_vr.dm +++ b/code/modules/mob/language/station_vr.dm @@ -22,7 +22,7 @@ desc = "The dominant language of the Sergal homeworld, Vilous. It consists of aggressive low-pitched hissing and throaty growling." speech_verb = "snarls" colour = "sergal" - key = "e" + key = "t" syllables = list ("grr", "gah", "woof", "arf", "arra", "rah", "wor", "sarg") /datum/language/vulpkanin @@ -67,7 +67,7 @@ ask_verb = "hums" exclaim_verb = "loudly sings" colour = "enochian" //So fancy - key = "a" + key = "i" syllables = list("salve","sum","loqui","operatur","iusta","et","permittit","facere","effercio","pluribus","enim","hoc", "mihi","wan","six","salve","tartu") machine_understands = FALSE @@ -106,3 +106,11 @@ flags = 0 /datum/language/gutter machine_understands = FALSE +/datum/language/human/monkey + flags = RESTRICTED +/datum/language/skrell/monkey + flags = RESTRICTED +/datum/language/unathi/monkey + flags = RESTRICTED +/datum/language/tajaran/monkey + flags = RESTRICTED \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 9af501a92e..389b24f19f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1102,7 +1102,7 @@ else usr << "You failed to check the pulse. Try again." -/mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour, var/regen_icons = TRUE) +/mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour, var/regen_icons = TRUE, var/mob/living/carbon/human/example = null) //VOREStation Edit - send an example if(!dna) if(!new_species) @@ -1139,7 +1139,15 @@ if(species.default_language) add_language(species.default_language) - if(species.base_color) //VOREStation Edit - Always give them a basse color + //if(species.icon_scale != 1) //VOREStation Removal + // update_transform() //VOREStation Removal + + if(example) //VOREStation Edit begin + if(!(example == src)) + r_skin = example.r_skin + g_skin = example.g_skin + b_skin = example.b_skin + else if(species.base_color) //VOREStation Edit end //Apply colour. r_skin = hex2num(copytext(species.base_color,2,4)) g_skin = hex2num(copytext(species.base_color,4,6)) @@ -1157,10 +1165,13 @@ //icon_state = lowertext(species.name) //Necessary? - species.create_organs(src) - + //VOREStation Edit start: swap places of those two procs species.handle_post_spawn(src) + species.create_organs(src) + //VOREStation Edit end: swap places of those two procs + + maxHealth = species.total_health if(LAZYLEN(descriptors)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 9859fe3898..6b15fc069e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1398,7 +1398,7 @@ /mob/living/carbon/human/proc/process_glasses(var/obj/item/clothing/glasses/G) if(G && G.active) see_in_dark += G.darkness_view - if(G.overlay) + if(G.overlay && client) client.screen |= G.overlay if(G.vision_flags) sight |= G.vision_flags diff --git a/code/modules/mob/living/carbon/human/species/species_vr.dm b/code/modules/mob/living/carbon/human/species/species_vr.dm index fa3bb9762d..63f02a5af8 100644 --- a/code/modules/mob/living/carbon/human/species/species_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_vr.dm @@ -12,6 +12,7 @@ //var/reviving = 0 //commented out 'cause moved to mob holder_type = /obj/item/weapon/holder/micro //This allows you to pick up crew min_age = 18 + descriptors = list() var/wing_hair var/wing var/wing_animation diff --git a/code/modules/mob/living/carbon/human/species/station/alraune.dm b/code/modules/mob/living/carbon/human/species/station/alraune.dm index 55e6215fc7..2de96d9f74 100644 --- a/code/modules/mob/living/carbon/human/species/station/alraune.dm +++ b/code/modules/mob/living/carbon/human/species/station/alraune.dm @@ -389,7 +389,7 @@ /mob/living/carbon/human/proc/alraune_fruit_select() //So if someone doesn't want fruit/vegetables, they don't have to select one. set name = "Select fruit" set desc = "Select what fruit/vegetable you wish to grow." - set category = "Object" + set category = "Abilities" var/obj/item/organ/internal/fruitgland/fruit_gland for(var/F in contents) if(istype(F, /obj/item/organ/internal/fruitgland)) diff --git a/code/modules/mob/living/carbon/human/species/station/blank_vr.dm b/code/modules/mob/living/carbon/human/species/station/blank_vr.dm index 45c5f4b8f3..d73e784ac4 100644 --- a/code/modules/mob/living/carbon/human/species/station/blank_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/blank_vr.dm @@ -25,6 +25,7 @@ max_age = 200 health_hud_intensity = 2 num_alternate_languages = 3 + assisted_langs = list(LANGUAGE_EAL, LANGUAGE_ROOTLOCAL, LANGUAGE_ROOTGLOBAL, LANGUAGE_VOX) spawn_flags = SPECIES_CAN_JOIN appearance_flags = HAS_HAIR_COLOR | HAS_SKIN_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_EYE_COLOR diff --git a/code/modules/mob/living/carbon/human/species/station/monkey_vr.dm b/code/modules/mob/living/carbon/human/species/station/monkey_vr.dm index f56faa515a..f8a783b162 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey_vr.dm @@ -1,5 +1,5 @@ /datum/species/monkey/shark - name = "Sobaka" + name = SPECIES_MONKEY_AKULA name_plural = "Sobaka" icobase = 'icons/mob/human_races/monkeys/r_sobaka_vr.dmi' deform = 'icons/mob/human_races/monkeys/r_sobaka_vr.dmi' @@ -8,7 +8,7 @@ default_language = "Skrellian" //Closest we have. /datum/species/monkey/sergal - name = "Saru" + name = SPECIES_MONKEY_SERGAL greater_form = "Sergal" icobase = 'icons/mob/human_races/monkeys/r_sergaling_vr.dmi' deform = 'icons/mob/human_races/monkeys/r_sergaling_vr.dmi' @@ -16,7 +16,7 @@ default_language = LANGUAGE_SAGARU /datum/species/monkey/sparra - name = "Sparra" + name = SPECIES_MONKEY_NEVREAN name_plural = "Sparra" greater_form = "Nevrean" tail = null @@ -41,7 +41,7 @@ */ /datum/species/monkey/vulpkanin - name = "Wolpin" + name = SPECIES_MONKEY_VULPKANIN name_plural = "Wolpin" icobase = 'icons/mob/human_races/monkeys/r_wolpin.dmi' diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans_vr.dm b/code/modules/mob/living/carbon/human/species/station/prometheans_vr.dm index 5a09e5f04a..6204f4d5ba 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans_vr.dm @@ -9,14 +9,8 @@ "Rapala", "Neaera", "Stok", "Farwa", "Sobaka", "Wolpin", "Saru", "Sparra") - heal_rate = 0.2 //As of writing, original was 0.5 - Slows regen speed (bad) - hunger_factor = 0.1 //As of writing, original was 0.2 - Slows hunger rate (good) - siemens_coefficient = 1 //As of writing, original was 0.4 (bad) - active_regen_mult = 0.66 //As of writing, original was 1 (good) - color_mult = 1 - mob_size = MOB_MEDIUM //As of writing, original was MOB_SMALL - Allows normal swapping (good) - num_alternate_languages = 1 //Might be outdated: They currently have 3 in the other file + mob_size = MOB_MEDIUM //As of writing, original was MOB_SMALL - Allows normal swapping trashcan = 1 //They have goopy bodies. They can just dissolve things within them. appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | RADIATION_GLOWS | HAS_UNDERWEAR diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index 28af1a875a..7c8ec30e59 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -305,6 +305,7 @@ min_age = 18 gluttonous = 0 inherent_verbs = list(/mob/living/proc/shred_limb) + descriptors = list() /datum/species/tajaran spawn_flags = SPECIES_CAN_JOIN @@ -330,6 +331,7 @@ spawn_flags = SPECIES_CAN_JOIN min_age = 18 gluttonous = 0 + descriptors = list() /datum/species/diona spawn_flags = SPECIES_CAN_JOIN @@ -345,6 +347,7 @@ push_flags = ~HEAVY //Allows them to use micro step code. swap_flags = ~HEAVY gluttonous = 0 + descriptors = list() inherent_verbs = list( /mob/living/carbon/human/proc/sonar_ping, @@ -371,6 +374,9 @@ icobase = 'icons/mob/human_races/r_vox_old.dmi' deform = 'icons/mob/human_races/r_def_vox_old.dmi' inherent_verbs = list(/mob/living/proc/shred_limb, /mob/living/proc/eat_trash) + descriptors = list( + /datum/mob_descriptor/vox_markings = 0 + ) datum/species/harpy name = SPECIES_RAPALA diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f300f8a350..4020f13d14 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -149,6 +149,12 @@ default behaviour is: tmob.forceMove(oldloc) now_pushing = 0 return + //VOREStation Edit - Begin + else if((tmob.mob_always_swap || (tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained())) && canmove && can_swap && handle_micro_bump_helping(tmob)) + forceMove(tmob.loc) + now_pushing = 0 + return + //VOREStation Edit - End if(!can_move_mob(tmob, 0, 0)) now_pushing = 0 @@ -944,7 +950,11 @@ default behaviour is: /mob/living/proc/escape_buckle() if(buckled) - buckled.user_unbuckle_mob(src, src) + if(istype(buckled, /obj/vehicle)) + var/obj/vehicle/vehicle = buckled + vehicle.unload() + else + buckled.user_unbuckle_mob(src, src) /mob/living/proc/resist_grab() var/resisting = 0 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 94acfd82dc..f5c9e2580e 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -305,7 +305,10 @@ var/list/ai_verbs_default = list( /obj/machinery/ai_powersupply/New(var/mob/living/silicon/ai/ai=null) powered_ai = ai powered_ai.psupply = src - forceMove(powered_ai.loc) + if(istype(powered_ai,/mob/living/silicon/ai/announcer)) //Don't try to get a loc for a nullspace announcer mob, just put it into it + forceMove(powered_ai) + else + forceMove(powered_ai.loc) ..() use_power(1) // Just incase we need to wake up the power system. @@ -443,7 +446,7 @@ var/list/ai_verbs_default = list( return if(usr != src) return - /*if(..()) // <------ MOVED FROM HERE + /*if(..()) // <------ MOVED FROM HERE return*/ if (href_list["mach_close"]) if (href_list["mach_close"] == "aialerts") diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 1b3720dc33..ac2417a077 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -201,7 +201,7 @@ medicalActive1 = null medicalActive2 = null medical_cannotfind = 0 - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) usr << "You reset your record-viewing software." /mob/living/silicon/pai/cancel_camera() diff --git a/code/modules/mob/living/silicon/pai/software.dm b/code/modules/mob/living/silicon/pai/software.dm index bef2c93403..85d98c1663 100644 --- a/code/modules/mob/living/silicon/pai/software.dm +++ b/code/modules/mob/living/silicon/pai/software.dm @@ -90,7 +90,7 @@ var/global/list/default_pai_software = list() data["emotions"] = emotions data["current_emotion"] = card.current_emotion - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600) ui.set_initial_data(data) diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index 480c3b63bb..dad52893cf 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -36,7 +36,7 @@ data["prime"] = user.pai_law0 data["supplemental"] = user.pai_laws - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) // Don't copy-paste this unless you're making a pAI software module! ui = new(user, user, id, "pai_directives.tmpl", "pAI Directives", 450, 600) @@ -102,7 +102,7 @@ data["channels"] = channels - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) ui = new(user, user, id, "pai_radio.tmpl", "Radio Configuration", 300, 150) ui.set_initial_data(data) @@ -128,7 +128,7 @@ // This is dumb, but NanoUI breaks if it has no data to send data["manifest"] = PDA_Manifest - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) // Don't copy-paste this unless you're making a pAI software module! ui = new(user, user, id, "crew_manifest.tmpl", "Crew Manifest", 450, 600) @@ -178,7 +178,7 @@ data["messages"] = messages - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) // Don't copy-paste this unless you're making a pAI software module! ui = new(user, user, id, "pai_messenger.tmpl", "Digital Messenger", 450, 600) @@ -236,7 +236,7 @@ data["medical"] = M ? M.fields : null data["could_not_find"] = user.medical_cannotfind - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) // Don't copy-paste this unless you're making a pAI software module! ui = new(user, user, id, "pai_medrecords.tmpl", "Medical Records", 450, 600) @@ -290,7 +290,7 @@ data["security"] = S ? S.fields : null data["could_not_find"] = user.security_cannotfind - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) // Don't copy-paste this unless you're making a pAI software module! ui = new(user, user, id, "pai_secrecords.tmpl", "Security Records", 450, 600) @@ -340,7 +340,7 @@ data["progress_b"] = user.hackprogress % 10 data["aborted"] = user.hack_aborted - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) // Don't copy-paste this unless you're making a pAI software module! ui = new(user, user, id, "pai_doorjack.tmpl", "Door Jack", 300, 150) @@ -431,7 +431,7 @@ gases[++gases.len] = gas data["gas"] = gases - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) // Don't copy-paste this unless you're making a pAI software module! ui = new(user, user, id, "pai_atmosphere.tmpl", "Atmosphere Sensor", 350, 300) @@ -505,7 +505,7 @@ data["frequency"] = format_frequency(user.sradio.frequency) data["code"] = user.sradio.code - ui = GLOB.nanomanager.try_update_ui(user, user, id, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, user, id, ui, data, force_open) if(!ui) // Don't copy-paste this unless you're making a pAI software module! ui = new(user, user, id, "pai_signaller.tmpl", "Signaller", 320, 150) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 419ec99a26..750f043f33 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -184,12 +184,12 @@ dat += "

Injector

" if(patient)// && patient.health > min_health) //Not necessary, leave the buttons on, but the feedback during injection will give more information. for(var/re in injection_chems) - var/datum/reagent/C = chemical_reagents_list[re] + var/datum/reagent/C = SSchemistry.chemical_reagents[re] if(C) dat += "Inject [C.name]
" else for(var/re in injection_chems) - var/datum/reagent/C = chemical_reagents_list[re] + var/datum/reagent/C = SSchemistry.chemical_reagents[re] if(C) dat += "Inject [C.name]
" @@ -393,7 +393,7 @@ patient.reagents.add_reagent(chem, inject_amount) drain(750) //-750 charge per injection var/units = round(patient.reagents.get_reagent_amount(chem)) - to_chat(hound, "Injecting [units] unit\s of [chemical_reagents_list[chem]] into occupant.") //If they were immersed, the reagents wouldn't leave with them. + to_chat(hound, "Injecting [units] unit\s of [SSchemistry.chemical_reagents[chem]] into occupant.") //If they were immersed, the reagents wouldn't leave with them. //For if the dogborg's existing patient uh, doesn't make it. /obj/item/device/dogborg/sleeper/proc/update_patient() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index ef1dfd275d..ea851806c3 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -628,7 +628,7 @@ else to_chat(user, "Unable to locate a radio.") - else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)||istype(W, /obj/item/weapon/card/robot)) // trying to unlock the interface with an ID card + else if (W.GetID()) // trying to unlock the interface with an ID card if(emagged)//still allow them to open the cover to_chat(user, "The interface seems slightly damaged") if(opened) @@ -722,17 +722,18 @@ return 1 return 0 -/mob/living/silicon/robot/proc/check_access(obj/item/weapon/card/id/I) +/mob/living/silicon/robot/proc/check_access(obj/item/I) if(!istype(req_access, /list)) //something's very wrong return 1 var/list/L = req_access if(!L.len) //no requirements return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access + if(!I) //nothing to check with..? return 0 + var/access_found = I.GetAccess() for(var/req in req_access) - if(req in I.access) //have one of the required accesses + if(req in access_found) //have one of the required accesses return 1 return 0 @@ -1002,7 +1003,7 @@ if(icontype == "Custom") icon = CUSTOM_ITEM_SYNTH else // This is to fix an issue where someone with a custom borg sprite chooses a non-custom sprite and turns invisible. - icon = 'icons/mob/robots.dmi' + vr_sprite_check() //VOREStation Edit icon_state = module_sprites[icontype] updateicon() diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/passive/lizard.dm b/code/modules/mob/living/simple_mob/subtypes/animal/passive/lizard.dm index adb2ea83ca..c8dfe1c3a6 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/passive/lizard.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/passive/lizard.dm @@ -5,7 +5,7 @@ icon_state = "lizard" icon_living = "lizard" - icon_dead = "lizard-dead" + icon_dead = "lizard_dead" health = 5 maxHealth = 5 diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 317bc2c076..aa42ab461d 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -1,5 +1,5 @@ /mob/Logout() - GLOB.nanomanager.user_logout(src) // this is used to clean up (remove) this user's Nano UIs + SSnanoui.user_logout(src) // this is used to clean up (remove) this user's Nano UIs player_list -= src disconnect_time = world.realtime //VOREStation Addition: logging when we disappear. update_client_z(null) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d377c87872..c3f367bc10 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -373,8 +373,8 @@ var/deathtimeseconds = round((deathtime - deathtimeminutes * 600) / 10,1) to_chat(usr, "You have been dead for[pluralcheck] [deathtimeseconds] seconds.") - if ((deathtime < (5 * 600)) && (ticker && ticker.current_state > GAME_STATE_PREGAME)) - to_chat(usr, "You must wait 5 minutes to respawn!") + if ((deathtime < (1 * 600)) && (ticker && ticker.current_state > GAME_STATE_PREGAME)) //VOREStation Edit: lower respawn timer + to_chat(usr, "You must wait 1 minute to respawn!") return else to_chat(usr, "You can respawn now, enjoy your new life!") @@ -716,7 +716,7 @@ if(statpanel("Tickets")) GLOB.ahelp_tickets.stat_entry() - + if(length(GLOB.sdql2_queries)) if(statpanel("SDQL2")) diff --git a/code/modules/mob/new_player/sprite_accessories_vr.dm b/code/modules/mob/new_player/sprite_accessories_vr.dm index 3335e15db5..4ee7d5e01c 100644 --- a/code/modules/mob/new_player/sprite_accessories_vr.dm +++ b/code/modules/mob/new_player/sprite_accessories_vr.dm @@ -1049,19 +1049,10 @@ color_blend_mode = ICON_MULTIPLY body_parts = list(BP_HEAD) - /* rosette name = "Rosettes" icon_state = "rosette" - color_blend_mode = ICON_MULTIPLY - body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_GROIN,BP_TORSO) - - rosette_color - name = "Rosettes (Colorable)" - icon_state = "rosette_color" - color_blend_mode = ICON_MULTIPLY - body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_GROIN,BP_TORSO) - */ + body_parts = list(BP_L_FOOT,BP_R_FOOT,BP_L_LEG,BP_R_LEG,BP_L_ARM,BP_R_ARM,BP_L_HAND,BP_R_HAND,BP_GROIN,BP_TORSO,BP_HEAD) heterochromia name = "Heterochromia" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 945ffd53be..c1d0f9de64 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -182,6 +182,8 @@ var/datum/preferences/B = O.client.prefs for(var/language in B.alternate_languages) O.add_language(language) + O.resize(B.size_multiplier, animate = FALSE) //VOREStation Addition: add size prefs to borgs + O.fuzzy = B.fuzzy //VOREStation Addition: add size prefs to borgs callHook("borgify", list(O)) O.Namepick() diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 02277740c4..c22e17a789 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -48,7 +48,7 @@ var/obj/structure/ladder/target_ladder = getTargetLadder(M) if(!target_ladder) return - if(!M.Move(get_turf(src))) + if(!(M.loc == loc) && !M.Move(get_turf(src))) to_chat(M, "You fail to reach \the [src].") return diff --git a/code/modules/nano/interaction/remote.dm b/code/modules/nano/interaction/remote.dm index 2e18386bde..8e6ded6c84 100644 --- a/code/modules/nano/interaction/remote.dm +++ b/code/modules/nano/interaction/remote.dm @@ -18,7 +18,7 @@ src.remoter_state = null // Force an UI update before we go, ensuring that any windows we may have opened for the remote target closes. - GLOB.nanomanager.update_uis(remote_target.nano_container()) + SSnanoui.update_uis(remote_target.nano_container()) remote_target = null return ..() diff --git a/code/modules/nano/modules/alarm_monitor.dm b/code/modules/nano/modules/alarm_monitor.dm index c5a851bacc..ec43035ed8 100644 --- a/code/modules/nano/modules/alarm_monitor.dm +++ b/code/modules/nano/modules/alarm_monitor.dm @@ -80,7 +80,7 @@ "lost_sources" = lost_sources.len ? sanitize(english_list(lost_sources, nothing_text = "", and_text = ", ")) : "")) data["categories"] = categories - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "alarm_monitor.tmpl", "Alarm Monitoring Console", 800, 800, state = state) ui.set_initial_data(data) diff --git a/code/modules/nano/modules/atmos_control.dm b/code/modules/nano/modules/atmos_control.dm index c8c5e8b613..3924f65af7 100644 --- a/code/modules/nano/modules/atmos_control.dm +++ b/code/modules/nano/modules/atmos_control.dm @@ -48,7 +48,7 @@ data["alarms"] = alarms data["map_levels"] = using_map.get_map_levels(T.z) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "atmos_control.tmpl", src.name, 625, 625, state = state) // adding a template with the key "mapContent" enables the map ui functionality diff --git a/code/modules/nano/modules/crew_monitor.dm b/code/modules/nano/modules/crew_monitor.dm index 4a721ab709..319da90715 100644 --- a/code/modules/nano/modules/crew_monitor.dm +++ b/code/modules/nano/modules/crew_monitor.dm @@ -25,7 +25,7 @@ for(var/z in (data["map_levels"] | T.z)) // Always show crew from the current Z even if we can't show a map data["crewmembers"] += crew_repository.health_data(z) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "crew_monitor.tmpl", "Crew Monitoring Computer", 900, 800, state = state) diff --git a/code/modules/nano/modules/human_appearance.dm b/code/modules/nano/modules/human_appearance.dm index 33203944a1..3d790b1194 100644 --- a/code/modules/nano/modules/human_appearance.dm +++ b/code/modules/nano/modules/human_appearance.dm @@ -145,7 +145,7 @@ data["change_hair_color"] = can_change(APPEARANCE_HAIR_COLOR) data["change_facial_hair_color"] = can_change(APPEARANCE_FACIAL_HAIR_COLOR) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "appearance_changer.tmpl", "[src]", 800, 450, state = state) ui.set_initial_data(data) diff --git a/code/modules/nano/modules/law_manager.dm b/code/modules/nano/modules/law_manager.dm index ae8473c8ce..da971a0f87 100644 --- a/code/modules/nano/modules/law_manager.dm +++ b/code/modules/nano/modules/law_manager.dm @@ -176,7 +176,7 @@ data["channels"] = channels data["law_sets"] = package_multiple_laws(data["isAdmin"] ? admin_laws : player_laws) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "law_manager.tmpl", sanitize("[src] - [owner]"), 800, is_malf(user) ? 600 : 400, state = state) ui.set_initial_data(data) diff --git a/code/modules/nano/modules/power_monitor.dm b/code/modules/nano/modules/power_monitor.dm index af1e155530..ae5dc44f29 100644 --- a/code/modules/nano/modules/power_monitor.dm +++ b/code/modules/nano/modules/power_monitor.dm @@ -28,7 +28,7 @@ data["focus"] = focus.return_reading_data() data["map_levels"] = using_map.get_map_levels(T.z) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "power_monitor.tmpl", "Power Monitoring Console", 800, 500, state = state) // adding a template with the key "mapContent" enables the map ui functionality diff --git a/code/modules/nano/modules/rcon.dm b/code/modules/nano/modules/rcon.dm index 98a73964a4..65c1acfe36 100644 --- a/code/modules/nano/modules/rcon.dm +++ b/code/modules/nano/modules/rcon.dm @@ -38,7 +38,7 @@ data["hide_smes_details"] = hide_SMES_details data["hide_breakers"] = hide_breakers - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "rcon.tmpl", "RCON Console", 600, 400, state = state) ui.set_initial_data(data) diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index b1639f9194..69b0e7b77e 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -1,38 +1,3 @@ -GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the manager for Nano UIs. - -// This is the window/UI manager for Nano UI -// There should only ever be one (global) instance of nanomanger -/datum/nanomanager - // a list of current open /nanoui UIs, grouped by src_object and ui_key - var/open_uis[0] - // a list of current open /nanoui UIs, not grouped, for use in processing - var/list/processing_uis = list() - // a list of asset filenames which are to be sent to the client on user logon - var/list/asset_files = list() - - /** - * Create a new nanomanager instance. - * This proc generates a list of assets which are to be sent to each client on connect - * - * @return /nanomanager new nanomanager object - */ -/datum/nanomanager/New() - var/list/nano_asset_dirs = list(\ - "nano/css/",\ - "nano/images/",\ - "nano/js/",\ - "nano/templates/"\ - ) - - var/list/filenames = null - for (var/path in nano_asset_dirs) - filenames = flist(path) - for(var/filename in filenames) - if(copytext(filename, length(filename)) != "/") // filenames which end in "/" are actually directories, which we want to ignore - if(fexists(path + filename)) - asset_files.Add(fcopy_rsc(path + filename)) // add this file to asset_files for sending to clients when they connect - - return /** * Get an open /nanoui ui for the current user, src_object and ui_key and try to update it with data @@ -46,7 +11,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return /nanoui Returns the found ui, for null if none exists */ -/datum/nanomanager/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data, var/force_open = 0) +/datum/controller/subsystem/nanoui/proc/try_update_ui(var/mob/user, src_object, ui_key, var/datum/nanoui/ui, data, var/force_open = 0) if (isnull(ui)) // no ui has been passed, so we'll search for one { ui = get_open_ui(user, src_object, ui_key) @@ -71,7 +36,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return /nanoui Returns the found ui, or null if none exists */ -/datum/nanomanager/proc/get_open_ui(var/mob/user, src_object, ui_key) +/datum/controller/subsystem/nanoui/proc/get_open_ui(var/mob/user, src_object, ui_key) var/src_object_key = "\ref[src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) //testing("nanomanager/get_open_ui mob [user.name] [src_object:name] [ui_key] - there are no uis open") @@ -94,7 +59,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return int The number of uis updated */ -/datum/nanomanager/proc/update_uis(src_object) +/datum/controller/subsystem/nanoui/proc/update_uis(src_object) var/src_object_key = "\ref[src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 @@ -114,7 +79,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return int The number of uis close */ -/datum/nanomanager/proc/close_uis(src_object) +/datum/controller/subsystem/nanoui/proc/close_uis(src_object) var/src_object_key = "\ref[src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 @@ -136,7 +101,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return int The number of uis updated */ -/datum/nanomanager/proc/update_user_uis(var/mob/user, src_object = null, ui_key = null) +/datum/controller/subsystem/nanoui/proc/update_user_uis(var/mob/user, src_object = null, ui_key = null) if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0) return 0 // has no open uis @@ -157,7 +122,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return int The number of uis closed */ -/datum/nanomanager/proc/close_user_uis(var/mob/user, src_object = null, ui_key = null) +/datum/controller/subsystem/nanoui/proc/close_user_uis(var/mob/user, src_object = null, ui_key = null) if (isnull(user.open_uis) || !istype(user.open_uis, /list) || open_uis.len == 0) //testing("nanomanager/close_user_uis mob [user.name] has no open uis") return 0 // has no open uis @@ -180,7 +145,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return nothing */ -/datum/nanomanager/proc/ui_opened(var/datum/nanoui/ui) +/datum/controller/subsystem/nanoui/proc/ui_opened(var/datum/nanoui/ui) var/src_object_key = "\ref[ui.src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) open_uis[src_object_key] = list(ui.ui_key = list()) @@ -201,7 +166,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return int 0 if no ui was removed, 1 if removed successfully */ -/datum/nanomanager/proc/ui_closed(var/datum/nanoui/ui) +/datum/controller/subsystem/nanoui/proc/ui_closed(var/datum/nanoui/ui) var/src_object_key = "\ref[ui.src_object]" if (isnull(open_uis[src_object_key]) || !istype(open_uis[src_object_key], /list)) return 0 // wasn't open @@ -228,7 +193,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana */ // -/datum/nanomanager/proc/user_logout(var/mob/user) +/datum/controller/subsystem/nanoui/proc/user_logout(var/mob/user) //testing("nanomanager/user_logout user [user.name]") return close_user_uis(user) @@ -241,7 +206,7 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana * * @return nothing */ -/datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob) +/datum/controller/subsystem/nanoui/proc/user_transferred(var/mob/oldMob, var/mob/newMob) //testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]") if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) //testing("nanomanager/user_transferred mob [oldMob.name] has no open uis") @@ -256,18 +221,4 @@ GLOBAL_DATUM_INIT(nanomanager, /datum/nanomanager, new) // NanoManager, the mana oldMob.open_uis.Cut() - return 1 // success - - /** - * Sends all nano assets to the client - * This is called on user login - * - * @param client /client The user's client - * - * @return nothing - */ - -/datum/nanomanager/proc/send_resources(client) - for(var/file in asset_files) - client << browse_rsc(file) // send the file to the client - + return 1 // success \ No newline at end of file diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 4e4dd6af5b..43f98e3361 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -412,7 +412,7 @@ nanoui is used to open and update nano browser uis winset(user, "mapwindow.map", "focus=true") // return keyboard focus to map on_close_winset() //onclose(user, window_id) - GLOB.nanomanager.ui_opened(src) + SSnanoui.ui_opened(src) /** * Reinitialise this UI, potentially with a different template and/or initial data @@ -433,7 +433,7 @@ nanoui is used to open and update nano browser uis */ /datum/nanoui/proc/close() is_auto_updating = 0 - GLOB.nanomanager.ui_closed(src) + SSnanoui.ui_closed(src) user << browse(null, "window=[window_id]") for(var/datum/nanoui/child in children) child.close() @@ -492,7 +492,7 @@ nanoui is used to open and update nano browser uis map_update = 1 if ((src_object && src_object.Topic(href, href_list, state)) || map_update) - GLOB.nanomanager.update_uis(src_object) // update all UIs attached to src_object + SSnanoui.update_uis(src_object) // update all UIs attached to src_object /** * Process this UI, updating the entire UI or just the status (aka visibility) diff --git a/code/modules/nifsoft/nif_softshop.dm b/code/modules/nifsoft/nif_softshop.dm index 7c2990395d..818a53d38c 100644 --- a/code/modules/nifsoft/nif_softshop.dm +++ b/code/modules/nifsoft/nif_softshop.dm @@ -167,7 +167,7 @@ shut_up = !shut_up add_fingerprint(usr) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) // Also special treatment! /obj/machinery/vending/nifsoft_shop/vend(datum/stored_item/vending_product/R, mob/user) @@ -179,7 +179,7 @@ vend_ready = 0 //One thing at a time!! status_message = "Installing..." status_error = 0 - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) if(R.category & CAT_COIN) if(!coin) @@ -215,5 +215,5 @@ status_error = 0 vend_ready = 1 currently_vending = null - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) return 1 diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm index 2003abe04f..529114fc74 100644 --- a/code/modules/organs/internal/brain.dm +++ b/code/modules/organs/internal/brain.dm @@ -152,6 +152,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain) name = "slime core" desc = "A complex, organic knot of jelly and crystalline particles." icon_state = "core" + decays = FALSE parent_organ = BP_TORSO clone_source = TRUE flags = OPENCONTAINER diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index bee4f385f9..c14fac25ba 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -6,30 +6,31 @@ var/list/organ_cache = list() germ_level = 0 // Strings. - var/organ_tag = "organ" // Unique identifier. - var/parent_organ = BP_TORSO // Organ holding this object. + var/organ_tag = "organ" // Unique identifier. + var/parent_organ = BP_TORSO // Organ holding this object. // Status tracking. - var/status = 0 // Various status flags - var/vital // Lose a vital limb, die immediately. - var/damage = 0 // Current damage to the organ + var/status = 0 // Various status flags + var/vital // Lose a vital limb, die immediately. + var/damage = 0 // Current damage to the organ var/robotic = 0 // Reference data. - var/mob/living/carbon/human/owner // Current mob owning the organ. - var/list/transplant_data // Transplant match data. - var/list/autopsy_data = list() // Trauma data for forensics. - var/list/trace_chemicals = list() // Traces of chemicals in the organ. - var/datum/dna/dna // Original DNA. - var/datum/species/species // Original species. + var/mob/living/carbon/human/owner // Current mob owning the organ. + var/list/transplant_data // Transplant match data. + var/list/autopsy_data = list() // Trauma data for forensics. + var/list/trace_chemicals = list() // Traces of chemicals in the organ. + var/datum/dna/dna // Original DNA. + var/datum/species/species // Original species. // Damage vars. - var/min_bruised_damage = 10 // Damage before considered bruised - var/min_broken_damage = 30 // Damage before becoming broken - var/max_damage // Damage cap - var/can_reject = 1 // Can this organ reject? - var/rejecting // Is this organ already being rejected? - var/preserved = 0 // If this is 1, prevents organ decay. + var/min_bruised_damage = 10 // Damage before considered bruised + var/min_broken_damage = 30 // Damage before becoming broken + var/max_damage // Damage cap + var/can_reject = 1 // Can this organ reject? + var/rejecting // Is this organ already being rejected? + var/decays = TRUE // Can this organ decay at all? + var/preserved = 0 // If this is 1, prevents organ decay. // Language vars. Putting them here in case we decide to do something crazy with sign-or-other-nonverbal languages. var/list/will_assist_languages = list() @@ -135,7 +136,7 @@ var/list/organ_cache = list() if(B && prob(40)) reagents.remove_reagent("blood",0.1) blood_splatter(src,B,1) - if(config.organs_decay) damage += rand(1,3) + if(config.organs_decay && decays) damage += rand(1,3) if(damage >= max_damage) damage = max_damage adjust_germ_level(rand(2,6)) diff --git a/code/modules/organs/subtypes/slime_vr.dm b/code/modules/organs/subtypes/slime_vr.dm deleted file mode 100644 index 270b194f5d..0000000000 --- a/code/modules/organs/subtypes/slime_vr.dm +++ /dev/null @@ -1,22 +0,0 @@ -/obj/item/organ/external/chest/unbreakable/slime - max_damage = 50 -/obj/item/organ/external/groin/unbreakable/slime - max_damage = 30 -/obj/item/organ/external/arm/unbreakable/slime - max_damage = 8 -/obj/item/organ/external/arm/right/unbreakable/slime - max_damage = 8 -/obj/item/organ/external/leg/unbreakable/slime - max_damage = 8 -/obj/item/organ/external/leg/right/unbreakable/slime - max_damage = 8 -/obj/item/organ/external/foot/unbreakable/slime - max_damage = 8 -/obj/item/organ/external/foot/right/unbreakable/slime - max_damage = 8 -/obj/item/organ/external/hand/unbreakable/slime - max_damage = 8 -/obj/item/organ/external/hand/right/unbreakable/slime - max_damage = 8 -/obj/item/organ/external/head/unbreakable/slime - max_damage = 8 diff --git a/code/modules/overmap/ships/computers/engine_control.dm b/code/modules/overmap/ships/computers/engine_control.dm index 4316762671..01920ee2e0 100644 --- a/code/modules/overmap/ships/computers/engine_control.dm +++ b/code/modules/overmap/ships/computers/engine_control.dm @@ -52,7 +52,7 @@ data["engines_info"] = enginfo - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "engines_control.tmpl", "[linked.name] Engines Control", 380, 530) ui.set_initial_data(data) diff --git a/code/modules/overmap/ships/computers/helm.dm b/code/modules/overmap/ships/computers/helm.dm index e31560f9e3..0249fae482 100644 --- a/code/modules/overmap/ships/computers/helm.dm +++ b/code/modules/overmap/ships/computers/helm.dm @@ -104,7 +104,7 @@ data["locations"] = locations - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "helm.tmpl", "[linked.name] Helm Control", 380, 530) ui.set_initial_data(data) diff --git a/code/modules/overmap/ships/computers/shuttle.dm b/code/modules/overmap/ships/computers/shuttle.dm index 8d6ecefcc7..09bf47512d 100644 --- a/code/modules/overmap/ships/computers/shuttle.dm +++ b/code/modules/overmap/ships/computers/shuttle.dm @@ -103,7 +103,7 @@ "can_force" = can_go && shuttle.can_force(), ) - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "shuttle_control_console_exploration.tmpl", "[shuttle_tag] Shuttle Control", 470, 310) diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 8a2940b90d..add0d03d22 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -57,7 +57,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins data["cooldown"] = sendcooldown data["destination"] = destination - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "fax.tmpl", src.name, 500, 500) ui.set_initial_data(data) @@ -116,7 +116,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins if(href_list["logout"]) authenticated = 0 - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination) if(stat & (BROKEN|NOPOWER)) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index c5c087f7d8..24ad752845 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -50,7 +50,7 @@ else data["isSilicon"] = null - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "photocopier.tmpl", src.name, 300, 250) ui.set_initial_data(data) @@ -118,7 +118,7 @@ toner -= 5 sleep(15) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/photocopier/attackby(obj/item/O as obj, mob/user as mob) if(istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo) || istype(O, /obj/item/weapon/paper_bundle)) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 7aa085c198..7b464f6f50 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -822,7 +822,7 @@ ) // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index bb808a49e2..2eadfc520a 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -211,7 +211,7 @@ // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 6563cb7fdb..5e4c2e6207 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -327,7 +327,7 @@ - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "pacman.tmpl", src.name, 500, 560) ui.set_initial_data(data) diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm index 888d75ea6f..c49c605598 100644 --- a/code/modules/power/singularity/generator.dm +++ b/code/modules/power/singularity/generator.dm @@ -29,4 +29,25 @@ "You unsecure the [src.name] from the floor.", \ "You hear a ratchet.") return + if(W.is_screwdriver()) + panel_open = !panel_open + playsound(loc, W.usesound, 50, 1) + visible_message("\The [user] adjusts \the [src]'s mechanisms.") + if(panel_open && do_after(user, 30)) + to_chat(user, "\The [src] looks like it could be modified.") + if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity) + playsound(loc, W.usesound, 50, 1) + to_chat(user, "\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow..") + else + to_chat(user, "\The [src]'s mechanisms look secure.") + if(istype(W, /obj/item/weapon/smes_coil/super_io) && panel_open) + visible_message("\The [user] begins to modify \the [src] with \the [W].") + if(do_after(user, 300)) + user.drop_from_inventory(W) + visible_message("\The [user] installs \the [W] onto \the [src].") + qdel(W) + var/turf/T = get_turf(src) + var/new_machine = /obj/machinery/particle_smasher + new new_machine(T) + qdel(src) return ..() diff --git a/code/modules/power/singularity/particle_accelerator/particle.dm b/code/modules/power/singularity/particle_accelerator/particle.dm index 3b5992e4e4..2c3e99318d 100644 --- a/code/modules/power/singularity/particle_accelerator/particle.dm +++ b/code/modules/power/singularity/particle_accelerator/particle.dm @@ -44,7 +44,7 @@ if (A) if(ismob(A)) toxmob(A) - if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/))) + if((istype(A,/obj/machinery/the_singularitygen))||(istype(A,/obj/singularity/))||(istype(A, /obj/machinery/particle_smasher))) A:energy += energy //R-UST port else if(istype(A,/obj/machinery/power/fusion_core)) diff --git a/code/modules/power/singularity/particle_accelerator/particle_smasher.dm b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm new file mode 100644 index 0000000000..a9fca3e160 --- /dev/null +++ b/code/modules/power/singularity/particle_accelerator/particle_smasher.dm @@ -0,0 +1,365 @@ +/* + * Contains the particle smasher and its recipes. + */ + +/obj/machinery/particle_smasher + name = "Particle Focus" + desc = "A strange device used to create exotic matter." + icon = 'icons/obj/machines/particle_smasher.dmi' + icon_state = "smasher" + anchored = 0 + density = 1 + use_power = 0 + + var/successful_craft = FALSE // Are we waiting to be emptied? + var/image/material_layer // Holds the image used for the filled overlay. + var/image/material_glow // Holds the image used for the glow overlay. + var/image/reagent_layer // Holds the image used for showing a contained beaker. + var/energy = 0 // How many 'energy' units does this have? Acquired by a Particle Accelerator like a Singularity. + var/max_energy = 600 + var/obj/item/stack/material/target // The material being bombarded. + var/obj/item/weapon/reagent_containers/reagent_container // Holds the beaker. The process will consume ALL reagents inside it. + var/beaker_type = /obj/item/weapon/reagent_containers/glass/beaker + var/list/storage // Holds references to items allowed to be used in the fabrication phase. + var/max_storage = 3 // How many items can be jammed into it? + var/list/recipes // The list containing the Particle Smasher's recipes. + +/obj/machinery/particle_smasher/Initialize() + ..() + storage = list() + update_icon() + prepare_recipes() + +/obj/machinery/particle_smasher/Destroy() + for(var/datum/recipe/particle_smasher/D in recipes) + qdel(D) + recipes.Cut() + ..() + +/obj/machinery/particle_smasher/examine(mob/user) + ..() + if(user in view(1)) + to_chat(user, "\The [src] contains:") + for(var/obj/item/I in contents) + to_chat(user, "\the [I]") + +/obj/machinery/particle_smasher/attackby(obj/item/W as obj, mob/user as mob) + if(W.type == /obj/item/device/analyzer) + to_chat(user, "\The [src] reads an energy level of [energy].") + else if(istype(W, /obj/item/stack/material)) + var/obj/item/stack/material/M = W + if(M.uses_charge) + to_chat(user, "You cannot fill \the [src] with a synthesizer!") + return + target = M.split(1) + target.forceMove(src) + update_icon() + else if(istype(W, beaker_type)) + if(reagent_container) + to_chat(user, "\The [src] already has a container attached.") + return + if(isrobot(user) && istype(W.loc, /obj/item/weapon/gripper)) + var/obj/item/weapon/gripper/G = W.loc + G.drop_item() + else + user.drop_from_inventory(W) + reagent_container = W + reagent_container.forceMove(src) + to_chat(user, "You add \the [reagent_container] to \the [src].") + update_icon() + return + else if(W.is_wrench()) + anchored = !anchored + playsound(src, W.usesound, 75, 1) + if(anchored) + user.visible_message("[user.name] secures [src.name] to the floor.", \ + "You secure the [src.name] to the floor.", \ + "You hear a ratchet.") + else + user.visible_message("[user.name] unsecures [src.name] from the floor.", \ + "You unsecure the [src.name] from the floor.", \ + "You hear a ratchet.") + update_icon() + return + else if(istype(W, /obj/item/weapon/card/id)) + to_chat(user, "Swiping \the [W] on \the [src] doesn't seem to do anything...") + return ..() + else if(((isrobot(user) && istype(W.loc, /obj/item/weapon/gripper)) || (!isrobot(user) && W.canremove)) && storage.len < max_storage) + if(isrobot(user) && istype(W.loc, /obj/item/weapon/gripper)) + var/obj/item/weapon/gripper/G = W.loc + G.drop_item() + else + user.drop_from_inventory(W) + W.forceMove(src) + storage += W + else + return ..() + +/obj/machinery/particle_smasher/update_icon() + cut_overlays() + if(!material_layer) + material_layer = image(icon, "[initial(icon_state)]-material") + if(!material_glow) + material_glow = image(icon, "[initial(icon_state)]-material-glow") + material_glow.plane = PLANE_LIGHTING_ABOVE + if(!reagent_layer) + reagent_layer = image(icon, "[initial(icon_state)]-reagent") + if(anchored) + icon_state = "[initial(icon_state)]-o" + if(target) + material_layer.color = target.material.icon_colour + add_overlay(material_layer) + if(successful_craft) + material_glow.color = target.material.icon_colour + add_overlay(material_glow) + if(reagent_container) + add_overlay(reagent_layer) + else + icon_state = initial(icon_state) + + if(target && energy) + var/power_percent = round((energy / max_energy) * 100) + light_color = target.material.icon_colour + switch(power_percent) + if(0 to 25) + light_range = 1 + if(26 to 50) + light_range = 2 + if(51 to 75) + light_range = 3 + if(76 to INFINITY) + light_range = 4 + set_light(light_range, 2, light_color) + else + set_light(0, 0, "#FFFFFF") + +/obj/machinery/particle_smasher/bullet_act(var/obj/item/projectile/Proj) + if(istype(Proj, /obj/item/projectile/beam)) + if(Proj.damage >= 50) + TryCraft() + return 0 + +/obj/machinery/particle_smasher/process() + if(!src.anchored) // Rapidly loses focus. + if(energy) + radiation_repository.radiate(src, round(((src.energy-150)/50)*5,1)) + energy = max(0, energy - 30) + update_icon() + return + + if(energy) + radiation_repository.radiate(src, round(((src.energy-150)/50)*5,1)) + energy = CLAMP(energy - 5, 0, max_energy) + + return + +/obj/machinery/particle_smasher/proc/prepare_recipes() + if(!recipes) + recipes = list() + for(var/D in subtypesof(/datum/recipe/particle_smasher)) + recipes += new D + else + for(var/datum/recipe/particle_smasher/D in recipes) + qdel(D) + recipes.Cut() + for(var/D in subtypesof(/datum/recipe/particle_smasher)) + recipes += new D + +/obj/machinery/particle_smasher/proc/TryCraft() + + if(!recipes || !recipes.len) + recipes = typesof(/datum/recipe/particle_smasher) + + if(!target) // You are just blasting an empty machine. + visible_message("\The [src] shudders.") + update_icon() + return + + if(successful_craft) + visible_message("\The [src] fizzles.") + if(prob(33)) // Why are you blasting it after it's already done! + radiation_repository.radiate(src, 10 + round(src.energy / 60, 1)) + energy = max(0, energy - 30) + update_icon() + return + + var/list/possible_recipes = list() + var/max_prob = 0 + for(var/datum/recipe/particle_smasher/R in recipes) // Only things for the smasher. Don't get things like the chef's cake recipes. + if(R.probability) // It's actually a recipe you're supposed to be able to make. + if(istype(target, R.required_material)) + if(energy >= R.required_energy_min && energy <= R.required_energy_max) // The machine has enough Vaguely Defined 'Energy'. + var/turf/T = get_turf(src) + var/datum/gas_mixture/environment = T.return_air() + if(environment.temperature >= R.required_atmos_temp_min && environment.temperature <= R.required_atmos_temp_max) // Too hot, or too cold. + if(R.reagents && R.reagents.len) + if(!reagent_container || R.check_reagents(reagent_container.reagents) == -1) // It doesn't have a reagent storage when it needs it, or it's lacking what is needed. + continue + if(R.items && R.items.len) + if(!(storage && storage.len) || R.check_items(src) == -1) // It's empty, or it doesn't contain what is needed. + continue + possible_recipes += R + max_prob += R.probability + + if(possible_recipes.len) + var/local_prob = rand(0, max_prob - 1)%max_prob + var/cumulative = 0 + for(var/datum/recipe/particle_smasher/R in possible_recipes) + cumulative += R.probability + if(local_prob < cumulative) + successful_craft = TRUE + DoCraft(R) + break + update_icon() + +/obj/machinery/particle_smasher/proc/DoCraft(var/datum/recipe/particle_smasher/recipe) + if(!successful_craft || !recipe) + return + + qdel(target) + target = null + + if(reagent_container) + reagent_container.reagents.clear_reagents() + + if(recipe.items && recipe.items.len) + for(var/obj/item/I in storage) + for(var/item_type in recipe.items) + if(istype(I, item_type)) + storage -= I + qdel(I) + break + + var/result = recipe.result + var/obj/item/stack/material/M = new result(src) + target = M + update_icon() + +/obj/machinery/particle_smasher/verb/eject_contents() + set src in view(1) + set category = "Object" + set name = "Eject Particle Focus Contents" + + if(usr.incapacitated()) + return + + DumpContents() + +/obj/machinery/particle_smasher/proc/DumpContents() + target = null + reagent_container = null + successful_craft = FALSE + var/turf/T = get_turf(src) + for(var/obj/item/I in contents) + if(I in storage) + storage -= I + I.forceMove(T) + update_icon() + +/* + * The special recipe datums used for the particle smasher. + */ + +/datum/recipe/particle_smasher + //reagents //Commented out due to inheritance. Still a list, used as ex: // example: = list("pacid" = 5) + //items //Commented out due to inheritance. Still a list, used as ex: // example: = list(/obj/item/weapon/tool/crowbar, /obj/item/weapon/welder) Place /foo/bar before /foo. Do not include fruit. Maximum of 3 items. + + result = /obj/item/stack/material/iron // The sheet this will produce. + var/required_material = /obj/item/stack/material/iron // The required material sheet. + var/required_energy_min = 0 // The minimum energy this recipe can process at. + var/required_energy_max = 600 // The maximum energy this recipe can process at. + var/required_atmos_temp_min = 0 // The minimum ambient atmospheric temperature required, in kelvin. + var/required_atmos_temp_max = 600 // The maximum ambient atmospheric temperature required, in kelvin. + var/probability = 0 // The probability for the recipe to be produced. 0 will make it impossible. + +/datum/recipe/particle_smasher/check_items(var/obj/container as obj) + . = 1 + if (items && items.len) + var/list/checklist = list() + checklist = items.Copy() // You should really trust Copy + if(istype(container, /obj/machinery/particle_smasher)) + var/obj/machinery/particle_smasher/machine = container + for(var/obj/O in machine.storage) + if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/grown)) + continue // Fruit is handled in check_fruit(). + var/found = 0 + for(var/i = 1; i < checklist.len+1; i++) + var/item_type = checklist[i] + if (istype(O,item_type)) + checklist.Cut(i, i+1) + found = 1 + break + if (!found) + . = 0 + if (checklist.len) + . = -1 + return . + +/datum/recipe/particle_smasher/deuterium_tritium + reagents = list("hydrogen" = 15) + + result = /obj/item/stack/material/tritium + required_material = /obj/item/stack/material/deuterium + + required_energy_min = 200 + required_energy_max = 400 + + required_atmos_temp_max = 200 + probability = 30 + +/datum/recipe/particle_smasher/verdantium_morphium + result = /obj/item/stack/material/morphium + required_material = /obj/item/stack/material/verdantium + + required_energy_min = 400 + required_energy_max = 500 + probability = 20 + +/datum/recipe/particle_smasher/plasteel_morphium + items = list(/obj/item/prop/alien/junk) + + result = /obj/item/stack/material/morphium + required_material = /obj/item/stack/material/plasteel + + required_energy_min = 100 + required_energy_max = 300 + probability = 10 + +/datum/recipe/particle_smasher/osmium_lead + reagents = list("tungsten" = 10) + + result = /obj/item/stack/material/lead + required_material = /obj/item/stack/material/osmium + + required_energy_min = 200 + required_energy_max = 400 + + required_atmos_temp_min = 1000 + required_atmos_temp_max = 8000 + probability = 50 + +/datum/recipe/particle_smasher/phoron_valhollide + reagents = list("phoron" = 10, "pacid" = 10) + + result = /obj/item/stack/material/valhollide + required_material = /obj/item/stack/material/phoron + + required_energy_min = 300 + required_energy_max = 500 + + required_atmos_temp_min = 1 + required_atmos_temp_max = 100 + probability = 10 + +/datum/recipe/particle_smasher/valhollide_supermatter + reagents = list("phoron" = 300) + + result = /obj/item/stack/material/supermatter + required_material = /obj/item/stack/material/valhollide + + required_energy_min = 575 + required_energy_max = 600 + + required_atmos_temp_min = 3000 + required_atmos_temp_max = 10000 + probability = 1 \ No newline at end of file diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 2e97d735ba..8628315601 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -144,11 +144,6 @@ charge -= output_used*SMESRATE // reduce the storage (may be recovered in /restore() if excessive) add_avail(output_used) // add output to powernet (smes side) - - if(output_used < 0.0001) // either from no charge or set to 0 - outputting(0) - investigate_log("lost power and turned off","singulo") - log_game("SMES([x],[y],[z]) Power depleted.") else if(output_attempt && output_level > 0) outputting = 1 else @@ -328,7 +323,7 @@ data["outputting"] = 0 // smes is not outputting // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index ebf59a2d40..e436497fc5 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -333,7 +333,7 @@ data["ambient_pressure"] = round(env.return_pressure()) data["detonating"] = grav_pulling - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "supermatter_crystal.tmpl", "Supermatter Crystal", 500, 300) ui.set_initial_data(data) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 8c404e05c0..739699ae31 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -247,7 +247,7 @@ closest_atom = A closest_dist = dist - else if(closest_mob) + else if(closest_machine) continue else if(istype(A, /obj/structure/blob)) diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 3b3de0b436..29a1db0e16 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -363,7 +363,7 @@ data["temp"] = compressor.gas_contained.temperature // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) // the ui does not exist, so we'll create a new() one // for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm diff --git a/code/modules/random_map/noise/ore.dm b/code/modules/random_map/noise/ore.dm index 697a0b416d..99dc761ee6 100644 --- a/code/modules/random_map/noise/ore.dm +++ b/code/modules/random_map/noise/ore.dm @@ -57,25 +57,34 @@ T.resources["gold"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources["silver"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources["marble"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) T.resources["diamond"] = 0 T.resources["phoron"] = 0 T.resources["osmium"] = 0 T.resources["hydrogen"] = 0 + T.resources["verdantium"] = 0 + T.resources["lead"] = 0 else if(current_cell < deep_val) // Rare metals. T.resources["gold"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["silver"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["uranium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["phoron"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) T.resources["osmium"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources["verdantium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources["lead"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) T.resources["hydrogen"] = 0 T.resources["diamond"] = 0 T.resources["hematite"] = 0 + T.resources["marble"] = 0 else // Deep metals. T.resources["uranium"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) T.resources["diamond"] = rand(RESOURCE_LOW_MIN, RESOURCE_LOW_MAX) + T.resources["verdantium"] = rand(RESOURCE_LOW_MIN, RESOURCE_MID_MAX) T.resources["phoron"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) T.resources["osmium"] = rand(RESOURCE_HIGH_MIN, RESOURCE_HIGH_MAX) T.resources["hydrogen"] = rand(RESOURCE_MID_MIN, RESOURCE_MID_MAX) + T.resources["marble"] = rand(RESOURCE_MID_MIN, RESOURCE_HIGH_MAX) + T.resources["lead"] = rand(RESOURCE_LOW_MIN, RESOURCE_HIGH_MAX) T.resources["hematite"] = 0 T.resources["gold"] = 0 T.resources["silver"] = 0 diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 9ec1a83e05..837d5e8657 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -12,27 +12,24 @@ my_atom = A //I dislike having these here but map-objects are initialised before world/New() is called. >_> - if(!chemical_reagents_list) + if(!SSchemistry.chemical_reagents) //Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id var/paths = typesof(/datum/reagent) - /datum/reagent - chemical_reagents_list = list() + SSchemistry.chemical_reagents = list() for(var/path in paths) var/datum/reagent/D = new path() if(!D.name) continue - chemical_reagents_list[D.id] = D + SSchemistry.chemical_reagents[D.id] = D /datum/reagents/Destroy() - . = ..() - if(chemistryProcess) - chemistryProcess.active_holders -= src - + STOP_PROCESSING(SSchemistry, src) for(var/datum/reagent/R in reagent_list) qdel(R) - reagent_list.Cut() reagent_list = null if(my_atom && my_atom.reagents == src) my_atom.reagents = null + return ..() /* Internal procs */ @@ -80,41 +77,31 @@ return /datum/reagents/proc/handle_reactions() - if(chemistryProcess) - chemistryProcess.mark_for_update(src) - -//returns 1 if the holder should continue reactiong, 0 otherwise. -/datum/reagents/proc/process_reactions() - if(QDELETED(my_atom)) //No container, no reaction. - return 0 - if(my_atom.flags & NOREACT) // No reactions here - return 0 - - var/reaction_occured - var/list/effect_reactions = list() + if(QDELETED(my_atom)) + return FALSE + if(my_atom.flags & NOREACT) + return FALSE + var/reaction_occurred var/list/eligible_reactions = list() - for(var/i in 1 to PROCESS_REACTION_ITER) - reaction_occured = 0 + var/list/effect_reactions = list() + do + reaction_occurred = FALSE + for(var/i in reagent_list) + var/datum/reagent/R = i + if(SSchemistry.chemical_reactions_by_reagent[R.id]) //VOREStation Edit: unruntiming chems + eligible_reactions |= SSchemistry.chemical_reactions_by_reagent[R.id] //VOREStation Edit: unruntiming chems - //need to rebuild this to account for chain reactions - for(var/datum/reagent/R in reagent_list) - eligible_reactions |= chemical_reactions_list[R.id] - - for(var/datum/chemical_reaction/C in eligible_reactions) + for(var/i in eligible_reactions) + var/datum/chemical_reaction/C = i if(C.can_happen(src) && C.process(src)) effect_reactions |= C - reaction_occured = 1 - - eligible_reactions.Cut() - - if(!reaction_occured) - break - - for(var/datum/chemical_reaction/C in effect_reactions) + reaction_occurred = TRUE + eligible_reactions.len = 0 + while(reaction_occurred) + for(var/i in effect_reactions) + var/datum/chemical_reaction/C = i C.post_reaction(src) - update_total() - return reaction_occured /* Holder-to-chemical */ @@ -136,7 +123,7 @@ if(my_atom) my_atom.on_reagent_change() return 1 - var/datum/reagent/D = chemical_reagents_list[id] + var/datum/reagent/D = SSchemistry.chemical_reagents[id] if(D) var/datum/reagent/R = new D.type() reagent_list += R diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index 825fd95fd4..ee77c5e79e 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -134,7 +134,7 @@ data["bottleSpritesAmount"] = list(1, 2, 3, 4) //how many bottle sprites there are. Sprites are taken from chemical.dmi and can be found in nano/images/pill.png - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if (!ui) ui = new(user, src, ui_key, "chem_master.tmpl", src.name, 575, 400) ui.set_initial_data(data) @@ -282,7 +282,7 @@ else if(href_list["bottle_sprite"]) bottlesprite = href_list["bottle_sprite"] - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/chem_master/attack_ai(mob/user as mob) return src.attack_hand(user) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index b2e7a55a69..04f2066ff1 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -1,12 +1,3 @@ -//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id -/proc/initialize_chemical_reagents() - var/paths = typesof(/datum/reagent) - /datum/reagent - chemical_reagents_list = list() - for(var/path in paths) - var/datum/reagent/D = new path() - if(!D.name) - continue - chemical_reagents_list[D.id] = D diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 1ec5e6e334..6595343169 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -879,3 +879,47 @@ datum/reagent/talum_quem/affect_blood(var/mob/living/carbon/M, var/alien, var/re randmuti(M) M << "You feel odd!" M.apply_effect(6 * removed, IRRADIATE, 0) + +/* + * Hostile nanomachines. + * Unscannable, and commonly all look the same. + */ + +/datum/reagent/shredding_nanites + name = "Restorative Nanites" + id = "shredding_nanites" + description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be malfunctioning." + taste_description = "metal" + reagent_state = SOLID + color = "#555555" + metabolism = REM * 4 // Nanomachines. Fast. + +/datum/reagent/shredding_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + M.adjustBruteLoss(4 * removed) + M.adjustOxyLoss(4 * removed) + +/datum/reagent/irradiated_nanites + name = "Restorative Nanites" + id = "irradiated_nanites" + description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be malfunctioning." + taste_description = "metal" + reagent_state = SOLID + color = "#555555" + metabolism = REM * 4 + +/datum/reagent/irradiated_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + radiation_repository.radiate(get_turf(M), 20) // Irradiate people around you. + M.radiation = max(M.radiation + 5 * removed, 0) // Irradiate you. Because it's inside you. + +/datum/reagent/neurophage_nanites + name = "Restorative Nanites" + id = "neurophage_nanites" + description = "Miniature medical robots that swiftly restore bodily damage. These ones seem to be completely hostile." + taste_description = "metal" + reagent_state = SOLID + color = "#555555" + metabolism = REM * 4 + +/datum/reagent/neurophage_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) + M.adjustBrainLoss(2 * removed) // Their job is to give you a bad time. + M.adjustBruteLoss(2 * removed) diff --git a/code/modules/reagents/Chemistry-Reagents_vr.dm b/code/modules/reagents/Chemistry-Reagents_vr.dm index e49744df38..a9e238dcbb 100644 --- a/code/modules/reagents/Chemistry-Reagents_vr.dm +++ b/code/modules/reagents/Chemistry-Reagents_vr.dm @@ -9,16 +9,25 @@ if(ishuman(M)) var/mob/living/carbon/human/H = M if(H.species.name != "Promethean") - M << "Your flesh rapidly mutates!" + to_chat(M, "Your flesh rapidly mutates!") + + var/list/backup_implants = list() + for(var/obj/item/organ/I in H.organs) + for(var/obj/item/weapon/implant/backup/BI in I.contents) + backup_implants += BI + if(backup_implants.len) + for(var/obj/item/weapon/implant/backup/BI in backup_implants) + BI.forceMove(src) + H.set_species("Promethean") - H.verbs += /mob/living/carbon/human/proc/shapeshifter_select_shape - H.verbs += /mob/living/carbon/human/proc/shapeshifter_select_colour - H.verbs += /mob/living/carbon/human/proc/shapeshifter_select_hair - H.verbs += /mob/living/carbon/human/proc/shapeshifter_select_gender - H.verbs += /mob/living/carbon/human/proc/regenerate - H.verbs += /mob/living/proc/set_size H.shapeshifter_set_colour("#05FF9B") //They can still change their color. + if(backup_implants.len) + var/obj/item/organ/external/torso = H.get_organ(BP_TORSO) + for(var/obj/item/weapon/implant/backup/BI in backup_implants) + BI.forceMove(torso) + torso.implants += BI + /datum/chemical_reaction/slime/sapphire_mutation name = "Slime Mutation Toxins" id = "slime_mutation_tox" diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 3c3bf869d7..c3a973402a 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -1,22 +1,3 @@ - -//Chemical Reactions - Initialises all /datum/chemical_reaction into a list -// It is filtered into multiple lists within a list. -// For example: -// chemical_reaction_list["phoron"] is a list of all reactions relating to phoron -// Note that entries in the list are NOT duplicated. So if a reaction pertains to -// more than one chemical it will still only appear in only one of the sublists. -/proc/initialize_chemical_reactions() - var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction - chemical_reactions_list = list() - - for(var/path in paths) - var/datum/chemical_reaction/D = new path() - if(D.required_reagents && D.required_reagents.len) - var/reagent_id = D.required_reagents[1] - if(!chemical_reactions_list[reagent_id]) - chemical_reactions_list[reagent_id] = list() - chemical_reactions_list[reagent_id] += D - //helper that ensures the reaction rate holds after iterating //Ex. REACTION_RATE(0.3) means that 30% of the reagents will react each chemistry tick (~2 seconds by default). #define REACTION_RATE(rate) (1.0 - (1.0-rate)**(1.0/PROCESS_REACTION_ITER)) diff --git a/code/modules/reagents/dispenser/cartridge.dm b/code/modules/reagents/dispenser/cartridge.dm index f73f6e4a71..70142fabd8 100644 --- a/code/modules/reagents/dispenser/cartridge.dm +++ b/code/modules/reagents/dispenser/cartridge.dm @@ -18,7 +18,7 @@ . = ..() if(spawn_reagent) reagents.add_reagent(spawn_reagent, volume) - var/datum/reagent/R = chemical_reagents_list[spawn_reagent] + var/datum/reagent/R = SSchemistry.chemical_reagents[spawn_reagent] setLabel(R.name) /obj/item/weapon/reagent_containers/chem_disp_cartridge/examine(mob/user) diff --git a/code/modules/reagents/dispenser/cartridge_spawn.dm b/code/modules/reagents/dispenser/cartridge_spawn.dm index 730e191891..ba9b727047 100644 --- a/code/modules/reagents/dispenser/cartridge_spawn.dm +++ b/code/modules/reagents/dispenser/cartridge_spawn.dm @@ -1,4 +1,4 @@ -/client/proc/spawn_chemdisp_cartridge(size in list("small", "medium", "large"), reagent in chemical_reagents_list) +/client/proc/spawn_chemdisp_cartridge(size in list("small", "medium", "large"), reagent in SSchemistry.chemical_reagents) set name = "Spawn Chemical Dispenser Cartridge" set category = "Admin" @@ -8,6 +8,6 @@ if("medium") C = new /obj/item/weapon/reagent_containers/chem_disp_cartridge/medium(usr.loc) if("large") C = new /obj/item/weapon/reagent_containers/chem_disp_cartridge(usr.loc) C.reagents.add_reagent(reagent, C.volume) - var/datum/reagent/R = chemical_reagents_list[reagent] + var/datum/reagent/R = SSchemistry.chemical_reagents[reagent] C.setLabel(R.name) log_admin("[key_name(usr)] spawned a [size] reagent container containing [reagent] at ([usr.x],[usr.y],[usr.z])") diff --git a/code/modules/reagents/dispenser/dispenser2.dm b/code/modules/reagents/dispenser/dispenser2.dm index a04db7d53b..38c6cf39da 100644 --- a/code/modules/reagents/dispenser/dispenser2.dm +++ b/code/modules/reagents/dispenser/dispenser2.dm @@ -55,12 +55,12 @@ C.loc = src cartridges[C.label] = C cartridges = sortAssoc(cartridges) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/chemical_dispenser/proc/remove_cartridge(label) . = cartridges[label] cartridges -= label - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/chemical_dispenser/attackby(obj/item/weapon/W, mob/user) if(W.is_wrench()) @@ -106,7 +106,7 @@ user.drop_from_inventory(RC) RC.loc = src to_chat(user, "You set \the [RC] on \the [src].") - GLOB.nanomanager.update_uis(src) // update all UIs attached to src + SSnanoui.update_uis(src) // update all UIs attached to src else return ..() @@ -140,7 +140,7 @@ data["chemicals"] = chemicals // update the ui if it exists, returns null if no ui is passed/found - ui = GLOB.nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open) + ui = SSnanoui.try_update_ui(user, src, ui_key, ui, data, force_open) if(!ui) ui = new(user, src, ui_key, "chem_disp.tmpl", ui_title, 390, 680) ui.set_initial_data(data) diff --git a/code/modules/reagents/dispenser/dispenser2_energy.dm b/code/modules/reagents/dispenser/dispenser2_energy.dm index f540811c11..c889b2fe9d 100644 --- a/code/modules/reagents/dispenser/dispenser2_energy.dm +++ b/code/modules/reagents/dispenser/dispenser2_energy.dm @@ -13,7 +13,7 @@ process_tick = 15 . = 0 for(var/id in dispense_reagents) - var/datum/reagent/R = chemical_reagents_list[id] + var/datum/reagent/R = SSchemistry.chemical_reagents[id] if(!R) crash_with("[src] at [x],[y],[z] failed to find reagent '[id]'!") dispense_reagents -= id @@ -25,7 +25,7 @@ C.reagents.add_reagent(id, to_restore) . = 1 if(.) - GLOB.nanomanager.update_uis(src) + SSnanoui.update_uis(src) /obj/machinery/chemical_dispenser dispense_reagents = list( diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index f2cfbd87b5..8781caf10e 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -39,7 +39,7 @@ for(var/T in reagent_ids) reagent_volumes[T] = volume - var/datum/reagent/R = chemical_reagents_list[T] + var/datum/reagent/R = SSchemistry.chemical_reagents[T] reagent_names += R.name START_PROCESSING(SSobj, src) @@ -115,14 +115,14 @@ if(t) playsound(loc, 'sound/effects/pop.ogg', 50, 0) mode = t - var/datum/reagent/R = chemical_reagents_list[reagent_ids[mode]] + var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]] usr << "Synthesizer is now producing '[R.name]'." /obj/item/weapon/reagent_containers/borghypo/examine(mob/user) if(!..(user, 2)) return - var/datum/reagent/R = chemical_reagents_list[reagent_ids[mode]] + var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]] user << "It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left." diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 428484ea66..4cc755d158 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -1,6 +1,6 @@ #define OFF 0 #define FORWARDS 1 -#define BACKWARDS 2 +#define BACKWARDS -1 //conveyor2 is pretty much like the original, except it supports corners, but not diverters. //note that corner pieces transfer stuff clockwise when running forward, and anti-clockwise backwards. @@ -32,12 +32,7 @@ if(newdir) set_dir(newdir) - if(dir & (dir-1)) // Diagonal. Forwards is *away* from dir, curving to the right. - forwards = turn(dir, 135) - backwards = turn(dir, 45) - else - forwards = dir - backwards = turn(dir, 180) + update_dir() if(on) operating = FORWARDS @@ -60,6 +55,18 @@ operating = OFF update() +/obj/machinery/conveyor/set_dir() + .=..() + update_dir() + +/obj/machinery/conveyor/proc/update_dir() + if(!(dir in cardinal)) // Diagonal. Forwards is *away* from dir, curving to the right. + forwards = turn(dir, 135) + backwards = turn(dir, 45) + else + forwards = dir + backwards = turn(dir, 180) + /obj/machinery/conveyor/proc/update() if(stat & BROKEN) icon_state = "conveyor-broken" diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 70ca9692f3..9d3eab7c43 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -16,7 +16,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). var/mat_efficiency = 1 var/speed = 1 - materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0) + materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, MAT_PLASTEEL = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, MAT_LEAD = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) + + hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER) use_power = 1 idle_power_usage = 30 @@ -68,7 +70,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating - mat_efficiency = 1 - (T - 1) / 4 + mat_efficiency = max(1 - (T - 1) / 4, 0.2) speed = T /obj/machinery/r_n_d/circuit_imprinter/update_icon() diff --git a/code/modules/research/designs/illegal.dm b/code/modules/research/designs/illegal.dm index 1542e929b6..c195b5764b 100644 --- a/code/modules/research/designs/illegal.dm +++ b/code/modules/research/designs/illegal.dm @@ -16,4 +16,11 @@ req_tech = list(TECH_ILLEGAL = 2) materials = list(DEFAULT_WALL_MATERIAL = 500) build_path = /obj/item/weapon/storage/box/syndie_kit/chameleon - sort_string = "VASBA" \ No newline at end of file + sort_string = "VASBA" + +/datum/design/item/weapon/esword + id = "chargesword" + req_tech = list(TECH_COMBAT = 6, TECH_MAGNET = 4, TECH_ENGINEERING = 5, TECH_ILLEGAL = 4, TECH_ANOMALY = 1) + materials = list(MAT_PLASTEEL = 3500, "glass" = 1000, MAT_LEAD = 2250, MAT_METALHYDROGEN = 500) + build_path = /obj/item/weapon/melee/energy/sword/charge + sort_string = "VASCA" diff --git a/code/modules/research/designs/precursor.dm b/code/modules/research/designs/precursor.dm new file mode 100644 index 0000000000..88575e5667 --- /dev/null +++ b/code/modules/research/designs/precursor.dm @@ -0,0 +1,70 @@ +/* + * Contains Precursor and Anomalous designs for the Protolathe. + */ + +/datum/design/item/precursor/AssembleDesignName() + ..() + name = "Alien prototype ([item_name])" + +/datum/design/item/precursor/AssembleDesignDesc() + if(!desc) + if(build_path) + var/obj/item/I = build_path + desc = initial(I.desc) + ..() + +/datum/design/item/precursor/crowbar + name = "Hybrid Crowbar" + desc = "A tool utilizing cutting edge modern technology, and ancient component designs." + id = "hybridcrowbar" + req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_GOLD = 250, MAT_URANIUM = 2500) + build_path = /obj/item/weapon/tool/crowbar/hybrid + sort_string = "PATAC" + +/datum/design/item/precursor/wrench + name = "Hybrid Wrench" + desc = "A tool utilizing cutting edge modern technology, and ancient component designs." + id = "hybridwrench" + req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_PRECURSOR = 1) + materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_SILVER = 300, MAT_URANIUM = 2000) + build_path = /obj/item/weapon/tool/wrench/hybrid + sort_string = "PATAW" + +/datum/design/item/precursor/screwdriver + name = "Hybrid Screwdriver" + desc = "A tool utilizing cutting edge modern technology, and ancient component designs." + id = "hybridscrewdriver" + req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 3, TECH_PRECURSOR = 1) + materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_PLASTIC = 8000, MAT_DIAMOND = 2000) + build_path = /obj/item/weapon/tool/screwdriver/hybrid + sort_string = "PATAS" + +/datum/design/item/precursor/wirecutters + name = "Hybrid Wirecutters" + desc = "A tool utilizing cutting edge modern technology, and ancient component designs." + id = "hybridwirecutters" + req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 5, TECH_PHORON = 2, TECH_PRECURSOR = 1) + materials = list(MAT_PLASTEEL = 2000, MAT_VERDANTIUM = 3000, MAT_PLASTIC = 8000, MAT_PHORON = 2750, MAT_DIAMOND = 2000) + build_path = /obj/item/weapon/tool/wirecutters/hybrid + sort_string = "PATBW" + +/datum/design/item/precursor/welder + name = "Hybrid Welding Tool" + desc = "A tool utilizing cutting edge modern technology, and ancient component designs." + id = "hybridwelder" + req_tech = list(TECH_ENGINEERING = 6, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PHORON = 3, TECH_MAGNET = 5, TECH_PRECURSOR = 1) + materials = list(MAT_DURASTEEL = 2000, MAT_MORPHIUM = 3000, MAT_METALHYDROGEN = 4750, MAT_URANIUM = 6000) + build_path = /obj/item/weapon/weldingtool/experimental/hybrid + sort_string = "PATCW" + +/datum/design/item/anomaly/AssembleDesignName() + ..() + name = "Anomalous prototype ([item_name])" + +/datum/design/item/anomaly/AssembleDesignDesc() + if(!desc) + if(build_path) + var/obj/item/I = build_path + desc = initial(I.desc) + ..() \ No newline at end of file diff --git a/code/modules/research/designs/stock_parts.dm b/code/modules/research/designs/stock_parts.dm index fb629e7ad7..60a0abb63e 100644 --- a/code/modules/research/designs/stock_parts.dm +++ b/code/modules/research/designs/stock_parts.dm @@ -34,6 +34,20 @@ build_path = /obj/item/weapon/stock_parts/capacitor/super sort_string = "CAAAC" +/datum/design/item/stock_part/hyper_capacitor + id = "hyper_capacitor" + req_tech = list(TECH_POWER = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 1, TECH_ARCANE = 1) + materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_GLASS = 100, MAT_VERDANTIUM = 30, MAT_DURASTEEL = 25) + build_path = /obj/item/weapon/stock_parts/capacitor/hyper + sort_string = "CAAAD" + +/datum/design/item/stock_part/omni_capacitor + id = "omni_capacitor" + req_tech = list(TECH_POWER = 7, TECH_MATERIAL = 6, TECH_BLUESPACE = 3, TECH_PRECURSOR = 1) + materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_DIAMOND = 1000, MAT_GLASS = 1000, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/capacitor/omni + sort_string = "CAAAE" + /datum/design/item/stock_part/micro_mani id = "micro_mani" req_tech = list(TECH_MATERIAL = 1, TECH_DATA = 1) @@ -55,6 +69,20 @@ build_path = /obj/item/weapon/stock_parts/manipulator/pico sort_string = "CAABC" +/datum/design/item/stock_part/hyper_mani + id = "hyper_mani" + req_tech = list(TECH_MATERIAL = 6, TECH_DATA = 3, TECH_ARCANE = 2) + materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_VERDANTIUM = 50, MAT_DURASTEEL = 50) + build_path = /obj/item/weapon/stock_parts/manipulator/hyper + sort_string = "CAABD" + +/datum/design/item/stock_part/omni_mani + id = "omni_mani" + req_tech = list(TECH_MATERIAL = 7, TECH_DATA = 4, TECH_PRECURSOR = 2) + materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_PLASTEEL = 500, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/manipulator/omni + sort_string = "CAABE" + /datum/design/item/stock_part/basic_matter_bin id = "basic_matter_bin" req_tech = list(TECH_MATERIAL = 1) @@ -76,6 +104,20 @@ build_path = /obj/item/weapon/stock_parts/matter_bin/super sort_string = "CAACC" +/datum/design/item/stock_part/hyper_matter_bin + id = "hyper_matter_bin" + req_tech = list(TECH_MATERIAL = 6, TECH_ARCANE = 2) + materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_VERDANTIUM = 60, MAT_DURASTEEL = 75) + build_path = /obj/item/weapon/stock_parts/matter_bin/hyper + sort_string = "CAACD" + +/datum/design/item/stock_part/omni_matter_bin + id = "omni_matter_bin" + req_tech = list(TECH_MATERIAL = 7, TECH_PRECURSOR = 2) + materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_PLASTEEL = 100, MAT_MORPHIUM = 100, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/matter_bin/omni + sort_string = "CAACE" + /datum/design/item/stock_part/basic_micro_laser id = "basic_micro_laser" req_tech = list(TECH_MAGNET = 1) @@ -97,6 +139,20 @@ build_path = /obj/item/weapon/stock_parts/micro_laser/ultra sort_string = "CAADC" +/datum/design/item/stock_part/hyper_micro_laser + id = "hyper_micro_laser" + req_tech = list(TECH_MAGNET = 6, TECH_MATERIAL = 6, TECH_ARCANE = 2) + materials = list(DEFAULT_WALL_MATERIAL = 200, MAT_GLASS = 20, MAT_URANIUM = 30, MAT_VERDANTIUM = 50, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/micro_laser/hyper + sort_string = "CAADD" + +/datum/design/item/stock_part/omni_micro_laser + id = "omni_micro_laser" + req_tech = list(TECH_MAGNET = 7, TECH_MATERIAL = 7, TECH_PRECURSOR = 2) + materials = list(DEFAULT_WALL_MATERIAL = 2000, MAT_GLASS = 500, MAT_URANIUM = 2000, MAT_MORPHIUM = 50, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/micro_laser/omni + sort_string = "CAADE" + /datum/design/item/stock_part/basic_sensor id = "basic_sensor" req_tech = list(TECH_MAGNET = 1) @@ -118,6 +174,20 @@ build_path = /obj/item/weapon/stock_parts/scanning_module/phasic sort_string = "CAAEC" +/datum/design/item/stock_part/hyper_sensor + id = "hyper_sensor" + req_tech = list(TECH_MAGNET = 6, TECH_MATERIAL = 4, TECH_ARCANE = 1) + materials = list(DEFAULT_WALL_MATERIAL = 50, MAT_GLASS = 20, MAT_SILVER = 50, MAT_VERDANTIUM = 40, MAT_DURASTEEL = 50) + build_path = /obj/item/weapon/stock_parts/scanning_module/hyper + sort_string = "CAAED" + +/datum/design/item/stock_part/omni_sensor + id = "omni_sensor" + req_tech = list(TECH_MAGNET = 7, TECH_MATERIAL = 5, TECH_PRECURSOR = 1) + materials = list(DEFAULT_WALL_MATERIAL = 1000, MAT_PLASTEEL = 500, MAT_GLASS = 750, MAT_SILVER = 500, MAT_MORPHIUM = 60, MAT_DURASTEEL = 100) + build_path = /obj/item/weapon/stock_parts/scanning_module/omni + sort_string = "CAAEE" + /datum/design/item/stock_part/subspace_ansible id = "s-ansible" req_tech = list(TECH_DATA = 3, TECH_MAGNET = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2) diff --git a/code/modules/research/designs_vr.dm b/code/modules/research/designs_vr.dm index 94fbb9ce09..518c77a504 100644 --- a/code/modules/research/designs_vr.dm +++ b/code/modules/research/designs_vr.dm @@ -316,3 +316,13 @@ id = "rigmod_orescanner" build_path = /obj/item/rig_module/device/orescanner sort_string = "HCAAI" + +//Prosfab stuff for borgs and such + +/datum/design/item/robot_upgrade/sizeshift + name = "Size Alteration Module" + desc = "Used to allow robot to freely alter their size." + id = "borg_sizeshift_module" + req_tech = list(TECH_BLUESPACE = 3, TECH_MATERIAL = 3, TECH_POWER = 2) + materials = list(DEFAULT_WALL_MATERIAL = 4000, "glass" = 4000) + build_path = /obj/item/borg/upgrade/sizeshift \ No newline at end of file diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index bea555b70c..b8b4130dfe 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -15,7 +15,9 @@ var/mat_efficiency = 1 var/speed = 1 - materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0) + materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, MAT_PLASTEEL = 0, "plastic" = 0, "gold" = 0, "silver" = 0, "osmium" = 0, MAT_LEAD = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0) + + hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER) /obj/machinery/r_n_d/protolathe/Initialize() . = ..() @@ -71,7 +73,7 @@ T = 0 for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) T += M.rating - mat_efficiency = 1 - (T - 2) / 8 + mat_efficiency = max(1 - (T - 2) / 8, 0.2) speed = T / 2 /obj/machinery/r_n_d/protolathe/dismantle() @@ -207,28 +209,17 @@ /obj/machinery/r_n_d/protolathe/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything var/recursive = amount == -1 ? 1 : 0 material = lowertext(material) - var/mattype - switch(material) - if(DEFAULT_WALL_MATERIAL) - mattype = /obj/item/stack/material/steel - if("glass") - mattype = /obj/item/stack/material/glass - if("plastic") - mattype = /obj/item/stack/material/plastic - if("gold") - mattype = /obj/item/stack/material/gold - if("silver") - mattype = /obj/item/stack/material/silver - if("osmium") - mattype = /obj/item/stack/material/osmium - if("diamond") - mattype = /obj/item/stack/material/diamond - if("phoron") - mattype = /obj/item/stack/material/phoron - if("uranium") - mattype = /obj/item/stack/material/uranium - else - return + var/obj/item/stack/material/mattype + var/material/MAT = get_material_by_name(material) + + if(!MAT) + return + + mattype = MAT.stack_type + + if(!mattype) + return + var/obj/item/stack/material/S = new mattype(loc) if(amount <= 0) amount = S.max_amount diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 38cba96c84..5346f50e6e 100755 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -660,6 +660,13 @@ won't update every console in existence) but it's more of a hassle to do. Also, dat += "