mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
Converts more attackby's to interactions (#93106)
## About The Pull Request Converts the following: - Medical Kiosk - Implant case - Flamethrower - Chemical implant case - Pappercutter Also I've looked at some alt click procs and adjusted some of their returns
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
..()
|
||||
update_appearance()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/click_alt(mob/living/beno)
|
||||
beno.handle_ventcrawl(src)
|
||||
return CLICK_ACTION_SUCCESS
|
||||
|
||||
@@ -123,8 +123,8 @@
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/click_alt(mob/user)
|
||||
if(user.can_perform_action(src))
|
||||
adjust_visor(user)
|
||||
adjust_visor(user)
|
||||
return CLICK_ACTION_SUCCESS
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/ui_action_click(mob/user, action)
|
||||
if(istype(action, /datum/action/item_action/toggle_welding_screen))
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
abstract_type = /obj/item/clothing/under
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||
slot_flags = ITEM_SLOT_ICLOTHING
|
||||
interaction_flags_click = NEED_DEXTERITY
|
||||
interaction_flags_click = NEED_DEXTERITY|ALLOW_RESTING
|
||||
armor_type = /datum/armor/clothing_under
|
||||
supports_variations_flags = CLOTHING_DIGITIGRADE_MASK
|
||||
equip_sound = 'sound/items/equip/jumpsuit_equip.ogg'
|
||||
drop_sound = 'sound/items/handling/cloth/cloth_drop1.ogg'
|
||||
pickup_sound = 'sound/items/handling/cloth/cloth_pickup1.ogg'
|
||||
limb_integrity = 30
|
||||
interaction_flags_click = ALLOW_RESTING
|
||||
|
||||
/// Has this undersuit been freshly laundered and, as such, imparts a mood bonus for wearing
|
||||
var/freshly_laundered = FALSE
|
||||
|
||||
@@ -60,9 +60,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, sort_list(list(
|
||||
|
||||
/obj/item/stack/marker_beacon/click_alt(mob/living/user)
|
||||
var/input_color = tgui_input_list(user, "Choose a color", "Beacon Color", GLOB.marker_beacon_colors)
|
||||
if(isnull(input_color))
|
||||
return CLICK_ACTION_BLOCKING
|
||||
if(!user.can_perform_action(src))
|
||||
if(isnull(input_color) || !user.can_perform_action(src))
|
||||
return CLICK_ACTION_BLOCKING
|
||||
picked_color = input_color
|
||||
update_appearance()
|
||||
@@ -154,15 +152,12 @@ GLOBAL_LIST_INIT(marker_beacon_colors, sort_list(list(
|
||||
|
||||
/obj/structure/marker_beacon/click_alt(mob/living/user)
|
||||
var/input_color = tgui_input_list(user, "Choose a color", "Beacon Color", GLOB.marker_beacon_colors)
|
||||
if(isnull(input_color))
|
||||
if(isnull(input_color) || !user.can_perform_action(src))
|
||||
return CLICK_ACTION_BLOCKING
|
||||
if(!user.can_perform_action(src))
|
||||
return NONE
|
||||
picked_color = input_color
|
||||
update_appearance()
|
||||
return CLICK_ACTION_SUCCESS
|
||||
|
||||
|
||||
/* Preset marker beacon types, for mapping */
|
||||
// Set the icon_state here to make it clear for mappers.
|
||||
|
||||
|
||||
@@ -77,10 +77,8 @@ GLOBAL_VAR(posibrain_notify_cooldown)
|
||||
|
||||
/obj/item/mmi/posibrain/click_alt(mob/living/user)
|
||||
var/input_seed = tgui_input_text(user, "Enter a personality seed", "Enter seed", ask_role, max_length = MAX_NAME_LEN)
|
||||
if(isnull(input_seed))
|
||||
if(isnull(input_seed) || !user.can_perform_action(src))
|
||||
return CLICK_ACTION_BLOCKING
|
||||
if(!user.can_perform_action(src))
|
||||
return
|
||||
to_chat(user, span_notice("You set the personality seed to \"[input_seed]\"."))
|
||||
ask_role = input_seed
|
||||
update_appearance()
|
||||
|
||||
@@ -104,16 +104,16 @@
|
||||
/obj/item/papercutter/screwdriver_act(mob/living/user, obj/item/tool)
|
||||
if(!stored_blade && !blade_secured)
|
||||
balloon_alert(user, "no blade!")
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
tool.play_tool_sound(src)
|
||||
balloon_alert(user, "[blade_secured ? "un" : ""]secured")
|
||||
blade_secured = !blade_secured
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/papercutter/attackby(obj/item/inserted_item, mob/user, list/modifiers, list/attack_modifiers)
|
||||
if(istype(inserted_item, /obj/item/paper))
|
||||
if(is_type_in_list(inserted_item, list(
|
||||
/obj/item/papercutter/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
||||
if(istype(tool, /obj/item/paper))
|
||||
if(is_type_in_list(tool, list(
|
||||
/obj/item/paper/fake_report,
|
||||
/obj/item/paper/holy_writ,
|
||||
/obj/item/paper/pamphlet,
|
||||
@@ -121,29 +121,31 @@
|
||||
/obj/item/paper/report,
|
||||
)))
|
||||
balloon_alert(user, "won't fit!")
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(stored_paper)
|
||||
balloon_alert(user, "already paper inside!")
|
||||
return
|
||||
if(!user.transferItemToLoc(inserted_item, src))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(!user.transferItemToLoc(tool, src))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
playsound(loc, SFX_PAGE_TURN, 60, TRUE)
|
||||
balloon_alert(user, "paper inserted")
|
||||
stored_paper = inserted_item
|
||||
stored_paper = tool
|
||||
update_appearance()
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
if(istype(inserted_item, /obj/item/hatchet/cutterblade))
|
||||
if(istype(tool, /obj/item/hatchet/cutterblade))
|
||||
if(stored_blade)
|
||||
balloon_alert(user, "already a blade inside!")
|
||||
return
|
||||
if(!user.transferItemToLoc(inserted_item, src))
|
||||
return
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
if(!user.transferItemToLoc(tool, src))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
balloon_alert(user, "blade inserted")
|
||||
inserted_item.forceMove(src)
|
||||
stored_blade = inserted_item
|
||||
tool.forceMove(src)
|
||||
stored_blade = tool
|
||||
update_appearance()
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
update_appearance()
|
||||
|
||||
return ..()
|
||||
return NONE
|
||||
|
||||
/obj/item/papercutter/click_alt(mob/user)
|
||||
// can only remove one at a time; paper goes first, as its most likely what players will want to be taking out
|
||||
|
||||
Reference in New Issue
Block a user