mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
[MIRROR] adds animation flicks to robots (#10489)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f251351e62
commit
4e30b4fe99
@@ -159,6 +159,12 @@ SUBSYSTEM_DEF(robot_sprites)
|
|||||||
decals -= "decals"
|
decals -= "decals"
|
||||||
RS.sprite_decals |= decals
|
RS.sprite_decals |= decals
|
||||||
continue
|
continue
|
||||||
|
// special overlays that also can be used as animations, as some names have - in them, seperated by _
|
||||||
|
if(findtext(icon, regex("^animations")))
|
||||||
|
var/list/animations = splittext(icon, "_")
|
||||||
|
animations -= "animations"
|
||||||
|
RS.sprite_animations |= animations
|
||||||
|
continue
|
||||||
// Check for all the possible overlays
|
// Check for all the possible overlays
|
||||||
if(findtext(icon, regex("-roll")))
|
if(findtext(icon, regex("-roll")))
|
||||||
RS.sprite_flags |= ROBOT_HAS_SPEED_SPRITE
|
RS.sprite_flags |= ROBOT_HAS_SPEED_SPRITE
|
||||||
|
|||||||
@@ -483,6 +483,22 @@
|
|||||||
to_chat(src, span_filter_notice("You enable your \"[decal_to_toggle]\" extra apperances."))
|
to_chat(src, span_filter_notice("You enable your \"[decal_to_toggle]\" extra apperances."))
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/verb/flick_robot_animation()
|
||||||
|
set category = "Abilities.Settings"
|
||||||
|
set name = "Flick Animation"
|
||||||
|
|
||||||
|
if(!sprite_datum)
|
||||||
|
return
|
||||||
|
if(!LAZYLEN(sprite_datum.sprite_animations))
|
||||||
|
to_chat(src, span_warning("This module does not support animations."))
|
||||||
|
return
|
||||||
|
|
||||||
|
var/animation_to_play = tgui_input_list(src, "Please select which decal you want to flick", "Flick Decal", sprite_datum.sprite_animations)
|
||||||
|
if(!animation_to_play)
|
||||||
|
return
|
||||||
|
|
||||||
|
flick("[sprite_datum.sprite_icon_state]-[animation_to_play]", src)
|
||||||
|
|
||||||
/mob/living/silicon/robot/verb/toggle_glowy_stomach()
|
/mob/living/silicon/robot/verb/toggle_glowy_stomach()
|
||||||
set category = "Abilities.Settings"
|
set category = "Abilities.Settings"
|
||||||
set name = "Toggle Glowing Stomach & Accents"
|
set name = "Toggle Glowing Stomach & Accents"
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
var/list/belly_light_list = list() // Support multiple sleepers with r/g light "sleeper"
|
var/list/belly_light_list = list() // Support multiple sleepers with r/g light "sleeper"
|
||||||
var/list/belly_capacity_list = list() //Support multiple bellies with multiple sizes, default: "sleeper" = 1
|
var/list/belly_capacity_list = list() //Support multiple bellies with multiple sizes, default: "sleeper" = 1
|
||||||
var/list/sprite_decals = list() // Allow extra decals
|
var/list/sprite_decals = list() // Allow extra decals
|
||||||
|
var/list/sprite_animations = list() // Allows to flick animations
|
||||||
|
|
||||||
/// Determines if the borg has the proper flags to show an overlay.
|
/// Determines if the borg has the proper flags to show an overlay.
|
||||||
/datum/robot_sprite/proc/sprite_flag_check(var/flag_to_check)
|
/datum/robot_sprite/proc/sprite_flag_check(var/flag_to_check)
|
||||||
|
|||||||
@@ -42,6 +42,10 @@
|
|||||||
for(var/decal in RS.sprite_decals)
|
for(var/decal in RS.sprite_decals)
|
||||||
if(check_state(RS,"-[decal]"))
|
if(check_state(RS,"-[decal]"))
|
||||||
failed = TRUE
|
failed = TRUE
|
||||||
|
if(LAZYLEN(RS.sprite_animations))
|
||||||
|
for(var/animation in RS.sprite_animations)
|
||||||
|
if(check_state(RS,"-[animation]"))
|
||||||
|
failed = TRUE
|
||||||
// Control panel
|
// Control panel
|
||||||
if(RS.has_custom_open_sprites)
|
if(RS.has_custom_open_sprites)
|
||||||
if(check_state(RS,"-openpanel_nc"))
|
if(check_state(RS,"-openpanel_nc"))
|
||||||
|
|||||||
Reference in New Issue
Block a user