#plugins-dev-chat
1 messages · Page 32 of 1
Has anyone encountered an exception related to Scp049.Scp049MovementModule.UpdateMovement
is it excessive to use redis to cache users in the plugin?
not really, but there is really no point lol
because anything saved in a dictionary in your plugin is also saved in memory
How can I reload a plugin's config with a command?
sr
*without restarting the server 😄
no way
There is?
you just gotta write your own command for it
Config has a setter 
@worn gull calll Plugin.LoadConfigs() in a command
Ah thanks
labapi should have this natively :/
Then suggest it
where
on github repo
alr
is there a way to get rid of the player area info text? I want to make a custom one
someone have ready T Repository?
Set the Player.InfoArea to PlayerInfoArea.CustomInfo
thanks
anyone know how to detect when the skeleton changes skin?
I want to change how respawn mechanics work and how certain teams contribute influence. do I need a Harmony patch to do that?
theres a lot of shit to sift through i have no clue what im looking for
found how to modify what contributes influence but i still need to know how to change the wave mechanics, I want to disable the guaranteed mini waves for the opposing team and have it spawn something else in
how i can get it from the player?
so how
publicize the assembly
sl has a method for this
Scp330Bag.AddSimpleRegeneration(player.ReferenceHub, 0.2f, 600);
@random scaffold
how
private static IEnumerable<MethodBase> TargetMethods()
{
}
methodbase or methodinfo idk
but how implement?
attributes must be stayed?
just have [HarmonyPatch]
nothing else
probably..?
someone remembers the string max length for mirror?
65k
ok so i did remember correctly just making sure
the same amount of UDP - whatever else is needed for your message
how to get door from collider / gameobject?
GetComponent<DoorVariant>() afaik
either on collider or collider.transform.root.gameObject
this is how the disruptor get's it
Can I move dummys around places, like they walk a path between GateA and GateB or something
my friend is hosting a server and i created a plugin and it says BadImageFormatException but when i host it, it works perfectly fine.
likely corrupted when sending
oh yeah its mostly likely that cause i was sending thru live share in vsc
make navmesh
How could I?
idk
Checking if a GameObject is an ammo pickup would just be getting the AmmoPickup component on it right?
that should work
interactable toys are amazing
Players decided making a pile of ammo and items and then throwing a grenade into it was funny
server crashed, no more fun allowed for them
Is there a place where I can easily hook onto for when a pickup's rb sleeps
ammo pickups in particular
Is there an Event for a newly spawned AdminToy?
Probably inside the AdminToybase as regular C# event not labAPI one
Is there a way to force a latent action to run now through the CoroutineHandle
i.e. something I used Timing.CallDelayed() for, I need it to run immediately
although ig I could just extract the code into a method and run it manually nvm
Yea that
What r u doing specifically?
Nah it's good, solved
Just wanted to run a delayed action now if another was being queued
Am I the only one who has had Rider start to hallucinate when I tab on a completion and just copy/paste a bunch of garbage somewhere random in the file?
Mine wouldnt copy/ paste but would autocomplete a whole line of random garbage
There was a setting i turned off
I disabled AI stuff
But like sometimes it decides the things I wanted it to autocomplete should be in a random line of code in the file, sometimes overwriting chunks for no reason
idk what's going on but it's annoying
Yeah JB AI can be annoying
I use Copilot but i have it turned off by default so it only completes code when I press the keybind
I don't need it 
and it makes my job harder at work when I have to do code reviews for devs who used AI
i've only really used ai to tell me if theres any other way i dont know about to do something
is there an easy way to get the permissions of a keycard through the itempickupbase?
it's good for boilerplate
for actual logic and tasks copilot fails almost every time
(inline completion)
this is how base-game does it

Room::Name
or if you want unity name
Room::name
:: means that you need the instance of that yourself
so
get the room
.Name
get the room that you want the name for
and use .Name on it
to get the name
RT console?
RA*
Usually the name is the name shown
what about it?
GATE_B is GateB and etc
Get a room
Room.Get(FacilityZone.Surface).FirstOrDefault().Name
This give you the Surface zone room name
List of room names
Does LabAPI let you make custom 914 item processors
ty
getting weird bugs with one of our plugins making a disruptor which ends up having no ammo and softlocking players
You have to use a specific give reason
LabApi.Features.Wrappers.Scp914.SetItemProcessor
StartingItems
Yeah
Happens for items on the ground too
i'll try this though ty
prob
u need to impl IScp914ItemProcessor
why is my pc purring?
[05-29-2025 07:37:00.135 +00:00] [ERROR] [LabApi] 'NullReferenceException' occured while invoking 'OnPlayerJoined' on 'LaboratoryMayhem_UserInterfaceImprovements.EventHandlers.LaboratoryMayhemEventHandlers': 'Object reference not set to an instance of an object', stack trace:
at LaboratoryMayhem_UserInterfaceImprovements.EventHandlers.LaboratoryMayhemEventHandlers.OnPlayerJoined (LabApi.Events.Arguments.PlayerEvents.PlayerJoinedEventArgs ev) [0x00006] in <3a8918fc562f431ab0e2fa27208897ed>:0
at LabApi.Events.EventManager.InvokeEvent[TEventArgs] (LabApi.Events.LabEventHandler`1[TEventArgs] eventHandler, TEventArgs args) [0x0001d] in <bea7f403b90e4786abd99fa819db9853>:0
can someone help me with this, ive tried enough already
You have a null ref at LaboratoryMayhem_UserInterfaceImprovements.EventHandlers.LaboratoryMayhemEventHandlers.OnPlayerJoined
(send code for more help)
namespace LaboratoryMayhem_UserInterfaceImprovements.EventHandlers
{
using LabApi.Events.CustomHandlers;
using LabApi.Features.Wrappers;
using LabApi.Events.Arguments.PlayerEvents;
public class LaboratoryMayhemEventHandlers : CustomEventsHandler
{
public override void OnPlayerJoined(PlayerJoinedEventArgs ev)
{
if (Main.ConfigValues.ServerJoinMessageIsEnabled)
{
if (Main.ConfigValues.ServerJoinMessage.Contains("{User}"))
{
var ServerJoinBroadcast = Main.ConfigValues.ServerJoinMessage.Replace("{User}", $"{ev.Player.Nickname}");
Server.SendBroadcast(ev.Player, $"{ServerJoinBroadcast}", Main.ConfigValues.ServerJoinMessageDuration, 0, Main.ConfigValues.ServerJoinMessageShouldClearBroadcasts);
}
else
{
Server.SendBroadcast(ev.Player, $"{Main.ConfigValues.ServerJoinMessage}", Main.ConfigValues.ServerJoinMessageDuration, 0, Main.ConfigValues.ServerJoinMessageShouldClearBroadcasts);
}
}
}
}
}
Nickname might be null at that time
what about Main.ConfigValues
shouldnt be null
test it
it just refers to this
[Description("Server Join Messages")]
public bool ServerJoinMessageIsEnabled { get; set; } = true;
public string ServerJoinMessage { get; set; } = "T";
public ushort ServerJoinMessageDuration { get; set; } = 1;
public bool ServerJoinMessageShouldClearBroadcasts { get; set; } = false;
you migth can do is delay by 0.1 or more
Oh, Server.Broadcast issues 
this is my first time
Put it in a Timing.RunDelayed as SlejmUr said.
yes
you shouldnt have to add any delay in PlayerJoined
also the Player class is not built up yet
PlayerJoined happens after auth
yeah
oh
thats what i thought too
well
im probably just writing wrong code
Server.Broadcast was broken in PluginAPI as well for me
or somrhing
then you can try
CL.Info(SomethingThatCanBenull == null);
CL is Console.Logger i think
is it broken for you in LabAPI aswell?
i have to add that to properly reference it?
what
why is there a seperate config prop in the first place?
just use the one the LabAPI loads for you
I still have the Player.SendBroadcast in TryCatch, so no idea it is failing
well im trying to use it
I use broadcast it works
i dont see you using it
he is
only the configprop
make an instance for the Main
set to this in Enable set to null in Disable
so this?
public class Main : Plugin<Config>
{
public static Main Instance { get; private set; }
private static LaboratoryMayhemEventHandlers Events => new();
public override string Name => "Laboratory Mayhem: User Interface Improvements";
public override string Description => "Various improvements to SCP: Secret Laboratory's user interface.";
public override string Author => "Dr. B";
public override Version Version => new Version(1, 0, 0);
public override Version RequiredApiVersion => new Version(1, 0, 2);
public override void Enable()
{
Instance = this;
CustomHandlersManager.RegisterEventsHandler(Events);
}
public override void Disable()
{
Instance = null;
CustomHandlersManager.UnregisterEventsHandler(Events);
}
}
}
any error message?
and for the config stuff use Main.Instance.Config
it cant be a this instance because its in main
Not logging it, so I cannot give any
yeah this is what i meant
I can give the PluginAPI one if I dig the files, but that is useless now
all my plugin uses this so
re-read what i sent
dw about the pluginAPI one, NwAPI is history at this point
u can name to be anything
k
but u cannot name to same as the classname
if you do encounter any issues in the future with Server.Broadcast do make an issue on the LabAPI github
see? I use instance for it
Notepad 
faster to get the info than opening the whole project in any IDE
Will do
are you using it right?
Main.somethingyounamedto.Config.ServerJoinMessage
guh
and at the end ServerJoinMessageIsEnabled
then use .Config.yourthing
Main.ConfigValues.Config.ServerJoinMessage
THATS why most of us use the name Instance
since the instance of the Main entry point of the plugin
You might want to learn the basics of c#
istn instancing on the Examples?
i am right now!!!
making plugins
ba dum dum
i mean like look up a tutorial for the basics so you dont have a hard time understanding people here
not saying you shouldnt ask questions, you can always do that here. just that if you knew the basics of c# it wouldnt have taken so long for you to figure out what people were saying to you
should i ignore these warnings
since config gets made if not exists ye
i usually just override the Config var
also, does TryLoadConfig make it if it doesn't exist?
prop
i think so
there was a PR about making config not null
only fails if the edited yml is not parsable
like u set a bool value to int or smth
uh question about the 914 item processors
How does one set the new pickup's position?
in inventory works fine now, but anything on the ground seems to stay back in 914's input
oh okay so seems like the game's code calculates the position but... doesn't set it
base game seems to just add Scp914Controller.MoveVector to the position
im looking at AmmoProcessor now and its a +=
going to put that on IItemProcessor as a static prop so its not so obfuscated in the future
im trying to replace a string if it has a certain piece of text but it isnt working
i dont think
show code
i may know why
its private set in the instance
which means i cant edit it
nvm still cant do anything
namespace LaboratoryMayhem_UserInterfaceImprovements.EventHandlers
{
using LabApi.Events.CustomHandlers;
using LabApi.Features.Wrappers;
using LabApi.Events.Arguments.PlayerEvents;
public class LaboratoryMayhemEventHandlers : CustomEventsHandler
{
public override void OnPlayerJoined(PlayerJoinedEventArgs ev)
{
if (Main.Instance.Config.ServerJoinMessageIsEnabled)
{
Main.Instance.Config.ServerJoinMessage.Contains("{User}");
{
Main.Instance.Config.ServerJoinMessage.Replace("{User}", $"{ev.Player.Nickname}");
}
Server.SendBroadcast(ev.Player, $"{Main.Instance.Config.ServerJoinMessage}", Main.Instance.Config.ServerJoinMessageDuration, 0, Main.Instance.Config.ServerJoinMessageShouldClearBroadcasts);
}
}
}
}
You should probably learn C# a little more, but strings are immutable (meaning they can't get modified in-place by methods)
namespace LaboratoryMayhem_UserInterfaceImprovements.EventHandlers
{
using LabApi.Events.CustomHandlers;
using LabApi.Features.Wrappers;
using LabApi.Events.Arguments.PlayerEvents;
public class LaboratoryMayhemEventHandlers : CustomEventsHandler
{
public override void OnPlayerJoined(PlayerJoinedEventArgs ev)
{
if (Main.Instance.Config.ServerJoinMessageIsEnabled)
{
string message = Main.Instance.Config.ServerJoinMessage;
if (message.Contains("{User}"))
{
message = message.Replace("{User}", $"{ev.Player.Nickname}");
}
Server.SendBroadcast(ev.Player, message, Main.Instance.Config.ServerJoinMessageDuration, 0, Main.Instance.Config.ServerJoinMessageShouldClearBroadcasts);
}
}
}
}
if (Main.Instance.Config.ServerJoinMessageIsEnabled)
{
var message = Main.Instance.Config.ServerJoinMessage.Replace("{User}", ev.Player.Nickname);
Server.SendBroadcast(ev.Player, message, Main.Instance.Config.ServerJoinMessageDuration, 0, Main.Instance.Config.ServerJoinMessageShouldClearBroadcasts);
}
yes
try using an better if statement: if (!Main.Instance.Config.ServerJoinMessageIsEnabled) return; (its better to read and the code below it will get executed if IsEnabled is true)
Guard clauses 🗣️
hey is there a way to hotreload LapAPI permission file ?
how i can check if player have permission from permissions.yml?
player.HasPermissions()
The default permission provider has no way, you need to implement your own
Or you could Unregister the provider and then reregister it
Though not sure if that is a good idea
i mean Exiled has the same thing and a way to hotreload it so why not LabApi
yeah i know
Also maybe an encouragement to do a self implementation where you control how it is reloaded?
dunno the reason behind it
just a suggestion cause its REALLY practical my staff tells me all the time they need stuff so hotreload and not having to wait for round to restart is game changer
Feel free to make suggestion on github or PR to implement it
hardcode bruh
I currently have a separate thread to handle SQL operations by using a ConcurrentQueue. I was wondering if there is any event I could use to join it since it will block the main thread for up to a few seconds?
wdym
It works in the background
yes but wdym join it
Task.Run
Bad
Too costly because it’ll be running commands every few seconds
you kinda need to use task here 
I really don’t
Task also uses a thread pool
its better than new Thread()
Wait why r u running it every few seconds?
what r u doing
It’s a leveling system that writes xp to a SQLite database
Don't do it every time xp is earned
???
???
Then how am I going to save it?
dont do it every time it happens, save it every x times
so you build up a queue of xp?
idk
That’s what I’m doing, every 1 second it writes to the database
Every second?
That seems very costly
yeah
And it’s fine because it’s on a separate thread
why
create field or property
and save all data after end of the round
Yeah but that’s unreliable because what if the server crashes
The experience system is not a banking system
you dont gain anything
I mean its not that important
Idk what that is but I’ll look into it
message broker
At least make it a longer interval because surely people aren't gaining a sizeable amount of XP every single second
Apache Kafka is a distributed event streaming platform used to handle large amounts of realtime data. Learn the basics of Kafka in this quickstart tutorial.
#programming #datascience #100SecondsOfCode
💬 Chat with Me on Discord
🔗 Resources
- Kafka Homepage https://kafka.apache.org/
- Kafka Github https://gi...
1 minute? 5?
Why worry so much about 30 lost minutes of progress in a month?
Put it on seperate thread
Use Awaitables
Add stuff to the concurrent queue
Native unity thing
Isn’t that what I’m doing tho
They're trying to get back to the main thread
The main issue I’m facing is when to sever the connection and how to handle non queries when the round ends without blocking the main thread. I could abort it in the background thread but it would be unreliable
Also it’s not guaranteed to actually stop the thread according to MSDN
(Thanks Microsoft) /s
Why not keep the connection while the server is running
Yeah
And close it when Shutdown.OnQuit is fired
Oh I didn’t know that was a thing
Buffer XP gains to a dictionary and send them every x seconds or when the round ends
I had no issues with keeping MySQL connection open on local server
Yep that’s 1:1 what I’m doing
Yeah, has to be synchronous though
Otherwise unity will say bye bye and the connection won't be closed "properly" and it'll be up to the DB to handle
So don't close the connection on round end
So is it ok to block the main thread at that point
In OnQuit, yes
👍
Otherwise the server may shut down quicker
if I wanted to disable the guaranteed mini waves (where if a spawn wave fails to get points, a mini wave spawns for the opposite team) what method(s) would I want to modify? I can't find what I'm looking for
WaveTeamSelecting event
IsAllowed = false
Also make sure to reset the timer for the wave
thought i'd need a harmony patch ty
Does anyone know what causes this error?
basegame issue
dummies in lobby does that
just dummies being well... dummies!
😬
only happens when u spawn dummy in lobby
just start round and itll work
Nope
i have
This happens when the NPC is spawned and the admin panel is open. If i close the admin panel, the error does not appear

Thx
I went to make a patch to fix this XD
I think the next update won't be coming soon.
¯_(ツ)_/¯
Just telling status of this
Sure
Does OnPlayerLeft get called for every player when the round ends?
Yes
You leave the server, it restarts and then you auto join back
I can just use that then for the sql thing
ofc
guys I have a weird problem
when I subscribe to the InventoryExtensions.OnItemRemoved event I can detect when an item is dropped. However when the jailbird runs out of charges and the player drops it the function only partially executes.
private void OnItemRemoved(ReferenceHub rh, ItemBase ib, ItemPickupBase ip)
{
Info($"removed item {ib.ItemTypeId}, {ib.ItemTypeId == ItemType.Jailbird}");
if (ib.ItemTypeId == ItemType.Jailbird)
{
Info("hey!");
Pickup bird = Pickup.Get(ip);
Info($"jailbird removed, was it destroyed: {bird.IsDestroyed}");
//bird.Destroy();
Item item = Player.Get(rh).AddItem(ItemType.Jailbird);
Player.Get(rh).CurrentItem = item;
Info("after hey!");
}
Info("just to be sure");
}
when I drop it when pressing T the function runs normally and I see the "removed item" and "just to be sure" log, HOWEVER when the jailbird runs out of charges and does the dropping animation the function only logs "removed item" and nothing else, not even "just to be sure" log
anyone any idea?
💀
should I create an issue for this?
If not even the "just to be sure" logs then an exception has occured
Check LocalAdminLogs
what is localadminlogs? the server console?
No thats folder for server logs
Some things (especially exceptions) are not logged in the server console
And are instead written in the log file
oh I see now, it says object reference not set to an instance
ib or ip might be null
ah I see now, thank you
also what is the difference between ItemBase and ItemPickupBase?
item vs pickup
one in your inv other in the ground
on the ground
I see thanks
120 paypee
D:
anyway, david, for roles make the cooldown and stuff be non const please
EarnEnemy
ok I have found another issue regarding OnItemRemoved. When the jailbird runs out of charges OnItemRemoved gets called twice
!= null check
yea
#1376956491017486356 message
I made a patch for this an hour ago XD
public struct PlayerAttributes
{
public int STR = 10;
public int DEX = 10;
public int INT = 10;
public int CON = 10;
public int WIS = 10;
public int CHA = 10; // Rizz up 939????
}
idk wtf charisma will do yet
combining dnd + scp:sl
💀

is this redundant for the plugin? (its only for modules and interact with db)
I do not know anyone who would make a complete repository system in a plugin for scp sl
and why too
for modularity
make readonly or writeonly
or both
what
it doesn't seem like you have many classes implementing them
i do question why not just use a BaseRepository
and derive from that
no reason for those interfaces if you're gonna use the hbase class anyway
me need readonly or writeonly repositories
IMySqlConnection makes sense
can you show ur full list of classes
like ALL of them
why is baserepository generic
for have differents entities
like?
User / IpAddresses / Session
and something
there is a separate table for each type
and what kinds of classes will be derived from BaseRepository
huh
and why do you call them repositories and not tables?
tables is a lot more clear
repositories better
no...?
wha
🌟 Get Source Code by Supporting on Patreon: https://patreon.com/CodingDroplets
🔗 Blazor Tutorial Seriels: https://www.youtube.com/playlist?list=PLzewa6pjbr3IQEUfNiK2SROQC1NuKl6PV
🔗 .NET Core Dependency Injection: https://www.youtube.com/watch?v=39x1rZWuJp4
Unlock the power of the Repository Pattern in your ASP.NET Core projects with t...
idk how to explain why repository
these just seem like columns
and you're gonna handle the DB stuff in the plugin?
but almost everyone calls this logic repository
why not
then how?
just make method for each request bad idea
Overengineering 101
you must have 4 microservices for each service!!1!1!
just provide those low level calls and let people do the rest of the work?
For each microservice
im tried

he dont works in plugin
if people want to implement BaseRepository<T> they still have to make the low level database calls
yeah cuz you wouldn't really do this in the plugin imo
^
wouldn't you need the data elsewhere?
I had 0 issues with just making facade of sql queries

it how
for other place im just make other system

a new system to consume the same data
I need a convenient framework and a shared database between the servers
why not
never get between a c# dev and their desire to create 50 unnecessary interfaces and classes
now me need it only for scp sl plugin
but you know you'll have other uses of it?
me when i now implement a lot of my c# knowledge into typescript
example?
it does in fact make my work 1000x better and i do stuff a lot faster lol
a really good question to ask yourself whenever u make literally anything in c# is
"do i REALLY need this"
rewrite scp sl to browser game
on typescript
typescript?
for future
yeah
i love it
#1 typescript hater
dumb type system
only good thing to come out of typescript is mixins
il code better
if you hate python too you'll be very based in my eyes
it’s so easy to use and types have a lot more options then in c# lol
you don't want like 50 options for types
me when c# still doesn’t have union types
typescript's type system is so fucked up
it’s really not
okay thats a c# problem
it’s very simple
nobody writes that
wait until you have to do that with JSDoc
structural typing is also fucked
jsdoc is only useful for documenting
write function in first
i setup eslint to shut up about jsdoc types
it's also useful for no build
also
tf is that
typescript doesn't have like actual actual union types just type intersections doesn't it
me when i wrote a simple api route for work in 2 minutes because of typescripts insane type inheritance system
i mean like
type Union = “hi” | “hello”
yeah so that's fucked up
i know
who uses haskell
me occassionally and my friend who is obsessed with programming languages
2 people on the planet
but
but you can't even properly do this
now one remained question
really why i made so hard system for the plugin
bruh
also i am a full time worker that is actually happy in life working with typescript, and im earning good, so i dont think any of your points are relevant when the language just works, and well, which it does, when you know how to use it
and i know how to use typescript
don’t compare it to java
c# is closer to java than ts will ever be
i know
type Gizmo = GizmoDetails & (RectangleGizmo | PointGizmo | LineGizmo)
what the fuck.
average ts type icl
i try to use interfaces wherever possible now tho
i just prefer the functional type system so much more
i really like typescripts type inheritance, saves me writing “public bool Method()”
how do u write in typescript
wdym
david...
i mean

how do you do type inheritance in typescript then
const func = () => “hello”
assembler better in anyway
will return string as the return type
wh
there is also
function func() { return “string” }
that will return string too
i just did lambda as easier to type on a phone
it works
you can also set a specific return type
function func(): string { return “string” }
extends
once you get used to it, it just makes sense
i’m a full time worker working only in typescript and it’s lush
eh c# has its issues, and that’s why i only use it for c# plugins
won’t use it for anything else
i mean yeah c# is a fucking awful language
how does someone make a website in blazor, it just doesn’t make sense, it always is pretty shit imo lol
why it must
because IReadOnlyCollection<T> represents a collection that can be read from
and ICollection<T> represents a collection that can be written to or read from
now he made separately class for one method

this is very much okay!
why r u doing it like that
idk to organize it
you dont need to organise it by having every event by itself
you forget about me 4 month ago 
depends how big ur project is but for smth small just have 1 file
for smth medium 2-3
ofc it depends
PlayerHandler
ServerHandler
.
all what need
real
only if you have a lot?
but for smth like
5 events
thats not very messy
thats

you break it up LATER
@spice hatch
check file
and how works customeventshandler
register example here
30$?
im agree
xd
write in dm
this is not the place
what you want
IGenericRemoteAdminOptionInstanceBasedPermissionResolver<in TOption>
java ahhh class name
Its missing abstract factory singleton
fire update by x3rt
#labapi-logs message
sorry
tiny update just been busy
no i mean really nice one

also it's what Logic wanted, and now that DataStores don't automatically register if they haven't been there's no reason not to have them
maybe a Tryget ?
I actually dislike the TryGet pattern (mostly because Async code can't have out parameters)
but sure
bool TryGet(Player, out TStore? store);
yeah I know what you meant
ah ye bc i can just skip the body if there is no store for that player
is there then still a reason to have the Exists<T> then?
as you can just TryGet(p, out _)
(I dont use Async codes 🔥)
users favourite i guess
i can see both implementation being used for different things
fire
thanks!
might be more dicky requist but usable with just type? 
hm?
like these
Cus idk how would I do smth like that without the typelist
If you dont want to add it, thats alright too, I can do that work easily
then I'd have to make stuff like GetOrAdd return a nullable type in the case where someone provides a type that does not implement CustomDataStore
also runtime checks make me :c
(on my own thing)
If u have other idea how would I do what shown above would be happy :)
why don't players store their own datastores...?
because then you have a CustomDataStore without the actual implementation unless you yourself cast it to whatever store
meaning you don't get to access any of its custom fields/properties/methods unless you cast it
but
you still do that with
the current way
Dictionary<Type, Dictionary<Player, CustomDataStore>>
I don't iterate over all of the players' stores and cast them
you are suggesting
foreach(CustomDataStore store in player.DataStores) {
if (store is not SomeStore someStore)
continue;
someStore.SomeMethod();
}
which is more expensive than just a single lookup and cast
but I guess in the case where multiple stores use an interface it can be useful 
I'm needing to access them to copy the permissions for a custom keycard based off a given normal keycard. is that what GetTemplate/TryGetTemplate could do if I provided a normal keycard instead of one of the custom types?
sorry if this question's gibberish, I'm not exactly sure how to put it
Is there a way to check if a relative position's waypoint id is an elevator?
or well, if a player is in an elevator
you could try
if (WaypointBase.TryGetWaypoint(id, out WaypointBase wp) && wp is ElevatorWaypoint)
...
And the player would only use it as a waypoint if they were inside right
or well no
using the waypoint would be the same as checking if they are inside yes
im not sure, there might be multiple on surface
well as long as the elevator waypoint isn't ever used while the player is outside an elevator that's fine
yeah it wont be used while outside the elevator
hmmm
do players have a cached relative position? like last relative position or something, or even just waypoint id
would make it easy to add a cheap extension method to check if the player is an elevator that way
nope
if your still doing the cached thing from before i would use that
is there a basegame way to track footprints from damage?
AttackerDamageHandler has a footprint of the attacker
Or wdym
i thought that was exiled

well i can cast it right
cast the damagehandler to attackerhandler?
yes
yes
good call, now I cache Vector3 -> relative position & ReferenceHub -> relative position
the frame delay isn't an issue for how cheap certain things get
uh
nvm
it doesn't work @worthy rune
wait sorry im stupid
didn't see the patch errored
my bad
xD all good
gets drowned in all the logs from plugins on init rip
ah yeah oops, removed the wrong instructions
sweet ty
:/
sup
public:
wat
how do I get the victim for a damagehandelr?
how did you obtain the damange handler in the first place
not the dumbest question someone here has asked
Yeah the template should contain the permissions if you use a "preset" card
Are forks of abandoned plugins allowed in #1336031121699377213
is there any event like onSentConsoleCommand?
no
patch CommandProcessor
exiled has one if you use it
theres the CommandExecute event
You may only post stuff you own, or with permissions from the original author
What if original author no longer devs for sl
You can still contact for permission
or there is license on the repo
was about to ask if it is MIT, can someone just fork and post
It's MIT
No issues then I guess
Is there a method to activate the alpha warhead?
Warhead.Start
thanks
public class StaminaUsageDisablerEffect : CustomPlayerEffect, IStaminaModifier
{
/// <inheritdoc />
public bool StaminaModifierActive => IsEnabled;
/// <inheritdoc />
public float StaminaUsageMultiplier => 0;
/// <inheritdoc />
public override EffectClassification Classification => EffectClassification.Positive;
}
me when i

Hi Eve
hi there
How're you doing
im good
That's good
what does rawNumber means in Cassie.CalculateDuration?
You know you've been like my hero for these past weeks cause it seems like you're the only person talking about things I actually have a problem with @hearty shard lmao
You are!
Like recently I was dicking around with voice messages and you were one of the few people who actually was talking about voice channel stuff

Though it doesn't help that Discord search sucks really badly
I have to search for a while to find shit lmao
me patching out exiled events just because i want to set certain things
Just uh don't use exiled :p
real
other mods req it
can somebody pls tell me what rawNumber means in Cassie.CalculateDuration?
make everything custom
Then don't use those mods 🤷

Why do you need it?
we moving to labapi but waiting on projMER
I just want to know what it is for!
gimme a sec
lol
converting numbers to thousands
already 642 servers with exiled
hundred
3 days ago was 666
etc
It appears it's just used to prevent recursion
ohhh, can you explain how I should use it?
what
thanks
rawNumber is used here
ye
When you first pass a number into Cassie like "42" it'll come back as "forty-two" and won't check again
when its false it runs that
?? read?
@severe cave tl;dr: you have no reason to fuck with rawNumber
Leave it alone
Don't touch it
I just needed to pass it in a coroutine like waiting seconds or something like that
bro
with magic and friendship
thanks!
🐴
OHH nice one
i will touch it
but why it
you reg the effects into the prefab GO
isnt you need to run the init after you regged all?
jk
Poor cassie
You guys like my plugin entry?
im gonna oil that cassie up

DUUUUDE WTHH
why not PatchAll?
why what
Cause for some reason it wasn't working for me lmao

I did Harmony.PatchAll() and had all my attributes and it ended up completely just not registering my patches for some reason
use .PatchAll()
and maybe you can RegisterEventsHandler with Reflection
but if you know reflection
better make IModule system
void Enable();
void Disable();
do you guys like my entry 
how you call interface?
why wrong naming

mscorlib.dll adds functionality from standard 2.1
who needs to configure
Wym

