mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Finish the damn PR
This commit is contained in:
@@ -280,13 +280,13 @@ CREATE TABLE `SS13_player` (
|
||||
`fupdate` smallint(4) DEFAULT '0',
|
||||
`parallax` tinyint(1) DEFAULT '8',
|
||||
`byond_date` DATE DEFAULT NULL,
|
||||
`keybindings` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`keybindings` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||
`2fa_status` ENUM('DISABLED','ENABLED_IP','ENABLED_ALWAYS') NOT NULL DEFAULT 'DISABLED' COLLATE 'utf8mb4_general_ci',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ckey` (`ckey`),
|
||||
KEY `lastseen` (`lastseen`),
|
||||
KEY `co
|
||||
KEY `computerid` (`computerid`),
|
||||
KEY `ip` (`ip`),
|
||||
KEY `fuid` (`fuid`),
|
||||
KEY `fupdate` (`fupdate`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=135298 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
if(WEST)
|
||||
pixel_x = 32
|
||||
|
||||
/obj/structure/mirror/Destroy()
|
||||
QDEL_LIST_ASSOC_VAL(ui_users)
|
||||
return ..()
|
||||
|
||||
/obj/structure/mirror/attack_hand(mob/user)
|
||||
if(broken)
|
||||
return
|
||||
|
||||
@@ -153,6 +153,12 @@
|
||||
else
|
||||
//this shouldn't happen
|
||||
H.h_style = "Bald"
|
||||
// Gradient
|
||||
H.h_grad_style = "None"
|
||||
H.h_grad_offset_x = 0
|
||||
H.h_grad_offset_y = 0
|
||||
H.h_grad_colour = "#000000"
|
||||
H.h_grad_alpha = 255
|
||||
|
||||
update_hair()
|
||||
|
||||
@@ -310,6 +316,25 @@
|
||||
update_body()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/change_hair_gradient(style, offset_raw, color, alpha)
|
||||
var/obj/item/organ/external/head/H = get_organ("head")
|
||||
if(!H)
|
||||
return
|
||||
|
||||
if(!isnull(style))
|
||||
H.h_grad_style = style
|
||||
if(!isnull(offset_raw))
|
||||
var/list/expl = splittext(offset_raw, ",")
|
||||
if(length(expl) == 2)
|
||||
H.h_grad_offset_x = clamp(text2num(expl[1]) || 0, -16, 16)
|
||||
H.h_grad_offset_y = clamp(text2num(expl[2]) || 0, -16, 16)
|
||||
if(!isnull(color))
|
||||
H.h_grad_colour = color
|
||||
if(!isnull(alpha))
|
||||
H.h_grad_alpha = clamp(alpha, 0, 255)
|
||||
|
||||
update_hair()
|
||||
|
||||
/mob/living/carbon/human/proc/update_dna()
|
||||
check_dna()
|
||||
dna.ready_dna(src)
|
||||
|
||||
@@ -346,6 +346,19 @@
|
||||
else if(hair_style.do_colouration)
|
||||
hair_s.Blend(h_colour, ICON_ADD)
|
||||
|
||||
// mochi TODO: rewrite the mess that is this proc
|
||||
var/datum/sprite_accessory/hair_gradient/gradient = GLOB.hair_gradients_list[h_grad_style]
|
||||
if(gradient)
|
||||
var/icon/grad_s = new/icon("icon" = gradient.icon, "icon_state" = gradient.icon_state)
|
||||
if(h_grad_offset_x)
|
||||
grad_s.Shift(EAST, h_grad_offset_x)
|
||||
if(h_grad_offset_y)
|
||||
grad_s.Shift(NORTH, h_grad_offset_y)
|
||||
grad_s.Blend(hair_s, ICON_ADD)
|
||||
grad_s.MapColors(COLOR_BLACK, COLOR_BLACK, COLOR_BLACK, h_grad_colour)
|
||||
grad_s.ChangeOpacity(h_grad_alpha / 255)
|
||||
hair_s.Blend(grad_s, ICON_OVERLAY)
|
||||
|
||||
if(hair_style.secondary_theme)
|
||||
var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s")
|
||||
if(!hair_style.no_sec_colour && hair_style.do_colouration )
|
||||
|
||||
@@ -93,6 +93,30 @@
|
||||
if(new_hair && (!..()) && owner.change_hair_color(new_hair, 1))
|
||||
update_dna()
|
||||
|
||||
if("hair_gradient")
|
||||
if(can_change(APPEARANCE_HAIR) && length(valid_hairstyles))
|
||||
var/new_style = input("Please select gradient style.", "Hair Gradient", head_organ.h_grad_style) as null|anything in GLOB.hair_gradients_list
|
||||
if(new_style)
|
||||
owner.change_hair_gradient(style = new_style)
|
||||
|
||||
if("hair_gradient_offset")
|
||||
if(can_change(APPEARANCE_HAIR) && length(valid_hairstyles))
|
||||
var/new_offset = input("Please enter gradient offset as a comma-separated value (x,y). Example:\n0,0 (no offset)\n5,0 (5 pixels to the right)", "Hair Gradient", "[head_organ.h_grad_offset_x],[head_organ.h_grad_offset_y]") as null|text
|
||||
if(new_offset)
|
||||
owner.change_hair_gradient(offset_raw = new_offset)
|
||||
|
||||
if("hair_gradient_colour")
|
||||
if(can_change(APPEARANCE_HAIR) && length(valid_hairstyles))
|
||||
var/new_color = input("Please select gradient color.", "Hair Gradient", head_organ.h_grad_colour) as null|color
|
||||
if(new_color)
|
||||
owner.change_hair_gradient(color = new_color)
|
||||
|
||||
if("hair_gradient_alpha")
|
||||
if(can_change(APPEARANCE_HAIR) && length(valid_hairstyles))
|
||||
var/new_alpha = input("Please enter gradient alpha.", "Hair Gradient", head_organ.h_grad_alpha) as null|num
|
||||
if(!isnull(new_alpha))
|
||||
owner.change_hair_gradient(alpha = new_alpha)
|
||||
|
||||
if("facial_hair")
|
||||
if(can_change(APPEARANCE_FACIAL_HAIR) && (params["facial_hair"] in valid_facial_hairstyles))
|
||||
if(owner.change_facial_hair(params["facial_hair"]))
|
||||
@@ -274,6 +298,7 @@
|
||||
data["change_head_marking_color"] = can_change_markings("head")
|
||||
data["change_body_marking_color"] = can_change_markings("body")
|
||||
data["change_tail_marking_color"] = can_change_markings("tail")
|
||||
data["change_hair_gradient"] = can_change(APPEARANCE_HAIR) && length(valid_hairstyles)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ export const AppearanceChanger = (props, context) => {
|
||||
change_hair,
|
||||
hair_styles,
|
||||
hair_style,
|
||||
change_hair_gradient,
|
||||
change_facial_hair,
|
||||
facial_hair_styles,
|
||||
facial_hair_style,
|
||||
@@ -130,6 +131,14 @@ export const AppearanceChanger = (props, context) => {
|
||||
))}
|
||||
</LabeledList.Item>
|
||||
)}
|
||||
{!!change_hair_gradient && (
|
||||
<LabeledList.Item label="Hair Gradient">
|
||||
<Button content="Change Style" onClick={() => act('hair_gradient')} />
|
||||
<Button content="Change Offset" onClick={() => act('hair_gradient_offset')} />
|
||||
<Button content="Change Color" onClick={() => act('hair_gradient_colour')} />
|
||||
<Button content="Change Alpha" onClick={() => act('hair_gradient_alpha')} />
|
||||
</LabeledList.Item>
|
||||
)}
|
||||
{!!change_facial_hair && (
|
||||
<LabeledList.Item label="Facial hair">
|
||||
{facial_hair_styles.map(s => (
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user