Skip to content

Use dota-lua-types#1

Merged
Perryvw merged 8 commits intomasterfrom
use-dota-lua-types
May 31, 2020
Merged

Use dota-lua-types#1
Perryvw merged 8 commits intomasterfrom
use-dota-lua-types

Conversation

@ark120202
Copy link
Copy Markdown
Collaborator

No description provided.

@ark120202 ark120202 requested a review from Perryvw February 1, 2020 01:00
Comment thread game/scripts/vscripts/GameMode.ts Outdated
if (unit.IsRealHero()) {
Timers.CreateTimer(1, () => {
unit.AddNewModifier(undefined, undefined, "modifier_panic", { duration: 8 });
modifier_panic.apply(unit, undefined, undefined, { duration: 8 });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a nice way of doing this, but I think we should stick to the original API for this. Advanced users can come up with this themself or maybe read it somewhere else.

Comment thread game/scripts/vscripts/lib/tstl-utils.ts
import { BaseAbility, registerAbility } from "../../../lib/dota_ts_adapter";

@luaAbility
class meepo_earthbind_ts_example extends CDOTA_Ability_Lua {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this change. I already don't like how un-transparent this is, and I don't think this really helps.

@luaAbility
class meepo_earthbind_ts_example extends CDOTA_Ability_Lua {
@registerAbility("meepo_earthbind_ts_example")
export class meepo_earthbind_ts_example extends BaseAbility {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we can also remove BaseAbility?

Comment thread game/scripts/vscripts/GameMode.ts
@ark120202 ark120202 marked this pull request as ready for review May 30, 2020 15:39
}

const [env, source] = getFileScope();
const [fileName] = string.gsub(source, ".*scripts[\\/]vscripts[\\/]", "");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is even more intransparant, I prefer the name as string parameter to the decorator

@Perryvw Perryvw merged commit 55c26e1 into master May 31, 2020
@Perryvw Perryvw deleted the use-dota-lua-types branch May 31, 2020 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants