tgui moment.

This commit is contained in:
Letter N
2020-08-22 13:11:13 +08:00
parent f04918bdca
commit a38aca4da6
7 changed files with 74 additions and 45 deletions

View File

@@ -47,7 +47,7 @@
var/obj/item/computer_hardware/card_slot/card_slot2 = get_modular_computer_part(MC_CARD2)
var/multiple_slots = istype(card_slot) && istype(card_slot2)
if(card_slot)
if(card_slot.stored_card || card_slot2.stored_card)
if(card_slot?.stored_card || card_slot2?.stored_card)
var/obj/item/card/id/first_ID = card_slot.stored_card
var/obj/item/card/id/second_ID = card_slot2.stored_card
var/multiple_cards = istype(first_ID) && istype(second_ID)

View File

@@ -30,16 +30,16 @@
if(autogenerate_icon && !picture_icon && picture_image)
regenerate_small_icon()
/datum/picture/proc/get_small_icon()
/datum/picture/proc/get_small_icon(iconstate)
if(!picture_icon)
regenerate_small_icon()
regenerate_small_icon(iconstate)
return picture_icon
/datum/picture/proc/regenerate_small_icon()
/datum/picture/proc/regenerate_small_icon(iconstate)
if(!picture_image)
return
var/icon/small_img = icon(picture_image)
var/icon/ic = icon('icons/obj/items_and_weapons.dmi', "photo")
var/icon/ic = icon('icons/obj/items_and_weapons.dmi', iconstate ? iconstate :"photo")
small_img.Scale(8, 8)
ic.Blend(small_img,ICON_OVERLAY, 13, 13)
picture_icon = ic

View File

@@ -35,23 +35,23 @@
/obj/item/photo/update_icon_state()
if(!istype(picture) || !picture.picture_image)
return
var/icon/I = picture.get_small_icon()
var/icon/I = picture.get_small_icon(initial(icon_state))
if(I)
icon = I
/obj/item/photo/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] is taking one last look at \the [src]! It looks like [user.p_theyre()] giving in to death!</span>")//when you wanna look at photo of waifu one last time before you die...
if (user.gender == MALE)
playsound(user, 'sound/voice/human/manlaugh1.ogg', 50, 1)//EVERY TIME I DO IT MAKES ME LAUGH
playsound(user, 'sound/voice/human/manlaugh1.ogg', 50, TRUE)//EVERY TIME I DO IT MAKES ME LAUGH
else if (user.gender == FEMALE)
playsound(user, 'sound/voice/human/womanlaugh.ogg', 50, 1)
playsound(user, 'sound/voice/human/womanlaugh.ogg', 50, TRUE)
return OXYLOSS
/obj/item/photo/attack_self(mob/user)
user.examinate(src)
/obj/item/photo/attackby(obj/item/P, mob/user, params)
if(try_burn(P, user))
if(burn_paper_product_attackby_check(P, user))
return
if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon))
if(!user.is_literate())
@@ -60,31 +60,13 @@
var/txt = stripped_input(user, "What would you like to write on the back?", "Photo Writing", "", 128)
if(txt && user.canUseTopic(src, BE_CLOSE))
scribble = txt
..()
/obj/item/photo/proc/try_burn(obj/item/I, mob/living/user)
var/ignition_message = I.ignition_effect(src, user)
if(!ignition_message)
return
. = TRUE
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10) && Adjacent(user))
user.visible_message("<span class='warning'>[user] accidentally ignites [user.p_them()]self!</span>", \
"<span class='userdanger'>You miss [src] and accidentally light yourself on fire!</span>")
if(user.is_holding(I)) //checking if they're holding it in case TK is involved
user.dropItemToGround(I)
user.adjust_fire_stacks(1)
user.IgniteMob()
return
if(user.is_holding(src)) //no TK shit here.
user.dropItemToGround(src)
user.visible_message(ignition_message)
add_fingerprint(user)
fire_act(I.get_temperature())
else
return ..()
/obj/item/photo/examine(mob/user)
. = ..()
if(in_range(src, user))
if(in_range(src, user) || isobserver(user))
show(user)
else
. += "<span class='warning'>You need to get closer to get a good look at this photo!</span>"

View File

@@ -31,8 +31,8 @@ export const Panel = (props, context) => {
);
}
}
return (
<Pane theme={settings.theme}>
return ( // yes i know it's bad.
<Pane theme={settings.theme === 'default' ? 'light' : settings.theme}>
<Flex
direction="column"
height="100%">
@@ -116,7 +116,7 @@ export const Panel = (props, context) => {
const HoboIE8Panel = (props, context) => {
const settings = useSettings(context);
return (
<Pane theme={settings.theme}>
<Pane theme={settings.theme === 'default' ? 'light' : settings.theme}>
<Pane.Content scrollable>
<Button
style={{

View File

@@ -11,7 +11,7 @@ const initialState = {
version: 1,
fontSize: 13,
lineHeight: 1.2,
theme: 'light',
theme: 'default',
adminMusicVolume: 0.5,
highlightText: '',
highlightColor: '#ffdd44',

View File

@@ -8,7 +8,7 @@ export const THEMES = ['light', 'dark', 'default'];
const COLOR_DARK_BG = '#202020';
const COLOR_DARK_BG_DARKER = '#171717';
const COLOR_DARK_TEXT = 'E0E0E0'; // '#a4bad6';
const COLOR_DARK_TEXT = '#a4bad6';
/**
* Darkmode preference, originally by Kmc2000.
@@ -36,17 +36,17 @@ export const setClientTheme = name => {
'split.background-color': 'none',
// Buttons
'changelog.background-color': '#90B3DD',
'changelog.text-color': '#EF7F7F',
'changelog.text-color': '#000000',
'rules.background-color': '#90B3DD',
'rules.text-color': '#EF7F7F',
'rules.text-color': '#000000',
'wiki.background-color': '#90B3DD',
'wiki.text-color': '#EF7F7F',
'wiki.text-color': '#000000',
'forum.background-color': '#90B3DD',
'forum.text-color': '#EF7F7F',
'forum.text-color': '#000000',
'github.background-color': '#90B3DD',
'github.text-color': '#EF7F7F',
'github.text-color': '#000000',
'report-issue.background-color': '#90B3DD',
'report-issue.text-color': '#EF7F7F',
'report-issue.text-color': '#000000',
// Status and verb tabs
'output.background-color': 'none',
'output.text-color': '#000000',
@@ -121,7 +121,54 @@ export const setClientTheme = name => {
'tooltip.text-color': COLOR_DARK_TEXT,
});
}
if (name === 'default') {
setClientTheme('light'); // absolute cheeze.
if (name === 'default') { // white-theme (chat) BUT game is using dorktheme
Byond.winset({
// Main windows
'infowindow.background-color': COLOR_DARK_BG,
'infowindow.text-color': COLOR_DARK_TEXT,
'info.background-color': COLOR_DARK_BG,
'info.text-color': COLOR_DARK_TEXT,
'browseroutput.background-color': COLOR_DARK_BG,
'browseroutput.text-color': COLOR_DARK_TEXT,
'outputwindow.background-color': COLOR_DARK_BG,
'outputwindow.text-color': COLOR_DARK_TEXT,
'mainwindow.background-color': COLOR_DARK_BG,
'split.background-color': COLOR_DARK_BG,
// Buttons
'changelog.background-color': '#40628A',
'changelog.text-color': COLOR_DARK_TEXT,
'rules.background-color': '#40628A',
'rules.text-color': COLOR_DARK_TEXT,
'wiki.background-color': '#40628A',
'wiki.text-color': COLOR_DARK_TEXT,
'forum.background-color': '#40628A',
'forum.text-color': COLOR_DARK_TEXT,
'github.background-color': '#40628A',
'github.text-color': COLOR_DARK_TEXT,
'report-issue.background-color': '#40628A',
'report-issue.text-color': COLOR_DARK_TEXT,
// Status and verb tabs
'output.background-color': COLOR_DARK_BG_DARKER,
'output.text-color': COLOR_DARK_TEXT,
'statwindow.background-color': COLOR_DARK_BG_DARKER,
'statwindow.text-color': COLOR_DARK_TEXT,
'stat.background-color': COLOR_DARK_BG_DARKER,
'stat.tab-background-color': COLOR_DARK_BG,
'stat.text-color': COLOR_DARK_TEXT,
'stat.tab-text-color': COLOR_DARK_TEXT,
'stat.prefix-color': COLOR_DARK_TEXT,
'stat.suffix-color': COLOR_DARK_TEXT,
// Say, OOC, me Buttons etc.
'saybutton.background-color': COLOR_DARK_BG,
'saybutton.text-color': COLOR_DARK_TEXT,
'oocbutton.background-color': COLOR_DARK_BG,
'oocbutton.text-color': COLOR_DARK_TEXT,
'mebutton.background-color': COLOR_DARK_BG,
'mebutton.text-color': COLOR_DARK_TEXT,
'asset_cache_browser.background-color': COLOR_DARK_BG,
'asset_cache_browser.text-color': COLOR_DARK_TEXT,
'tooltip.background-color': COLOR_DARK_BG,
'tooltip.text-color': COLOR_DARK_TEXT,
});
}
};

File diff suppressed because one or more lines are too long