The Canvas UI now shows a grid while the user is painting. (#75604)
A grid is shown while the user is holding a painting tool on an editable
canvas. This is achieved by drawing empty rectangles after the filled
ones are placed whenever the canvas is updated and if requirements are
met.
It's by no mean perfect, especially since the strokeStyle is a mere
"#888888" hexcolor, the contrast may get low around colors of similar
lightness. But I don't think I've much the strength to seek out a
fancier solution to a peeve that's hardly a botherance anyway while the
canvas is still mostly white.
I've also had a maintainer suggest me to make a toggle to
disable/enable. I talked a bit how that'd be a bit more complex to
integrate but not much so frankly, although switching hands or putting
away the tool already works for that. That said, I'm willing to do it if
player feedback suggests such toggle should be integrated.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Adds a eye-dropper right-click function to the painting canvas. (#75571)
## About The Pull Request
Having used the painting UI to kill some time during long rounds for a
decent chunk of the past year, the need of a quicker and less tedious
way to fix a misclick or mistake like drawing over the wrong pixel has
become clear to me, as well as getting some feedback on the palette
component I made last year.
As the title suggests, this PR adds an eye-dropper function to the
canvas. Right-Click a pixel on the canvas, and the painting tool will
copy its color. Simple as, works on both finished and unfinished
paintings.
As a bonus, you can also right-click one of those selectable
white/colored squares on the color scheme near the bottom of the UI (if
using spraycan/palette) to change its color without having to go back to
main game window and a radial menu.
EDIT: With the tooltip added to the UI, I can say it's ready.
## Why It's Good For The Game
This PR aims to add better options to change colors on the go and
improve the user experience on the painting UI.
## Changelog
🆑
qol: Adds a eye-dropper-like right-click function to the painting canvas
UI. Right-Click a pixel on the canvas while holding a painting tool to
have it copy its color.
qol: Also adds a right-click function to the color palette at the bottom
of the UI to allow users to set its colors without having to alternate
between the game window and the UI.
qol: Lastly, a tooltip has been added near the top-left corner of the
same UI to let players know of these features.
/🆑
* Adds a eye-dropper right-click function to the painting canvas.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Fixes 'Paintings leaving their frames #74707' (#75558)
## About The Pull Request
See the title and the relative bug report. Yes, this is a webedit.
The relative lines were removed by #74538. The author of that PR had
apparently read the typepath wrong and therefore thought it was
redundant (they were adding the TRAIT_KEEP_TOGETHER to canvases).
## Why It's Good For The Game
This will close#74707. Bugfix.
## Changelog
🆑
fix: Fixed large paintings looking pretty off while flipped E/W.
/🆑
* Fixes 'Paintings leaving their frames #74707'
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Makes a whole bunch of wooden objects flammable (#74827)
## About The Pull Request
This whole PR started because I realized that baseball bats are not
actually flammable which I found weird, then I looked at a whole bunch
of other stuff that really should be flammable but also isn't.
## Why It's Good For The Game
Makes wooden objects behave slightly more consistently? Honestly, most
of these seem like oversights to me.
## Changelog
🆑
balance: The following structures are now flammable: Picture frame,
fermenting barrel, drying rack, sandals, painting frames, paintings,
spirit board, notice board, dresser, displaycase chassis, wooden
barricade
balance: The following items are now flammable: Baseball bat, rolling
pin, mortar, coffee condiments display, sandals, wooden hatchet, gohei,
popsicle stick, rifle stock
/🆑
* Makes a whole bunch of wooden objects flammable
---------
Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
* Fixed Normal sized paintings not appearing on the ground (#74538)
* Fixed Normal sized paintings not appearing on the ground
---------
Co-authored-by: Squishy <linkoisin@gmail.com>
* Painting don't get finalized when naming is cancelled. (#74178)
* Painting don't get finalized when naming is cancelled.
---------
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Buff scythes, goats, and plantbgone vs PLANT biotypes (#72889)
This buffs scythes, goats, and plantbgone vs PLANT biotypes:
- Scythes now deal x1.5 damage to venus flytraps (3 hits to kill)
- Scythes now target the flower bud vines
- Goats now target flower bud vines and deal 15 damage to PLANT biotypes
- Goats have a eating sound whenever they bite PLANT biotypes
- Plantbgone now does 2 dmg per unit to PLANT biotypes (10 dmg per
spray)
- Plantbgone now has a 75% chance to remove weeds and deals large damage
to flower buds
- Weed control crates now come with a pair of leather gloves
- Golems are immune to thorn effects
- Any kind of thick glove material will prevent thorn effects when
attacking
- Flower buds will now take x4 damage from fire and sharp weapons
(unless they have fire trait)
- Regular scythes are now a sharp object
Also this fixes a few runtimes with spacevines and nulls. The bane
element now accepts `mob_biotypes` bitflags as an argument.
Before my changes:
- Plant-b-gone was doing 0.4 dmg per unit to PLANT biotypes (2 dmg per
spray)
- Scythes took 5 hits to kill venus flytraps
- Goats only affected podpeople
- Flower bud vines were being ignored by weed killing code
- Plantbgone only had a 50% chance to remove weeds (and this was very
inconsistent due to RNG)
- Botanical gloves and thick gloves didn't protect from thorns
- Golems were getting pierced by thorns despite having pierce immunity
- Flower buds were not taking the x4 damage like they should have been
- Regular scythes were not a sharp object, but other scythes
(chaplain's, megafauna loot) were sharp
This makes the weed killer crate more effective since people were
complaining about it being worthless vs vines and flower buds. These
changes give people more options to respond to threats vs plants.
🆑
add: Add a pair of leather gloves to weed control crate
balance: Mobs with the PLANT biotypes (venus flytraps, pod people,
killer tomatoes) are now much weaker vs scythes, goats, and plantbgone.
balance: Plantbgone is now more effective at destroying weeds.
balance: Regular scythes are now a sharp object
fix: Fixed scythes, goats, and plantbgone not affecting flower bud
vines.
fix: Thick and botanical gloves not protecting from thorns
fix: Golems not having pierce immunity from thorns
fix: Runtime where vines tried to spread into null turf
fix: Runtime where null vines that were destroyed were trying to spread
to nearby turfs
soundadd: Add eat food sound when goats eat plants
code: Improved goat targeting code
code: The bane element now accepts `mob_biotypes` bitflags as an
argument.
/🆑
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
Chisel and Statue Improvements (#72638)
## About The Pull Request
Resolves#72607Resolves#65701
Chisels and statues had quite a few bugs and they lacked any kind of
feedback system to inform the user on it's proper usage. My improvements
do the following:
- Chisels now give balloon alerts when selecting a target, cancelling,
or sculpting
- Chisels used on carving blocks that were interrupted will now continue
- Fixed abstract statues not letting people use the radial menu
- Fixed chisel targets to have no range requirement (so you can use
binoculars, cameras, etc.)
- Refactor a lot of the chisel and statue code to be more robust
- Add sculpting sounds when chisels are used on carving blocks
## Why It's Good For The Game
Less bugs and now people can now sculpt easier.
## Changelog
🆑
soundadd: Chisels now make sculpting sounds when used on carving blocks
qol: Chisels now give balloon alerts when selecting a target,
cancelling, or sculpting
qol: Chisels used on carving blocks that were interrupted will now
continue
fix: Fix chisel targets to have no range requirement (so you can use
binoculars, cameras, etc.)
fix: Fix standard mineral blocks (uranium, diamond, plasma, etc.) not
letting people use the radial menu to craft abstract statues properly.
This does not work with custom mineral blocks. (pizza, glass, etc.)
code: Change chisel and statue code to be more readable
/🆑
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
* fixes chisels (#72632)
## About The Pull Request
chisels used to only work when clicking on away stuff
mothblocks broke them and made them only work on close stuff
fixes that
## Why It's Good For The Game
yippe
## Changelog
🆑
qol: fixes chisels
/🆑
* fixes chisels
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
* Adds a helper for base_pixel sets in typepaths that ensures the offset is autoapplied to pixel_x/y (#72309)
## About The Pull Request
This was an issue on wallening and I figured I should fix it at the root
Look ma I'm upstreaming
* Adds a helper for base_pixel sets in typepaths that ensures the offset is autoapplied to pixel_x/y
* update modular
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* AI Universal Standard canvas will now show it's canvas size on the item name (#70868)
## About The Pull Request
This PR adds the canvas size to the name of the AI canvas from "canvas
(AI Universal Standard)" to "canvas (24x24) (AI Universal Standard),
making it consistent with other types of canvases which has their own
size on their name.
## Why It's Good For The Game
Consistency, every other canvases has their size on their name except
for this one.
Also makes it easier to distinguish the difference between this and the
other canvases.
## Changelog
🆑
spellcheck: AI Universal Standard canvas will now specify it's size on
the item name.
/🆑
* AI Universal Standard canvas will now show it's canvas size on the item name
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
* Adds a QM statue, as all other heads have one. (#70744)
* Adds a QM statue, bringing it on par with every other head of staff.
* Adds a QM statue, as all other heads have one.
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
* Fixes 118(give or take) cases of mapload not being passed to initilaize (#69107)
fixes 114 cases of mapload not being passed to initilaize
* Fixes 118(give or take) cases of mapload not being passed to initilaize
* Fixes a lot (give or take) cases of mapload not being passed to initilaize
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Fixes statue simplemob teleport not working and 3 other spells not appearing (#67105)
* Fixes statue simplemob not being able to teleport, and their 3 spells they're supposed to have.
* Also repaths statues to netherworld mobs, to reduce copy paste code.
* Fixes statue simplemob teleport not working and 3 other spells not appearing
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
* Parallax but better: Smooth movement cleanup (#66567)
* Alright, so I'm optimizing parallax code so I can justify making it do a
bit more work
To that end, lets make the checks it does each process event based.
There's two. One is for a difference in view, which is an easy fix since
I added a view setter like a year back now.
The second is something planets do when you change your z level.
This gets more complicated, because we're "owned" by a client.
So the only real pattern we can use to hook into the client's mob's
movement is something like connect_loc_behalf.
So, I've made connect_mob_behalf. Fuck you.
This saves a proc call and some redundant logic
* Fixes random parallax stuttering
Ok so this is kinda a weird one but hear me out.
Parallax has this concept of "direction" that some areas use, mostly
the shuttle transit ones. Set when you move into a new area.
So of course it has a setter. If you pass it a direction that it doesn't
already have, it'll start up the movement animation, and disable normal
parallax for a bit to give it some time to get going.
This var is typically set to 0.
The problem is we were setting /area/space's direction to null in
shuttle movement code, because of a forgotten proc arg.
Null is of course different then 0, so this would trigger a halt in
parallax processing.
This causes a lot of strange stutters in parallax, mostly when you're
moving between nearspace and space. It looks really bad, and I'm a bit
suprised none noticed.
I've fixed it, and added a default arg to the setter to prevent this
class of issue in future. Things look a good bit nicer this way
* Adds animation back to parallax
Ok so like, I know this was removed and "none could tell" and whatever,
and in fairness this animation method is a bit crummy.
What we really want to do is eliminate "halts" and "jumps" in the
parallax moveemnt. So it should be smooth.
As it is on live now, this just isn't what happens, you get jumping
between offsets. Looks frankly, horrible. Especially on the station.
Just what I've done won't be enough however, because what we need to do
is match our parallax scroll speed with our current glide speed. I need
to figure out how to do this well, and I have a feeling it will involve
some system of managing glide sources.
Anyway for now the animation looks really nice for ghosts with default
(high) settings, since they share the same delay.
I've done some refactoring to how old animation code worked pre (4b04f9012d). Two major
changes tho.
First, instead of doing all the animate checks each time we loop over a
layer, we only do the layer dependant ones. This saves a good bit of
time.
Second, we animate movement on absolute layers too. They're staying in
the same position, but they still move on the screen, so we do the same
gental leaning. This has a very nice visual effect.
Oh and I cleaned up some of the code slightly.
* Parallax but better: Smooth movement cleanup
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Removes over/underlays on special planes from statues. (#66003)
* Removes over/underlays on special planes from statues.
* alright
* Removes over/underlays on special planes from statues.
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
* Changes the values of the pen colour variable from color name to hexadecimal (#65553)
About The Pull Request
See the title. Hexadecimal values are better than color names for programming since they can be sanitized and are more easily converted to RGB(A) or HSV. Color names aren't really meant to be used in some functions and methods about colors.
TL;DR: color names don't work with the Color common package in the TGUI folder.
Why It's Good For The Game
This will remove the need of a hacky bandaid from /obj/item/canvas/proc/get_paint_tool_color that only covers about half the pen colors anyway.
Changelog
cl
fix: Fixed certain pens breaking painting on a canvas because of their peculiar colors.
/cl
* Changes the values of the pen colour variable from color name to hexadecimal.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Becoming the patron of a painting now lets you select a different, persistent appearance for the frame it's in. (#65305)
* Painting frame selection for patrons, painting json version update.
* Becoming the patron of a painting now lets you select a different, persistent appearance for the frame it's in.
* fix unit test
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
* Painting improvement: Added a palette component for spraycans and palette items. (#65577)
* Painting improvement: Added a palette component for spraycans and palettes.
* Painting improvement: Added a palette component for spraycans and palette items.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Change hydroponics tray and chem dispenser AltClick behavior to be used by RMB (#64939)
* Change hydroponics tray and chem dispenser AltClick behavior to be used by RMB
Co-authored-by: Tim <timothymtorres@gmail.com>
* Refactors pay stands + custom vendors (#63889)
I am disgruntled by the way pay stations work. They're not intuitive, they're a pain to build and have no interface. Basically: They don't get made, and the potential is lost.
Pay stands => Holopay
Summoned by right clicking your ID
Disappears if the card is out of range.
New TGUI window that offers more customization
Other bundled fixes:
Custom vendors become more user friendly
Code improvement
Lots of documentation + refactoring
New bundled number input will likely take place of animated number in tgui input number
Why It's Good For The Game
More RP opportunity for players, plus bug fixes. It's now much easier for players to start their own in game business selling substances clown shoes.
Changelog
cl
code: Created a new input component that accepts only integers. More usage to come.
refactor: Pay stands are now holographic. It's 2562! Create one by right-clicking your ID.
del: Circuit boards for pay stands.
refactor: Pay stands now have their own TGUI.
fix: Custom vendors now alert you when someone makes a purchase.
fix: Custom vendors now place items in your hand when you make a purchase.
/cl
* Refactors pay stands + custom vendors
* I edited these maps in a text editor
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
* Paintings improvements. (#63170)
About The Pull Request
Paintings can now do stroke painting.
Added painting management panel for admins.
Paintings now display author's character name, year of painting, medium and patron when hung on wall.
You can become new patron by paying more than the previous one.
Added painter's palettes to library vendor. (Sprites by @ Mickyan )
Backend changes:
Images are now stored in /data/paintings/images/*.png instead of /data/paintings/[category]/*.png
Old categories are now just tags
Screens & Video
Changelog
cl
add: You can now become patron of your favorite painting by buying sponsorship from Nanotrasen Trust Foundation.
add: Painter's palettes are now available at library vendor.
qol: Can use strokes in paintings now
/cl
* Paintings improvements.
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
* [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>