#plugins-dev-chat
1 messages ยท Page 52 of 1
yes
What the fucking shit bro
for the duration of the shot being processed, kind of
it doesn't disable damage, it's just that the hitboxes won't be hit by physics casts
bru
I hate this
bruh
That's insane to me
do you know a better way to ignore one exact collider when raycasting?
Offset the raycast to start outside of the collider?
Wait
What the fuck
I offset the explosion by an entire second
Still no work
I am going to freak out
what
layers
we need to ignore like 4 colliders for the duration of the shot
at an arbitrary time
you have 255 layers, just assign 1 layer to each palyer 
You never need to collide with yourself
there are only 32 layers
oh
unity
what
256-bit integer

what did you change
Take #46
did you do calldelayed
lol

epic
I always encounter the weirdest problems ong
Well thank you @upper vapor ๐
Much appreciated
I try not to ask easy stuff here haha
I've added like 3 issues to the LabAPI GitHub because of the shit I've found
It's not a lot but it is for me because I started doing this shit like a month ago
the grind never stops
just accept the intellisense suggestion
You have the answer right there
Yep but
oh right
GetFaction()
()
btw this might not work for things like grenades
the attacker might be dead by the time the damage is dealt
I checking if Attacker == null and return
that's good but it won't help if the attacker's role has changed
it'll just check whether the damage was dealt by someone else
But PlayerHurtingEventArgs not have ev.amount
not sure how that's relevant
get the damage handler, check if it's an AttackerDamageHandler
that contains a footprint to the attacker at the correct point in time
for grenades, that's the thrower
R u sur
yes i'm ๐บ
What with scp 018?
That's a ball
still a projectile though
Thrower obviously
I just avoid doing shit with going into PlayerHurting or PlayerHurt for grenades
Just
Modify the damage curve
Just
It saves you the headache
Just don't
have you tried a direct cast 
Now you can make half-damage grenades just by doing
Direct cast requires more parantheses
It looks worse
Why don't you have that and make that as a settings
Trul
Wdym
2 more characters though for "safe cast" 
Idk I just think it looks better
I know, Just if !ev.Player.IsAlive return
fair
I have a saved damage curve in my class that starts as null, and I populate it if I need to use it
oh
Once it's populated, I don't run the code again
ev.Settings.ApplyMyGrenadeSettings(SettingType.Balls)
Or whatever
I steal it and gonna do something good with it
Sometimes
You work while I sleep 
Lmao real
I lurk on these forums all the time to find solutions and ideas
Whenever I have something I reuse in a bunch of classes I throw it into my Resources class
Can you find deez nuts
It's like 500 lines
All good lol
Nvm lvl 10
๐ญ
me when double allocations
should've used spans smh
No idea how to use spans

guy
Send as ref
But what if I want to view the truncated name and the original
Tbh I don't believe I do any processing anywhere after I run TruncateName besides throwing it in the middle of a leaderboard or spectator list or some shit
So I don't wanna do ref for that
imagine
Image
if there was a source generator that created an interceptor for these uh uhhhhh
string interpolations
and used stackalloc
to createa a buffer for the whole string, then it tostring()'ed it
There is a nuget package that does some reverse stuff
Idk the nsme tho
Ye
using InterpolatedParsing;
List<int> numbers = null!;
InterpolatedParser.Parse(
"Winning numbers are: 5,10,15,25",
$"Winning numbers are: {numbers:,}");
List<string> beans = null!;
InterpolatedParser.Parse(
"Bean list: black, coffee, green",
$"Bean list: {beans:', '}"); // Add single quotes to support whitespace
this is so good
Ye
there should be a comma after yourself
*ball
Anyway, can we have player.Throw(Item,bool)
Oh ye sorry
^
I still dont get your explanation sorry
how what's done?
I'm sorry, but I'm really tired right now and have got no clue what you're talking about O.o
Server code contains the functions that makes your tag hidden, search it and try understand why it removes from it.
I highly think because the tag you make is not inside the ServerGroups List and can't see the hidden version of it
Where is the ServerGroups List?
I dont know not on pc reverse where you set the name of your group / tag
In ServerRoles
Like where you define the roles, in the remoteadmin config file?
Yes, both of those roles are in the remoteadmin config file
Exist any plugin with SS keybind? I need it for example
if ur fine with telling people to install another plugin for urs to work https://discord.com/channels/330432627649544202/1339704289291141130 is very good, i dont like telling people to install that stuff tho lol
Because it's not very good or very maintained 

ur bad
and unmaintained
secretapi v2 when?
You already doing breaking changes so
Not really much tbh
Also when fix for fakeSync
@hearty shard
AdminToys
Ah
Just got home to try some things and this worked when building from the terminal 
I've still got a lot of fiddling and convincing to do, but at least I know the end goal is achievable now. Thanks for the help everyone :>
only like 2 more (unrelated) things to figure out and I'm done with windows for good 
Can't help with the Rider specific stuff since I aint using it
Btw funfact
You can make a .net8/9 csproj and edit the .csproj file to be net48
I saw that online somewhere, will probs try that first
Yup this works
You can also build from Rider
Scp Roles doesn't have wrappers?
use RoleBase and just use base game roles
How can i check scp079 tier?
Or Active camera
SubroutineManager
do i add role wrappers to secretapi 
Might be the best of what I typed before , the ReferencePaths.props.user
Scp079GameRole.SubroutineModule.TryGetSubroutine(out Scp079TierManager tierManager)
tierManager.AccessTierLevel
as easy as that
Uhhuh
for xp, use the thing eve sent above
Super easy 
Scp079GameRole::CurrentCamera for camera :3
oh
Silly
lmao
silly eve giving hard methods for no reason
oh
How to check if camera is on surface
shush
just FacilityZone.Surface
Iidk i dont see ingame code rn
Room.GetRoomAtPosition(scp079Role.CurrentCamera.Position)?.Zone == FacilityZone.Surface
im checking if current cam has it
damm thank you
oh yep, ok I tried that but I placed it in the wrong folder. Moved it to the right one and it works now
๐
it working now 
(meant to reply to this message, in reference to what I tried)
that's wild

looking into CustomDataStore stuff, because StoreInstances is private, how am I supposed to be able to get the players with the stores? I dont want to add a store to every player if I don't have to...
If you get a Playdr frpm the store it should create them
publicize labapi 
GetDataStore creates an instance if the player doesn't have it
and I dont want to do that, I just want to get ๐ญ
Huh?
surely the camera stores the room it's in...
doesn't
atleast not at first glance
no room identifier
Why ontl get, not create?
Imo, use custom data store implentation
because I am doing a foreach on Player.ReadyList, I don't want to use memory if I don't need to.
how big is the custom data store?
controls hints via ruei
and the classes in there contains lists and stuff
it's like small amounts of memory id say, but still
micro-optimisations
lol
yeah
but data stores are very useful
thanks to the person who decided to make them btw
i think theres a PR for data store Get, so you will have to wait until then
okie
x3rt
You could also fet h via reflection 
when is jesus pushing the current versoin to github 

also i just found out that CustomDataStore::Owner exists... ive been making my own Player field ๐ญ
bru
Hope
He also implemented some of my request

ive been using my members as test dummies and fixed loads of issues i would have never spotted
lumi...
i usually let rider do it for me
like whenever i finish a line of code or smth
usually reformats for me
pro tip
um
it doesn't always do that ๐ญ
done
Base.Room
lol
pushed the code cleanup
i searched for room it didnt show
lol
idk
hopefully that looks better now...

ty ax again :3
Skill issue
who r u
np

ur boss
not true
Yet
ur fired
Nuh uh
im now honestly tryna figure out ways to optimise my code as idk if i did anything in a very unneeded way or not ๐ญ
me when string and not string?
wha
because i dont have nullable on

i am NOT migrating my older projects to nullable 
that would lead to breaking changes
im not using nullable ever, i hate it sm ๐ญ
for new codebases i use nullable though
skul-
๐
what ๐ญ
Component:45
you could use TryDequeue
i dont have that method... unless it comes with dictionary?
๐ญ
erm
99% its not an extension
and is just part of the class
idk though
how do queues work ๐ญ
what if i said 1% is true
i don't think she understood anything from that lol
think of it as a super market queue
first to go in line gets out first
yeah but i need a queue for the player and the list of items they have
i need to save their list of items
do I just put queue on their list of items?
because it's technically not a queue in a supermarket
as everyone can have a msg at the same time
yeah
buteach player has a queue
like this ig?
ye
so, do I continue to use FirstOrDefault to get the next item in the queue?
.Dequeue
btw you should probably update this so there's an OnDestroy method that does the cleanup
and in Start you delay the call to _toy.Destroy
the OnDestroy method shouldn't destroy the toy itself
.Dequeue() removes it
.Peek() ?
isn't that what you want though?
so instead of the CallDelayed calling my Destroy method, it destroys the toy and uses OnDestroy instead? ok
yes
I wouldn't know whether a message is currently playing or not then
this also cleans up toys that are destroyed on scene unload
um
but you do calldelayed
yes
but like
when i add an item to a queue
but call delayed isn't going on
how do I like know whether a msg is going or not?
๐ญ
uh
ig I could use the components list?
brainfart moment
and see whether one is active
ummmm
we're adding a tuple now?
for faster access
i can't believe there's no tryremove for dictionaries
honestly with all this yapping i could just PR the changes lol
me when
.Remove
is a bool
Remove is the try 
then you don't geth the removed value
What
i do need it
I'm blind
hi blind
check the readme
feel free to release it, ma lazy ahh is not gonna make that PR right now
haha
fair enough
ima wait a bit
see if my members find any bugs
probably not, patched a billion by now
but rather be safe than sorry
Ah
typical nw moment
That is intended as far as I know
@unique crane any possibility of filmmaker role receiving more than 20 seconds record time

I have never ever used that role in my life xd
CoC 
hold right click to move
add keyframe
space to play
uh
Yippe
Filmmaker role is holy dogshit
i hope it gets a buff someday
because its functions are really unique
its very underutilized
once I had an argument with a guy because i asked him to use filmmaker role for his video, and he said it was too much work and started ignoring me and being dismissive
cuz its annoying to work with
i mean, yeah, but its not unusable and it looks way better
and basic planning mitigates most of its downsides (a filmmaker cannot improvise movements, cannot hear voice chat)
Except when you can clearly see where a keyframe is because the change in direction is so obvious
idk ๐คท its better than using FPS controller where i can also tell exactly when the cameraman changed directions, and i can see the exact sensitivity he has on, and its just overall very obvious im looking at noclip footage
Lmao
And when they don't use smooth input...
So Locker.Loot is a LockerLoot array, but as far as i see, it doesnt hold any information or references to the held/generated pickups?

It creates it when you open it
And thats it
It doesnt rly need to hold reference to it

what does this actually return thougj
Chamber.Base also has a List of "ToBeSpawned" ItemPickupBases
whats the code behind it
Oh that
Oh yeah
Its fine
it creates the the pickup server side and stores it ig
i thought it stored the ItemType
Hm, does Base.Content already hold the unspawned Items too?
try
also isn't this a memory leak


how is that a memory leak
rent from the pool
no return
or i'm guessing you manually return it later (but that's dirty af never do it)
That's like, bad architecture though
GC clears it
me when
<remarks>returns a pooled list</remarks>
does it
Literally
if an object isnt used
i hate it
pooled objects are only used to reduce initial allocation
No it wont be returned if you dont do it
Its not
clearing a set/list is faster than creating a new one
yeah I know that, just wondering why use a pooled hash set in this scenario then
so its not cleared by GC
you're gonna have to re-allocate down the line if you just let it be GC'd
Cuz ur meant to return to pool after use
Why is he doing Base.Content.ToArray()
Why
So either, you return it, or you forget to and it gets GC'd
I just want this in the end ._.
in both scenarios it's bad design
Well its your skill issue if you dont return it
And im trying to figure out how to separate loose pickups from pickups in lockers
cuz
concurrent modification
but at that point you can use RemoveAll
So my plan was cloning Pickup.List and going through them all or sth and check if they exist in a Locker? idfk im just trying things ._.
or RemoveWhere on a set
... it's still bad API design to be doing something like this
IIII dont think so
tbf
class PooledHashSet<T> : HashSet<T>, IDisposable 
but if you want you can make issue on labapi github
.toArray kinda stinks
Is that LabAPI code
Cause like
you could IEnumerable and yield return 
Thats not even my code :x
LabAPI does it aswell
in some cases
Like GetBannedPlayers()
There is
how are we supposed to know we have to return it
Right, have to use the nuget, otherwise there's no docs
you have to use nuget (it's outdated) 
see at the very least this would be a little easier to know with the IDE letting me know it's disposable, but still dirty
oh yeah
Any kind of API that requires me to return something without explicitly needing me to, or telling me to, is like, bad design
That is decompiled code from SL :c
From LabApi.Features.Wrappers.LockerChamber
I'd rather it crash than silently fail
oh this one
bruhhhh
nvm
Does anyone have any suggestions on how to make this efficient?
Sorting Pickup.List into one List of pickups contained/part of Lockers, and one List of pickups of the rest ("loose" items) (Or are loose items part of invisible lockers...? oh dear i fear they might be)
what do you mean by loose items
i guess on waiting for players you can cache items in lockers
Like this one does tell you that
not many people will see "pooled" or understand it tho...
Well
<- doesnt understand what a pooled list of players means
in worst case its getting gced
we love c# gc yippeee
i would never survive c++
void GetCurrentSpectators(List<Player> results)
TF2-dev-type conversation here fr
IMO anything returned from a method shouldn't be pooled
do what Axwabo does with out results
let the caller handle pooling
Like the items in HCZ in the shelves, or on the boxes of the corner tiles, or the 096 keycard, or the 106 keycard/coin
Stuff not in an enclosed container
ohhhhh
.w.
make them a hashset
Can you post issue on github about it
uhhhh Dictionary my beloved?
alr i get you tho
you can put the uh
locker pickups in one set, then "loose" pickups would be all pickups except the ones in lockers
sets have ExceptWith
its basically a dictionary but with no values
lmao
avg programming at 3am
i thought UnionWith returned a new hashset for a sec
you could add all pickups to loose at the start and exceptwith in the locker loop
that would eliminate the last foreach
a.ExceptWith(b) removes b from a
hi "eve"
b word
but beans
I DID READ IT
I THOUGHT IT WAS FOR THE FOREHEAD THOUGH
YK THE TOP OF YOUR HEAD
๐

I HATE YOU
i hate you...
I hate you too :3
the power of friendship ๐
why does the ellipsis makes it sound so ominous
ellipsis
Pong
Yeah i assumed so
However
goofy ass word
So ill defenestrate you
what would you call it
jokes on you, i don't have windows
-# i really wish i could say that and it would be truze
that's not 1 word
periods
ominousifier
Sorry i don't have that
Using those weird x = bla => thingy ma bobs, would it be possible to easily filter out null refs out of a hashset?
My beginner ass would make a new empty HashSet, foreach through the full one and individually check for nulls and add valid entries to the new one
._.
RemoveWhere
it's called a lambda expression btw
those are anonymous functions btw
ooooo wait i read online that since HashSets cant contain multiples, even nulls apparently, i can "just" .Remove(null) ?
NO.
.>
oh not to u
the x => something is the lambda expression
and yes you're creating an anonymous function
okay
names are confusing
Pickup wrappers can't be null
you should remove those that are destroyed
nononono
that'll throw an exception
you can't modify a collection while iterating through it
that's why you have to use RemoveWhere
yep

hmmmm
The medkit was found to be "in a locker", but the pills were not
Goal Description As discussed on the SL discord, in plugins-dev-chat, there shouldn't be any methods that return a pooled container, putting the user in charge of returning it. Especially due t...
u called it a LAMBDA not a LAMBDA EXPRESSION.
im being pedantic both are valid
Maybe chamber.GetAllItems() doesnt fully get all items..?
hm
it must
why it no work qwq
public static class MapItemInfo
{
private static HashSet<Pickup> itemsInLockers = [];
public static HashSet<Pickup> ItemsInLockers
{
get
{
if (itemsInLockers.Count == 0)
Sort();
else
itemsInLockers.RemoveWhere(x => x.IsDestroyed);
return itemsInLockers;
}
}
private static HashSet<Pickup> itemsLoose = [];
public static HashSet<Pickup> ItemsLoose
{
get
{
if (itemsLoose.Count == 0)
Sort();
else
itemsLoose.RemoveWhere(x => x.IsDestroyed);
return itemsLoose;
}
}
public static void Sort()
{
itemsInLockers.Clear();
itemsLoose.Clear();
itemsLoose = new HashSet<Pickup>(Pickup.List);
foreach (var locker in Locker.List)
{
foreach (var chamber in locker.Chambers)
{
itemsInLockers.UnionWith(chamber.GetAllItems());
}
}
itemsLoose.ExceptWith(itemsInLockers);
}
}
At first all "loose" items get a yellow beacon, then i show that only the flashlight and upper right keycard in the locker are considered "in" the locker/part of its lootpool or stuff ._.
bump
Anyone know why I sometimes get ghost players in my game?
Every once in a while, a player drops connection with the server but doesn't die
It creates this like "ghost" where I can't kick them, ban them, etc. but they exist as a player
FUCK
is there a way to force them one way or the other regardless of the initial state?
test it
anyways, i would go and figure it out for you but i just closed SL and i dont wanna start it again
probably
so yeah, test it
and yeah
you could probably just do that then
if not it's fine, just a bit more stuff to save
<pos>ing every character i believe
if i don't have to do it, i'd rather not
do you have a round info container
if so i am interested in seeing what you store
not at that part yet
working on the file format, and gonna need something to store the initial state at the start so I can apply deltas on top
nah
ucan do
<align=left><pos=-100> or wtv
along with like 2 other methods
good luck!
hmm
i probably wont finish mine, but i actually think it was really useful to me for understanding binary encoding
i may pick it up again at some point just as a film-making tool
but that's a big maybe
started on ours because we wanna be able to get proof for any infraction
you've never really worked with binary if you haven't broken 5 plugins with 2 bytes 
-# endianness
hahaha
i was thinking it would be a really good moderation tool
and it's a fun project, albeit a behemoth with the way we're doing things
and 90% of people wouldnt see it coming
heh
although uhhhh
no point in secrecy for that kind of stuff
i mean my guess is most trolls wont read enough to find out theres a recorder
i can kind-of understand it but also its a primarily voice chat game
lots of other games with voice chat
that don't arbitrarily prevent you from doing stuff
gdpr 

yeah
wait...
you can't just throw out gdpr like it's a response to everything
that's a per server basis
NW has nothing to do with it
can you record US ppl but not EU ppl? 
source games have STV which literally records everything that happens in the server
including voice chat
^
i havent seen any legal issues
NW is just being stupid af
restrictions for the sake of it
oh well
brb quick shopping trip
maybe they just wanna make sure they don't catch a lawsuit
is there a way to get players to sign consent to record their voice? not useful for this specifically but im curious...
1 - they wouldn't
no
ยฏ_(ใ)_/ยฏ
just put it on the pile of stuff you can't do for no actual reason
i remember how much some developers complained about reloading becoming client side and i wonder if stuff like that gives Northwood a cocaine high they cant replicate any other way
and thats why speaker ID is a byte and you cant really customize gun properties
Tbh speaker ids being a byte is like, fine IMO
I'm talking more about arbitrary VSR stuff than gameplay decisions
why would you have more than 256 distinct audio players ๐ญ
well like, its good enough for 99.99% of people, and im pretty sure there will be only like one issue with that in the entire human history
oh you meant like netID would be better?
no i want uint32 speaker IDs and i want them now
why tho
because im always afraid of something going wrong
Your server wont handle that much audio data being streamed
youre absolutely right
And until you find a time where 255 speakers arent enough, I dont think NW is gonna change it
but my fear is not rational
maybe as a coping method i should ask a bunch of people to install a plugin designed to monitor speaker ID usage and watch as the peak speaker ID usage is 15 sounds
where is that in the VSR/EULA?
and i will finally come to my senses and realize there is no issue
Nothing in VSR that states you can get consent to bypass the rule
two things i am truly upset by:
- Client side parenting only works on NetworkIdentities
- i cant wait for the official custom roles (assuming it comes off the backburner and into developer time)
i couldn't find anything with the keyword "audio" or "voice"
david mentioned
they never had to add primitives
but they did
primitives are honestly where it all started going downhill
after that there was no going back for Northwood
now look what has happened
CUSTOM KEYCARDS
better ask tho yeah
So actually interested in where that's stated
this is my favorite detail in the VSR
yes, i will post racist homophobic pornographic swearing via CASSIE and the only reason that more people dont is because the VSR forbids it
this is all i can find
well, there are certain words that can sound like another word
i remember my days as a CASSIE engineer...
it was not fun
wha
i cant imagine Cassie engineering racist shit, but i guess it makes sense that some people would do that
its the internet after all lol
yeah 
it was a part of my job to make CASSIE say certain words that he couldnt normally
one second
ohhhh
lemme find some
with jams?
yeparoo

@upper vapor enjoy these
they were painful to make and served zero purpose but thats everything in SCP SL
"Civilian" more like
siwillein ๐ญ๐ญ
here is the first CASSIE engineer and it was when i discovered the wonders of cassie engineering
my friend made this one
and i thought "wow thats fucking genius"
smart
why is this so important
replay
oh
how are you gonna do item physics?
just recording the items position and the actors are gravity off
not planned
also do you plan to have the dummies actually performing the actions like opening doors or just letting the world take care of that
fair enough, its a moderation tool primarily i guess
no interaction
state handles the world
doors are deterministic
in the sense that their sync id is deterministic
so that's good at least
makes identifying them simple (and cheap since they're bytes)
Okay so now when I want to remove the role from the player, what do I do? or will it get removed when the player leaves the server, or is that done manually? because it's stuck on the player now, I've tried a few things but nothing has worked so I'm just gonna ask for help instead lol
Remove then from the members dictionary
Does that exist in .net standard?
can plugins be .net standard 2.1?
Yes but not in net48
Or maybe sorry idk if exist
Nvm
Yes
But definitely does in net5+
lemme install .net standard 2.1 then
It's only a thing from .net 7
You have it
Just change the target framework
rider's not letting me heh
Ah ye then that
What
Rider issue





