/obj/screen --> /atom/movable/screen

This commit is contained in:
Artur
2021-07-29 13:57:19 +03:00
parent 30016f38a8
commit 82ccfc40dc
173 changed files with 1267 additions and 1267 deletions
+13 -13
View File
@@ -17,10 +17,10 @@
var/switch_state = BM_SWITCHSTATE_NONE
var/switch_width = 5
// modeswitch UI
var/obj/screen/buildmode/mode/modebutton
var/atom/movable/screen/buildmode/mode/modebutton
var/list/modeswitch_buttons = list()
// dirswitch UI
var/obj/screen/buildmode/bdir/dirbutton
var/atom/movable/screen/buildmode/bdir/dirbutton
var/list/dirswitch_buttons = list()
/datum/buildmode/New(client/c)
@@ -34,7 +34,7 @@
holder.screen += buttons
holder.click_intercept = src
mode.enter_mode(src)
/datum/buildmode/proc/quit()
mode.exit_mode(src)
holder.screen -= buttons
@@ -63,16 +63,16 @@
/datum/buildmode/proc/create_buttons()
// keep a reference so we can update it upon mode switch
modebutton = new /obj/screen/buildmode/mode(src)
modebutton = new /atom/movable/screen/buildmode/mode(src)
buttons += modebutton
buttons += new /obj/screen/buildmode/help(src)
buttons += new /atom/movable/screen/buildmode/help(src)
// keep a reference so we can update it upon dir switch
dirbutton = new /obj/screen/buildmode/bdir(src)
dirbutton = new /atom/movable/screen/buildmode/bdir(src)
buttons += dirbutton
buttons += new /obj/screen/buildmode/quit(src)
buttons += new /atom/movable/screen/buildmode/quit(src)
// build the lists of switching buttons
build_options_grid(subtypesof(/datum/buildmode_mode), modeswitch_buttons, /obj/screen/buildmode/modeswitch)
build_options_grid(list(SOUTH,EAST,WEST,NORTH,NORTHWEST), dirswitch_buttons, /obj/screen/buildmode/dirswitch)
build_options_grid(subtypesof(/datum/buildmode_mode), modeswitch_buttons, /atom/movable/screen/buildmode/modeswitch)
build_options_grid(list(SOUTH,EAST,WEST,NORTH,NORTHWEST), dirswitch_buttons, /atom/movable/screen/buildmode/dirswitch)
// this creates a nice offset grid for choosing between buildmode options,
// because going "click click click ah hell" sucks.
@@ -81,7 +81,7 @@
for(var/thing in elements)
var/x = pos_idx % switch_width
var/y = FLOOR(pos_idx / switch_width, 1)
var/obj/screen/buildmode/B = new buttontype(src, thing)
var/atom/movable/screen/buildmode/B = new buttontype(src, thing)
// extra .5 for a nice offset look
B.screen_loc = "NORTH-[(1 + 0.5 + y*1.5)],WEST+[0.5 + x*1.5]"
buttonslist += B
@@ -100,7 +100,7 @@
else
close_switchstates()
open_modeswitch()
/datum/buildmode/proc/open_modeswitch()
switch_state = BM_SWITCHSTATE_MODE
holder.screen += modeswitch_buttons
@@ -115,7 +115,7 @@
else
close_switchstates()
open_dirswitch()
/datum/buildmode/proc/open_dirswitch()
switch_state = BM_SWITCHSTATE_DIR
holder.screen += dirswitch_buttons
@@ -155,7 +155,7 @@
new /datum/buildmode(M.client)
message_admins("[key_name_admin(usr)] has entered build mode.")
log_admin("[key_name(usr)] has entered build mode.")
#undef BM_SWITCHSTATE_NONE
#undef BM_SWITCHSTATE_MODE
#undef BM_SWITCHSTATE_DIR