Skip to content
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

[MIRROR] Ports more preference BG from vorestation #299

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/_onclick/hud/ability_screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
/obj/screen/ability/on_update_icon()
overlays.Cut()
icon_state = "[background_base_state]_spell_base"

overlays += ability_icon_state

/obj/screen/ability/Click()
Expand Down Expand Up @@ -388,4 +388,4 @@
for(var/obj/screen/ability/spell/spell in spell_objects)
spell.spell.silenced = amount
spell.spell.process()
spell.update_charge(1)
spell.update_charge(1)
22 changes: 21 additions & 1 deletion code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@

if("Reset Machine")
usr.unset_machine()

if("up hint")
if(isliving(usr))
var/mob/living/L = usr
Expand Down Expand Up @@ -384,3 +384,23 @@
else if(usr.attack_ui(slot_id))
usr.update_inv_hands(0)
return 1

// Character setup stuff
/obj/screen/setup_preview
plane = DEFAULT_PLANE
layer = MOB_LAYER

var/datum/preferences/pref

/obj/screen/setup_preview/Destroy()
pref = null
return ..()

// Background 'floor'
/obj/screen/setup_preview/bg
layer = TURF_LAYER
mouse_over_pointer = MOUSE_HAND_POINTER

/obj/screen/setup_preview/bg/Click(params)
pref?.bgstate = next_in_list(pref.bgstate, pref.bgstate_options)
pref?.update_preview_icon()
2 changes: 1 addition & 1 deletion code/modules/client/preference_setup/general/02_body.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/equip_preview_mob = EQUIP_PREVIEW_ALL

var/icon/bgstate = "000"
var/list/bgstate_options = list("000", "FFF", /decl/material/solid/metal/steel, "white")
var/list/bgstate_options = list("000", "midgrey", "FFF", "white", "steel", "techmaint", "dark", "plating", "reinforced")

/datum/category_item/player_setup_item/physical/body
name = "Body"
Expand Down
43 changes: 43 additions & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,50 @@
dat += "</html></body>"
var/datum/browser/popup = new(user, "Character Setup","Character Setup", 1200, 800, src)
popup.set_content(dat)
<<<<<<< HEAD
popup.open()
=======
popup.open(FALSE) // Skip registring onclose on the browser pane
onclose(user, "preferences_window", src) // We want to register on the window itself

/datum/preferences/proc/update_character_previews(mutable_appearance/MA)
if(!client)
return

var/obj/screen/setup_preview/bg/BG = LAZYACCESS(char_render_holders, "BG")
if(!BG)
BG = new
BG.icon = 'icons/effects/32x32.dmi'
BG.pref = src
LAZYSET(char_render_holders, "BG", BG)
client.screen |= BG
BG.icon_state = bgstate
BG.screen_loc = preview_screen_locs["BG"]

for(var/D in GLOB.cardinal)
var/obj/screen/setup_preview/O = LAZYACCESS(char_render_holders, "[D]")
if(!O)
O = new
O.pref = src
LAZYSET(char_render_holders, "[D]", O)
client.screen |= O
O.appearance = MA
O.dir = D
O.screen_loc = preview_screen_locs["[D]"]

/datum/preferences/proc/show_character_previews()
if(!client || !char_render_holders)
return
for(var/render_holder in char_render_holders)
client.screen |= char_render_holders[render_holder]

/datum/preferences/proc/clear_character_previews()
for(var/index in char_render_holders)
var/obj/screen/S = char_render_holders[index]
client?.screen -= S
qdel(S)
char_render_holders = null
>>>>>>> a6a142ded3... Merge pull request #1026 from eckff/screeeam

/datum/preferences/proc/process_link(mob/user, list/href_list)

Expand Down
Binary file modified icons/effects/128x48.dmi
Binary file not shown.
Binary file added icons/effects/32x32.dmi
Binary file not shown.
28 changes: 28 additions & 0 deletions interface/skin.dmf
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,34 @@ window "rpane"
group = "rpanemode"
button-type = pushbox

<<<<<<< HEAD
=======
window "preferences_window"
elem "preferences_window"
type = MAIN
pos = 281,0
size = 1000x800
anchor1 = none
anchor2 = none
is-visible = false
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
elem "preferences_browser"
type = BROWSER
pos = 0,0
size = 800x800
anchor1 = 0,0
anchor2 = 80,100
saved-params = ""
elem "character_preview_map"
type = MAP
pos = 800,0
size = 200x800
anchor1 = 80,0
anchor2 = 100,100
right-click = true

>>>>>>> a6a142ded3... Merge pull request #1026 from eckff/screeeam
window "infowindow"
elem "infowindow"
type = MAIN
Expand Down