Skip to content

Commit

Permalink
Adds mentor cloak and updated admin cloak (#4409)
Browse files Browse the repository at this point in the history
* cloaks

* mentorcapecode

* cloak toggle

* greyscaling

* greyscale working

* pixel fix

---------

Co-authored-by: shodd <[email protected]>
  • Loading branch information
Shoddd and shodd authored Nov 29, 2024
1 parent 6801c8b commit d5519e6
Show file tree
Hide file tree
Showing 8 changed files with 72 additions and 4 deletions.
10 changes: 10 additions & 0 deletions code/datums/greyscale/config_types/greyscale_configs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,16 @@
icon_file = 'monkestation/icons/mob/clothing/neck.dmi'
json_config = 'code/datums/greyscale/json_configs/boatcloakworn.json'

/datum/greyscale_config/admincloak
name = "admincloak"
icon_file = 'monkestation/icons/obj/clothing/necks.dmi'
json_config = 'code/datums/greyscale/json_configs/admincloak.json'

/datum/greyscale_config/admincloak_worn
name = "wadmincloak"
icon_file = 'monkestation/icons/obj/clothing/necks.dmi'
json_config = 'code/datums/greyscale/json_configs/admincloakworn.json'

/datum/greyscale_config/fish_analyzer_inhand_left
name = "Held Fish Analyzer, Left"
icon_file = 'icons/mob/inhands/items_lefthand.dmi'
Expand Down
15 changes: 15 additions & 0 deletions code/datums/greyscale/json_configs/admincloak.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

{
"admincloak": [
{
"type": "icon_state",
"icon_state": "admin"
},
{
"type": "icon_state",
"icon_state": "admin-lizard",
"blend_mode": "overlay",
"color_ids": [1]
}
]
}
15 changes: 15 additions & 0 deletions code/datums/greyscale/json_configs/admincloakworn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

{
"wadmincloak": [
{
"type": "icon_state",
"icon_state": "admin"
},
{
"type": "icon_state",
"icon_state": "admin-lizard",
"blend_mode": "overlay",
"color_ids": [1]
}
]
}
20 changes: 17 additions & 3 deletions monkestation/code/modules/clothing/neck/cloaks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,27 @@
worn_icon_state = "ace"
resistance_flags = FIRE_PROOF

/obj/item/clothing/neck/admin
/obj/item/clothing/neck/admincloak
name = "admin cloak"
desc = "Weh!"
icon_state = "admincloak"
worn_icon_state = "wadmincloak"
greyscale_config = /datum/greyscale_config/admincloak
greyscale_config_worn = /datum/greyscale_config/admincloak_worn
greyscale_colors = "#FFFFFF"
flags_1 = IS_PLAYER_COLORABLE_1

/obj/item/clothing/neck/mentorcloak
name = "mentor cloak"
desc = "Buzz!"
icon = 'monkestation/icons/obj/clothing/necks.dmi'
worn_icon = 'monkestation/icons/obj/clothing/necks.dmi'
icon_state = "admin"
worn_icon_state = "admin"
icon_state = "mentor"

/obj/item/clothing/neck/mentor/Initialize(mapload)
. = ..()
AddComponent(/datum/component/toggle_clothes, "mentor_t")


/obj/item/clothing/neck/helldivercape
name = "helldiver cape"
Expand Down
2 changes: 2 additions & 0 deletions monkestation/code/modules/loadouts/items/_loadout_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ GLOBAL_LIST_EMPTY(all_loadout_datums)
var/requires_purchase = TRUE
///can only admins use this?
var/admin_only = FALSE
//can only mentors use this?
var/mentor_only = FALSE

/*
* Place our [var/item_path] into [outfit].
Expand Down
9 changes: 8 additions & 1 deletion monkestation/code/modules/loadouts/items/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
name = "Admin Cloak"
requires_purchase = FALSE
admin_only = TRUE
item_path = /obj/item/clothing/neck/admin
item_path = /obj/item/clothing/neck/admincloak


/datum/loadout_item/neck/mentor_cloak
name = "Mentor Cloak"
requires_purchase = FALSE
mentor_only = TRUE
item_path = /obj/item/clothing/neck/mentorcloak
5 changes: 5 additions & 0 deletions monkestation/code/modules/loadouts/loadout_middleware.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@
formatted_list.len--
continue

if(item.mentor_only) //These checks are also performed in the backend.
if(!preferences.parent.mentor_datum && !is_admin(preferences.parent))
formatted_list.len--
continue

if(item.admin_only) //These checks are also performed in the backend.
if(!is_admin(preferences.parent))
formatted_list.len--
Expand Down
Binary file modified monkestation/icons/obj/clothing/necks.dmi
Binary file not shown.

0 comments on commit d5519e6

Please sign in to comment.