Commit Graph

249 Commits

Author SHA1 Message Date
san7890
a4328ae1f9 Audits tgui_input_text() for length issues (#86741)
Fixes #86784

## About The Pull Request

Although some of the issues found were a direct result from #86692
(c698196766), there was still 40% of
length-related issues that wouldn't be covered anyways that are fixed in
this PR. I.E.:

* Name inputs without `MAX_NAME_LEN`
* Desc inputs without `MAX_DESC_LEN`
* Plaque inputs without `MAX_PLAQUE_LEN`
* Some people just screwed up the arguments so it would prefill
something like "40" in the `default` var because they didn't name their
vars.

To help me audit I added a lot of `max_length` named arguments to help
people understand it better. I think it might be kinder to have a
wrapper that handles adding `MAX_MESSAGE_LEN` in a lot of these cases
but I think there is some reason for a coder to be cognitive about input
texts? Let me know what you think. I didn't update anything
admin-related from what I can recall, let me know if anything needs to
be unlimited again.
## Why It's Good For The Game

The change to `INFINITY` notwithstanding, there were still an abundance
of issues that we needed to check up on. A lot of these are filtered on
down the line but it is clear that there needs to be something to catch
these issues. Maybe we could lint to make `max_length` a mandatory
argument? I don't know if that's necessary at all but I think that the
limit should be set by the invoker due to the wide arrangement of cases
that this proc could be used in.

This could all be a big nothingburger if the aforementioned PR is
reverted but a big chunk of cases fixed in this PR need to be fixed
regardless of that since people could put in 1024 character names for
stuff like guardians (or more now with the change). Consider this
"revert agnostic".
## Changelog
🆑
fix: A lot of instances where you could fill in 1024-character names
(normal limit is 42) have been patched out, along with too-long plaque
names, too-long descriptions, and more.
/🆑
2024-09-20 22:46:41 +00:00
MrMelbert
8486f2f7e2 Storage / table interactions at the bottom of the interaction chain (#85512)
Because the wings were in fact made of wax 

## About The Pull Request

Storage goes to the very bottom of the interaction chain, hardcoded in
on `/atom`.
This is not preferred, obviously, but it ends up being a lot less
snowflaking overall.

Tables also go at the very bottom by extending `base_item_interaction`. 

Fixes #83742
Fixes #84434 
Fixes #83982
Fixes #85516
Fixes #84990
Fixes #84890
Closes #85036
Closes #84025 (RMB places it on the table.)
Closes #86616

Other changes:

Refactored pod storage to be less jank. Patches some exploits around it.

## Why It's Good For The Game

Should make a lot more interactions a lot more reliable... hopefully

## Changelog

🆑 Melbert
refactor: Storage and Tables are now a lower priority action, meaning
some uses of items on storage should work... better, now. Here's hoping
at least, report any oddities.
refactor: Note: For an overwhelming majority of items, **combat mode**
will attempt to attack/insert into the target, while **non-combat-mode**
will attempt to use on a target. This means screwdrivering or emagging a
MODsuit must be done on non-combat-mode, as combat mode will simply put
the screwdriver or emag into its storage. Same applies to tables, though
when in doubt, RMB may help (for things which are also weapons, like
mops).
refactor: Refactored escape pod storage, now they actually properly show
as unlocked on red alert and above.
/🆑
2024-09-12 23:48:19 +02:00
SmArtKar
faf3eb5106 Adds OD's new pragma to lints, fixes all issues it found (#86568)
## About The Pull Request

Closes #86567
Don't think any of these were found/reported or actually could trigger
in-game

## Why It's Good For The Game
Glory to OpenDream

## Changelog
🆑
code: Fixed multiple minor logic issues with code found by OpenDream's
new pragma
/🆑
2024-09-10 10:33:26 +12:00
SmArtKar
ec0ad6af1c Refactors creampies and face paint into a single face_decal component (#86014)
## About The Pull Request

Creamed component has been refactored into a more generic face_decal
component, with pie-unique logic moved to a subtype instead.
Spraypainting someone in the face now uses the new component instead of
modifying their... lipstick.

Closes #83614 by adding monkey and lizard spraypaint sprites, just like
with creampies
Fixes an issue with spraypaint overlay being removed when something is
covering your hair due to how lipstick and beards are rendered.

## Why It's Good For The Game

Easier to use, could be used for more cases.

## Changelog
🆑
refactor: Refactored creampies and spray paint to use the same
component.
sprites: Monkeys and lizards now have their own face spraypaint overlays
/🆑
2024-08-25 20:07:58 -06:00
John Willard
1880003270 Reworks silicon/ai access checking & fixes some ui_act's (#84964)
## About The Pull Request

Currently to check for Silicon access, we do:
``if is silicon or is admin ghost or has unlimited silicon privileges or
has machine remote in hand``
What has unlimited silicon privileges? Bots, Drones, and admin ghosts.
To check for AI access, it just checks for AI instead of silicon, and
doesnt check for unlimited silicon privileges.

This was kinda silly, so I thought I should make this a little easier to
understand.
Now all silicon/ai traits come from ``AI_ACCESS_TRAIT`` or
``SILICON_ACCESS_TRAIT``. I made a single exception to keep Admin ghost,
since now instead of being a var on the client, we moved it to using the
same trait but giving it to the client instead, but since we have to
keep parity with previous functionality (admins can spawn in and not
have this on, it only works while as a ghost), I kept previous checks as
well.

No more type checks, removes a silly var on the mob level and another on
the client.

Now while I was doing this, I found a lot of tgui's ``ui_act`` still
uses ``usr`` and the wrong args, so I fixed those wherever I saw them,
and used a mass replace for the args.

Other changes:

- machinery's ``ui_act`` from
https://github.com/tgstation/tgstation/pull/81250 had ``isAI`` replaced
with ``HAS_AI_ACCESS``, this has been reverted. Machine wands and admin
ghosts no longer get kicked off things not on cameras. This was my
fault, I overlooked this when adding Human AI.
- Human AI's wand gives AI control as long as it's in your hand, you can
swap to your offhand. I hope this doesn't end up going horribly,
otherwise I'll revert this part. It should let human AIs not have their
UI closed on them when swapping to eat food or use their door wand or
whatnot.
- Bots previously had special checks to scan reagents and be
unobservant, I replaced this with giving them the trait. I also fixed an
instance of unobservant not being used, so now statues don't affect the
basic creature, whatever that is.

## Why It's Good For The Game

This is an easier to understand way of handling silicon access and makes
these mobs more consistent between eachother.
Other than what I've mentioned above, this should have no impact on
gameplay itself.

## Changelog

🆑
fix: Statues don't count as eyes to creatures.
fix: Human AIs and Admin ghosts no longer get kicked off of machines
that aren't on cameranets.
/🆑
2024-08-19 10:43:45 +00:00
ArcaneMusic
b857200de9 Adds drawing chalk outlines on dead mobs, white crayons are now called sticks of chalk (#85918)
## About The Pull Request

![image](https://github.com/user-attachments/assets/1c698b33-3cd9-477c-b7a0-4a1ebb009122)
*The Miami Mutilator is at large once again. Thank god we have such
hardboiled detectives as Manny Pardo on the case.*

This pull request allows for players to use white crayons, which have
now been renamed to sticks of chalk, to generate outlines of dead or
"dead" bodies found throughout the station in an attempt to let
detectives actually set up crime scenes as opposed to, more typically,
just causing them.

Players will attempt to draw a chalk outline if the target is a mob and
the mob is dead (or fake-dead), using a single charge of the
crayon/chalk. Also, adds a quick macro so that we can get the proper
left/right orientation of the dead mob for reference.

## Why It's Good For The Game

Detective should have more thematic, simple ways to organize crime
scenes in-round, and what better way to do that then through existing
items and mechanics that we already have. Also, I was 100% shocked to
learn that these have always been white crayons as opposed to sticks of
chalk, which certainly seems odd. In essence, this change doesn't really
let you do anything "new", but just makes it easier and simpler to do so
in a regular round without nearly as much fiddling.

This mechanic exists exclusively within the afterattack of sticks of
chalk as opposed to all crayons for thematic reasons, but I'm not 100%
sold on that and it would be simple to move over to all crayons if
people feel strongly about that.

## Changelog
🆑
add: White crayons (Renamed to Sticks of Chalk) may now be used on dead
bodies to draw a body outline onto the ground easily.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2024-08-18 15:29:56 +02:00
SmArtKar
f5e15535b0 Random spraypaint setting now properly paints large decals (#85917)
## About The Pull Request

Found by Melbert on discord, caused by paint mode not applying when
painting random decals.

## Changelog
🆑
fix: Random spraypaint setting now properly paints large decals
/🆑
2024-08-18 04:22:18 +02:00
grungussuss
6734bcf1a4 Fixed spray can face spraying logic (#85375)
## About The Pull Request
It was only checking for eye protection, since light-sensitives can have
0 or less eye protection even with sunglasses on, this doesn't make
sense.
There is now more redundancy, the same check for blind carbons and
another check for `is_eyes_covered` which takes in account if your eyes
are covered by eyewear or masks.
## Changelog
🆑
fix: spray can face spraying will no longer work on light-sensitives
with eyewear and people wearing eye covering masks
/🆑
2024-07-31 08:30:48 +02:00
carlarctg
bd14e92d04 Converts slapcrafting into a bespoke element (#84226)
## About The Pull Request

Converts slapcrafting into a bespoke element, used to be ac omponent

## Why It's Good For The Game

Noticed this was a big C and realized there was no real reason for that.
It's the same recipe shared across different items.

## Changelog
N/A

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-07-05 22:20:30 +00:00
SmArtKar
99f968345c [NO GBP] Hotfixes spraycans (#84334)
## About The Pull Request

I did an oopsie and forgot that spraycans would inherit can_use_on of
crayons. This should add all valid spraycan uses back.

## Why It's Good For The Game
Closes #84333
2024-06-25 14:05:28 -05:00
SmArtKar
7427fe49df Fixes crayons preventing all atom interactions (#84231)
## About The Pull Request

Crayons always returned ITEM_INTERACT_BLOCKING from their
interact_with_atom, now only doing so when targeting a valid object.
This should allow them to be used on objects once more.

## Why It's Good For The Game

Closes #84229
2024-06-24 16:39:18 -05:00
MrMelbert
ff6b41aa07 Afterattack is dead, long live Afterattack (#83818)
## About The Pull Request

- Afterattack is a very simple proc now: All it does is this, and all
it's used for is for having a convenient place to put effects an item
does after a successful attack (IE, the attack was not blocked)


![image](https://github.com/tgstation/tgstation/assets/51863163/1e70f7be-0990-4827-a60a-0c9dd0e0ee49)

- An overwhelming majority of afterattack implementations have been
moved to `interact_with_atom` or the new `ranged_interact_with_atom`

I have manually tested many of the refactored procs but there was 200+
so it's kinda hard

## Why It's Good For The Game

Afterattack is one of the worst parts of the attack chain, as it
simultaneously serves as a way of doing random interactions NOT AT ALL
related to attacks (despite the name) while ALSO serving as the defacto
way to do a ranged interaction with an item

This means careless coders (most of them) may throw stuff in afterattack
without realizing how wide reaching it is, which causes bugs. By making
two well defined, separate procs for handing adjacent vs ranged
interactions, it becomes WAY WAY WAY more easy to develop for.

If you want to do something when you click on something else and you're
adjacent, use `interact_with_atom`
If you want to do something when you click on something else and you're
not adjacent, use 'ranged_interact_with_atom`

This does result in some instances of boilerplate as shown here:


![image](https://github.com/tgstation/tgstation/assets/51863163/a7e469dd-115e-4e5b-88e0-0c664619c878)

But I think it's acceptable, feel free to oppose if you don't I'm sure
we can think of another solution

~~Additionally it makes it easier to implement swing combat. That's a
bonus I guess~~

## Changelog

🆑 Melbert
refactor: Over 200 item interactions have been refactored to use a
newer, easier-to-use system. Report any oddities with using items on
other objects you may see (such as surgery, reagent containers like cups
and spray bottles, or construction devices), especially using something
at range (such as guns or chisels)
refactor: Item-On-Modsuit interactions have changed slightly. While on
combat mode, you will attempt to "use" the item on the suit instead of
inserting it into the suit's storage. This means being on combat mode
while the suit's panel is open will block you from inserting items
entirely via click (but other methods such as hotkey, clicking on the
storage boxes, and mousedrop will still work).
refactor: The detective's scanner will now be inserted into storage
items if clicked normally, and will scan the storage item if on combat
mode
/🆑
2024-06-11 21:58:09 -07:00
EnterTheJake
ffca5efe81 Fixes spraycan spamming the chat when you hover it. (#82883)
## About The Pull Request
Adds a missing flag that was causing the chat to be spammed when you
were too far away from the spraycan.

## Why It's Good For The Game

Bugfix 

closes: https://github.com/tgstation/tgstation/issues/80880

## Changelog

🆑
fix: Spraycan no longer spams your chat when you mouse over it.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-26 21:54:03 -06:00
MrMelbert
a21742ff60 Adds ALLOW_RESTING to a bunch of items (#82761)
## About The Pull Request

Allows you to alt-click a bunch of items while resting. 

Fixes #82788

## Why It's Good For The Game

Some of these, such as storage, are bugfixes. You shouldn't need to be
standing up to configure a spray can, or change the direction of your
bedsheet

Others are just sensible changes. 

## Changelog

🆑 Melbert
fix: You can open bags with alt click while resting again
qol: Many items which previously required you to stand to alt-click now
don't, such as bedsheets and spray cans
/🆑
2024-04-20 21:30:10 -07:00
Jeremiah
8e3f635b98 Alt click refactor (#82656)
## About The Pull Request
Rewrites how alt click works. 
Based heavily on #82625. What a cool concept, it flows nicely with
#82533.

Fixes #81242 
(tm bugs fixed)
Fixes #82668

<details><summary>More info for devs</summary>

Handy regex used for alt click s&r:
`AltClick\((.*).*\)(\n\t.*\.\.\(\))?`
`click_alt($1)` (yes I am aware this only copies the first arg. there
are no other args!)

### Obj reskins
No reason for obj reskin to check on every single alt click for every
object. It applies to only a few items.
- Moved to obj/item
- Made into signal
- Added screentips

### Ventcrawling
Every single atmospherics machine checked for ventcrawling capability on
alt click despite only 3 objects needing that functionality. This has
been moved down to those individual items.
</details>

## Why It's Good For The Game
For players: 
- Alt clicking should work more logically, not causing double actions
like eject disk and open item window
- Added context menus for reskinnable items
- Removed adjacency restriction on loot panel

For devs:
- Makes alt click interactions easier to work with, no more click chain
nonsense and redundant guard clauses.
- OOP hell reduced
- Pascal Case reduced
- Glorious snake case

## Changelog
🆑
add: The lootpanel now works at range.
add: Screentips for reskinnable items.
fix: Alt click interactions have been refactored, which may lead to
unintentional changes to gameplay. Report any issues, please.
/🆑
2024-04-16 17:48:03 -06:00
John Willard
42c318ba32 [READY] MASSIVE CRAYON BUFF (GAME-CHANGING) (MUST MERGE) (#82638)
## About The Pull Request

You can now type up to 4 letters on a tile at once, one for each corner
of the tile, an ability lost when max interactions was added.

![image](https://github.com/tgstation/tgstation/assets/53777086/9f9a2b80-5777-4490-acee-33e3df2d4c5a)

## Why It's Good For The Game

Currently if you're typing on the floor with a crayon, you either spend
a million years going letter by letter, or do the alternative of typing
every second letter to write on 3 tiles at once, and repeat, which is
stupid that we even have to do that.

## Changelog

🆑
qol: Crayons can now draw up to 4 letters at a time per tile.
/🆑
2024-04-14 17:15:48 -04:00
san7890
c403a6eccc Wraps lowertext() to ensure proper stringification. (#82442)
## About The Pull Request

Fixes #82440

This PR just creates a new macro, `LOWER_TEXT()` (yes the irony is not
lost on me) to wrap around all calls of `lowertext()` and ensure that
whatever we input into that proc will be stringified using the `"[]"`
(or `tostring()` for the nerds) operator. very simple.

I also added a linter to enforce this (and prevent all forms of
regression) because I think that machines should do the menial work and
we shouldn't expect maintainers to remember this, let me know if you
disagree. if there is a time when it should be opted out for some
reason, the linter does respect it if you wrap your input with the
`UNLINT()` function.
2024-04-10 12:19:43 -07:00
Bilbo367
466b3df048 Refactor removing unused defines. (#82115)
## About The Pull Request

Refactors a lot of the unused defines.

## Why It's Good For The Game

Refactors a lot of the unused defines.

## Changelog
Nothing player facing

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-22 21:29:35 -06:00
John Willard
aace5f46f4 You can do more things while floored (#81641)
## About The Pull Request

While on the floor, you can:
- Use the UIs of Atmos machinery (except thermomachine and bluespace gas
vendor), Holopads, Crayons (spray cans too), radios, and Disposal bins
- Close extinguisher cabinets with Right-Click
- Click and drag yourself onto a photocopier to climb onto it.

I also changed all instances of ``ui_status`` to have all the args it's
being passed, I was messing with it a bit but it's gonna be for a later
PR.

## Why It's Good For The Game

It's an extra layer of harmless realism, also nice QoL for people who do
not have functional legs and do not have a wheelchair.

## Changelog

🆑
qol: You can use atmos machines, holopads, crayons, spray cans, and
disposal bins while floored.
fix: You can close extinguisher cabinets while floored.
fix: You can climb onto a photocopier from the floor.
/🆑
2024-02-26 18:34:20 +01:00
MrMelbert
12afcb911e Comprehensive cleanup of storage datum, replaces the weakrefs with just refs (because they were managed already) (#81120)
## About The Pull Request

- Large amount of storage datum cleanup.
   - Documentation.
   - Maybe more consistent use of parent vs real_location. 
   - Removes the weakrefs, replaces it with just references.
      - These were already managed references anyways so why bother?
- Removes a bunch of arguments no one used and would ever used so only
the most useful args are left.
 
- Some bugfixes. 

## Why It's Good For The Game

Aiming to make storage easier to work with. The whole intent of this was
to bugfix the whole "weight class" thing that keeps popping up but I had
to do this first.

## Changelog

🆑 Melbert
fix: When placing an item into storage (such as backpacks), all nearby
mobs now get a message, rather than just the first mob.
fix: TGC decks of cards should act a bit less odd when looking inside.  
refactor: Refactored a bit of storage, cleaned up a fair bit of its
code. Let me know if you notice anything funky about storage (like
backpacks).
/🆑
2024-02-05 11:42:03 -08:00
Tim
74375cb84f Add 50% graffiti speed boost to tagger quirk (#80567)
## About The Pull Request

This gives the tagger quirk a 50% speed boost when drawing graffiti.
There was also some unused variable intended to make large graffiti more
time consuming that is now fixed.

## Why It's Good For The Game

It'd be nice to be able to spraypaint messages on the floor quicker.
Especially if you are doing a gimmick that requires making a shop sign
using letters.

## Changelog

🆑
add: Add 50% graffiti speed boost to tagger quirk
fix: Fix time duration of large graffiti not applying properly
/🆑
2023-12-28 15:13:15 +01:00
Tim
5fca80e59e Add UI screentips to spraycans (#80564)
## About The Pull Request

This adds screentips to spraycans for:

- AltClick - toggle cap
- RMB - copy
- LMB - paint

## Why It's Good For The Game

Better UI/UX.

## Changelog

🆑
qol: Add UI screentips to spraycans
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-12-26 20:33:10 +01:00
Profakos
6233e8db5c Fixes the check for borg limb repainting (#79930)
## About The Pull Request

The check for a successful augmented limb repainting was using the proc
incorrectly. Instead of checking for TRUE or FALSE, it tried to see if
the returned value was exactly 5 or not. This PR fixes that.

## Why It's Good For The Game

My augmented arms crave fashion.

Fixes: #77429

## Changelog

🆑
fix: You can once again repaint robotic limbs to use alternate skins
/🆑
2023-11-26 17:41:15 +01:00
Andrew
6fefc9ce0e Pipe painting, spraycan preset colors (#79521)
![dreamseeker_AZs0erdnrs](https://github.com/tgstation/tgstation/assets/3625094/06a12d22-387b-4a33-8b61-59bbe3495c82)

## About The Pull Request

Made pipe painter properly paint pipe colors, work on pipe items, and
added the same functionality to regular spraycans.

Spraycans now have the color presets in UI for easier selection of the
valid pipe colors.

## Why It's Good For The Game

Bug fixing is good.
It was weird that spraycans couldn't paint pipes, but some other device
could.
Also custom spraycan color is too clunky, presets are nice for quick
spraycan color selection.

## Changelog

🆑
fix: fixed pipe painter not applying pipe color properly
qol: made spraycans work also as pipe painters
qol: spraycans now have basic color presets for quick selection
/🆑
2023-11-13 13:58:32 +01:00
MrMelbert
93ec5a72f7 A comprehensive refactor / cleanup of bullet_hit and on_hit to cut out a single bad species / mob proc (#79024)
## About The Pull Request

- Refactored `bullet_act`. Adds `should_call_parent` and refactors
associated children to support that.
   - Fixes silicons sparking off when hit by disabler fire. 
- Desnowflakes firing range target integrity and cleans up its
bullet-hole code a bit.
- Cleans up changeling tentacle code a fair bit and fixes it not taking
off throw mode if you fail to catch something.
   - The Sleeping Carp deflection is now signalized 
- Nightmare projectile dodging is now signalized and sourced from the
Nightmare's brain rather than species
- Refactored how cardboard cutouts get knocked over to be less
snowflaked / use integrity
- Also adds projectile `on_hit` `should_call_parent` and cleans up a bit
of that, particularly their arguments.
- On hit arguments were passed wrong this entire time, it's a good thing
nothing relied on that.

## Why It's Good For The Game

This is cringe. 


1863eb2cd8/code/modules/mob/living/carbon/human/_species.dm (L1430-L1442)

Bullets should overall act more consistent across mob types and objects.

## Changelog

🆑 Melbert
fix: Silicons don't spark when shot by disablers
fix: Changelings who fail to catch something with a tencacle will have
throw mode disabled automatically
fix: Fixes occasions where you can reflect with Sleeping Carp when you
shouldn't be able to
fix: Fixes some projectiles causing like 20x less eye blur than they
should be
refactor: Refactored bullet-mob interactions
refactor: Nightmare "shadow dodge" projectile ability is now sourced
from their brain
/🆑
2023-10-18 23:08:13 -06:00
carlarctg
8d57758420 Converts slapcrafting into a component (#78450)
## About The Pull Request

Converts slapcrafting into a component!

The component is added on to an ingredient (presumably the main
ingredient) with a list of recipes attached. If you interact an
ingredient (if no ignredients, a tool) with it, you will start crafting
the recipe. If there's multiple, pick between them with a radial menu.

Opening on draft as there's just a liiiiil bit left to do. The actual
wired rod was left for last.

## Why It's Good For The Game

Slapcrafting is simply better and more accessible and less laggy than
menu crafting. By making it a component we can attach it to things in
which it'd make sense to while stopping unintended weirdness that might
arise from this being global.

Additionally the way examine lets you see crafting recipes opens up
visibility for those, which allows new players to learn about them in a
intuitive manner.

## Changelog

🆑
refactor: Turned slapcrafting into a component! You can examine
compatible items to see what recipes they can be used in, and what the
ingredients for them are. For example, spears and the head-on-spear
crafting recipe.
/🆑
2023-09-27 12:38:10 +01:00
Bloop
69f51c6c65 Fixes typo 'transfered', olive oil reaction repath (#78064)
## About The Pull Request

Transferred.

## Why It's Good For The Game

How did this get to be in 71 files?! This bothers me.

Also changes 'quality_oil' typepath in the reactions to 'olive_oil' to
match its rename post-foodening.

## Changelog
N/A
2023-09-02 18:23:18 +01:00
carlarctg
1e27ce031b Syndicate Duffelbag Rerework (#77060)
## About The Pull Request

Syndicate duffelbags can fit 2 extra bulky items, down from three.

Reduced syndicate duffelbag's unzipped slowdown from '1' to '0.3', and
set its zipping-up sped to 0.5, same as unzipping.

Added the following items to the Syndicate Duffelbag bulky exception
list: Greentext, mech removal tool, gibtonite, skub, golem shells, mech
ammo. Roughly sorted the list by item category.

Fixed the syndie surgery duffelbag having more items than it can hold by
removing the redundant surgical drill (Upgraded cauteries can turn into
one anyways)

Any storage item with a can_hold description can be examined twice to
see what it can hold now.

## Why It's Good For The Game

> Syndicate duffelbags can fit 2 extra bulky items, down from three.

> Reduced syndicate duffelbag's unzipped slowdown from '1' to '0.3', and
set its zipping-up sped to 0.5, same as unzipping.

For most intents and purposes, it seems the syndicate duffelbag has gone
from 'bland upgrade to backpack', to 'useless'. This is especially made
apparent because it isn't exactly shown to the player that these
duffelbags can carry bulky items (I didn't even know about it until I
was making this PR!)

The extra bulky item hold concept is great, but I have my issues with
the item as-is that I seek to fix with this PR. There are TONS of issues
with being unable to access your bag quickly, which is twice as relevant
when your bag is an incredibly conspicious traitor item. Sure, you can
have it in your hand, but then why even have it in the first place?

That's why I want to reduce the slowdown significantly. '1' slowdowns
are thrown around the whole game like they're reasonable (galoshes,
water back-tanks, biosuits) - they aren't. '1' slowdown is CRIPPLING. It
makes you frustratingly slow and effectively destroys any combat
maneuvering you can do. This is very relevant for a traitorious item.

The zip speed helps one use the duffelbag as a storage item dynamically,
letting the item be an actual trade-off rather than mostly a downside.
Gives you a reason to use it rather than just buying a smuggler satchel
for more storage.

Of course these are some hefty buffs, so I lowered the bulky storage to
make up for it. I can bring it back up to 3 if wanted.

> Added the following items to the Syndicate Duffelbag bulky exception
list: Greentext, mech removal tool, gibtonite, skub, golem shells, mech
ammo. Roughly sorted the list by item category.

Some traitorious items that felt like they should be allowed in.
Honestly, I think this shouldn't even be an exception hold except for
blacklisting clearly bonkers things like backpacks, but whatevs.

> Any storage item with a can_hold description can be examined twice to
see what it can hold now.

Generalization is awesome. Hardcoding is cringe!

## Changelog

🆑
balance: Syndicate duffelbags can fit 2 extra bulky items, down from
three.
balance: Reduced syndicate duffelbag's unzipped slowdown from '1' to
'0.3', and set its zipping-up sped to 0.5, same as unzipping.
add: Added the following items to the Syndicate Duffelbag bulky
exception list: Greentext, mech removal tool, gibtonite, skub, golem
shells, mech ammo. Roughly sorted the list by item category.
fix: Fixed the syndie surgery duffelbag having more items than it can
hold by removing the redundant surgical drill (Upgraded cauteries can
turn into one anyways)
qol: Any storage item with a can_hold description can be examined twice
to see what it can hold now.
fix: The parent crayon's name is 'crayon' to prevent any weirdness with
things that show the parent type's name.
/🆑
2023-07-26 17:43:22 +01:00
Helg2
5237777a07 [NO GBP] Crayon fixes (#76620)
## About The Pull Request
I left `bite_consumption` be `charges / 5` which led to -1 being
depleted on 5 and not giving any reagents on bite.
Also i somehow managed to change the total volume of crayons from 50 to
30 for usual ones and 100 for infinite. I'm a bit confused if number 50
was intended even. I tested it on the older branch and it was 30 and
100, so i dunno.
`override_infinity` is used just so you can't infinitely chew infinite
crayons.
## Why It's Good For The Game
Stuff should work like intended.
## Changelog
🆑
fix: eating mime's and rainbow crayons now properly transfers reagents.
fix: I somehow fixed the amount of reagents in crayons to what it was
before.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-07-12 17:26:19 +01:00
Helg2
de59a61b6b Some crayons fixes and minor changes. (#76468)
## About The Pull Request
- Defined crayon colors because why not.
- Fixed suicide with crayons not coloring you.
- Made it properly? edible.
- "empty" balloon alert now only appears on empty spraycans.
- Remade attackby restrictions for mime's and rainbow crayons to
`set_holdable` but without balloon alerts sadly. I don't quite know how
to make it.
## Why It's Good For The Game
Crayon burgers.
## Changelog
🆑
fix: Crayon suicide now properly colors you.
fix: You can't put spraycans in crayon box via opening it and putting
directly in slot as intended, but balloon alerts for mime's and rainbow
crayons are gone.
qol: "empty" balloon alert no longer appears on crayons.
qol: You can make crayon burgers now.
/🆑
2023-07-02 20:24:41 +02:00
Sealed101
1c60848edb Removes poseur tag graffiti (it's been dead for ~6 years Edition) (#75689)
## About The Pull Request
The _poseur tag_ graffiti option was not removed in the gang gamemode
removal back in #30056. Back then it would have chosen one of the gangs'
tags to mimic. Now, if selected, it will create an empty graffiti. This
will also apply to any mapped/generated graffiti. This sucks and this
derailed me from my other thing I was doing in the crayons.dm vicinity.

## Why It's Good For The Game
Removes a 6-year-old non-functioning graffiti option.

## Changelog
🆑
fix: exorcised a ghost of the gang gamemode from graffiti
/🆑
2023-05-28 12:31:05 -06:00
MrMelbert
720434df77 Fixes being unable to spraypaint (#75635)
## About The Pull Request

`.atom_colours[atom_colours]` seems like a copy paste error.

I assume it was either intending to check for same color, or check
washable color for same color. So I put in both

## Changelog

🆑 Melbert
fix: Fixed being unable to spraypaint things
/🆑
2023-05-25 18:08:23 -06:00
Ghom
e1052fc62a Massive Spraycan and Crayon Powercreep: smaller graffiti cost less to draw. (#75588)
## About The Pull Request
Currently, drawing a small circle on the floor consumes as much charge
as any other drawable but the larger horizontal ones that cost five
times as much, which is a bit dull for non-cyborg players, having to
burn through a ton of spraycans just to cover the floor in several small
dots if ever attempting to do some floor art.

This PR aims to reduce the cost of some of the smaller drawables, like
"shortline", "smallbrush", "pawprints" etc., in virtue of the smaller
area they cover. The balances changes may seem bit of an arbitrary and
not include ones that are a bit on the edge between "small" and not
"small", but I'd rather keep it simple than have other values such like
"semi-small" integrated and snowball this balance PR into a more
finnicky, disputable or not agreeable with version of itself.

This also covers re-coloring and existent graffiti. Currently it always
costs 2 charges to change its color regardless if it costed 1 or 5 to
spray in the first place. With this PR, the costs should match that of
when they were drawn. To boot, It also takes into account the tagger
quirk now.

Code had to be cleaned up and improved a bit for a smoother
implementation of these changes.
A fairly unrelated but small change: Trying to suicide with an empty
spraycan will now fail, because it's empty. It's that simple.

## Why It's Good For The Game
Enables non-cyborg players to engage in jolly floor-vandalizing-art in a
more consistent, slightly more enjoyable way.

## Changelog

🆑
balance: Drawing small graffiti like paw/foot/claw prints, small brush
dots and short lines should cost half as many charges off your spraycan
or crayon.
balance: The cost of recoloring graffiti decals is now consistent with
that of drawing them.
balance: Trying to suicide with an empty spraycan will now fail, because
it's empty. It's just that simple.
/🆑
2023-05-24 12:06:33 -06:00
Ghom
6e5ae1cc24 Fixing a few minor maintenance hindrances. (#75594)
## About The Pull Request
See the title and relative issue reports mentioned in the section below.

## Why It's Good For The Game
Closes #75461, closes  #75462, closes #75467.

## Changelog

🆑
fix: Capturing CTF control points no longer requires the active hand to
be empty.
/🆑
2023-05-23 16:51:36 -06:00
ArcaneMusic
f2fd69a49a Minerals have been refactored so costs and minerals in items are now in terms of mineral defines. (#75052)
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you
all here (through the automatic reviewer request system). So, mineral
balance! Mineral balance is less a balance and more of a nervous white
dude juggling spinning plates on a high-wire on his first day. The fact
it hasn't failed after going on this long is a miracle in and of itself.

This PR does not change mineral balance. What this does is moves over
every individual cost, both in crafting recipes attached to an object
over to a define based system. We have 3 defines:

`sheet_material_amount=2000` . Stock standard mineral sheet. This being
our central mineral unit, this is used for all costs 2000+.
`half_sheet_material_amount=1000` . Same as above, but using iron rods
as our inbetween for costs of 1000-1999.
`small_material_amount=100` . This hits 1-999. This covers... a
startlingly large amount of the codebase. It's feast or famine out here
in terms of mineral costs as a result, items are either sheets upon
sheets, or some fraction of small mats.

Shout out to riot darts for being the worst material cost in the game. I
will not elaborate.

Regardless, this has no functional change, but it sets the groundwork
for making future changes to material costs much, MUCH easier, and moves
over to a single, standardized set of units to help enforce coding
standards on new items, and will bring up lots of uncomfortable balance
questions down the line.

For now though, this serves as some rough boundaries on how items costs
are related, and will make adjusting these values easier going forward.

Except for foam darts.

I did round up foam darts.

Adjusting mineral balance on the macro scale will be as simple as
changing the aforementioned mineral defines, where the alternative is a
rats nest of magic number defines. ~~No seriously, 11.25 iron for a foam
dart are you kidding me what is the POINT WHY NOT JUST MAKE IT 11~~

Items individual numbers have not been adjusted yet, but we can
standardize how the conversation can be held and actually GET SOMEWHERE
on material balance as opposed to throwing our hands up or ignoring it
for another 10 years.
2023-05-03 14:44:51 +00:00
san7890
ccef887efe Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR
TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW
RATHER THAN AFTER THE FACT.

## About The Pull Request

Hey there,

This took a while to do, but here's the gist:

Python file now regexes every file in `/code` except for those that have
some valid reason to be tacking on more global defines. Some of those
reasons are simply just that I don't have the time right now (doing what
you see in this PR took a few hours) to refactor and parse what should
belong and what should be thrown out. For the time being though, this PR
will at least _halt_ people making the mistake of not `#undef`ing any
files they `#define` "locally", or within the scope of a file.

Most people forget to do this and this leads to a lot of mess later on
due to how many variables can be unmanaged on the global level. I've
made this mistake, you've made this mistake, it's a common thing. Let's
automatically check for it so it can be fixed no-stress.

Scenarios this PR corrects:

* Forgetting to undef a define but undeffing others.
* Not undeffing any defines in your file.
* Earmarking a define as a "file local" define, but not defining it.
* Having a define be a "file local" define, but having it be used
elsewhere.
* Having a "local" define not even be in the file that it only shows up
in.
* Having a completely unused define*

(* I kept some of these because they seemed important... Others were
junked.)
## Why It's Good For The Game

If you wanna use it across multiple files, no reason to not make it a
global define (maybe there's a few reasons but let's assume that this is
the 95% case).

Let me know if you don't like how I re-arranged some of the defines and
how you'd rather see it be implemented, and I'd be happy to do that.
This was mostly just "eh does it need it or not" sorta stuff.

I used a pretty cool way to detect if we should use the standardized
GitHub "error" output, you can see the results of that here
https://github.com/san7890/bruhstation/actions/runs/4549766579/jobs/8022186846#step:7:792
## Changelog
Nothing that really concerns players.

(I fixed up all this stuff using vscode, no regexes beyond what you see
in the python script. sorry downstreams)
2023-03-29 10:17:03 -07:00
Jacquerel
e5a576ed99 Restores Slippery Spraycan (and Hellcan) (#73578)
## About The Pull Request

Fixes #53350
This has been broken for a loooong time.
The spraycan was _transferring_ reagents into turfs, which have no
reagent holders, rather than exposing them.
However we actually don't _want_ to expose the turf to the reagents most
of the time because most of the time that reagent is "paint", so I just
added a var for the two specific spraycans which do.
The lube spraycan will now once again render any tile you paint onto
slippery.
I also fixed the (admin only?) hellcan, which was broken for the same
reason, which just creates fire in any tile you click on. As the hellcan
cannot actually paint, it also won't open the "pick something to paint"
menu when used inhand.

While I was in there I did a little bit of housekeeping. As always with
stuff this old it definitely needs more than I did, but hopefully it's a
little cleaner in there at least.

## Why It's Good For The Game

The slippery spraycan promises slippery paintings and doesn't deliver,
which is very sad. Now it does what it says it does.

## Changelog

🆑
fix: Painting with the slippery spraycan will now once again correctly
make that tile slippery.
fix: Spraying the ground with the hellcan will now once again correctly
set that tile, you, and other surrounding objects on fire.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-02-25 01:27:06 +00:00
Tim
a1ada2c9ef Refactor, improve, and rename canUseTopic to be can_perform_action (#73434)
This builds on what #69790 did and improved the code even further.
Notable things:
- `Topic()` is a deprecated proc in our codebase (replaced with
Javascript tgui) so it makes sense to rename `canUseTopic` to
`can_perform_action` which is more straightforward in what it does.
- Positional and named arguments have been converted into a easier to
use `action_bitflag`
- The bitflags adds some new checks you can use like: `NEED_GRAVITY |
NEED_LITERACY | NEED_LIGHT` when you want to perform an action.
- Redundant, duplicate, or dead code has been removed.
- Fixes several runtimes where `canUseTopic` was being called without a
proper target (IV drips, gibber, food processor)
- Better documentation for the proc and bitflags with examples
2023-02-16 20:22:14 -05:00
MrMelbert
c3a1f21c1a Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind (#72267)
## About The Pull Request

- Nearsighted is now a grouped status effect.
- Blindness is now a grouped status effect.
   - Eye handling of blindness has improved. 
- When eyes are removed, they now cause you to become blind, rather than
handling it in `update_tint`.
- Being ahealed no longer blinds you for one tick, meaning that black
overlay on aheal is gone.
- Temporary Blindness is now a status effect.
- Both Nearsightedness and Blindness have been exorcised from mob vars
and life chains. This means that we've finally cut 2 procs from life,
`handle_status_effect` and `handle_traits`, and moved both to event
based processing. Wooo optimizations.
- Swapped pacifism status effect to use apply and set helpers. 
- Removed an unused admin toggle that disabled welding helmet tint but
also tint from every clothing item and also blindness from losing your
eyes.
- Clothes now generally all blind their mob more consistently.
- Oculine, eye surgery, and sensory restoration are now no longer the
only way to fix blindness from eye damage. If your eyes are healed
through any other means, it will also heal your blindness.
- Some things that made you blind, such as ling blind sting, no longer
just flat made you blind from eye damage forever. They now cause eye
damage directly, which in turn makes you blind from eye damage, as
expected.
- Pacifists can't eyestab anymore. Eyestabs now have a limit on the
amount of blur applied.
- Refactored some `is_x_covered` procs to accept flags rather than have
a lot of arguments for some silly reason.
- Unit tests for blindness. 

## Why It's Good For The Game

Blindness was exceptionally poorly handled prior, primarily due to the
fact that it was tied to the mob instead of separated out

On top of that the system put a LOT of faith in proper handling of
blindness on the coder's end which was misplaced evidently. Many places
didn't update or handle blindness correctly, or just let people
perma-blind.

Deferring it to a status effect improves this a lot

## Changelog

🆑 Melbert
refactor: Refactored blindness and nearsightedness. Important to note is
that all mobs are naturally blind until their eyes are actually created.
refactor: Refactored "is covered" procs
fix: Less sources of blindness now cause permanent blindness. Includes
the "Blind" Spell and "Blind Sting" from changelings.
admin: Ahealing someone no longer flashes the blind overlay for 1 tick.
admin: I removed an unused (sort of) inaccessible admin verb that
allowed you to toggle the tint from all welding helmets (and clothing)
(and lack of eyes) in existence, let me know if you want similar back
balance: Changeling "Blind Sting" now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Visionloss virus symptom now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Oculine has been reworked slightly. Prior, Oculine arbitrarily
healed blindness and nearsightedness from eye damage reagrdless of how
damaged the eyes were, and applied blur on success. Now, Oculine just
heals eye damage, and blindness / nearsightedness is restored in the
process. There is now a probability every tick that eye blur is applied
based on how pure the oculine is while healing very damaged eyes.
balance: Pacifists can no longer eyestab.
balance: Any clothing item that covers your eyes contributes to getting
the bonus while sleeping, and to removing temporary blindness faster
/🆑
2023-01-15 23:01:40 -08:00
Mothblocks
f54dcda1c0 afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item (#72320)
Necessary for #72292 to work effectively, and probably not very useful
out of that context. Split out of its own PR because this is long and
boring.

I want to make sure that we're catching actual mistakes there, and not
just experiencing side effects of how shitty the attack chain is.
2023-01-04 21:10:41 -08:00
MrMelbert
0d4b56435b Converts drowsy and eye blur to status effects, striking yet another two carbon level status vars (#71950)
## About The Pull Request

You know the deal by now.

- Drowsiness is now tracked via status effect.
- Eye blue is now tracked via status effect.

In converting these over, cleaned up a bit of code relating to some
other effects. Attempts to unify behavior between some of them, namely
certain biotypes or mob types shouldn't be experiencing certain effects.

## Why It's Good For The Game

More stuff moved to status effects, slightly more cleaner and better to
work with code. Allows for all mobs that can sleep to be able to get
drowsy, too.

## Changelog

🆑 Melbert
refactor: Drowsiness and Blurred Eyes are now tracked via status effect.
/🆑
2022-12-26 19:58:21 +01:00
tattle
ad5debaaa1 Add investigate_deaths (#71112)
## About The Pull Request
Adds INVESTIGATE_DEATHS, an investigate category intended to better show
causes of death.


![image](https://user-images.githubusercontent.com/66640614/200142461-c17b5e51-1116-4eef-bbfb-49bc024c0953.png)


![image](https://user-images.githubusercontent.com/66640614/200147306-09bef76e-68c6-4f0a-bdf9-0211eb274e66.png)

Also makes suicide_act take a `mob/living` as an argument instead of a
`mob`, and some minor style improvements since apparently I hate
atomicity.

## Why It's Good For The Game
Inspired by a mysterious death and dusting. More logging and leads for
admins investigating deaths.

Also fixes #59028

## Changelog
🆑 Tattle
admin: added investigate deaths to shed some more light on unusual
demises, dustings, and gibbings
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2022-11-07 16:22:37 -08:00
MrMelbert
d5fe3e44de Categorizes the Good Clean Fun Vendor (#70742)
About The Pull Request
    Categorizes the Good Clean Fun vendor into a few different categories (art, toys, cards, other)
    In doing this, puts the custom prices on a few items instead of relying on the vendor premium price, to make use of the categories

Why It's Good For The Game
Good Clean Fun Vendor is a long list of random crap, so this helps a bit.

🆑 Melbert
qol: Good Clean Fun Vendor is categorized.
/🆑
2022-10-30 19:57:12 -07:00
John Willard
91f02f2a6b canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE (#69790)
* canUseTopic now uses TRUE/FALSE instead of defines that just say TRUE

The most idiotic thing I've seen is canUseTopic's defines, they literally just define TRUE, you can use it however you want, it doesn't matter, it just means TRUE. You can mix and match the args and it will set that arg to true, despite the name.

It's so idiotic I decided to remove it, so now I can reclaim a little bit of my sanity.
2022-10-01 09:47:52 -07:00
Kapu1178
ab6dcbf4ca Virtual Limbsanity (#69841)
* virtual limbsanity

* remove old file

* indent fail

* dumbassery cleanup

* unlint + tweak

* stop coding while high

* internal screaming

* kill another species dependancy

* make sure it has a default

* makes the unit test actually work

* fix monkeys
2022-09-21 20:07:10 -07:00
Arturlang
2be5bc531d Removes-blind_eyes (#69652)
* Removes blind_eyes, replaces it with adjust_blindness.
2022-09-04 16:05:10 -04:00
tattle
d91390a447 [IDB IGNORE] The Great Sweep: Moving dmis into subfolders (part 1) (#69416)
Moves singulo and supermatter dmis into obj/engine, renamed from obj/tesla_engine
Moves Halloween, Christmas, and misc holiday items to obj/holiday
Moves lollipops to obj/food
Moves crates, closets, and storage to obj/storage
Moves assemblies to obj/assemblies
Renames decals.dmi to signs.dmi ...because they're signs and not decals
Moves statues, cutouts, instruments, art supplies, and crayons to obj/art
Moves balloons, plushes, toys, cards, dice, the hourglass, and TCG to obj/toys
Moves guns, swords, shields to obj/weapons
2022-08-24 20:49:35 -03:00
Seth Scherer
f1a363c825 Converts a shitload of istypes to their more concise macros (#69260)
* Converts a lot of istypes() to use their istype macro helpers.
2022-08-18 22:08:44 -04:00
Kapu1178
2eccf3cea0 Cleans up update_icons, makes the update_icon_updates_onmob element bespoke, updates CODEOWNERS (#69179)
* I just realised this is all one commit.

* hail marry

* fix.

* FIXES IT FOR REAL

* Update code/datums/elements/update_icon_updates_onmob.dm
2022-08-16 13:50:21 -04:00
Timberpoes
786ac5c855 [MDB Ignore][Bounty][Complete Refactor] Papercode Redux: Too Many Damn Files <Map Conflict Edition> (#68612)
Papercode refactor
2022-08-02 19:27:42 +02:00