Jump to content

Add button


Recommended Posts

Hi everyone,

Starting from here:
https://github.com/GhChancellor/Oni-DoorOverhaul

I would like add a button as in the picture, there is an easy template to study?
I would like to interact with door.

This is my first mod for Oxygen Not Included, and I'm calling it "Trap Door". It's a POC to showcase my current abilities and work.

Add a button:
I try this code but can't run it

https://github.com/Sgt-Imalas/Sgt_Imalas-Oni-Mods/blob/284b32141b596475adf4d03833417ddb6b43ef4f/ConveyorTiles/ConveyorTileSM.cs#L119C9-L121C301

Line 120, OnPrefabInit() : error CS0507

I created a new project from here:
https://github.com/Sgt-Imalas/Sgt_Imalas-Oni-Mods/tree/284b32141b596475adf4d03833417ddb6b43ef4f/ConveyorTiles

I've identified that error CS0507 persists on my system.

I'm still learning C#, so any advice is welcome!

Thank you
Lele

 

Schermata_del_2024-05-19_09-50-38.png

Link to comment
https://forums.kleientertainment.com/forums/topic/156909-add-button/
Share on other sites

dude, I already explained twice what was wrong with your code

My references are publicized so everything is public.

unless you also do that, the override for OnPrefabInit has to be marked as protected, not public

 

this is also explained in the readme of the GitHub repo

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...