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

[Port] Small fixes of Monkestation issues #1908

Merged
merged 3 commits into from
May 20, 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
4 changes: 3 additions & 1 deletion code/datums/components/cleaner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@

//do the cleaning
user.visible_message(span_notice("[user] starts to clean [target]!"), span_notice("You start to clean [target]..."))
var/clean_succeeded = FALSE
if(do_after(user, cleaning_duration, target = target))
clean_succeeded = TRUE
user.visible_message(span_notice("[user] finishes cleaning [target]!"), span_notice("You finish cleaning [target]."))
if(clean_target)
for(var/obj/effect/decal/cleanable/cleanable_decal in target) //it's important to do this before you wash all of the cleanables off
Expand All @@ -131,7 +133,7 @@
for(var/datum/disease/advanced/D as anything in item.viruses)
item.remove_disease(D)

on_cleaned_callback?.Invoke(source, target, user)
on_cleaned_callback?.Invoke(source, target, user, clean_succeeded)

//remove the cleaning overlay
target.cut_overlay(low_bubble)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/doors/poddoor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
return
if (deconstruction != BLASTDOOR_FINISHED)
return
var/change_id = tgui_input_text(user, "Set the door controllers ID", "Door Controller ID", id, 100)
var/change_id = tgui_input_number(user, "Set the door controllers ID (Current: [id])", "Door Controller ID", isnum(id) ? id : null, 100)
if(!change_id || QDELETED(usr) || QDELETED(src) || !usr.can_perform_action(src, FORBID_TELEKINESIS_REACH))
return
id = change_id
Expand Down
29 changes: 15 additions & 14 deletions code/modules/clothing/masks/hailer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/adjust)
icon_state = "sechailer"
inhand_icon_state = "sechailer"
clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS | GAS_FILTERING
flags_inv = HIDEFACIALHAIR | HIDEFACE | HIDESNOUT
w_class = WEIGHT_CLASS_SMALL
visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
Expand All @@ -60,10 +60,15 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
unique_death = 'sound/voice/sec_death.ogg'
COOLDOWN_DECLARE(hailer_cooldown)
supports_variations_flags = CLOTHING_SNOUTED_VARIATION
///Decides the phrases available for use; defines used are the last index of a category of available phrases
var/aggressiveness = AGGR_BAD_COP
///Whether the hailer has been broken due to overuse or not
var/broken_hailer = FALSE
///Whether the hailer is currently in cooldown for resetting recent_uses
var/overuse_cooldown = FALSE
///How many times was the hailer used in the last OVERUSE_COOLDOWN seconds
var/recent_uses = 0
var/broken_hailer = FALSE
///Whether the hailer is emagged or not
var/safety = TRUE

/obj/item/clothing/mask/gas/sechailer/plasmaman
Expand Down Expand Up @@ -102,22 +107,20 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
actions_types = list(/datum/action/item_action/halt)

/obj/item/clothing/mask/gas/sechailer/screwdriver_act(mob/living/user, obj/item/I)
. = TRUE
if(..())
return
else if (aggressiveness == AGGR_BROKEN)
. = ..()
if(aggressiveness == AGGR_BROKEN)
to_chat(user, span_danger("You adjust the restrictor but nothing happens, probably because it's broken."))
return
var/position = aggressiveness == AGGR_GOOD_COP ? "middle" : aggressiveness == AGGR_BAD_COP ? "last" : "first"
to_chat(user, span_notice("You set the restrictor to the [position] position."))
aggressiveness = aggressiveness % 3 + 1 // loop AGGR_GOOD_COP -> AGGR_SHIT_COP

/obj/item/clothing/mask/gas/sechailer/wirecutter_act(mob/living/user, obj/item/I)
. = TRUE
..()
. = ..()
if(aggressiveness != AGGR_BROKEN)
to_chat(user, span_danger("You broke the restrictor!"))
aggressiveness = AGGR_BROKEN
return

/obj/item/clothing/mask/gas/sechailer/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/halt))
Expand All @@ -128,12 +131,11 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
/obj/item/clothing/mask/gas/sechailer/attack_self()
halt()

/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user, obj/item/card/emag/emag_card)
/obj/item/clothing/mask/gas/sechailer/emag_act(mob/user)
if(safety)
safety = FALSE
balloon_alert(user, "vocal circuit fried")
return TRUE
return FALSE
to_chat(user, span_warning("You silently fry [src]'s vocal circuit."))
return ..()

/obj/item/clothing/mask/gas/sechailer/verb/halt()
set category = "Object"
Expand Down Expand Up @@ -165,9 +167,8 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
// select phrase to play
play_phrase(usr, GLOB.hailer_phrases[select_phrase()])


/obj/item/clothing/mask/gas/sechailer/proc/select_phrase()
if (!safety)
if(!safety)
return EMAG_PHRASE
else
var/upper_limit
Expand Down
Loading