Small QOL changes

Boardgame now looks like a checkerboard. It now updates whenever
something is added to it.

Microwave can now be unanchored via a crowbar.
This commit is contained in:
Kearel
2015-12-28 16:15:49 -06:00
parent 1b3267a0a8
commit 278b44cb9f
2 changed files with 19 additions and 3 deletions

View File

@@ -135,7 +135,21 @@
var/obj/item/weapon/grab/G = O
user << "<span class='warning'>This is ridiculous. You can not fit \the [G.affecting] in this [src].</span>"
return 1
else if(istype(O,/obj/item/weapon/crowbar))
user.visible_message( \
"<span class='notice'>\The [user] begins [src.anchored ? "dislodging" : "prying"] the microwave [src.anchored ? "out of" : "into"] the frame.</span>", \
"<span class='notice'>You attempt to [src.anchored ? "dislodge" : "pry"] the microwave [src.anchored ? "out of" : "into"] the frame.</span>"
)
if (do_after(user,20))
user.visible_message( \
"<span class='notice'>\The [user] [src.anchored ? "dislodges" : "prys"] the microwave [src.anchored ? "out of" : "into"] the frame.</span>", \
"<span class='notice'>You [src.anchored ? "dislodge" : "pry"] the microwave [src.anchored ? "out of" : "into"] the frame.</span>"
)
src.anchored = !src.anchored
else
user << "<span class='notice'>You decide not to do that.</span>"
else
user << "<span class='warning'>You have no idea what you can cook with this [O].</span>"
..()
src.updateUsrDialog()

View File

@@ -39,7 +39,7 @@ obj/item/weapon/board/attackby(obj/item/I as obj, mob/user as mob)
for(i=0;i<64;i++)
if(!board["[i]"])
board["[i]"] = I
return
break
src.updateDialog()
@@ -47,14 +47,16 @@ obj/item/weapon/board/attackby(obj/item/I as obj, mob/user as mob)
var/dat = "<HTML>"
dat += "<table border='0'>"
var i;
var i, stagger;
stagger = 0 //so we can have the checkerboard effect
for(i=0; i<64; i++)
if(i%8 == 0)
dat += "<tr>"
stagger = !stagger
dat += "<td align='center' height='50' width='50' bgcolor="
if(selected == i)
dat += "'#FF8566'>"
else if(i%2 == 0)
else if((i + stagger)%2 == 0)
dat += "'#66CCFF'>"
else
dat += "'#252536'>"