-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* skinnss * honk * meh * fix i guess * AAAAAAA * premium --------- Co-authored-by: Helg2 <[email protected]>
- Loading branch information
Showing
20 changed files
with
100 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Reskins object based on a user's choice | ||
* | ||
* Arguments: | ||
* * user The mob choosing a reskin option | ||
*/ | ||
/obj/item/proc/reskin_obj(obj/item/facepaint/paint, mob/user) | ||
if(!LAZYLEN(unique_reskin)) | ||
return | ||
|
||
var/list/items = list() | ||
for(var/reskin_option in unique_reskin) | ||
var/image/item_image = image(icon = src.icon, icon_state = unique_reskin[reskin_option]) | ||
items += list("[reskin_option]" = item_image) | ||
sort_list(items) | ||
|
||
var/pick = show_radial_menu(user, src, items, custom_check = CALLBACK(src, PROC_REF(check_reskin_menu), user), radius = 38, require_near = TRUE) | ||
if(!pick) | ||
return | ||
if(!unique_reskin[pick]) | ||
return | ||
current_skin = unique_reskin[pick] | ||
icon_state = unique_reskin[pick] | ||
//this may not be the right way to do it but.. | ||
if(base_icon_state) | ||
base_icon_state = unique_reskin[pick] | ||
to_chat(user, "[src] is now skinned as '[pick].'") | ||
SEND_SIGNAL(src, COMSIG_OBJ_RESKIN, user, pick) | ||
//correctly display item in hands | ||
update_icon() | ||
if(paint) | ||
user.temporarilyRemoveItemFromInventory(paint) | ||
user.update_inv_l_hand(0) | ||
user.update_inv_r_hand() | ||
qdel(paint) | ||
|
||
/** | ||
* Checks if we are allowed to interact with a radial menu for reskins | ||
* | ||
* Arguments: | ||
* * user The mob interacting with the menu | ||
*/ | ||
/obj/item/proc/check_reskin_menu(mob/user) | ||
if(QDELETED(src)) | ||
return FALSE | ||
if(current_skin) | ||
return FALSE | ||
if(!istype(user)) | ||
return FALSE | ||
if(user.incapacitated()) | ||
return FALSE | ||
return TRUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters