Commit Graph

770 Commits

Author SHA1 Message Date
Ghilker
b95c0366a4 _HELPERS/unsorted.dm has been sorted (#61882)
bring code up to latest standards, move many procs to named files inside _HELPERS
no idea where to put some of these procs, help is appreciated
made more files to contain some unique code, deleted unsorted.dm, we can rest now
2021-10-05 20:22:57 +01:00
Superlagg
236b7ee1e8 Changes paper bins to be easier to use (#61429)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
2021-09-26 01:41:48 -07:00
tralezab
6c01cc2c01 every case of initialize that should have mapload, does (#61623)
## About The Pull Request

stop forgetting to include mapload, if you don't include it then every single subtype past it by default doesn't include it

for example, `obj/item` didn't include mapload so every single item by default didn't fill in mapload

![](https://media.discordapp.net/attachments/823293417186000909/875122648605147146/image0.gif)

## Regex used:

procs without args, not even regex

`/Initialize()`

procs with args
`\/Initialize\((?!mapload)((.)*\w)?`

cleanup of things i didn't want to mapload:
`\/datum\/(.)*\/Initialize\(mapload`
2021-09-24 17:56:50 -04:00
EricZilla
86d20cbee9 Updates Greyscale Colors of PDAs and Gives QM a Survival Pen since I was in there anyway. (#61261)
About The Pull Request

Hallo! This is part two of my PDA update, where I take the old hokey colors that were just left in to not rock the boat, and changes them to better fit the current aesthetic of the game. It also makes the captain's PDA have some more fanfare, without even adding a sprite, I just did a funny trick with the layers.

In addition to that, I have updated the sprite for the survival pen, and made it so QMs start with one in their PDA.

bespoke final
peen
Why It's Good For The Game

The old PDA colors on the new PDA sprites were odd in a few places, this fixes that. I spent about a week or so going to different players of the different jobs and departments getting their input on what colors they'd like their PDAs to be, and now the best looking options that make sense, will be added in! Woo!

Also I just think the QM having a emergency shovel is kind of cool, and its a really neat item that deserves just a little more love, so why not?
Changelog

cl
expansion: Updated old GAGS colors for the PDAs based on user feedback
imageadd: Updated appearance of the Survival Pen
expansion: The Quartermaster now starts with a Survival Pen because its flavorful. Survival Pen has also been updated to use the fancy font, since, its fancy.
/cl
2021-09-22 12:16:40 +12:00
Kylerace
d9ee5e7297 moves obj_integrity and associated procs to the atom level (#61183) 2021-09-06 04:07:26 -07:00
Kokonut
a9185479d1 Pen & Paper Bin minor resprite (#61159)
sprites for thing that didn't have one, and they look better i think probably
2021-09-02 19:36:50 -04:00
TiviPlus
417c042838 employmnet contract code improvement (#60955) 2021-08-23 14:23:42 -07:00
MrMelbert
b3e8eebdc9 Kills /obj/item/melee/transforming, replaces it with a transforming weapon component (#60761)
This PR kills off the transforming subtype of /obj/item/melee and replaces it with a component to handle the transforming behavior, /datum/component/transforming.

The transforming component handles updating the variables of an item when it's transformed. Things like force, sharpness, whetstone force bonus, and attack verbs. Similar to the two-handed component, but instead of transforming into a two-hander it remains a one handed weapon.

The "nemesis" behavior (dealing addition damage to certain factions) of the transforming subtype was moved to the cleaving saw only, since it was the only transforming item that used it. In the future, this can be made into a bespoke element/component as well.

The following weapons and items have been updated to use this component:

    Energy Swords / Sabers / Bananium Energy Sword
    Energy Circular Saw
    Energy Dagger
    Energy Axe
    Toy Energy Sword
    Holographic Energy Sword
    Switchblade
    Advanced Medical Tools (Laser scalpel, Mechanical Pinches, Searing Tool)
    Advanced Engineering Tools (Hand Drill, Jaws of Life / Syndicate Jaws of Life)
    Combat Wrench
    Cleaving Saw
    Telescopic Batons / Contractor Batons
    Roasting Stick
    Telescopic Riot Shield
    Energy Shield / Bananium Energy Shield

This PR also touches up the code around the various above items.
2021-08-23 11:45:54 -07:00
AnturK
d72eac0c3a Runtime fixes batch. (#60946)
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2021-08-21 12:50:03 -04:00
Ghom
38f12422a0 honkspam component to element. (#60635) 2021-08-19 18:40:40 -07:00
EOBGames
b08632353c [MDB IGNORE] Eliminates Toxins (#60619)
Repaths everything referring to "toxins" while actually meaning either the room in science or plasma gas. While this PR might be disrespectful to our forefathers, given this is (I believe) a holdover from as far back as the Exadv1 days, this has constantly irked me since I started working with the code. None of the player-facing stuff has referred to plasma as toxin since before 4407 hit, besides the Toxins Lab, and yet all of the type-paths are still pointing at toxins, making it a nightmare to search for in a map editor, and making the code needlessly easy to confuse with that of toxin damage. So this just fires it into the sun.

Anything relating to Toxins, the science subdepartment, now makes reference to Ordnance instead. This felt fitting enough given the focus of the subdepartment is around the creation of and testing of explosives.
Anything relating to plasma gas has, fittingly, been made to refer to plasma gas.

Edit: Ah yes, I feel I should probably apologise off the bat for the size of this PR- the code touched is mostly atmos machinery and simplemobs, a few sprites here and there, and of course the station maps + a few offstation maps.

Makes the code more legible and makes mapping less painful.

(The payment has been made)
2021-08-17 11:49:47 -07:00
GoldenAlpharex
8322248fbd Clipboard improvements and fixes (#60792)
* Paper now updates automatically on the clipboard and stamps can finally be used properly!

Also, added support for pens that would be integrated to clipboards, so they couldn't be removed.

* Removing the testing clipboard

* Update Clipboard.js

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-08-13 20:18:34 +03:00
Ghom
9127642b64 photocopier and carbon paper copying now share a common proc. (#60511) 2021-08-01 16:31:03 +02:00
Timberpoes
75a3717a04 Modifies right click logic so that it is not the same priority as modifier keys. (#59656)
Strips out the existing right click code - Due to the myriad of ways right clicking has been implemented, dedicated signals and procs for right clicking without modifiers are fundamentally incompatible with our system of primary and secondary attacks.

Adds additional signals to attacking code. These signals allow atoms to cancel the attack chain early on secondary attacks, or override the standard procs and not send signals to prevent any undesired behaviour from signal handlers.

Items that used RightClick procs have been converted to attack_hand_secondary.

The slaughter demon, having its own set of snowflake code as poor OOP principles have been applied in UnarmedAttack() procs with lacking calls to parent procs and arbitrary redefinition of behaviour, checks for a right click in its own UnarmedAttack() and performs a bodyslam off that.

Storage components now hijack the secondary attackby stage via signals to handle their opening and closing shortcuts on right click. When you right click a storage component equipped item with an object in your active hand, the object has an opportunity to perform its logic in pre secondary attack code and cancel the attack chain. If it does not cancel the attack chain in pre-attack, then the storage component takes over for attackby and, if possible, opens the relevant inventory and ends the attack chain.

The forensic scanner is a proof-of-concept of this working in action. With its scan logic moved from afterattack code to pre attack code for right clicking, right clicking with the scanner will now perform a scan where previously one was impossible. Left clicking still does what it always does - Scans at the very end of the attack chain.

The logic still isn't perfect - For example, you still can't attack containers in melee even in combat mode (you'll either open them or put your weapon into them regardless of which option you choose) - But this is a better setup overall which allows for items to at least override this behaviour in pre-attack if needed.
2021-06-24 14:30:33 -03:00
Ed640
568cdc5cf2 Fixes collapsed or burnt paper bins from voiding new papers added (#59732)
* Stops collapsed or burnt paper bins from voiding new paper added afterwards

* Replaces papers.Remove and paper.Add

LAZYADD and LAZYREMOVE are much more useful.
2021-06-23 12:46:03 -07:00
Rohesie
e03cd1aada Refactors move procs to support multitle objects (#59658)
Enter(), Entered(), Exit() and Exited() all passed the old loc forward, but everything except a single a case cared about the direction of the movement more than about the specific source.
Since moving multi-tile objects will have multiple sources of movement but a single direction, this change makes it easier to track their movement.

Cleaned up a lot of code around and made proc inputs compatible.

I'll add opacity support for multi-tile objects in a different PR after this is merged, as this has grown large enough and I don't want to compromise the reviewability.

Tested this locally and as expected it didn't impair movement nor produced any runtimes.
2021-06-20 14:55:37 -07:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
cacogen
9caf154050 Rename component (#59511) 2021-06-08 15:04:35 -07:00
interestingusernam3
997de9b59e Adds two clown-spection scanners that print clowncrypted reports (#59306)
Alright, update the changelog and body of the PR, and comment here when that's done.
This should be ready for merge then.
2021-06-07 16:35:25 -03:00
Arkatos1
258fca6b3b tgui: Notice Board (#59389)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-05-31 16:48:22 -07:00
dragomagol
c86aff9a82 The Wallening Approacheth: Adds directional variants to most wall mounts (#58809) 2021-05-08 02:57:36 -07:00
cacogen
001d2ca06d Paper bins show the paper inside them (atomised) (#57907)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-25 18:42:17 -07:00
LemonInTheDark
7f444f510e Fixes a ton of harddels (#57736)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2021-03-17 05:51:53 -07:00
Cimika/Lessie/KathyRyals
1a2b975ce3 Refactors pen and sleepypen attack code. (#57479) 2021-03-11 02:30:38 -08:00
spessbro
cbeb9c5be4 Refactors the paper bin behavior for dragging to pick up into an element (#57501)
* Drag pickup element for the paper bin behavior

* invokes async on put_in_hands to comply with the linter

* documented and like better names

* blackspace
2021-03-08 16:50:53 -08:00
Qustinnus
93fdfa1ab4 Adds a hotkey that puts you in throw mode aslong as you hold it (#57331)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-08 05:17:19 -08:00
mozi_h
95ac30cbab Right-click to remove carbon-copies (#57402) 2021-03-06 17:29:09 -08:00
mozi_h
6fe4e92227 Clipboards: tgui and better functionality (#57289)
- Clipboards now use tgui
- View / write on paper on the chipboard using an attached pen
- Rename paper on the clipboard
- Attach a pen by clicking on a clipboard with one
- Attach paper by either clicking on a clipboard with some or:
- Rapidly attach paper by clicking on paper with the clipboard 🚀
2021-03-04 19:49:17 +02:00
mozi_h
a588712ca2 Refactor folder & consistency (#57400)
* refactor folder tsx

* Right-click to remove paper
2021-03-04 18:53:55 +02:00
mozi_h
71d5901da6 Folders: tgui, refactor, qol (#57320)
Snazzy new UI is always great. Makes folders more fun to use and makes it consistent with the new clipboards
2021-03-02 18:44:26 +02:00
Timberpoes
890615856e Fully implements the ID Card design document (#56910)
Co-authored-by: Rohesie <rohesie@gmail.com>
2021-02-28 19:26:45 -08:00
mozi_h
f61b0e975e Fix paper carbon invisibility and duplication (#57172) 2021-02-26 01:20:11 -08:00
Ryll Ryll
1c61ceddf5 Pens and iron rods can embed again (#57181) 2021-02-26 00:12:20 -08:00
TemporalOroboros
e4079c87b8 update_appearance (#55468)
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
2021-02-19 12:06:18 -03:00
LemonInTheDark
5c22a0cfc1 Converts many proc overrides to properly use list/modifiers, lots of other smaller things (#56847)
Converts many proc overrides to properly use list/modifiers, fixes some spots where modifiers should have been passed, calls modifiers what it is, a lazy list, and cleans up some improper arg names like L, M, C, and N. Oh and I think there was a spot where someone was trying to pass M.name in as a string, but forgot to wrap it in []. I fixed that too.
2021-02-16 09:18:46 -05:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
LemonInTheDark
f4160f26db Converts all uses of modifiers to lazy access to avoid memes in future (#56846) 2021-02-12 15:25:31 -08:00
Mothblocks
a1046d8e37 Refactor can_inject, and introduce try_inject (#56816)
Splits can_inject into can_inject and try_inject. The latter can perform side effects, while the former cannot. Moved the show_error bool parameter to a flag that try_inject checks.

Changes the signature to can_inject(mob/user, target_zone, injection_flags). This was previously redefined in several places, making it impossible to use named parameters. This refactor now allows named parameters to be used, and thus avoiding the ugliness of TRUE, FALSE, FALSE in parameters.
2021-02-11 15:45:18 -03:00
Fikou
8d586a7cb0 Rename metal sheets to iron sheets (#56643)
It's a specific type of metal, it shouldnt just be called generic "metal".
The reagent, ore and material datum are already called iron.
2021-02-05 15:48:00 +00:00
Qustinnus
707fc287b4 Replaces intents with combat mode (#56601)
About The Pull Request

This PR removes intents and replaces them with a combat mode. An explanation of what this means can be found below
Major changes:

    Disarm and Grab intents have been removed.
    Harm/Help is now combat mode, toggled by F or 4 by default
    The context/verb/popup menu now only works when you do shift+right-click
    Right click is now disarm, both in and out of combat mode.
    Grabbing is now on ctrl-click.
    If you're in combat mode, and are currently grabbing/pulling someone, and ctrl-click somewhere else, it will not release the grab (To prevent misclicks)

Minor interaction changes:

Right click to dissasemble tables, racks, filing cabinets (When holding the right tool to do so)
Left click to stunbaton, right click to harmbaton
Right click to tip cows
Right click to malpractice surgery
Right click to hold people at gunpoint (if youre holding a gun)
Why It's Good For The Game

Intents heavily cripple both the code and the UI design of interactions. While I understand that a lot of people will dislike this PR as they are used to intents, they are one of our weakest links in terms of explaining to players how to do specific things, and require a lot more keypresses to do compared to this.

As an example, martial arts can now be done without having to juggle 1 2 3 and 4 to switch intents quickly.

As some of you who saw the first combat mode PR, the context menu used to be disabled in combat mode. In this version it is instead on shift-right click ensuring that you can always use it in the same way.

In this version, combat mode also no longer prevents you from attacking with items when you would so before, as this was something that was commonly complained about.

The full intention of this shift in control scheme is that right click will become "secondary interaction" for items, which prevents some of the awkward juggling we have now with item modes etcetera.
Changelog

cl Qustinnus
add: Intents have been replaced with a combat mode. For more info find the PR here: #56601
/cl
2021-02-04 16:37:32 +13:00
Ghom
2789501f75 Fixing yet another item that can be remotely put in hands with TK. (#55505)
I'm adding adjacency checks to paperplane folding and unfolding so the resulting item doesn't get put in hands from afar.
2021-01-03 15:12:22 -08:00
coiax
6280fa67f2 Fix observers not being able to read from afar (#55841)
From the examine() code it's clear that this was intended, just a check
in `ui_status` meant that the range check was being applied to them
anyway.
2020-12-31 17:20:55 -08:00
uomo
b679315af2 Fixes a possible oversight in photocopier code. (#55379)
I think #54336 neglected to use the icon() proc when it should have. This is a Byond proc apparently, and the rest of the code in the photocopier (and other picture related things I checked elsewhere) seems to use it when setting an image, I guess it's sort of like typecasting? So this will probably maintain consistency and prevent some weird bugs in the future
2020-12-13 19:17:14 +00:00
Jared-Fogle
7d3fd4355f Everything that uses maptext now uses the class that makes it actually readable (#55420)
Adds a MAPTEXT macro that wraps the given text in the maptext class, the thing we use for Runechat to make it so you can actually read it. Everything that sets maptext now uses this.
2020-12-10 23:25:46 +00:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Ghom
4c31b0e116 CanUseTopic() refactor. (#54747)
* CanUseTopic() refactor.

* Forgot about default_can_use_topic. Tested and working.

* Update bin.dm

* no-nonsense.
2020-11-25 13:12:12 +01:00
cacogen
4a339b1f41 UNIQUE_RENAME respects labels (#55121) 2020-11-24 17:52:38 +08:00
ThePotato
23806ad6fb Rotation for stamps and some other stuff for paper (#55028)
* rotation, better mouse tracking, fixed chat output for tgui paper

* revert this stuff

* made mousemove only change states

* rebuild

* fix wrapping and move all sanitization to sanitizeText
2020-11-20 04:27:08 +02:00
Ghom
91bfedcd16 Refactored 'IsAdvancedToolUser' into a macro plus relative trait. Tweaked 'can_hold_items'. (#54665)
The PR aims to allow advanced tool users to be defined by traits rather than a hardcoded proc.
Also necessary for the CanUseTopic refactor I'm working on, which will be PRed separately for atomization purposes.
This PR also fixes an inconsistency with can_hold_items (since monkeys can actually hold items).
2020-11-10 15:15:31 -03:00
TemporalOroboros
edd6500d78 /obj/screen --> /atom/movable/screen (#54403)
Repaths screen objects to /atom/movable
2020-11-08 23:07:15 -03:00