<commit_before>package org.runestar.client.plugins.dev

import org.runestar.client.game.api.SceneObject
import org.runestar.client.game.api.live.Game
import org.runestar.client.game.api.live.LiveCanvas
import org.runestar.client.game.api.live.LiveViewport
import org.runestar.client.game.api.live.SceneObjects
import org.runestar.client.game.raw.access.XScene
import org.runestar.client.plugins.spi.PluginSettings
import org.runestar.client.utils.DisposablePlugin
import java.awt.Color

class ObjectClickBoxDebug : DisposablePlugin<PluginSettings>() {

    override val defaultSettings = PluginSettings()

    private val objs: MutableSet<SceneObject> = LinkedHashSet()

    override fun start() {
        add(XScene.clear.exit.subscribe { objs.clear() })
        add(SceneObjects.removals.filter(SceneObject::isInteractable).subscribe { objs.remove(it) })
        add(SceneObjects.additions.filter(SceneObject::isInteractable).subscribe { objs.add(it) })

        val color = Color(0, 255, 255, 80)
        add(LiveCanvas.repaints.subscribe { g ->
            g.color = color
            val viewport = LiveViewport.shape
            objs.forEach {
                val loc = it.location
                if (loc.plane != Game.plane || Game.visibilityMap.isVisible(loc)) return@forEach
                val pt = loc.center.toScreen() ?: return@forEach
                if (pt !in viewport) return@forEach
                it.models.forEach {
                    g.fill(it.objectClickBoxOutline())
                }
            }
        })
    }
}<commit_msg>Invert tile visibility check in ObjectClickBox plugin<commit_after>package org.runestar.client.plugins.dev

import org.runestar.client.game.api.SceneObject
import org.runestar.client.game.api.live.Game
import org.runestar.client.game.api.live.LiveCanvas
import org.runestar.client.game.api.live.LiveViewport
import org.runestar.client.game.api.live.SceneObjects
import org.runestar.client.game.raw.access.XScene
import org.runestar.client.plugins.spi.PluginSettings
import org.runestar.client.utils.DisposablePlugin
import java.awt.Color

class ObjectClickBoxDebug : DisposablePlugin<PluginSettings>() {

    override val defaultSettings = PluginSettings()

    private val objs: MutableSet<SceneObject> = LinkedHashSet()

    override fun start() {
        add(XScene.clear.exit.subscribe { objs.clear() })
        add(SceneObjects.removals.filter(SceneObject::isInteractable).subscribe { objs.remove(it) })
        add(SceneObjects.additions.filter(SceneObject::isInteractable).subscribe { objs.add(it) })

        val color = Color(0, 255, 255, 80)
        add(LiveCanvas.repaints.subscribe { g ->
            g.color = color
            val viewport = LiveViewport.shape
            objs.forEach {
                val loc = it.location
                if (loc.plane != Game.plane || !Game.visibilityMap.isVisible(loc)) return@forEach
                val pt = loc.center.toScreen() ?: return@forEach
                if (pt !in viewport) return@forEach
                it.models.forEach {
                    g.fill(it.objectClickBoxOutline())
                }
            }
        })
    }
}
{'fraction_non_alphanumeric': 0.10758489368454459, 'fraction_numerical': 0.005712472231037766, 'mean_word_length': 2.7748502994011974, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1922066', 'n_tokens_mistral': 957, 'n_tokens_neox': 911, 'n_words': 154}