From b1779c5313c4d107c09ab6647432a76a695f0b96 Mon Sep 17 00:00:00 2001 From: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Date: Fri, 2 Aug 2024 00:22:27 +1000 Subject: [PATCH 01/19] [NO GBP] shoving someone over onto a table and knocking them down causes them to be shove stun vulnerable. (#85439) ## About The Pull Request If you shove someone onto a table, you can then shove them again for a stun. This is NOT true if you tableslam someone (aggro grab and then click on a table with combat mode activated). ## Why It's Good For The Game I actually assumed (foolishly) that this was already possible but as it turns out, it is handled by separate procs from the main shoving proc. That's my bad. This was intended to make you vulnerable to a stun when I made changes here https://github.com/tgstation/tgstation/pull/84640 ## Changelog :cl: fix: Shoving someone onto a table now causes them to become vulnerable to being stunned. /:cl: --- code/game/objects/structures/tables_racks.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 895660fafa44c..8dc8d82ff5f7d 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -356,6 +356,7 @@ if((shove_flags & SHOVE_KNOCKDOWN_BLOCKED) || !(shove_flags & SHOVE_BLOCKED)) return target.Knockdown(SHOVE_KNOCKDOWN_TABLE) + target.apply_status_effect(/datum/status_effect/next_shove_stuns) target.visible_message(span_danger("[shover.name] shoves [target.name] onto \the [src]!"), span_userdanger("You're shoved onto \the [src] by [shover.name]!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), COMBAT_MESSAGE_RANGE, shover) to_chat(shover, span_danger("You shove [target.name] onto \the [src]!")) From dba7f61c26e395523dd36cf48bffd49ccce2e625 Mon Sep 17 00:00:00 2001 From: orange man <61334995+comfyorange@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:22:51 +1200 Subject: [PATCH 02/19] Automatic changelog for PR #85439 [ci skip] --- html/changelogs/AutoChangeLog-pr-85439.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-85439.yml diff --git a/html/changelogs/AutoChangeLog-pr-85439.yml b/html/changelogs/AutoChangeLog-pr-85439.yml new file mode 100644 index 0000000000000..b8d347f6044a0 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-85439.yml @@ -0,0 +1,4 @@ +author: "necromanceranne" +delete-after: True +changes: + - bugfix: "Shoving someone onto a table now causes them to become vulnerable to being stunned." \ No newline at end of file From 523dc774f239afb4765e614cc0a1e7269a52a353 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:24:09 +0300 Subject: [PATCH 03/19] Callouts and MODsuit quick module pickers now track user (#85418) ## About The Pull Request Callout and MODsuit quick picker (Ctrl + MMB) radials are now user-bound, meaning that they won't change their screen position if you move. ## Why It's Good For The Game Those aren't radials bound to specific objects and rather appear at your cursor purely for convenience. In case of callouts this is especially important as you're most likely running while casting them which will make your mouse move over and trigger a random option as you don't have to click to use them. ## Changelog :cl: qol: Callouts and MODsuit quick module pickers now track user /:cl: --- code/_onclick/hud/radial.dm | 17 ++++++++++++----- code/datums/components/callouts.dm | 2 +- code/modules/mod/mod_control.dm | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index dc425083ad896..3bd370120b3a4 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -317,14 +317,14 @@ GLOBAL_LIST_EMPTY(radial_menus) current_page = WRAP(current_page + 1,1,pages+1) update_screen_objects() -/datum/radial_menu/proc/show_to(mob/M) +/datum/radial_menu/proc/show_to(mob/M, offset_x = 0, offset_y = 0) if(current_user) hide() if(!M.client || !anchor) return current_user = M.client //Blank - menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing", layer = RADIAL_BACKGROUND_LAYER) + menu_holder = image(icon='icons/effects/effects.dmi',loc=anchor,icon_state="nothing", layer = RADIAL_BACKGROUND_LAYER, pixel_x = offset_x, pixel_y = offset_y) SET_PLANE_EXPLICIT(menu_holder, ABOVE_HUD_PLANE, M) menu_holder.appearance_flags |= KEEP_APART|RESET_ALPHA|RESET_COLOR|RESET_TRANSFORM menu_holder.vis_contents += elements + close_button @@ -356,7 +356,7 @@ GLOBAL_LIST_EMPTY(radial_menus) Choices should be a list where list keys are movables or text used for element names and return value and list values are movables/icons/images used for element icons */ -/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE, no_repeat_close = FALSE, radial_slice_icon = "radial_slice", autopick_single_option = TRUE, entry_animation = TRUE, click_on_hover = FALSE) +/proc/show_radial_menu(mob/user, atom/anchor, list/choices, uniqueid, radius, datum/callback/custom_check, require_near = FALSE, tooltips = FALSE, no_repeat_close = FALSE, radial_slice_icon = "radial_slice", autopick_single_option = TRUE, entry_animation = TRUE, click_on_hover = FALSE, user_space = FALSE) if(!user || !anchor || !length(choices)) return @@ -379,11 +379,18 @@ GLOBAL_LIST_EMPTY(radial_menus) menu.radius = radius if(istype(custom_check)) menu.custom_check_callback = custom_check - menu.anchor = anchor + menu.anchor = user_space ? user : anchor menu.radial_slice_icon = radial_slice_icon menu.check_screen_border(user) //Do what's needed to make it look good near borders or on hud menu.set_choices(choices, tooltips, click_on_hover) - menu.show_to(user) + var/offset_x = 0 + var/offset_y = 0 + if (user_space) + var/turf/user_turf = get_turf(user) + var/turf/anchor_turf = get_turf(anchor) + offset_x = (anchor_turf.x - user_turf.x) * world.icon_size + anchor.pixel_x - user.pixel_x + offset_y = (anchor_turf.y - user_turf.y) * world.icon_size + anchor.pixel_y - user.pixel_y + menu.show_to(user, offset_x, offset_y) menu.wait(user, anchor, require_near) var/answer = menu.selected_choice qdel(menu) diff --git a/code/datums/components/callouts.dm b/code/datums/components/callouts.dm index 24e7f081fbe78..98d489cc915a9 100644 --- a/code/datums/components/callouts.dm +++ b/code/datums/components/callouts.dm @@ -111,7 +111,7 @@ for(var/datum/callout_option/callout_option as anything in callout_options) callout_items[callout_option] = image(icon = 'icons/hud/radial.dmi', icon_state = callout_option::icon_state) - var/datum/callout_option/selection = show_radial_menu(user, get_turf(clicked_atom), callout_items, entry_animation = FALSE, click_on_hover = TRUE) + var/datum/callout_option/selection = show_radial_menu(user, get_turf(clicked_atom), callout_items, entry_animation = FALSE, click_on_hover = TRUE, user_space = TRUE) if (!selection) return diff --git a/code/modules/mod/mod_control.dm b/code/modules/mod/mod_control.dm index 78ff7e9952bd1..cf91aaf482c22 100644 --- a/code/modules/mod/mod_control.dm +++ b/code/modules/mod/mod_control.dm @@ -537,7 +537,7 @@ radial_anchor = get_turf(user.loc) //they're phased out via some module, anchor the radial on the turf so it may still display if (!isnull(anchor_override)) radial_anchor = anchor_override - var/pick = show_radial_menu(user, radial_anchor, items, custom_check = FALSE, require_near = isnull(anchor_override), tooltips = TRUE) + var/pick = show_radial_menu(user, radial_anchor, items, custom_check = FALSE, require_near = isnull(anchor_override), tooltips = TRUE, user_space = !isnull(anchor_override)) if(!pick) return var/module_reference = display_names[pick] From 7efc9307c5f0240e146c6f4145c8f2b5b892d6ef Mon Sep 17 00:00:00 2001 From: orange man <61334995+comfyorange@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:24:30 +1200 Subject: [PATCH 04/19] Automatic changelog for PR #85418 [ci skip] --- html/changelogs/AutoChangeLog-pr-85418.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-85418.yml diff --git a/html/changelogs/AutoChangeLog-pr-85418.yml b/html/changelogs/AutoChangeLog-pr-85418.yml new file mode 100644 index 0000000000000..bd4b81c32d904 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-85418.yml @@ -0,0 +1,4 @@ +author: "SmArtKar" +delete-after: True +changes: + - qol: "Callouts and MODsuit quick module pickers now track user" \ No newline at end of file From 34da6fa88ad9e32b6b1fc23893c172e2bbb7714e Mon Sep 17 00:00:00 2001 From: Ghom <42542238+Ghommie@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:28:19 +0200 Subject: [PATCH 05/19] Stop clientless lobstrosities from fishing other lobstrosities and the necropolis chest (#85365) ## About The Pull Request So, I've heard something funny happened on a downstream. A lobstrosity fished out another lobstrosity from the plasma river. And later another couple lobstrosities joined the fry, then again and again until it became a gang of over 50 lobstrosities that would absolutely terminate anyone that dared to interrupt their fishing party, as well as their FPS. ![immagine](https://github.com/user-attachments/assets/7be1859e-8201-4c6d-bddb-5f324848379e) I've also blacklisted the single necropolis chest the lava fishing spot has, because it kinda sucks to get that chance to fish it up stolen by some random lobstrosity god-knows-where around the map. ## Why It's Good For The Game Yes, this is very funny. However, getting your FPS butchered by dozens upon dozens of lobstrosities is not, and that's an honest issue. ## Changelog :cl: fix: Stop clientless lobstrosities from fishing other lobstrosities, which in turn can fish other lobstrosities and so on. balance: Stop clientless lobstrosities from fishing the lavaland fishing spot chest. /:cl: --- code/modules/fishing/sources/_fish_source.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/modules/fishing/sources/_fish_source.dm b/code/modules/fishing/sources/_fish_source.dm index feaa93424f9a8..4a0419f98f55f 100644 --- a/code/modules/fishing/sources/_fish_source.dm +++ b/code/modules/fishing/sources/_fish_source.dm @@ -57,6 +57,11 @@ GLOBAL_LIST_INIT(specific_fish_icons, zebra_typecacheof(list( var/explosive_malus = FALSE /// If explosive_malus is true, this will be used to keep track of the turfs where an explosion happened for when we'll spawn the loot. var/list/exploded_turfs + /// Mindless mobs that can fish will never pull up items on this list + var/static/list/profound_fisher_blacklist = typecacheof(list( + /mob/living/basic/mining/lobstrosity, + /obj/structure/closet/crate/necropolis/tendril, + )) /datum/fish_source/New() if(!PERFORM_ALL_TESTS(focus_only/fish_sources_tables)) @@ -276,6 +281,9 @@ GLOBAL_LIST(fishing_property_cache) var/list/fish_list_properties = collect_fish_properties() + + if(HAS_TRAIT(fisherman, TRAIT_PROFOUND_FISHER) && !fisherman.client) + final_table -= profound_fisher_blacklist for(var/result in final_table) final_table[result] *= rod.hook?.get_hook_bonus_multiplicative(result) final_table[result] += rod.hook?.get_hook_bonus_additive(result)//Decide on order here so it can be multiplicative From 14d38fd7a8547f7d97629319d2d4ea96f30e25f5 Mon Sep 17 00:00:00 2001 From: orange man <61334995+comfyorange@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:28:44 +1200 Subject: [PATCH 06/19] Automatic changelog for PR #85365 [ci skip] --- html/changelogs/AutoChangeLog-pr-85365.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-85365.yml diff --git a/html/changelogs/AutoChangeLog-pr-85365.yml b/html/changelogs/AutoChangeLog-pr-85365.yml new file mode 100644 index 0000000000000..281e4890286a1 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-85365.yml @@ -0,0 +1,5 @@ +author: "Ghommie" +delete-after: True +changes: + - bugfix: "Stop clientless lobstrosities from fishing other lobstrosities, which in turn can fish other lobstrosities and so on." + - balance: "Stop clientless lobstrosities from fishing the lavaland fishing spot chest." \ No newline at end of file From a32c65a263eb5c9ceae5187a28ba077183064d70 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 1 Aug 2024 17:45:01 +0300 Subject: [PATCH 07/19] New Uplink UI (#85455) ## About The Pull Request Changes the layout of uplinks, mostly on the Market tab. Made it more compact. Before: ![image](https://github.com/user-attachments/assets/74449e97-ea68-4ae6-b8b9-661a9b40fdad) After: ![image](https://github.com/user-attachments/assets/0babcafb-804f-449e-9777-5ec9ec615bbe) ARnnJe7Oui qKq0kM7YxV ## Why It's Good For The Game Better UX ## Changelog :cl: qol: new uplink UI qol: made it possible to buy a custom amount of TC, instead of bundles with fixed amounts /:cl: --- code/__DEFINES/uplink.dm | 2 +- code/datums/components/uplink.dm | 8 + .../antagonists/traitor/uplink_handler.dm | 15 ++ code/modules/asset_cache/assets/uplink.dm | 3 + code/modules/uplink/uplink_items/bundle.dm | 13 +- .../tgui/interfaces/AntagInfoMalf.tsx | 2 + .../tgui/interfaces/Uplink/GenericUplink.tsx | 187 +++++++++++++----- .../Uplink/PrimaryObjectiveMenu.tsx | 84 ++++---- .../Uplink/calculateDangerLevel.tsx | 5 +- .../packages/tgui/interfaces/Uplink/index.tsx | 168 ++++++++-------- 10 files changed, 308 insertions(+), 179 deletions(-) diff --git a/code/__DEFINES/uplink.dm b/code/__DEFINES/uplink.dm index cdfdf4680f792..929b558dfec47 100644 --- a/code/__DEFINES/uplink.dm +++ b/code/__DEFINES/uplink.dm @@ -36,7 +36,7 @@ /// Typepath used for uplink items which don't actually produce an item (essentially just a placeholder) /// Future todo: Make this not necessary / make uplink items support item-less items natively -#define ABSTRACT_UPLINK_ITEM /obj/effect/gibspawner/generic +#define ABSTRACT_UPLINK_ITEM /obj/item/loot_table_maker /// Lower threshold for which an uplink items's TC cost is considered "low" for spy bounties picking rewards #define SPY_LOWER_COST_THRESHOLD 5 diff --git a/code/datums/components/uplink.dm b/code/datums/components/uplink.dm index a5ff46964bf6f..d831ba2f0d964 100644 --- a/code/datums/components/uplink.dm +++ b/code/datums/components/uplink.dm @@ -227,9 +227,12 @@ for(var/datum/uplink_item/item as anything in uplink_handler.extra_purchasable) if(item.stock_key in stock_list) extra_purchasable_stock[REF(item)] = stock_list[item.stock_key] + var/atom/actual_item = item.item extra_purchasable += list(list( "id" = item.type, "name" = item.name, + "icon" = actual_item.icon, + "icon_state" = actual_item.icon_state, "cost" = item.cost, "desc" = item.desc, "category" = item.category ? initial(item.category.name) : null, @@ -288,6 +291,11 @@ return item = SStraitor.uplink_items_by_type[item_path] uplink_handler.purchase_item(ui.user, item, parent) + if("buy_raw_tc") + if (uplink_handler.telecrystals <= 0) + return + var/desired_amount = tgui_input_number(ui.user, "How many raw telecrystals to buy?", "Buy Raw TC", default = uplink_handler.telecrystals, max_value = uplink_handler.telecrystals) + uplink_handler.purchase_raw_tc(ui.user, desired_amount, parent) if("lock") if(!lockable) return TRUE diff --git a/code/modules/antagonists/traitor/uplink_handler.dm b/code/modules/antagonists/traitor/uplink_handler.dm index f78ddb0247892..2d27f3c4a0eff 100644 --- a/code/modules/antagonists/traitor/uplink_handler.dm +++ b/code/modules/antagonists/traitor/uplink_handler.dm @@ -126,6 +126,21 @@ on_update() return TRUE +/datum/uplink_handler/proc/purchase_raw_tc(mob/user, amount, atom/movable/source) + if(shop_locked) + return FALSE + if(telecrystals < amount) + return FALSE + + telecrystals -= amount + var/tcs = new /obj/item/stack/telecrystal(get_turf(user), amount) + user.put_in_hands(tcs) + + log_uplink("[key_name(user)] purchased [amount] raw telecrystals from [source]'s uplink") + on_update() + return TRUE + + /// Generates objectives for this uplink handler /datum/uplink_handler/proc/generate_objectives() var/potential_objectives_left = maximum_potential_objectives - (length(potential_objectives) + length(active_objectives)) diff --git a/code/modules/asset_cache/assets/uplink.dm b/code/modules/asset_cache/assets/uplink.dm index e85ee1b35b5c1..35a907a234dfa 100644 --- a/code/modules/asset_cache/assets/uplink.dm +++ b/code/modules/asset_cache/assets/uplink.dm @@ -18,10 +18,13 @@ for(var/datum/uplink_item/item_path as anything in subtypesof(/datum/uplink_item)) var/datum/uplink_item/item = new item_path() + var/atom/actual_item = item.item if(item.item) { items += list(list( "id" = item_path, "name" = item.name, + "icon" = actual_item.icon, + "icon_state" = actual_item.icon_state, "cost" = item.cost, "desc" = item.desc, "category" = item.category ? initial(item.category.name) : null, diff --git a/code/modules/uplink/uplink_items/bundle.dm b/code/modules/uplink/uplink_items/bundle.dm index dae6166d49ceb..b6cdc2fd3d657 100644 --- a/code/modules/uplink/uplink_items/bundle.dm +++ b/code/modules/uplink/uplink_items/bundle.dm @@ -40,18 +40,7 @@ // Don't add telecrystals to the purchase_log since // it's just used to buy more items (including itself!) purchase_log_vis = FALSE - -/datum/uplink_item/bundles_tc/telecrystal/five - name = "5 Raw Telecrystals" - desc = "Five telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." - item = /obj/item/stack/telecrystal/five - cost = 5 - -/datum/uplink_item/bundles_tc/telecrystal/twenty - name = "20 Raw Telecrystals" - desc = "Twenty telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." - item = /obj/item/stack/telecrystal/twenty - cost = 20 + purchasable_from = NONE /datum/uplink_item/bundles_tc/bundle_a name = "Syndi-kit Tactical" diff --git a/tgui/packages/tgui/interfaces/AntagInfoMalf.tsx b/tgui/packages/tgui/interfaces/AntagInfoMalf.tsx index e64673ed5a596..078f3e8026fa8 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoMalf.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoMalf.tsx @@ -183,6 +183,8 @@ export const AntagInfoMalf = (props) => { items.push({ id: item.name, name: item.name, + icon: item.icon, + icon_state: item.icon_state, category: category.name, cost: `${item.cost} PT`, desc: item.desc, diff --git a/tgui/packages/tgui/interfaces/Uplink/GenericUplink.tsx b/tgui/packages/tgui/interfaces/Uplink/GenericUplink.tsx index 6f69b6671eb54..c6558321b6948 100644 --- a/tgui/packages/tgui/interfaces/Uplink/GenericUplink.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/GenericUplink.tsx @@ -1,9 +1,13 @@ import { BooleanLike } from 'common/react'; import { useState } from 'react'; +import { Tooltip } from 'tgui-core/components'; +import { useBackend } from '../../backend'; import { Box, Button, + DmIcon, + Icon, Input, NoticeBox, Section, @@ -19,6 +23,7 @@ type GenericUplinkProps = { }; export const GenericUplink = (props: GenericUplinkProps) => { + const { act } = useBackend(); const { currency = 'cr', categories, @@ -36,43 +41,71 @@ export const GenericUplink = (props: GenericUplinkProps) => { }); return ( -
{currency}} - buttons={ - <> - Search - setSearchText(value)} - mx={1} - /> - - - } - > - - {searchText.length === 0 && ( - - + + + + + + + + + +
+ + + ); }; export type Item = { id: string | number; name: string; + icon: string; + icon_state: string; category: string; cost: JSX.Element | string; desc: JSX.Element | string; @@ -109,22 +144,86 @@ export type ItemListProps = { const ItemList = (props: ItemListProps) => { const { compactMode, items, handleBuy } = props; + const fallback = ( + + ); return ( - + {items.map((item, index) => ( - -
handleBuy(item)} - /> - } - > - {compactMode ? null : item.desc} + +
+ + + + + + + + {compactMode ? ( + + + {item.name} + + + + + + + + + + + ) : ( +
handleBuy(item)} + > + {item.cost} + + } + > + + {item.desc} + +
+ )} +
+
))} diff --git a/tgui/packages/tgui/interfaces/Uplink/PrimaryObjectiveMenu.tsx b/tgui/packages/tgui/interfaces/Uplink/PrimaryObjectiveMenu.tsx index ee6e81160d3c3..f0364e88d9fdb 100644 --- a/tgui/packages/tgui/interfaces/Uplink/PrimaryObjectiveMenu.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/PrimaryObjectiveMenu.tsx @@ -12,19 +12,17 @@ export const PrimaryObjectiveMenu = (props: PrimaryObjectiveMenuProps) => { const { act } = useBackend(); const { primary_objectives, final_objective, can_renegotiate } = props; return ( -
-
- - { - 'Agent, your Primary Objectives are as follows. Complete these at all costs.' - } - - - { - 'Completing Secondary Objectives may allow you to aquire additional equipment.' - } - -
+
+ + WELCOME, AGENT. + + + Your Primary Objectives are as follows. Complete these at all costs. + + + Completing Secondary Objectives may allow you to aquire additional + equipment. + {final_objective && ( { )} -
- - {primary_objectives.map((prim_obj, index) => ( - - - - ))} - -
+ + {primary_objectives.map((prim_obj, index) => ( + + + + ))} + {!!can_renegotiate && (
); }; diff --git a/tgui/packages/tgui/interfaces/Uplink/calculateDangerLevel.tsx b/tgui/packages/tgui/interfaces/Uplink/calculateDangerLevel.tsx index e8951e367a9c2..d67dd37391e3e 100644 --- a/tgui/packages/tgui/interfaces/Uplink/calculateDangerLevel.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/calculateDangerLevel.tsx @@ -90,7 +90,7 @@ export const dangerLevelsTooltip = ( color="white" className={value.gradient} style={{ - borderRadius: '5px', + borderRadius: '2px', display: 'inline-block', }} px={0.8} @@ -137,11 +137,12 @@ export const calculateDangerLevel = ( color="white" className={dangerLevel.gradient} style={{ - borderRadius: '5px', + borderRadius: '2px', display: 'inline-block', }} px={0.8} py={0.6} + textAlign="center" > {dangerLevel.title} ({displayedProgression}) diff --git a/tgui/packages/tgui/interfaces/Uplink/index.tsx b/tgui/packages/tgui/interfaces/Uplink/index.tsx index 4949fc94ee7f5..3ed7d34a214ec 100644 --- a/tgui/packages/tgui/interfaces/Uplink/index.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/index.tsx @@ -7,6 +7,7 @@ import { Box, Button, Dimmer, + NoticeBox, Section, Stack, Tabs, @@ -27,6 +28,8 @@ import { PrimaryObjectiveMenu } from './PrimaryObjectiveMenu'; type UplinkItem = { id: string; name: string; + icon: string; + icon_state: string; cost: number; desc: string; category: string; @@ -90,6 +93,8 @@ type ServerData = { type ItemExtraData = Item & { extraData: { ref?: string; + icon: string; + icon_state: string; }; }; @@ -198,7 +203,6 @@ export class Uplink extends Component<{}, UplinkState> { shop_locked, } = data; const { allItems, allCategories, currentTab } = this.state as UplinkState; - const itemsToAdd = [...allItems]; const items: ItemExtraData[] = []; itemsToAdd.push(...extra_purchasable); @@ -224,19 +228,21 @@ export class Uplink extends Component<{}, UplinkState> { items.push({ id: item.id, name: item.name, + icon: item.icon, + icon_state: item.icon_state, category: item.category, desc: ( - - {item.desc} + <> + {item.desc} {(item.lock_other_purchases && ( - + Taking this item will lock you from further purchasing from the marketplace. Additionally, if you have already purchased an item, you will not be able to purchase this. - + )) || null} - + ), cost: ( @@ -259,6 +265,8 @@ export class Uplink extends Component<{}, UplinkState> { (item.lock_other_purchases && purchased_items > 0), extraData: { ref: item.ref, + icon: item.icon, + icon_state: item.icon_state, }, }); } @@ -274,25 +282,14 @@ export class Uplink extends Component<{}, UplinkState> { // Round it and convert it into a percentage progressionPercentage = Math.round(progressionPercentage * 1000) / 10; return ( - - - - -
- - - - SyndOS Version 3.17   - - Connection Secure - - - - WELCOME, AGENT. - - - - + + + + {!!has_progression && ( + +
+ + { } > {/* If we have no progression, - just give them a generic title */} + just give them a generic title */} {has_progression ? calculateDangerLevel(progression_points, false) : calculateDangerLevel(dangerDefault, false)} - - - {telecrystals} TC - - - -
-
- -
- - - - {!!has_objectives && ( - <> - this.setState({ currentTab: 0 })} - > - Primary Objectives - - this.setState({ currentTab: 1 })} - > - Secondary Objectives - - - )} - this.setState({ currentTab: 2 })} - > - Market - - - - {!!lockable && ( - -
-
+ + + + {!!has_objectives && ( + <> + this.setState({ currentTab: 0 })} + > + Primary Objectives + + this.setState({ currentTab: 1 })} + > + Secondary Objectives + + + )} + this.setState({ currentTab: 2 })} + > + Market + + + + + {!!lockable && ( + + + + )} +
+
+
+ )} {(currentTab === 0 && has_objectives && ( { handleRequestObjectives={() => act('regenerate_objectives')} /> )) || ( -
+ <> { @@ -471,7 +483,7 @@ export class Uplink extends Component<{}, UplinkState> { )) || null} -
+ )}
From 296db2a418e2095c8d690c0a720f100b822dd6d9 Mon Sep 17 00:00:00 2001 From: orange man <61334995+comfyorange@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:45:23 +1200 Subject: [PATCH 08/19] Automatic changelog for PR #85455 [ci skip] --- html/changelogs/AutoChangeLog-pr-85455.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-85455.yml diff --git a/html/changelogs/AutoChangeLog-pr-85455.yml b/html/changelogs/AutoChangeLog-pr-85455.yml new file mode 100644 index 0000000000000..a1f747620d5a9 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-85455.yml @@ -0,0 +1,5 @@ +author: "MTandi" +delete-after: True +changes: + - qol: "new uplink UI" + - qol: "made it possible to buy a custom amount of TC, instead of bundles with fixed amounts" \ No newline at end of file From 20361ace133827ba22877bb7827dd858a8e9651d Mon Sep 17 00:00:00 2001 From: Y0SH1M4S73R Date: Thu, 1 Aug 2024 10:45:37 -0400 Subject: [PATCH 09/19] Fixes/improves the Lua UI Slightly (#85447) ## About The Pull Request A couple of fixes/updates watermelon asked for. Of particular note is the ability to suppress logging runtimes that the state was involved in causing. ## Why It's Good For The Game There were a few formatting issues caused by converting the UI to React Typescript. As for suppressing runtime logging, sometimes the runtimes being logged aren't important to the lua code being run, so it would make sense to toggle whether such runtimes should be saved to a state's log. ## Changelog :cl: admin: The layout of the lua editor has been tweaked slightly. admin: In the lua editor, you can now toggle whether to log runtimes the viewed state is involved in. /:cl: --- code/modules/admin/verbs/lua/lua_editor.dm | 6 +- code/modules/admin/verbs/lua/lua_state.dm | 3 + .../tgui/interfaces/LuaEditor/Log.tsx | 14 +- .../tgui/interfaces/LuaEditor/index.tsx | 155 ++++++++++-------- .../tgui/interfaces/LuaEditor/types.ts | 1 + 5 files changed, 99 insertions(+), 80 deletions(-) diff --git a/code/modules/admin/verbs/lua/lua_editor.dm b/code/modules/admin/verbs/lua/lua_editor.dm index c0b37fd87c1ec..a28ae8b40f19b 100644 --- a/code/modules/admin/verbs/lua/lua_editor.dm +++ b/code/modules/admin/verbs/lua/lua_editor.dm @@ -75,6 +75,7 @@ if(last_error) data["lastError"] = last_error last_error = null + data["supressRuntimes"] = current_state.supress_runtimes data["states"] = list() for(var/datum/lua_state/state as anything in SSlua.states) data["states"] += state.display_name @@ -228,7 +229,7 @@ if(result["status"] == "error") last_error = result["message"] arguments.Cut() - return TRUE + return if("resumeTask") var/task_index = params["index"] SSlua.queue_resume(current_state, task_index, arguments) @@ -261,6 +262,9 @@ if("toggleShowGlobalTable") show_global_table = !show_global_table return TRUE + if("toggleSupressRuntimes") + current_state.supress_runtimes = !current_state.supress_runtimes + return TRUE if("nextPage") page = min(page+1, CEILING(current_state.log.len/50, 1)-1) return TRUE diff --git a/code/modules/admin/verbs/lua/lua_state.dm b/code/modules/admin/verbs/lua/lua_state.dm index b3ede12238444..37a60f1fdb5e1 100644 --- a/code/modules/admin/verbs/lua/lua_state.dm +++ b/code/modules/admin/verbs/lua/lua_state.dm @@ -24,6 +24,9 @@ GLOBAL_PROTECT(lua_state_stack) /// Whether the timer.lua script has been included into this lua context state. var/timer_enabled = FALSE + /// Whether to supress logging BYOND runtimes for this state. + var/supress_runtimes = FALSE + /// Callbacks that need to be ran on next tick var/list/functions_to_execute = list() diff --git a/tgui/packages/tgui/interfaces/LuaEditor/Log.tsx b/tgui/packages/tgui/interfaces/LuaEditor/Log.tsx index b4f2b82bb3e9f..be0730a350df1 100644 --- a/tgui/packages/tgui/interfaces/LuaEditor/Log.tsx +++ b/tgui/packages/tgui/interfaces/LuaEditor/Log.tsx @@ -120,8 +120,8 @@ export const Log = (props: LogProps) => { }` : ''} . - - {return_values.length ? ( + {return_values.length ? ( + { }) } /> - ) : ( -
- )} -
+
+ ) : ( +
+ )} ); messageColor = 'green'; @@ -187,7 +187,7 @@ export const Log = (props: LogProps) => { if (chunk) { output = ( <> - {output} + {output}