Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into port-ability-to-change-AI/Robot-laws

This commit is contained in:
Lex
2023-02-26 03:31:15 +03:00
97 changed files with 3077 additions and 1149 deletions
+13 -1
View File
@@ -30029,6 +30029,9 @@
/obj/machinery/keycard_auth{
pixel_y = 25
},
/obj/machinery/computer/bounty{
dir = 4
},
/turf/open/floor/plasteel,
/area/cargo/qm)
"bvG" = (
@@ -54946,6 +54949,15 @@
"gjl" = (
/turf/closed/wall,
/area/cargo/warehouse)
"gkP" = (
/obj/machinery/atmospherics/pipe/simple/supply/hidden{
dir = 4
},
/obj/machinery/computer/bounty{
dir = 8
},
/turf/open/floor/plasteel,
/area/cargo/office)
"gnf" = (
/obj/structure/disposalpipe/segment{
dir = 4
@@ -89992,7 +90004,7 @@ bnG
bnz
bpA
bbR
bkM
gkP
jlm
bud
eyM
@@ -115731,6 +115731,9 @@
/obj/effect/turf_decal/tile/brown{
dir = 4
},
/obj/machinery/computer/bounty{
dir = 8
},
/turf/open/floor/plasteel,
/area/cargo/qm)
"twd" = (
@@ -121630,6 +121633,9 @@
/obj/effect/turf_decal/tile/brown{
dir = 8
},
/obj/machinery/computer/bounty{
dir = 8
},
/turf/open/floor/plasteel,
/area/cargo/office)
"vEI" = (
@@ -65483,6 +65483,7 @@
/obj/effect/turf_decal/tile/brown{
dir = 4
},
/obj/machinery/computer/bounty,
/turf/open/floor/plasteel,
/area/cargo/qm)
"mSd" = (
@@ -72113,6 +72114,7 @@
/obj/effect/turf_decal/tile/brown{
dir = 8
},
/obj/machinery/computer/bounty,
/turf/open/floor/plasteel,
/area/cargo/office)
"qBq" = (
@@ -6773,6 +6773,9 @@
/obj/effect/turf_decal/tile/brown{
dir = 8
},
/obj/machinery/computer/bounty{
dir = 4
},
/turf/open/floor/plasteel,
/area/cargo/storage)
"amw" = (
@@ -21132,6 +21132,9 @@
/obj/machinery/status_display/supply{
pixel_x = -32
},
/obj/machinery/computer/bounty{
dir = 4
},
/turf/open/floor/plasteel,
/area/cargo/office)
"aZk" = (
@@ -22999,6 +23002,9 @@
/obj/effect/turf_decal/tile/brown{
dir = 4
},
/obj/machinery/computer/bounty{
dir = 8
},
/turf/open/floor/plasteel,
/area/cargo/qm)
"bdI" = (
+2
View File
@@ -64,6 +64,8 @@ GLOBAL_LIST_INIT(bitflags, list(
#define NO_RUINS_1 (1<<10)
/// Should this tile be cleaned up and reinserted into an excited group?
#define EXCITED_CLEANUP_1 (1 << 13)
/// Whether or not this atom has contextual screentips when hovered OVER
#define HAS_CONTEXTUAL_SCREENTIPS_1 (1 << 14)
////////////////Area flags\\\\\\\\\\\\\\
/// If it's a valid territory for cult summoning or the CRAB-17 phone to spawn
+2
View File
@@ -17,6 +17,8 @@
#define EXAMINE_SKIP (1<<14) /// Makes the Examine proc not read out this item.
#define IN_STORAGE (1<<15) //is this item in the storage item, such as backpack? used for tooltips
#define HAND_ITEM (1<<16) // If an item is just your hand (circled hand, slapper) and shouldn't block things like riding
/// Has contextual screentips when HOVERING OVER OTHER objects
#define ITEM_HAS_CONTEXTUAL_SCREENTIPS (1 << 17)
/// Integrity defines for clothing (not flags but close enough)
#define CLOTHING_PRISTINE 0 // We have no damage on the clothing
@@ -0,0 +1,7 @@
// signals for painting canvases, tools and the /datum/component/palette component
///from base of /item/proc/set_painting_tool_color(): (chosen_color)
#define COMSIG_PAINTING_TOOL_SET_COLOR "painting_tool_set_color"
/// from base of /item/canvas/ui_data(): (data)
#define COMSIG_PAINTING_TOOL_GET_ADDITIONAL_DATA "painting_tool_get_data"
@@ -0,0 +1,23 @@
/// A "Type-A" contextual screentip interaction.
/// These are used for items that are defined by their behavior. They define their contextual text within *themselves*,
/// not in their targets.
/// Examples include syringes (LMB to inject, RMB to draw) and health analyzers (LMB to scan health/wounds, RMB for chems)
/// Items can override `add_item_context()`, and call `register_item_context()` in order to easily connect to this.
/// Called on /obj/item with a mutable screentip context list, the hovered target, and the mob hovering.
/// A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
/// that map to the action as text.
/// If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
#define COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET "item_requesting_context_for_target"
/// A "Type-B" contextual screentip interaction.
/// These are atoms that are defined by what happens *to* them. These should define contextual text within themselves, and
/// not in their operating tools.
/// Examples include construction objects (LMB with glass to put in screen for computers).
/// Called on /atom with a mutable screentip context list, the item being used, and the mob hovering.
/// A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
/// that map to the action as text.
/// If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
#define COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM "atom_requesting_context_from_item"
/// Tells the contextual screentips system that the list context was mutated.
#define CONTEXTUAL_SCREENTIP_SET (1 << 0)
+3 -1
View File
@@ -46,9 +46,11 @@
#define ITEM_SLOT_HANDCUFFED (1<<18)
/// Legcuff slot (bolas, beartraps)
#define ITEM_SLOT_LEGCUFFED (1<<19)
/// To attach to a jumpsuit
#define ITEM_SLOT_ACCESSORY (1<<20)
/// Total amount of slots
#define SLOTS_AMT 20 // Keep this up to date!
#define SLOTS_AMT 21 // Keep this up to date!
//SLOT GROUP HELPERS
#define ITEM_SLOT_POCKETS (ITEM_SLOT_LPOCKET|ITEM_SLOT_RPOCKET)
+3
View File
@@ -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
+3 -1
View File
@@ -4,10 +4,12 @@
#define LOADOUT_SUBCATEGORY_NONE "Miscellaneous"
#define LOADOUT_SUBCATEGORIES_NONE list("Miscellaneous")
//accessory
#define LOADOUT_CATEGORY_ACCESSORY "Accessory"
//backpack
#define LOADOUT_CATEGORY_BACKPACK "In backpack"
#define LOADOUT_SUBCATEGORY_BACKPACK_GENERAL "General" //basically anything that there's not enough of to have its own subcategory
#define LOADOUT_SUBCATEGORY_BACKPACK_ACCESSORIES "Accessories" //maybe one day someone will make loadouts have accessory compatibility
#define LOADOUT_SUBCATEGORY_BACKPACK_TOYS "Toys"
//neck
#define LOADOUT_CATEGORY_NECK "Neck"
+45
View File
@@ -0,0 +1,45 @@
/// Context applied to LMB actions
#define SCREENTIP_CONTEXT_LMB "LMB"
/// Context applied to RMB actions
#define SCREENTIP_CONTEXT_RMB "RMB"
/// Context applied to Shift-LMB actions
#define SCREENTIP_CONTEXT_SHIFT_LMB "Shift-LMB"
/// Context applied to Ctrl-LMB actions
#define SCREENTIP_CONTEXT_CTRL_LMB "Ctrl-LMB"
/// Context applied to Ctrl-RMB actions
#define SCREENTIP_CONTEXT_CTRL_RMB "Ctrl-RMB"
/// Context applied to Alt-LMB actions
#define SCREENTIP_CONTEXT_ALT_LMB "Alt-LMB"
/// Context applied to Alt-RMB actions
#define SCREENTIP_CONTEXT_ALT_RMB "Alt-RMB"
/// Context applied to Ctrl-Shift-LMB actions
#define SCREENTIP_CONTEXT_CTRL_SHIFT_LMB "Ctrl-Shift-LMB"
/// Screentips are always disabled
#define SCREENTIP_PREFERENCE_DISABLED "Disabled"
/// Screentips are always enabled
#define SCREENTIP_PREFERENCE_ENABLED "Enabled"
/// 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
))
+1
View File
@@ -6,6 +6,7 @@
prefs.copy_to(mannequin)
if(apply_loadout && prefs.parent)
SSjob.equip_loadout(prefs.parent.mob, mannequin, bypass_prereqs = TRUE)
SSjob.post_equip_loadout(prefs.parent.mob, mannequin, bypass_prereqs = TRUE)
if(copy_job)
var/datum/job/highest = prefs.get_highest_job()
if(highest && !istype(highest, /datum/job/ai) && !istype(highest, /datum/job/cyborg))
+30
View File
@@ -0,0 +1,30 @@
#define HINT_ICON_FILE 'icons/UI_Icons/screentips/cursor_hints.dmi'
// Generate intent icons
GLOBAL_LIST_INIT_TYPED(screentip_context_icons, /image, prepare_screentip_context_icons())
/proc/prepare_screentip_context_icons()
. = list()
for(var/state in icon_states(HINT_ICON_FILE))
.[state] = image(HINT_ICON_FILE, icon_state = state)
/*
* # Builds context with each intent for this key
* Args:
* - context = list (REQUIRED)
* - key = string (REQUIRED)
* - allow_image = boolean (not required)
*/
/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)][allow_image ? " " : ""]" : ""]"
var/icon = "[copytext(key, -3)]-[intent]"
if(allow_image)
icon = "\icon[GLOB.screentip_context_icons[icon]]"
LAZYADD(to_add, "[key_help][icon]: [context[key][intent]]")
var/separator = "[allow_image ? " " : " | "]"
return english_list(to_add, "", separator, separator)
#undef HINT_ICON_FILE
+3
View File
@@ -155,6 +155,7 @@ DEFINE_BITFIELD(flags_1, list(
"CAN_BE_DIRTY_1" = CAN_BE_DIRTY_1,
"CONDUCT_1" = CONDUCT_1,
"DEFAULT_RICOCHET_1" = DEFAULT_RICOCHET_1,
"HAS_CONTEXTUAL_SCREENTIPS_1" = HAS_CONTEXTUAL_SCREENTIPS_1,
"HEAR_1" = HEAR_1,
"HOLOGRAM_1" = HOLOGRAM_1,
"INITIALIZED_1" = INITIALIZED_1,
@@ -246,6 +247,7 @@ DEFINE_BITFIELD(item_flags, list(
"IN_STORAGE" = IN_STORAGE,
"ITEM_CAN_BLOCK" = ITEM_CAN_BLOCK,
"ITEM_CAN_PARRY" = ITEM_CAN_PARRY,
"ITEM_HAS_CONTEXTUAL_SCREENTIPS" = ITEM_HAS_CONTEXTUAL_SCREENTIPS,
"NEEDS_PERMIT" = NEEDS_PERMIT,
"NOBLUDGEON" = NOBLUDGEON,
"NO_MAT_REDEMPTION" = NO_MAT_REDEMPTION,
@@ -412,6 +414,7 @@ DEFINE_BITFIELD(sight, list(
))
DEFINE_BITFIELD(slot_flags, list(
"ITEM_SLOT_ACCESSORY" = ITEM_SLOT_ACCESSORY,
"ITEM_SLOT_BACK" = ITEM_SLOT_BACK,
"ITEM_SLOT_BACKPACK" = ITEM_SLOT_BACKPACK,
"ITEM_SLOT_BELT" = ITEM_SLOT_BELT,
+2 -1
View File
@@ -1,5 +1,6 @@
GLOBAL_LIST_INIT(loadout_categories, list(
LOADOUT_CATEGORY_BACKPACK = list(LOADOUT_SUBCATEGORY_BACKPACK_GENERAL, LOADOUT_SUBCATEGORY_BACKPACK_ACCESSORIES, LOADOUT_SUBCATEGORY_BACKPACK_TOYS),
LOADOUT_CATEGORY_ACCESSORY = LOADOUT_SUBCATEGORIES_NONE,
LOADOUT_CATEGORY_BACKPACK = list(LOADOUT_SUBCATEGORY_BACKPACK_GENERAL, LOADOUT_SUBCATEGORY_BACKPACK_TOYS),
LOADOUT_CATEGORY_NECK = list(LOADOUT_SUBCATEGORY_NECK_GENERAL, LOADOUT_SUBCATEGORY_NECK_TIE, LOADOUT_SUBCATEGORY_NECK_SCARVES),
LOADOUT_CATEGORY_MASK = LOADOUT_SUBCATEGORIES_NONE,
LOADOUT_CATEGORY_HANDS = LOADOUT_SUBCATEGORIES_NONE,
@@ -49,6 +49,8 @@ GLOBAL_LIST_INIT(maintenance_loot, list(
/obj/item/radio/off = 2,
/obj/item/t_scanner = 5,
/obj/item/airlock_painter = 1,
/obj/item/airlock_painter/decal = 1,
/obj/item/airlock_painter/decal/tile = 1,
/obj/item/stack/cable_coil/random = 4,
/obj/item/stack/cable_coil/random/five = 6,
/obj/item/stack/medical/suture = 1,
+4 -2
View File
@@ -63,13 +63,15 @@ GLOBAL_LIST_INIT(available_ui_styles, list(
/// This is updated by the preference for cheaper reads than would be
/// had with a proc call, especially on one of the hottest procs in the
/// game (MouseEntered).
var/screentips_enabled = TRUE
// var/screentips_enabled = SCREENTIP_PREFERENCE_ENABLED
/// The color to use for the screentips.
/// This is updated by the preference for cheaper reads than would be
/// had with a proc call, especially on one of the hottest procs in the
/// game (MouseEntered).
var/screentip_color
// var/screentip_color
// We don't actually do proccalls really yet, so let's grab at prefs
var/atom/movable/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = FALSE
+1
View File
@@ -6,6 +6,7 @@
maptext_height = 480
maptext_width = 480
maptext = ""
layer = SCREENTIP_LAYER
/atom/movable/screen/screentip/Initialize(mapload, _hud)
. = ..()
+63 -4
View File
@@ -482,7 +482,7 @@ SUBSYSTEM_DEF(job)
if(job.dresscodecompliant)// CIT CHANGE - dress code compliance
equip_loadout(N, H) // CIT CHANGE - allows players to spawn with loadout items
job.after_spawn(H, M.client, joined_late) // note: this happens before the mob has a key! M will always have a client, H might not.
equip_loadout(N, H, TRUE)//CIT CHANGE - makes players spawn with in-backpack loadout items properly. A little hacky but it works
post_equip_loadout(N, H)//CIT CHANGE - makes players spawn with in-backpack loadout items properly. A little hacky but it works
var/list/tcg_cards
if(ishuman(H))
@@ -684,7 +684,7 @@ SUBSYSTEM_DEF(job)
message_admins(msg)
CRASH(msg)
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff, bypass_prereqs = FALSE, can_drop = TRUE)
/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, bypass_prereqs = FALSE, can_drop = TRUE)
var/mob/the_mob = N
if(!the_mob)
the_mob = M // cause this doesn't get assigned if player is a latejoiner
@@ -702,9 +702,68 @@ SUBSYSTEM_DEF(job)
permitted = FALSE
if(G.donoritem && !G.donator_ckey_check(the_mob.client.ckey))
permitted = FALSE
if(!equipbackpackstuff && G.slot == ITEM_SLOT_BACKPACK)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs
if(G.handle_post_equip)
permitted = FALSE
if(equipbackpackstuff && G.slot != ITEM_SLOT_BACKPACK)//ditto
if(!permitted)
continue
var/obj/item/I = new G.path
if(I)
if(length(i[LOADOUT_COLOR])) //handle loadout colors
//handle polychromic items
if((G.loadout_flags & LOADOUT_CAN_COLOR_POLYCHROMIC) && length(G.loadout_initial_colors))
var/datum/element/polychromic/polychromic = LAZYACCESS(I.comp_lookup, "item_worn_overlays") //stupid way to do it but GetElement does not work for this
if(polychromic && istype(polychromic))
var/list/polychromic_entry = polychromic.colors_by_atom[I]
if(polychromic_entry)
if(polychromic.suits_with_helmet_typecache[I.type]) //is this one of those toggleable hood/helmet things?
polychromic.connect_helmet(I,i[LOADOUT_COLOR])
polychromic.colors_by_atom[I] = i[LOADOUT_COLOR]
I.update_icon()
else
//handle non-polychromic items (they only have one color)
I.add_atom_colour(i[LOADOUT_COLOR][1], FIXED_COLOUR_PRIORITY)
I.update_icon()
//when inputting the data it's already sanitized
if(i[LOADOUT_CUSTOM_NAME])
var/custom_name = i[LOADOUT_CUSTOM_NAME]
I.name = custom_name
if(i[LOADOUT_CUSTOM_DESCRIPTION])
var/custom_description = i[LOADOUT_CUSTOM_DESCRIPTION]
I.desc = custom_description
if(!M.equip_to_slot_if_possible(I, G.slot, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first
if(iscarbon(M))
var/mob/living/carbon/C = M
var/obj/item/storage/backpack/B = C.back
if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE)) // Otherwise, try to put it in the backpack, for carbons.
if(can_drop)
I.forceMove(get_turf(C))
else
qdel(I)
else if(!M.equip_to_slot_if_possible(I, ITEM_SLOT_BACKPACK, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack
if(can_drop)
I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob.
else
qdel(I)
/datum/controller/subsystem/job/proc/post_equip_loadout(mob/dead/new_player/N, mob/living/M, bypass_prereqs = FALSE, can_drop = TRUE)
var/mob/the_mob = N
if(!the_mob)
the_mob = M // cause this doesn't get assigned if player is a latejoiner
var/list/chosen_gear = the_mob.client.prefs.loadout_data["SAVE_[the_mob.client.prefs.loadout_slot]"]
if(the_mob.client && the_mob.client.prefs && (chosen_gear && chosen_gear.len))
if(!ishuman(M))//no silicons allowed
return
for(var/i in chosen_gear)
var/datum/gear/G = istext(i[LOADOUT_ITEM]) ? text2path(i[LOADOUT_ITEM]) : i[LOADOUT_ITEM]
G = GLOB.loadout_items[initial(G.category)][initial(G.subcategory)][initial(G.name)]
if(!G)
continue
var/permitted = TRUE
if(!bypass_prereqs && G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles))
permitted = FALSE
if(G.donoritem && !G.donator_ckey_check(the_mob.client.ckey))
permitted = FALSE
if(!G.handle_post_equip)
permitted = FALSE
if(!permitted)
continue
-1
View File
@@ -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)
+1
View File
@@ -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
+24 -9
View File
@@ -18,21 +18,20 @@
/datum/element/object_reskinning
element_flags = ELEMENT_DETACH
/datum/element/object_reskinning/Attach(datum/target)
/datum/element/object_reskinning/Attach(obj/target)
. = ..()
var/obj/the_obj = target
if(!istype(the_obj))
if(!istype(target))
return ELEMENT_INCOMPATIBLE
if(!islist(the_obj.unique_reskin) || !length(the_obj.unique_reskin))
if(!islist(target.unique_reskin) || !length(target.unique_reskin))
message_admins("[src] was given to an object without any unique reskins, if you really need to, give it a couple skins first.")
return ELEMENT_INCOMPATIBLE
RegisterSignal(the_obj, COMSIG_PARENT_EXAMINE, .proc/on_examine)
RegisterSignal(the_obj, the_obj.reskin_binding, .proc/reskin)
RegisterSignal(target, COMSIG_PARENT_EXAMINE, .proc/on_examine)
RegisterSignal(target, target.reskin_binding, .proc/reskin)
RegisterSignal(target, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, .proc/on_requesting_context_from_item)
/datum/element/object_reskinning/Detach(datum/source, force)
var/obj/being_deleted = source
UnregisterSignal(source, list(COMSIG_PARENT_EXAMINE, being_deleted.reskin_binding))
/datum/element/object_reskinning/Detach(obj/source, force)
UnregisterSignal(source, list(COMSIG_PARENT_EXAMINE, source.reskin_binding, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM))
return ..()
/datum/element/object_reskinning/proc/on_examine(obj/obj, mob/user, list/examine_list)
@@ -102,3 +101,19 @@
if(user.incapacitated())
return FALSE
return TRUE
/datum/element/object_reskinning/proc/on_requesting_context_from_item(
obj/source,
list/context,
obj/item/held_item,
mob/living/user,
)
SIGNAL_HANDLER
if(isnull(held_item))
switch(source.reskin_binding)
if(COMSIG_CLICK_CTRL_SHIFT)
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_SHIFT_LMB], INTENT_ANY, "Reskin PDA")
else
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, "Reskin [source]")
return CONTEXTUAL_SCREENTIP_SET
+136
View File
@@ -0,0 +1,136 @@
# Contextual screentips (and when to not use this folder)
Contextual screentips provide information in the form of text at the top of your screen to inform you of the possibilities of an item. The "contextual" here refers to this being handled entirely through code, what it displays and when is completely up to you.
## The elements (and this folder)
This folder provides several useful shortcuts to be able to handle 95% of situations.
### `/datum/element/contextual_screentip_bare_hands`
This element is used to display screentips **when the user hovers over the object with nothing in their active hand.**
It takes parameters in the form of both non-combat mode and, optionally, combat mode.
Example:
```dm
/obj/machinery/firealarm/Initialize(mapload)
. = ..()
AddElement( \
/datum/element/contextual_screentip_bare_hands, \
lmb_text = list(INTENT_HELP = "Turn on"), \
rmb_text = list(INTENT_HELP = "Turn off"), \
)
```
This will display "LMB: Turn on | RMB: Turn off" when the user hovers over a fire alarm with an empty active hand.
### `/datum/element/contextual_screentip_tools`
This element takes a map of tool behaviors to [context lists](#context-lists). These will be displayed **when the user hovers over the object with an item that has the tool behavior.**
Example:
```dm
/obj/structure/table/Initialize(mapload)
if (!(flags_1 & NODECONSTRUCT_1))
var/static/list/tool_behaviors = list(
TOOL_SCREWDRIVER = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Disassemble"),
),
TOOL_WRENCH = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Deconstruct"),
),
)
AddElement(/datum/element/contextual_screentip_tools, tool_behaviors)
```
This will display "LMB: Deconstruct" when the user hovers over a table with a wrench.
### `/datum/element/contextual_screentip_item_typechecks`
This element takes a map of item typepaths to [context lists](#context-lists). These will be displayed **when the user hovers over the object with the selected item.**
Example:
```dm
/obj/item/restraints/handcuffs/cable/Initialize(mapload)
. = ..()
var/static/list/hovering_item_typechecks = list(
/obj/item/stack/rods = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Craft wired rod"),
),
/obj/item/stack/sheet/iron = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Craft bola"),
),
)
AddElement(/datum/element/contextual_screentip_item_typechecks, hovering_item_typechecks)
```
This will display "LMB: Craft bola" when the user hovers over cable restraints with metal in their hand.
## The basic system (and when to not use this folder)
The basic system acknowledges the following two interactions:
### Self-defining items (Type A)
These are items that are defined by their behavior. These should define their contextual text within themselves, and not in their targets.
- Stun batons (LMB to stun, RMB to harm)
- Syringes (LMB to inject, RMB to draw)
- Health analyzers (LMB to scan for health/wounds [another piece of context], RMB to scans for chemicals)
### Receiving action defining objects (Type B)
These are objects (not necessarily items) that are defined by what happens *to* them. These should define their contextual text within themselves, and not in their operating tools.
- Tables (RMB with wrench to deconstruct)
- Construction objects (LMB with glass to put in screen for computers)
- Carbon copies (RMB to take a copy)
---
Both of these are supported, and can be hooked to through several means.
Note that you **must return `CONTEXTUAL_SCREENTIP_SET` if you change the contextual screentip at all**, otherwise you may not see it.
### `COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET`
This signal is registered on **items**, and receives **the hovering object**, provided in the form of `obj/item/source, list/context, atom/target, mob/living/user`.
### `/atom/proc/register_item_context()`, and `/atom/proc/add_item_context()`
`/atom/proc/add_item_context()` is a proc intended to be overridden to easily create Type-B interactions (ones where atoms are hovered over by items). It receives the exact same arguments as `COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET`: `obj/item/source, list/context, atom/target, mob/living/user`.
In order for your `add_item_context()` method to be run, you **must** call `register_item_context()`.
### `COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM`
This signal is registered on **atoms**, and receives **what the user is hovering with**, provided in the form of `atom/source, list/context, obj/item/held_item, mob/living/user`.
### `/atom/proc/register_context()`, and `/atom/proc/add_context()`
`/atom/proc/add_context()` is a proc intended to be overridden to easily create Type-B interactions (ones where atoms are hovered over by items). It receives the exact same arguments as `COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM`: `atom/source, list/context, obj/item/held_item, mob/living/user`.
In order for your `add_context()` method to be run, you **must** call `register_context()`.
---
When using any of these methods, you will receive a mutable context list.
### Context lists
Context lists are lists with keys mapping from `SCREENTIP_CONTEXT_*` to a string. You can find these keys in `code/__DEFINES/screentips.dm`.
The signals and `add_context()` variants mutate the list directly, while shortcut elements will just have you pass them in directly.
For example:
```dm
context[SCREENTIP_CONTEXT_LMB] = "Open"
context[SCREENTIP_CONTEXT_RMB] = "Destroy"
```
@@ -0,0 +1,92 @@
/// Apply basic contextual screentips when the user hovers over this item with an empty hand.
/// A "Type B" interaction.
/// This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
/datum/element/contextual_screentip_bare_hands
element_flags = ELEMENT_BESPOKE | ELEMENT_DETACH
id_arg_index = 3
/* How to use SandPoot's version of this:
*
* Combat mode will be checked first, then the intents for it, if the
* current intent has not been set it defaults to the first item of the list.
*
* Otherwise if not in combat mode or no messages for it
* will also try to get messages for the current intent
* if failing to, will try to get the first item of the list.
*/
/// If set, the text to show for LMB
var/list/lmb_text
/// If set, the text to show for RMB
var/list/rmb_text
/// If set, the text to show for LMB when in combat mode. Otherwise, defaults to lmb_text.
var/list/lmb_text_combat_mode
/// If set, the text to show for RMB when in combat mode. Otherwise, defaults to rmb_text.
var/list/rmb_text_combat_mode
// If you're curious about `use_named_parameters`, it's because you should use named parameters!
// AddElement(/datum/element/contextual_screentip_bare_hands, lmb_text = list(INTENT_HELP = "Do the thing"))
/datum/element/contextual_screentip_bare_hands/Attach(
datum/target,
use_named_parameters,
lmb_text,
rmb_text,
lmb_text_combat_mode,
rmb_text_combat_mode,
)
. = ..()
if (!isatom(target))
return ELEMENT_INCOMPATIBLE
if (!isnull(use_named_parameters))
CRASH("Use named parameters instead of positional ones.")
src.lmb_text = lmb_text
src.rmb_text = rmb_text
src.lmb_text_combat_mode = lmb_text_combat_mode || lmb_text
src.rmb_text_combat_mode = rmb_text_combat_mode || rmb_text
var/atom/atom_target = target
atom_target.flags_1 |= HAS_CONTEXTUAL_SCREENTIPS_1
RegisterSignal(atom_target, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, .proc/on_requesting_context_from_item)
/datum/element/contextual_screentip_bare_hands/Detach(datum/source, ...)
UnregisterSignal(source, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM)
// We don't remove HAS_CONTEXTUAL_SCREENTIPS_1, since there could be other stuff still hooked to it,
// and being set without signals is not dangerous, just less performant.
// A lot of things don't do this, perhaps make a proc that checks if any signals are still set, and if not,
// remove the flag.
return ..()
/datum/element/contextual_screentip_bare_hands/proc/on_requesting_context_from_item(
datum/source,
list/context,
obj/item/held_item,
mob/living/user,
)
SIGNAL_HANDLER
if (!isnull(held_item))
return NONE
var/combat_mode = SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)
// Combat lmb
if(combat_mode && length(lmb_text_combat_mode))
context[SCREENTIP_CONTEXT_LMB] = lmb_text_combat_mode
// LMB
else if(length(lmb_text))
context[SCREENTIP_CONTEXT_LMB] = lmb_text
// Combat rmb
if(combat_mode && length(rmb_text_combat_mode))
context[SCREENTIP_CONTEXT_RMB] = rmb_text_combat_mode
// RMB
else if(length(rmb_text))
context[SCREENTIP_CONTEXT_RMB] = rmb_text
return CONTEXTUAL_SCREENTIP_SET
@@ -0,0 +1,47 @@
/// Apply basic contextual screentips when the user hovers over this item with a provided item.
/// A "Type B" interaction.
/// This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
/datum/element/contextual_screentip_item_typechecks
element_flags = ELEMENT_BESPOKE | ELEMENT_DETACH
id_arg_index = 2
/// Map of item paths to contexts to usages
var/list/item_paths_to_contexts
/datum/element/contextual_screentip_item_typechecks/Attach(datum/target, item_paths_to_contexts)
. = ..()
if (!isatom(target))
return ELEMENT_INCOMPATIBLE
src.item_paths_to_contexts = item_paths_to_contexts
var/atom/atom_target = target
atom_target.flags_1 |= HAS_CONTEXTUAL_SCREENTIPS_1
RegisterSignal(atom_target, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, .proc/on_requesting_context_from_item)
/datum/element/contextual_screentip_item_typechecks/Detach(datum/source, ...)
UnregisterSignal(source, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM)
// We don't remove HAS_CONTEXTUAL_SCREENTIPS_1, since there could be other stuff still hooked to it,
// and being set without signals is not dangerous, just less performant.
// A lot of things don't do this, perhaps make a proc that checks if any signals are still set, and if not,
// remove the flag.
return ..()
/datum/element/contextual_screentip_item_typechecks/proc/on_requesting_context_from_item(
datum/source,
list/context,
obj/item/held_item,
)
SIGNAL_HANDLER
if (isnull(held_item))
return NONE
for (var/item_path in item_paths_to_contexts)
if (istype(held_item, item_path))
context += item_paths_to_contexts[item_path]
return CONTEXTUAL_SCREENTIP_SET
return NONE
@@ -0,0 +1,57 @@
/// Apply basic contextual screentips when the user hovers over this item with an item of the given tool behavior.
/// A "Type B" interaction.
/// This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
/datum/element/contextual_screentip_sharpness
element_flags = ELEMENT_BESPOKE | ELEMENT_DETACH
id_arg_index = 2
/// If set, the text to show for LMB
var/list/lmb_text
/// If set, the text to show for RMB
var/list/rmb_text
/datum/element/contextual_screentip_sharpness/Attach(datum/target, lmb_text, rmb_text)
. = ..()
if (!isatom(target))
return ELEMENT_INCOMPATIBLE
src.lmb_text = lmb_text
src.rmb_text = rmb_text
var/atom/atom_target = target
atom_target.flags_1 |= HAS_CONTEXTUAL_SCREENTIPS_1
RegisterSignal(atom_target, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, .proc/on_requesting_context_from_item)
/datum/element/contextual_screentip_sharpness/Detach(datum/source, ...)
UnregisterSignal(source, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM)
// We don't remove HAS_CONTEXTUAL_SCREENTIPS_1, since there could be other stuff still hooked to it,
// and being set without signals is not dangerous, just less performant.
// A lot of things don't do this, perhaps make a proc that checks if any signals are still set, and if not,
// remove the flag.
return ..()
/datum/element/contextual_screentip_sharpness/proc/on_requesting_context_from_item(
datum/source,
list/context,
obj/item/held_item,
)
SIGNAL_HANDLER
if (isnull(held_item))
return NONE
var/sharpness = held_item.get_sharpness()
if (!sharpness)
return NONE
if (length(lmb_text))
context[SCREENTIP_CONTEXT_LMB] = lmb_text
if (length(rmb_text))
context[SCREENTIP_CONTEXT_RMB] = rmb_text
return CONTEXTUAL_SCREENTIP_SET
@@ -0,0 +1,48 @@
/// Apply basic contextual screentips when the user hovers over this item with an item of the given tool behavior.
/// A "Type B" interaction.
/// This stacks with other contextual screentip elements, though you may want to register the signal/flag manually at that point for performance.
/datum/element/contextual_screentip_tools
element_flags = ELEMENT_BESPOKE | ELEMENT_DETACH
id_arg_index = 2
/// Map of tool behaviors to contexts to usages
var/list/tool_behaviors
/datum/element/contextual_screentip_tools/Attach(datum/target, tool_behaviors)
. = ..()
if (!isatom(target))
return ELEMENT_INCOMPATIBLE
src.tool_behaviors = tool_behaviors
var/atom/atom_target = target
atom_target.flags_1 |= HAS_CONTEXTUAL_SCREENTIPS_1
RegisterSignal(atom_target, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, .proc/on_requesting_context_from_item)
/datum/element/contextual_screentip_tools/Detach(datum/source, ...)
UnregisterSignal(source, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM)
// We don't remove HAS_CONTEXTUAL_SCREENTIPS_1, since there could be other stuff still hooked to it,
// and being set without signals is not dangerous, just less performant.
// A lot of things don't do this, perhaps make a proc that checks if any signals are still set, and if not,
// remove the flag.
return ..()
/datum/element/contextual_screentip_tools/proc/on_requesting_context_from_item(
datum/source,
list/context,
obj/item/held_item,
)
SIGNAL_HANDLER
if (isnull(held_item))
return NONE
var/tool_behavior = held_item.tool_behaviour
if (!(tool_behavior in tool_behaviors))
return NONE
context += tool_behaviors[tool_behavior]
return CONTEXTUAL_SCREENTIP_SET
+25
View File
@@ -0,0 +1,25 @@
/// Create a "Type-B" contextual screentip interaction, registering to `add_context()`.
/// This will run `add_context()` when the atom is hovered over by an item for context.
/// `add_context()` will *not* be called unless this is run.
/// This is not necessary for Type-B interactions, as you can just apply the flag and register to the signal yourself.
/atom/proc/register_context()
flags_1 |= HAS_CONTEXTUAL_SCREENTIPS_1
RegisterSignal(src, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, .proc/add_context)
/// Creates a "Type-B" contextual screentip interaction.
/// When a user hovers over this, this proc will be called in order
/// to provide context for contextual screentips.
/// You must call `register_context()` in order for this to be registered.
/// A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
/// that map to the action as text.
/// If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
/// `source` can, in all cases, be replaced with `src`, and only exists because this proc directly connects to a signal.
/atom/proc/add_context(
atom/source,
list/context,
obj/item/held_item,
mob/living/user,
)
SIGNAL_HANDLER
return NONE
+29
View File
@@ -0,0 +1,29 @@
/// Create a "Type-A" contextual screentip interaction, registering to `add_item_context()`.
/// This will run `add_item_context()` when the item hovers over another object for context.
/// `add_item_context()` will *not* be called unless this is run.
/// This is not necessary for Type-A interactions, as you can just apply the flag and register to the signal yourself.
/obj/item/proc/register_item_context()
item_flags |= ITEM_HAS_CONTEXTUAL_SCREENTIPS
RegisterSignal(
src,
COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET,
.proc/add_item_context,
)
/// Creates a "Type-A" contextual screentip interaction.
/// When a user hovers over something with this item in hand, this proc will be called in order
/// to provide context for contextual screentips.
/// You must call `register_item_context()` in order for this to be registered.
/// A screentip context list is a list that has context keys (SCREENTIP_CONTEXT_*, from __DEFINES/screentips.dm)
/// that map to the action as text.
/// If you mutate the list in this signal, you must return CONTEXTUAL_SCREENTIP_SET.
/// `source` can, in all cases, be replaced with `src`, and only exists because this proc directly connects to a signal.
/obj/item/proc/add_item_context(
obj/item/source,
list/context,
atom/target,
mob/living/user,
)
SIGNAL_HANDLER
return NONE
+92 -5
View File
@@ -1450,11 +1450,98 @@
/atom/MouseEntered(location, control, params)
. = ..()
// Screentips
var/client/client = usr?.client
var/datum/hud/active_hud = client?.mob?.hud_used
var/mob/user = usr
if(isnull(user) && !user.client)
return
var/datum/hud/active_hud = user.hud_used
if(active_hud)
if(!client.prefs.screentip_pref || (flags_1 & NO_SCREENTIPS_1))
var/screentips_enabled = user.client.prefs.screentip_pref
if(screentips_enabled == SCREENTIP_PREFERENCE_DISABLED || (flags_1 & NO_SCREENTIPS_1))
active_hud.screentip_text.maptext = ""
else
//We inline a MAPTEXT() here, because there's no good way to statically add to a string like this
active_hud.screentip_text.maptext = MAPTEXT("<span style='text-align: center; font-size: 32px; color: [client?.prefs?.screentip_color]'>[name]</span>")
active_hud.screentip_text.maptext_y = 0
var/lmb_rmb_line = ""
var/ctrl_lmb_ctrl_rmb_line = ""
var/alt_lmb_alt_rmb_line = ""
var/shift_lmb_ctrl_shift_lmb_line = ""
var/extra_lines = 0
var/extra_context = ""
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
if (flags_1 & HAS_CONTEXTUAL_SCREENTIPS_1 || held_item?.item_flags & ITEM_HAS_CONTEXTUAL_SCREENTIPS)
var/list/context = list()
var/contextual_screentip_returns = \
SEND_SIGNAL(src, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, context, held_item, user) \
| (held_item && SEND_SIGNAL(held_item, COMSIG_ITEM_REQUESTING_CONTEXT_FOR_TARGET, context, src, user))
if (contextual_screentip_returns & CONTEXTUAL_SCREENTIP_SET)
// LMB and RMB on one line...
var/lmb_text = ""
if((SCREENTIP_CONTEXT_LMB in context) && (length(context[SCREENTIP_CONTEXT_LMB]) > 0))
lmb_text = build_context(context, SCREENTIP_CONTEXT_LMB, allow_images)
var/rmb_text = ""
if((SCREENTIP_CONTEXT_RMB in context) && (length(context[SCREENTIP_CONTEXT_RMB]) > 0))
rmb_text = build_context(context, SCREENTIP_CONTEXT_RMB, allow_images)
if (lmb_text)
lmb_rmb_line = lmb_text
if (rmb_text)
lmb_rmb_line += " | [allow_images ? " " : ""][rmb_text]"
else if (rmb_text)
lmb_rmb_line = rmb_text
// Ctrl-LMB, Ctrl-RMB on one line...
if (lmb_rmb_line != "")
lmb_rmb_line += "<br>"
extra_lines++
if((SCREENTIP_CONTEXT_CTRL_LMB in context) && (length(context[SCREENTIP_CONTEXT_CTRL_LMB]) > 0))
ctrl_lmb_ctrl_rmb_line = build_context(context, SCREENTIP_CONTEXT_CTRL_LMB, allow_images)
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 += " | [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)
// Alt-LMB, Alt-RMB on one line...
if (ctrl_lmb_ctrl_rmb_line != "")
ctrl_lmb_ctrl_rmb_line += "<br>"
extra_lines++
if((SCREENTIP_CONTEXT_ALT_LMB in context) && (length(context[SCREENTIP_CONTEXT_ALT_LMB]) > 0))
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 += " | [allow_images ? " " : ""]"
alt_lmb_alt_rmb_line = build_context(context, SCREENTIP_CONTEXT_ALT_RMB, allow_images)
// Shift-LMB, Ctrl-Shift-LMB on one line...
if (alt_lmb_alt_rmb_line != "")
alt_lmb_alt_rmb_line += "<br>"
extra_lines++
if((SCREENTIP_CONTEXT_SHIFT_LMB in context) && (length(context[SCREENTIP_CONTEXT_SHIFT_LMB]) > 0))
shift_lmb_ctrl_shift_lmb_line = build_context(context, SCREENTIP_CONTEXT_SHIFT_LMB, allow_images)
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 += " | [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)
if (shift_lmb_ctrl_shift_lmb_line != "")
extra_lines++
if(extra_lines)
extra_context = "<br><span style='font-size: 7px'>[lmb_rmb_line][ctrl_lmb_ctrl_rmb_line][alt_lmb_alt_rmb_line][shift_lmb_ctrl_shift_lmb_line]</span>"
//first extra line pushes atom name line up 10px, subsequent lines push it up 9px, this offsets that and keeps the first line in the same place
active_hud.screentip_text.maptext_y = -10 + (extra_lines - 1) * -9
if (screentips_enabled == SCREENTIP_PREFERENCE_CONTEXT_ONLY && extra_context == "")
active_hud.screentip_text.maptext = ""
else
//We inline a MAPTEXT() here, because there's no good way to statically add to a string like this
active_hud.screentip_text.maptext = "<span class='maptext' style='text-align: center; font-size: 32px; color: [user.client.prefs.screentip_color]'>[name][extra_context]</span>"
+10
View File
@@ -604,6 +604,16 @@
animate(time = 1)
animate(alpha = 0, time = 3, easing = CIRCULAR_EASING|EASE_OUT)
/// Common proc used by painting tools like spraycans and palettes that can access the entire 24 bits color space.
/obj/item/proc/pick_painting_tool_color(mob/user, default_color)
var/chosen_color = input(user,"Pick new color", "[src]", default_color) as color|null
if(!chosen_color || QDELETED(src) || IS_DEAD_OR_INCAP(user) || !user.is_holding(src))
return
set_painting_tool_color(chosen_color)
/obj/item/proc/set_painting_tool_color(chosen_color)
SEND_SIGNAL(src, COMSIG_PAINTING_TOOL_SET_COLOR, chosen_color)
/atom/movable/vv_get_dropdown()
. = ..()
. += "<option value='?_src_=holder;[HrefToken()];adminplayerobservefollow=[REF(src)]'>Follow</option>"
+84 -75
View File
@@ -697,6 +697,42 @@
. += "<span class='notice'>Alt-click [src] to [ secondsElectrified ? "un-electrify" : "permanently electrify"] it.</span>"
. += "<span class='notice'>Ctrl-Shift-click [src] to [ emergency ? "disable" : "enable"] emergency access.</span>"
/obj/machinery/door/airlock/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if(istype(held_item, /obj/item/stack/sheet/plasteel))
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Reinforce")
return CONTEXTUAL_SCREENTIP_SET
switch (held_item?.tool_behaviour)
if (TOOL_CROWBAR)
if (panel_open)
if (security_level == AIRLOCK_SECURITY_PLASTEEL_O_S || security_level == AIRLOCK_SECURITY_PLASTEEL_I_S)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Remove shielding")
return CONTEXTUAL_SCREENTIP_SET
else if (should_try_removing_electronics())
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Remove electronics")
return CONTEXTUAL_SCREENTIP_SET
// Not always contextually true, but is contextually false in ways that make gameplay interesting.
// For example, trying to pry open an airlock, only for the bolts to be down and the lights off.
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Pry open")
return CONTEXTUAL_SCREENTIP_SET
if (TOOL_WELDER)
LAZYSET(context[SCREENTIP_CONTEXT_RMB], INTENT_ANY, "Weld shut")
if (panel_open)
switch (security_level)
if (AIRLOCK_SECURITY_METAL, AIRLOCK_SECURITY_PLASTEEL_I, AIRLOCK_SECURITY_PLASTEEL_O)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Cut shielding")
return CONTEXTUAL_SCREENTIP_SET
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Repair")
return CONTEXTUAL_SCREENTIP_SET
return .
/obj/machinery/door/airlock/attack_ai(mob/user)
if(!src.canAIControl(user))
if(src.canAIHack())
@@ -1024,6 +1060,31 @@
return
return !operating && density
/// Returns if a crowbar would remove the airlock electronics
/obj/machinery/door/airlock/proc/should_try_removing_electronics()
if (security_level != 0)
return FALSE
if (!panel_open)
return FALSE
if (obj_flags & EMAGGED)
return TRUE
if (!density)
return FALSE
if (!welded)
return FALSE
if (hasPower())
return FALSE
if (locked)
return FALSE
return TRUE
/obj/machinery/door/airlock/try_to_crowbar(obj/item/I, mob/living/user)
var/beingcrowbarred = null
if(I.tool_behaviour == TOOL_CROWBAR)
@@ -1042,9 +1103,9 @@
charge.forceMove(get_turf(user))
charge = null
return
if(beingcrowbarred && panel_open && ((obj_flags & EMAGGED) || (density && welded && !operating && !hasPower() && !locked)))
user.visible_message("[user] removes the electronics from the airlock assembly.", \
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
if(beingcrowbarred && should_try_removing_electronics() && !operating)
user.visible_message(span_notice("[user] removes the electronics from the airlock assembly."), \
span_notice("You start to remove electronics from the airlock assembly..."))
if(I.use_tool(src, user, 40, volume=100))
deconstruct(TRUE, user)
return
@@ -1201,81 +1262,29 @@
locked = TRUE
return
/obj/machinery/door/airlock/proc/change_paintjob(obj/item/airlock_painter/W, mob/user)
if(!W.can_use(user))
// gets called when a player uses an airlock painter on this airlock
/obj/machinery/door/airlock/proc/change_paintjob(obj/item/airlock_painter/painter, mob/user)
if((!in_range(src, user) && loc != user) || !painter.can_use(user)) // user should be adjacent to the airlock, and the painter should have a toner cartridge that isn't empty
return
var/list/optionlist
if(airlock_material == "glass")
optionlist = list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance")
else
optionlist = list("Standard", "Public", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Freezer", "Science", "Virology", "Mining", "Maintenance", "External", "External Maintenance")
var/paintjob = input(user, "Please select a paintjob for this airlock.") in optionlist
if((!in_range(src, usr) && src.loc != usr) || !W.use_paint(user))
// reads from the airlock painter's `available paintjob` list. lets the player choose a paint option, or cancel painting
var/current_paintjob = tgui_input_list(user, "Paintjob for this airlock", "Customize", sortList(painter.available_paint_jobs))
if(isnull(current_paintjob)) // if the user clicked cancel on the popup, return
return
switch(paintjob)
if("Standard")
icon = 'icons/obj/doors/airlocks/station/public.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly
if("Public")
icon = 'icons/obj/doors/airlocks/station2/glass.dmi'
overlays_file = 'icons/obj/doors/airlocks/station2/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_public
if("Engineering")
icon = 'icons/obj/doors/airlocks/station/engineering.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_eng
if("Atmospherics")
icon = 'icons/obj/doors/airlocks/station/atmos.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_atmo
if("Security")
icon = 'icons/obj/doors/airlocks/station/security.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_sec
if("Command")
icon = 'icons/obj/doors/airlocks/station/command.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_com
if("Medical")
icon = 'icons/obj/doors/airlocks/station/medical.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_med
if("Research")
icon = 'icons/obj/doors/airlocks/station/research.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_research
if("Freezer")
icon = 'icons/obj/doors/airlocks/station/freezer.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_fre
if("Science")
icon = 'icons/obj/doors/airlocks/station/science.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_science
if("Virology")
icon = 'icons/obj/doors/airlocks/station/virology.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_viro
if("Mining")
icon = 'icons/obj/doors/airlocks/station/mining.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_min
if("Maintenance")
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_mai
if("External")
icon = 'icons/obj/doors/airlocks/external/external.dmi'
overlays_file = 'icons/obj/doors/airlocks/external/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_ext
if("External Maintenance")
icon = 'icons/obj/doors/airlocks/station/maintenanceexternal.dmi'
overlays_file = 'icons/obj/doors/airlocks/station/overlays.dmi'
assemblytype = /obj/structure/door_assembly/door_assembly_extmai
var/airlock_type = painter.available_paint_jobs["[current_paintjob]"] // get the airlock type path associated with the airlock name the user just chose
var/obj/machinery/door/airlock/airlock = airlock_type // we need to create a new instance of the airlock and assembly to read vars from them
var/obj/structure/door_assembly/assembly = initial(airlock.assemblytype)
if(airlock_material == "glass" && initial(assembly.noglass)) // prevents painting glass airlocks with a paint job that doesn't have a glass version, such as the freezer
to_chat(user, span_warning("This paint job can only be applied to non-glass airlocks."))
return
// applies the user-chosen airlock's icon, overlays and assemblytype to the src airlock
painter.use_paint(user)
icon = initial(airlock.icon)
overlays_file = initial(airlock.overlays_file)
assemblytype = initial(airlock.assemblytype)
update_icon()
/obj/machinery/door/airlock/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller)
+8
View File
@@ -55,6 +55,13 @@
if(!poddoor)
. += "<span class='notice'>Its maintenance panel is <b>screwed</b> in place.</span>"
/obj/machinery/door/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if (isnull(held_item) && !istype(src, /obj/machinery/door/firedoor)) // You cannot open/close with your hands
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, (density ? "Open" : "Close"))
return CONTEXTUAL_SCREENTIP_SET
/obj/machinery/door/check_access_list(list/access_list)
if(red_alert_access && GLOB.security_level >= SEC_LEVEL_RED)
return TRUE
@@ -65,6 +72,7 @@
set_init_door_layer()
update_freelook_sight()
air_update_turf(1)
register_context()
GLOB.airlocks += src
spark_system = new /datum/effect_system/spark_spread
spark_system.set_up(2, 1, src)
+28
View File
@@ -46,6 +46,34 @@
else
. += "<span class='notice'>The bolt locks have been <i>unscrewed</i>, but the bolts themselves are still <b>wrenched</b> to the floor.</span>"
/obj/machinery/door/firedoor/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if (isnull(held_item))
if (density)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Knock")
return CONTEXTUAL_SCREENTIP_SET
else
return .
switch (held_item.tool_behaviour)
if (TOOL_CROWBAR)
if(!welded)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, (density ? "Open" : "Close"))
return CONTEXTUAL_SCREENTIP_SET
if (TOOL_WELDER)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, (welded ? "Unweld shut" : "Weld shut"))
return CONTEXTUAL_SCREENTIP_SET
if (TOOL_WRENCH)
if (welded && !boltslocked)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Unfasten bolts")
return CONTEXTUAL_SCREENTIP_SET
if (TOOL_SCREWDRIVER)
if (welded)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, (boltslocked ? "Unlock bolts" : "Lock bolts"))
return CONTEXTUAL_SCREENTIP_SET
return .
/obj/machinery/door/firedoor/proc/CalculateAffectingAreas()
remove_from_areas()
affecting_areas = get_adjacent_open_areas(src) | get_base_area(src)
+10
View File
@@ -51,6 +51,16 @@
myarea = get_base_area(src)
LAZYADD(myarea.firealarms, src)
register_context()
/obj/machinery/firealarm/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if(isnull(held_item))
var/area/location = get_area(src)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, (location.fire ? "Turn off" : "Turn on"))
return CONTEXTUAL_SCREENTIP_SET
/obj/machinery/firealarm/Destroy()
myarea.firereset(src)
LAZYREMOVE(myarea.firealarms, src)
+337 -106
View File
@@ -1,10 +1,11 @@
/obj/item/airlock_painter
name = "airlock painter"
desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob."
// desc_controls = "Alt-Click to remove the ink cartridge."
icon = 'icons/obj/objects.dmi'
icon_state = "paint sprayer"
item_state = "paint sprayer"
icon_state = "paint_sprayer"
item_state = "paint_sprayer" // inhand_icon_state = "paint_sprayer"
// worn_icon_state = "painter"
w_class = WEIGHT_CLASS_SMALL
custom_materials = list(/datum/material/iron=50, /datum/material/glass=50)
@@ -14,40 +15,66 @@
slot_flags = ITEM_SLOT_BELT
usesound = 'sound/effects/spray2.ogg'
/// The ink cartridge to pull charges from.
var/obj/item/toner/ink = null
/// The type path to instantiate for the ink cartridge the device initially comes with, eg. /obj/item/toner
var/initial_ink_type = /obj/item/toner
/// Associate list of all paint jobs the airlock painter can apply. The key is the name of the airlock the user will see. The value is the type path of the airlock
var/list/available_paint_jobs = list(
"Public" = /obj/machinery/door/airlock/public,
"Engineering" = /obj/machinery/door/airlock/engineering,
"Atmospherics" = /obj/machinery/door/airlock/atmos,
"Security" = /obj/machinery/door/airlock/security,
"Command" = /obj/machinery/door/airlock/command,
"Medical" = /obj/machinery/door/airlock/medical,
"Virology" = /obj/machinery/door/airlock/virology,
"Research" = /obj/machinery/door/airlock/research,
// "Hydroponics" = /obj/machinery/door/airlock/hydroponics,
"Freezer" = /obj/machinery/door/airlock/freezer,
"Science" = /obj/machinery/door/airlock/science,
"Mining" = /obj/machinery/door/airlock/mining,
"Maintenance" = /obj/machinery/door/airlock/maintenance,
"External" = /obj/machinery/door/airlock/external,
"External Maintenance"= /obj/machinery/door/airlock/maintenance/external,
"Standard" = /obj/machinery/door/airlock
)
/obj/item/airlock_painter/Initialize(mapload)
. = ..()
ink = new /obj/item/toner(src)
ink = new initial_ink_type(src)
/obj/item/airlock_painter/examine(mob/user)
. = ..()
. += span_notice("Alt-Click to remove the ink cartridge.")
//This proc doesn't just check if the painter can be used, but also uses it.
//Only call this if you are certain that the painter will be used right after this check!
/obj/item/airlock_painter/proc/use_paint(mob/user)
if(can_use(user))
ink.charges--
playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1)
return 1
playsound(src.loc, 'sound/effects/spray2.ogg', 50, TRUE)
return TRUE
else
return 0
return FALSE
//This proc only checks if the painter can be used.
//Call this if you don't want the painter to be used right after this check, for example
//because you're expecting user input.
/obj/item/airlock_painter/proc/can_use(mob/user)
if(!ink)
to_chat(user, "<span class='notice'>There is no toner cartridge installed in [src]!</span>")
return 0
balloon_alert(user, "no cartridge!")
return FALSE
else if(ink.charges < 1)
to_chat(user, "<span class='notice'>[src] is out of ink!</span>")
return 0
balloon_alert(user, "out of ink!")
return FALSE
else
return 1
return TRUE
/obj/item/airlock_painter/suicide_act(mob/user)
/obj/item/airlock_painter/suicide_act(mob/living/user)
var/obj/item/organ/lungs/L = user.getorganslot(ORGAN_SLOT_LUNGS)
if(can_use(user) && L)
user.visible_message("<span class='suicide'>[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message(span_suicide("[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
use(user)
// Once you've inhaled the toner, you throw up your lungs
@@ -64,7 +91,7 @@
if(!L)
return OXYLOSS
L.Remove()
L.Remove(user)
// make some colorful reagent, and apply it to the lungs
L.create_reagents(10, NONE, NO_REAGENTS_VALUE)
@@ -73,27 +100,27 @@
// TODO maybe add some colorful vomit?
user.visible_message("<span class='suicide'>[user] vomits out [user.p_their()] [L]!</span>")
playsound(user.loc, 'sound/effects/splat.ogg', 50, 1)
user.visible_message(span_suicide("[user] vomits out [user.p_their()] [L]!"))
playsound(user.loc, 'sound/effects/splat.ogg', 50, TRUE)
L.forceMove(T)
return (TOXLOSS|OXYLOSS)
else if(can_use(user) && !L)
user.visible_message("<span class='suicide'>[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
user.visible_message(span_suicide("[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide."))
user.reagents.add_reagent(/datum/reagent/colorful_reagent, 1)
user.reagents.reaction(user, TOUCH, 1)
return TOXLOSS
else
user.visible_message("<span class='suicide'>[user] is trying to inhale toner from [src]! It might be a suicide attempt if [src] had any toner.</span>")
user.visible_message(span_suicide("[user] is trying to inhale toner from [src]! It might be a suicide attempt if [src] had any toner."))
return SHAME
/obj/item/airlock_painter/examine(mob/user)
. = ..()
if(!ink)
. += "<span class='notice'>It doesn't have a toner cartridge installed.</span>"
. += span_notice("It doesn't have a toner cartridge installed.")
return
var/ink_level = "high"
if(ink.charges < 1)
@@ -102,88 +129,129 @@
ink_level = "low"
else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit)
ink_level = "dangerously high"
. += "<span class='notice'>Its ink levels look [ink_level].</span>"
. += span_notice("Its ink levels look [ink_level].")
/obj/item/airlock_painter/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/toner))
if(ink)
to_chat(user, "<span class='notice'>[src] already contains \a [ink].</span>")
to_chat(user, span_warning("[src] already contains \a [ink]!"))
return
if(!user.transferItemToLoc(W, src))
return
to_chat(user, "<span class='notice'>You install [W] into [src].</span>")
to_chat(user, span_notice("You install [W] into [src]."))
ink = W
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
else
return ..()
/obj/item/airlock_painter/attack_self(mob/user)
/obj/item/airlock_painter/AltClick(mob/user)
. = ..()
if(ink)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
ink.forceMove(user.drop_location())
user.put_in_hands(ink)
to_chat(user, "<span class='notice'>You remove [ink] from [src].</span>")
to_chat(user, span_notice("You remove [ink] from [src]."))
ink = null
/obj/item/airlock_painter/decal
name = "decal painter"
desc = "An airlock painter, reprogramed to use a different style of paint in order to apply decals for floor tiles as well, in addition to repainting doors. Decals break when the floor tiles are removed. Alt-Click to change design."
desc = "An airlock painter, reprogramed to use a different style of paint in order to apply decals for floor tiles as well, in addition to repainting doors. Decals break when the floor tiles are removed."
// desc_controls = "Alt-Click to remove the ink cartridge."
icon = 'icons/obj/objects.dmi'
icon_state = "decal_sprayer"
item_state = "decalsprayer"
custom_materials = list(/datum/material/iron=2000, /datum/material/glass=500)
item_state = "decal_sprayer" // inhand_icon_state = "decal_sprayer"
custom_materials = list(/datum/material/iron=50, /datum/material/glass=50)
initial_ink_type = /obj/item/toner/large
/// The current direction of the decal being printed
var/stored_dir = 2
var/stored_color = ""
/// The current color of the decal being printed.
var/stored_color = "yellow"
/// The current base icon state of the decal being printed.
var/stored_decal = "warningline"
/// The full icon state of the decal being printed.
var/stored_decal_total = "warningline"
var/color_list = list("","red","white")
var/dir_list = list(1,2,4,8)
var/decal_list = list(list("Warning Line","warningline"),
list("Warning Line Corner","warninglinecorner"),
list("Caution Label","caution"),
list("Directional Arrows","arrows"),
list("Stand Clear Label","stand_clear"),
list("Box","box"),
list("Box Corner","box_corners"),
list("Delivery Marker","delivery"),
list("Warning Box","warn_full"))
/obj/item/airlock_painter/decal/afterattack(atom/target, mob/user, proximity)
. = ..()
var/turf/open/floor/F = target
if(!proximity)
to_chat(user, "<span class='notice'>You need to get closer!</span>")
return
if(use_paint(user) && isturf(F))
F.AddElement(/datum/element/decal, 'icons/turf/decals.dmi', stored_decal_total, stored_dir, CLEAN_STRONG, color, null, null, alpha)
/obj/item/airlock_painter/decal/attack_self(mob/user)
if((ink) && (ink.charges >= 1))
to_chat(user, "<span class='notice'>[src] beeps to prevent you from removing the toner until out of charges.</span>")
return
. = ..()
/obj/item/airlock_painter/decal/AltClick(mob/user)
. = ..()
ui_interact(user)
/// The type path of the spritesheet being used for the frontend.
var/spritesheet_type = /datum/asset/spritesheet/decals // spritesheet containing previews
/// Does this printer implementation support custom colors?
var/supports_custom_color = FALSE
/// Current custom color
var/stored_custom_color
/// List of color options as list(user-friendly label, color value to return)
var/color_list = list(
list("Yellow", "yellow"),
list("Red", "red"),
list("White", "white"),
)
/// List of direction options as list(user-friendly label, dir value to return)
var/dir_list = list(
list("North", NORTH),
list("South", SOUTH),
list("East", EAST),
list("West", WEST),
)
/// List of decal options as list(user-friendly label, icon state base value to return)
var/decal_list = list(
list("Warning Line", "warningline"),
list("Warning Line Corner", "warninglinecorner"),
list("Caution Label", "caution"),
list("Directional Arrows", "arrows"),
list("Stand Clear Label", "stand_clear"),
list("Bot", "bot"),
list("Box", "box"),
list("Box Corner", "box_corners"),
list("Delivery Marker", "delivery"),
list("Warning Box", "warn_full"),
)
// These decals only have a south sprite.
var/nondirectional_decals = list(
"bot",
"box",
"delivery",
"warn_full",
)
/obj/item/airlock_painter/decal/Initialize(mapload)
. = ..()
ink = new /obj/item/toner/large(src)
stored_custom_color = stored_color
/obj/item/airlock_painter/decal/afterattack(atom/target, mob/user, proximity)
. = ..()
if(!proximity)
balloon_alert(user, "get closer!")
return
if(isfloorturf(target) && use_paint(user))
paint_floor(target)
/**
* Actually add current decal to the floor.
*
* Responsible for actually adding the element to the turf for maximum flexibility.area
* Can be overriden for different decal behaviors.
* Arguments:
* * target - The turf being painted to
*/
/obj/item/airlock_painter/decal/proc/paint_floor(turf/open/floor/target)
target.AddElement(/datum/element/decal, 'icons/turf/decals.dmi', stored_decal_total, stored_dir, CLEAN_STRONG, color, null, null, alpha)
/**
* Return the final icon_state for the given decal options
*
* Arguments:
* * decal - the selected decal base icon state
* * color - the selected color
* * dir - the selected dir
*/
/obj/item/airlock_painter/decal/proc/get_decal_path(decal, color, dir)
// Special case due to icon_state names
if(color == "yellow")
color = ""
return "[decal][color ? "_" : ""][color]"
/obj/item/airlock_painter/decal/proc/update_decal_path()
var/yellow_fix = "" //This will have to do until someone refactor's markings.dm
if (stored_color)
yellow_fix = "_"
stored_decal_total = "[stored_decal][yellow_fix][stored_color]"
return
/obj/item/airlock_painter/decal/ui_assets(mob/user)
return list(
get_asset_datum(/datum/asset/spritesheet/decals)
)
stored_decal_total = get_decal_path(stored_decal, stored_color, stored_dir)
/obj/item/airlock_painter/decal/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -191,52 +259,215 @@
ui = new(user, src, "DecalPainter", name)
ui.open()
/obj/item/airlock_painter/decal/ui_assets(mob/user)
. = ..()
. += get_asset_datum(spritesheet_type)
/obj/item/airlock_painter/decal/ui_static_data(mob/user)
. = ..()
var/datum/asset/spritesheet/icon_assets = get_asset_datum(spritesheet_type)
.["icon_prefix"] = "[icon_assets.name]32x32"
.["supports_custom_color"] = supports_custom_color
.["decal_list"] = list()
.["color_list"] = list()
.["dir_list"] = list()
.["nondirectional_decals"] = nondirectional_decals
for(var/decal in decal_list)
.["decal_list"] += list(list(
"name" = decal[1],
"decal" = decal[2],
))
for(var/color in color_list)
.["color_list"] += list(list(
"name" = color[1],
"color" = color[2],
))
for(var/dir in dir_list)
.["dir_list"] += list(list(
"name" = dir[1],
"dir" = dir[2],
))
/obj/item/airlock_painter/decal/ui_data(mob/user)
var/list/data = list()
data["decal_direction"] = stored_dir
data["decal_dir_text"] = dir2text(stored_dir)
data["decal_color"] = stored_color
data["decal_style"] = stored_decal
data["decal_list"] = list()
data["color_list"] = list()
data["dir_list"] = list()
. = ..()
.["current_decal"] = stored_decal
.["current_color"] = stored_color
.["current_dir"] = stored_dir
.["current_custom_color"] = stored_custom_color
for(var/i in decal_list)
data["decal_list"] += list(list(
"name" = i[1],
"decal" = i[2]
))
for(var/j in color_list)
data["color_list"] += list(list(
"colors" = j
))
for(var/k in dir_list)
data["dir_list"] += list(list(
"dirs" = k
))
return data
/obj/item/airlock_painter/decal/ui_act(action,list/params)
if(..())
/obj/item/airlock_painter/decal/ui_act(action, list/params)
. = ..()
if(.)
return
switch(action)
//Lists of decals and designs
if("select decal")
var/selected_decal = params["decals"]
var/selected_decal = params["decal"]
var/selected_dir = text2num(params["dir"])
stored_decal = selected_decal
stored_dir = selected_dir
if("select color")
var/selected_color = params["colors"]
var/selected_color = params["color"]
stored_color = selected_color
if("selected direction")
var/selected_direction = text2num(params["dirs"])
stored_dir = selected_direction
if("pick custom color")
if(supports_custom_color)
pick_painting_tool_color(usr, stored_custom_color)
update_decal_path()
. = TRUE
/obj/item/airlock_painter/decal/set_painting_tool_color(chosen_color)
. = ..()
stored_custom_color = chosen_color
stored_color = chosen_color
/datum/asset/spritesheet/decals
name = "floor_decals"
// cross_round_cachable = TRUE
/// The floor icon used for blend_preview_floor()
var/preview_floor_icon = 'icons/turf/floors.dmi'
/// The floor icon state used for blend_preview_floor()
var/preview_floor_state = "floor"
/// The associated decal painter type to grab decals, colors, etc from.
var/obj/item/airlock_painter/decal/painter_type = /obj/item/airlock_painter/decal
/**
* Underlay an example floor for preview purposes, and return the new icon.
*
* Arguments:
* * decal - the decal to place over the example floor tile
*/
/datum/asset/spritesheet/decals/proc/blend_preview_floor(icon/decal)
var/icon/final = icon(preview_floor_icon, preview_floor_state)
final.Blend(decal, ICON_OVERLAY)
return final
/**
* Insert a specific state into the spritesheet.
*
* Arguments:
* * decal - the given decal base state.
* * dir - the given direction.
* * color - the given color.
*/
/datum/asset/spritesheet/decals/proc/insert_state(decal, dir, color)
// Special case due to icon_state names
var/icon_state_color = color == "yellow" ? "" : color
var/icon/final = blend_preview_floor(icon('icons/turf/decals.dmi', "[decal][icon_state_color ? "_" : ""][icon_state_color]", dir))
Insert("[decal]_[dir]_[color]", final)
/datum/asset/spritesheet/decals/register()
// Must actually create because initial(type) doesn't work for /lists for some reason.
var/obj/item/airlock_painter/decal/painter = new painter_type()
for(var/list/decal in painter.decal_list)
for(var/list/dir in painter.dir_list)
for(var/list/color in painter.color_list)
insert_state(decal[2], dir[2], color[2])
if(painter.supports_custom_color)
insert_state(decal[2], dir[2], "custom")
qdel(painter)
. = ..()
/obj/item/airlock_painter/decal/debug
name = "extreme decal painter"
icon_state = "decal_sprayer_ex"
initial_ink_type = /obj/item/toner/extreme
/obj/item/airlock_painter/decal/debug/Initialize(mapload)
. = ..()
ink = new /obj/item/toner/extreme(src)
/obj/item/airlock_painter/decal/tile
name = "tile sprayer"
desc = "An airlock painter, reprogramed to use a different style of paint in order to spray colors on floor tiles as well, in addition to repainting doors. Decals break when the floor tiles are removed."
// desc_controls = "Alt-Click to remove the ink cartridge."
icon_state = "tile_sprayer"
stored_dir = 2
stored_color = "#D4D4D432"
stored_decal = "tile_corner"
spritesheet_type = /datum/asset/spritesheet/decals/tiles
supports_custom_color = TRUE
// Colors can have a an alpha component as RGBA, or just be RGB and use default alpha
color_list = list(
list("Neutral", "#D4D4D432"),
list("Dark", "#0e0f0f"),
list("Bar Burgundy", "#79150082"),
list("Sec Red", "#DE3A3A"),
list("Cargo Brown", "#A46106"),
list("Engi Yellow", "#EFB341"),
list("Service Green", "#9FED58"),
list("Med Blue", "#52B4E9"),
list("R&D Purple", "#D381C9"),
)
decal_list = list(
list("Corner", "tile_corner"),
list("Half", "tile_half_contrasted"),
list("Opposing Corners", "tile_opposing_corners"),
list("3 Corners", "tile_anticorner_contrasted"),
list("4 Corners", "tile_fourcorners"),
list("Trimline Corner", "trimline_corner_fill"),
list("Trimline Fill", "trimline_fill"),
list("Trimline Fill L", "trimline_fill__8"), // This is a hack that lives in the spritesheet builder and paint_floor
list("Trimline End", "trimline_end_fill"),
list("Trimline Box", "trimline_box_fill"),
)
nondirectional_decals = list(
"tile_fourcorners",
"trimline_box_fill",
)
/// Regex to split alpha out.
var/static/regex/rgba_regex = new(@"(#[0-9a-fA-F]{6})([0-9a-fA-F]{2})")
/// Default alpha for /obj/effect/turf_decal/tile
var/default_alpha = 110
/obj/item/airlock_painter/decal/tile/paint_floor(turf/open/floor/target)
// Account for 8-sided decals.
var/source_decal = stored_decal
var/source_dir = stored_dir
if(copytext(stored_decal, -3) == "__8")
source_decal = splicetext(stored_decal, -3, 0, "")
source_dir = turn(stored_dir, 45)
var/decal_color = stored_color
var/decal_alpha = default_alpha
// Handle the RGBA case.
if(rgba_regex.Find(decal_color))
decal_color = rgba_regex.group[1]
decal_alpha = text2num(rgba_regex.group[2], 16)
target.AddElement(/datum/element/decal, 'icons/turf/decals.dmi', source_decal, source_dir, CLEAN_STRONG, decal_color, null, null, decal_alpha)
/datum/asset/spritesheet/decals/tiles
name = "floor_tile_decals"
painter_type = /obj/item/airlock_painter/decal/tile
/datum/asset/spritesheet/decals/tiles/insert_state(decal, dir, color)
// Account for 8-sided decals.
var/source_decal = decal
var/source_dir = dir
if(copytext(decal, -3) == "__8")
source_decal = splicetext(decal, -3, 0, "")
source_dir = turn(dir, 45)
// Handle the RGBA case.
var/obj/item/airlock_painter/decal/tile/tile_type = painter_type
var/render_color = color
var/render_alpha = initial(tile_type.default_alpha)
if(tile_type.rgba_regex.Find(color))
render_color = tile_type.rgba_regex.group[1]
render_alpha = text2num(tile_type.rgba_regex.group[2], 16)
var/icon/colored_icon = icon('icons/turf/decals.dmi', source_decal, dir=source_dir)
colored_icon.ChangeOpacity(render_alpha * 0.008)
if(color == "custom")
// Do a fun rainbow pattern to stand out while still being static.
colored_icon.Blend(icon('icons/effects/random_spawners.dmi', "rainbow"), ICON_MULTIPLY)
else
colored_icon.Blend(render_color, ICON_MULTIPLY)
colored_icon = blend_preview_floor(colored_icon)
Insert("[decal]_[dir]_[replacetext(color, "#", "")]", colored_icon)
@@ -581,6 +581,10 @@
name = "Supply Request Console (Computer Board)"
build_path = /obj/machinery/computer/cargo/request
/obj/item/circuitboard/computer/bounty
name = "Nanotrasen Bounty Console (Computer Board)"
build_path = /obj/machinery/computer/bounty
/obj/item/circuitboard/computer/ferry
name = "Transport Ferry (Computer Board)"
icon_state = "supply"
@@ -116,6 +116,38 @@ GLOBAL_LIST_EMPTY(PDAs)
if(inserted_item && (!isturf(loc)))
. += "<span class='notice'>Ctrl-click to remove [inserted_item].</span>"
/obj/item/pda/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if(held_item)
if(istype(held_item, /obj/item/cartridge) && !cartridge)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Insert Cartridge")
. = CONTEXTUAL_SCREENTIP_SET
else if(istype(held_item, /obj/item/card/id) && !id)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Insert ID")
. = CONTEXTUAL_SCREENTIP_SET
else if(istype(held_item, /obj/item/paicard) && !pai)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Insert pAI")
. = CONTEXTUAL_SCREENTIP_SET
else if(is_type_in_list(held_item, contained_item) && !inserted_item)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Insert [held_item]")
. = CONTEXTUAL_SCREENTIP_SET
else if(istype(held_item, /obj/item/photo))
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Scan photo")
. = CONTEXTUAL_SCREENTIP_SET
if(id) // ID gets removed before inserted_item
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, "Remove ID")
. = CONTEXTUAL_SCREENTIP_SET
else if(inserted_item)
LAZYSET(context[SCREENTIP_CONTEXT_ALT_LMB], INTENT_ANY, "Remove [inserted_item]")
. = CONTEXTUAL_SCREENTIP_SET
if(inserted_item)
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Remove [inserted_item]")
. = CONTEXTUAL_SCREENTIP_SET
return . || NONE
/obj/item/pda/Initialize(mapload)
if(GLOB.pda_reskins)
unique_reskin = GLOB.pda_reskins
@@ -133,6 +165,8 @@ GLOBAL_LIST_EMPTY(PDAs)
new_overlays = TRUE
update_icon()
register_context()
/obj/item/pda/reskin_obj(mob/M)
. = ..()
new_overlays = TRUE
@@ -91,6 +91,11 @@ GENETICS SCANNER
var/scanmode = SCANMODE_HEALTH
var/advanced = FALSE
/obj/item/healthanalyzer/Initialize(mapload)
. = ..()
register_item_context()
/obj/item/healthanalyzer/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins to analyze [user.p_them()]self with [src]! The display shows that [user.p_theyre()] dead!</span>")
return BRUTELOSS
@@ -130,6 +135,24 @@ GENETICS SCANNER
add_fingerprint(user)
/obj/item/healthanalyzer/add_item_context(
obj/item/source,
list/context,
atom/target,
)
if (!isliving(target))
return NONE
switch (scanmode)
if (SCANMODE_HEALTH)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Scan health")
if (SCANMODE_CHEMICAL)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Scan chemicals")
if (SCANMODE_WOUND)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Scan wounds")
return CONTEXTUAL_SCREENTIP_SET
// Used by the PDA medical scanner too
/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE)
if(isliving(user) && (user.incapacitated() || user.eye_blind))
@@ -549,6 +572,7 @@ GENETICS SCANNER
name = "first aid analyzer"
icon_state = "adv_spectrometer"
desc = "A prototype MeLo-Tech medical scanner used to diagnose injuries and recommend treatment for serious wounds, but offers no further insight into the patient's health. You hope the final version is less annoying to read!"
scanmode = SCANMODE_WOUND // Forces context to give correct tip.
var/next_encouragement
var/greedy
+15
View File
@@ -122,6 +122,21 @@
breakouttime = 300 //Deciseconds = 30s
cuffsound = 'sound/weapons/cablecuff.ogg'
/obj/item/restraints/handcuffs/cable/Initialize(mapload)
. = ..()
var/static/list/hovering_item_typechecks = list(
/obj/item/stack/rods = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Craft wired rod"),
),
/obj/item/stack/sheet/metal = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Craft bola"),
),
)
AddElement(/datum/element/contextual_screentip_item_typechecks, hovering_item_typechecks)
/obj/item/restraints/handcuffs/cable/attack_self(mob/user)
to_chat(user, "<span class='notice'>You start unwinding the cable restraints back into coil</span>")
if(!do_after(user, 25, TRUE, user))
@@ -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)))
-41
View File
@@ -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
@@ -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
+22
View File
@@ -54,6 +54,8 @@
cell = new preload_cell_type(src)
update_icon()
register_item_context()
/obj/item/melee/baton/DoRevenantThrowEffects(atom/target)
switch_status()
@@ -155,6 +157,26 @@
if(!interrupt)
return ..()
/obj/item/melee/baton/add_item_context(datum/source, list/context, atom/target, mob/living/user)
if (isturf(target))
return NONE
if (isobj(target))
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Attack")
else
if (turned_on)
LAZYSET(context[SCREENTIP_CONTEXT_RMB], INTENT_ANY, "Knockdown")
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Stun")
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_HARM, "Harmful stun")
else
LAZYSET(context[SCREENTIP_CONTEXT_RMB], INTENT_ANY, "Knockdown") // DON'T TELL EM, PRANKED.
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_ANY, "Stun") // STILL DO NOT DARE TELLING THEM
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_HARM, "Attack") // It's fine i guess...?
return CONTEXTUAL_SCREENTIP_SET
/obj/item/melee/baton/alt_pre_attack(atom/A, mob/living/user, params)
if(!user.CheckActionCooldown(CLICK_CD_MELEE))
return
+15
View File
@@ -583,6 +583,21 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
wound_bonus = -10
/obj/item/wirerod/Initialize(mapload)
. = ..()
var/static/list/hovering_item_typechecks = list(
/obj/item/shard = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Craft spear"),
),
/obj/item/assembly/igniter = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Craft stunprod"),
),
)
AddElement(/datum/element/contextual_screentip_item_typechecks, hovering_item_typechecks)
/obj/item/wirerod/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/shard))
var/obj/item/spear/S = new /obj/item/spear
+2
View File
@@ -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
@@ -73,7 +73,7 @@
yolk.gib()
QDEL_NULL(egg)
return ..()
/obj/effect/mob_spawn/human/ash_walker
name = "ash walker egg"
desc = "A man-sized yellow egg, spawned from some unfathomable creature. A humanoid silhouette lurks within."
@@ -835,7 +835,8 @@
var/area/A = get_area(src)
var/datum/outfit/O = new /datum/outfit/ghostcafe()
O.equip(new_spawn, FALSE, new_spawn.client)
SSjob.equip_loadout(null, new_spawn, FALSE)
SSjob.equip_loadout(null, new_spawn)
SSjob.post_equip_loadout(null, new_spawn)
SSquirks.AssignQuirks(new_spawn, new_spawn.client, TRUE, TRUE, null, FALSE, new_spawn)
new_spawn.AddElement(/datum/element/ghost_role_eligibility, free_ghosting = TRUE)
new_spawn.AddElement(/datum/element/dusts_on_catatonia)
+24 -1
View File
@@ -37,6 +37,16 @@
smooth = SMOOTH_TRUE
canSmoothWith = list(/obj/structure/table, /obj/structure/table/reinforced, /obj/structure/table/greyscale)
/obj/structure/table/Initialize(mapload)
. = ..()
var/static/list/barehanded_interactions = list(
INTENT_ANY = "Slap",
INTENT_HARM = "Slam"
)
AddElement(/datum/element/contextual_screentip_bare_hands, rmb_text_combat_mode = barehanded_interactions)
/obj/structure/table/examine(mob/user)
. = ..()
. += deconstruction_hints(user)
@@ -490,6 +500,19 @@
// the sprites in the editor to see why.
icon = smooth_icon
if (!(flags_1 & NODECONSTRUCT_1))
var/static/list/tool_behaviors = list(
TOOL_SCREWDRIVER = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Disassemble"),
),
TOOL_WRENCH = list(
SCREENTIP_CONTEXT_LMB = list(INTENT_ANY = "Deconstruct"),
),
)
AddElement(/datum/element/contextual_screentip_tools, tool_behaviors)
/obj/structure/table/wood/fancy/black
icon_state = "fancy_table_black"
buildstack = /obj/item/stack/tile/carpet/black
@@ -704,7 +727,7 @@
. = !density
if(istype(caller))
. = . || (caller.pass_flags & PASSTABLE)
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
. = ..()
if ((!( istype(O, /obj/item) ) || user.get_active_held_item() != O))
@@ -311,14 +311,6 @@
InsertAll("", each, GLOB.alldirs)
..()
/datum/asset/spritesheet/decals
name = "decals"
/datum/asset/spritesheet/decals/register()
for(var/each in list('icons/turf/decals.dmi'))
InsertAll("", each, GLOB.alldirs)
..()
/datum/asset/spritesheet/supplypods
name = "supplypods"
+67
View File
@@ -0,0 +1,67 @@
#define PRINTER_TIMEOUT 10
/obj/machinery/computer/bounty
name = "\improper Nanotrasen bounty console"
desc = "Used to check and claim bounties offered by Nanotrasen"
icon_screen = "bounty"
circuit = /obj/item/circuitboard/computer/bounty
light_color = "#E2853D"//orange
var/printer_ready = 0 //cooldown var
var/static/datum/bank_account/cargocash
/obj/machinery/computer/bounty/Initialize(mapload)
. = ..()
printer_ready = world.time + PRINTER_TIMEOUT
cargocash = SSeconomy.get_dep_account(ACCOUNT_CAR)
/obj/machinery/computer/bounty/proc/print_paper()
new /obj/item/paper/bounty_printout(loc)
/obj/item/paper/bounty_printout
name = "paper - Bounties"
/obj/item/paper/bounty_printout/Initialize(mapload)
. = ..()
info = "<h2>Nanotrasen Cargo Bounties</h2></br>"
update_icon()
for(var/datum/bounty/B in GLOB.bounties_list)
if(B.claimed)
continue
info += {"<h3>[B.name]</h3>
<ul><li>Reward: [B.reward_string()]</li>
<li>Completed: [B.completion_string()]</li></ul>"}
/obj/machinery/computer/bounty/ui_interact(mob/user, datum/tgui/ui)
if(!GLOB.bounties_list.len)
setup_bounties()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "CargoBountyConsole", name)
ui.open()
/obj/machinery/computer/bounty/ui_data(mob/user)
var/list/data = list()
var/list/bountyinfo = list()
for(var/datum/bounty/B in GLOB.bounties_list)
bountyinfo += list(list("name" = B.name, "description" = B.description, "reward_string" = B.reward_string(), "completion_string" = B.completion_string() , "claimed" = B.claimed, "can_claim" = B.can_claim(), "priority" = B.high_priority, "bounty_ref" = REF(B)))
data["stored_cash"] = cargocash.account_balance
data["bountydata"] = bountyinfo
return data
/obj/machinery/computer/bounty/ui_act(action,params)
if(..())
return
switch(action)
if("ClaimBounty")
var/datum/bounty/cashmoney = locate(params["bounty"]) in GLOB.bounties_list
if(cashmoney)
cashmoney.claim()
return TRUE
if("Print")
if(printer_ready < world.time)
printer_ready = world.time + PRINTER_TIMEOUT
print_paper()
return
+11 -3
View File
@@ -62,8 +62,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/UI_style = null
var/outline_enabled = TRUE
var/outline_color = COLOR_THEME_MIDNIGHT
var/screentip_pref = TRUE
var/screentip_pref = SCREENTIP_PREFERENCE_ENABLED
var/screentip_color = "#ffd391"
var/screentip_allow_images = FALSE
var/buttons_locked = FALSE
var/hotkeys = FALSE
@@ -827,8 +828,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>UI Style:</b> <a href='?_src_=prefs;task=input;preference=ui'>[UI_style]</a><br>"
dat += "<b>Outline:</b> <a href='?_src_=prefs;preference=outline_enabled'>[outline_enabled ? "Enabled" : "Disabled"]</a><br>"
dat += "<b>Outline Color:</b> [outline_color ? "<span style='border:1px solid #161616; background-color: [outline_color];'>" : "Theme-based (null)"]&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=outline_color'>Change</a><BR>"
dat += "<b>Screentip:</b> <a href='?_src_=prefs;preference=screentip_pref'>[screentip_pref ? "Enabled" : "Disabled"]</a><br>"
dat += "<b>Screentip:</b> <a href='?_src_=prefs;preference=screentip_pref'>[screentip_pref]</a><br>"
dat += "<b>Screentip Color:</b> <span style='border:1px solid #161616; background-color: [screentip_color];'>&nbsp;&nbsp;&nbsp;</span> <a href='?_src_=prefs;preference=screentip_color'>Change</a><BR>"
dat += "<font style='border-bottom:2px dotted white; cursor:help;'\
title=\"This is an accessibility preference, if disabled, fallbacks to only text which colorblind people can understand better\">\
<b>Screentip context with images:</b></font> <a href='?_src_=prefs;preference=screentip_allow_images'>[screentip_allow_images ? "Allowed" : "Disallowed"]</a><br>"
dat += "<b>tgui Monitors:</b> <a href='?_src_=prefs;preference=tgui_lock'>[(tgui_lock) ? "Primary" : "All"]</a><br>"
dat += "<b>tgui Style:</b> <a href='?_src_=prefs;preference=tgui_fancy'>[(tgui_fancy) ? "Fancy" : "No Frills"]</a><br>"
dat += "<b>Show Runechat Chat Bubbles:</b> <a href='?_src_=prefs;preference=chat_on_map'>[chat_on_map ? "Enabled" : "Disabled"]</a><br>"
@@ -2913,11 +2917,15 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(pickedOutlineColor != pickedOutlineColor)
outline_color = pickedOutlineColor // nullable
if("screentip_pref")
screentip_pref = !screentip_pref
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)
screentip_color = pickedScreentipColor
if("screentip_allow_images")
screentip_allow_images = !screentip_allow_images
if("tgui_lock")
tgui_lock = !tgui_lock
if("winflash")
+11 -1
View File
@@ -5,7 +5,7 @@
// You do not need to raise this if you are adding new values that have sane defaults.
// Only raise this value when changing the meaning/format/name/layout of an existing value
// where you would want the updater procs below to run
#define SAVEFILE_VERSION_MAX 56
#define SAVEFILE_VERSION_MAX 57
/*
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
@@ -56,6 +56,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
be_special -= "NO_ANTAGS"
for(var/be_special_type in be_special)
be_special[be_special_type] = 1
if(current_version < 57)
if(screentip_pref)
screentip_pref = SCREENTIP_PREFERENCE_ENABLED
else
// Let's give it a little chance okay, change if you don't like still.
screentip_pref = SCREENTIP_PREFERENCE_CONTEXT_ONLY
/datum/preferences/proc/update_character(current_version, savefile/S)
if(current_version < 19)
@@ -417,6 +423,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["outline_enabled"] >> outline_enabled
S["screentip_pref"] >> screentip_pref
S["screentip_color"] >> screentip_color
S["screentip_allow_images"] >> screentip_allow_images
S["hotkeys"] >> hotkeys
S["chat_on_map"] >> chat_on_map
S["max_chat_length"] >> max_chat_length
@@ -535,6 +542,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
key_bindings = sanitize_islist(key_bindings, list())
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
@@ -605,6 +614,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["outline_color"], outline_color)
WRITE_FILE(S["screentip_pref"], screentip_pref)
WRITE_FILE(S["screentip_color"], screentip_color)
WRITE_FILE(S["screentip_allow_images"], screentip_allow_images)
WRITE_FILE(S["hotkeys"], hotkeys)
WRITE_FILE(S["chat_on_map"], chat_on_map)
WRITE_FILE(S["max_chat_length"], max_chat_length)
+2 -1
View File
@@ -4,7 +4,8 @@
icon = 'icons/obj/clothing/accessories.dmi'
icon_state = "plasma"
item_state = "" //no inhands
slot_flags = 0
slot_flags = ITEM_SLOT_ACCESSORY
slot_equipment_priority = list(ITEM_SLOT_ACCESSORY)
w_class = WEIGHT_CLASS_SMALL
var/above_suit = FALSE
var/minimize_when_attached = TRUE // TRUE if shown as a small icon in corner, FALSE if overlayed
@@ -9,6 +9,8 @@
/datum/round_event_control/shuttle_catastrophe/canSpawnEvent(players, gamemode)
if(SSshuttle.emergency.name == "Build your own shuttle kit")
return FALSE //don't undo manual player engineering, it also would unload people and ghost them, there's just a lot of problems
if(SSshuttle.emergency.in_flight())
return FALSE //ditto, problems
return ..()
@@ -51,7 +51,8 @@
if(current_tab == LOADOUT_TAB)
//give it its loadout if not on the appearance tab
SSjob.equip_loadout(parent.mob, mannequin, FALSE, bypass_prereqs = TRUE, can_drop = FALSE)
SSjob.equip_loadout(parent.mob, mannequin, bypass_prereqs = TRUE, can_drop = FALSE)
SSjob.post_equip_loadout(parent.mob, mannequin, bypass_prereqs = TRUE, can_drop = FALSE)
else
if(previewJob && equip_job)
mannequin.job = previewJob.title
@@ -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
+1
View File
@@ -8,6 +8,7 @@
GLOB.carbon_list += src
blood_volume = (BLOOD_VOLUME_NORMAL * blood_ratio)
add_movespeed_modifier(/datum/movespeed_modifier/carbon_crawling)
register_context()
/mob/living/carbon/Destroy()
//This must be done first, so the mob ghosts correctly before DNA etc is nulled
@@ -0,0 +1,48 @@
/mob/living/carbon/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if (!isnull(held_item))
return .
if (!ishuman(user))
return .
var/combat_mode = SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_ACTIVE)
if(user == src)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_HELP, "Check injuries")
else if(!lying)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_HELP, "Comfort")
else if (health >= 0 && !HAS_TRAIT(src, TRAIT_FAKEDEATH))
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_HELP, "Shake")
else
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_HELP, "CPR")
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_DISARM, "Disarm")
if(combat_mode && (src != user))
LAZYSET(context[SCREENTIP_CONTEXT_RMB], INTENT_DISARM, "Shove")
if(src != user)
if (pulledby == user)
switch (user.grab_state)
if (GRAB_PASSIVE)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_GRAB, "Grip")
if (GRAB_AGGRESSIVE)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_GRAB, "Choke")
if (GRAB_NECK)
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_GRAB, "Strangle")
else
return .
else
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_GRAB, "Pull")
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_HARM, "Attack")
// Monkeys cannot be grabbed harder using ctrl-click, don't ask.
if((pulledby != user) && (src != user))
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Pull")
// Happens on any intent i believe
if((user == src) && combat_mode && lying)
LAZYSET(context[SCREENTIP_CONTEXT_RMB], INTENT_ANY, "Force to get up")
return CONTEXTUAL_SCREENTIP_SET
@@ -0,0 +1,36 @@
/mob/living/carbon/human/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
. = ..()
if (!ishuman(user))
return .
var/aim_for_mouth = user.zone_selected == "mouth"
var/target_on_help = a_intent == INTENT_HELP
var/target_aiming_for_mouth = zone_selected == "mouth"
var/target_restrained = restrained()
var/same_dir = (dir & user.dir)
var/aim_for_groin = user.zone_selected == "groin"
var/target_aiming_for_groin = zone_selected == "groin"
if(aim_for_mouth && (target_on_help || target_restrained || target_aiming_for_mouth))
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_DISARM, "Slap face")
else if(aim_for_groin && (src == user || lying || same_dir) && (target_on_help || target_restrained || target_aiming_for_groin))
LAZYSET(context[SCREENTIP_CONTEXT_LMB], INTENT_DISARM, "Slap ass")
// Humans can actually be upgrade grabbed using ctrl-click
if(src != user)
if (pulledby == user)
switch (user.grab_state)
if (GRAB_PASSIVE)
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Grip")
if (GRAB_AGGRESSIVE)
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Choke")
if (GRAB_NECK)
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Strangle")
else
return .
else
LAZYSET(context[SCREENTIP_CONTEXT_CTRL_LMB], INTENT_ANY, "Pull")
return CONTEXTUAL_SCREENTIP_SET
@@ -148,6 +148,10 @@
if(ITEM_SLOT_SUITSTORE)
s_store = I
update_inv_s_store()
if(ITEM_SLOT_ACCESSORY)
var/obj/item/clothing/under/attach_target = w_uniform
attach_target.attach_accessory(I, src, TRUE)
// updates handled by attach_accessory
else
to_chat(src, "<span class='danger'>You are trying to equip this item to an unsupported inventory slot. Report this to a coder!</span>")
not_handled = TRUE
@@ -1454,6 +1454,22 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(SEND_SIGNAL(H.back, COMSIG_TRY_STORAGE_CAN_INSERT, I, H, TRUE))
return TRUE
return FALSE
if(ITEM_SLOT_ACCESSORY)
if(istype(H.w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/attaching_target = H.w_uniform
if(attaching_target.attached_accessory)
if(return_warning)
return_warning[1] = "\The [attaching_target] already has an accessory."
return FALSE
if(attaching_target.dummy_thick)
if(return_warning)
return_warning[1] = "\The [attaching_target] is too bulky and cannot have accessories attached to it!"
return FALSE
else
return TRUE
else if(return_warning)
return_warning[1] = "\The [H.w_uniform] cannot have any attachments."
return FALSE
return FALSE //Unsupported slot
/datum/species/proc/equip_delay_self_check(obj/item/I, mob/living/carbon/human/H, bypass_equip_delay_self)
@@ -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)
@@ -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
@@ -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)
@@ -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
@@ -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"
+1 -1
View File
@@ -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
+1
View File
@@ -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("<span class='notice'>[user] places the glass on the solar assembly.</span>", "<span class='notice'>You place the glass on the solar assembly.</span>")
if(tracker)
@@ -92,6 +92,11 @@
category = list("initial","Tools","Tool Designs")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SERVICE
/datum/design/airlock_painter/decal/tile
name = "Tile Sprayer"
id = "tile_sprayer"
build_path = /obj/item/airlock_painter/decal/tile
/datum/design/cultivator
name = "Cultivator"
id = "cultivator"
@@ -17,7 +17,15 @@
build_path = /obj/item/circuitboard/computer/cargo/request
category = list("Computer Boards")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
/datum/design/board/bounty
name = "Computer Design (Bounty Console)"
desc = "Allows for the construction of circuit boards used to build a Bounty Console."
id = "bounty"
build_path = /obj/item/circuitboard/computer/bounty
category = list("Computer Boards")
departmental_flags = DEPARTMENTAL_FLAG_CARGO
/datum/design/board/mining
name = "Computer Design (Outpost Status Display)"
desc = "Allows for the construction of circuit boards used to build an outpost status display console."
@@ -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)
@@ -5,7 +5,7 @@
display_name = "Basic Tools"
description = "Basic mechanical, electronic, surgical and botanical tools."
prereq_ids = list("base")
design_ids = list("screwdriver", "wrench", "wirecutters", "crowbar", "multitool", "welding_tool", "tscanner", "analyzer", "cable_coil", "pipe_painter", "airlock_painter", "decal_painter", "scalpel", "circular_saw", "surgicaldrill", "retractor", "cautery", "hemostat", "cultivator", "plant_analyzer", "shovel", "spade", "hatchet", "mop", "broom", "normtrash", "spraycan")
design_ids = list("screwdriver", "wrench", "wirecutters", "crowbar", "multitool", "welding_tool", "tscanner", "analyzer", "cable_coil", "pipe_painter", "airlock_painter", "decal_painter", "tile_sprayer", "scalpel", "circular_saw", "surgicaldrill", "retractor", "cautery", "hemostat", "cultivator", "plant_analyzer", "shovel", "spade", "hatchet", "mop", "broom", "normtrash", "spraycan")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 500)
/datum/techweb_node/basic_mining
@@ -3,6 +3,8 @@
return
/mob/living/carbon/get_bodypart(zone)
RETURN_TYPE(/obj/item/bodypart)
if(!zone)
zone = BODY_ZONE_CHEST
for(var/X in bodyparts)
Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 57 KiB

@@ -54,9 +54,10 @@
/datum/gear/donator/kiaramedal
name = "Insignia of Steele"
slot = ITEM_SLOT_BACKPACK
slot = ITEM_SLOT_ACCESSORY
path = /obj/item/clothing/accessory/medal/steele
ckeywhitelist = list("inferno707")
handle_post_equip = TRUE
/datum/gear/donator/hheart
name = "The Hollow Heart"
@@ -55,6 +55,7 @@ GLOBAL_LIST_EMPTY(loadout_whitelist_ids)
var/geargroupID //defines the ID that the gear inherits from the config
var/loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION
var/list/loadout_initial_colors = list()
var/handle_post_equip = FALSE
//NEW DONATOR SYTSEM STUFF
var/donoritem //autoset on new if null
@@ -0,0 +1,20 @@
/datum/gear/accessory
category = LOADOUT_CATEGORY_ACCESSORY
slot = ITEM_SLOT_ACCESSORY
handle_post_equip = TRUE
/datum/gear/accessory/necklace
name = "A renameable necklace"
path = /obj/item/clothing/accessory/necklace
/datum/gear/accessory/polymaidapron
name = "Polychromic maid apron"
path = /obj/item/clothing/accessory/maidapron/polychromic
loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION | LOADOUT_CAN_COLOR_POLYCHROMIC
loadout_initial_colors = list("#333333", "#FFFFFF")
/datum/gear/accessory/pridepin
name = "Pride pin"
path = /obj/item/clothing/accessory/pride
loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION
cost = 0
@@ -2,6 +2,7 @@
category = LOADOUT_CATEGORY_BACKPACK
subcategory = LOADOUT_SUBCATEGORY_BACKPACK_GENERAL
slot = ITEM_SLOT_BACKPACK
handle_post_equip = TRUE
/datum/gear/backpack/plushbox
name = "Plushie Choice Box"
@@ -172,25 +173,6 @@
path = /obj/item/storage/fancy/ringbox/diamond
cost = 5
/datum/gear/backpack/necklace //this is here because loadout doesn't support proper accessories
name = "A renameable necklace"
path = /obj/item/clothing/accessory/necklace
subcategory = LOADOUT_SUBCATEGORY_BACKPACK_ACCESSORIES
/datum/gear/backpack/polymaidapron //this is ALSO here because loadout doesn't support proper accessories
name = "Polychromic maid apron"
path = /obj/item/clothing/accessory/maidapron/polychromic
loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION | LOADOUT_CAN_COLOR_POLYCHROMIC
loadout_initial_colors = list("#333333", "#FFFFFF")
subcategory = LOADOUT_SUBCATEGORY_BACKPACK_ACCESSORIES
/datum/gear/backpack/pridepin //what the two comments above said
name = "Pride pin"
path = /obj/item/clothing/accessory/pride
loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION
subcategory = LOADOUT_SUBCATEGORY_BACKPACK_ACCESSORIES
cost = 0
// Moved here from quirks
/datum/gear/backpack/dyespray
name = "Hair dye spray"
+15
View File
@@ -108,6 +108,7 @@
#include "code\__DEFINES\rust_g.dm"
#include "code\__DEFINES\rust_g_overrides.dm"
#include "code\__DEFINES\say.dm"
#include "code\__DEFINES\screentips.dm"
#include "code\__DEFINES\security_levels.dm"
#include "code\__DEFINES\shuttles.dm"
#include "code\__DEFINES\sight.dm"
@@ -156,6 +157,8 @@
#include "code\__DEFINES\dcs\flags.dm"
#include "code\__DEFINES\dcs\helpers.dm"
#include "code\__DEFINES\dcs\signals.dm"
#include "code\__DEFINES\dcs\signals\signals_painting.dm"
#include "code\__DEFINES\dcs\signals\signals_screentips.dm"
#include "code\__DEFINES\dcs\signals\signals_subsystem.dm"
#include "code\__DEFINES\dcs\signals\signals_atom\signals_atom_movement.dm"
#include "code\__DEFINES\dcs\signals\signals_mob\signals_mob_living.dm"
@@ -210,6 +213,7 @@
#include "code\__HELPERS\reagents.dm"
#include "code\__HELPERS\roundend.dm"
#include "code\__HELPERS\sanitize_values.dm"
#include "code\__HELPERS\screentips.dm"
#include "code\__HELPERS\shell.dm"
#include "code\__HELPERS\stat_tracking.dm"
#include "code\__HELPERS\text.dm"
@@ -715,6 +719,10 @@
#include "code\datums\elements\ventcrawling.dm"
#include "code\datums\elements\weather_listener.dm"
#include "code\datums\elements\wuv.dm"
#include "code\datums\elements\screentips\contextual_screentip_bare_hands.dm"
#include "code\datums\elements\screentips\contextual_screentip_item_typechecks.dm"
#include "code\datums\elements\screentips\contextual_screentip_sharpness.dm"
#include "code\datums\elements\screentips\contextual_screentip_tools.dm"
#include "code\datums\helper_datums\events.dm"
#include "code\datums\helper_datums\getrev.dm"
#include "code\datums\helper_datums\icon_snapshot.dm"
@@ -770,6 +778,8 @@
#include "code\datums\ruins\lavaland.dm"
#include "code\datums\ruins\space.dm"
#include "code\datums\ruins\station.dm"
#include "code\datums\screentips\atom_context.dm"
#include "code\datums\screentips\item_context.dm"
#include "code\datums\skills\_check_skills.dm"
#include "code\datums\skills\_skill.dm"
#include "code\datums\skills\_skill_holder.dm"
@@ -1273,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"
@@ -1945,6 +1956,7 @@
#include "code\modules\buildmode\submodes\throwing.dm"
#include "code\modules\buildmode\submodes\variable_edit.dm"
#include "code\modules\cargo\bounty.dm"
#include "code\modules\cargo\bounty_console.dm"
#include "code\modules\cargo\centcom_podlauncher.dm"
#include "code\modules\cargo\console.dm"
#include "code\modules\cargo\coupon.dm"
@@ -2643,6 +2655,7 @@
#include "code\modules\mob\living\brain\status_procs.dm"
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_active_parry.dm"
#include "code\modules\mob\living\carbon\carbon_context.dm"
#include "code\modules\mob\living\carbon\carbon_defense.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\carbon_movement.dm"
@@ -2698,6 +2711,7 @@
#include "code\modules\mob\living\carbon\human\examine.dm"
#include "code\modules\mob\living\carbon\human\human.dm"
#include "code\modules\mob\living\carbon\human\human_block.dm"
#include "code\modules\mob\living\carbon\human\human_context.dm"
#include "code\modules\mob\living\carbon\human\human_defense.dm"
#include "code\modules\mob\living\carbon\human\human_defines.dm"
#include "code\modules\mob\living\carbon\human\human_helpers.dm"
@@ -3817,6 +3831,7 @@
#include "modular_citadel\code\modules\client\loadout\_medical.dm"
#include "modular_citadel\code\modules\client\loadout\_security.dm"
#include "modular_citadel\code\modules\client\loadout\_service.dm"
#include "modular_citadel\code\modules\client\loadout\accessory.dm"
#include "modular_citadel\code\modules\client\loadout\backpack.dm"
#include "modular_citadel\code\modules\client\loadout\glasses.dm"
#include "modular_citadel\code\modules\client\loadout\gloves.dm"
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -14,4 +14,4 @@ preferAggregateCacheInfo: true
preferInteractive: true
yarnPath: .yarn/releases/yarn-3.0.1.cjs
yarnPath: .yarn/releases/yarn-3.4.1.cjs
+2 -2
View File
@@ -38,9 +38,9 @@
"terser-webpack-plugin": "^5.1.4",
"typescript": "^4.3.5",
"url-loader": "^4.1.1",
"webpack": "^5.50.0",
"webpack": "^5.75.0",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^4.7.2"
},
"packageManager": "yarn@3.0.1"
"packageManager": "yarn@3.4.1"
}
@@ -0,0 +1,119 @@
import { useBackend } from '../backend';
import { AnimatedNumber, Box, Button, Section, Table } from '../components';
import { formatMoney } from '../format';
import { Window } from '../layouts';
export const CargoBountyConsole = (props, context) => {
const { act, data } = useBackend(context);
const {
bountydata = [],
} = data;
return (
<Window
width={750}
height={600}
resizable>
<Window.Content scrollable>
<Section
title={<BountyHeader />}
buttons={(
<Button
icon="print"
content="Print Bounty List"
onClick={() => act('Print')} />
)}>
<Table border>
<Table.Row
bold
italic
color="label"
fontSize={1.25}>
<Table.Cell p={1} textAlign="center">
Bounty Object
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Description
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Progress
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Value
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Claim
</Table.Cell>
</Table.Row>
{bountydata.map(bounty => (
<Table.Row
key={bounty.name}
backgroundColor={bounty.priority === 1
? 'rgba(252, 152, 3, 0.25)'
: ''}>
<Table.Cell bold p={1}>
{bounty.name}
</Table.Cell>
<Table.Cell
italic
textAlign="center"
p={1}>
{bounty.description}
</Table.Cell>
<Table.Cell
bold
p={1}
textAlign="center">
{bounty.priority === 1
? <Box>High Priority</Box>
: ""}
{bounty.completion_string}
</Table.Cell>
<Table.Cell
bold
p={1}
textAlign="center">
{bounty.reward_string}
</Table.Cell>
<Table.Cell
bold
p={1}>
<Button
fluid
textAlign="center"
icon={bounty.claimed === 1
? "check"
: ""}
content={bounty.claimed === 1
? "Claimed"
: "Claim"}
disabled={bounty.claimed === 1}
color={bounty.can_claim === 1
? 'green'
: 'red'}
onClick={() => act('ClaimBounty', {
bounty: bounty.bounty_ref,
})} />
</Table.Cell>
</Table.Row>
))}
</Table>
</Section>
</Window.Content>
</Window>
);
};
const BountyHeader = (props, context) => {
const { act, data } = useBackend(context);
const {
stored_cash,
} = data;
return (
<Box inline bold>
<AnimatedNumber
value={stored_cash}
format={value => formatMoney(value)} />
{' credits'}
</Box>
);
};
@@ -1,114 +0,0 @@
import { useBackend } from '../backend';
import { Box, Button, Section } from '../components';
import { Window } from '../layouts';
import { classes } from 'common/react';
export const DecalPainter = (props, context) => {
const { act, data } = useBackend(context);
const decal_list = data.decal_list || [];
const color_list = data.color_list || [];
const dir_list = data.dir_list || [];
return (
<Window
width={500}
height={400}>
<Window.Content>
<Section title="Decal Type">
{decal_list.map(decal => (
<Button
key={decal.decal}
style={{
width: '48px',
height: '48px',
padding: 0,
}}
selected={decal.decal === data.decal_style}
onClick={() => act('select decal', {
decals: decal.decal,
})}>
<Box
className={classes([
'decals32x32',
data.decal_dir_text + '-' + decal.decal + (data.decal_color ? '_' + data.decal_color : ''),
])}
style={{
transform: 'scale(1.5) translate(17%, 17%)',
}} />
</Button>
))}
</Section>
<Section title="Decal Color">
{color_list.map(color => {
return (
<Button
key={color.colors}
style={{
width: '48px',
height: '48px',
padding: 0,
}}
content={color.colors === "red"
? "Red"
: color.colors === "white"
? "White"
: "Yellow"}
selected={color.colors === data.decal_color}
onClick={() => act('select color', {
colors: color.colors,
})}>
<Box
className={classes([
'decals32x32',
data.decal_dir_text + '-' + data.decal_style + (color.colors ? '_' + color.colors : ''),
])}
style={{
transform: 'scale(1.5) translate(17%, 17%)',
}} />
</Button>
);
})}
</Section>
<Section title="Decal Direction">
{dir_list.map(dir => {
return (
<Button
key={dir.dirs}
style={{
width: '48px',
height: '48px',
padding: 0,
}}
tooltip={dir.dirs === 1
? "North"
: dir.dirs === 2
? "South"
: dir.dirs === 4
? "East"
: "West"}
selected={dir.dirs === data.decal_direction}
onClick={() => act('selected direction', {
dirs: dir.dirs,
})}>
<Box
className={classes([
'decals32x32',
(dir.dirs === 1
? "north"
: dir.dirs === 2
? "south"
: dir.dirs === 4
? "east"
: "west")
+ '-' + data.decal_style + (data.decal_color ? '_' + data.decal_color : ''),
])}
style={{
transform: 'scale(1.5) translate(17%, 17%)',
}} />
</Button>
);
})}
</Section>
</Window.Content>
</Window>
);
};
@@ -0,0 +1,162 @@
import { useBackend } from '../backend';
import { Button, ColorBox, Flex, Section } from '../components';
import { Window } from '../layouts';
type DecalInfo = {
name: string;
decal: string;
};
type ColorInfo = {
name: string;
color: string;
};
type DirInfo = {
name: string;
dir: number;
};
type DecalPainterData = {
icon_prefix: string;
decal_list: DecalInfo[];
color_list: ColorInfo[];
dir_list: DirInfo[];
nondirectional_decals: string[];
supports_custom_color: number;
current_decal: string;
current_color: string;
current_dir: number;
current_custom_color: string;
};
const filterBoxColor = (color: string) => {
if (!color.startsWith('#')) {
return color;
}
// cut alpha
return color.substring(0, 7);
};
export const DecalPainter = (props, context) => {
const { act, data } = useBackend<DecalPainterData>(context);
const custom_color_selected = !data.color_list.some(
(color) => color.color === data.current_color
);
const supports_custom_color = !!data.supports_custom_color;
// Handle custom color icon correctly
const preview_color = custom_color_selected ? 'custom' : data.current_color;
return (
<Window width={550} height={400}>
<Window.Content>
<Section title="Decal Color">
{data.color_list.map((color) => {
return (
<Button
key={color.color}
selected={color.color === data.current_color}
onClick={() =>
act('select color', {
color: color.color,
})}>
<ColorBox color={filterBoxColor(color.color)} mr={0.5} />
{color.name}
</Button>
);
})}
{supports_custom_color && (
<Button
selected={custom_color_selected}
onClick={() => act('pick custom color')}>
<ColorBox color={data.current_custom_color} mr={0.5} />
Custom
</Button>
)}
</Section>
<Section title="Decal Style">
<Flex direction="row" wrap="nowrap" align="fill" justify="fill">
{data.decal_list.map((decal) => {
const nondirectional = data.nondirectional_decals.includes(
decal.decal
);
return nondirectional ? (
// Tallll button for nondirectional
<IconButton
key={decal.decal}
decal={decal.decal}
dir={2}
color={preview_color}
label={decal.name}
selected={decal.decal === data.current_decal}
/>
) : (
// 4 buttons for directional
<Flex
key={decal.decal}
direction="column"
wrap="nowrap"
align="fill"
justify="fill">
{data.dir_list.map((dir) => {
const selected
= decal.decal === data.current_decal
&& dir.dir === data.current_dir;
return (
<IconButton
key={dir.dir}
decal={decal.decal}
dir={dir.dir}
color={preview_color}
label={`${dir.name} ${decal.name}`}
selected={selected}
/>
);
})}
</Flex>
);
})}
</Flex>
</Section>
</Window.Content>
</Window>
);
};
type IconButtonParams = {
decal: string;
dir: number;
color: string;
label: string;
selected: boolean;
};
const IconButton = (props: IconButtonParams, context) => {
const { act, data } = useBackend<DecalPainterData>(context);
const generateIconKey = (decal: string, dir: number, color: string) =>
`${data.icon_prefix} ${decal}_${dir}_${color.replace('#', '')}`;
const icon = generateIconKey(props.decal, props.dir, props.color);
return (
<Button
tooltip={props.label}
selected={props.selected}
verticalAlignContent="middle"
m={'2px'}
p={1}
onClick={() =>
act('select decal', {
decal: props.decal,
dir: props.dir,
})}>
<div className={icon} style={{ display: 'block' }} />
</Button>
);
};
@@ -0,0 +1,119 @@
import { useBackend } from '../backend';
import { AnimatedNumber, Box, Button, Section, Table } from '../components';
import { formatMoney } from '../format';
import { NtosWindow } from '../layouts';
export const NtosBountyConsole = (props, context) => {
const { act, data } = useBackend(context);
const {
bountydata = [],
} = data;
return (
<NtosWindow
width={750}
height={600}
resizable>
<NtosWindow.Content scrollable>
<Section
title={<BountyHeader />}
buttons={(
<Button
icon="print"
content="Print Bounty List"
onClick={() => act('Print')} />
)}>
<Table border>
<Table.Row
bold
italic
color="label"
fontSize={1.25}>
<Table.Cell p={1} textAlign="center">
Bounty Object
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Description
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Progress
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Value
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Claim
</Table.Cell>
</Table.Row>
{bountydata.map(bounty => (
<Table.Row
key={bounty.name}
backgroundColor={bounty.priority === 1
? 'rgba(252, 152, 3, 0.25)'
: ''}>
<Table.Cell bold p={1}>
{bounty.name}
</Table.Cell>
<Table.Cell
italic
textAlign="center"
p={1}>
{bounty.description}
</Table.Cell>
<Table.Cell
bold
p={1}
textAlign="center">
{bounty.priority === 1
? <Box>High Priority</Box>
: ""}
{bounty.completion_string}
</Table.Cell>
<Table.Cell
bold
p={1}
textAlign="center">
{bounty.reward_string}
</Table.Cell>
<Table.Cell
bold
p={1}>
<Button
fluid
textAlign="center"
icon={bounty.claimed === 1
? "check"
: ""}
content={bounty.claimed === 1
? "Claimed"
: "Claim"}
disabled={bounty.claimed === 1}
color={bounty.can_claim === 1
? 'green'
: 'red'}
onClick={() => act('ClaimBounty', {
bounty: bounty.bounty_ref,
})} />
</Table.Cell>
</Table.Row>
))}
</Table>
</Section>
</NtosWindow.Content>
</NtosWindow>
);
};
const BountyHeader = (props, context) => {
const { act, data } = useBackend(context);
const {
stored_cash,
} = data;
return (
<Box inline bold>
<AnimatedNumber
value={stored_cash}
format={value => formatMoney(value)} />
{' credits'}
</Box>
);
};
+65 -112
View File
@@ -2,7 +2,7 @@
# Manual changes might be lost - proceed with caution!
__metadata:
version: 4
version: 6
cacheKey: 8
"@babel/code-frame@npm:7.12.11":
@@ -30,7 +30,7 @@ __metadata:
languageName: node
linkType: hard
"@babel/core@npm:7.15.0, @babel/core@npm:^7.1.0, @babel/core@npm:^7.15.0, @babel/core@npm:^7.7.2, @babel/core@npm:^7.7.5":
"@babel/core@npm:^7.1.0, @babel/core@npm:^7.15.0, @babel/core@npm:^7.7.2, @babel/core@npm:^7.7.5":
version: 7.15.0
resolution: "@babel/core@npm:7.15.0"
dependencies:
@@ -1748,13 +1748,13 @@ __metadata:
languageName: node
linkType: hard
"@types/eslint-scope@npm:^3.7.0":
version: 3.7.0
resolution: "@types/eslint-scope@npm:3.7.0"
"@types/eslint-scope@npm:^3.7.3":
version: 3.7.4
resolution: "@types/eslint-scope@npm:3.7.4"
dependencies:
"@types/eslint": "*"
"@types/estree": "*"
checksum: 86b54f375259fe97955660b08215895b38769cd5c054d6120ded129ee94d36115d7e3bca31ca61bddcd8fc7bd168bc6fb74ccf25521c9744d9e47682c047d876
checksum: ea6a9363e92f301cd3888194469f9ec9d0021fe0a397a97a6dd689e7545c75de0bd2153dfb13d3ab532853a278b6572c6f678ce846980669e41029d205653460
languageName: node
linkType: hard
@@ -1768,10 +1768,10 @@ __metadata:
languageName: node
linkType: hard
"@types/estree@npm:*, @types/estree@npm:^0.0.50":
version: 0.0.50
resolution: "@types/estree@npm:0.0.50"
checksum: 9a2b6a4a8c117f34d08fbda5e8f69b1dfb109f7d149b60b00fd7a9fb6ac545c078bc590aa4ec2f0a256d680cf72c88b3b28b60c326ee38a7bc8ee1ee95624922
"@types/estree@npm:*, @types/estree@npm:^0.0.51":
version: 0.0.51
resolution: "@types/estree@npm:0.0.51"
checksum: e56a3bcf759fd9185e992e7fdb3c6a5f81e8ff120e871641607581fb3728d16c811702a7d40fa5f869b7f7b4437ab6a87eb8d98ffafeee51e85bbe955932a189
languageName: node
linkType: hard
@@ -2220,21 +2220,12 @@ __metadata:
languageName: node
linkType: hard
"acorn@npm:^8.0.4, acorn@npm:^8.2.4, acorn@npm:^8.4.1":
version: 8.4.1
resolution: "acorn@npm:8.4.1"
"acorn@npm:^8.0.4, acorn@npm:^8.2.4, acorn@npm:^8.5.0, acorn@npm:^8.7.1":
version: 8.8.2
resolution: "acorn@npm:8.8.2"
bin:
acorn: bin/acorn
checksum: 0a8fd264349285aa36194b26a5a9d70c3641e78ad459ec44b9a9a5738e0ce6d86ec120ca2c0f04477165cee912fdeb158f62d6582697185c82278bdbf71187f8
languageName: node
linkType: hard
"acorn@npm:^8.5.0":
version: 8.8.1
resolution: "acorn@npm:8.8.1"
bin:
acorn: bin/acorn
checksum: 4079b67283b94935157698831967642f24a075c52ce3feaaaafe095776dfbe15d86a1b33b1e53860fc0d062ed6c83f4284a5c87c85b9ad51853a01173da6097f
checksum: f790b99a1bf63ef160c967e23c46feea7787e531292bb827126334612c234ed489a0dc2c7ba33156416f0ffa8d25bf2b0fdb7f35c2ba60eb3e960572bece4001
languageName: node
linkType: hard
@@ -3450,13 +3441,13 @@ __metadata:
languageName: node
linkType: hard
"enhanced-resolve@npm:^5.8.0":
version: 5.8.2
resolution: "enhanced-resolve@npm:5.8.2"
"enhanced-resolve@npm:^5.10.0":
version: 5.12.0
resolution: "enhanced-resolve@npm:5.12.0"
dependencies:
graceful-fs: ^4.2.4
tapable: ^2.2.0
checksum: 6e871ec5b183220dbcdaff8580cbdacee5425e321790e5846abd1b573d20d2bcb37f73ee983fd10c6d6878d31a2d08e234e72fc91a81236d64623ee6ba7d6611
checksum: bf3f787facaf4ce3439bef59d148646344e372bef5557f0d37ea8aa02c51f50a925cd1f07b8d338f18992c29f544ec235a8c64bcdb56030196c48832a5494174
languageName: node
linkType: hard
@@ -3517,10 +3508,10 @@ __metadata:
languageName: node
linkType: hard
"es-module-lexer@npm:^0.7.1":
version: 0.7.1
resolution: "es-module-lexer@npm:0.7.1"
checksum: c66fb633cc521529862818caf603897d58d30442c885a1a1ed16823ddbbb8a437e3952454a4b2650242df1c1b4d0efa42fedbe49594e3ef2ceb3c891cf1211dd
"es-module-lexer@npm:^0.9.0":
version: 0.9.3
resolution: "es-module-lexer@npm:0.9.3"
checksum: 84bbab23c396281db2c906c766af58b1ae2a1a2599844a504df10b9e8dc77ec800b3211fdaa133ff700f5703d791198807bba25d9667392d27a5e9feda344da8
languageName: node
linkType: hard
@@ -4102,15 +4093,16 @@ __metadata:
dependencies:
node-gyp: latest
checksum: 97ade64e75091afee5265e6956cb72ba34db7819b4c3e94c431d4be2b19b8bb7a2d4116da417950c3425f17c8fe693d25e20212cac583ac1521ad066b77ae31f
conditions: os=darwin
languageName: node
linkType: hard
"fsevents@patch:fsevents@^2.3.2#~builtin<compat/fsevents>, fsevents@patch:fsevents@~2.3.2#~builtin<compat/fsevents>":
version: 2.3.2
resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=1cc4b2"
resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=df0bf1"
dependencies:
node-gyp: latest
checksum: 78db9daf1f6526a49cefee3917cc988f62dc7f25b5dd80ad6de4ffc4af7f0cab7491ac737626ff53e482a111bc53aac9e411fe3602458eca36f6a003ecf69c16
conditions: os=darwin
languageName: node
linkType: hard
@@ -4215,21 +4207,7 @@ __metadata:
languageName: node
linkType: hard
"glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6":
version: 7.1.7
resolution: "glob@npm:7.1.7"
dependencies:
fs.realpath: ^1.0.0
inflight: ^1.0.4
inherits: 2
minimatch: ^3.0.4
once: ^1.3.0
path-is-absolute: ^1.0.0
checksum: b61f48973bbdcf5159997b0874a2165db572b368b931135832599875919c237fc05c12984e38fe828e69aa8a921eb0e8a4997266211c517c9cfaae8a93988bb8
languageName: node
linkType: hard
"glob@npm:^7.1.7, glob@npm:^7.2.0":
"glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7, glob@npm:^7.2.0":
version: 7.2.0
resolution: "glob@npm:7.2.0"
dependencies:
@@ -4273,10 +4251,10 @@ __metadata:
languageName: node
linkType: hard
"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.3, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6":
version: 4.2.8
resolution: "graceful-fs@npm:4.2.8"
checksum: 5d224c8969ad0581d551dfabdb06882706b31af2561bd5e2034b4097e67cc27d05232849b8643866585fd0a41c7af152950f8776f4dd5579e9853733f31461c6
"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.3, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9":
version: 4.2.10
resolution: "graceful-fs@npm:4.2.10"
checksum: 3f109d70ae123951905d85032ebeae3c2a5a7a997430df00ea30df0e3a6c60cf6689b109654d6fdacd28810a053348c4d14642da1d075049e6be1ba5216218da
languageName: node
linkType: hard
@@ -5203,7 +5181,7 @@ __metadata:
languageName: node
linkType: hard
"jest-resolve@npm:27.0.6, jest-resolve@npm:^27.0.6":
"jest-resolve@npm:^27.0.6":
version: 27.0.6
resolution: "jest-resolve@npm:27.0.6"
dependencies:
@@ -5493,10 +5471,10 @@ __metadata:
languageName: node
linkType: hard
"json-parse-better-errors@npm:^1.0.2":
version: 1.0.2
resolution: "json-parse-better-errors@npm:1.0.2"
checksum: ff2b5ba2a70e88fd97a3cb28c1840144c5ce8fae9cbeeddba15afa333a5c407cf0e42300cd0a2885dbb055227fe68d405070faad941beeffbfde9cf3b2c78c5d
"json-parse-even-better-errors@npm:^2.3.1":
version: 2.3.1
resolution: "json-parse-even-better-errors@npm:2.3.1"
checksum: 798ed4cf3354a2d9ccd78e86d2169515a0097a5c133337807cdf7f1fc32e1391d207ccfc276518cc1d7d8d4db93288b8a50ba4293d212ad1336e52a8ec0a941f
languageName: node
linkType: hard
@@ -6914,21 +6892,21 @@ resolve@^2.0.0-next.3:
"resolve@patch:resolve@^1.14.2#~builtin<compat/resolve>, resolve@patch:resolve@^1.20.0#~builtin<compat/resolve>, resolve@patch:resolve@^1.9.0#~builtin<compat/resolve>":
version: 1.20.0
resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin<compat/resolve>::version=1.20.0&hash=00b1ff"
resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin<compat/resolve>::version=1.20.0&hash=c3c19d"
dependencies:
is-core-module: ^2.2.0
path-parse: ^1.0.6
checksum: bed00be983cd20a8af0e7840664f655c4b269786dbd9595c5f156cd9d8a0050e65cdbbbdafc30ee9b6245b230c78a2c8ab6447a52545b582f476c29adb188cc5
checksum: a0dd7d16a8e47af23afa9386df2dff10e3e0debb2c7299a42e581d9d9b04d7ad5d2c53f24f1e043f7b3c250cbdc71150063e53d0b6559683d37f790b7c8c3cd5
languageName: node
linkType: hard
"resolve@patch:resolve@^2.0.0-next.3#~builtin<compat/resolve>":
version: 2.0.0-next.3
resolution: "resolve@patch:resolve@npm%3A2.0.0-next.3#~builtin<compat/resolve>::version=2.0.0-next.3&hash=00b1ff"
resolution: "resolve@patch:resolve@npm%3A2.0.0-next.3#~builtin<compat/resolve>::version=2.0.0-next.3&hash=c3c19d"
dependencies:
is-core-module: ^2.2.0
path-parse: ^1.0.6
checksum: eb88c5e53843bc022215744307a5f5664446c0fdb8f43c33456dce98d5ee6b3162d0cd0a177bb6f1c3d5c8bf01391ac7ab2de0e936e35318725fb40ba7efdaf6
checksum: 21684b4d99a4877337cdbd5484311c811b3e8910edb5d868eec85c6e6550b0f570d911f9a384f9e176172d6713f2715bd0b0887fa512cb8c6aeece018de6a9f8
languageName: node
linkType: hard
@@ -7252,17 +7230,7 @@ resolve@^2.0.0-next.3:
languageName: node
linkType: hard
"source-map-support@npm:^0.5.6":
version: 0.5.19
resolution: "source-map-support@npm:0.5.19"
dependencies:
buffer-from: ^1.0.0
source-map: ^0.6.0
checksum: c72802fdba9cb62b92baef18cc14cc4047608b77f0353e6c36dd993444149a466a2845332c5540d4a6630957254f0f68f4ef5a0120c33d2e83974c51a05afbac
languageName: node
linkType: hard
"source-map-support@npm:~0.5.20":
"source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.20":
version: 0.5.21
resolution: "source-map-support@npm:0.5.21"
dependencies:
@@ -7774,7 +7742,7 @@ resolve@^2.0.0-next.3:
terser-webpack-plugin: ^5.1.4
typescript: ^4.3.5
url-loader: ^4.1.1
webpack: ^5.50.0
webpack: ^5.75.0
webpack-bundle-analyzer: ^4.4.2
webpack-cli: ^4.7.2
languageName: unknown
@@ -8035,11 +8003,11 @@ typescript@^4.3.5:
"typescript@patch:typescript@^4.3.5#~builtin<compat/typescript>":
version: 4.3.5
resolution: "typescript@patch:typescript@npm%3A4.3.5#~builtin<compat/typescript>::version=4.3.5&hash=d8b4e7"
resolution: "typescript@patch:typescript@npm%3A4.3.5#~builtin<compat/typescript>::version=4.3.5&hash=dba6d9"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: bc2c4fdf0f1557fdafe4ef74848c72ebd9c8c60829568248f869121aea2bb20e16649a252431d0acb185ec118143be22bed73d08f64379557810d82756afedde
checksum: 365df18cf979c971ef9543b2acaa8694377a803f98e1804c41d0ede0b09d7046cb0cd98f2eaf3884b0fe923c01a60af1f653841bd8805c9715d5479c09a4ebe4
languageName: node
linkType: hard
@@ -8262,13 +8230,13 @@ typescript@^4.3.5:
languageName: node
linkType: hard
"watchpack@npm:^2.2.0":
version: 2.2.0
resolution: "watchpack@npm:2.2.0"
"watchpack@npm:^2.4.0":
version: 2.4.0
resolution: "watchpack@npm:2.4.0"
dependencies:
glob-to-regexp: ^0.4.1
graceful-fs: ^4.1.2
checksum: e275f48fae29edee3195c51a8312b609581b9be5ce323d3102ffd082cb124f48d7a393ce05e4110239e4354379e04d78a97ceb26ae367746e7e218bf258135c8
checksum: 23d4bc58634dbe13b86093e01c6a68d8096028b664ab7139d58f0c37d962d549a940e98f2f201cecdabd6f9c340338dc73ef8bf094a2249ef582f35183d1a131
languageName: node
linkType: hard
@@ -8359,47 +8327,47 @@ typescript@^4.3.5:
languageName: node
linkType: hard
"webpack-sources@npm:^3.2.0":
version: 3.2.0
resolution: "webpack-sources@npm:3.2.0"
checksum: 8f1d686bd6aab2eda330579a07e14803cb2e01415f5a603697402aea3c36e98c1d2731167c3e97e50170cf1b0214cf8ef945fc639b100d1e3b67c023feb35716
"webpack-sources@npm:^3.2.3":
version: 3.2.3
resolution: "webpack-sources@npm:3.2.3"
checksum: 989e401b9fe3536529e2a99dac8c1bdc50e3a0a2c8669cbafad31271eadd994bc9405f88a3039cd2e29db5e6d9d0926ceb7a1a4e7409ece021fe79c37d9c4607
languageName: node
linkType: hard
"webpack@npm:^5.50.0":
version: 5.50.0
resolution: "webpack@npm:5.50.0"
"webpack@npm:^5.75.0":
version: 5.75.0
resolution: "webpack@npm:5.75.0"
dependencies:
"@types/eslint-scope": ^3.7.0
"@types/estree": ^0.0.50
"@types/eslint-scope": ^3.7.3
"@types/estree": ^0.0.51
"@webassemblyjs/ast": 1.11.1
"@webassemblyjs/wasm-edit": 1.11.1
"@webassemblyjs/wasm-parser": 1.11.1
acorn: ^8.4.1
acorn: ^8.7.1
acorn-import-assertions: ^1.7.6
browserslist: ^4.14.5
chrome-trace-event: ^1.0.2
enhanced-resolve: ^5.8.0
es-module-lexer: ^0.7.1
enhanced-resolve: ^5.10.0
es-module-lexer: ^0.9.0
eslint-scope: 5.1.1
events: ^3.2.0
glob-to-regexp: ^0.4.1
graceful-fs: ^4.2.4
json-parse-better-errors: ^1.0.2
graceful-fs: ^4.2.9
json-parse-even-better-errors: ^2.3.1
loader-runner: ^4.2.0
mime-types: ^2.1.27
neo-async: ^2.6.2
schema-utils: ^3.1.0
tapable: ^2.1.1
terser-webpack-plugin: ^5.1.3
watchpack: ^2.2.0
webpack-sources: ^3.2.0
watchpack: ^2.4.0
webpack-sources: ^3.2.3
peerDependenciesMeta:
webpack-cli:
optional: true
bin:
webpack: bin/webpack.js
checksum: 293bed1d9101ac127605f35a225a5cbc1bc89eac68d6e09e7feb3e284ec2693b3db7c1dd7710fadf6852f89ad39ed09413c35befa1cfc9738074b33299ac2b9e
checksum: 2bcc5f3c195f375944e8af2f00bf2feea39cb9fda5f763b0d1b00077f1c51783db25c94d3fae96a07dead9fa085e6ae7474417e5ab31719c9776ea5969ceb83a
languageName: node
linkType: hard
@@ -8514,22 +8482,7 @@ typescript@^4.3.5:
languageName: node
linkType: hard
"ws@npm:^7.3.1, ws@npm:^7.4.6":
version: 7.5.3
resolution: "ws@npm:7.5.3"
peerDependencies:
bufferutil: ^4.0.1
utf-8-validate: ^5.0.2
peerDependenciesMeta:
bufferutil:
optional: true
utf-8-validate:
optional: true
checksum: 423dc0d859fa74020f5555140905b862470a60ea1567bb9ad55a087263d7718b9c94f69678be1cee9868925c570f1e6fc79d09f90c39057bc63fa2edbb2c547b
languageName: node
linkType: hard
"ws@npm:^7.5.3":
"ws@npm:^7.3.1, ws@npm:^7.4.6, ws@npm:^7.5.3":
version: 7.5.5
resolution: "ws@npm:7.5.5"
peerDependencies: