From 1f6338189a83d8ce03eddcdd45c6c239076dfb4d Mon Sep 17 00:00:00 2001 From: SandPoot Date: Sun, 19 Feb 2023 14:29:25 -0300 Subject: [PATCH 1/7] new icon with adjustments for it --- code/__HELPERS/screentips.dm | 2 +- code/game/atoms.dm | 8 ++++---- icons/UI_Icons/screentips/cursor_hints.dmi | Bin 468 -> 414 bytes ...{cursor_hints_outline.dmi => full_mouse.dmi} | Bin 4 files changed, 5 insertions(+), 5 deletions(-) rename icons/UI_Icons/screentips/{cursor_hints_outline.dmi => full_mouse.dmi} (100%) diff --git a/code/__HELPERS/screentips.dm b/code/__HELPERS/screentips.dm index fc6673a006..dfd3390ab4 100644 --- a/code/__HELPERS/screentips.dm +++ b/code/__HELPERS/screentips.dm @@ -24,7 +24,7 @@ GLOBAL_LIST_INIT_TYPED(screentip_context_icons, /image, prepare_screentip_contex icon = "\icon[GLOB.screentip_context_icons[icon]]" LAZYADD(to_add, "[key_help][icon]: [context[key][intent]]") - var/separator = "[allow_image ? " " : " | "]" + var/separator = "[allow_image ? " " : " | "]" return english_list(to_add, "", separator, separator) #undef HINT_ICON_FILE diff --git a/code/game/atoms.dm b/code/game/atoms.dm index ba2d6ad56c..896aa8c459 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1491,7 +1491,7 @@ if (lmb_text) lmb_rmb_line = lmb_text if (rmb_text) - lmb_rmb_line += " | [rmb_text]" + lmb_rmb_line += " | [allow_images ? " " : ""][rmb_text]" else if (rmb_text) lmb_rmb_line = rmb_text @@ -1504,7 +1504,7 @@ if((SCREENTIP_CONTEXT_CTRL_RMB in context) && (length(context[SCREENTIP_CONTEXT_CTRL_RMB]) > 0)) if (ctrl_lmb_ctrl_rmb_line != "") - ctrl_lmb_ctrl_rmb_line += " | " + ctrl_lmb_ctrl_rmb_line += " | [allow_images ? " " : ""]" ctrl_lmb_ctrl_rmb_line += "[SCREENTIP_CONTEXT_CTRL_RMB]: [context[SCREENTIP_CONTEXT_CTRL_RMB]]" ctrl_lmb_ctrl_rmb_line = build_context(context, SCREENTIP_CONTEXT_CTRL_RMB, allow_images) @@ -1516,7 +1516,7 @@ alt_lmb_alt_rmb_line = build_context(context, SCREENTIP_CONTEXT_ALT_LMB, allow_images) if((SCREENTIP_CONTEXT_ALT_RMB in context) && (length(context[SCREENTIP_CONTEXT_ALT_RMB]) > 0)) if (alt_lmb_alt_rmb_line != "") - alt_lmb_alt_rmb_line += " | " + alt_lmb_alt_rmb_line += " | [allow_images ? " " : ""]" alt_lmb_alt_rmb_line = build_context(context, SCREENTIP_CONTEXT_ALT_RMB, allow_images) // Shift-LMB, Ctrl-Shift-LMB on one line... @@ -1528,7 +1528,7 @@ if((SCREENTIP_CONTEXT_CTRL_SHIFT_LMB in context) && (length(context[SCREENTIP_CONTEXT_CTRL_SHIFT_LMB]) > 0)) if (shift_lmb_ctrl_shift_lmb_line != "") - shift_lmb_ctrl_shift_lmb_line += " | " + shift_lmb_ctrl_shift_lmb_line += " | [allow_images ? " " : ""]" shift_lmb_ctrl_shift_lmb_line += "[SCREENTIP_CONTEXT_CTRL_SHIFT_LMB]: [context[SCREENTIP_CONTEXT_CTRL_SHIFT_LMB]]" shift_lmb_ctrl_shift_lmb_line = build_context(context, SCREENTIP_CONTEXT_CTRL_SHIFT_LMB, allow_images) diff --git a/icons/UI_Icons/screentips/cursor_hints.dmi b/icons/UI_Icons/screentips/cursor_hints.dmi index 01c1dfe33e96128ebf7cbe621a45bdd6b8748567..9533d240a59921308927ac79c7eaad268af32cd8 100644 GIT binary patch delta 321 zcmV-H0lxm!1D*pRiBL{Q4GJ0x0000DNk~Le0000O0000K1Oos70A-utu#q7*0iTgs zHGeF)I5Sc+(=$qdY*Vh{lEji!AWJDJCowNuiHkEOv#1!zH{{|>D@x2wg|OkOe0-gB z6Z0yGQkRjMQ$Uo$l+5D9qFkbsrWYk95ob9uCI%7dn;>F+6GXgkf{67^5CPvPE4cc( zfFm3L{ws^R`hv@S0001nNklK=ZFu7nc=uFoK_9wnN}9swyN_j zDi*Q*40tqWkM`oxU3J<-Lz@g;u7rppiCho#H;>`&o-y>rFl>K>DB>mWvho1w01_Qr TL#^hq00000NkvXXu0mjf^caLA delta 375 zcmV--0f_#d1JnZ{iBL{Q4GJ0x0000DNk~Le0000$0000m1Oos708?dQERi8M0iBUq zHGd4vxHvOXGt)ClAe`co#FA7XQzXhD1|AR#fe3^L@7-#N=zcoa$-yjBGNZO#QG+Pc;5sO>zg0~zEM_i^>YD7 zIRM5oj2l?7s*(Tz0KQ2?K~y-6?b1yOgMTm(1>l7KZOz;u{%(u8K#?4v2-z1Gu8SM5 z-`Y3T3XNE3#YJcHZ5~6&JR!a?l626y$>FwuyAldTT6LNn+5)-~&Io8ifVHe+MW`v9 zvftpde}hk Date: Mon, 20 Feb 2023 00:44:40 -0300 Subject: [PATCH 2/7] less weird coloring --- code/__HELPERS/screentips.dm | 2 +- icons/UI_Icons/screentips/cursor_hints.dmi | Bin 414 -> 414 bytes icons/UI_Icons/screentips/full_mouse.dmi | Bin 490 -> 490 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/code/__HELPERS/screentips.dm b/code/__HELPERS/screentips.dm index dfd3390ab4..aeceb0d41c 100644 --- a/code/__HELPERS/screentips.dm +++ b/code/__HELPERS/screentips.dm @@ -18,7 +18,7 @@ GLOBAL_LIST_INIT_TYPED(screentip_context_icons, /image, prepare_screentip_contex /proc/build_context(list/context, key, allow_image) var/list/to_add for(var/intent in context[key]) - var/key_help = "[length(key) > 3 ? copytext(key, 1, -3) : ""]" + var/key_help = "[length(key) > 3 ? "[copytext(key, 1, -3)][allow_image ? " " : ""]" : ""]" var/icon = "[copytext(key, -3)]-[intent]" if(allow_image) icon = "\icon[GLOB.screentip_context_icons[icon]]" diff --git a/icons/UI_Icons/screentips/cursor_hints.dmi b/icons/UI_Icons/screentips/cursor_hints.dmi index 9533d240a59921308927ac79c7eaad268af32cd8..f314166d438d8053d70ff3c42b93edc0723434cc 100644 GIT binary patch delta 39 xcmV+?0NDSY1D*qrEF3^UKmY&$|Ns90{~-XB|Nqzk{{R5Mz`!M#V>z)%Rsl4J5J~_5 delta 39 vcmbQoJdb&Tj?Dl6{}~t<92^`N{wp#}`Tze01CW2z>$0RJHXl>h(O0RI30z`(#j(W11mNTLBpp%Od* delta 36 ucmV+<0NelS1L^~iFB$*;|3E-M0RJHXl>h(O0RI30z`($+MRoYGNTLBwIubPi From d287fc25ca262fc89dd5905bf4e28c55d53e575a Mon Sep 17 00:00:00 2001 From: SandPoot Date: Tue, 21 Feb 2023 01:55:49 -0300 Subject: [PATCH 3/7] poosh --- code/datums/chatmessage.dm | 1 - code/datums/dna.dm | 1 + code/game/objects/structures/fluff.dm | 2 ++ code/modules/mob/living/carbon/alien/humanoid/queen.dm | 2 ++ .../mob/living/simple_animal/hostile/megafauna/bubblegum.dm | 2 ++ .../mob/living/simple_animal/hostile/megafauna/colossus.dm | 2 ++ .../modules/mob/living/simple_animal/hostile/megafauna/drake.dm | 2 ++ .../mob/living/simple_animal/hostile/megafauna/legion.dm | 2 ++ code/modules/mob/living/simple_animal/hostile/space_dragon.dm | 2 ++ 9 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/datums/chatmessage.dm b/code/datums/chatmessage.dm index 766ae1833b..6aadd72a8a 100644 --- a/code/datums/chatmessage.dm +++ b/code/datums/chatmessage.dm @@ -164,7 +164,6 @@ message.maptext_height = mheight message.maptext_x = (CHAT_MESSAGE_WIDTH - owner.bound_width) * -0.5 message.maptext = MAPTEXT(complete_text) - message.pixel_x = -target.pixel_x //Dogborgs and other wide boys have a pixel offset. This accounts for that // View the message LAZYADDASSOC(owned_by.seen_messages, message_loc, src) diff --git a/code/datums/dna.dm b/code/datums/dna.dm index bb2dab8033..7d1ddc5648 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -730,6 +730,7 @@ return //new size detected holder.resize = features["body_size"] / old_size + holder.maptext_height = 32 * features["body_size"] // Adjust runechat height holder.update_transform() if(iscarbon(holder)) var/mob/living/carbon/C = holder diff --git a/code/game/objects/structures/fluff.dm b/code/game/objects/structures/fluff.dm index 16f72bf1fb..2700109c77 100644 --- a/code/game/objects/structures/fluff.dm +++ b/code/game/objects/structures/fluff.dm @@ -62,6 +62,8 @@ icon = 'icons/effects/64x64.dmi' icon_state = "drake_statue" pixel_x = -16 + maptext_height = 64 + maptext_width = 64 density = TRUE deconstructible = FALSE layer = EDGED_TURF_LAYER diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 7717180e6c..7e1c669e49 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -4,6 +4,8 @@ status_flags = 0 unique_name = 0 pixel_x = -16 + maptext_height = 64 + maptext_width = 64 bubble_icon = "alienroyal" mob_size = MOB_SIZE_LARGE layer = LARGE_MOB_LAYER //above most mobs, but below speechbubbles diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 5520efb93b..def5dc8c76 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -49,6 +49,8 @@ Difficulty: Hard melee_queue_distance = 20 // as far as possible really, need this because of blood warp ranged = 1 pixel_x = -32 + maptext_height = 96 + maptext_width = 96 gender = MALE del_on_death = 1 crusher_loot = list(/obj/structure/closet/crate/necropolis/bubblegum/crusher) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index eb6c29df5f..9e8497f968 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -44,6 +44,8 @@ Difficulty: Very Hard move_to_delay = 10 ranged = 1 pixel_x = -32 + maptext_height = 96 + maptext_width = 96 del_on_death = TRUE achievement_type = /datum/award/achievement/boss/colossus_kill crusher_achievement_type = /datum/award/achievement/boss/colossus_crusher diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index c83db749e2..49db738233 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -59,6 +59,8 @@ Difficulty: Medium move_to_delay = 5 ranged = 1 pixel_x = -16 + maptext_height = 64 + maptext_width = 64 crusher_loot = list(/obj/structure/closet/crate/necropolis/dragon/crusher) loot = list(/obj/structure/closet/crate/necropolis/dragon) butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/bone = 30, /obj/item/reagent_containers/food/snacks/meat/slab/dragon = 5) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm index b72d8f4003..299715f9e2 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm @@ -48,6 +48,8 @@ SHITCODE AHEAD. BE ADVISED. Also comment extravaganza score_achievement_type = /datum/award/score/legion_score pixel_y = -16 pixel_x = -32 + maptext_height = 96 + maptext_width = 96 loot = list(/obj/item/stack/sheet/bone = 3) vision_range = 10 wander = FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm index f8931aa27b..53e4d0d64f 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm @@ -49,6 +49,8 @@ mob_size = MOB_SIZE_LARGE armour_penetration = 30 pixel_x = -16 + maptext_height = 64 + maptext_width = 64 turns_per_move = 5 movement_type = FLYING health_doll_icon = "spacedragon" From 2bdec078d7d9ba35bc7ababb58adc9ff14ba468b Mon Sep 17 00:00:00 2001 From: SandPoot <43283559+SandPoot@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:42:57 -0300 Subject: [PATCH 4/7] Merge pull request #311 from Sandstorm-Station/duct-piping Several duct pipe fixes/qol --- .../items/stacks/sheets/sheet_types.dm | 2 +- code/game/objects/items/stacks/stack.dm | 41 ----------- .../game/objects/items/stacks/stack_recipe.dm | 69 +++++++++++++++++++ code/modules/plumbing/ducts.dm | 2 +- .../modules/research/machinery/_production.dm | 2 +- tgstation.dme | 1 + 6 files changed, 73 insertions(+), 44 deletions(-) create mode 100644 code/game/objects/items/stacks/stack_recipe.dm diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 5dbdddb540..572ce58c74 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -798,7 +798,7 @@ GLOBAL_LIST_INIT(plastic_recipes, list( new /datum/stack_recipe("water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/empty), \ new /datum/stack_recipe("large water bottle", /obj/item/reagent_containers/glass/beaker/waterbottle/large/empty,3), \ new /datum/stack_recipe("shower curtain", /obj/structure/curtain, 10, time = 10, one_per_turf = 1, on_floor = 1), \ - new /datum/stack_recipe("duct", /obj/item/stack/ducts,1), \ + new /datum/stack_recipe("duct", /obj/item/stack/ducts, 1, 5, 50), \ new /datum/stack_recipe("laser pointer case", /obj/item/glasswork/glass_base/laserpointer_shell, 30), \ new /datum/stack_recipe("wet floor sign", /obj/item/clothing/suit/caution, 2))) diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 266d8b7b86..b2cd0f481b 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -514,44 +514,3 @@ /obj/item/stack/microwave_act(obj/machinery/microwave/M) if(istype(M) && M.dirty < 100) M.dirty += amount - -/* - * Recipe datum - */ -/datum/stack_recipe - var/title = "ERROR" - var/result_type - var/req_amount = 1 - var/res_amount = 1 - var/max_res_amount = 1 - var/time = 0 - var/one_per_turf = FALSE - var/on_floor = FALSE - var/placement_checks = FALSE - var/applies_mats = FALSE - var/trait_booster = null - var/trait_modifier = 1 - -/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1,time = 0, one_per_turf = FALSE, on_floor = FALSE, window_checks = FALSE, placement_checks = FALSE, applies_mats = FALSE, trait_booster = null, trait_modifier = 1) - src.title = title - src.result_type = result_type - src.req_amount = req_amount - src.res_amount = res_amount - src.max_res_amount = max_res_amount - src.time = time - src.one_per_turf = one_per_turf - src.on_floor = on_floor - src.placement_checks = placement_checks - src.applies_mats = applies_mats - src.trait_booster = trait_booster - src.trait_modifier = trait_modifier -/* - * Recipe list datum - */ -/datum/stack_recipe_list - var/title = "ERROR" - var/list/recipes - -/datum/stack_recipe_list/New(title, recipes) - src.title = title - src.recipes = recipes diff --git a/code/game/objects/items/stacks/stack_recipe.dm b/code/game/objects/items/stacks/stack_recipe.dm new file mode 100644 index 0000000000..b8cbfe3b61 --- /dev/null +++ b/code/game/objects/items/stacks/stack_recipe.dm @@ -0,0 +1,69 @@ + +/* + * Recipe datum + */ +/datum/stack_recipe + /// The title of the recipe + var/title = "ERROR" + /// What atom the recipe makes, typepath + var/atom/result_type + /// Amount of stack required to make + var/req_amount = 1 + /// Amount of resulting atoms made + var/res_amount = 1 + /// Max amount of resulting atoms made + var/max_res_amount = 1 + /// How long it takes to make + var/time = 0 + /// If only one of the resulting atom is allowed per turf + var/one_per_turf = FALSE + /// If the atom requires a floor below + var/on_floor = FALSE + /// Bitflag of additional placement checks required to place. (STACK_CHECK_CARDINALS|STACK_CHECK_ADJACENT) + var/placement_checks = NONE + /// If TRUE, the created atom will gain custom mat datums + var/applies_mats = FALSE + /// What trait, if any, boosts the construction speed of this item + var/trait_booster + /// How much the trait above, if supplied, boosts the construct speed of this item + var/trait_modifier = 1 + +/datum/stack_recipe/New( + title, + result_type, + req_amount = 1, + res_amount = 1, + max_res_amount = 1, + time = 0, + one_per_turf = FALSE, + on_floor = FALSE, + window_checks = FALSE, + placement_checks = NONE, + applies_mats = FALSE, + trait_booster, + trait_modifier = 1, +) + + src.title = title + src.result_type = result_type + src.req_amount = req_amount + src.res_amount = res_amount + src.max_res_amount = max_res_amount + src.time = time + src.one_per_turf = one_per_turf + src.on_floor = on_floor + src.placement_checks = placement_checks + src.applies_mats = applies_mats + src.trait_booster = trait_booster + src.trait_modifier = trait_modifier + +/* + * Recipe list datum + */ +/datum/stack_recipe_list + var/title = "ERROR" + var/list/recipes + +/datum/stack_recipe_list/New(title, recipes) + src.title = title + src.recipes = recipes diff --git a/code/modules/plumbing/ducts.dm b/code/modules/plumbing/ducts.dm index 8a27f2669c..59816544ab 100644 --- a/code/modules/plumbing/ducts.dm +++ b/code/modules/plumbing/ducts.dm @@ -388,7 +388,7 @@ All the important duct code: singular_name = "duct" icon = 'icons/obj/plumbing/fluid_ducts.dmi' icon_state = "ducts" - custom_materials = list(/datum/material/iron=500) + custom_materials = list(/datum/material/plastic = 400) w_class = WEIGHT_CLASS_TINY novariants = FALSE max_amount = 50 diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index 7862f24715..30d0c70566 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -120,7 +120,7 @@ return round(A / max(1, all_materials[mat] * ef)) /obj/machinery/rnd/production/proc/efficient_with(path) - return !ispath(path, /obj/item/stack/sheet) && !ispath(path, /obj/item/stack/ore/bluespace_crystal) + return !ispath(path, /obj/item/stack/sheet) && !ispath(path, /obj/item/stack/ore/bluespace_crystal) && !ispath(path, /obj/item/stack/ducts) /obj/machinery/rnd/production/proc/user_try_print_id(id, amount) if((!istype(linked_console) && requires_console) || !id) diff --git a/tgstation.dme b/tgstation.dme index 5949ee79a7..0c11dca769 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1283,6 +1283,7 @@ #include "code\game\objects\items\stacks\medical.dm" #include "code\game\objects\items\stacks\rods.dm" #include "code\game\objects\items\stacks\stack.dm" +#include "code\game\objects\items\stacks\stack_recipe.dm" #include "code\game\objects\items\stacks\tape.dm" #include "code\game\objects\items\stacks\telecrystal.dm" #include "code\game\objects\items\stacks\tickets.dm" From 77969d5e2eb0c9d816a1970b16c6d290d946439d Mon Sep 17 00:00:00 2001 From: SandPoot Date: Tue, 21 Feb 2023 20:43:48 -0300 Subject: [PATCH 5/7] yes --- code/modules/power/solar.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 67ab3817ae..0f0f853036 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -245,6 +245,7 @@ S = S.split_stack(amount=2) if(S) glass_type = S + S.moveToNullspace() playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE) user.visible_message("[user] places the glass on the solar assembly.", "You place the glass on the solar assembly.") if(tracker) From b2f7fc5a9e95f5c9d08db588767fcd73ce48a890 Mon Sep 17 00:00:00 2001 From: SandPoot Date: Fri, 24 Feb 2023 01:07:27 -0300 Subject: [PATCH 6/7] over action buttons also very cool you guy that hates my fancy hints, hope you know how to do everything --- code/__DEFINES/layers_planes.dm | 3 +++ code/__DEFINES/screentips.dm | 10 ++++++++++ code/_onclick/hud/screentip.dm | 1 + code/game/atoms.dm | 2 +- code/modules/client/preferences.dm | 11 +++-------- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/layers_planes.dm b/code/__DEFINES/layers_planes.dm index fd841ba258..b4c616243f 100644 --- a/code/__DEFINES/layers_planes.dm +++ b/code/__DEFINES/layers_planes.dm @@ -193,3 +193,6 @@ #define SPLASHSCREEN_LAYER 90 #define SPLASHSCREEN_PLANE 90 #define SPLASHSCREEN_RENDER_TARGET "SPLASHSCREEN_PLANE" + +///Layer for screentips +#define SCREENTIP_LAYER 40 diff --git a/code/__DEFINES/screentips.dm b/code/__DEFINES/screentips.dm index 4918db85ce..e9615bb4ee 100644 --- a/code/__DEFINES/screentips.dm +++ b/code/__DEFINES/screentips.dm @@ -31,5 +31,15 @@ /// Screentips are only enabled when they have context #define SCREENTIP_PREFERENCE_CONTEXT_ONLY "Only with tips" +/// Screentips enabled, no context +#define SCREENTIP_PREFERENCE_NO_CONTEXT "Enabled without tips" + /// Regardless of intent #define INTENT_ANY "any" + +GLOBAL_LIST_INIT(screentip_pref_options, list( + SCREENTIP_PREFERENCE_DISABLED, + SCREENTIP_PREFERENCE_ENABLED, + SCREENTIP_PREFERENCE_CONTEXT_ONLY, + SCREENTIP_PREFERENCE_NO_CONTEXT +)) diff --git a/code/_onclick/hud/screentip.dm b/code/_onclick/hud/screentip.dm index 43b728ade6..5128448561 100644 --- a/code/_onclick/hud/screentip.dm +++ b/code/_onclick/hud/screentip.dm @@ -6,6 +6,7 @@ maptext_height = 480 maptext_width = 480 maptext = "" + layer = SCREENTIP_LAYER /atom/movable/screen/screentip/Initialize(mapload, _hud) . = ..() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 896aa8c459..fa3ff72904 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1468,7 +1468,7 @@ var/extra_lines = 0 var/extra_context = "" - if (isliving(user) || isovermind(user) || isaicamera(user)) + if ((isliving(user) || isovermind(user) || isaicamera(user)) && (user.client.prefs.screentip_pref != SCREENTIP_PREFERENCE_NO_CONTEXT)) var/obj/item/held_item = user.get_active_held_item() var/allow_images = user.client.prefs.screentip_allow_images diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 744ab254ae..dbf1bfc22c 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2917,14 +2917,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(pickedOutlineColor != pickedOutlineColor) outline_color = pickedOutlineColor // nullable if("screentip_pref") - var/choice = tgalert(user, "Choose your screentip preference", "Screentipping?", "Yes", "Context Only", "No") - switch(choice) - if("Yes") - screentip_pref = SCREENTIP_PREFERENCE_ENABLED - if("Context Only") - screentip_pref = SCREENTIP_PREFERENCE_CONTEXT_ONLY - else - screentip_pref = SCREENTIP_PREFERENCE_DISABLED + var/choice = input(user, "Choose your screentip preference", "Screentipping?", screentip_pref) as null|anything in GLOB.screentip_pref_options + if(choice) + screentip_pref = choice if("screentip_color") var/pickedScreentipColor = input(user, "Choose your screentip color.", "General Preference", screentip_color) as color|null if(pickedScreentipColor) From cc8d385371467a0bd81eba2b868364c699f7a76b Mon Sep 17 00:00:00 2001 From: SandPoot Date: Fri, 24 Feb 2023 01:11:12 -0300 Subject: [PATCH 7/7] sanity --- code/modules/client/preferences_savefile.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 55c2ede248..1f29cb4515 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -543,6 +543,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car modless_key_bindings = sanitize_islist(modless_key_bindings, list()) favorite_outfits = SANITIZE_LIST(favorite_outfits) screentip_color = sanitize_hexcolor(screentip_color, 6, 1, initial(screentip_color)) + screentip_pref = sanitize_inlist(screentip_pref, GLOB.screentip_pref_options, SCREENTIP_PREFERENCE_ENABLED) verify_keybindings_valid() // one of these days this will runtime and you'll be glad that i put it in a different proc so no one gets their saves wiped