Commit Graph

9 Commits

Author SHA1 Message Date
Aylong
7a817300fd Improve and extend fieldset_block and examine_block (#88678)
## About The Pull Request
Maked `fieldset_block` and `examine_block` more stylish and neat, also
`fieldset_block` no longer has a centred title.
Renamed `examine_block` to `boxed_message` and adds
`custom_boxed_message` which can be colored.

- AdminPMs, admin tickets and vote results has been wrapped into
`fieldset_block` for comfort and visibility
- Health Analyzer results painted to blue
- Vote notice and tips of the round wrapped to purple
`custom_boxed_message`
- Tooltip text border color, now uses text color, not just white

## Why It's Good For The Game
Demonstration in both themes

<details><summary>Dark</summary>


![image](https://github.com/user-attachments/assets/7175379b-b053-4fb7-bd25-65c744a21c56)

![image](https://github.com/user-attachments/assets/1728e72b-0110-4b81-9d61-8779f5fdc3a0)

![image](https://github.com/user-attachments/assets/5e6f9604-35b8-4840-b6b4-35a68f49a997)

</details>

<details><summary>Light</summary>


![image](https://github.com/user-attachments/assets/6a3d693b-e0dc-4a4b-b4d7-2ded54ce0d67)

![image](https://github.com/user-attachments/assets/c4f5e089-180f-4d13-806a-fa64f01740a3)

![image](https://github.com/user-attachments/assets/a46d52c4-ad37-4637-8cae-c4b00139efc1)

</details>

## Changelog

🆑
qol: AdminPMs, admin tickets, vote results and started vote notification
are now much more visible in the chat.
qol: Boxed messages in chat (like examine), has been restyled.
/🆑
2024-12-24 11:32:38 -08:00
MrMelbert
d1cadb24f9 Vote clean up and admin additions (#82981)
## About The Pull Request

- Fixes `vote_delay` not being a thing. I broke this two years ago but
there's no bug report associated.

- Admins can now reset the vote delay (to let people vote again
instantly)

- Admins can now end the current vote immediately (rather than
cancelling)

- Custom multi and custom single combined into one vote

## Why It's Good For The Game

Makes voting a bit easier to use, both for admins and for coders adding
new votes.


![image](https://github.com/tgstation/tgstation/assets/51863163/40b8857c-76b7-4a58-82bc-1b82640d550a)

## Changelog

🆑 Melbert
admin: Custom Single and Custom Multi votes are now combined into one
vote
admin: Admins can now end votes instantly, rather than cancelling them
admin: Admins can now reset the vote cooldown
fix: Vote cooldown actually applies now
/🆑
2024-05-01 16:55:01 -06:00
Jacquerel
b0fd97dafe Allow voting statistics to be hidden (#81686)
## About The Pull Request

Allows polls to hide the voting statistics, both while the poll is
running and when it completes, so that people vote in isolation of
knowing what other people are voting for.
It looks like this:


![image](https://github.com/tgstation/tgstation/assets/7483112/d17a1784-ecfa-4c7b-8cb2-88aef7f7dcdb)

![image](https://github.com/tgstation/tgstation/assets/7483112/c83db170-7338-48dd-8ab6-cfbc20414abe)

This functionality is also available for custom votes triggered by
admins, if they want it.

## Why It's Good For The Game

Put simply, if likely to be controversially, sometimes people get upset
that an event with a 5% chance of happening occurs 5% of the time. Now
they really won't know what the chance was, only that it was picked by a
weighted choice.

Lack of knowledge about what other people are currently voting for
should also curb "meme votes" where people pile onto something they see
other people voting for, your vote in a poll with hidden stats can only
be influenced by your own opinion because you can't see what the crowd
is doing in order to join their bandwagon.

## Changelog

🆑
add: Displaying the voting statistics is now optional on a per-poll
basis, and is disabled for map voting.
/🆑
2024-02-27 18:41:44 +13:00
Zephyr
700e2e6de5 Votes now show the percentage of total votes each choice got | Adds weighted random vote type | Map votes are now weighted random (#80362)
## About The Pull Request

See the title.
## Why It's Good For The Game

Mothblocks wanted map votes to not be simple winner take all and wanted
it to be randomly chosen based on votes.

![image](https://github.com/tgstation/tgstation/assets/12817816/7435b444-dcd7-4aa5-a747-4bafe434ebdb)

## Changelog
🆑
add: Map Votes are now weighted random.
add: Custom Votes can now take advantage of Weighted Random winner
selection
del: Removed Herobrine from the game
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-12-17 23:19:03 -08:00
lessthanthree
51a345cd2d Vote System: Approval Voting (#73749)
## About The Pull Request

Approval Voting is a system in which voters can select as many maps as
they want, instead of selecting only one. Final tallies show how many
votes each map received, and the winner is the map with the most
support.

## Changes since https://github.com/tgstation/tgstation/pull/73413
- Custom votes can now be started using either system
- Icon during AV votes indicating your selections
- Map population filter counts active players and participating ghosts


https://user-images.githubusercontent.com/83487515/222580901-61506cc3-dc42-4435-9775-1e6291a3f734.mp4

## Why It's Good For The Game

First-past-the-post (our current voting system) has flaws such as
creating a bunch of wasted votes, in that a large number of selections
ultimately have no impact and for example, a map can win a 3 way race
11/10/10, even though 2/3 of the votes were not for that map. This leads
to people having to vote strategically, and perhaps not what their true
choice is.

Approval Voting solves this by instead allowing the player to select all
the maps they would like to play, so they can vote for their true
preferred choice, as well as alternates.

For example, a player that wants Metastation, is okay with Icebox, and
doesn't want Delta may feel pressured to vote Icebox if it's in a 2 way
race with Delta.

AV lets them vote for Meta, and Icebox or as many others as they want as
their alternates and creates a more fair outcome of a map vote.

Map population filter removing AFK/lobby screen dwellers gives a better
number of active players so as to not trip the map filter's population
cap earlier than it should.

tl;dr: Less of this


![image](https://user-images.githubusercontent.com/83487515/222860681-210f2d7e-2368-4d42-84d5-6de838995e50.png)

## Changelog

🆑 LT3
rscadd: Added new multi-vote system
balance: Map votes are now calculated using multi-vote instead of the
old single-vote system
admin: Admins can now use either multi-vote or single-vote for custom
votes
code: Map choice filtering uses active player count, not all connected
clients
/🆑
2023-03-04 17:29:24 -08:00
san7890
0be81785dd Verbose Vote Initiation Feedback Tooltippery (#69763)
* Verbose Vote Initiation Feedback Tooltippery

Hey there,

So basically, the old implementation had it such that when a vote was disabled and you tried to trigger it, you could get a very nice message in your chat explaining why you could not trigger that vote in that moment. HOWEVER, there's a current fatal flaw in this logic:

You can't ever get that to_chat reason as to _why_ this vote is disabled since you can't click the button. I don't know if this ever worked, which is sad, because we had a lot of these nice messages that one would never see. So, let's leverage the power of TGUI and add messages.

The messages are applied per-datum singleton, and are a generic explanation of what the vote does when there is no specific reason assigned to it when the can_be_initiated() proc runs. If it can not be initiated, we change the message to reflect exactly why the player can not initiate the vote. It ends up looking something like this:

In order for this to work well for the restart vote and to lessen the amount of copy-pasting I might have to do, I created a new proc that checks to see if a valid admin is online, and uses that for both updating the message and restarting the server if the vote clears.

* fixes messages not resetting

* removes misleading section

the admin can always restart the server if they wish
2022-09-13 20:40:01 -07:00
san7890
3b2cf65d59 Rocking The Boat, er, Map Vote (#69561)
* Rocking The Boat, er, Map Vote

Hey there,

A while ago, I spooke (typo intentional) to some other people. One frustration I heard was the fact that people would sometimes sneak through map votes during the very start of a shift, during a high-paced portion, or just as a meme. People in OOC would then flood the vote, putting in any given station. However, if a vote happens 10 minutes in- and the round goes for 70 minutes and not many of the original players are around, then it's not particularly fair to those who have to play next shift on a map they bemoan.

So, we can rock the vote! If a player isn't particularly chuffed with the hand they are given, they can poll the players to see if they want to change the map as well. If rocking the vote goes through, huzzah, you get the ability to vote for the map again. If it doesn't go through: tough luck. You can rock the vote one time per shift by default, and server operators can change the amount of times you can call to rock the map vote at their discretion. Calling to rock the vote either successfully or non-successfully counts as a "call", and when that limit is exceeded: no more calls.

Does this mean that we will only rotate between two maps because pissants will keep rocking the vote until they get what they like? Maybe? I still see people bemoan getting Tram or shit the bed over IceBox, but I think enough people get sick of bread-on-butter to take the server where it need to go. If operators don't really like seeing only two maps play, they can always adjust the config to ensure it doesn't happen.

* makes the grammar grammar

it would be "Rock the Vote vote" otherwise
2022-09-06 11:06:01 +12:00
MrMelbert
c4a9043fa8 Fixes some minor formatting issues with vote text (#66913)
* Fixes some minor formatting issues with vote

* Wrong thing.

* Actually I think this is supposed to be here
2022-05-13 04:10:54 -04:00
MrMelbert
6e098e2dba Refactors SSvote, makes votes into datums, also makes vote ui Typescript (#66772)
Makes vote into their own singleton datums.
Refactors the voting subsystem to accommodate.
Refactors the vote UI from JS to TSX (probably badly).
2022-05-08 11:52:29 -07:00