Comments (5)
- g_things.getThingNameById(id)
- g_things.getThingIdByName(name)
Should these return an ItemType (OTB Type) or ThingType (DAT Type)?
- g_map.colorThing(thing, { r, g, b, a})
- g_map.removeThingColor(thing)
These functions sound expensive, i'll try to find another approach.
from forgottenmapeditor.
ItemType, they'll be used in search module :-)
from forgottenmapeditor.
The first one "getThingNameById" is already there:
local itemType = g_things.findItemTypeByClientId(id);
local itemName = itemType:getName()
The second one isn't, so i'm going to make it like so:
local itemType = g_things.findItemTypeByName(name);
local clientId = itemType:getClientId()
local serverId = itemType:getServerId()
(Being generic is better, because if I were not to make it generic, it would still use the same loop and everything)
from forgottenmapeditor.
OTClient's upstream commit edubart/otclient@5849136 implements g_things.findItemTypeByName
from forgottenmapeditor.
OTClient's upstream commit edubart/otclient@32647f1 implements:
- g_map.colorizeThing(thing, color)
- g_map.removeThingColor(thing)
Color can be in RGBA (a table) or a string (#ffffffff for example or just color name). Closing this now, open new issue if any bug.
from forgottenmapeditor.
Related Issues (20)
- Add support to old versions (7.6) HOT 3
- Bug - fast mapping HOT 7
- Floor bug HOT 3
- Live Mapping HOT 1
- Minimap bug
- UIMap:movePixels bug HOT 3
- Item Editor (Unique/Action ID, Description) etc. HOT 2
- Visual problems HOT 15
- Anoter UIMap:movePixels bug HOT 3
- Hotkeys - with sets. HOT 2
- Undo / Redo - issues HOT 2
- Selection brush HOT 3
- Placing Ground On Top of Another Ground HOT 1
- Minimap window HOT 2
- Minimap does not remove ghost items.
- New Map/File Manager HOT 10
- Automatic updates using lua-git? HOT 2
- Spawn related functions HOT 3
- Loading Map
- Save Error HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forgottenmapeditor.