Commit Graph

66 Commits

Author SHA1 Message Date
Jordie
a28de54405 Ban system and interface update (#41176)
Spiritual successor and extension to #17798, an almost entire rebuild of the SQL ban system backend and interface.
Bantypes are removed per #8584 and #6174. All bans are now 'role bans', server bans are when a ban's role is server. Admin bans are a column, meaning it's possible to ban admins from jobs.
Bans now have only an expiry datetime, duration is calculated from this when queried.
unbanned column is removed as it's superfluous, checking unban status is now done through checking unban_datetime. unban_round_id column added. Each ip and computerid columns rearranged so ip is always first, like in other tables. Bans now permit a null ckey, ip and computerid.

Ban checking is split into two procs now is_banned_from() does a check if a ckey is banned from one or more roles and returns true or false. This effectively replaces jobban_isbanned() used in simple if() statements. If connected a client's ban cache is checked rather than querying the DB. This makes it possible for a client connected to two or more servers to ignore any bans made on one server until their ban cache is rebuilt on the others. Could be avoided with cross-server calls to update ban caches or just the removal of the ban cache but as is I've done neither since I think it's enough of an edge case to not be worth it.
The second proc is is_banned_from_with_details(), this queries the DB for a role ban on a player's ckey, ip or CID and returns the details. This replaces direct queries in IsBanned.dm and the preferences menu.

The legacy ban system is removed.

The interfaces for banning, unbanning and editing bans have been remade to require less clicking and easier simultaneous operations. The banning and jobban panel are combined. They also store player connection details when opened so a client disconnecting no longer stops a ban being placed.

New banning panel:
Key, IP and CID can all be toggled to allow excluding them from a ban.
Checking Use IP and CID from last connection lets you enter only a ckey and have the DB fill these fields in for you, if possible.
Temporary bans have a drop-menu which lets you select between seconds, minutes, hours, days, weeks, months and years so you don't need to calculate how many minutes a long ban would be. The ban is still converted into minutes on the DB however.
Checking any of the head roles will check both of the boxes for you.
The red role box indicates there is already a ban on that role for this ckey. You can apply additional role bans to stack them.

New unbanning panel:
Unbanning panel is now separate from the banning panel but otherwise functionally the same.

Ban editing panel:
Actually just a modified banning panel, all the features from it work the same here.
You can now edit almost all parameters of a ban instead of just the reason.
You can't edit severity as it's not really part of the ban.
The panels have been tested but I've not been able to get my local server to be accessible so ban functionality isn't properly confirmed. Plenty of testing will be required as I'd rather not break bans.

cl
admin: Ban interface rework. The banning and unbanning panels have received a new design which is easier to use and allows multiple role bans to be made at once.
prefix: Ban search and unbanning moved to unbanning panel, which is now a separate panel to the old banning panel.
/cl
2018-12-04 20:48:17 +01:00
MrDoomBringer
982563f7b1 Various code improvements (#40932)
* adsf

* asdf

* take these

* Further cleanup to windoor code
2018-10-21 07:59:57 +01:00
kevinz000
1f7a76ade0 Combat/Stun (slip) overhaul staging, mobility flags, adds crawling (#39967)
Aiming to implement the framework oranges has detailed in https://tgstation13.org/phpBB/viewtopic.php?f=10&t=19102
Moves canmove to a bitflag in a new variable called mobility_flags, that will allow finer grain control of what someone can do codewise, for example, letting them move but not stand up, or stand up but not move.

Adds Immobilize()d status effect that freezes movement but does not prevent anything else.
Adds Paralyze()d which is oldstun "You can't do anything at all and knock down).
Stun() will now prevent any item/UI usage and movement (which is similar to before).
Knockdown() will now only knockdown without preventing item usage/movement.
People knocked down will be able to crawl at softcrit-speeds
Refactors some /mob variables and procs to /mob/living.
update_canmove() refactored to update_mobility() and will handle mobility_flags instead of the removed canmove

cl
rscadd: Crawling is now possible if you are down but not stunned. Obviously, you will be slower.
/cl
Refactors are done. I'd rather get this merged faster than try to fine tune stuff like slips. The most obvious gameplay effect this pr has will be crawling, and I believe I made tiny tweaks but I can't find it Anything I missed or weird behavior should be reported.
2018-10-10 23:21:27 +01:00
kevinz000
bb5cca1893 Adds move force and move resist, movement/pushing/pulling tweaks (#39556)
* Removes anchroed from mobs, adds move force/resist

* Move force and move resist

* WIP, still has debug messages.

* Fixes

* Update living.dm

* Anchored removal

* Stuff

* Unit tests

* Removes anchored from dview

* DME

* Update anchored_mobs.dm

* Fix

* No ghost spacewind

* Update mulebot.dm

* Update temporary_visual.dm

* Update forcefields.dm

* Update step_triggers.dm

* Update portals.dm

* Update alien_acid.dm

* Update bump_teleporter.dm

* Update landmarks.dm

* Update countdown.dm

* Update blessing.dm

* Update shieldgen.dm

* Update containment_field.dm

* Update field_generator.dm

* Update singularity.dm

* Update atmosmachinery.dm

* Update door.dm

* Update gravitygenerator.dm

* Update door.dm

* Update effects.dm

* Update temporary_visual.dm

* Update bump_teleporter.dm

* Update forcefields.dm

* Update landmarks.dm

* Update portals.dm

* Fixes

* Throwforce annnd done, finally

* Fixes

* Haha I'm dumb sometimes
2018-09-15 21:58:05 +01:00
Jordie
fadacd2162 Some injection fixes (#39642)
Fixes a breaking error and possible injection exploit in
populate_key_2018-07-09.py caused by a key existing from when byond allowed now
blocked characters like ' in usernames e.g.
http://www.byond.com/members/immortaljrosh?format=text

Additionally fixes some unsanitized values in other queries.
2018-08-12 22:09:15 +01:00
Jordan Brown
1f0b362b18 Qdels queries, adds sleep safety checks, DBcore checks for leaks (#38363)
* Qdels all queries, adds sleep handling

* DB Core messages admins about undeleted queries

* Compile fixes. Adds missing set waitfor

* Remove world/New shennanigans. Add DBQuery/BlockingExecute()

* Less spammy notifications to admins about undeleted queries

* Increase dbcore fire time to 1 minute

* Upgrade undeleted query warning

* Better place of death

* Fix build

* Remove BlockingExecute, see BSQL PR for why

* Yep, missed that one.

* Psyche, that's the WRONG QUERY!!
2018-06-18 20:49:09 +01:00
Jordan Brown
a288be6019 Merge pull request #37944 from AutomaticFrenzy/patch/irv-jquery
Remove second copy of jQuery used only by IRV polls
2018-05-21 22:33:58 +01:00
oranges
e19a4edb10 Merge pull request #37646 from Xhuis/conflicts_imminent
Renames trait datums/character traits to quirks to differentiate them from the other trait system in the code
2018-05-06 13:21:20 +01:00
Nich
1499fd0e90 Latejoin Silicons (#36560) 2018-04-05 21:20:30 +02:00
kevinz000
3d75020425 GC fixes 1 (#36705) 2018-04-03 07:55:39 +01:00
kevinz000
6d9c02b869 Failing to latejoin as a job when the latejoin panel is already open now makes a more descriptive error message (#36794)
* job availability

* avail

* Boop
2018-03-30 17:06:00 +01:00
AsV9
d338cac150 Merge remote-tracking branch 'tgstation/master'
Not sure if this worked. Used a wonky special snowflake strat to merge.
2018-03-24 08:57:13 +01:00
Ling
16807242f4 Ports donor features 2018-03-17 15:23:07 +01:00
Ashe Higgs
5c8d845f56 [s] Improves and secures trait assignment code, allows their pref to be changed midround, tweaks RDS and Night Vision (#36160)
* Traits but less buggy

* no tick while dead

* fix security vuln
2018-03-06 15:57:42 +02:00
Ashe Higgs
ab9e2e8902 Adds minor roundstart traits! (ala CDDA, etc.) (#35440)
* Roundstart traits

* Unspaghettifies night vision

* Fuck everything

* Issues patch
2018-03-02 13:39:44 +13:00
Jack Edge
eed34adc0d Late joiners also get summoned guns/magic
🆑 coiax
add: If you have the (mis)fortune of late joining a shift where a crazy
wizard has given magical items or firearms to the crew, you will find
yourself also carrying such equipment.
/🆑

- Scrying orb now just grants the XRAY mutation to the first human that
picks it up
- The chance of a "special" magical item is now 1/50, up/down from 0-1
times per summon magic.
- The suppressor option in summon guns has been changed from a stetchkin
plus a silencer, to just a stetchkin with a silencer pre-installed.
- The summon magic/gun tables are now global typelists, rather than a
godforsaken giant switch statement
- Badmins can call the global /proc/give_guns(human) or
/proc/give_magic(human) for all their badmin needs.
- The chance of new players being survivor antags is the last effect
that triggered summon guns/magic (25 for wizard, 10 for summon event).
2017-12-29 22:20:26 +00:00
Emmett Gaines
25080ff2c4 defines math (#33498) 2017-12-17 11:02:11 -05:00
vuonojenmustaturska
5233ec1f6a Finishes the forceMove port (#33519)
* a thing

* thingy 2: electric boogaloo

* Obligatory webeditor commit
2017-12-15 10:39:34 +13:00
Jordan Brown
94761ab48c Lobby statpanel moved to Status (#33398) 2017-12-12 17:02:03 -02:00
Emmett Gaines
7c69cdcb8a Revert math (#33059)
* Revert "all this wrapping and it's not even christmas (#33035)"

This reverts commit faaf151580.

* Revert "fuck me for forgetting to graph this one"

This reverts commit 45d7acea2f.

* Revert "defines math"

This reverts commit 2817a1737b.
2017-11-23 20:59:52 -05:00
ninjanomnom
2817a1737b defines math 2017-11-22 17:36:58 -05:00
oranges
3dd3e4946a Merge pull request #32131 from KorPhaeron/protecthumanauthority
Changes to protect human authority
2017-10-31 09:32:45 +13:00
Emmett Gaines
825ab4def4 [512] The great \ref purge (#31824)
* The great \ref purge

* cleanup
2017-10-28 17:20:04 -04:00
KorPhaeron
a0cb8660e7 Changes to protect human authority 2017-10-26 14:39:38 -05:00
deathride58
4fd4312004 FIXES THE NEW LATEJOIN RUNTIME PROPER (#32068)
* FIXES EVERYTHING IN ONE SIMPLE LINE

* Fix it properly
2017-10-24 20:34:15 +02:00
Jordan Brown
5a4f56bf21 Late join antagonists will try to target late join players (#31560) 2017-10-23 21:07:41 -04:00
kevinz000
2a43a4f657 Fixes a bunch of bugs (#31687)
Fixes #13784 by forcing all orbits to update if the lowest stacked one updates
Fixes #21573 by making singularity try to move if it can't expand
Fixes #23306 by making simple bots that are off not able to move
Fixes #28274, fixes #26515 by actually making snipers zoom out
2017-10-16 21:12:32 +13:00
AnturK
02e1407269 Adds logging crew manifest to seperate file (#31665)
* Adds logging crew manifest to seperate file

* Coding blind

* i can spel words

* Not everyone in the lobby please.

* Proper header

* Fix

* Better format
2017-10-16 08:56:35 +11:00
Emmett Gaines
456cd10d94 Radiation rework and subsystem (#30909)
* radiation rework and subsystem

* moves a few things to initialize and adds radiation insulation

* adds a radiation contamination mechanic and makes requested changes

I'm terrified by the possibilities from this

* radiated objects give off light

and hopefuly contamination is balanced

* fixes runtimes and an mc crash kek

removed the lighting part of contaminated objects
attempted some more balancing

* Collectors output power in process() gradualy

And some more balancing tweaks

* Excludes a bunch of things from becoming radioactive

* Ready for testmerge balancing

* Inverse square law was swapped

* testmerge balancing

fixes the geiger counter
buffs collector power gen
nerfs sm radiation
slightly buffs rad insulation
nerfs rad damage (and its burn)
raised the minimum radiation

* disabling the radiation subsystem won't build up rad wave datums forever

* rewrites how mobs handle radiation

upgrades geiger counter functionality
and more balance tweaks

* cleans up stuff and removes debug message

* Slight contamination buff

* Major rad wave performance boost

Also improves rad insulation
Buffs contamination, again

* Fixes insulation runtime

More balance and performance tweaks

* fixes rad collectors not receiving power

* The final balance commit

Fixes a major bug causing radiation to underperform
More geiger counter changes that will be changed more to add sounds

* Monkey business

* Geiger counter sounds

* cleanup and move components to their own initialize

* Some code cleanup

And forgotten changes

* Cleans up some trailing returns

* Mapping changes
2017-10-13 10:22:00 -04:00
Jordan Brown
d3dcc118ec Merge pull request #31340 from Firecage/codeshitnotshit
Does some code standardization/consistency.
2017-10-05 15:53:11 -04:00
Jordan Brown
3aeb8b363a Merge pull request #31310 from ShizCalev/lobby-timer-fix
Fixes lobby timer showing as delayed when it's just waiting for more players
2017-10-05 10:21:14 -04:00
Firecage
ee3e8d2846 merge conflict fix 2017-10-05 11:22:57 +02:00
Firecage
2ae0380fef Does some code standardization/consistency 2017-10-05 11:13:47 +02:00
ShizCalev
93dba11648 Simplified further 2017-10-04 10:37:51 -04:00
ShizCalev
63554ed392 Fixes lobby timer showing as delayed when its not 2017-10-04 10:27:27 -04:00
ShizCalev
0ae5cd2d97 Cleans up and fixes old landmarks 2017-10-03 23:38:59 -04:00
oranges
183252c962 Revert "Prompt for observer confirmation now happens when you click it initially" 2017-10-01 15:50:18 -05:00
Jordan Brown
f234f759f4 Prompt for observer confirmation now happens when you click it initially 2017-09-30 11:49:31 -04:00
Jordan Brown
4178c209f1 Configuration datum refactor (#30763)
* Configuration datum refactor

* More WIP

* New easier on the eyes format

* More WIP

* Finished config.txt

* Fucktons more WIP

* The end of conversion draws near...

* Add all this shit

* Done converting entries finally

* Hunting down compile errors

* More WIP

* MORE CONVERSIONS

* More WIP

* More WIP

* Oh shit only 90 errors this time!

* IT COMPILES!!!

* Fixes world start runtimes
2017-09-29 15:36:51 +13:00
ShizCalev
74f5a8c904 DisplayTimeText mk2 (#30969)
* Adds new helper, DisplayTimeText

* Removed unused define

Thought it would've been nice to have for the future, but I guess it's
fine to go without it.

* CBB

* Revamp

* Early returns

* More cleanup

* Proc cleanup

* Makes fraction only show if seconds is < 1

* Last cleanup

* Revert

* Corrected incorrect round time.

Dunno how nobody ever caught that it was incorrect on live servers, gg.
2017-09-24 19:58:58 -04:00
Jordan Brown
e10a629ca9 Adds back required arrivals undockedness with a config 2017-09-15 14:32:31 -04:00
KorPhaeron
8dc3cd125c Full jobs will no longer be shown as priority for latejoiners (#30627)
* Fixes full jobs being shown as priority

* Commiting in the middle of compiling leaves things out
2017-09-13 08:12:32 +10:00
Shadowlight213
e458845453 Adds tracking amount of time spent playing departments 2: The fall of the Assistants. (#29105)
* Ports Paradise Job exp system

* changed to use json_decode and json_encode as recommended by oranges

* updates changelog

* Reee cyberboss

* Changes to use a seperate table

* Updates database changelog
Changes to use mediumint

* Back to wip we go.
Changes sql stuff to how mso suggested
Attempts the changes requested in the other pr.

* work on stuff.

* work on stuff.

* Renamed proc for time remaining.
Fixed updating time amounts.
Added delay to fix firing at roundstart

* exp is now stored in a global list, and only updated to the db at round end.

* some stuff

* Added button to toggle exempt status on a player.
Still need to make it update the db

* REEE Jordie.
Undoes delaying exp updating to round end.
Adds the updating filtering to the update_exp_client proc which is used again

* Lowers a bunch of the times needed.

* Makes tracking per job instead of per department.
Department time is now calculated from job time.

* Whoops forgot to update master first. Lemme save this

Reverb should play cheeki breeki to people

* I think I did this right.
Too tired to test atm.
Busy rewatching twintails ni narimasu

* Removes var from proc arguments
Fixes database stuff

* Does some requested changes.
Makes special_role be tracked instead of bundled under special.

* Done, but need to refactor how it handles ghost roles.

* Less false data wew

* Changes

* Updates db version
More changes

* More changes

* More changes

* revision fix

* OOPS

* fix schemas

* Makes SQL error logging handled by Execute
Gang role tracking now strips out the gang name and is generic.
2017-08-20 23:01:08 +12:00
Ian Turk
7460f2c5b8 Replaced flags with flags_1 2017-08-16 13:01:15 -06:00
Jordan Brown
6175ab77d5 Removes all checks for subsystem existence 2017-08-01 10:16:37 -04:00
ShizCalev
59ef81245b Changes some 1s and 0s to TRUE and FALSE (#29144) 2017-07-10 10:31:34 -04:00
Kyle Spier-Swenson
55ae89560b Fix the lobby menu not showing when the mysql connection had ghosted
somebody was copypasting boilerplate code.
2017-06-29 08:52:18 -07:00
Jordan Brown
451ab28ed4 Removes delay from AddEmploymentContract 2017-06-15 09:18:43 -04:00
Leo
7ec5c0e5d3 Merge pull request #28255 from optimumtact/revert-28229-revert-28170-observerspeep
Players cannot observe before PREGAME is reached, Version 2
2017-06-13 21:42:09 -03:00
oranges
c866a77147 Players cannot observe before PREGAME is reached
Ready | Not Ready | Observe is now a three way toggle

The player ready status has been refactored into an ENUM of the three
states, READY, NOT_READY and OBSERVING

if the tickerstate is at least PREGAME they will spawn as observers,
before then you can only register your interest in observing.

All the observer code has been centralised into a single
make_me_an_observer proc on new_player mobs
2017-06-12 20:58:15 +00:00