-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding region settings for Combat2 #1640
base: develop
Are you sure you want to change the base?
Conversation
…gs. Processed by LLFloaterRegionInfo. Does not tie into UI yet.
… Combat2 values on the simulator.
…rt to landing point on death.
…' into rider/Combat2 fixing conflicts
left="250" | ||
name="Combat" | ||
top="110" | ||
width="220"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to hide this, then I'd add
width="220"> | |
width="220" | |
visibility_control="Combat2ShowExperimentalUI"> |
and add the following to the bottom of settings.xml:
<key>Combat2ShowExperimentalUI</key>
<map>
<key>Comment</key>
<string>Enable Combat2 UI support</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
@@ -500,7 +522,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) | |||
panel->getChild<LLUICtrl>("block_terraform_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_TERRAFORM)); | |||
panel->getChild<LLUICtrl>("block_fly_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_FLY)); | |||
panel->getChild<LLUICtrl>("block_fly_over_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_FLYOVER)); | |||
panel->getChild<LLUICtrl>("allow_damage_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_DAMAGE)); | |||
panel->getChild<LLUICtrl>("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these should probably be true
and false
. the BOOL->bool changes have merged into this branch
panel->getChild<LLUICtrl>("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? TRUE : FALSE); | ||
|
||
panel->getChild<LLUICtrl>("combat_restrict_log")->setValue((combat_flags & REGION_COMBAT_FLAG_RESTRICT_LOG) ? TRUE : FALSE); | ||
panel->getChild<LLUICtrl>("combat_allow_damage_adjust")->setValue((combat_flags & REGION_COMBAT_FLAG_DAMAGE_ADJUST) ? TRUE : FALSE); | ||
panel->getChild<LLUICtrl>("combat_restore_health")->setValue((combat_flags & REGION_COMBAT_FLAG_RESTORE_HEALTH) ? TRUE : FALSE); | ||
panel->getChild<LLUICtrl>("combat_on_death")->setValue(on_death); | ||
panel->getChild<LLUICtrl>("combat_dps_spin")->setValue(damage_throttle); | ||
panel->getChild<LLUICtrl>("combat_hps_spin")->setValue(regeneration_rate); | ||
panel->getChild<LLUICtrl>("combat_invuln_spin")->setValue(invulnerability_time); | ||
|
||
BOOL combat2_enabled = ((region_flags & REGION_FLAGS_ALLOW_DAMAGE) && supports_combat2) ? TRUE : FALSE; | ||
|
||
panel->getChild<LLUICtrl>("combat_restrict_log")->setEnabled(combat2_enabled); | ||
panel->getChild<LLUICtrl>("combat_allow_damage_adjust")->setEnabled(combat2_enabled); | ||
panel->getChild<LLUICtrl>("combat_restore_health")->setEnabled(combat2_enabled); | ||
panel->getChild<LLUICtrl>("combat_on_death")->setEnabled(combat2_enabled); | ||
panel->getChild<LLUICtrl>("combat_dps_spin")->setEnabled(combat2_enabled); | ||
panel->getChild<LLUICtrl>("combat_hps_spin")->setEnabled(combat2_enabled); | ||
panel->getChild<LLUICtrl>("combat_invuln_spin")->setEnabled(combat2_enabled); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more BOOL->bool changes in this block
Adds a number of fields to the Region tab of the Region/Estate floater and allows them to be set from the viewer. Also looks for the optional
CombatSettings
block when processing region settings for display. If the block is missing will disable non-relevant fields.