Skip to content

Commit

Permalink
1.3.0: Compatibility Update
Browse files Browse the repository at this point in the history
  • Loading branch information
zcraftelite9495 committed Jan 8, 2025
1 parent e351ff4 commit f6faf96
Show file tree
Hide file tree
Showing 8 changed files with 2,952 additions and 3,110 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@

# Changelog: 1.1.0
* ➕ Added an easter egg to the game to make things more interesting.
* 🔄 Re-laid out the code to make it more readable.
* 🔄 Re-laid out the code to make it more readable.

# Changelog: 1.2.0
* ➕ Added feature to remove the jump-off collider, fixing the bug where you could sometimes still bounce off of NPCs

# Changelog: 1.3.0
* ➕ Compatibility Update: Updated compatibility for ATLYSS v1.6.2b
Binary file modified LemmeKissDaNPC.dll
Binary file not shown.
5,972 changes: 2,905 additions & 3,067 deletions LemmeKissDaNPC.sublime-workspace

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@

## A Mod for ATLYSS

<img src="https://img.shields.io/badge/Version-1.2.0-green" alt="Version Badge"> <img src="https://img.shields.io/badge/Development_Stage-stable-green" alt="Development Stage Badge">
<img src="https://img.shields.io/badge/Version-1.3.0-green" alt="Version Badge"> <img src="https://img.shields.io/badge/Development_Stage-stable-green" alt="Development Stage Badge">

<img src="https://wakatime.com/badge/user/018db32b-732a-4704-b635-68d311538b3f/project/5dca42a2-1dbe-4c4a-bb78-2d805bb8d910.svg" alt="wakatime"> <img src="https://img.shields.io/github/languages/top/zcraftelite9495/lemmekissdanpc" alt="Top Language"> <img src="https://img.shields.io/github/stars/zcraftelite9495/lemmekissdanpc" alt="Stars Badge"> <img src="https://img.shields.io/github/forks/zcraftelite9495/lemmekissdanpc" alt="Forks Badge">

### What is this beautiful batch of code?
LemmeKissDaNPC is a mod designed for the ATLYSS game. This mod removes the hitbox from all NPCs (when possible) to allow you to get as close as possible to your favorite ATLYSS NPCs—because who wouldn’t want to share a sweet, hot, and sexy moment with your favorite NPC~

All jokes aside, this mod removes the magical forcefields (hitboxes) around NPCs. So if you have ever been annoyed from running into NPCs constantly while dashing, wanted to take some cute screenshots with your favorite NPCs, or wanting to do... whatever ya'll gooners wanna do, then this is the mod for you!
All jokes aside, this mod removes the magical forcefields (hitboxes) around NPCs. So if you have ever been annoyed from running into NPCs constantly while dashing, wanted to take some cute screenshots with your favorite NPCs, or wanting to do... whatever ya'll gooners wanna do, then this is the mod for you!

Credit for the original idea is Kief (xxkiefxx on Discord) who was semi-ranting to me over the fact he wanted to be closer to Skrit. As well as that, he was frustrated with dashing and then getting stopped by running into npcs (like many members of the ATLYSS community). So I made this beautiful mod for him and the community to ~~kiss their favorite NPCs~~ get rid of the terrible, horrible NPC forcefields.

### Prequisites

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LemmeKissDaNPC",
"version_number": "1.1.1",
"version_number": "1.2.0",
"website_url": "https://github.com/zcraftelite9495/LemmeKissDaNPC",
"description": "ATLYSS mod to allow you to not get pushed back by the foul NPC forcefields.",
"dependencies": [
Expand Down
Binary file modified releases/v1.2.0.zip
Binary file not shown.
Binary file added releases/v1.3.0.zip
Binary file not shown.
74 changes: 35 additions & 39 deletions src/LemmeKissTheNPC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Reflection;
using UnityEngine;

[BepInPlugin("com.zcraftelite.lemmekissdanpc", "Lemme Kiss Da NPC", "1.2.0")]
[BepInPlugin("com.zcraftelite.lemmekissdanpc", "Lemme Kiss Da NPC", "1.3.0")]
public class LemmeKissDaNPC : BaseUnityPlugin
{
private HashSet<string> processedNpcsWithoutCollider = new HashSet<string>();
Expand All @@ -30,7 +30,7 @@ private void Awake()
private void Start()
{
Logger.LogInfo("LemmeKissDaNPC Loaded!");
Logger.LogInfo("LemmeKissDaNPC is version 1.2.0.");
Logger.LogInfo("LemmeKissDaNPC is version 1.3.0.");

FuckSkritOver();
StartCoroutine(CheckAndModifyNpcColliders());
Expand Down Expand Up @@ -68,66 +68,62 @@ private bool IsEasterEggEnabled()
// Remove NPC Collision
// ---------------------------------------------

private Dictionary<string, (bool hasMainColliderChecked, bool hasJumpOffColliderChecked, bool hasWeirdColliderChecked)> npcColliderStatus = new Dictionary<string, (bool, bool, bool)>();

private IEnumerator CheckAndModifyNpcColliders()
{
while (true)
{
yield return new WaitForSeconds(1f);

CapsuleCollider[] colliders = Object.FindObjectsOfType<CapsuleCollider>();
foreach (CapsuleCollider collider in colliders)
GameObject[] npcs = GameObject.FindObjectsOfType<GameObject>();
foreach (GameObject npc in npcs)
{
GameObject npc = collider.gameObject;
if (npc.name.StartsWith("_npc_") && !processedNpcsWithoutCollider.Contains(npc.name))
if (npc.name.StartsWith("_npc_"))
{
// Process the NPC's CapsuleCollider
if (collider.radius != 0f || collider.height != 0f || collider.enabled != false)
// Initialize status if the NPC is new
if (!npcColliderStatus.ContainsKey(npc.name))
{
collider.radius = 0f;
collider.height = 0f;
collider.enabled = false;
Logger.LogInfo($"Modified CapsuleCollider for {npc.name}.");
npcColliderStatus[npc.name] = (false, false, false);
}

// Check for a child named _jumpOffCollider
Transform jumpOffCollider = npc.transform.Find("_jumpOffCollider");
if (jumpOffCollider != null)
var status = npcColliderStatus[npc.name];

// Check if the main CapsuleCollider exists and hasn't been checked
if (!status.hasMainColliderChecked)
{
CapsuleCollider childCollider = jumpOffCollider.GetComponent<CapsuleCollider>();
if (childCollider != null && (childCollider.radius != 0f || childCollider.height != 0f || childCollider.enabled != false))
CapsuleCollider mainCollider = npc.GetComponent<CapsuleCollider>();
if (mainCollider == null)
{
childCollider.radius = 0f;
childCollider.height = 0f;
childCollider.enabled = false;
Logger.LogInfo($"Modified CapsuleCollider for {npc.name}'s _jumpOffCollider.");
Logger.LogInfo($"No CapsuleCollider found for {npc.name}.");
status.hasMainColliderChecked = true; // Mark as checked, no need to look again
}
}

// Check for a child named _collider
Transform weirdCollider = npc.transform.Find("_collider");
if (weirdCollider != null)
// Check if the _jumpOffCollider exists and hasn't been checked
if (!status.hasJumpOffColliderChecked)
{
CapsuleCollider weirdChildCollider = weirdCollider.GetComponent<CapsuleCollider>();
if (weirdChildCollider != null && (weirdChildCollider.radius != 0f || weirdChildCollider.height != 0f || weirdChildCollider.enabled != false))
Transform jumpOffCollider = npc.transform.Find("_jumpOffCollider");
if (jumpOffCollider == null || jumpOffCollider.GetComponent<CapsuleCollider>() == null)
{
weirdChildCollider.radius = 0f;
weirdChildCollider.height = 0f;
weirdChildCollider.enabled = false;
Logger.LogInfo($"Modified CapsuleCollider for {npc.name}'s _collider.");
Logger.LogInfo($"No _jumpOffCollider found for {npc.name}.");
status.hasJumpOffColliderChecked = true; // Mark as checked, no need to look again
}
}
}
}

GameObject[] npcs = GameObject.FindObjectsOfType<GameObject>();
foreach (GameObject npc in npcs)
{
if (npc.name.StartsWith("_npc_") && !processedNpcsWithoutCollider.Contains(npc.name))
{
if (npc.GetComponent<CapsuleCollider>() == null)
// Check if the _collider exists and hasn't been checked
if (!status.hasWeirdColliderChecked)
{
processedNpcsWithoutCollider.Add(npc.name);
Transform weirdCollider = npc.transform.Find("_collider");
if (weirdCollider == null || weirdCollider.GetComponent<CapsuleCollider>() == null)
{
Logger.LogInfo($"No _collider found for {npc.name}.");
status.hasWeirdColliderChecked = true; // Mark as checked, no need to look again
}
}

// Update the dictionary with the latest status
npcColliderStatus[npc.name] = status;
}
}
}
Expand Down

0 comments on commit f6faf96

Please sign in to comment.