Commit Graph

103 Commits

Author SHA1 Message Date
SkyratBot
756b97a0fb [MIRROR] Converts some unique and typelists into stringlists (#1284)
* Converts some unique and typelists into stringlists (#54237)

* Converts some unique and typelists into stringlists

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-10-13 08:03:58 +02:00
SkyratBot
7eeaefe645 [MIRROR] Fixes some potential sleeps as detected by SpacemanDMM improvements (#1216)
* Fix some potential sleeps as detected by SpacemanDMM improvements (#54230)

overrides weren't detected by should not sleep, i think i've mostly
fixed that with SpaceManiac/SpacemanDMM#214

Some of these are wacky but overall this pr is harmless

signals shouldnt sleep even in weird 1 in a million situations or due
to other people adding bad code

overrides of changeling can_sting() use alert() and input() and that's
just too fucked for me to fix in this pr

* Fixes some potential sleeps as detected by SpacemanDMM improvements

Co-authored-by: spookydonut <github@spooksoftware.com>
2020-10-09 18:28:59 +02:00
SkyratBot
1dfe6e9e85 [MIRROR] Unit tests for serving trays (#1199)
* Unit tests for serving trays (#54224)

* Unit tests for serving trays

Co-authored-by: NightRed <nightred@gmail.com>
2020-10-08 02:42:27 +02:00
SkyratBot
d0e6e2ce20 [MIRROR] Fixes for food storage component (#961)
* Fixes for food storage component (#53894)

* Fixes for food storage component

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2020-09-24 20:30:52 +02:00
SkyratBot
39c1a99020 [MIRROR] Moves over cakes to newfood and transfers reagents when crafting (#688)
* Moves over cakes to newfood and transfers reagents when crafting (#53316)

* Moves over cakes to newfood and transfers reagents when crafting

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
2020-09-09 08:09:36 +02:00
SkyratBot
53788ced26 [MIRROR] Adds TCG Decks in order to play with them like a TCG. (#594)
* Adds TCG Decks in order to play with them like a TCG. (#53200)

* Card Decks n shuffling.

* the "crackling with sexual energy" update
}
Kept you waiting, hunh?
This adds a new multi-faceted object to the game, the TCG Card Pile. Using any 2 cards together on each other will create a pile, and the first card in the pile will determine if the card pile is face-up, or face-down. Depending on the orientation of the card pile, you'll draw cards out of it in the orientation. So, a "deck" card pile would be flipped face down, and would allow you to draw cards out of it also face down, and vis versa.
Decks can be renamed with a pen, and use a radial menu in order to enable quick action on the Trading Card game battlefield.
image

    Draw allows you to draw a single card from the deck, again based on the orientation of the cards used to build the deck.
    Shuffle calls the shuffle() proc on the deck, and (should) randomize the order of the cards in the deck for use.
    Pick up puts the deck into your hands instead of the nonsense dragging required with regular playing cards.
    Flip flips the orientation of the cards in the deck, turning a face up pile into a facedown pile, and a facedown, faceup. Also, calls reverseRange() on the contents of the deck, which should put the bottom of the deck on top, and vis verse, ALSO enabling you to put cards on the bottom or the top of your deck easily.

Card piles also operate with a custom storage component, so you can search for cards in your deck if need be, but also handle edge cases like when you only have 1 card in a pile left, or when you dump out a deck of cards like you would a bag.

This basically adds in more sane hands, more sane decks and discard piles, and a massive QOL update to the trading card game to make it actually playable (once potato actually puts the card stats and effects on the cards themselves.)

* Adds TCG Decks in order to play with them like a TCG.

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
2020-09-02 02:50:47 +02:00
SkyratBot
f3a0fd3231 [MIRROR] Componentizes Food Storage (#561)
* Componentizes Food Storage (#53116)

Moves the food storage behavior on (formerly) bread, cheese wheels, and cakes from /food/snacks/store/ to a component.
This lets just about any food/edible thing be used for storing fun things like glass shards, which is pretty neat. Also helps work towards the food refactor.

* Componentizes Food Storage

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2020-08-29 20:32:58 +01:00
SkyratBot
e65a48e91f [MIRROR] Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#430)
* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)

Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.

Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.

This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.

To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.

Requested by @optimumtact.
Changelog

cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl

* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-19 20:17:28 -04:00
SkyratBot
c5d6d62db8 [MIRROR] you can no longer stuff a bajillion live mice into your chef's hat (#346)
* you can no longer stuff a bajillion live mice into your chef's hat (#52640)

* fuck

* Update code/datums/components/storage/concrete/pockets.dm

Co-authored-by: Rohesie <rohesie@gmail.com>

Co-authored-by: Rohesie <rohesie@gmail.com>

* you can no longer stuff a bajillion live mice into your chef's hat

Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
2020-08-15 02:01:13 +01:00
SkyratBot
49fc2a47f2 [MIRROR] you can now store dead mice in your chef's hat as well (#117)
* justice for dead mice (#52436)

* you can now store dead mice in your chef's hat as well

Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
2020-07-30 00:29:49 +01:00
ArcaneMusic
c69cb714f2 You can now store mice in your chef's hat. (#52253)
* Is that a mouse in your chef's hat.

* yeah that sounds about right

* Sure thing boss.
2020-07-18 14:37:29 -04:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
AnturK
f4af5ed28c Makes CanReach default to blocking. (#52115) 2020-07-12 04:25:27 +10:00
Tad Hardesty
4e666f1325 Remove unnecessary incapacitated check 2020-06-27 14:39:20 -07:00
ivanmixo
6351f3837d replaces the thing with user.incapacitated() 2020-06-19 22:54:51 +02:00
ivanmixo
8622bcfa3e Makes it == to something 2020-06-19 18:48:42 +02:00
ivanmixo
39b38a223e Fixes altclicking wallet while unconscious or in soft crit 2020-06-19 12:08:19 +02:00
Rohesie
b940ce3ff9 progressbar refactor (#50316) 2020-04-01 14:38:55 +08:00
ShizCalev
7209ac3c93 Removes unnessacary math defines 2020-02-17 23:09:09 -05:00
skoglol
b735d25cb6 Swaps boh and ooc confirm dialog button positions (#48905)
* Swaps boh confirm dialog button positions

* and the ooc alert
2020-01-22 12:52:17 -05:00
Ghom
1e15900f2d Fixes shock paddles being insertable in BoH (#48643)
* Fixes shock paddles being insert able in BoH

* Redundant.
2020-01-12 19:34:20 -08:00
Dennok
a2fc1614a6 You do not lose the storage window on storage pickup. (#48685)
* do not lose the storage window on pickup

do not lose the storage window on pickup

* Keep update_actions()
2020-01-10 21:35:02 +11:00
spookydonut
2591ce17a6 Travis EOF newline detection v3 (#47539)
* scream

* aaa

* aaa

* new one
2019-11-04 19:16:50 -08:00
81Denton
f5bd6a381d Merge pull request #47052 from kingofkosmos/misc_span_fixes1
Misc span fixes
2019-10-20 18:46:54 +02:00
kingofkosmos
52325eda25 Merge branch 'master' of https://github.com/tgstation/tgstation into misc_span_fixes1
# Conflicts:
#	code/game/machinery/Sleeper.dm
#	code/game/machinery/doors/airlock.dm
#	code/game/objects/structures/beds_chairs/chair.dm
#	code/game/objects/structures/lavaland/geyser.dm
#	code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
#	code/modules/antagonists/clockcult/clock_mobs/_eminence.dm
#	code/modules/paperwork/contract.dm
2019-10-17 06:02:06 +03:00
nemvar
9467c73899 Checks if the tick has stopped. 2019-10-16 19:25:16 +02:00
nemvar
ced45cfddd Fixes forceMove to null 2019-10-16 19:21:41 +02:00
KomradeSpectre
9ff071af60 Clockcult Removal 2019 (#47057)
* Nanotrasen fires the Wave Motion Gun at the Clock Cult

* Fixes a random changelog appearing from the reebe void.

* Fixes a wrong type reference regarding the bronze sheets in the Lavaland Ruin for it.

* Fixes redundant cells after CC removal in ruin by populating them with varied ore chunks, or destruction clutter.

* why is it /obj/item/stack/sheet/metal but not /obj/item/stack/sheet/iron

* Fixes the lavaland ratvar ruin to have fluff variant structures of deleted shit it referenced instead what I thought was reasonable.
2019-10-15 10:13:41 +02:00
PKPenguin321
deeac2355a Big storage containers (like bags) in smaller ones (like boxes) can't have items placed in them (#46983)
* Bags in boxes can't have items placed in them

Untested webedit
Fixes https://github.com/tgstation/tgstation/issues/46345

* smooths a redundant check

* more squishing
2019-10-14 07:05:06 +02:00
kingofkosmos
280d416d4f Adds missing spans, missing periods and missing span endings. Also changes spans to suit the situation better. 2019-10-12 19:34:11 +03:00
William Wallace
53ed029490 remove duplicate /datum/component/storage/concrete/pockets definition 2019-10-08 22:38:57 +01:00
Qustinnus
81c3d92129 Adds pick-up, drop and throw sounds for items. (#46677)
* finishes up

* adds sound volumes

* woops

* forgot to ctrl + s

* cloth

* smh

* done
2019-10-04 18:53:09 -04:00
nemvar
8cfe0f6467 Slightly improves visible and audible messages. (#46499)
* Doubtful improvement

* Switches out all the magic numbers with defines

* Thanks travis for finally finding a real error

* properly resolves some left over conflict
2019-09-18 12:52:18 +02:00
Rob Bailey
2029163d33 playsound vary boolean define conversion (#46254)
About The Pull Request

Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage.
Also changes a couple of places where a list was picked from instead of using get_sfx internal calls

This was done via regex:
(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1
(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0
full sed commands:
/(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE
/(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE

I'm not very good with regex and these could probably be optimized, but they worked.
Why It's Good For The Game

Code usability
2019-08-30 18:45:20 +12:00
AnturK
a6232420de Fixes boh dumping runtime 2019-08-22 14:12:04 +02:00
nemvar
1ec07b1508 Fixes that pesky dumping issue (#46025) 2019-08-21 01:08:36 -07:00
nicbn
44a07d712d BoH bombing rework II (#45174)
Ever since the big BoH nerf, BoH bombing is kind of a joke. The damage it does is not really huge, and it's lame for traitors - it lacks emotion and their target may not even die, as they can use the ladders to get away.

So, what this does is add back some soul into BoH bombing, while not making it too round-ending and adding some degree of damage control for admins in case of griefing.
When BoH bombing, a stationary singulo with custom sprite will spawn. Its gravitational pull is REALLY strong, so people near it are probably going to get eaten, and there will be some real damage to the hull. The singulo will cease existing after 5 seconds.

For antags, I think this becomes much more interesting than the current BoH bombing. In the case of griefers, the damage to the station isn't too big because the singulo is stationary and fades away after some seconds. And then, admins can click a button in their chat to bring back everything the singulo ate into the game (the button expires in 10 minutes, however, but this can be changed if you think it is needed).

Settings like gravitational pull can be tweaked if yall find it to be too strong or something.
Changelog

cl
tweak: BoH bombing changed again. Now it's more violent.
/cl
2019-07-25 21:18:01 +12:00
Mickyan
e26abb7047 Random pixel shift for dropped/thrown objects (#45155)
* pixels

* offset for any throw, critical bedsheet bugfix

* nyeh

* might as well (autodoc)

* renamed proc

* removed redundant src

* moved call from dropped() to dropItemToGround()

* handles storage dumping, customizable max offset

* adjusted values

* inline
2019-07-16 00:51:17 -07:00
Alek2ander
e6d468eb61 Wallet QOL improvements (#45178)
* Wallet name includes displayed ID
Adds Alt-click to remove it

* Use regular altclick if it's in storage
2019-07-15 02:57:17 -07:00
kingofkosmos
ec5c82029a * "Is already...", "Can not...", "Not when..." etc. 2019-06-27 06:15:43 +03:00
kingofkosmos
fb9731492c * extra spaces removed from "span class = '" --> "span class='"
* warning-spans added to cases of "You need..."
2019-06-25 21:03:25 +03:00
Tlaltecuhtli
d3dd48de46 fixes russian helmets not holding vodka (#44692)
* 1

* no need for this

* e

* dsdag
2019-06-22 02:17:55 -04:00
AnturK
0ce8241c78 Fixes cross-z dumping with bluespace bags. (#44437) 2019-06-11 14:32:34 +02:00
Arkatos1
e82707a8cc Examine tooltips now work on items put into storage (#44311)
* Examine tooltips now work in items put into storage

* IN_STORAGE define

* IN_STORAGE bitfield and proper parenthesis
2019-06-09 18:15:12 -04:00
Emmett Gaines
c3f95024b2 Gets rid of the GetComponent macros (#44220)
* Removes the GetComponent macros

* Regex replacement for GET_COMPONENT

Search: `GET_COMPONENT\( *(.+?) *, *(.+?) *\)`
Replace: `var$2/$1 = GetComponent($2)`

* Regex replacement for GET_COMPONENT_FROM

Search: `GET_COMPONENT_FROM\( *(.+?) *, *(.+?) *, *(.+?) *\)`
Replace: `var$2/$1 = $3.GetComponent($2)`
2019-06-04 17:39:58 +02:00
Akrilla
2d32be1904 Small storage refactor and examine change (#44109)
* Removes repeated line

* Description change for clothing items that can only store specific items

* Get all children of can_hold listed items.

* can_hold only needs the top most item, child items are dealt automatically

* cant_hold related change

* Text change

* Moves the item check to the line above, and removes the current.

* Same changes, but to belt/wallet code.

* Change to using signals instead

* Generic signal on datum/topic

* Cache typecache, and small signal change

* Small argument tweaks and remove unneeded lists

* Change to proc

* Change call can_holds/cant_holds to use new proc

* initial, and cleaned up display code

* Null check
2019-05-30 14:20:29 -04:00
Akrilla
55ed0ebf35 Fedoras hold small and gimmick items (#44139)
* This was probably originally intended...

* Fedoras hold small items, and exceptions for gimmicks

* Only create cache once

* Cache exception_hold, and adds other katana type
2019-05-28 09:57:59 -04:00
vuonojenmustaturska
fb45b7a017 Turns trait accessors into defines, fixes some bugs (#43820)
It's free performance.
2019-05-06 19:44:05 -04:00
Tlaltecuhtli
ec1ad61558 new cargo crates & tweaks (#43454)
* 1

* 2

* finall pre pr

* oof

* oof

* testing merge conflict fix

* test mk2

* test mk3

* plant & chem

* bvcgr

* fixed stuff

* grammar stuff

* fixes clothing + cobby bribe

* new sprites by wjohn

* Update code/modules/clothing/suits/armor.dm

Co-Authored-By: Tlaltecuhtli <33834933+Tlaltecuhtli@users.noreply.github.com>

* tweaks .38 stuff

* Update code/modules/cargo/packs.dm

Co-Authored-By: Tlaltecuhtli <33834933+Tlaltecuhtli@users.noreply.github.com>

* nuclear option
2019-04-03 14:23:38 -04:00
oranges
0267bce949 Turns out a bunch of components do not properly transfer because of (#42691)
one of three things.

    1. They don't use RegisterWithParent or UnregisterFromParent to unregister
       and register signals

    2. They use callbacks which refer to a source object, which is usually deleted
       on transfer, or lost in some manner, or simply makes no sense at all to be
       transferred

    3. the component was never designed to be transferred at all

TransferComponents gave no shits about any of this and just blindly transferred
all components, if they were actually capable of it or not.

I only noticed this because it was causing chairs to break as they would not register signals
and verbs correctly for rotation after being picked up and then placed down, and a player
reported that issue via ahelp.

Luckily we caught it before the rot got anywhere, only chairs and the shuttle subystem
tend to use this proc (Shuttle uses it on turfs), can you imagine if everything was using
this LMAO

Which is good because it's more dangerous than a loaded gun

I have added a can_transfer var, that is true when a component is valid to
actually transfer, which means the dev has actually thought about what happens when
you take the parent object away and swap it for another and all the crazy that is entailed
by this

I have done my best to audit what components are actually
transferable, but things are basically a hot mess (Thanks @Cyberboss )

The following components required edits:
Forensics:
did not register/deregister the clean_act signal properly, did not checkblood on new parent

Rotation:
did not use RegisterWithParent or UnregisterFromParent, turned out
to not be transferable anyway due to having callbacks that can be
passed in to the parent with unknown sources that we can't feasibly
reuse (i.e if you're transferred from a chair to a bed, your old rotation
call backs are no longer valid). Turns out the use case it was for (just chairs)
didn't need it anyway, so I just made it non valid for transfer.

Wet Floor:
Honestly this one is just a hot mess, it should be a subtype of the slippery
component with the extra wet turf handling.

As it is it basically manages a slippery component on top of it's own extra
functionality, so that's a major code smell.

I added registration/unregistration of the signals, and made it's pretransfer
remove the slippery component and the posttransfer add it back (via update_flags)

Components that seem transferable without issues
mirage_border
orbiter
decal
spill
storage (I hope to earth)
2019-03-05 20:27:29 +01:00