Refactors Mousepointers + Code improvements (#29960)

* blah

* tweaks

* refactor

* awesome

* put everything in mouse_icons folder

* make spells work

* update twin

* tweak

* woop woop

* remove dynamic mousepointers

* bam
This commit is contained in:
Contrabang
2025-09-02 20:47:56 +00:00
committed by GitHub
parent 7162b71b4a
commit 7125897ebb
26 changed files with 80 additions and 77 deletions
+1 -1
View File
@@ -271,7 +271,7 @@
return TRUE
/datum/spell/horror
ranged_mousepointer = 'icons/effects/cult_target.dmi'
ranged_mousepointer = 'icons/mouse_icons/cult_target.dmi'
var/datum/action/innate/cult/blood_spell/attached_action
/datum/spell/horror/Destroy()
@@ -490,7 +490,7 @@
desc = "Overheats a machine, causing a moderately-sized explosion after a short time."
action_icon_state = "overload_machine"
uses = 4
ranged_mousepointer = 'icons/effects/cult_target.dmi'
ranged_mousepointer = 'icons/mouse_icons/cult_target.dmi'
selection_activated_message = "<span class='notice'>You tap into the station's powernet. Click on a machine to detonate it, or use the ability again to cancel.</span>"
selection_deactivated_message = "<span class='notice'>You release your hold on the powernet.</span>"
@@ -531,7 +531,7 @@
desc = "Animates a targeted machine, causing it to attack anyone nearby."
action_icon_state = "override_machine"
uses = 4
ranged_mousepointer = 'icons/effects/override_machine_target.dmi'
ranged_mousepointer = 'icons/mouse_icons/override_machine_target.dmi'
selection_activated_message = "<span class='notice'>You tap into the station's powernet. Click on a machine to animate it, or use the ability again to cancel.</span>"
selection_deactivated_message = "<span class='notice'>You release your hold on the powernet.</span>"
@@ -888,7 +888,7 @@
desc = "Shocks a cyborg back to 'life' after a short delay."
action_icon_state = "overload_machine"
uses = 2
ranged_mousepointer = 'icons/effects/overload_machine_target.dmi'
ranged_mousepointer = 'icons/mouse_icons/explode_machine_target.dmi'
selection_activated_message = "<span class='notice'>Call to address 0FFFFFFF in APC logic thread, awaiting user response.</span>"
selection_deactivated_message = "<span class='notice'>APC logic thread restarting...</span>"
var/is_active = FALSE
@@ -934,7 +934,7 @@
name = "Roll Over"
action_icon_state = "roll_over"
desc = "Allows you to roll over in the direction of your choosing, crushing anything in your way."
ranged_mousepointer = 'icons/effects/cult_target.dmi'
ranged_mousepointer = 'icons/mouse_icons/cult_target.dmi'
selection_activated_message = "<span class='notice'>Your inner servos shift as you prepare to roll around. Click adjacent tiles to roll into them!</span>"
selection_deactivated_message = "<span class='notice'>You disengage your rolling protocols.</span>"
COOLDOWN_DECLARE(time_til_next_tilt)
+8 -15
View File
@@ -5,24 +5,17 @@
armor = list(MELEE = 30, BULLET = 30, LASER = 15, ENERGY = 20, BOMB = 20, RAD = 0, FIRE = 100)
destruction_sleep_duration = 4 SECONDS
/obj/mecha/combat/moved_inside(mob/living/carbon/human/H as mob)
/obj/mecha/combat/moved_inside(mob/living/carbon/human/H)
if(..())
if(H.client)
H.client.mouse_pointer_icon = file("icons/mecha/mecha_mouse.dmi")
return 1
else
return 0
H.add_mousepointer(MP_MECHA_PRIORITY, 'icons/mouse_icons/mecha_mouse.dmi')
return TRUE
/obj/mecha/combat/mmi_moved_inside(obj/item/mmi/mmi_as_oc as obj, mob/user as mob)
/obj/mecha/combat/mmi_moved_inside(obj/item/mmi/mmi_as_oc, mob/user as mob)
if(..())
if(occupant.client)
occupant.client.mouse_pointer_icon = file("icons/mecha/mecha_mouse.dmi")
return 1
else
return 0
occupant.add_mousepointer(MP_MECHA_PRIORITY, 'icons/mouse_icons/mecha_mouse.dmi')
return TRUE
/obj/mecha/combat/go_out()
if(occupant && occupant.client)
occupant.client.mouse_pointer_icon = initial(occupant.client.mouse_pointer_icon)
if(occupant)
occupant.remove_mousepointer(MP_MECHA_PRIORITY)
..()
+3
View File
@@ -1076,3 +1076,6 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
if(iscarbon(user))
var/mob/living/carbon/C = user
C.update_hands_hud()
/obj/item/proc/on_hands_swap(mob/user, in_active_hand)
return