Skip to content

Commit

Permalink
[ALMOST MODULAR] Custom HUD icons (#2635)
Browse files Browse the repository at this point in the history
* huds merge

* codestyle

* comment edit
  • Loading branch information
SSensum authored Mar 28, 2024
1 parent ea9d94c commit bd6c44f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
hud_list[hud] = list()

else
var/image/I = image('modular_nova/master_files/icons/mob/huds/hud.dmi', src, "") //NOVA EDIT: original filepath 'icons/mob/huds/hud.dmi'
var/image/I = image(GLOB.merged_huds, src, "") // FF EDIT. NOVA EDITED ICON: 'modular_nova/master_files/icons/mob/huds/hud.dmi'; TG ORIGINAL ICON: 'icons/mob/huds/hud.dmi'
I.appearance_flags = RESET_COLOR|RESET_TRANSFORM
hud_list[hud] = I
set_hud_image_active(hud, update_huds = FALSE) //by default everything is active. but dont add it to huds to keep control.
Expand Down
9 changes: 9 additions & 0 deletions tff_modular/modules/custom_huds/code/huds.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
GLOBAL_VAR_INIT(merged_huds, merge_huds())

/proc/merge_huds()
var/icon/huds = new('modular_nova/master_files/icons/mob/huds/hud.dmi')
var/icon/ff_huds = new('tff_modular/modules/custom_huds/icons/hud.dmi')

for(var/state in icon_states(ff_huds))
huds.Insert(icon(ff_huds, state), state)
return huds
Binary file added tff_modular/modules/custom_huds/icons/hud.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -8271,6 +8271,7 @@
#include "tff_modular\modules\cqd_holsters\code\holster_injections.dm"
#include "tff_modular\modules\cqd_holsters\code\holster_storage.dm"
#include "tff_modular\modules\cqd_holsters\code\utility.dm"
#include "tff_modular\modules\custom_huds\code\huds.dm"
#include "tff_modular\modules\custom_revolution\code\rev_convert_item.dm"
#include "tff_modular\modules\custom_revolution\code\rev_custom_hud.dm"
#include "tff_modular\modules\custom_revolution\code\rev_deconvert_machine.dm"
Expand Down

0 comments on commit bd6c44f

Please sign in to comment.