Merge pull request #806 from The-E/ship_weapon_flags

Converts the flags of ship_weapon to use the new flag system
This commit is contained in:
m!m authored and GitHub committed 2016-08-16 11:37:01 +02:00
commit 31fdcfdfbb
11 files changed
+120 -71

No files matched your search

+2 -6
View File
@@ -7686,14 +7686,10 @@ ADE_VIRTVAR(TurretLocked, l_Subsystem, "boolean", "Whether the turret is locked.
if(ADE_SETTING_VAR)
{
if (newVal) {
sso->ss->weapons.flags |= SW_FLAG_TURRET_LOCK;
} else {
sso->ss->weapons.flags &= (~SW_FLAG_TURRET_LOCK);
}
sso->ss->weapons.flags.set(Ship::Weapon_Flags::Turret_Lock, newVal);
}
return ade_set_args(L, "b", (sso->ss->weapons.flags & SW_FLAG_TURRET_LOCK));
return ade_set_args(L, "b", (sso->ss->weapons.flags[Ship::Weapon_Flags::Turret_Lock]));
}
ADE_VIRTVAR(NextFireTimestamp, l_Subsystem, "number", "The next time the turret may attempt to fire", "number", "Mission time (seconds) or -1 on error")