-
-
Notifications
You must be signed in to change notification settings - Fork 427
Unders Resprite v2 #14383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Unders Resprite v2 #14383
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -516,7 +516,7 @@ BLIND // can't see anything | |
| 3 = Report location | ||
| */ | ||
| var/displays_id = 1 | ||
| var/rolled_down = 0 | ||
| var/rolled_down = FALSE | ||
| var/basecolor | ||
|
|
||
| var/fresh_laundered_until = 0 | ||
|
|
@@ -529,6 +529,7 @@ BLIND // can't see anything | |
|
|
||
| /obj/item/clothing/under/equipped(mob/user, slot) | ||
| ..() | ||
| rolled_down = FALSE | ||
| if(slot == SLOT_W_UNIFORM && fresh_laundered_until > world.time) | ||
| fresh_laundered_until = world.time | ||
| SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "fresh_laundry", /datum/mood_event/fresh_laundry) | ||
|
|
@@ -631,18 +632,23 @@ BLIND // can't see anything | |
| if(usr.incapacitated()) | ||
| return | ||
|
|
||
| if(copytext(item_state,-2) != "_d") | ||
| basecolor = item_state | ||
| if(icon_exists('icons/mob/uniform.dmi', "[basecolor]_d")) | ||
| item_state = item_state == "[basecolor]" ? "[basecolor]_d" : "[basecolor]" | ||
| update_inv_mob() | ||
| if(rolled_down) | ||
| to_chat(usr, "<span class='notice'>Вы пытаетесь распахнуть униформу.</span>") | ||
| else | ||
| to_chat(usr, "<span class='notice'>You cannot roll down the uniform!</span>") | ||
| to_chat(usr, "<span class='notice'>Вы пытаетесь застягнуть униформу.</span>") | ||
volas marked this conversation as resolved.
Show resolved
Hide resolved
volas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| rolled_down = !rolled_down | ||
| update_inv_mob() | ||
|
|
||
| /obj/item/clothing/under/wash_act(w_color) | ||
| . = ..() | ||
| fresh_laundered_until = world.time + 5 MINUTES | ||
|
|
||
| var/obj/item/clothing/dye_type = get_dye_type(w_color) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. не уверен что понимаю что тут происходит
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. вроде ты когда-то и писал, #9117 😆 не проблема, но вообще согласен |
||
| if(!dye_type) | ||
| return | ||
| color = dye_type.color | ||
|
|
||
|
|
||
| /obj/item/clothing/under/rank/atom_init() | ||
| sensor_mode = pick(SUIT_SENSOR_OFF, SUIT_SENSOR_BINARY, SUIT_SENSOR_VITAL, SUIT_SENSOR_TRACKING) | ||
| . = ..() | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,133 +1,155 @@ | ||
| /obj/item/clothing/under/color/black | ||
| name = "black jumpsuit" | ||
| icon_state = "black" | ||
| item_state = "black" | ||
|
|
||
| /obj/item/clothing/under/color | ||
| name = "colored uniform" | ||
| icon_state = "colored" | ||
| item_state_inventory= "colored" | ||
| item_state_world = "colored_w" | ||
| item_state = "colored" | ||
| color = "#818181" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| var/mutable_appearance/item_under_overlay | ||
|
|
||
| // if needed, this can easily be changed to /obj/item/clothing/under | ||
| // in case of adding support for /obj/item/clothing, this proc will require some tweaking | ||
| /obj/item/clothing/under/color/get_standing_overlay(mob/living/carbon/human/H, def_icon_path, sprite_sheet_slot, layer, bloodied_icon_state = null, icon_state_appendix = null) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. склейка standing_overlay сейчас очень костыльная, какая-то часть кода униформы уже оказалась в родителе с проверкой на SPRITE_SHEET_UNIFORM, и потом тут еще раз проходимся и переприклеиваем все оверлеи. Надо как-то сделать по другому, но я сходу не могу вникнуть и предложить лучший вариант.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Может быть какой-то общий флаг для вещей с покраской через color, но там еще с rolldown что-то надо делать. Может надо изменить логику get_standing_overlay, делать не снизу вверх, а наоборот (сначала клеить что-то на уровне предмета, а потом в родительском проке). Но это сейчас я просто тыкаю наугад. |
||
| var/mutable_appearance/I = ..() | ||
|
|
||
| var/icon_path = def_icon_path | ||
| var/t_state = item_state ? item_state : icon_state | ||
|
|
||
| var/datum/species/S = H.species | ||
|
|
||
| if(S.sprite_sheets[sprite_sheet_slot]) | ||
| icon_path = S.sprite_sheets[sprite_sheet_slot] | ||
|
|
||
| var/fem_appendix = "" | ||
|
|
||
| // we dont have female sprites for fat uniforms | ||
| if(H.gender == FEMALE && S.gender_limb_icons && sprite_sheet_slot != SPRITE_SHEET_UNIFORM_FAT) | ||
| fem_appendix = "_fem" | ||
|
|
||
| // checks if we have a colorless overlay we need to apply | ||
| if(rolled_down || !icon_exists(icon_path, "[t_state]_overlay[fem_appendix]")) | ||
| return I | ||
|
|
||
| /obj/item/clothing/under/color/blackf | ||
| name = "feminine black jumpsuit" | ||
| desc = "It's very smart and in a ladies-size!" | ||
| icon_state = "black" | ||
| item_state = "blackf" | ||
| // add the colorless overlay | ||
| I.cut_overlays() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. зачем удалять все предыдущие оверлеи |
||
| var/mutable_appearance/under_mob_overlay = mutable_appearance(icon = icon_path, icon_state = "[t_state]_overlay[fem_appendix]") | ||
| under_mob_overlay.appearance_flags = RESET_COLOR | ||
| I.add_overlay(under_mob_overlay) | ||
|
|
||
| // re-apply blood & dirt | ||
| if(dirt_overlay && bloodied_icon_state) | ||
| var/mutable_appearance/bloodsies = mutable_appearance(icon = 'icons/effects/blood.dmi', icon_state = bloodied_icon_state) | ||
| bloodsies.color = dirt_overlay.color | ||
| I.add_overlay(bloodsies) | ||
|
|
||
| return I | ||
|
|
||
| /obj/item/clothing/under/color/update_icon() | ||
| ..() | ||
|
|
||
| // add the colorless overlay | ||
| //var/mutable_appearance/under_overlay = mutable_appearance(icon, "[icon_state]_overlay") | ||
| //under_overlay.appearance_flags = RESET_COLOR | ||
| //add_overlay(under_overlay) | ||
|
Comment on lines
+49
to
+55
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. если код не юзается зачем его оставлять |
||
|
|
||
| /obj/item/clothing/under/color/dropped() | ||
| . = ..() | ||
| update_world_icon() | ||
|
|
||
| // cut_overlay just isnt fast enough for this, unfortunately. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ну конечно, он же выполняется в оверлей контроллере скорее всего в следующий тик. |
||
| /obj/item/clothing/under/color/putdown_animation() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. будто бы можно сделать какие-то лайфхаки с кешем и подтягиванием нужного готового спрайта прямо в анимации. |
||
| return | ||
|
|
||
| /obj/item/clothing/under/color/update_world_icon() | ||
| ..() | ||
|
|
||
| // add the colorless overlay | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. зачем этот комментарий |
||
| cut_overlay(item_under_overlay) | ||
| item_under_overlay = image(icon, "[icon_state]_overlay") | ||
| item_under_overlay.appearance_flags = RESET_COLOR | ||
| add_overlay(item_under_overlay) | ||
|
|
||
| /obj/item/clothing/under/color/black | ||
| name = "black jumpsuit" | ||
| color = "#303030" | ||
|
|
||
| /obj/item/clothing/under/color/blue | ||
| name = "blue jumpsuit" | ||
| icon_state = "blue" | ||
| item_state = "blue" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| color = "#2b4e95" | ||
|
|
||
| /obj/item/clothing/under/color/green | ||
| name = "green jumpsuit" | ||
| icon_state = "green" | ||
| item_state = "green" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| color = "#477238" | ||
|
|
||
| /obj/item/clothing/under/color/grey | ||
| name = "grey jumpsuit" | ||
| icon_state = "grey" | ||
| item_state = "grey" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| color = "#818181" | ||
|
|
||
| /obj/item/clothing/under/color/orange | ||
| name = "orange jumpsuit" | ||
| desc = "It's standardised Nanotrasen prisoner-wear. Its suit sensors are stuck in the \"Fully On\" position." | ||
| icon_state = "orange" | ||
| item_state = "orange" | ||
| color = "#b9451d" | ||
| has_sensor = 2 | ||
| sensor_mode = SUIT_SENSOR_TRACKING | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
|
|
||
| /obj/item/clothing/under/color/pink | ||
| name = "pink jumpsuit" | ||
| icon_state = "pink" | ||
| item_state = "pink" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| color = "#e27285" | ||
|
|
||
| /obj/item/clothing/under/color/red | ||
| name = "red jumpsuit" | ||
| icon_state = "red" | ||
| item_state = "red" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| color = "#b91d1d" | ||
|
|
||
| /obj/item/clothing/under/color/white | ||
| name = "white jumpsuit" | ||
| icon_state = "white" | ||
| item_state = "white" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| color = "#f1ebdb" | ||
|
|
||
| /obj/item/clothing/under/color/yellow | ||
| name = "yellow jumpsuit" | ||
| icon_state = "yellow" | ||
| item_state = "yellow" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| color = "#f8c53a" | ||
|
|
||
| /obj/item/clothing/under/psyche | ||
| name = "psychedelic" | ||
| desc = "Groovy!" | ||
| icon_state = "psyche" | ||
| /obj/item/clothing/under/color/lightblue | ||
| name = "lightblue jumpsuit" | ||
| color = "#42bfe8" | ||
|
|
||
| /obj/item/clothing/under/lightblue | ||
| name = "lightblue" | ||
| desc = "lightblue" | ||
| icon_state = "lightblue" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| /obj/item/clothing/under/color/aqua | ||
| name = "aqua jumpsuit" | ||
| color = "#59cf93" | ||
|
|
||
| /obj/item/clothing/under/aqua | ||
| name = "aqua" | ||
| desc = "aqua" | ||
| icon_state = "aqua" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| /obj/item/clothing/under/color/purple | ||
| name = "purple jumpsuit" | ||
| color = "#9052bc" | ||
|
|
||
| /obj/item/clothing/under/purple | ||
| name = "purple" | ||
| desc = "purple" | ||
| icon_state = "purple" | ||
| item_state = "purple" | ||
| /obj/item/clothing/under/color/lightpurple | ||
| name = "lightpurple jumpsuit" | ||
| color = "#ceaaed" | ||
|
|
||
| /obj/item/clothing/under/lightpurple | ||
| name = "lightpurple" | ||
| desc = "lightpurple" | ||
| icon_state = "lightpurple" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| /obj/item/clothing/under/color/lightgreen | ||
| name = "lightgreen jumpsuit" | ||
| color = "#c4f129" | ||
|
|
||
| /obj/item/clothing/under/lightgreen | ||
| name = "lightgreen" | ||
| desc = "lightgreen" | ||
| icon_state = "lightgreen" | ||
|
|
||
| /obj/item/clothing/under/lightblue | ||
| name = "lightblue" | ||
| desc = "lightblue" | ||
| icon_state = "lightblue" | ||
|
|
||
| /obj/item/clothing/under/lightbrown | ||
| name = "lightbrown" | ||
| desc = "lightbrown" | ||
| icon_state = "lightbrown" | ||
|
|
||
| /obj/item/clothing/under/brown | ||
| name = "brown" | ||
| desc = "brown" | ||
| icon_state = "brown" | ||
|
|
||
| /obj/item/clothing/under/yellowgreen | ||
| name = "yellowgreen" | ||
| desc = "yellowgreen" | ||
| icon_state = "yellowgreen" | ||
|
|
||
| /obj/item/clothing/under/darkblue | ||
| name = "darkblue" | ||
| desc = "darkblue" | ||
| icon_state = "darkblue" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| /obj/item/clothing/under/color/lightbrown | ||
| name = "lightbrown jumpsuit" | ||
| color = "#d39741" | ||
|
|
||
| /obj/item/clothing/under/lightred | ||
| name = "lightred" | ||
| desc = "lightred" | ||
| icon_state = "lightred" | ||
| /obj/item/clothing/under/color/brown | ||
| name = "brown jumpsuit" | ||
| color = "#855f39" | ||
|
|
||
| /obj/item/clothing/under/darkred | ||
| name = "darkred" | ||
| desc = "darkred" | ||
| icon_state = "darkred" | ||
| flags = ONESIZEFITSALL|HEAR_TALK | ||
| /obj/item/clothing/under/color/yellowgreen | ||
| name = "yellowgreen jumpsuit" | ||
| color = "#b0dc1d" | ||
|
|
||
| /obj/item/clothing/under/color/darkblue | ||
| name = "darkblue jumpsuit" | ||
| color = "#1b2447" | ||
|
|
||
| /obj/item/clothing/under/color/lightred | ||
| name = "lightred jumpsuit" | ||
| color = "#e27272" | ||
|
|
||
| /obj/item/clothing/under/color/darkred | ||
| name = "darkred jumpsuit" | ||
| color = "#612721" | ||
Uh oh!
There was an error while loading. Please reload this page.