Modular Clothes System V2
Introduction of the second, improved version of a system for modular clothes, with the aim to allow the transformation of any given item to a modular one. Tweaked layer defines to add in specific layers for modular clothes sprites
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
/mob/living/carbon
|
||||
var/modular_items = list()
|
||||
|
||||
/mob/living/carbon/adjust_fatness(adjustment_amount, type_of_fattening = FATTENING_TYPE_ITEM)
|
||||
..()
|
||||
for(var/obj/item/item in modular_items)
|
||||
item.update_modular_overlays(src)
|
||||
|
||||
/obj/item
|
||||
var/modular_icon_location = null
|
||||
var/mod_overlays = list()
|
||||
|
||||
/obj/item/equipped(mob/user, slot)
|
||||
if(modular_icon_location != null && slot == slot_flags) //if(slot == ITEM_SLOT_ICLOTHING)
|
||||
update_modular_overlays(user)
|
||||
..()
|
||||
|
||||
/obj/item/dropped(mob/user)
|
||||
remove_modular_overlays(user)
|
||||
..()
|
||||
|
||||
/obj/item/proc/add_modular_overlay(mob/living/carbon/U, modular_icon, modular_layer, sprite_color)
|
||||
var/mutable_appearance/mod_overlay = mutable_appearance(modular_icon_location, modular_icon, -(modular_layer), color = sprite_color)
|
||||
mod_overlays += mod_overlay
|
||||
U.overlays_standing[modular_layer] = mod_overlay
|
||||
U.apply_overlay(modular_layer)
|
||||
|
||||
/obj/item/proc/get_modular_belly(obj/item/organ/genital/G)
|
||||
return "belly_[get_belly_size(G)][get_belly_alt()]"
|
||||
|
||||
/obj/item/proc/get_belly_size(obj/item/organ/genital/G)
|
||||
var/size = G.size
|
||||
if(G.size > 9)
|
||||
size = 9
|
||||
var/shape
|
||||
if(G.owner.fullness <= FULLNESS_LEVEL_BLOATED)
|
||||
switch(G.shape)
|
||||
if("Soft Belly")
|
||||
shape = "soft"
|
||||
if("Round Belly")
|
||||
shape = "round"
|
||||
else
|
||||
shape = "stuffed"
|
||||
var/stuffed_modifier
|
||||
switch(G.owner.fullness)
|
||||
if(FULLNESS_LEVEL_BLOATED to FULLNESS_LEVEL_BEEG) // Take the stuffed sprite of the same size
|
||||
stuffed_modifier = 0
|
||||
if(FULLNESS_LEVEL_BEEG to FULLNESS_LEVEL_NOMOREPLZ) // Take the stuffed sprite of size + 1
|
||||
stuffed_modifier = 1
|
||||
if(FULLNESS_LEVEL_NOMOREPLZ to INFINITY)// Take the stuffed sprite of size + 2
|
||||
stuffed_modifier = 2
|
||||
size = size + stuffed_modifier
|
||||
|
||||
return "[shape]_[size]"
|
||||
|
||||
/obj/item/proc/get_belly_alt()
|
||||
return ""
|
||||
|
||||
/obj/item/clothing/under/get_belly_alt()
|
||||
return "[(adjusted) ? "_d" : ""]"
|
||||
|
||||
/obj/item/proc/get_modular_butt(obj/item/organ/genital/G)
|
||||
return "butt_[(G.size <= 10 ) ? "[G.size]" : "10"][get_butt_alt()]"
|
||||
|
||||
/obj/item/proc/get_butt_alt()
|
||||
return "[(mutantrace_variation == STYLE_DIGITIGRADE) ? "_l" : ""]"
|
||||
|
||||
/obj/item/proc/get_modular_breasts(obj/item/organ/genital/G)
|
||||
var/size
|
||||
if(G.size <= "o")
|
||||
size = G.size
|
||||
else
|
||||
switch(G.size)
|
||||
if("huge")
|
||||
size = "huge"
|
||||
if("massive")
|
||||
size = "massive"
|
||||
if("giga")
|
||||
size = "giga"
|
||||
if("impossible")
|
||||
size = "impossible"
|
||||
return "breasts_[size][get_breasts_alt()]"
|
||||
|
||||
/obj/item/proc/get_breasts_alt()
|
||||
return ""
|
||||
|
||||
/obj/item/proc/update_modular_overlays(mob/user)
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
var/mob/living/carbon/U = user
|
||||
delete_modular_overlays(U)
|
||||
|
||||
if(!(src in U.modular_items))
|
||||
U.modular_items += src
|
||||
var/obj/item/organ/O
|
||||
var/obj/item/organ/genital/G
|
||||
for(O in U.internal_organs) //check the user for the organs they have
|
||||
if(istype(O, /obj/item/organ/genital/belly)) //if that organ is a belly
|
||||
G = O //treat that organ as a genital
|
||||
var/modular_sprite = get_modular_belly(G)
|
||||
add_modular_overlay(U, modular_sprite, MODULAR_BELLY_LAYER, color)
|
||||
add_modular_overlay(U, "[modular_sprite]_SOUTH", BELLY_FRONT_LAYER, color)
|
||||
if(istype(O, /obj/item/organ/genital/butt)) //if that organ is the butt
|
||||
G = O
|
||||
var/modular_sprite = get_modular_butt(G)
|
||||
add_modular_overlay(U, modular_sprite, MODULAR_BUTT_LAYER, color)
|
||||
add_modular_overlay(U, "[modular_sprite]_NORTH", BUTT_BEHIND_LAYER, color)
|
||||
if(istype(O, /obj/item/organ/genital/breasts)) //if the organ is the breasts
|
||||
G = O
|
||||
var/modular_sprite = get_modular_breasts(G)
|
||||
add_modular_overlay(U, modular_sprite, MODULAR_BREASTS_LAYER, color)
|
||||
add_modular_overlay(U, "[modular_sprite]_NORTH", BREASTS_BEHIND_LAYER, color)
|
||||
add_modular_overlay(U, "[modular_sprite]_SOUTH", BREASTS_FRONT_LAYER, color)
|
||||
|
||||
/obj/item/proc/delete_modular_overlays(mob/user)
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
var/mob/living/carbon/U = user
|
||||
if(!(src in U.modular_items))
|
||||
return
|
||||
for(var/mutable_appearance/overlay in mod_overlays)
|
||||
U.cut_overlay(overlay)
|
||||
mod_overlays -= mod_overlays
|
||||
|
||||
/obj/item/proc/remove_modular_overlays(mob/user)
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
delete_modular_overlays(user)
|
||||
var/mob/living/carbon/U = user
|
||||
if(src in U.modular_items)
|
||||
U.modular_items -= src
|
||||
|
||||
/obj/item/clothing/under/color/grey
|
||||
modular_icon_location = 'GainStation13/icons/mob/modclothes/graymodular_new.dmi'
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 89 KiB |
+32
-25
@@ -33,30 +33,37 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
|
||||
//Human Overlays Indexes/////////
|
||||
//LOTS OF CIT CHANGES HERE. BE CAREFUL WHEN UPSTREAM ADDS MORE LAYERS
|
||||
#define MUTATIONS_LAYER 35 //mutations. Tk headglows, cold resistance glow, etc
|
||||
#define ANTAG_LAYER 34 //stuff for things like cultism indicators (clock cult glow, cultist red halos, whatever else new that comes up)
|
||||
#define GENITALS_BEHIND_LAYER 33 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer
|
||||
#define BODY_BEHIND_LAYER 32 //certain mutantrace features (tail when looking south) that must appear behind the body parts
|
||||
#define BODYPARTS_LAYER 31 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag
|
||||
#define MARKING_LAYER 30 //Matrixed body markings because clashing with snouts?
|
||||
#define BODY_ADJ_LAYER 29 //certain mutantrace features (snout, body markings) that must appear above the body parts
|
||||
#define BODY_LAYER 28 //underwear, undershirts, socks, eyes, lips(makeup)
|
||||
#define BODY_ADJ_UPPER_LAYER 27
|
||||
#define FRONT_MUTATIONS_LAYER 26 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
|
||||
#define DAMAGE_LAYER 25 //damage indicators (cuts and burns)
|
||||
#define UNIFORM_LAYER 24
|
||||
#define ID_LAYER 23
|
||||
#define HANDS_PART_LAYER 22
|
||||
#define SHOES_LAYER 21
|
||||
#define GLOVES_LAYER 20
|
||||
#define EARS_LAYER 19
|
||||
#define GENITALS_UNDER_LAYER 18
|
||||
#define SUIT_LAYER 17
|
||||
#define GLASSES_LAYER 16
|
||||
#define BELT_LAYER 15 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 14
|
||||
#define NECK_LAYER 13
|
||||
#define BACK_LAYER 12
|
||||
#define MUTATIONS_LAYER 42 //mutations. Tk headglows, cold resistance glow, etc
|
||||
#define ANTAG_LAYER 41 //stuff for things like cultism indicators (clock cult glow, cultist red halos, whatever else new that comes up)
|
||||
#define GENITALS_BEHIND_LAYER 40 //Some genitalia needs to be behind everything, such as with taurs (Taurs use body_behind_layer
|
||||
#define BREASTS_BEHIND_LAYER 39 //GS13 Edit - Modular Clothes Layer
|
||||
#define BODY_BEHIND_LAYER 38 //certain mutantrace features (tail when looking south) that must appear behind the body parts
|
||||
#define BODYPARTS_LAYER 37 //Initially "AUGMENTS", this was repurposed to be a catch-all bodyparts flag
|
||||
#define MARKING_LAYER 36 //Matrixed body markings because clashing with snouts?
|
||||
#define BODY_ADJ_LAYER 35 //certain mutantrace features (snout, body markings) that must appear above the body parts
|
||||
#define BODY_LAYER 34 //underwear, undershirts, socks, eyes, lips(makeup)
|
||||
#define BODY_ADJ_UPPER_LAYER 33
|
||||
#define FRONT_MUTATIONS_LAYER 32 //mutations that should appear above body, body_adj and bodyparts layer (e.g. laser eyes)
|
||||
#define DAMAGE_LAYER 31 //damage indicators (cuts and burns)
|
||||
#define UNIFORM_LAYER 30
|
||||
#define ID_LAYER 29
|
||||
#define HANDS_PART_LAYER 28
|
||||
#define SHOES_LAYER 27
|
||||
#define GLOVES_LAYER 26
|
||||
#define EARS_LAYER 25
|
||||
#define GENITALS_UNDER_LAYER 24
|
||||
#define MODULAR_BELLY_LAYER 23 //GS13 Edit - Modular Clothes Layer
|
||||
#define MODULAR_BREASTS_LAYER 22 //GS13 Edit - Modular Clothes Layer
|
||||
#define MODULAR_BUTT_LAYER 21 //GS13 Edit - Modular Clothes Layer
|
||||
#define SUIT_LAYER 20
|
||||
#define GLASSES_LAYER 19
|
||||
#define BELT_LAYER 18 //Possible make this an overlay of somethign required to wear a belt?
|
||||
#define SUIT_STORE_LAYER 17
|
||||
#define NECK_LAYER 16
|
||||
#define BACK_LAYER 15
|
||||
#define BELLY_FRONT_LAYER 14 //GS13 Edit - Modular Clothes Layer
|
||||
#define BREASTS_FRONT_LAYER 13 //GS13 Edit - Modular Clothes Layer
|
||||
#define BUTT_BEHIND_LAYER 12 //GS13 Edit - Modular Clothes Layer
|
||||
#define GENITALS_EXPOSED_LAYER 11
|
||||
#define GENITALS_FRONT_LAYER 10 //Draws some genitalia above clothes and the TAUR body if need be.
|
||||
#define HAIR_LAYER 9 //TODO: make part of head layer?
|
||||
@@ -68,7 +75,7 @@ Will print: "/mob/living/carbon/human/death" (you can optionally embed it in a s
|
||||
#define HANDS_LAYER 3
|
||||
#define BODY_FRONT_LAYER 2
|
||||
#define FIRE_LAYER 1 //If you're on fire
|
||||
#define TOTAL_LAYERS 35 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
|
||||
#define TOTAL_LAYERS 42 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
|
||||
|
||||
//Human Overlay Index Shortcuts for alternate_worn_layer, layers
|
||||
//Because I *KNOW* somebody will think layer+1 means "above"
|
||||
|
||||
+2
-1
@@ -3977,9 +3977,9 @@
|
||||
#include "GainStation13\code\machinery\feeding_tube.dm"
|
||||
#include "GainStation13\code\machinery\feeding_tube_industrial.dm"
|
||||
#include "GainStation13\code\machinery\gym.dm"
|
||||
#include "GainStation13\code\machinery\doors\airlock_types.dm"
|
||||
#include "GainStation13\code\machinery\powered_quantum_pad.dm"
|
||||
#include "GainStation13\code\machinery\supply_teleporter.dm"
|
||||
#include "GainStation13\code\machinery\doors\airlock_types.dm"
|
||||
#include "GainStation13\code\mechanics\calorite.dm"
|
||||
#include "GainStation13\code\mechanics\fatness.dm"
|
||||
#include "GainStation13\code\mechanics\fatrousal.dm"
|
||||
@@ -4012,6 +4012,7 @@
|
||||
#include "GainStation13\code\modules\client\preferences\preferences.dm"
|
||||
#include "GainStation13\code\modules\clothing\under\jobs\clothing.dm"
|
||||
#include "GainStation13\code\modules\clothing\under\jobs\modcivilian.dm"
|
||||
#include "GainStation13\code\modules\clothing\under\jobs\modular_items.dm"
|
||||
#include "GainStation13\code\modules\events\vent_clog.dm\vent_clog.dm"
|
||||
#include "GainStation13\code\modules\food_and_drinks\drinks.dm"
|
||||
#include "GainStation13\code\modules\food_and_drinks\food.dm"
|
||||
|
||||
Reference in New Issue
Block a user