Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] You can do more things while floored #2141

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
return FALSE
return TRUE

/atom/ui_status(mob/user)
/atom/ui_status(mob/user, datum/ui_state/state)
. = ..()
//Check if both user and atom are at the same location
if(!can_interact(user))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/wires/_wires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
/datum/wires/ui_host()
return holder

/datum/wires/ui_status(mob/user)
/datum/wires/ui_status(mob/user, datum/ui_state/state)
if(interactable(user))
return ..()
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
ui = new(user, src, "CameraConsole", name)
ui.open()

/obj/machinery/computer/security/ui_status(mob/user)
/obj/machinery/computer/security/ui_status(mob/user, datum/ui_state/state)
. = ..()
if(. == UI_DISABLED)
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/dance_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
icon_state = "[base_icon_state][music_player.active_song_sound ? "-active" : null]"
return ..()

/obj/machinery/jukebox/ui_status(mob/user)
/obj/machinery/jukebox/ui_status(mob/user, datum/ui_state/state)
if(isobserver(user))
return ..()
if(!anchored)
Expand Down
3 changes: 2 additions & 1 deletion code/game/machinery/hologram.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Possible to do for anyone motivated enough:
max_integrity = 300
armor_type = /datum/armor/machinery_holopad
circuit = /obj/item/circuitboard/machine/holopad
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY
// Blue, dim light
light_power = 0.8
light_color = LIGHT_COLOR_BLUE
Expand Down Expand Up @@ -271,7 +272,7 @@ Possible to do for anyone motivated enough:

return ..()

/obj/machinery/holopad/ui_status(mob/user)
/obj/machinery/holopad/ui_status(mob/user, datum/ui_state/state)
if(!is_operational)
return UI_CLOSE
if(outgoing_call && !calling)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/porta_turret/portable_turret.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ DEFINE_BITFIELD(turret_flags, list(
if(properties["team_color"])
team_color = properties["team_color"]

/obj/machinery/porta_turret/lasertag/ui_status(mob/user)
/obj/machinery/porta_turret/lasertag/ui_status(mob/user, datum/ui_state/state)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(team_color == "blue" && istype(H.wear_suit, /obj/item/clothing/suit/redtag))
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,7 @@
/obj/item/card/id/advanced/chameleon/ui_state(mob/user)
return GLOB.always_state

/obj/item/card/id/advanced/chameleon/ui_status(mob/user)
/obj/item/card/id/advanced/chameleon/ui_status(mob/user, datum/ui_state/state)
var/target = theft_target?.resolve()

if(!target)
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/crayons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
attack_verb_continuous = list("attacks", "colours")
attack_verb_simple = list("attack", "colour")
grind_results = list()
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY

/// Icon state to use when capped
var/icon_capped
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
worn_icon_state = "radio"
desc = "A basic handheld radio that communicates with local telecommunication networks."
dog_fashion = /datum/dog_fashion/back
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_ALLOW_USER_LOCATION | INTERACT_ATOM_IGNORE_MOBILITY

obj_flags = CONDUCTS_ELECTRICITY
slot_flags = ITEM_SLOT_BELT
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/traitordevices.dm
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ effective or pretty fucking useless.
toolbox = null
qdel(src)

/obj/machinery/porta_turret/syndicate/toolbox/ui_status(mob/user)
/obj/machinery/porta_turret/syndicate/toolbox/ui_status(mob/user, datum/ui_state/state)
if(faction_check(user.faction, faction))
return ..()

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/rcd/RCD.dm
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
///How much charge is used up for each matter unit.
var/mass_to_energy = 16

/obj/item/construction/rcd/exosuit/ui_status(mob/user)
/obj/item/construction/rcd/exosuit/ui_status(mob/user, datum/ui_state/state)
if(ismecha(owner))
return owner.ui_status(user)
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/rcd/RCL.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
w_class = WEIGHT_CLASS_NORMAL
var/max_amount = 90
var/active = FALSE
actions_types = list(/datum/action/item_action/rcl_col,/datum/action/item_action/rcl_gui,)
actions_types = list(/datum/action/item_action/rcl_col,/datum/action/item_action/rcl_gui)
var/list/colors = list("red", "yellow", "green", "blue", "pink", "orange", "cyan", "white")
var/current_color_index = 1
var/ghetto = FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/robot/robot_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
else
return ..()

/obj/item/robot_suit/ui_status(mob/user)
/obj/item/robot_suit/ui_status(mob/user, datum/ui_state/state)
if(isobserver(user))
return ..()
var/obj/item/held_item = user.get_active_held_item()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/extinguisher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
toggle_cabinet(user)

/obj/structure/extinguisher_cabinet/attack_hand_secondary(mob/living/user)
if(!user.can_perform_action(src, NEED_DEXTERITY|NEED_HANDS))
if(!user.can_perform_action(src, NEED_DEXTERITY|NEED_HANDS|ALLOW_RESTING))
return ..()
toggle_cabinet(user)
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
Expand Down
2 changes: 1 addition & 1 deletion code/modules/admin/fun_balloon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/obj/effect/fun_balloon/sentience/ui_state(mob/user)
return GLOB.admin_state

/obj/effect/fun_balloon/sentience/ui_status(mob/user)
/obj/effect/fun_balloon/sentience/ui_status(mob/user, datum/ui_state/state)
if(popped)
return UI_CLOSE
if(isAdminObserver(user)) // ignore proximity if we're an admin
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/abductor/machinery/console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
if(do_after(user,100, target = src))
TeleporterSend()

/obj/machinery/abductor/console/ui_status(mob/user)
/obj/machinery/abductor/console/ui_status(mob/user, datum/ui_state/state)
if(!isabductor(user) && !isobserver(user))
return UI_CLOSE
return ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/abductor/machinery/dispenser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
gland_colors[i] = random_color()
amounts[i] = rand(1,5)

/obj/machinery/abductor/gland_dispenser/ui_status(mob/user)
/obj/machinery/abductor/gland_dispenser/ui_status(mob/user, datum/ui_state/state)
if(!isabductor(user) && !isobserver(user))
return UI_CLOSE
return ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/abductor/machinery/experiment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
span_notice("You successfully break out of [src]!"))
open_machine()

/obj/machinery/abductor/experiment/ui_status(mob/user)
/obj/machinery/abductor/experiment/ui_status(mob/user, datum/ui_state/state)
if(user == occupant)
return UI_CLOSE
return ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/assembly/infrared.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
. = ..()
refreshBeam()

/obj/item/assembly/infra/ui_status(mob/user)
/obj/item/assembly/infra/ui_status(mob/user, datum/ui_state/state)
if(is_secured(user))
return ..()
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/assembly/proximity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
. += "prox_scanning"
attached_overlays += "prox_scanning"

/obj/item/assembly/prox_sensor/ui_status(mob/user)
/obj/item/assembly/prox_sensor/ui_status(mob/user, datum/ui_state/state)
if(is_secured(user))
return ..()
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/assembly/signaler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
. = ..()
holder?.update_appearance()

/obj/item/assembly/signaler/ui_status(mob/user)
/obj/item/assembly/signaler/ui_status(mob/user, datum/ui_state/state)
if(is_secured(user))
return ..()
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/assembly/timer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
. += "timer_timing"
attached_overlays += "timer_timing"

/obj/item/assembly/timer/ui_status(mob/user)
/obj/item/assembly/timer/ui_status(mob/user, datum/ui_state/state)
if(is_secured(user))
return ..()
return UI_CLOSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)
if(AIR_ALARM_BUILD_COMPLETE)
. += span_notice("Right-click to [locked ? "unlock" : "lock"] the interface.")

/obj/machinery/airalarm/ui_status(mob/user)
/obj/machinery/airalarm/ui_status(mob/user, datum/ui_state/state)
if(user.has_unlimited_silicon_privilege && aidisabled)
to_chat(user, "AI control has been disabled.")
else if(!shorted)
Expand Down
1 change: 1 addition & 0 deletions code/modules/atmospherics/machinery/atmosmachinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
max_integrity = 200
obj_flags = CAN_BE_HIT
armor_type = /datum/armor/machinery_atmospherics
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY

///Check if the object can be unwrenched
var/can_unwrench = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@

// UI Stuff

/obj/machinery/atmospherics/components/ui_status(mob/user)
/obj/machinery/atmospherics/components/ui_status(mob/user, datum/ui_state/state)
if(allowed(user))
return ..()
to_chat(user, span_danger("Access denied."))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
base_icon_state = "bluespace_sender"
name = "Bluespace Gas Sender"
desc = "Sends gases to the bluespace network to be shared with the connected vendors, who knows what's beyond!"
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT

density = TRUE
max_integrity = 300
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
icon_state = "thermo_base"
plane = GAME_PLANE

interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT

name = "Temperature control unit"
desc = "Heats or cools gas in connected pipes."

Expand Down Expand Up @@ -257,7 +259,7 @@
return ITEM_INTERACT_SUCCESS
return

/obj/machinery/atmospherics/components/unary/thermomachine/ui_status(mob/user)
/obj/machinery/atmospherics/components/unary/thermomachine/ui_status(mob/user, datum/ui_state/state)
if(interactive)
return ..()
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/economy/holopay.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
ui = new(user, src, "HoloPay")
ui.open()

/obj/structure/holopay/ui_status(mob/user)
/obj/structure/holopay/ui_status(mob/user, datum/ui_state/state)
. = ..()
if(!in_range(user, src) && !isobserver(user))
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/biogenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
update_appearance(UPDATE_ICON)


/obj/machinery/biogenerator/ui_status(mob/user)
/obj/machinery/biogenerator/ui_status(mob/user, datum/ui_state/state)
if(machine_stat & BROKEN || panel_open)
return UI_CLOSE

Expand Down
4 changes: 2 additions & 2 deletions code/modules/library/admin_only.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
page_count = round(max(bookcount - 1, 0) / BOOKS_PER_PAGE) //This is just floor()
search_page = clamp(search_page, 0, page_count)

/obj/machinery/computer/libraryconsole/admin_only_do_not_map_in_you_fucker/ui_status(mob/user)
/obj/machinery/computer/libraryconsole/admin_only_do_not_map_in_you_fucker/ui_status(mob/user, datum/ui_state/state)
if(!check_rights_for(user.client, R_BAN))
return UI_CLOSE
if(!SSdbcore.Connect())
Expand Down Expand Up @@ -339,7 +339,7 @@
ui.set_autoupdate(FALSE) // Nothing is changing here brother
ui.open()

/datum/admin_book_viewer/ui_status(mob/user)
/datum/admin_book_viewer/ui_status(mob/user, datum/ui_state/state)
if(!check_rights_for(user.client, R_BAN))
return UI_CLOSE
return UI_INTERACTIVE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/library/skill_learning/skill_station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
occupant_typecache = list(/mob/living/carbon) //todo make occupant_typecache per type
state_open = TRUE
// Only opens UI when inside; also, you can use the machine while lying down (for paraplegics and the like)
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_IGNORE_MOBILITY
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY
circuit = /obj/item/circuitboard/machine/skill_station
/// Currently implanting/removing
var/working = FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/ai/robot_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
return FALSE
return TRUE

/datum/robot_control/ui_status(mob/user)
/datum/robot_control/ui_status(mob/user, datum/ui_state/state)
if(is_interactable(user))
return ..()
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mod/mod_paint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
QDEL_NULL(proxy_view)
current_color = COLOR_MATRIX_IDENTITY

/obj/item/mod/paint/ui_status(mob/user)
/obj/item/mod/paint/ui_status(mob/user, datum/ui_state/state)
if(check_menu(editing_mod, user))
return ..()
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/modular_computers/computers/item/pda.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

steel_sheet_cost = 2
custom_materials = list(/datum/material/iron=SMALL_MATERIAL_AMOUNT * 3, /datum/material/glass=SMALL_MATERIAL_AMOUNT, /datum/material/plastic=SMALL_MATERIAL_AMOUNT)
interaction_flags_atom = INTERACT_ATOM_ALLOW_USER_LOCATION | INTERACT_ATOM_IGNORE_MOBILITY
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_ALLOW_USER_LOCATION | INTERACT_ATOM_IGNORE_MOBILITY

icon_state_menu = "menu"
max_capacity = 64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
cam_screen.display_to(user)
user.client.register_map_obj(cam_background)

/datum/computer_file/program/secureye/ui_status(mob/user)
/datum/computer_file/program/secureye/ui_status(mob/user, datum/ui_state/state)
. = ..()
if(. == UI_DISABLED)
return UI_CLOSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/pai/card.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
ui = new(user, src, "PaiCard")
ui.open()

/obj/item/pai_card/ui_status(mob/user)
/obj/item/pai_card/ui_status(mob/user, datum/ui_state/state)
if(user in get_nested_locs(src))
return UI_INTERACTIVE
return ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/paperwork/paper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
return
. += span_warning("You cannot read it!")

/obj/item/paper/ui_status(mob/user,/datum/ui_state/state)
/obj/item/paper/ui_status(mob/user, datum/ui_state/state)
// Are we on fire? Hard to read if so
if(resistance_flags & ON_FIRE)
return UI_CLOSE
Expand Down
3 changes: 1 addition & 2 deletions code/modules/paperwork/photocopier.dm
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,7 @@ GLOBAL_LIST_INIT(paper_blanks, init_paper_blanks())
toner_cartridge.charges = 0

/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/user)
check_ass() //Just to make sure that you can re-drag somebody onto it after they moved off.
if(!istype(target) || target.anchored || target.buckled || !Adjacent(target) || !user.can_perform_action(src) || target == ass || copier_blocked())
if(!istype(target) || target.anchored || target.buckled || !Adjacent(target) || !user.can_perform_action(src, action_bitflags = ALLOW_RESTING) || target == ass || copier_blocked())
return
add_fingerprint(user)
if(target == user)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/power/apc/apc_main.dm
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
update_appearance()
remote_control_user = null

/obj/machinery/power/apc/ui_status(mob/user)
/obj/machinery/power/apc/ui_status(mob/user, datum/ui_state/state)
. = ..()
if(!QDELETED(remote_control_user) && user == remote_control_user)
. = UI_INTERACTIVE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry/holder/ui_data.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ui.open()


/datum/reagents/ui_status(mob/user)
/datum/reagents/ui_status(mob/user, datum/ui_state/state)
return UI_INTERACTIVE //please advise

/datum/reagents/ui_state(mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/chemistry/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
. = ..()
INVOKE_ASYNC(src, PROC_REF(remove_thermometer), user)

/obj/item/thermometer/ui_status(mob/user)
/obj/item/thermometer/ui_status(mob/user, datum/ui_state/state)
if(!(in_range(src, user)))
return UI_CLOSE
return UI_INTERACTIVE
Expand Down
1 change: 1 addition & 0 deletions code/modules/recycling/disposal/bin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
name = "disposal unit"
desc = "A pneumatic waste disposal unit."
icon_state = "disposal"
interaction_flags_atom = parent_type::interaction_flags_atom | INTERACT_ATOM_IGNORE_MOBILITY

// attack by item places it in to disposal
/obj/machinery/disposal/bin/attackby(obj/item/I, mob/user, params)
Expand Down
Loading
Loading