* [MDB IGNORE] dir sanity, primarily on WALLITEMs (#62601)
About The Pull Request
Wall items mostly use the direction from the floor to the wall in the named mapping helper. Wall items mostly use the direction from the wall to the floor for the internal dir variable.
This leads to a headache when it comes to working out what conflicts with what, and what needs placing where.
Wall frames provided a member, inverse, which specified whether or not to invert the direction of the item when looking for conflicts. It was also used to specify whether to look for conflicts outside of the wall (cameras and lights appear external to the wall) or inside the wall (most wall items). This flag was set for Intercoms, APCs, and Lights. Since APCs and Lights expect a floor-to-wall direction, and Intercoms expect a wall-to-floor direction, this means that APCs and Lights were getting the correct direction, and Intercoms were getting the wrong direction.
Some implications of this setup were:
You could build an APC on top of another wall item, provided there was nothing external attached to the wall and the area didn't have an APC.
You could stack Intercoms indefinitely on top of the same wall, provided you weren't in a one-tile wide corridor with something on the opposite wall.
Or both! Here's twenty Intercoms placed on the wall, and a freshly placed APC frame after placing all Intercoms and deconstructing the old APC:
endless-stack-of-intercoms
Not everything used this inverse variable to adjust to the correct direction. For example, /obj/machinery/defibrillator_mount just used a negative pixel_offset to be visually placed in the correct direction, even though the internal direction was wrong, and never set! This also let you stack an indefinite number of defib mounts on the same wall, provided it wasn't a northern wall... except you could do this to northern walls too, since defibs weren't considered a wall item for the purposes of checking collisions at all!
Ultimately, every constructable interior wall item either used this inverse variable to adjust to the correct placement, set a negative pixel_offset variable to have its offset adjusted to the correct placement, or overrode New or Initialize to run its own checks and assignment to pixel_x and pixel_y!
Inventory: Table of various paths, related paths, and the adjustments they used
Unfortunately, untangling /obj/structure/sign is going to be another major headache, and this has already exploded in scope enough already, so we can't get rid of the get_turf_pixel call just yet. This also doesn't fix problems with the special 2x1 /obj/structure/sign/barsign.
Some non-wall items have been made to use the new MAPPING_DIRECTIONAL_HELPERS as part of the directional cleanup.
tl;dr: All wall mounted items and some directional objects now use the same direction that they were labelled as. More consistent directional types everywhere.
Why It's Good For The Game
fml
Changelog
cl
refactor: Wall mounted and directional objects have undergone major internal simplification. Please report anything unusual!
fix: You can no longer stack an indefinite amount of Intercoms on the same wall.
fix: Defibrillator Mounts, Bluespace Gas Vendors, Turret Controlers, and Ticket Machines are now considered wall items.
fix: Wall mounted items on top of the wall now consistently check against other items on top of the wall, and items coming out of the wall now consistently check against other items coming out of the wall.
fix: The various directional pixel offsets within an APC, Fire Extinguisher Cabinet, Intercom, or Newscaster have been made consistent with each other.
fix: The pixel offsets of Intercoms, Fire Alarms, Fire Extinguisher Cabinets, Flashers, and Newscasters have been made consistent between roundstart and constructed instances.
fix: Constructed Turret Controls will no longer oddly overhang the wall they were placed on.
qol: Defibrillator mounts now better indicate which side of the wall they are on.
fix: Some instances where there were multiple identical lights on the same tile have been fixed to only have one.
/cl
* [MDB IGNORE] dir sanity, primarily on WALLITEMs
* apc directionals
* bluespace vendor fix
* defib fix
Co-authored-by: esainane <esainane+github@gmail.com>
Co-authored-by: jjpark-kb <55967837+jjpark-kb@users.noreply.github.com>
* runtime fix for borgs cryoing with upgrade modules + no more mmi laying around after they cryo, and various other runtime fixes
* Fixing conflicts
Co-authored-by: Seris02 <49109742+Seris02@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* Printer Circuit Component (#62012)
I'm adding a circuit component that can print text string on a paper object in a variety of colors and font typefaces (currently only web-safe ones are available, maybe i'll add some fancy ones in the future but they'd need to be imported either through @ import of @ font-face in a separate CSS not imported by every tgui UI).
It's important to note that because the UI sanitizes new text inputed by users and not what's already written on the paper (so the pen_color and pen_font don't be purged in the process), we can't safely have these strings "printed" into the info variable directly, because of that these values will be stored in two new list variables, one for the text and one for font color, face and the signature. When the paper sheet UI is opened, these will be sanitized and then parsed into the text, so the next time the paper is edited we can clear these two lists.
Obviously better than a hacky byond proc - parsemarkdown() is outdated af -, albeit a bit messy... like the rest of paper code.
Requires #62033.
* Printer Circuit Component
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* 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>
* Changes paper bins to be easier to use
Co-authored-by: Superlagg <sprambersonson@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Watermelon914 <37270891+Watermelon914@ users.noreply.github.com>
* 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
* Updates Greyscale Colors of PDAs and Gives QM a Survival Pen since I was in there anyway.
Co-authored-by: EricZilla <81941674+EricZilla@users.noreply.github.com>
* Baton refactor. item/melee/baton is now a subtype of item/melee/baton (formerly classic_baton)
* EEEE
* E
* follow the fucking guidelines
* E
* Update CentCom_skyrat.dmm
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* Pen & Paper Bin minor resprite (#61159)
sprites for thing that didn't have one, and they look better i think probably
* Pen & Paper Bin minor resprite
Co-authored-by: Kokonut <38844529+maxymax13@users.noreply.github.com>
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)
Co-authored-by: EOBGames <58124831+EOBGames@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* 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>
* Clipboard improvements and fixes
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
* photocopier and carbon paper copying now share a common proc. (#60511)
* photocopier and carbon paper copying now share a common proc.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* 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.
* Modifies right click logic so that it is not the same priority as modifier keys.
* a
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* 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.
* Fixes collapsed or burnt paper bins from voiding new papers added
Co-authored-by: Ed640 <Ed.640@hotmail.com>
* Revert "Adds two clown-spection scanners that print clowncrypted reports (#59306) (#6176)"
This reverts commit 91e1aa4fe4.
* Revert "Two Person Mecha for Robotics: The Only Real Solution To An Imminent Geometer Summoning 💪 (#59249) (#6177)"
This reverts commit cf2c1ca19d.
Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Alright, update the changelog and body of the PR, and comment here when that's done.
This should be ready for merge then.
Co-authored-by: interestingusernam3 <51925758+interestingusernam3@users.noreply.github.com>
* Paper bins show the paper inside them (atomised) (#57907)
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Paper bins show the paper inside them (atomised)
Co-authored-by: cacogen <25089914+cacogen@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* 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
* Refactors the paper bin behavior for dragging to pick up into an element
Co-authored-by: spessbro <51048066+spessbro@users.noreply.github.com>
* 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>
* Adds a hotkey that puts you in throw mode aslong as you hold it
* a
Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
* 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 🚀
* Clipboards: tgui and better functionality
Co-authored-by: mozi_h <die-123-321@web.de>
* 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
* Folders: tgui, refactor, qol
Co-authored-by: mozi_h <die-123-321@web.de>
* 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.
* Refactor can_inject, and introduce try_inject
Co-authored-by: Mothblocks <35135081+Jared-Fogle@users.noreply.github.com>
* renames metal sheets to iron sheets
* Merge branch 'master' into upstream-merge-56643
* yay metal
* Update DeltaStation2_skyrat.dmm
* a
* Update CentCom_skyrat_z2.dmm
* a
* a
Co-authored-by: Fikou <piotrbryla@onet.pl>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
* 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.
* Fixing yet another item that can be remotely put in hands with TK.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>