From 04a0a3b8699539aed71a30ba7e451959f40ad942 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Fri, 3 Jun 2022 18:55:18 -0400 Subject: [PATCH 01/29] chat blockquotes; prettier examine text and more! --- code/datums/components/embedded.dm | 4 +- code/datums/components/mood.dm | 23 +++---- code/datums/wounds/_scars.dm | 2 +- code/datums/wounds/burns.dm | 2 +- code/game/machinery/iv_drip.dm | 8 +-- code/game/objects/items/devices/scanners.dm | 65 +++++++++---------- .../antagonists/clockcult/clock_mobs.dm | 4 +- .../devil/true_devil/_true_devil.dm | 4 +- code/modules/mob/living/carbon/examine.dm | 3 +- .../mob/living/carbon/human/examine.dm | 4 +- .../mob/living/carbon/human/human_defense.dm | 18 ++--- code/modules/mob/living/carbon/human/login.dm | 9 +-- code/modules/mob/living/silicon/ai/examine.dm | 3 +- .../mob/living/silicon/robot/examine.dm | 4 +- .../mob/living/simple_animal/constructs.dm | 3 +- .../simple_animal/friendly/drone/_drone.dm | 4 +- .../simple_animal/guardian/types/dextrous.dm | 4 +- .../mob/living/simple_animal/slime/slime.dm | 4 +- code/modules/mob/mob.dm | 2 +- .../tgui-panel/styles/components/Chat.scss | 11 ++++ .../tgui-panel/styles/goon/chat-dark.scss | 40 ++++++++++++ .../tgui-panel/styles/goon/chat-light.scss | 38 +++++++++++ 22 files changed, 172 insertions(+), 87 deletions(-) diff --git a/code/datums/components/embedded.dm b/code/datums/components/embedded.dm index 1535c3f142..9bdb009962 100644 --- a/code/datums/components/embedded.dm +++ b/code/datums/components/embedded.dm @@ -346,9 +346,9 @@ /datum/component/embedded/proc/examineTurf(datum/source, mob/user, list/examine_list) if(harmful) - examine_list += "\t There is \a [weapon] embedded in [parent]!" + examine_list += "There is \a [weapon] embedded in [parent]!" else - examine_list += "\t There is \a [weapon] stuck to [parent]!" + examine_list += "There is \a [weapon] stuck to [parent]!" /// Someone is ripping out the item from the turf by hand diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index e100326f7b..d5b988d983 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -50,7 +50,7 @@ STOP_PROCESSING(SSobj, src) /datum/component/mood/proc/print_mood(mob/user) - var/msg = "*---------*\nYour current mood\n" + var/msg = "
Your current mood\n" msg += "My mental status: " //Long term switch(sanity) if(SANITY_GREAT to INFINITY) @@ -69,23 +69,23 @@ msg += "My current mood: " //Short term switch(mood_level) if(1) - msg += "I wish I was dead!\n" + msg += "I wish I was dead!\n" if(2) - msg += "I feel terrible...\n" + msg += "I feel terrible...\n" if(3) - msg += "I feel very upset.\n" + msg += "I feel very upset.\n" if(4) - msg += "I'm a bit sad.\n" + msg += "I'm a bit sad.\n" if(5) - msg += "I'm alright.\n" + msg += "I'm alright.\n" if(6) - msg += "I feel pretty okay.\n" + msg += "I feel pretty okay.\n" if(7) - msg += "I feel pretty good.\n" + msg += "I feel pretty good.\n" if(8) - msg += "I feel amazing!\n" + msg += "I feel amazing!\n" if(9) - msg += "I love life!\n" + msg += "I love life!\n" msg += "Moodlets:\n"//All moodlets if(mood_events.len) @@ -93,7 +93,8 @@ var/datum/mood_event/event = mood_events[i] msg += event.description else - msg += "I don't have much of a reaction to anything right now.\n" + msg += "I don't have much of a reaction to anything right now.\n" + msg += "
" to_chat(user || parent, msg) ///Called after moodevent/s have been added/removed. diff --git a/code/datums/wounds/_scars.dm b/code/datums/wounds/_scars.dm index 3365fc359d..3fb6546edb 100644 --- a/code/datums/wounds/_scars.dm +++ b/code/datums/wounds/_scars.dm @@ -118,7 +118,7 @@ if(WOUND_SEVERITY_LOSS) msg = "[victim.p_their(TRUE)] [limb.name] [description]." // different format msg = "[msg]" - return "\t[msg]" + return "[msg]" /// Whether a scar can currently be seen by the viewer /datum/scar/proc/is_visible(mob/viewer) diff --git a/code/datums/wounds/burns.dm b/code/datums/wounds/burns.dm index f3e22807cf..c16be6005a 100644 --- a/code/datums/wounds/burns.dm +++ b/code/datums/wounds/burns.dm @@ -167,7 +167,7 @@ if(WOUND_INFECTION_SEPTIC to INFINITY) . += "Infection Level: LOSS IMMINENT\n" if(infestation > sanitization) - . += "\tSurgical debridement, antiobiotics/sterilizers, or regenerative mesh will rid infection. Paramedic UV penlights are also effective.\n" + . += "Surgical debridement, antiobiotics/sterilizers, or regenerative mesh will rid infection. Paramedic UV penlights are also effective.\n" if(flesh_damage > 0) . += "Flesh damage detected: Please apply ointment or regenerative mesh to allow recovery.\n" diff --git a/code/game/machinery/iv_drip.dm b/code/game/machinery/iv_drip.dm index ff6f96a29f..12b2ba08e4 100644 --- a/code/game/machinery/iv_drip.dm +++ b/code/game/machinery/iv_drip.dm @@ -230,13 +230,13 @@ if(beaker) if(beaker.reagents && beaker.reagents.reagent_list.len) - . += "\tAttached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.\n" + . += "Attached is \a [beaker] with [beaker.reagents.total_volume] units of liquid.\n" else - . += "\tAttached is an empty [beaker.name].\n" + . += "Attached is an empty [beaker.name].\n" else - . += "\tNo chemicals are attached.\n" + . += "No chemicals are attached.\n" - . += "\t[attached ? attached : "No one"] is attached." + . += "[attached ? attached : "No one"] is attached." /obj/machinery/iv_drip/telescopic name = "telescopic IV drip" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 0ca2e40b45..69fc53c904 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -145,32 +145,29 @@ GENETICS SCANNER mob_status = "Deceased" oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss - var/msg = "*---------*\nAnalyzing results for [M]:\n\tOverall status: [mob_status]" + var/msg = "Analyzing results for [M]:\n
Overall status: [mob_status]" // Damage descriptions if(brute_loss > 10) - msg += "\n\t[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected." + msg += "\n[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected." if(fire_loss > 10) - msg += "\n\t[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected." + msg += "\n[fire_loss > 50 ? "Severe" : "Minor"] burn damage detected." if(oxy_loss > 10) - msg += "\n\t[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected." + msg += "\n[oxy_loss > 50 ? "Severe" : "Minor"] oxygen deprivation detected." if(tox_loss > 10) - msg += "\n\t[tox_loss > 50 ? "Severe" : "Minor"] amount of [HAS_TRAIT(M, TRAIT_ROBOTIC_ORGANISM) ? "system corruption" : "toxin damage"] detected." + msg += "\n[tox_loss > 50 ? "Severe" : "Minor"] amount of [HAS_TRAIT(M, TRAIT_ROBOTIC_ORGANISM) ? "system corruption" : "toxin damage"] detected." if(M.getStaminaLoss()) - msg += "\n\tSubject appears to be suffering from fatigue." + msg += "\nSubject appears to be suffering from fatigue." if(advanced) - msg += "\n\tFatigue Level: [M.getStaminaLoss()]%." + msg += "\nFatigue Level: [M.getStaminaLoss()]%." if (M.getCloneLoss()) - msg += "\n\tSubject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage." + msg += "\nSubject appears to have [M.getCloneLoss() > 30 ? "Severe" : "Minor"] cellular damage." if(advanced) - msg += "\n\tCellular Damage Level: [M.getCloneLoss()]." + msg += "\nCellular Damage Level: [M.getCloneLoss()]." if(ishuman(M)) var/mob/living/carbon/human/H = M if(advanced && H.has_dna()) - msg += "\n\tGenetic Stability: [H.dna.stability]%." - - to_chat(user, msg) - msg = "" + msg += "\nGenetic Stability: [H.dna.stability]%." // Body part damage report var/list/dmgreport = list() @@ -178,7 +175,7 @@ GENETICS SCANNER var/mob/living/carbon/C = M var/list/damaged = C.get_damaged_bodyparts(1,1) if(length(damaged)>0 || oxy_loss>0 || tox_loss>0 || fire_loss>0) - dmgreport += "\ + dmgreport += "
\ \ \ \ @@ -196,7 +193,7 @@ GENETICS SCANNER \ " dmgreport += "
Damage:BruteBurn[(org.brute_dam > 0) ? "[org.brute_dam]" : "0"][(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]
" - to_chat(user, dmgreport.Join()) + msg += "\n[dmgreport.Join()]" //Organ damages report @@ -317,7 +314,7 @@ GENETICS SCANNER damage_message += " Minor [O.name] failure detected.
" if(temp_message || damage_message) - msg += "\t[uppertext(O.name)]:
[damage_message] [temp_message]\n" + msg += "\n[uppertext(O.name)]: [damage_message] [temp_message]\n" @@ -332,24 +329,24 @@ GENETICS SCANNER var/has_liver = C.dna && !(NOLIVER in C.dna.species.species_traits) var/has_stomach = C.dna && !(NOSTOMACH in C.dna.species.species_traits) if(!M.getorganslot(ORGAN_SLOT_EYES)) - msg += "\tSubject does not have eyes.\n" + msg += "Subject does not have eyes.\n" if(!M.getorganslot(ORGAN_SLOT_EARS)) - msg += "\tSubject does not have ears.\n" + msg += "Subject does not have ears.\n" if(!M.getorganslot(ORGAN_SLOT_BRAIN)) - msg += "\tSubject's brain function is non-existent!\n" + msg += "Subject's brain function is non-existent!\n" if(has_liver && !M.getorganslot(ORGAN_SLOT_LIVER)) - msg += "\tSubject's liver is missing!\n" + msg += "Subject's liver is missing!\n" if(blooded && !M.getorganslot(ORGAN_SLOT_HEART)) - msg += "\tSubject's heart is missing!\n" + msg += "Subject's heart is missing!\n" if(breathes && !M.getorganslot(ORGAN_SLOT_LUNGS)) - msg += "\tSubject's lungs have collapsed from trauma!\n" + msg += "Subject's lungs have collapsed from trauma!\n" if(has_stomach && !M.getorganslot(ORGAN_SLOT_STOMACH)) - msg += "\tSubject's stomach is missing!\n" + msg += "Subject's stomach is missing!\n" if(M.radiation) - msg += "\tSubject is irradiated.\n" - msg += "\tRadiation Level: [M.radiation] rad\n" + msg += "Subject is irradiated.\n" + msg += "Radiation Level: [M.radiation] rad\n" @@ -383,11 +380,11 @@ GENETICS SCANNER else if (S.flying_species != initial(S.flying_species)) mutant = TRUE - msg += "\tReported Species: [H.spec_trait_examine_font()][H.dna.custom_species ? H.dna.custom_species : S.name]\n" - msg += "\tBase Species: [H.spec_trait_examine_font()][S.name]\n" + msg += "\nReported Species: [H.spec_trait_examine_font()][H.dna.custom_species ? H.dna.custom_species : S.name]\n" + msg += "Base Species: [H.spec_trait_examine_font()][S.name]\n" if(mutant) - msg += "\tSubject has mutations present.\n" - msg += "\tBody temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)\n" + msg += "Subject has mutations present.\n" + msg += "Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)\n" // Time of death if(M.tod && (M.stat == DEAD || ((HAS_TRAIT(M, TRAIT_FAKEDEATH)) && !advanced))) @@ -452,14 +449,14 @@ GENETICS SCANNER if(cyberimp_detect) msg += "Detected cybernetic modifications:\n" msg += "[cyberimp_detect]\n" - msg += "*---------*" + msg += "
" to_chat(user, msg) SEND_SIGNAL(M, COMSIG_NANITE_SCAN, user, FALSE) /proc/chemscan(mob/living/user, mob/living/M) if(istype(M)) if(M.reagents) - var/msg = "*---------*\n" + var/msg = "
" if(M.reagents.reagent_list.len) var/list/datum/reagent/reagents = list() for(var/datum/reagent/R in M.reagents.reagent_list) @@ -498,7 +495,7 @@ GENETICS SCANNER if(95 to INFINITY) msg += "Subject contains a extremely dangerous amount of toxic isomers.\n" - msg += "*---------*" + msg += "
" to_chat(user, msg) /obj/item/healthanalyzer/verb/toggle_mode() @@ -529,12 +526,14 @@ GENETICS SCANNER var/render_list = "" for(var/i in patient.get_wounded_bodyparts()) + if(render_list == "") + render_list += "
" var/obj/item/bodypart/wounded_part = i render_list += "Warning: Physical trauma[LAZYLEN(wounded_part.wounds) > 1? "s" : ""] detected in [wounded_part.name]" for(var/k in wounded_part.wounds) var/datum/wound/W = k render_list += "
[W.get_scanner_description()]
\n" - render_list += "
" + render_list += "
" if(render_list == "") if(istype(scanner)) diff --git a/code/modules/antagonists/clockcult/clock_mobs.dm b/code/modules/antagonists/clockcult/clock_mobs.dm index b6fe18986a..a2263401aa 100644 --- a/code/modules/antagonists/clockcult/clock_mobs.dm +++ b/code/modules/antagonists/clockcult/clock_mobs.dm @@ -43,7 +43,7 @@ /mob/living/simple_animal/hostile/clockwork/examine(mob/user) var/t_He = p_they(TRUE) var/t_s = p_s() - var/msg = "*---------*\nThis is [icon2html(src, user)] \a [src]!\n" + var/msg = "This is [icon2html(src, user)] \a [src]!\n" msg += "[desc]\n" if(health < maxHealth) msg += "" @@ -55,7 +55,7 @@ var/addendum = examine_info() if(addendum) msg += "[addendum]\n" - msg += "*---------*" + msg += "" return list(msg) diff --git a/code/modules/antagonists/devil/true_devil/_true_devil.dm b/code/modules/antagonists/devil/true_devil/_true_devil.dm index a70d518f59..d524a7edae 100644 --- a/code/modules/antagonists/devil/true_devil/_true_devil.dm +++ b/code/modules/antagonists/devil/true_devil/_true_devil.dm @@ -63,7 +63,7 @@ /mob/living/carbon/true_devil/examine(mob/user) - . = list("*---------*\nThis is [icon2html(src, user)] [src]!") + . = list("This is [icon2html(src, user)] [src]!") //Left hand items for(var/obj/item/I in held_items) @@ -81,7 +81,7 @@ . += "You can see hellfire inside its gaping wounds." else if(health < (maxHealth/2)) . += "You can see hellfire inside its wounds." - . += "*---------*" + . += "" /mob/living/carbon/true_devil/IsAdvancedToolUser() return 1 diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 5eabae16f7..5c3ebcd235 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -6,7 +6,7 @@ var/t_has = p_have() var/t_is = p_are() - . = list("*---------*\nThis is [icon2html(src, user)] \a [src]!") + . = list("This is [icon2html(src, user)] \a [src]!") if (handcuffed) . += "[t_He] [t_is] [icon2html(handcuffed, user)] handcuffed!" @@ -153,7 +153,6 @@ if(MOOD_LEVEL_HAPPY4 to INFINITY) . += "[t_He] look[p_s()] ecstatic." SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) - . += "*---------*" /mob/living/carbon/examine_more(mob/user) if(!all_scars) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 32a4fac90f..9ac946638b 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -13,7 +13,7 @@ if(HAS_TRAIT(L, TRAIT_PROSOPAGNOSIA)) obscure_name = TRUE - . = list("*---------*\nThis is [!obscure_name ? name : "Unknown"]!") + . = list("This is [!obscure_name ? name : "Unknown"]!") var/vampDesc = ReturnVampExamine(user) // Vamps recognize the names of other vamps. var/vassDesc = ReturnVassalExamine(user) // Vassals recognize each other's marks. @@ -444,8 +444,6 @@ SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) //This also handles flavor texts now - . += "*---------*" - /mob/living/proc/status_effect_examines(pronoun_replacement) //You can include this in any mob's examine() to show the examine texts of status effects! var/list/dat = list() if(!pronoun_replacement) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 5b6fae8e1b..1de40ec80c 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -550,7 +550,7 @@ to_chat(src, "You succesfuly remove the durathread strand.") remove_status_effect(STATUS_EFFECT_CHOKINGSTRAND) return - var/to_send = "" + var/to_send = "
" visible_message("[src] examines [p_them()]self.", \ "You check yourself for injuries.") @@ -597,27 +597,27 @@ var/no_damage if(status == "OK" || status == "no damage") no_damage = TRUE - to_send += "\t Your [LB.name] [HAS_TRAIT(src, TRAIT_SELF_AWARE) ? "has" : "is"] [status].\n" + to_send += "Your [LB.name] [HAS_TRAIT(src, TRAIT_SELF_AWARE) ? "has" : "is"] [status].\n" for(var/thing in LB.wounds) var/datum/wound/W = thing var/msg switch(W.severity) if(WOUND_SEVERITY_TRIVIAL) - msg = "\t Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]." + msg = "Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]." if(WOUND_SEVERITY_MODERATE) - msg = "\t Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!" + msg = "Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!" if(WOUND_SEVERITY_SEVERE) - msg = "\t Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!" + msg = "Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!" if(WOUND_SEVERITY_CRITICAL) - msg = "\t Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!!" + msg = "Your [LB.name] is suffering [W.a_or_from] [lowertext(W.name)]!!" to_chat(src, msg) for(var/obj/item/I in LB.embedded_objects) if(I.isEmbedHarmless()) - to_chat(src, "\t There is \a [I] stuck to your [LB.name]!") + to_chat(src, "There is \a [I] stuck to your [LB.name]!") else - to_chat(src, "\t There is \a [I] embedded in your [LB.name]!") + to_chat(src, "There is \a [I] embedded in your [LB.name]!") for(var/t in missing) to_send += "Your [parse_zone(t)] is missing!\n" @@ -724,6 +724,8 @@ if(roundstart_quirks.len) to_send += "You have these quirks: [get_trait_string()].\n" + to_send += "
" + to_chat(src, to_send) else if(wear_suit) diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm index ebf76eeafa..cccee4a7ef 100644 --- a/code/modules/mob/living/carbon/human/login.dm +++ b/code/modules/mob/living/carbon/human/login.dm @@ -7,8 +7,8 @@ return var/list/print_msg = list() - print_msg += "*---------*" print_msg += "As you snap back to consciousness, you recall people messing with your stuff..." + print_msg += "
" afk_thefts = reverseRange(afk_thefts) @@ -22,13 +22,14 @@ var/time_since = world.time - iter_theft[AFK_THEFT_TIME] if(time_since > AFK_THEFT_FORGET_DETAILS_TIME) - print_msg += "\tSomeone [theft_message], but it was at least [DisplayTimeText(AFK_THEFT_FORGET_DETAILS_TIME)] ago." + print_msg += "Someone [theft_message], but it was at least [DisplayTimeText(AFK_THEFT_FORGET_DETAILS_TIME)] ago." else - print_msg += "\t[thief_name] [theft_message] roughly [DisplayTimeText(time_since, 10)] ago." + print_msg += "[thief_name] [theft_message] roughly [DisplayTimeText(time_since, 10)] ago." + + print_msg += "
" if(LAZYLEN(afk_thefts) >= AFK_THEFT_MAX_MESSAGES) print_msg += "There may have been more, but that's all you can remember..." - print_msg += "*---------*" to_chat(src, print_msg.Join("\n")) LAZYNULL(afk_thefts) diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index 4cf9b81592..ba30d3e7fd 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -1,5 +1,5 @@ /mob/living/silicon/ai/examine(mob/user) - . = list("*---------*\nThis is [icon2html(src, user)] [src]!") + . = list("This is [icon2html(src, user)] [src]!") if (stat == DEAD) . += "It appears to be powered-down." else @@ -17,6 +17,5 @@ . += "The wireless networking light is blinking." else if (!shunted && !client) . += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem..." - . += "*---------*" . += ..() diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index 45a3d15635..9674a976a4 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -1,5 +1,5 @@ /mob/living/silicon/robot/examine(mob/user) - . = list("*---------*\nThis is [icon2html(src, user)] \a [src], a [src.module.name] unit!") + . = list("This is [icon2html(src, user)] \a [src], a [src.module.name] unit!") if(desc) . += "[desc]" @@ -51,6 +51,4 @@ SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, usr, .) - . += "*---------*" - . += ..() diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 3e32712fb3..7d37039fa1 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -83,13 +83,12 @@ /mob/living/simple_animal/hostile/construct/examine(mob/user) var/t_He = p_they(TRUE) var/t_s = p_s() - . = list("*---------*\nThis is [icon2html(src, user)] \a [src]!\n[desc]") + . = list("This is [icon2html(src, user)] \a [src]!\n[desc]") if(health < maxHealth) if(health >= maxHealth/2) . += "[t_He] look[t_s] slightly dented." else . += "[t_He] look[t_s] severely dented!" - . += "*---------*" /mob/living/simple_animal/hostile/construct/attack_animal(mob/living/simple_animal/M) if(isconstruct(M)) //is it a construct? diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm index 9ecc60f7eb..d35f12b0f6 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm @@ -178,7 +178,7 @@ /mob/living/simple_animal/drone/examine(mob/user) - . = list("*---------*\nThis is [icon2html(src, user)] \a [src]!") + . = list("This is [icon2html(src, user)] \a [src]!") //Hands for(var/obj/item/I in held_items) @@ -214,7 +214,7 @@ . += "A message repeatedly flashes on its display: \"REBOOT -- REQUIRED\"." else . += "A message repeatedly flashes on its display: \"ERROR -- OFFLINE\"." - . += "*---------*" + . += "" /mob/living/simple_animal/drone/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt maintenance drones. diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm index 6d421d326e..1fd1e623db 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm @@ -18,14 +18,14 @@ /mob/living/simple_animal/hostile/guardian/dextrous/examine(mob/user) if(dextrous) - . = list("*---------*\nThis is [icon2html(src)] \a [src]!\n[desc]") + . = list("This is [icon2html(src)] \a [src]!\n[desc]") for(var/obj/item/I in held_items) if(!(I.item_flags & ABSTRACT)) . += "It has [I.get_examine_string(user)] in its [get_held_index_name(get_held_index_of_item(I))]." if(internal_storage && !(internal_storage.item_flags & ABSTRACT)) . += "It is holding [internal_storage.get_examine_string(user)] in its internal storage." - . += "*---------*" + . += "" else return ..() diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 9812307300..dc9d6ff6a3 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -421,7 +421,7 @@ return /mob/living/simple_animal/slime/examine(mob/user) - . = list("*---------*\nThis is [icon2html(src, user)] \a [src]!") + . = list("This is [icon2html(src, user)] \a [src]!") if (src.stat == DEAD) . += "It is limp and unresponsive." else @@ -446,7 +446,7 @@ if(10) . += "It is radiating with massive levels of electrical activity!" - . += "*---------*" + . += "" /mob/living/simple_animal/slime/proc/discipline_slime(mob/user) if(stat) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f5c89312e3..df3782c5b2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -330,7 +330,7 @@ else result = A.examine(src) // if a tree is examined but no client is there to see it, did the tree ever really exist? - to_chat(src, result.Join("\n")) + to_chat(src, "
[result.Join("\n")]
") SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, A) /mob/proc/clear_from_recent_examines(atom/A) diff --git a/tgui/packages/tgui-panel/styles/components/Chat.scss b/tgui/packages/tgui-panel/styles/components/Chat.scss index b439ace8c5..296ba1ab31 100644 --- a/tgui/packages/tgui-panel/styles/components/Chat.scss +++ b/tgui/packages/tgui-panel/styles/components/Chat.scss @@ -98,3 +98,14 @@ $color-bg-section: base.$color-bg-section !default; pointer-events: none; } } + +blockquote { + background-color: rgba($text-color, 0.05); + border-left: 0.15em solid; + border-color: $text-color; + padding-left: 0.3em; + padding-right: 0.3em; + margin-bottom: 0.15em; + margin-left: 0.3em; + margin-right: 0em; +} diff --git a/tgui/packages/tgui-panel/styles/goon/chat-dark.scss b/tgui/packages/tgui-panel/styles/goon/chat-dark.scss index 4406d24015..aa75db6c0d 100644 --- a/tgui/packages/tgui-panel/styles/goon/chat-dark.scss +++ b/tgui/packages/tgui-panel/styles/goon/chat-dark.scss @@ -447,6 +447,10 @@ em { font-style: italic; } +blockquote.warning { + border-color: #c51e1e; +} + .alertwarning { color: #FF0000; font-weight: bold; @@ -486,10 +490,18 @@ em { color: #9ab0ff; } +blockquote.info { + border-color: #9ab0ff; +} + .notice { color: #6685f5; } +blockquote.notice { + border-color: #6685f5; +} + .tinynotice { color: #6685f5; font-size: 85%; @@ -545,18 +557,34 @@ em { color: #059223; } +blockquote.green { + border-color: #059223; +} + .red { color: #FF0000; } +blockquote.red { + border-color: #FF0000; +} + .blue { color: #215cff; } +blockquote.blue { + border-color: #215cff; +} + .nicegreen { color: #059223; } +blockquote.nicegreen { + border-color: #059223; +} + /* hornichems */ .userlove { color: #ff42a6; @@ -575,6 +603,10 @@ em { color: #973e3b; } +blockquote.cult { + border-color: #973e3b; +} + .cultitalic { color: #973e3b; font-style: italic; @@ -630,6 +662,10 @@ em { color: #9956d3; } +blockquote.purple { + border-color: #9956d3; +} + .holoparasite { color: #88809c; } @@ -693,6 +729,10 @@ em { color: #BE8700; } +blockquote.brass { + border-color: #BE8700; +} + .heavy_brass { color: #BE8700; font-weight: bold; diff --git a/tgui/packages/tgui-panel/styles/goon/chat-light.scss b/tgui/packages/tgui-panel/styles/goon/chat-light.scss index e94d2a4e4b..42e2e478ae 100644 --- a/tgui/packages/tgui-panel/styles/goon/chat-light.scss +++ b/tgui/packages/tgui-panel/styles/goon/chat-light.scss @@ -484,6 +484,10 @@ h1.alert, h2.alert { font-style: italic; } +blockquote.warning { + border-color: #ff0000; +} + .alertwarning { color: #FF0000; font-weight: bold; @@ -522,11 +526,18 @@ h1.alert, h2.alert { .info { color: #0000CC; } +blockquote.info { + border-color: #0000CC; +} .notice { color: #000099; } +blockquote.notice { + border-color: #000099; +} + .tinynotice { color: #000099; font-size: 85%; @@ -582,18 +593,33 @@ h1.alert, h2.alert { color: #03ff39; } +blockquote.green { + border-color: #03ff39; +} + .red { color: #FF0000; } +blockquote.red { + border-color: #FF0000; +} .blue { color: #0000FF; } +blockquote.blue { + border-color: #0000FF; +} + .nicegreen { color: #14a833; } +blockquote.nicegreen { + border-color: #14a833; +} + .userlove { color: #FF1493; font-style: italic; @@ -611,6 +637,10 @@ h1.alert, h2.alert { color: #973e3b; } +blockquote.cult { + border-color: #973e3b; +} + .cultitalic { color: #973e3b; font-style: italic; @@ -666,6 +696,10 @@ h1.alert, h2.alert { color: #5e2d79; } +blockquote.purple { + border-color: #5e2d79; +} + .holoparasite { color: #35333a; } @@ -730,6 +764,10 @@ h1.alert, h2.alert { color: #BE8700; } +blockquote.brass { + border-color: #BE8700; +} + .heavy_brass { color: #BE8700; font-weight: bold; From b02372afb027fe3d8a38cf65be562a40eb0c56b2 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Sat, 4 Jun 2022 22:44:15 -0400 Subject: [PATCH 02/29] minimap refresh - high-detail, JS fixes, pixel-perfect scaling, and more! --- code/game/area/Space_Station_13_areas.dm | 4 + code/game/area/areas.dm | 4 + code/game/area/areas/ruins/_ruins.dm | 3 + code/game/objects/objs.dm | 2 + code/modules/mapping/minimaps.dm | 103 +++++++++++++++++------ code/modules/power/solar.dm | 1 + 6 files changed, 90 insertions(+), 27 deletions(-) diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm index dd70825339..361c518073 100644 --- a/code/game/area/Space_Station_13_areas.dm +++ b/code/game/area/Space_Station_13_areas.dm @@ -212,6 +212,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station area_flags = BLOBS_ALLOWED | UNIQUE_AREA | CULT_PERMITTED // airlock_wires = /datum/wires/airlock/maint sound_environment = SOUND_AREA_TUNNEL_ENCLOSED + minimap_color = "#454545" //Maintenance - Departmental @@ -435,6 +436,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/hallway nightshift_public_area = NIGHTSHIFT_AREA_PUBLIC sound_environment = SOUND_AREA_STANDARD_STATION + minimap_color = "#aaaaaa" /area/hallway/primary name = "Primary Hallway" @@ -490,6 +492,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/hallway/secondary/exit name = "Escape Shuttle Hallway" icon_state = "escape" + minimap_color = "#baa0a0" /area/hallway/secondary/exit/departure_lounge name = "Departure Lounge" @@ -498,6 +501,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station /area/hallway/secondary/entry name = "Arrival Shuttle Hallway" icon_state = "entry" + minimap_color = "#a0a0ba" /area/hallway/secondary/service name = "Service Hallway" diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 44916cf1d2..24b49a3af7 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -124,6 +124,10 @@ /// Color on minimaps, if it's null (which is default) it makes one at random. var/minimap_color + var/minimap_color2 // if this isn't null, then this will show as a checkerboard pattern mixed in with the above. works even if the above is null (for better or worse) + + var/minimap_show_walls = TRUE + /** * These two vars allow for multiple unique areas to be linked to a master area * and share some functionalities such as APC powernet nodes, fire alarms etc, without sacrificing diff --git a/code/game/area/areas/ruins/_ruins.dm b/code/game/area/areas/ruins/_ruins.dm index 6699e94129..f9af5c8ce4 100644 --- a/code/game/area/areas/ruins/_ruins.dm +++ b/code/game/area/areas/ruins/_ruins.dm @@ -9,6 +9,9 @@ ambientsounds = RUINS sound_environment = SOUND_ENVIRONMENT_STONEROOM var/valid_territory = FALSE // hey so what if we did not allow things like cult summons to appear on ruins + minimap_color = "#775940" + minimap_color2 = "#6b5d48" + minimap_show_walls = FALSE /area/ruin/unpowered diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 46248c1ff8..4ea25bec96 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -7,6 +7,8 @@ var/obj_flags = CAN_BE_HIT var/set_obj_flags // ONLY FOR MAPPING: Sets flags from a string list, handled in Initialize. Usage: set_obj_flags = "EMAGGED;!CAN_BE_HIT" to set EMAGGED and clear CAN_BE_HIT. + var/minimap_override_color // allows this obj to set its own color on the minimap + var/damtype = BRUTE var/force = 0 diff --git a/code/modules/mapping/minimaps.dm b/code/modules/mapping/minimaps.dm index 51fde1f8db..8768ddd1e8 100644 --- a/code/modules/mapping/minimaps.dm +++ b/code/modules/mapping/minimaps.dm @@ -47,21 +47,43 @@ var/meta_color = area_to_color[A] if(!meta_color) - meta_color = rgb(rand(0, 255), rand(0, 255), rand(0, 255)) // technically conflicts could happen but it's like very unlikely and it's not that big of a deal if one happens + var/meta_x = LAZYLEN(area_to_color) + 1 + var/meta_y = (((meta_x + 1) - ((meta_x + 1) % 255)) / 255) + var/meta_z = (((meta_y + 1) - ((meta_y + 1) % 255)) / 255) + meta_color = rgb(meta_x % 255, meta_y % 255, meta_z % 255) //This supports exactly 16,581,374 areas with no conflicts whatsoever before it just gives up area_to_color[A] = meta_color color_area_names[meta_color] = A.name meta_icon.DrawBox(meta_color, img_x, img_y) - if(istype(T, /turf/closed/wall)) + if(A.minimap_show_walls && istype(T, /turf/closed/wall)) map_icon.DrawBox("#000000", img_x, img_y) else if(!istype(A, /area/space)) - var/color = A.minimap_color || "#FF00FF" - if(locate(/obj/machinery/power/solar) in T) - color = "#02026a" + var/color = (A.minimap_color2 ? (((img_x + img_y) % 2) ? A.minimap_color2 : A.minimap_color ) : A.minimap_color) || "#FF00FF" + if(A.minimap_show_walls) + var/overridden + for(var/obj/structure/O in T) + if(O.minimap_override_color) + color = O.minimap_override_color + overridden = TRUE + break + else if(O.density && O.anchored) + color = BlendRGB(color, "#000000", 0.5) + overridden = TRUE + break + + //In an ideal world, we'd be able to get away with just doing for(var/obj/O in T) up there, and calling it a day. However. HOWEVER! + //Doing that causes the code to also loop through items. and that uh. Kinda bloats minimap gen time. A LOT. We're talking straight-up doubling the time it takes to gen. + //So instead we take our ctrl+c. We copy the above code. And we ctrl+v. It's awful. We hate it. But it works. It's faster. Funny mapgen go vroom + if(!overridden) + for(var/obj/machinery/O in T) + if(O.minimap_override_color) + color = O.minimap_override_color + break + else if(O.density && O.anchored) + color = BlendRGB(color, "#000000", 0.25) + break - if((locate(/obj/effect/spawner/structure/window) in T) || (locate(/obj/structure/grille) in T)) - color = BlendRGB(color, "#000000", 0.5) map_icon.DrawBox(color, img_x, img_y) map_icon.Crop(crop_x1, crop_y1, crop_x2, crop_y2) @@ -102,22 +124,48 @@ var/list/datas = list() var/list/info = list() - - for(var/i in 1 to length(minimaps))// OLD: for(var/i in 1 to length(minimaps)) + var/buttonfield = "" + var/totalmaps = length(minimaps) + for(var/i in 1 to totalmaps)// OLD: for(var/i in 1 to length(minimaps)) var/datum/minimap/M = minimaps[i] var/map_name = "minimap-[M.id].png" var/meta_name = "minimap-[M.id]-meta.png" M.send(user) info += {" -
+
+ [totalmaps > 1 ? "

Layer [i]

" : ""]
-
+ [totalmaps <= 1 ? "
" : ""]
"} datas += json_encode(M.color_area_names); + buttonfield += "Layer [i] " + + if(totalmaps > 1) + info += "
[buttonfield]
" + + //This is a hacky workaround; the status display is extremely buggy when multiple z-levels are present. We couldn't figure out how to fix this after 7 hours of banging our head against the wall + //We're coder + var/mousemove_bit = {" + canvas.onmousemove = function(e){ + var rect = canvas.getBoundingClientRect(); + var x = Math.floor(e.offsetX * img.width / rect.width); + var y = Math.floor(e.offsetY * img.height / rect.height); + + var color_idx = x * 4 + (y * 4 * imagedata.width); + var color = "#" + hexify(imagedata.data\[color_idx]) + hexify(imagedata.data\[color_idx+1]) + hexify(imagedata.data\[color_idx+2]); + + label.textContent = data\[color]; + canvas.title = data\[color]; + } + canvas.onmouseout = function(e){ + label.textContent = " "; + canvas.title = ""; + } + "} info = info.Join() //this is bad. Too bad! @@ -133,6 +181,14 @@ } return num; } + function switchmap(mapid) { + var targetblock = document.getElementById(mapid); + for(var i = 0; i < [length(minimaps)]; i++) { + var currentblock = document.getElementById("layer-" + (i + 1)); + currentblock.style.display = 'none'; + } + targetblock.style.display = ''; + } window.onload = function() { if(!window.HTMLCanvasElement) { var label = document.getElementById("label-1"); @@ -150,6 +206,7 @@ var canvas = document.createElement("canvas"); canvas.width = img.width * 2; canvas.height = img.height * 2; + canvas.id = "canvas-" + (i+1); var ctx = canvas.getContext('2d'); ctx.msImageSmoothingEnabled = false; @@ -158,31 +215,23 @@ ctx = document.createElement("canvas").getContext('2d'); ctx.canvas.width = img.width; ctx.canvas.height = img.height; + ctx.id = "ctx-" + (i+1); ctx.drawImage(document.getElementById("map-" + (i+1) + "-meta"), 0, 0); var imagedata = ctx.getImageData(0, 0, img.width, img.height); - canvas.onmousemove = function(e){ - var rect = canvas.getBoundingClientRect(); - var x = Math.floor(e.offsetX * img.width / rect.width); - var y = Math.floor(e.offsetY * img.height / rect.height); - - var color_idx = x * 4 + (y * 4 * imagedata.width); - var color = "#" + hexify(imagedata.data\[color_idx]) + hexify(imagedata.data\[color_idx+1]) + hexify(imagedata.data\[color_idx+2]); - var label = document.getElementById("label-" + (i+1)); //label-String(n) - - label.textContent = data\[color]; - canvas.title = data\[color]; - } - canvas.onmouseout = function(e){ - canvas.title = ""; - } + var label = document.getElementById("label-" + (i+1)); //label-String(n); + [totalmaps <= 1 ? mousemove_bit : ""] } } diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index fad48b4854..27fb30a459 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -5,6 +5,7 @@ desc = "A solar panel. Generates electricity when in contact with sunlight." icon = 'goon/icons/obj/power.dmi' icon_state = "sp_base" + minimap_override_color = "#02026a" density = TRUE use_power = NO_POWER_USE idle_power_usage = 0 From 670ffd6edf0ed88b28a85475943ac1c704566367 Mon Sep 17 00:00:00 2001 From: SandPoot Date: Sun, 5 Jun 2022 22:54:16 -0300 Subject: [PATCH 03/29] apply silence and fasts --- code/datums/elements/strippable.dm | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/code/datums/elements/strippable.dm b/code/datums/elements/strippable.dm index e67120f254..1edb2504ab 100644 --- a/code/datums/elements/strippable.dm +++ b/code/datums/elements/strippable.dm @@ -136,13 +136,19 @@ if (isnull(item)) return FALSE - source.visible_message( - span_warning("[user] tries to remove [source]'s [item.name]."), - span_userdanger("[user] tries to remove your [item.name]."), - ignored_mobs = user, - ) + var/strip_silence + var/obj/item/clothing/gloves/gloves = user.get_item_by_slot(ITEM_SLOT_GLOVES) + if(istype(gloves)) + strip_silence = gloves.strip_silence - to_chat(user, span_danger("You try to remove [source]'s [item]...")) + if(!strip_silence) + source.visible_message( + span_warning("[user] tries to remove [source]'s [item.name]."), + span_userdanger("[user] tries to remove your [item.name]."), + ignored_mobs = user, + ) + + to_chat(user, strip_silence ? span_danger("You try to remove [source]'s [item]...") : span_notice("You try to remove [source]'s [item]...")) user.log_message("[key_name(source)] is being stripped of [item] by [key_name(user)]", LOG_ATTACK, color="red") source.log_message("[key_name(source)] is being stripped of [item] by [key_name(user)]", LOG_VICTIM, color="red", log_globally=FALSE) item.add_fingerprint(source) @@ -284,7 +290,12 @@ /// A utility function for `/datum/strippable_item`s to start unequipping an item from a mob. /proc/start_unequip_mob(obj/item/item, mob/source, mob/user, strip_delay) - if (!do_mob(user, source, strip_delay || item.strip_delay, ignorehelditem = TRUE)) + var/strip_mod + var/obj/item/clothing/gloves/gloves = user.get_item_by_slot(ITEM_SLOT_GLOVES) + if(istype(gloves)) + strip_mod = gloves.strip_mod + + if (!do_mob(user, source, strip_mod || strip_delay || item.strip_delay, ignorehelditem = TRUE)) return FALSE return TRUE From 884fcc46c8d5e7bb0f15ef0449b87449bf479a13 Mon Sep 17 00:00:00 2001 From: SandPoot <43283559+SandPoot@users.noreply.github.com> Date: Sun, 5 Jun 2022 23:49:16 -0300 Subject: [PATCH 04/29] Update code/datums/elements/strippable.dm Co-authored-by: DeltaFire <46569814+DeltaFire15@users.noreply.github.com> --- code/datums/elements/strippable.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/datums/elements/strippable.dm b/code/datums/elements/strippable.dm index 1edb2504ab..85fea3533e 100644 --- a/code/datums/elements/strippable.dm +++ b/code/datums/elements/strippable.dm @@ -290,12 +290,12 @@ /// A utility function for `/datum/strippable_item`s to start unequipping an item from a mob. /proc/start_unequip_mob(obj/item/item, mob/source, mob/user, strip_delay) - var/strip_mod + var/strip_mod = 1 var/obj/item/clothing/gloves/gloves = user.get_item_by_slot(ITEM_SLOT_GLOVES) if(istype(gloves)) strip_mod = gloves.strip_mod - if (!do_mob(user, source, strip_mod || strip_delay || item.strip_delay, ignorehelditem = TRUE)) + if (!do_mob(user, source, (strip_delay || item.strip_delay) / strip_mod, ignorehelditem = TRUE)) return FALSE return TRUE From b14c534b374707f46557746828e463e1a0456bea Mon Sep 17 00:00:00 2001 From: deathride58 Date: Mon, 6 Jun 2022 16:51:51 -0400 Subject: [PATCH 05/29] adds suport for
tags, makes examining use 'em! --- code/game/atoms.dm | 2 +- code/modules/mob/living/carbon/examine.dm | 4 ++++ code/modules/mob/living/carbon/human/examine.dm | 3 +++ code/modules/mob/living/silicon/ai/examine.dm | 3 +++ code/modules/mob/living/silicon/examine.dm | 1 - code/modules/mob/living/silicon/robot/examine.dm | 3 +++ tgui/packages/tgui-panel/styles/components/Chat.scss | 10 ++++++++++ 7 files changed, 24 insertions(+), 2 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index c3be65243b..027ecab768 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -518,7 +518,7 @@ . = list("[get_examine_string(user, TRUE)].") if(desc) - . += desc + . += "
[desc]" if(custom_materials) var/list/materials_list = list() diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index 5c3ebcd235..958a8b599a 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -152,6 +152,10 @@ . += "[t_He] look[p_s()] very happy." if(MOOD_LEVEL_HAPPY4 to INFINITY) . += "[t_He] look[p_s()] ecstatic." + + if(LAZYLEN(.) > 1) + .[2] = "
[.[2]]" + SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) /mob/living/carbon/examine_more(mob/user) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 9ac946638b..93bd4c4eba 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -442,6 +442,9 @@ else if(isobserver(user) && traitstring) . += "Traits: [traitstring]" + if(LAZYLEN(.) > 2) //Want this to appear after species text + .[3] = "
[.[3]]" + SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) //This also handles flavor texts now /mob/living/proc/status_effect_examines(pronoun_replacement) //You can include this in any mob's examine() to show the examine texts of status effects! diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm index ba30d3e7fd..86de4c7c60 100644 --- a/code/modules/mob/living/silicon/ai/examine.dm +++ b/code/modules/mob/living/silicon/ai/examine.dm @@ -18,4 +18,7 @@ else if (!shunted && !client) . += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem..." + if(LAZYLEN(.) > 1) + .[2] = "
[.[2]]" + . += ..() diff --git a/code/modules/mob/living/silicon/examine.dm b/code/modules/mob/living/silicon/examine.dm index 7de281de5f..0840ea1191 100644 --- a/code/modules/mob/living/silicon/examine.dm +++ b/code/modules/mob/living/silicon/examine.dm @@ -1,5 +1,4 @@ /mob/living/silicon/examine(mob/user) //Displays a silicon's laws to ghosts - . = ..() if(laws && isobserver(user)) . += "[src] has the following laws:" for(var/law in laws.get_law_list(include_zeroth = TRUE)) diff --git a/code/modules/mob/living/silicon/robot/examine.dm b/code/modules/mob/living/silicon/robot/examine.dm index 9674a976a4..4ebd4c3be8 100644 --- a/code/modules/mob/living/silicon/robot/examine.dm +++ b/code/modules/mob/living/silicon/robot/examine.dm @@ -49,6 +49,9 @@ if(DEAD) . += "It looks like its system is corrupted and requires a reset." + if(LAZYLEN(.) > 1) + .[2] = "
[.[2]]" + SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, usr, .) . += ..() diff --git a/tgui/packages/tgui-panel/styles/components/Chat.scss b/tgui/packages/tgui-panel/styles/components/Chat.scss index 296ba1ab31..a199963fd0 100644 --- a/tgui/packages/tgui-panel/styles/components/Chat.scss +++ b/tgui/packages/tgui-panel/styles/components/Chat.scss @@ -109,3 +109,13 @@ blockquote { margin-left: 0.3em; margin-right: 0em; } + +hr { + background-color: rgba($text-color, 0.25); + height: 0.15em; + border-style: none; + margin-left: 1em; + margin-right: 2em; + margin-bottom: 0.3em; + margin-top: 0.3em; +} From 6fe08f0a4eb0f50db521332ecdcdc7f5791cefc6 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Mon, 6 Jun 2022 20:41:10 -0700 Subject: [PATCH 06/29] Rebalancing QCD a bit --- code/__DEFINES/reactions.dm | 1 + code/__DEFINES/research.dm | 2 ++ code/game/machinery/doppler_array.dm | 10 +++++++--- code/modules/atmospherics/auxgm/gas_types.dm | 2 +- .../atmospherics/gasmixtures/reactions.dm | 18 ++++++++++++++---- code/modules/research/techweb/_techweb.dm | 2 +- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/reactions.dm b/code/__DEFINES/reactions.dm index d1329060eb..51c6e3c394 100644 --- a/code/__DEFINES/reactions.dm +++ b/code/__DEFINES/reactions.dm @@ -27,6 +27,7 @@ #define NOBLIUM_RESEARCH_AMOUNT 25 #define BZ_RESEARCH_SCALE 4 #define BZ_RESEARCH_MAX_AMOUNT 400 +#define QCD_RESEARCH_AMOUNT 2 // often made in absolutely massive quantities due to the simple nature of fusion #define MIASMA_RESEARCH_AMOUNT 6 #define STIMULUM_RESEARCH_AMOUNT 50 //Plasma fusion properties diff --git a/code/__DEFINES/research.dm b/code/__DEFINES/research.dm index e27489380c..013d038f3a 100644 --- a/code/__DEFINES/research.dm +++ b/code/__DEFINES/research.dm @@ -73,6 +73,8 @@ TECHWEB_POINT_TYPE_GENERIC = "General Research"\ ) +#define LARGEST_BOMB "bomb" + #define BOMB_TARGET_POINTS 50000 //Adjust as needed. Actual hard cap is double this, but will never be reached due to hyperbolic curve. #define BOMB_TARGET_SIZE (world.system_type == MS_WINDOWS ? 240 : 50000) // The shockwave radius required for a bomb to get TECHWEB_BOMB_MIDPOINT points. // Linux still has old trit fires, so diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 18ed5205be..458f231f4b 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -203,9 +203,13 @@ GLOBAL_LIST_EMPTY(doppler_arrays) point_gain = (BOMB_TARGET_POINTS * 2 * orig_light) / (orig_light + BOMB_TARGET_SIZE) /*****The Point Capper*****/ - if(point_gain > linked_techweb.largest_bomb_value) - var/old_tech_largest_bomb_value = linked_techweb.largest_bomb_value //held so we can pull old before we do math - linked_techweb.largest_bomb_value = point_gain + + var/list/largest_values = linked_techweb.largest_values + if(!(LARGEST_BOMB in largest_values)) + largest_values[LARGEST_BOMB] = 0 + if(point_gain > largest_values[LARGEST_BOMB]) + var/old_tech_largest_bomb_value = largest_values[LARGEST_BOMB] //held so we can pull old before we do math + linked_techweb.largest_values[LARGEST_BOMB] = point_gain point_gain -= old_tech_largest_bomb_value var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_SCI) if(D) diff --git a/code/modules/atmospherics/auxgm/gas_types.dm b/code/modules/atmospherics/auxgm/gas_types.dm index cba5dce870..943fdeb14a 100644 --- a/code/modules/atmospherics/auxgm/gas_types.dm +++ b/code/modules/atmospherics/auxgm/gas_types.dm @@ -295,4 +295,4 @@ powermix = -1 transmit_modifier = -10 heat_penalty = -10 - price = 10 + price = 100 // it's kinda really hard to actually get it into a canister diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index 122d30f33e..607274f71b 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -759,7 +759,18 @@ var/initial_energy = air.thermal_energy() for(var/g in air.get_gases()) air.set_moles(g, 0) - air.set_moles(GAS_QCD, initial_energy / (air.return_temperature() * GLOB.gas_data.specific_heats[GAS_QCD])) + var/amount = initial_energy / (air.return_temperature() * GLOB.gas_data.specific_heats[GAS_QCD]) + air.set_moles(GAS_QCD, amount) + var/list/largest_values = SSresearch.science_tech.largest_values + if(!(GAS_QCD in largest_values)) + largest_values[GAS_QCD] = 0 + var/previous_largest = largest_values[GAS_QCD] + var/research_amount = amount * QCD_RESEARCH_AMOUNT + if(previous_largest < research_amount) + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, research_amount) + largest_values[GAS_QCD] = research_amount + else + SSresearch.science_tech.add_point_type(TECHWEB_POINT_TYPE_DEFAULT, research_amount / 100) /datum/gas_reaction/dehagedorn priority = 50 @@ -781,11 +792,10 @@ var/list/gases = GLOB.gas_data.specific_heats.Copy() gases -= GAS_QCD gases -= GAS_TRITIUM // no refusing sorry - for(var/g in gases) - gases[g] = 10000 / gases[g] + gases -= GAS_HYPERNOB // makes it waaay too easy to stabilize it while(energy_remaining > 0) var/G = pick(gases) air.adjust_moles(G, max(0.1, energy_remaining / (gases[G] * new_temp * 20))) energy_remaining = initial_energy - air.thermal_energy() - air.adjust_heat(-energy_remaining) + air.set_temperature(initial_energy / air.heat_capacity()) return REACTING diff --git a/code/modules/research/techweb/_techweb.dm b/code/modules/research/techweb/_techweb.dm index d542694236..dc07a5a184 100644 --- a/code/modules/research/techweb/_techweb.dm +++ b/code/modules/research/techweb/_techweb.dm @@ -17,7 +17,7 @@ var/list/obj/machinery/computer/rdconsole/consoles_accessing = list() var/id = "generic" var/list/research_logs = list() //IC logs. - var/largest_bomb_value = 0 + var/largest_values = list() var/organization = "Third-Party" //Organization name, used for display. var/list/next_income = list() //To be applied on the next passive techweb income var/list/last_bitcoins = list() //Current per-second production, used for display only. From fa24f1bd3aa4ecd9637975ac0dcc614719187f8f Mon Sep 17 00:00:00 2001 From: deathride58 Date: Tue, 7 Jun 2022 16:36:10 -0400 Subject: [PATCH 07/29] user-friendly colormates - adds HSV coloration to colormates! --- code/__HELPERS/matrices/color_matrix.dm | 19 +++ code/game/machinery/colormate.dm | 163 ++++++++++++--------- tgui/packages/tgui/interfaces/Colormate.js | 163 ++++++++++++++++----- 3 files changed, 239 insertions(+), 106 deletions(-) diff --git a/code/__HELPERS/matrices/color_matrix.dm b/code/__HELPERS/matrices/color_matrix.dm index e4a4a9bb48..bcc48b45f5 100644 --- a/code/__HELPERS/matrices/color_matrix.dm +++ b/code/__HELPERS/matrices/color_matrix.dm @@ -138,6 +138,25 @@ round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), ro var/sinval = round(sin(angle), 0.001); var/cosval = round(cos(angle), 0.001) return list(cosval,sinval,0,0, -sinval,cosval,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0) +/** + * Builds a color matrix that transforms the hue, saturation, and value, all in one operation. + */ +/proc/color_matrix_hsv(hue, saturation, value) + hue = clamp(360 - hue, 0, 360) + + // This is very much a rough approximation of hueshifting. This carries some artifacting, such as negative values that simply shouldn't exist, but it does get the job done, and that's what matters. + var/cos_a = cos(hue) // These have to be inverted from 360, otherwise the hue's inverted + var/sin_a = sin(hue) + var/rot_x = cos_a + (1 - cos_a) / 3 + var/rot_y = (1 - cos_a) / 3 - 0.5774 * sin_a // 0.5774 is sqrt(1/3) + var/rot_z = (1 - cos_a) / 3 + 0.5774 * sin_a + + return list( + round((((1-saturation) * LUMA_R) + (rot_x * saturation)) * value, 0.01), round((((1-saturation) * LUMA_R) + (rot_y * saturation)) * value, 0.01), round((((1-saturation) * LUMA_R) + (rot_z * saturation)) * value, 0.01), + round((((1-saturation) * LUMA_G) + (rot_z * saturation)) * value, 0.01), round((((1-saturation) * LUMA_G) + (rot_x * saturation)) * value, 0.01), round((((1-saturation) * LUMA_G) + (rot_y * saturation)) * value, 0.01), + round((((1-saturation) * LUMA_B) + (rot_y * saturation)) * value, 0.01), round((((1-saturation) * LUMA_B) + (rot_z * saturation)) * value, 0.01), round((((1-saturation) * LUMA_B) + (rot_x * saturation)) * value, 0.01), + 0, 0, 0 + ) //Returns a matrix addition of A with B /proc/color_matrix_add(list/A, list/B) diff --git a/code/game/machinery/colormate.dm b/code/game/machinery/colormate.dm index 1528142a3b..c3c7860553 100644 --- a/code/game/machinery/colormate.dm +++ b/code/game/machinery/colormate.dm @@ -1,6 +1,10 @@ +#define COLORMATE_TINT 1 +#define COLORMATE_HSV 2 +#define COLORMATE_MATRIX 3 + /obj/machinery/gear_painter name = "\improper Color Mate" - desc = "A machine to give your apparel a fresh new color! Recommended to use with white items for best results." + desc = "A machine to give your apparel a fresh new color!" icon = 'icons/obj/vending.dmi' icon_state = "colormate" // light_mask = "colormate-light-mask" @@ -10,7 +14,11 @@ var/atom/movable/inserted var/activecolor = "#FFFFFF" var/list/color_matrix_last - var/matrix_mode = FALSE + var/active_mode = COLORMATE_HSV + + var/build_hue = 0 + var/build_sat = 1 + var/build_val = 1 /// Allow holder'd mobs var/allow_mobs = TRUE /// Minimum lightness for normal mode @@ -71,8 +79,9 @@ return if(!QDELETED(H)) H.release() + user.visible_message("[user] stuffs [I] into [src]'s receptable! Oh dear.") + insert_mob(victim, user) - temp = "[victim] has been inserted." SStgui.update_uis(src) if(is_type_in_list(I, allowed_types) && is_operational()) @@ -85,7 +94,6 @@ inserted = I update_icon() - temp = "[I] has been inserted." SStgui.update_uis(src) else @@ -134,7 +142,7 @@ /obj/machinery/gear_painter/ui_data(mob/user) . = list() - .["matrixactive"] = matrix_mode + .["activemode"] = active_mode .["matrixcolors"] = list( "rr" = color_matrix_last[1], "rg" = color_matrix_last[2], @@ -149,6 +157,9 @@ "cg" = color_matrix_last[11], "cb" = color_matrix_last[12] ) + .["buildhue"] = build_hue + .["buildsat"] = build_sat + .["buildval"] = build_val if(temp) .["temp"] = temp if(inserted) @@ -166,7 +177,7 @@ if(inserted) switch(action) if("switch_modes") - matrix_mode = text2num(params["mode"]) + active_mode = text2num(params["mode"]) return TRUE if("choose_color") var/chosen_color = input(usr, "Choose a color: ", "Colormate color picking", activecolor) as color|null @@ -174,14 +185,11 @@ activecolor = chosen_color return TRUE if("paint") - if(!check_valid_color(activecolor, usr)) - return TRUE - inserted.add_atom_colour(activecolor, FIXED_COLOUR_PRIORITY) - playsound(src, 'sound/effects/spray3.ogg', 50, 1) + do_paint(usr) temp = "Painted Successfully!" return TRUE if("drop") - temp = "Ejected \the [inserted]!" + temp = "" drop_item() return TRUE if("clear") @@ -192,76 +200,95 @@ if("set_matrix_color") color_matrix_last[params["color"]] = params["value"] return TRUE - if("matrix_paint") - var/list/cm = rgb_construct_color_matrix( - text2num(color_matrix_last[1]), - text2num(color_matrix_last[2]), - text2num(color_matrix_last[3]), - text2num(color_matrix_last[4]), - text2num(color_matrix_last[5]), - text2num(color_matrix_last[6]), - text2num(color_matrix_last[7]), - text2num(color_matrix_last[8]), - text2num(color_matrix_last[9]), - text2num(color_matrix_last[10]), - text2num(color_matrix_last[11]), - text2num(color_matrix_last[12]) - ) - if(!check_valid_color(cm, usr)) - return TRUE - inserted.add_atom_colour(cm, FIXED_COLOUR_PRIORITY) - playsound(src, 'sound/effects/spray3.ogg', 50, 1) - temp = "Matrix Painted Successfully!" + if("set_hue") + build_hue = clamp(text2num(params["buildhue"]), 0, 360) return TRUE + if("set_sat") + build_sat = clamp(text2num(params["buildsat"]), -10, 10) + return TRUE + if("set_val") + build_val = clamp(text2num(params["buildval"]), -10, 10) + return TRUE + + +/obj/machinery/gear_painter/proc/do_paint(mob/user) + var/color_to_use + switch(active_mode) + if(COLORMATE_TINT) + color_to_use = activecolor + if(COLORMATE_MATRIX) + color_to_use = rgb_construct_color_matrix( + text2num(color_matrix_last[1]), + text2num(color_matrix_last[2]), + text2num(color_matrix_last[3]), + text2num(color_matrix_last[4]), + text2num(color_matrix_last[5]), + text2num(color_matrix_last[6]), + text2num(color_matrix_last[7]), + text2num(color_matrix_last[8]), + text2num(color_matrix_last[9]), + text2num(color_matrix_last[10]), + text2num(color_matrix_last[11]), + text2num(color_matrix_last[12]) + ) + if(COLORMATE_HSV) + color_to_use = color_matrix_hsv(build_hue, build_sat, build_val) + color_matrix_last = color_to_use + if(!color_to_use || !check_valid_color(color_to_use, user)) + to_chat(user, "Invalid color.") + return FALSE + inserted.add_atom_colour(color_to_use, FIXED_COLOUR_PRIORITY) + playsound(src, 'sound/effects/spray3.ogg', 50, 1) + return TRUE + /// Produces the preview image of the item, used in the UI, the way the color is not stacking is a sin. /obj/machinery/gear_painter/proc/build_preview() if(inserted) //sanity - if(matrix_mode) - var/list/cm = rgb_construct_color_matrix( - text2num(color_matrix_last[1]), - text2num(color_matrix_last[2]), - text2num(color_matrix_last[3]), - text2num(color_matrix_last[4]), - text2num(color_matrix_last[5]), - text2num(color_matrix_last[6]), - text2num(color_matrix_last[7]), - text2num(color_matrix_last[8]), - text2num(color_matrix_last[9]), - text2num(color_matrix_last[10]), - text2num(color_matrix_last[11]), - text2num(color_matrix_last[12]) - ) - if(!check_valid_color(cm, usr)) - temp = "Failed to generate preview: Invalid color!" - return getFlatIcon(inserted, defdir=SOUTH, no_anim=TRUE) + var/list/cm + switch(active_mode) + if(COLORMATE_MATRIX) + cm = rgb_construct_color_matrix( + text2num(color_matrix_last[1]), + text2num(color_matrix_last[2]), + text2num(color_matrix_last[3]), + text2num(color_matrix_last[4]), + text2num(color_matrix_last[5]), + text2num(color_matrix_last[6]), + text2num(color_matrix_last[7]), + text2num(color_matrix_last[8]), + text2num(color_matrix_last[9]), + text2num(color_matrix_last[10]), + text2num(color_matrix_last[11]), + text2num(color_matrix_last[12]) + ) + if(!check_valid_color(cm, usr)) + return getFlatIcon(inserted, defdir=SOUTH, no_anim=TRUE) - var/cur_color = inserted.color - inserted.color = null - inserted.color = cm - var/icon/preview = getFlatIcon(inserted, defdir=SOUTH, no_anim=TRUE) - inserted.color = cur_color + if(COLORMATE_TINT) + if(!check_valid_color(activecolor, usr)) + return getFlatIcon(inserted, defdir=SOUTH, no_anim=TRUE) - . = preview + if(COLORMATE_HSV) + cm = color_matrix_hsv(build_hue, build_sat, build_val) + color_matrix_last = cm + if(!check_valid_color(cm, usr)) + return getFlatIcon(inserted, defdir=SOUTH, no_anim=TRUE) - else - if(!check_valid_color(activecolor, usr)) - temp = "Failed to generate preview: Invalid color!" - return getFlatIcon(inserted, defdir=SOUTH, no_anim=TRUE) + var/cur_color = inserted.color + inserted.color = null + inserted.color = (active_mode == COLORMATE_TINT ? activecolor : cm) + var/icon/preview = getFlatIcon(inserted, defdir=SOUTH, no_anim=TRUE) + inserted.color = cur_color + temp = "" - var/cur_color = inserted.color - inserted.color = null - inserted.color = activecolor - var/icon/preview = getFlatIcon(inserted, defdir=SOUTH, no_anim=TRUE) - inserted.color = cur_color - - . = preview + . = preview /obj/machinery/gear_painter/proc/check_valid_color(list/cm, mob/user) if(!islist(cm)) // normal var/list/HSV = ReadHSV(RGBtoHSV(cm)) if(HSV[3] < minimum_normal_lightness) - temp = "[cm] is far too dark (min lightness [minimum_normal_lightness]!" + temp = "[cm] is too dark (Minimum lightness: [minimum_normal_lightness])" return FALSE return TRUE else // matrix @@ -275,6 +302,6 @@ COLORTEST("FFFFFF", cm) #undef COLORTEST if(passed < minimum_matrix_tests) - temp = "[english_list(color)] is not allowed (passed [passed] out of 4, minimum [minimum_matrix_tests], minimum lightness [minimum_matrix_lightness])." + temp = "Matrix is too dark. (passed [passed] out of [minimum_matrix_tests] required tests. Minimum lightness: [minimum_matrix_lightness])." return FALSE return TRUE diff --git a/tgui/packages/tgui/interfaces/Colormate.js b/tgui/packages/tgui/interfaces/Colormate.js index f376547102..79bc3543e9 100644 --- a/tgui/packages/tgui/interfaces/Colormate.js +++ b/tgui/packages/tgui/interfaces/Colormate.js @@ -4,7 +4,7 @@ import { Window } from '../layouts'; export const Colormate = (props, context) => { const { act, data } = useBackend(context); - const { matrixactive, temp } = data; + const { activemode, temp } = data; const item = data.item || []; return ( @@ -39,33 +39,48 @@ export const Colormate = (props, context) => {
act('switch_modes', { - mode: "0", + mode: 1, })} > - Regular coloring + Tint coloring (Simple) act('switch_modes', { - mode: "1", + mode: 2, })} > - Matrixed coloring + HSV coloring (Normal) + + act('switch_modes', { + mode: 3, + })} > + Matrix coloring (Advanced) - {matrixactive ? ( + {} + {activemode === 3 ? ( <>
Coloring: {item.name}
- ) : ( + ) : activemode === 2 ? ( <>
Coloring: {item.name}
- + - )} + ) + : ( + <> +
Coloring: {item.name}
+ + + )}
) : ( @@ -140,8 +155,9 @@ export const ColormateMatrix = (props, context) => { RR: act('set_matrix_color', { color: 1, @@ -151,8 +167,9 @@ export const ColormateMatrix = (props, context) => { GR: act('set_matrix_color', { color: 4, @@ -162,8 +179,9 @@ export const ColormateMatrix = (props, context) => { BR: act('set_matrix_color', { color: 7, @@ -175,8 +193,9 @@ export const ColormateMatrix = (props, context) => { RG: act('set_matrix_color', { color: 2, @@ -186,8 +205,9 @@ export const ColormateMatrix = (props, context) => { GG: act('set_matrix_color', { color: 5, @@ -197,8 +217,9 @@ export const ColormateMatrix = (props, context) => { BG: act('set_matrix_color', { color: 8, @@ -210,8 +231,9 @@ export const ColormateMatrix = (props, context) => { RB: act('set_matrix_color', { color: 3, @@ -221,8 +243,9 @@ export const ColormateMatrix = (props, context) => { GB: act('set_matrix_color', { color: 6, @@ -232,8 +255,9 @@ export const ColormateMatrix = (props, context) => { BB: act('set_matrix_color', { color: 9, @@ -245,8 +269,9 @@ export const ColormateMatrix = (props, context) => { CR: act('set_matrix_color', { color: 10, @@ -256,8 +281,9 @@ export const ColormateMatrix = (props, context) => { CG: act('set_matrix_color', { color: 11, @@ -267,8 +293,9 @@ export const ColormateMatrix = (props, context) => { CB: act('set_matrix_color', { color: 12, @@ -278,9 +305,69 @@ export const ColormateMatrix = (props, context) => { RG means red will become this much green.
- CR means that red will have this much constrast applied to it. + CR means this much red will be added.
); }; + +export const ColormateHSL = (props, context) => { + const { act, data } = useBackend(context); + const { buildhue, buildsat, buildval } = data; + return ( +
+ + +
+ ); +}; \ No newline at end of file From ecb4ebafc5977fcbdcf741608f447e402e39cbd5 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Tue, 7 Jun 2022 17:11:24 -0400 Subject: [PATCH 08/29] oop - there was already a message for this! --- code/game/machinery/colormate.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/machinery/colormate.dm b/code/game/machinery/colormate.dm index c3c7860553..a208fc0bd2 100644 --- a/code/game/machinery/colormate.dm +++ b/code/game/machinery/colormate.dm @@ -79,7 +79,6 @@ return if(!QDELETED(H)) H.release() - user.visible_message("[user] stuffs [I] into [src]'s receptable! Oh dear.") insert_mob(victim, user) SStgui.update_uis(src) From c6950fc8d527462c6ca57cea171437f4aadc7543 Mon Sep 17 00:00:00 2001 From: SandPoot Date: Tue, 7 Jun 2022 21:08:15 -0300 Subject: [PATCH 09/29] some tweaks! --- tgui/packages/tgui/interfaces/Colormate.js | 589 ++++++++++----------- 1 file changed, 274 insertions(+), 315 deletions(-) diff --git a/tgui/packages/tgui/interfaces/Colormate.js b/tgui/packages/tgui/interfaces/Colormate.js index 79bc3543e9..02810f2943 100644 --- a/tgui/packages/tgui/interfaces/Colormate.js +++ b/tgui/packages/tgui/interfaces/Colormate.js @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Button, Flex, Icon, NoticeBox, NumberInput, Section, Tabs } from '../components'; +import { Button, Icon, NoticeBox, NumberInput, Section, Table, Tabs, Slider } from '../components'; import { Window } from '../layouts'; export const Colormate = (props, context) => { @@ -9,34 +9,38 @@ export const Colormate = (props, context) => { return ( - {temp ? ( - {temp} - ) : (null)} - {Object.keys(item).length ? ( - <> - -
-
Item:
- -
-
-
Preview:
- -
-
-
+
+ {temp ? ( + {temp} + ) : (null)} + {Object.keys(item).length ? ( + <> + + +
+
Item:
+ +
+
+ +
+
Preview:
+ +
+
+
{ Matrix coloring (Advanced) - {} - {activemode === 3 ? ( - <> -
Coloring: {item.name}
- - - ) : activemode === 2 ? ( - <> -
Coloring: {item.name}
- - - ) - : ( - <> -
Coloring: {item.name}
- - - )} -
- - ) : ( -
+
Coloring: {item.name}
+ + +
+ + ) : (
No item inserted.
-
- )} + )} +
); }; -export const ColormateNoMatrix = (props, context) => { +export const ColormateTint = (props, context) => { const { act, data } = useBackend(context); return ( -
- - -
+