Skip to content

Commit

Permalink
QoL bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Geevies committed Aug 3, 2020
1 parent 2a065a1 commit 2185b01
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
12 changes: 7 additions & 5 deletions code/_onclick/rig.dm
Expand Up @@ -63,21 +63,23 @@
return loc == card

/mob/living/proc/HardsuitClickOn(var/atom/A, var/alert_ai = 0)
if(!can_use_rig() || !canClick())
return 0
if(!can_use_rig())
return FALSE
if(!canClick()) // return true to stop the initial click from going through if we're just on cooldown
return TRUE
var/obj/item/rig/rig = get_rig()
if(istype(rig) && !rig.offline && rig.selected_module)
if(src != rig.wearer)
if(rig.ai_can_move_suit(src, check_user_module = 1) && (rig.last_remote_message + 3 SECONDS < world.time))
message_admins("[key_name_admin(src, include_name = 1)] is trying to force \the [key_name_admin(rig.wearer, include_name = 1)] to use a hardsuit module.")
rig.last_remote_message = world.time
else
return 0
return FALSE
rig.selected_module.engage(A, alert_ai)
if(ismob(A)) // No instant mob attacking - though modules have their own cooldowns
setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
return 1
return 0
return TRUE
return FALSE

#undef MIDDLE_CLICK
#undef ALT_CLICK
Expand Down
3 changes: 1 addition & 2 deletions code/modules/mob/living/carbon/carbon.dm
Expand Up @@ -86,7 +86,7 @@

if(M.a_intent != I_HELP)
var/action
switch(a_intent)
switch(M.a_intent)
if(I_GRAB)
action = "grabbed"
if(I_DISARM)
Expand All @@ -112,7 +112,6 @@
visible_message(SPAN_NOTICE("[M] [action] [src] waking [t_him] up!"))
sleeping = 0
willfully_sleeping = FALSE
return

/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null, var/tesla_shock = 0, var/ground_zero)
if(status_flags & GODMODE)
Expand Down
4 changes: 3 additions & 1 deletion html/changelogs/geeves-hardsuit_activation.yml
Expand Up @@ -5,4 +5,6 @@ delete-after: True
changes:
- bugfix: "Fixed an issue with hardsuit items sometimes not working properly."
- bugfix: "Fixed a bug that caused the wrong item to get displayed in an attack animation sometimes."
- bugfix: "Fixed pickaxes not having an attack sound."
- bugfix: "Fixed pickaxes not having an attack sound."
- bugfix: "Fixed spamming your hardsuit items causing you to do hotkey stuff when on click cooldown."
- bugfix: "Fixed a bug with doing actions on SSD people and not having the correct action come up."

0 comments on commit 2185b01

Please sign in to comment.