more work

This commit is contained in:
Metis
2024-09-13 01:50:58 -04:00
parent 8fd779ef02
commit 7b0780804f
320 changed files with 12185 additions and 161 deletions
@@ -0,0 +1,3 @@
//This file is empty right now, but leaves room for people to put shit here in the future for those who are lazy
/mob/living/silicon/robot
var/datum/action/cyborg_small_sprite/small_sprite_action //This gets replaced every time the cyborg changes modules --Cyanosis
@@ -0,0 +1,18 @@
//This file is empty right now, but leaves room for people to put shit here in the future for those who are lazy
//This proc gets called whenever a new robot module is being applied --Cyanosis
/obj/item/robot_module/proc/handle_sprite_action(mob/living/silicon/robot/R, is_huge = FALSE)
ASSERT(istype(R))
if(R.small_sprite_action)
QDEL_NULL(R.small_sprite_action)
if(!is_huge) //only from the expander upgrade. The borg won't have an action if they don't have the expander upgrade
return
for(var/P in typesof(/datum/action/cyborg_small_sprite))
var/datum/action/cyborg_small_sprite/action = P
if(initial(action.designated_module) == name)
R.small_sprite_action = new action()
R.small_sprite_action.Grant(R)
break
if(!R.small_sprite_action)
R.small_sprite_action = new()
R.small_sprite_action.Grant(R)
@@ -0,0 +1,51 @@
//Ported from virgo, with some touch ups to make it work with our code.
/mob/living
var/list/status_indicators = null // Will become a list as needed.
/mob/living/proc/add_status_indicator(mutable_appearance/thing)
if(get_status_indicator(thing))
return
if(!istype(thing, /mutable_appearance))
thing = mutable_appearance('hyperstation/icons/mob/status_indicators.dmi', icon_state = thing)
LAZYADD(status_indicators, thing)
handle_status_indicators()
/mob/living/proc/remove_status_indicator(mutable_appearance/thing)
thing = get_status_indicator(thing)
cut_overlay(thing)
LAZYREMOVE(status_indicators, thing)
handle_status_indicators()
/mob/living/proc/get_status_indicator(mutable_appearance/thing)
if(!istype(thing, /mutable_appearance))
for(var/mutable_appearance/I in status_indicators)
if(I.icon_state == thing)
return I
return LAZYACCESS(status_indicators, LAZYFIND(status_indicators, thing))
/mob/living/proc/handle_status_indicators()
// First, get rid of all the overlays.
for(var/thing in status_indicators)
cut_overlay(thing)
if(!LAZYLEN(status_indicators))
return
if(stat == DEAD)
return
// Now the indicator row can actually be built.
for(var/thing in status_indicators)
var/mutable_appearance/I = thing
I.appearance_flags = PIXEL_SCALE|KEEP_APART
I.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
I.plane = HUD_PLANE
I.layer = ABOVE_FLY_LAYER
I.pixel_y = 18
I.pixel_x = 18
add_overlay(I)