diff --git a/code/__defines/_fruits.dm b/code/__defines/_fruits.dm index a217af7cf3..827d64b471 100644 --- a/code/__defines/_fruits.dm +++ b/code/__defines/_fruits.dm @@ -122,7 +122,7 @@ GLOBAL_LIST_INIT(acceptable_fruit_types, list( PLANT_PUMPKIN, PLANT_RICE, PLANT_ROSE, - PLANT_ROSE, + PLANT_RHUBARB, PLANT_SOYBEAN, PLANT_SPINEAPPLE, PLANT_SUGARCANE, diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index c5f860ea7a..21c26fc9c6 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -108,6 +108,7 @@ #define AREA_ALLOW_LARGE_SIZE 0x400 // If mob size is limited in the area. #define AREA_BLOCK_SUIT_SENSORS 0x800 // If suit sensors are blocked in the area. #define AREA_BLOCK_TRACKING 0x1000 // If camera tracking is blocked in the area. +#define AREA_BLOCK_GHOST_SIGHT 0x2000 // If an area blocks sight for ghosts // OnTopic return values #define TOPIC_NOACTION 0 diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index 80abfae652..a687776f88 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -62,6 +62,7 @@ var/global/list/exclude_jobs = list(/datum/job/ai,/datum/job/cyborg) var/list/datum/visualnet/visual_nets = list() var/datum/visualnet/camera/cameranet = new() var/datum/visualnet/cult/cultnet = new() +var/datum/visualnet/ghost/ghostnet = new() // Runes var/global/list/rune_list = new() diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 2d4ca00ab4..962ef54d08 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -213,7 +213,7 @@ var/bloodData[0] if(H.vessel) - var/blood_volume = round(H.vessel.get_reagent_amount("blood")) + var/blood_volume = round(H.vessel.get_reagent_amount(REAGENT_ID_BLOOD)) var/blood_max = H.species.blood_volume bloodData["volume"] = blood_volume bloodData["percent"] = round(((blood_volume / blood_max)*100)) @@ -416,7 +416,7 @@ dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.
" if(occupant.vessel) - var/blood_volume = round(occupant.vessel.get_reagent_amount("blood")) + var/blood_volume = round(occupant.vessel.get_reagent_amount(REAGENT_ID_BLOOD)) var/blood_max = occupant.species.blood_volume var/blood_percent = blood_volume / blood_max blood_percent *= 100 diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index de613980d0..04831c5bf3 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -565,7 +565,9 @@ var/list/admin_verbs_event_manager = list( /client/proc/toggle_spawning_with_recolour, /client/proc/start_vote, /client/proc/AdminCreateVirus, - /client/proc/ReleaseVirus + /client/proc/ReleaseVirus, + /client/proc/add_hidden_area, + /client/proc/remove_hidden_area ) /client/proc/add_admin_verbs() diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 6b4bad1684..6e860e317c 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -550,3 +550,35 @@ B.icon_state = "bottle-1" B.reagents.add_reagent(R.id, 60) B.name = "[B.name] of [R.name]" + +/client/proc/add_hidden_area() + set name = "Add Ghostsight Block Area" + set category = "Admin.Game" + + var/list/blocked_areas = list() + for(var/area/A in world) + if(!A.flag_check(AREA_BLOCK_GHOST_SIGHT)) + blocked_areas[A.name] = A + blocked_areas = sortTim(blocked_areas, GLOBAL_PROC_REF(cmp_text_asc)) + var/selected_area = tgui_input_list(usr, "Pick an area to hide from ghost", "Select Area to hide", blocked_areas) + var/area/A = blocked_areas[selected_area] + if(!A) + return + A.flags |= AREA_BLOCK_GHOST_SIGHT + ghostnet.addArea(A) + +/client/proc/remove_hidden_area() + set name = "Remove Ghostsight Block Area" + set category = "Admin.Game" + + var/list/blocked_areas = list() + for(var/area/A in world) + if(A.flag_check(AREA_BLOCK_GHOST_SIGHT)) + blocked_areas[A.name] = A + blocked_areas = sortTim(blocked_areas, GLOBAL_PROC_REF(cmp_text_asc)) + var/selected_area = tgui_input_list(usr, "Pick a from ghost hidden area to let them see it again", "Select Hidden Area", blocked_areas) + var/area/A = blocked_areas[selected_area] + if(!A) + return + A.flags &= ~(AREA_BLOCK_GHOST_SIGHT) + ghostnet.removeArea(A) diff --git a/code/modules/admin/player_effects.dm b/code/modules/admin/player_effects.dm index ce23bbd152..5adc036044 100644 --- a/code/modules/admin/player_effects.dm +++ b/code/modules/admin/player_effects.dm @@ -1,7 +1,7 @@ /client/proc/player_effects(var/mob/target in mob_list) set name = "Player Effects" set desc = "Modify a player character with various 'special treatments' from a list." - set category = "Fun" + set category = "Fun.Event Kit" if(!check_rights(R_FUN)) return diff --git a/code/modules/env_message/env_message.dm b/code/modules/env_message/env_message.dm index 69e1364b7b..2ddc3c0afb 100644 --- a/code/modules/env_message/env_message.dm +++ b/code/modules/env_message/env_message.dm @@ -124,7 +124,7 @@ var/global/list/env_messages = list() /client/proc/create_gm_message() set name = "Map Message - Create" set desc = "Create an ooc message in the environment for other players to see." - set category = "EventKit" + set category = "Fun.Event Kit" if(!check_rights(R_FUN)) return @@ -154,7 +154,7 @@ var/global/list/env_messages = list() /client/proc/remove_gm_message() set name = "Map Message - Remove" set desc = "Remove any env/map message." - set category = "EventKit" + set category = "Fun.Event Kit" if(!istype(src) || !src.ckey) return diff --git a/code/modules/eventkit/generic_objects/generic_item.dm b/code/modules/eventkit/generic_objects/generic_item.dm index a3f7e84ec0..fd1b7d9e20 100644 --- a/code/modules/eventkit/generic_objects/generic_item.dm +++ b/code/modules/eventkit/generic_objects/generic_item.dm @@ -90,7 +90,7 @@ return ..() /client/proc/generic_item() - set category = "EventKit" + set category = "Fun.Event Kit" set name = "Spawn Generic Item" set desc = "Spawn a customisable item with a range of different options." diff --git a/code/modules/eventkit/generic_objects/generic_structure.dm b/code/modules/eventkit/generic_objects/generic_structure.dm index 7461079067..83acb8ada0 100644 --- a/code/modules/eventkit/generic_objects/generic_structure.dm +++ b/code/modules/eventkit/generic_objects/generic_structure.dm @@ -108,7 +108,7 @@ anchored = !anchored /client/proc/generic_structure() - set category = "EventKit" + set category = "Fun.Event Kit" set name = "Spawn Generic Structure" set desc = "Spawn a customisable structure with a range of different options." diff --git a/code/modules/food/food/cans.dm b/code/modules/food/food/cans.dm index 3220666e32..c6799bb3a5 100644 --- a/code/modules/food/food/cans.dm +++ b/code/modules/food/food/cans.dm @@ -62,7 +62,7 @@ /obj/item/reagent_containers/food/drinks/cans/thirteenloko/Initialize() . = ..() - reagents.add_reagent("thirteenloko", 30) + reagents.add_reagent(REAGENT_ID_THIRTEENLOKO, 30) /obj/item/reagent_containers/food/drinks/cans/dr_gibb name = "\improper Dr. Gibb" diff --git a/code/modules/food/food/condiment.dm b/code/modules/food/food/condiment.dm index 05f7d2cb24..419443ffcf 100644 --- a/code/modules/food/food/condiment.dm +++ b/code/modules/food/food/condiment.dm @@ -107,7 +107,7 @@ icon_state = "oliveoil" center_of_mass = list("x"=16, "y"=6) if(REAGENT_ID_SUGAR) - name = "Sugar" + name = REAGENT_SUGAR desc = "Tastey space sugar!" center_of_mass = list("x"=16, "y"=6) if(REAGENT_ID_PEANUTBUTTER) diff --git a/code/modules/food/food/superfoods.dm b/code/modules/food/food/superfoods.dm index b8f3b41f1f..042e084e65 100644 --- a/code/modules/food/food/superfoods.dm +++ b/code/modules/food/food/superfoods.dm @@ -2,7 +2,7 @@ /datum/recipe/chaoscake_layerone reagents = list(REAGENT_ID_FLOUR = 30,REAGENT_ID_MILK = 20, REAGENT_ID_SUGAR = 10, REAGENT_ID_EGG = 9) - fruit = list(PLANT_POISONBERRIES = 2, "cherries" = 2) + fruit = list(PLANT_POISONBERRIES = 2, PLANT_CHERRY = 2) items = list( /obj/item/reagent_containers/food/snacks/meat/, /obj/item/reagent_containers/food/snacks/meat/, @@ -13,7 +13,7 @@ /datum/recipe/chaoscake_layertwo reagents = list(REAGENT_ID_FLOUR = 30, REAGENT_ID_MILK = 20, REAGENT_ID_SUGAR = 10, REAGENT_ID_EGG = 9, ) - fruit = list(REAGENT_ID_VANILLA = 2, REAGENT_ID_BANANA = 2) + fruit = list(PLANT_VANILLA = 2, PLANT_BANANA = 2) items = list( /obj/item/reagent_containers/food/snacks/dough, /obj/item/reagent_containers/food/snacks/dough, @@ -214,7 +214,7 @@ reagents.add_reagent(REAGENT_ID_BLOOD, 20) reagents.add_reagent(REAGENT_ID_STOMACID, 10) reagents.add_reagent(REAGENT_ID_MUTAGEN, 4) - reagents.add_reagent("thirteenloko", 20) + reagents.add_reagent(REAGENT_ID_THIRTEENLOKO, 20) reagents.add_reagent(REAGENT_ID_HYPERZINE, 10) bitesize = 30 if(4) diff --git a/code/modules/food/recipes_microwave.dm b/code/modules/food/recipes_microwave.dm index aed91592f1..674064903c 100644 --- a/code/modules/food/recipes_microwave.dm +++ b/code/modules/food/recipes_microwave.dm @@ -84,7 +84,7 @@ I said no! result = /obj/item/reagent_containers/food/snacks/eggplantparm /datum/recipe/soylenviridians - fruit = list("soybeans" = 1) + fruit = list(PLANT_SOYBEAN = 1) reagents = list(REAGENT_ID_FLOUR = 10) reagent_mix = RECIPE_REAGENT_REPLACE result = /obj/item/reagent_containers/food/snacks/soylenviridians @@ -451,14 +451,14 @@ I said no! result = /obj/item/reagent_containers/food/snacks/tossedsalad /datum/recipe/flowersalad - fruit = list("harebell" = 1, "poppy" = 1) + fruit = list(PLANT_HAREBELLS = 1, PLANT_POPPIES = 1) items = list( /obj/item/reagent_containers/food/snacks/roastedsunflower ) result = /obj/item/reagent_containers/food/snacks/flowerchildsalad /datum/recipe/rosesalad - fruit = list("harebell" = 1, PLANT_ROSE = 1) + fruit = list(PLANT_HAREBELLS = 1, PLANT_ROSE = 1) items = list( /obj/item/reagent_containers/food/snacks/roastedsunflower ) @@ -600,7 +600,7 @@ I said no! result = /obj/item/reagent_containers/food/snacks/benedict /datum/recipe/bakedbeans - fruit = list("soybeans" = 2) + fruit = list(PLANT_SOYBEAN = 2) reagents = list(REAGENT_ID_KETCHUP = 5) result = /obj/item/reagent_containers/food/snacks/beans @@ -725,7 +725,7 @@ I said no! result = /obj/item/reagent_containers/food/snacks/bagelraisin /datum/recipe/bagelpoppy - fruit = list("poppy" = 1) + fruit = list(PLANT_POPPIES = 1) reagents = list(REAGENT_ID_WATER = 5) items = list( /obj/item/reagent_containers/food/snacks/bun @@ -937,7 +937,7 @@ I said no! result = /obj/item/reagent_containers/food/snacks/burrito_cheese /datum/recipe/burrito_cheese_spicy - fruit = list(PLANT_CHILI = 2, "soybeans" = 1) + fruit = list(PLANT_CHILI = 2, PLANT_SOYBEAN = 1) items = list( /obj/item/reagent_containers/food/snacks/tortilla, /obj/item/reagent_containers/food/snacks/cheesewedge, @@ -946,7 +946,7 @@ I said no! result = /obj/item/reagent_containers/food/snacks/burrito_cheese_spicy /datum/recipe/burrito_hell - fruit = list("soybeans" = 1, PLANT_CHILI = 10) + fruit = list(PLANT_SOYBEAN = 1, PLANT_CHILI = 10) reagents = list(REAGENT_ID_SPACESPICE = 1) items = list( /obj/item/reagent_containers/food/snacks/tortilla, @@ -958,7 +958,7 @@ I said no! reagent_mix = RECIPE_REAGENT_REPLACE //Already hot sauce /datum/recipe/meatburrito - fruit = list("soybeans" = 1) + fruit = list(PLANT_SOYBEAN = 1) items = list( /obj/item/reagent_containers/food/snacks/tortilla, /obj/item/reagent_containers/food/snacks/cutlet, @@ -967,7 +967,7 @@ I said no! result = /obj/item/reagent_containers/food/snacks/meatburrito /datum/recipe/cheeseburrito - fruit = list("soybeans" = 1) + fruit = list(PLANT_SOYBEAN = 1) items = list( /obj/item/reagent_containers/food/snacks/tortilla, /obj/item/reagent_containers/food/snacks/cheesewedge, @@ -976,7 +976,7 @@ I said no! result = /obj/item/reagent_containers/food/snacks/cheeseburrito /datum/recipe/fuegoburrito - fruit = list("soybeans" = 1, PLANT_CHILI = 2) + fruit = list(PLANT_SOYBEAN = 1, PLANT_CHILI = 2) items = list( /obj/item/reagent_containers/food/snacks/tortilla ) diff --git a/code/modules/food/recipes_microwave_vr.dm b/code/modules/food/recipes_microwave_vr.dm index 4a43086ac9..1f2e284e29 100644 --- a/code/modules/food/recipes_microwave_vr.dm +++ b/code/modules/food/recipes_microwave_vr.dm @@ -161,7 +161,7 @@ result = /obj/item/storage/box/wings/bucket /datum/recipe/grub_pink - fruit = list("cherries" = 1) + fruit = list(PLANT_CHERRY = 1) items = list( /obj/item/reagent_containers/food/snacks/grub ) diff --git a/code/modules/food/recipes_oven.dm b/code/modules/food/recipes_oven.dm index 59cc6f9445..4ad7c33e83 100644 --- a/code/modules/food/recipes_oven.dm +++ b/code/modules/food/recipes_oven.dm @@ -234,7 +234,7 @@ /datum/recipe/cherrypie appliance = OVEN - fruit = list("cherries" = 1) + fruit = list(PLANT_CHERRY = 1) reagents = list(REAGENT_ID_SUGAR = 10) items = list( /obj/item/reagent_containers/food/snacks/sliceable/flatdough @@ -314,7 +314,7 @@ /datum/recipe/poppypretzel appliance = OVEN - fruit = list("poppy" = 1) + fruit = list(PLANT_POPPIES = 1) items = list(/obj/item/reagent_containers/food/snacks/dough) result = /obj/item/reagent_containers/food/snacks/poppypretzel result_quantity = 2 diff --git a/code/modules/hydroponics/grown_sif.dm b/code/modules/hydroponics/grown_sif.dm index 60541ddc00..aa3e827ca7 100644 --- a/code/modules/hydroponics/grown_sif.dm +++ b/code/modules/hydroponics/grown_sif.dm @@ -24,7 +24,7 @@ plantname = PLANT_SIFBULB /obj/item/reagent_containers/food/snacks/grown/sif/wabback - plantname = "wabback" + plantname = PLANT_WHITEWABBACK /obj/item/reagent_containers/food/snacks/grown/sif/blackwabback plantname = PLANT_BLACKWABBACK diff --git a/code/modules/hydroponics/seedtypes/cherries.dm b/code/modules/hydroponics/seedtypes/cherries.dm index 07df778a03..41ea7b9026 100644 --- a/code/modules/hydroponics/seedtypes/cherries.dm +++ b/code/modules/hydroponics/seedtypes/cherries.dm @@ -3,7 +3,7 @@ seed_name = PLANT_CHERRY seed_noun = "pits" display_name = "cherry tree" - kitchen_tag = "cherries" + kitchen_tag = PLANT_CHERRY chems = list(REAGENT_ID_NUTRIMENT = list(1,15), REAGENT_ID_SUGAR = list(1,15), REAGENT_ID_CHERRYJELLY = list(10,15)) /datum/seed/cherries/New() diff --git a/code/modules/hydroponics/seedtypes/flowers.dm b/code/modules/hydroponics/seedtypes/flowers.dm index f32bcab65d..e12503fb58 100644 --- a/code/modules/hydroponics/seedtypes/flowers.dm +++ b/code/modules/hydroponics/seedtypes/flowers.dm @@ -1,9 +1,9 @@ //Flowers/varieties /datum/seed/flower name = PLANT_HAREBELLS - seed_name = "harebell" + seed_name = PLANT_HAREBELLS display_name = PLANT_HAREBELLS - kitchen_tag = "harebell" + kitchen_tag = PLANT_HAREBELLS chems = list(REAGENT_ID_NUTRIMENT = list(1,20)) /datum/seed/flower/New() @@ -19,9 +19,9 @@ /datum/seed/flower/poppy name = PLANT_POPPIES - seed_name = "poppy" + seed_name = PLANT_POPPIES display_name = PLANT_POPPIES - kitchen_tag = "poppy" + kitchen_tag = PLANT_POPPIES chems = list(REAGENT_ID_NUTRIMENT = list(1,20), REAGENT_ID_BICARIDINE = list(1,10)) /datum/seed/flower/poppy/New() diff --git a/code/modules/hydroponics/seedtypes/soybean.dm b/code/modules/hydroponics/seedtypes/soybean.dm index c644618b67..a08515b57c 100644 --- a/code/modules/hydroponics/seedtypes/soybean.dm +++ b/code/modules/hydroponics/seedtypes/soybean.dm @@ -1,8 +1,8 @@ /datum/seed/soybean name = PLANT_SOYBEAN seed_name = PLANT_SOYBEAN - display_name = "soybeans" - kitchen_tag = "soybeans" + display_name = PLANT_SOYBEAN + "s" + kitchen_tag = PLANT_SOYBEAN chems = list(REAGENT_ID_NUTRIMENT = list(1,20), REAGENT_ID_SOYMILK = list(10,20)) /datum/seed/soybean/New() diff --git a/code/modules/hydroponics/seedtypes/sugarcane.dm b/code/modules/hydroponics/seedtypes/sugarcane.dm index 90037fb5eb..c566c409b3 100644 --- a/code/modules/hydroponics/seedtypes/sugarcane.dm +++ b/code/modules/hydroponics/seedtypes/sugarcane.dm @@ -1,8 +1,8 @@ /datum/seed/sugarcane name = PLANT_SUGARCANE seed_name = PLANT_SUGARCANE - display_name = "sugarcanes" - kitchen_tag = "sugarcanes" + display_name = PLANT_SUGARCANE + "s" + kitchen_tag = PLANT_SUGARCANE chems = list(REAGENT_ID_SUGAR = list(4,5)) /datum/seed/sugarcane/New() diff --git a/code/modules/hydroponics/seedtypes/wabback.dm b/code/modules/hydroponics/seedtypes/wabback.dm index ffc5dfe64e..50323222bd 100644 --- a/code/modules/hydroponics/seedtypes/wabback.dm +++ b/code/modules/hydroponics/seedtypes/wabback.dm @@ -5,7 +5,7 @@ seed_noun = "nodes" display_name = "white wabback" chems = list(REAGENT_ID_NUTRIMENT = list(1,10), REAGENT_ID_PROTEIN = list(1,5), REAGENT_ID_ENZYME = list(0,3)) - kitchen_tag = "wabback" + kitchen_tag = PLANT_WHITEWABBACK mutants = list(PLANT_BLACKWABBACK,PLANT_WILDWABBACK) has_item_product = /obj/item/stack/material/cloth diff --git a/code/modules/materials/materials/gems.dm b/code/modules/materials/materials/gems.dm index 69a2c7fa6d..e035bf532e 100644 --- a/code/modules/materials/materials/gems.dm +++ b/code/modules/materials/materials/gems.dm @@ -50,8 +50,8 @@ /datum/material/quartz name = MAT_QUARTZ - display_name = "quartz" - use_name = "quartz" + display_name = MAT_QUARTZ + use_name = MAT_QUARTZ icon_colour = "#e6d7df" stack_type = /obj/item/stack/material/quartz tableslam_noise = 'sound/effects/Glasshit.ogg' diff --git a/code/modules/materials/sheets/glass.dm b/code/modules/materials/sheets/glass.dm index a54ae0cd1a..1b40afeee2 100644 --- a/code/modules/materials/sheets/glass.dm +++ b/code/modules/materials/sheets/glass.dm @@ -1,7 +1,7 @@ /obj/item/stack/material/glass - name = "glass" + name = MAT_GLASS icon_state = "sheet-transparent" - default_type = "glass" + default_type = MAT_GLASS no_variants = FALSE drop_sound = 'sound/items/drop/glass.ogg' pickup_sound = 'sound/items/pickup/glass.ogg' diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index fd65926aaa..26667c159e 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -14,7 +14,7 @@ material = ORE_URANIUM /obj/item/ore/iron - name = "hematite" + name = ORE_HEMATITE icon_state = "ore_iron" origin_tech = list(TECH_MATERIAL = 1) material = ORE_HEMATITE @@ -32,7 +32,7 @@ material = ORE_MARBLE /obj/item/ore/glass - name = "sand" + name = ORE_SAND icon_state = "ore_glass" origin_tech = list(TECH_MATERIAL = 1) material = ORE_SAND diff --git a/code/modules/mob/dead/observer/chunk.dm b/code/modules/mob/dead/observer/chunk.dm new file mode 100644 index 0000000000..0de1b2af73 --- /dev/null +++ b/code/modules/mob/dead/observer/chunk.dm @@ -0,0 +1,90 @@ +// GHOST CHUNK +// +// A 16x16 grid of the map with a list of turfs that can be seen, are visible and are dimmed. +// Allows ghosts to see turfs of non AREA_BLOCK_GHOST_SIGHT flagged areas within these chunks. + +/datum/chunk/ghost + var/list/hidden_areas = list() + +/datum/chunk/ghost/acquireVisibleTurfs(var/list/invisible) + + for(var/area/A in hidden_areas) + + for(var/turf/T in A.contents) + invisible[T] = T + +// Don't call the parernt, we work inverted! +/datum/chunk/ghost/New(loc, x, y, z) + for(var/area/A in range(16, locate(x + 8, y + 8, z))) + if(A.flag_check(AREA_BLOCK_GHOST_SIGHT)) + hidden_areas += A + + // 0xf = 15 + x &= ~0xf + y &= ~0xf + + src.x = x + src.y = y + src.z = z + + for(var/turf/t in range(10, locate(x + 8, y + 8, z))) + if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16) + turfs[t] = t + + acquireVisibleTurfs(obscuredTurfs) + + // Removes turf that isn't in turfs. + obscuredTurfs &= turfs + + visibleTurfs = turfs - obscuredTurfs + + for(var/turf/t as anything in obscuredTurfs) + LAZYINITLIST(t.obfuscations) + if(!t.obfuscations[obfuscation.type]) + var/image/ob_image = image(obfuscation.icon, t, obfuscation.icon_state, OBFUSCATION_LAYER) + ob_image.plane = PLANE_FULLSCREEN + t.obfuscations[obfuscation.type] = ob_image + obscured += t.obfuscations[obfuscation.type] + +/datum/chunk/ghost/update() + + set background = 1 + + var/list/newInvisibleTurfs = new() + acquireVisibleTurfs(newInvisibleTurfs) + + // Removes turf that isn't in turfs. + newInvisibleTurfs &= turfs + + var/list/visAdded = obscuredTurfs - newInvisibleTurfs + var/list/visRemoved = newInvisibleTurfs - obscuredTurfs + + visibleTurfs = turfs - newInvisibleTurfs + obscuredTurfs = newInvisibleTurfs + + for(var/turf/t as anything in visAdded) + if(LAZYLEN(t.obfuscations) && t.obfuscations[obfuscation.type]) + obscured -= t.obfuscations[obfuscation.type] + for(var/mob/observer/dead/m as anything in seenby) + if(!m) + continue + var/client/client = m.client + if(client) + client.images -= t.obfuscations[obfuscation.type] + + for(var/turf/t as anything in visRemoved) + if(obscuredTurfs[t]) + LAZYINITLIST(t.obfuscations) + if(!t.obfuscations[obfuscation.type]) + var/image/ob_image = image(obfuscation.icon, t, obfuscation.icon_state, OBFUSCATION_LAYER) + ob_image.plane = PLANE_FULLSCREEN + t.obfuscations[obfuscation.type] = ob_image + + obscured += t.obfuscations[obfuscation.type] + for(var/mob/observer/dead/m as anything in seenby) + if(!m) + seenby -= m + continue + var/client/client = m.client + if(client) + client.images += t.obfuscations[obfuscation.type] diff --git a/code/modules/mob/dead/observer/ghostnet.dm b/code/modules/mob/dead/observer/ghostnet.dm new file mode 100644 index 0000000000..94eb3d6334 --- /dev/null +++ b/code/modules/mob/dead/observer/ghostnet.dm @@ -0,0 +1,45 @@ +// GHOST NET +// +// The datum containing all the hidden chunks. + +/datum/visualnet/ghost + chunk_type = /datum/chunk/ghost + +// Removes a area from a chunk. + +/datum/visualnet/ghost/proc/removeArea(area/A) + if(!A.flag_check(AREA_BLOCK_GHOST_SIGHT)) + majorChunkChange(A, 0) + +// Add a area to a chunk. + +/datum/visualnet/ghost/proc/addArea(area/A) + if(A.flag_check(AREA_BLOCK_GHOST_SIGHT)) + majorChunkChange(A, 1) + +// Used for ghost visible areas. Since portable areas can be in ANY chunk. + +/datum/visualnet/ghost/proc/updateArea(area/A) + if(A.flag_check(AREA_BLOCK_GHOST_SIGHT)) + majorChunkChange(A, 1) + else + majorChunkChange(A, 0) + +/datum/visualnet/ghost/majorChunkChange(area/A, var/choice) + for(var/entry in chunks) + var/datum/chunk/ghost/gchunk = chunks[entry] + for(var/turf/T in gchunk.turfs) + if(T.loc == A) + onMajorChunkChange(A, choice, gchunk) + gchunk.hasChanged(TRUE) + break + +/datum/visualnet/ghost/onMajorChunkChange(atom/c, var/choice, var/datum/chunk/ghost/chunk) +// Only add actual areas to the list of areas + if(istype(c, /area)) + if(choice == 0) + // Remove the area. + chunk.hidden_areas -= c + else if(choice == 1) + // You can't have the same area in the list twice. + chunk.hidden_areas |= c diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index af7715b656..82778ff677 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -13,6 +13,9 @@ canmove = 0 blinded = 0 anchored = TRUE // don't get pushed around + var/list/visibleChunks = list() + var/datum/visualnet/visualnet + var/use_static = TRUE var/can_reenter_corpse var/datum/hud/living/carbon/hud = null // hud @@ -140,6 +143,13 @@ animate(pixel_y = default_pixel_y, time = 10, loop = -1) observer_mob_list += src ..() + visualnet = ghostnet + +/mob/observer/dead/Moved(atom/old_loc, direction, forced) + . = ..() + use_static = !(check_rights(R_ADMIN|R_FUN|R_EVENT|R_SERVER, 0, src) || (client && client.buildmode)) + if(visualnet && use_static) + visualnet.visibility(src, client) /mob/observer/dead/Topic(href, href_list) if (href_list["track"]) @@ -452,7 +462,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp //RS Port #658 Start var/area/A = get_area(destination) - if(A.flag_check(AREA_BLOCK_GHOSTS)) + if(A?.flag_check(AREA_BLOCK_GHOSTS)) to_chat(src,span_warning("Sorry, that area does not allow ghosts.")) if(following) stop_following() @@ -572,6 +582,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return ..() /mob/observer/dead/Destroy() + visualnet = null if(ismob(following)) var/mob/M = following M.following_mobs -= src diff --git a/code/modules/mob/mob_helpers_vr.dm b/code/modules/mob/mob_helpers_vr.dm index 0b0b255913..5f1b49bbbf 100644 --- a/code/modules/mob/mob_helpers_vr.dm +++ b/code/modules/mob/mob_helpers_vr.dm @@ -24,7 +24,7 @@ /mob/verb/toggle_stomach_vision() set name = "Toggle Stomach Sprites" - set category = "Preferences" + set category = "Preferences.Vore" set desc = "Toggle the ability to see stomachs or not" var/toggle diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 1b2c1571d7..91736a5257 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -350,9 +350,9 @@ switch(mob.incorporeal_move) if(1) var/turf/T = get_step(mob, direct) - var/area/A = T.loc //RS Port #658 if(!T) return + var/area/A = T.loc //RS Port #658 if(mob.check_holy(T)) to_chat(mob, span_warning("You cannot get past holy grounds while you are in this plane of existence!")) return diff --git a/code/modules/reagents/machinery/dispenser/dispenser2_energy.dm b/code/modules/reagents/machinery/dispenser/dispenser2_energy.dm index 21a164d4eb..1004d3ff48 100644 --- a/code/modules/reagents/machinery/dispenser/dispenser2_energy.dm +++ b/code/modules/reagents/machinery/dispenser/dispenser2_energy.dm @@ -58,7 +58,7 @@ /obj/machinery/chemical_dispenser/bar_coffee dispense_reagents = list( - REAGENT_ID_COFFEE, REAGENT_ID_CAFELATTE, REAGENT_ID_SOYLATTE, REAGENT_ID_HOTCOCO, REAGENT_ID_MILK, REAGENT_ID_CREAM, REAGENT_ID_TEA, REAGENT_ID_ICE, "water", + REAGENT_ID_COFFEE, REAGENT_ID_CAFELATTE, REAGENT_ID_SOYLATTE, REAGENT_ID_HOTCOCO, REAGENT_ID_MILK, REAGENT_ID_CREAM, REAGENT_ID_TEA, REAGENT_ID_ICE, REAGENT_ID_WATER, REAGENT_ID_ORANGEJUICE, REAGENT_ID_LEMONJUICE, REAGENT_ID_LIMEJUICE, REAGENT_ID_BERRYJUICE, REAGENT_ID_MINT, REAGENT_ID_DECAF, REAGENT_ID_GREENTEA, REAGENT_ID_MILKFOAM, REAGENT_ID_DRIPCOFFEE ) diff --git a/code/modules/reagents/reactions/instant/drinks.dm b/code/modules/reagents/reactions/instant/drinks.dm index 9621712283..70891d5126 100644 --- a/code/modules/reagents/reactions/instant/drinks.dm +++ b/code/modules/reagents/reactions/instant/drinks.dm @@ -100,14 +100,14 @@ name = REAGENT_AMERICANO id = REAGENT_ID_AMERICANO result = REAGENT_ID_AMERICANO - required_reagents = list("water" = 1, REAGENT_ID_LONGBLACK = 2) + required_reagents = list(REAGENT_ID_WATER = 1, REAGENT_ID_LONGBLACK = 2) result_amount = 3 /decl/chemical_reaction/instant/drinks/long_black name = REAGENT_LONGBLACK id = REAGENT_ID_LONGBLACK result = REAGENT_ID_LONGBLACK - required_reagents = list("water" = 1, REAGENT_ID_COFFEE = 1) + required_reagents = list(REAGENT_ID_WATER = 1, REAGENT_ID_COFFEE = 1) result_amount = 2 /decl/chemical_reaction/instant/drinks/macchiato diff --git a/code/modules/reagents/reactions/instant/virology.dm b/code/modules/reagents/reactions/instant/virology.dm index c00f91bdc5..e582658c4b 100644 --- a/code/modules/reagents/reactions/instant/virology.dm +++ b/code/modules/reagents/reactions/instant/virology.dm @@ -44,7 +44,7 @@ name = REAGENT_SIZEVIRUSFOOD id = "sizeoxadonevirusfood" result = REAGENT_ID_SIZEVIRUSFOOD - required_reagents = list("sizeoxadone" = 1, REAGENT_ID_PHORONVIRUSFOOD = 1) + required_reagents = list(REAGENT_ID_SIZEOXADONE = 1, REAGENT_ID_PHORONVIRUSFOOD = 1) result_amount = 2 /decl/chemical_reaction/instant/mix_virus @@ -153,7 +153,7 @@ D.Devolve() /decl/chemical_reaction/instant/antibodies - name = "Antibodies" + name = REAGENT_ANTIBODIES id = "antibodiesmix" result = REAGENT_ID_ANTIBODIES required_reagents = list(REAGENT_ID_VACCINE) diff --git a/code/modules/vote/vote_verb.dm b/code/modules/vote/vote_verb.dm index f9bff81282..b8479cbe95 100644 --- a/code/modules/vote/vote_verb.dm +++ b/code/modules/vote/vote_verb.dm @@ -1,5 +1,5 @@ /client/verb/vote() - set category = "OOC" + set category = "OOC.Game" set name = "Vote" if(SSvote.active_vote) diff --git a/vorestation.dme b/vorestation.dme index 3ea015aa97..9c020ee646 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2929,7 +2929,9 @@ #include "code\modules\mob\dead\corpse.dm" #include "code\modules\mob\dead\corpse_vr.dm" #include "code\modules\mob\dead\death.dm" +#include "code\modules\mob\dead\observer\chunk.dm" #include "code\modules\mob\dead\observer\free_vr.dm" +#include "code\modules\mob\dead\observer\ghostnet.dm" #include "code\modules\mob\dead\observer\login.dm" #include "code\modules\mob\dead\observer\logout.dm" #include "code\modules\mob\dead\observer\observer.dm"