assyrianic / SourceGo

SourceGo is a transpiler that transforms a subset of Golang-like code to equivalent SourcePawn.
https://forums.alliedmods.net/showthread.php?t=328269
MIT License
25 stars 3 forks source link

Future: Revamp interface for `GetEntProp*` #9

Closed assyrianic closed 1 year ago

assyrianic commented 2 years ago

int GetEntProp(int entity, PropType type, const char[] prop, int size, int element); could work where, depending on the known type of the data, it could return much needed data.

the Go2SP interface would be:


// 'Props' is a fake member of type 'map[string]any'
// accessible by all 'Entity' types.

// get prop data
prop_data := client.Props[prop]

// set prop data
client.Props[prop] = data
assyrianic commented 1 year ago

nah, this improvement doesn't really solve any issue.