Fixes roundstart changeling visual bug.

This commit is contained in:
LorenLuke
2017-04-24 10:13:53 -07:00
parent 43f6f48abb
commit 7aa0c344a3
2 changed files with 58 additions and 10 deletions

View File

@@ -45,49 +45,61 @@
screen_loc = "[screen_loc_X[1]]:[pix_X],[screen_loc_Y[1]]:[pix_Y]"
/obj/screen/movable/proc/encode_screen_X(X)
if(X > usr.client.view+1)
. = "EAST-[usr.client.view*2 + 1-X]"
else if(X < usr.client.view+1)
var/view_dist = world.view
if(view_dist)
view_dist = view_dist
if(X > view_dist+1)
. = "EAST-[view_dist *2 + 1-X]"
else if(X < view_dist +1)
. = "WEST+[X-1]"
else
. = "CENTER"
/obj/screen/movable/proc/decode_screen_X(X)
var/view_dist = world.view
if(view_dist)
view_dist = view_dist
//Find EAST/WEST implementations
if(findtext(X,"EAST-"))
var/num = text2num(copytext(X,6)) //Trim EAST-
if(!num)
num = 0
. = usr.client.view*2 + 1 - num
. = view_dist*2 + 1 - num
else if(findtext(X,"WEST+"))
var/num = text2num(copytext(X,6)) //Trim WEST+
if(!num)
num = 0
. = num+1
else if(findtext(X,"CENTER"))
. = usr.client.view+1
. = view_dist+1
/obj/screen/movable/proc/encode_screen_Y(Y)
if(Y > usr.client.view+1)
. = "NORTH-[usr.client.view*2 + 1-Y]"
else if(Y < usr.client.view+1)
var/view_dist = world.view
if(view_dist)
view_dist = view_dist
if(Y > view_dist+1)
. = "NORTH-[view_dist*2 + 1-Y]"
else if(Y < view_dist+1)
. = "SOUTH+[Y-1]"
else
. = "CENTER"
/obj/screen/movable/proc/decode_screen_Y(Y)
var/view_dist = world.view
if(view_dist)
view_dist = view_dist
if(findtext(Y,"NORTH-"))
var/num = text2num(copytext(Y,7)) //Trim NORTH-
if(!num)
num = 0
. = usr.client.view*2 + 1 - num
. = view_dist*2 + 1 - num
else if(findtext(Y,"SOUTH+"))
var/num = text2num(copytext(Y,7)) //Time SOUTH+
if(!num)
num = 0
. = num+1
else if(findtext(Y,"CENTER"))
. = usr.client.view+1
. = view_dist+1
//Debug procs
/client/proc/test_movable_UI()

View File

@@ -0,0 +1,36 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
#################################
# Your name.
author: LorenLuke
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- Bugfix: "Unfucks the screen bug on roundstart changelings."