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
ShizCalev
540269132c Fix AI core dropping wrong circuit on decon (#40742)
Also cleaned up a couple vars and added qdel handling.
2018-10-09 05:53:53 +01:00
ShizCalev
5a29dc43e3 Replaces istypes with the proper tool_behaviour checks. (#40414) 2018-10-01 01:10:45 +01:00
Nich
6c879778b6 spellchecks tg whatever 2018-06-28 21:26:38 +02: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
Tad Hardesty
e61c1ba97d Merge pull request #37760 from YPOQ/stackfix
Fixed stacks sometimes having the wrong amount if created on another stack
2018-05-11 21:28:15 +01:00
Fox McCloud
d42a67da02 Kills off /obj/item/device (#37297)
* Kills off /obj/item/device

* whoops

* whoops

* Fix
2018-04-23 14:01:33 +01:00
Nich
1499fd0e90 Latejoin Silicons (#36560) 2018-04-05 21:20:30 +02:00
ACCount
c6e607dc17 Refactors use_sound and changes the way tools play sounds (#35521)
* Adds list support to usesound, ports drills to usesound

* Adds more tool sounds, changes usesound usage to play_tool_sound

* fix
2018-02-12 17:16:47 +02:00
ACCount
100c4b6114 Adds new helper: use_tool, shakes things up in tool code (#35095)
* small changes

* Adds a use_tool helper and changes some tools to use it

* Ports most tool operations to use_tool

* Converts more tool operations to use_tool and tool_act

* Changes some things to default_unfasten_wrench

* Improves tool_behavior support in mech construction

* Code review memes

* Fixes all instant use_tool calls failing

* Code improvements

* merge fixes
2018-02-06 11:02:53 +01:00
kevinz000
caa1e1f400 Massive research refactor; changes research system to techwebs; Decentralized research 2017-11-18 19:55:40 -08:00
Jordie
8b19b490d1 JSON feedback (#32188)
* wip

* wip2

* makes code actually compile on 511 + fixes

* versioning

* s

* adds python conversion script, schema change and removes 'force ' from item_used_for_combat

* fix to compile

* forgot to actually commit this
2017-11-17 02:43:12 -05:00
bawhoppen
3e4d747b77 Adds desc to things lacking them. (#31086)
* Desc change

* Update girders.dm

* Update valve.dm

* Update machine_stacking.dm

* Update shuttle_engines.dm

* Update pipe_dispenser.dm

* Update lib_items.dm
2017-10-02 09:07:10 +13: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
vuonojenmustaturska
7d30e345ca Fixes MMI to AI law transfer (#31017)
* Fixes MMI to AI law transfer

* Fixes issue with preloaded laws on AI core
2017-09-27 10:52:03 +13:00
Jordan Brown
af4d9a85c9 Repaths /obj/item/weapon to /obj/item (#29929) 2017-08-16 10:38:51 -03:00
ShizCalev
59ef81245b Changes some 1s and 0s to TRUE and FALSE (#29144) 2017-07-10 10:31:34 -04:00
Joan Lung
1feb0021a1 Removes now-unnecessary obj_integrity definitions 2017-07-08 14:02:50 -04:00
Lzimann
3f705c0479 Changes all dmis to be lowercase 2017-06-11 16:05:17 -03:00
Lzimann
3e34eb9e3f Changes all sounds to be lower case, plus standardizes their references 2017-06-11 00:38:45 -03:00
Cyberboss
729010bbb2 Unorphans the blackbox (#26129)
Moved sql_poll_population from server_maint to this new SS. Moved few remaining server_maint tasks to SSping and deleted it.
2017-04-27 10:04:57 +12:00
Cyberboss
d0bfbc3e13 Rename ticker to SSticker 2017-03-22 10:48:25 -04:00
Lzimann
5a618297ce Replaces the default output with the to_chat wrapper. 2017-03-10 01:32:05 -03:00
Firecage
8dab2c9c34 Changes the names of Circuit Boards so they are easier on players. (#22688) 2017-01-04 17:20:53 -05:00
Joan Lung
95af0534f6 MMI'd clockcultists put in AI cores will properly lose clockcult status (#22369)
* MMI'd clockcultists put in AI cores will properly lose clockcult

* uuuuugh

* fix the core while we're at it

* "

* mrrp

* this will also follow you around

* hmm
2016-12-25 16:18:55 +13:00
XDTM
7d1a67d0c8 Abductor tools and tool sound refactor. (#22125)
* Everything in the PR

* I'm taking that as a yes
2016-12-14 18:09:41 +13:00
Joan Lung
a3be7a9226 Refactors toolspeed to be a multiplier instead of a divisor 2016-12-09 16:55:51 -05:00
Cuboos
bf079d29d4 POWER TOOLS TAKE 2. (#20923)
New power tools for the CE! It's like goof's golden tools but less memey and makes more sense, power tools are much faster than normal tools and take the place of two.

Hand drill, activate to switch between between screwdriver bit and bolt bit (screwdriver/wrench)

Jaws of life, activate to switch between a cutting head and prying head, can also open powered doors like a xeno. Cutting head cuts your head off if you suicide with them. I wanted to make the prying head gib your head but i couldn't figure it out.

Reworked how construction handles sounds and added a new "usesound" var to obj/items. This is useful if you want to add another tool or item that makes a send when it's being used. Also useful if you want to replace a sound for an item or if you have an item with a choice of sounds (like if you have two versions of a sound sound you want to play)

CE now gets a unique white tool belt, exactly the same as a regular tool belt, just a re-skin.

CE also spawns with the new power tools and an experimental welder, CE will be the ONLY one to spawn with these tools, might make him a more valuable target for traitors. I figured this would be acceptable considering most heads are not antag enabled (i think)

Also i added a welding tool sound for reasons... figured might as well add some more sounds while i was reworking it.
2016-10-14 10:19:23 +13:00
Joan Lung
c96fa7e2dd jump... 2016-10-11 10:25:07 -04:00
Joan Lung
176a6fc404 I'm not actually sure how long that bug existed? 2016-10-09 18:44:47 -04:00
Joan Lung
5ff591e69b NUMBAH THREE 2016-10-09 18:42:05 -04:00
phil235
5f835bfc26 Obj damaging system, acid damage, and fire damage refactor (WIP) (#20793)
Please refer to #20867 and #20870 for a easier view of the changes. Those two PRs show all meaningful changes (hopefully) and doesn't show the files changed with just 3 lines changed.

This PR does three things:

    It makes all children of /obj/ use the same damage system.
    Previously to make your new machine/structure be destroyable you needed to give it a var/health, and its own version of many damage related proc such as bullet_act(), take_damage(), attacked_by(), attack_animal(), attack_hulk(), ex_act(), etc... But now, all /obj/ use the same version of those procs at the /obj/ level in code/game/obj_defense.dm. All these obj share the same necessary vars: obj_integrity (health), max_integrity, integrity_failure (optional, below that health level failure happens), and the armor list var which was previously only for items, as well as the resistance_flags bitfield. When you want your new object to be destroyable, you only have to give it a value for those vars and maybe override one proc if you want a special behavior but that's it. This reorganization removes a lot of copypasta (most bullet_act() version for each obj were nearly identical). Two new elements are added to the armor list var: fire and acid armor values.
    How much damage an obj take depends on the armor value for each damage category. But some objects are INDESTRUCTIBLE and simply never take any damage no matter the type.
    The armor categories are:
    -melee(punches, item attacks, xeno/animal/hulk attacks, blob attacks, thrown weapons)
    -bullet
    -laser
    -energy (used by projectiles like ionrifle, taser, and also by EMPs)
    -bio (unused for this, only here because clothes use them when worn)
    -rad (same)
    -bomb (self-explanatory)
    -fire (for fire damage, not for heat damage though)
    -acid
    For machines and structures, when their health reaches zero the object is not just deleted but gets somewhat forcedeconstructed (the proc used is shared with the actual deconstruction system) which can drops things. To not frustrates players most of these objects drop most of the elements necessary to rebuild them (think window dropping shards). Machines drop a machine frame and all components for example (but the frame can then be itself smashed to pieces).
    For clothes, when they are damaged, they get a "damaged" overlay, which can also be seen when worn, similar to the "bloody" overlay.

    It refactors acid. See #20537.
    Some objects are ACID_PROOF and take no damage from acid, while others take varying amounts
    of damage depending on their acid armor value. Some objects are even UNACIDABLE, no acid effect can even land on them. Acid on objects can be washed off using water.

    It changes some aspect of damage from fires.
    All /obj/ can now take fire damage and be flammable, instead of just items. And instead of having just FLAMMABLE objs that become ON_FIRE as soon as some fire touch them (paper), we now have objects that are non flammable but do take damage from fire and become ashes if their health reaches zero (only for items). The damage taken varies depending on the obj's fire armor value and total health. There's also still obj and items that are FIRE_PROOF (although some might still be melted by lava if they're not LAVA_PROOF).
    When a mob is on fire, its clothes now take fire damage and can turn to ashes. Similarly, when a mob takes melee damages, its clothes gets damaged a bit and can turn to shreds. You can repair clothes with cloth that is produceable by botany's biogenerator.

    It also does many minor things:
        Clicking a structure/machine with an item on help intent never results in an attack (so you don't destroy a structure while trying to figure out which tool to use).
        I moved a lot of objects away from /obj/effect, it should only be used for visual effects, decals and stuff, not for things you can hit and destroy.
        I tweaked a bit how clothes shredding from bombs work.
        I made a machine or structure un/anchorable with the wrench, I don't remember which object...
        Since I changed the meaning of the FIRE_PROOF bitflag to actually mean fire immune, I'm buffing the slime extract that you apply on items to make them fire proof. well now they're really 100% fire proof!
        animals with environment_smash = 1 no longer one-hit destroy tables and stuff, we give them a decent obj_damage value so they can destroy most obj relatively fast depending on the animal.
        Probably a million things I forgot.

If you want to know how the damage system works all you need is the three obj vars "obj_integrity", "max_integrity", "integrity_failure", as well as the armor list var and the resistance_flags bitfield, and read the file obj_defense.dm
2016-10-10 11:14:59 +13:00
Joan Lung
8dbe5907e4 i'm a good coder this is fine 2016-10-07 18:44:49 -04:00
Joan Lung
fe2d77b43f everything involved in this is awful 2016-10-07 18:11:00 -04:00
Joan Lung
fccd45e279 what is a define 2016-10-07 18:01:56 -04:00
Cheridan
e43b06f750 Merge pull request #20591 from ChangelingRain/proofofconceptantagdatum
"Working Datum Antagonists"
2016-09-29 13:33:59 -05:00
ExcessiveUseOfCobblestone
9d54b28e9b Fixes Intellicard view-locking bug (#20682)
* Update ai_core.dm

* Update ai.dm

* Update mecha.dm

* Update mecha.dm

* Update mecha.dm

* Update ai_core.dm

* Update ai.dm

* Update ai_core.dm

* Update ai.dm

* Update ai_core.dm
2016-09-27 13:40:45 +02:00
Joan Lung
64667136d5 heavyweight class
this is ~eh, but it's this or Another Antag Removal Proc and, god, let's not.
2016-09-19 13:18:51 -04:00
bgobandit
27e355d16b Fixes another batch of typos. 2016-08-30 20:57:28 -04:00
Joan Lung
4f8133c3d1 unfucks ratvar conversion 2016-06-08 15:50:06 -04:00
LatD
d89eb178c6 Merge remote-tracking branch 'refs/remotes/tgstation/master' into Research 2016-05-30 18:33:55 +03:00
xxalpha
0d608250fa Changed AI core programming so it functions like the AI Upload. (#18004) 2016-05-30 10:54:50 +12:00
LatD
f36237a67d Merge remote-tracking branch 'refs/remotes/tgstation/master' into Research 2016-05-25 18:45:31 +03:00
LatD
6e6474ee9e Imprinter origin and req lvls 2016-05-22 23:46:05 +03:00
Xhuis
23073619a2 Conflicts III 2016-05-15 00:59:44 -04:00
Xhuis
45ef8a5e00 Ratvar, the Clockwork Justiciar 2016-05-15 00:59:28 -04:00
Core0verload
a66c2f4418 Machine/computer boards and frames refactor (#17300)
* Map Changes

* Machine/console boards and frames refactor

* More board changes
2016-05-08 12:11:18 +02:00
phil235
0480790b0a Same things but with structures now. 2016-04-24 20:38:33 +02:00
AnturK
9e8eca56a7 Adds AI card tgui
Removes the multiple AI's on one card semi feature.
2016-01-24 12:52:31 +01:00
xxalpha
8a669c93db Changed aimodule code to use laws datum instead of AI mob. 2016-01-18 03:08:41 +00:00