mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
Chess quality of life update (#5458)
You can now fast fill chess board by clicking on it with chess pieces box. You can now shake off all pieces off board by clicking on board in your active hand. Chess box now picks up all chess pieces of same color as box off the turf by clicking on the chess piece
This commit is contained in:
committed by
Erki
parent
757ee16bc1
commit
9006de231d
@@ -30,8 +30,25 @@
|
||||
else
|
||||
src.examine(M)
|
||||
|
||||
obj/item/weapon/board/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(!addPiece(I,user))
|
||||
/obj/item/weapon/board/attack_self(mob/user)
|
||||
var/choice = alert("Do you want to throw everything off the [src]?", null, "No", "Yes")
|
||||
if(choice == "Yes")
|
||||
for(var/obj/item/weapon/checker/c in src.contents)
|
||||
c.forceMove(get_turf(src.loc))
|
||||
num = 0
|
||||
board_icons = list()
|
||||
board = list()
|
||||
selected = -1
|
||||
src.updateDialog()
|
||||
interact(user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/board/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/storage/box))
|
||||
var/obj/item/weapon/storage/box/h = I
|
||||
for(var/obj/item/weapon/checker/c in h.contents)
|
||||
addPiece(c,user)
|
||||
else if(!addPiece(I,user))
|
||||
..()
|
||||
|
||||
/obj/item/weapon/board/proc/addPiece(obj/item/I as obj, mob/user as mob, var/tile = 0)
|
||||
@@ -239,6 +256,23 @@ obj/item/weapon/board/attackby(obj/item/I as obj, mob/user as mob)
|
||||
/obj/item/weapon/checker/king/red
|
||||
piece_color ="red"
|
||||
|
||||
/obj/item/weapon/checker/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I, /obj/item/weapon/storage/box/chess))
|
||||
var/obj/item/weapon/storage/box/chess/b = I
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
for(var/obj/item/weapon/checker/c in T.contents)
|
||||
if(istype(I, /obj/item/weapon/storage/box/chess/red))
|
||||
if(c.piece_color == "red")
|
||||
c.forceMove(b)
|
||||
else
|
||||
continue
|
||||
else if(c.piece_color != "red")
|
||||
c.forceMove(b)
|
||||
to_chat(user, "<span class='notice'>You put all checker pieces into [b].</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/box/chess
|
||||
name = "black chess box"
|
||||
desc = "This box holds all the pieces needed for the black side of the chess board."
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
################################
|
||||
# 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
|
||||
# balance
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: PoZe
|
||||
|
||||
# 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:
|
||||
- rscadd: "Clicking on the chessboard with a box puts any chess peices inside of the box on the board. Helps to fill board faster."
|
||||
- rscadd: "Clicking on the chessboard while in hand will prompt user to shake all pieces off the board. Easier to clean up after game."
|
||||
- rscadd: "Clicking on chess piece with a box will make box pick up all chess pieces of the same color as the box. Easier to clean up after game."
|
||||
Reference in New Issue
Block a user