graffiti_manager 
One admin's Graffiti Manager window: the current map's graffiti a page at a time, to find, look at, jump to and delete.
Vars | |
| page | The page shown, from 1. |
|---|---|
| search | What a listed placement's ckey or painter's character name holds, escaped as character names are kept, or "" to list them all. |
| sort | The rows' order: "date" for the newest first, "ckey" or "area". |
Procs | |
| confirm | Asks the admin to confirm a deletion. The question waits for their answer, so this also checks they are still an admin once they give it. |
| placements_with | Returns the map's placements whose field has a value, such as one account's or one piece's. |
| report | Logs an admin's deletion and tells the other admins. |
| ui_act | Handles the window's actions. Each deletion asks the admin first, then is logged and told to the other admins with how many placements went. Nothing is deleted while the map's graffiti is still loading. |
| ui_data | Lists one page of the map's graffiti. |
| ui_interact | Opens the window, or refreshes the open one. It refreshes only after its own actions, as listing the rows reads every placement. |
| ui_state | Admins only. |
Var Details
page 
The page shown, from 1.
search 
What a listed placement's ckey or painter's character name holds, escaped as character names are kept, or "" to list them all.
sort 
The rows' order: "date" for the newest first, "ckey" or "area".
Proc Details
confirm
Asks the admin to confirm a deletion. The question waits for their answer, so this also checks they are still an admin once they give it.
Arguments:
- user: The admin.
- question: What goes, and how much of it.
Returns:
- TRUE/FALSE: Whether to go ahead.
placements_with
Returns the map's placements whose field has a value, such as one account's or one piece's.
Arguments:
- key: The field, such as "ckey" or "pid".
- value: Its value.
Returns:
- list: The packed placements, oldest first.
report
Logs an admin's deletion and tells the other admins.
Arguments:
- user: The admin.
- text: What they did, after their name.
ui_act
Handles the window's actions. Each deletion asks the admin first, then is logged and told to the other admins with how many placements went. Nothing is deleted while the map's graffiti is still loading.
Arguments:
- action: The action.
- params: Its params, as the window sent them.
- ui: The window.
- state: The window's state.
Returns:
- TRUE/FALSE: Whether the window updates.
ui_data
Lists one page of the map's graffiti.
Arguments:
- user: The admin.
Returns:
- list: SSgraffiti.admin_rows()'s "rows" and "total", with "search", "sort", "page", "pageSize" and "mapName".
ui_interact
Opens the window, or refreshes the open one. It refreshes only after its own actions, as listing the rows reads every placement.
Arguments:
- user: The admin.
- ui: The open window, when tgui refreshes it.
ui_state
Admins only.
Arguments:
- user: The admin.
Returns:
- /datum/ui_state: The admin state.