REM-Client 49bca0f3: clans - Player window page Clan, clan tag, clan system rules (rem-server 6827d41)

This commit is contained in:
2026-11-10 21:45:03 +01:00
parent 370e502001
commit 2f9dd32882
4 changed files with 234 additions and 3 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
REM-Client test build (64-bit)
date: 2026-11-10 21:22
commit: a3c20c52 (main)
subject: Pilots: Now / Why / In its hold / Last steps on the pilot page; pilots' trades in the trade log (rem-server c658c42)
date: 2026-11-10 21:43
commit: 49bca0f3 (main)
subject: Merge clans: Player window page Clan (members, bank & depot, ranks, log, diplomacy, NPC profile, upkeep), clan tag, clan system rules
tree: clean
build: OK
Binary file not shown.
+5
View File
@@ -433,6 +433,11 @@
<div class="panel sys-head">
<div><div class="t">{{ sys_title }}</div><div class="hint">{{ sys_line }}</div></div>
<div class="actions sys-claim" data-if="sys_can_claim"><div class="btn primary" data-action="claim">{{ claim_text }}<div class="tip">Claims this system for you, for good. You can build here then.</div></div></div>
<div class="actions sys-claim" data-if="sys_clan_rules">
<div class="btn" data-class-primary="sys_war_fire" data-action="warfire">War: {{ sys_war_fire ? 'fire' : 'hold' }}<div class="tip">Fire: the platforms shoot at pilots of clans at war with yours and the stations shut them out - over the objects' own rules.</div></div>
<div class="btn" data-class-primary="sys_ally_safe" data-action="allysafe">Allies: {{ sys_ally_safe ? 'safe' : 'by rules' }}<div class="tip">Safe: the platforms spare pilots of allied clans and the open stations let them dock.</div></div>
</div>
<div class="actions sys-claim" data-if="sys_to_clan"><div class="btn" data-action="toclan">Give to the clan<div class="tip">Your clan owns this system then: members manage it by their rank's right Claims, the whole clan counts as its owner (platforms, docking). It cannot be taken back.</div></div></div>
</div>
<div class="panel" data-if="sys_can_name">
<div class="namefield"><span class="label">Name this system</span><input class="text" type="text" data-value="sys_name_in" maxlength="24"/></div>
+226
View File
@@ -30,6 +30,37 @@
.coin-log .row .c2.plus { color: #5fd08a; }
.coin-log .row .c3 { width: 80dp; }
.coin-log .row .c4 { flex: 1; color: #8197ad; }
/* the page Clan */
.clan-head { display: flex; flex-direction: row; align-items: center; margin-bottom: 8dp; }
.clan-head .tagname { font-family: "Saira SemiCondensed"; font-weight: 600; font-size: 22dp; letter-spacing: 0.8dp; }
.clan-head .sw { width: 14dp; height: 14dp; margin-right: 10dp; border: 1dp #dbe6f0; }
.clan-head .chip { margin-left: 10dp; }
.clan-head .spacer { flex: 1; }
.swatches { display: flex; flex-direction: row; margin: 4dp 0 10dp 0; }
.swatches .sw { width: 26dp; height: 18dp; margin-right: 6dp; border: 1dp #24405c; }
.swatches .sw.selected { border: 2dp #f2b13c; }
.cl-table .row .c1 { flex: 1; }
.cl-table .row .c2 { width: 120dp; color: #8197ad; }
.cl-table .row .c3 { width: 170dp; text-align: right; font-family: "IBM Plex Mono"; color: #8197ad; }
.cl-table .row .c3.on { color: #6fd08c; }
.cl-table .row .c3.war { color: #ef6a5b; }
.hint.debt { color: #ef6a5b; }
.cl-table .row .btn.small { padding: 0dp 6dp; margin: 0 4dp; }
.cl-table .head .c1 { flex: 1; } .cl-table .head .c2 { width: 120dp; } .cl-table .head .c3 { width: 170dp; text-align: right; }
.cl-log .row .c1 { width: 130dp; font-family: "IBM Plex Mono"; color: #8197ad; }
.cl-log .row .c2 { width: 130dp; }
.cl-log .row .c3 { flex: 1; width: auto; color: #b9cbe0; text-align: left; font-family: Barlow; margin-left: 10dp; }
.cl-items .row .c1 { flex: 1; }
.cl-items .row .c3 { width: 80dp; text-align: right; font-family: "IBM Plex Mono"; }
.amount { display: flex; flex-direction: row; align-items: center; margin: 8dp 0; }
.amount .label { margin-right: 10dp; color: #8197ad; }
.amount input.range { flex: 1; margin-right: 10dp; }
.amount .v { width: 70dp; text-align: right; font-family: "IBM Plex Mono"; margin-right: 10dp; }
.right { display: flex; flex-direction: row; align-items: center; padding: 5dp 8dp; margin-bottom: 2dp; border-left: 3dp #24405c; background-color: #5cc8f008; }
.right.on { border-left-color: #f2b13c; }
.right .n { flex: 1; }
.limits { display: flex; flex-direction: row; margin-top: 8dp; }
.limits .namefield { flex: 1; margin-right: 12dp; }
</style>
</head>
<body class="window medium" data-model="player">
@@ -47,6 +78,7 @@
<div class="item" data-class-active="page == 1" data-action="page" data-arg="1"><img class="ico" src="3db:INTERFACE/REM/IMAGES/icon_rank.3db"/><span>Skills</span></div>
<div class="item" data-class-active="page == 2" data-action="page" data-arg="2"><img class="ico" src="3db:INTERFACE/REM/IMAGES/icon_economy.3db"/><span>Account bank</span></div>
<div class="item" data-class-active="page == 3" data-action="page" data-arg="3"><img class="ico" src="3db:INTERFACE/REM/IMAGES/stat_rating_icon.3db"/><span>REM Coin</span></div>
<div class="item" data-class-active="page == 4" data-action="page" data-arg="4"><img class="ico" src="3db:INTERFACE/REM/IMAGES/icon_rank.3db"/><span>Clan</span></div>
</div>
<div class="content">
<div data-if="page == 0">
@@ -117,6 +149,200 @@
</div>
</div>
</div>
<!-- ================================================= CLAN (rem_ui_clan.cpp) -->
<div class="colm" data-if="page == 4 &amp;&amp; !cl_in">
<h3>Clan</h3>
<div class="hint" style="margin: 6dp 0 12dp 0;">A clan is your own faction: members with ranks, a clan bank and a clan depot. Membership is per character.</div>
<div data-if="cl_invites.size > 0">
<h3 style="margin-bottom: 6dp;">Invitations</h3>
<div class="table cl-table" style="margin-bottom: 14dp;">
<div class="body">
<div class="row" data-for="i : cl_invites">
<span class="c1">{{ i.a }}</span><span class="c2">{{ i.b }}</span>
<span class="btn primary" data-action="cl-accept" data-attr-data-arg="i.key">Join</span>
<span class="btn" data-action="cl-decline" data-attr-data-arg="i.key">Decline</span>
</div>
</div>
</div>
</div>
<h3 style="margin-bottom: 6dp;">Found a clan</h3>
<div class="namefield"><span class="label">Tag</span><input class="text" type="text" data-value="cl_tag_in" maxlength="16"/></div>
<div class="namefield"><span class="label">Name</span><input class="text" type="text" data-value="cl_name_in" maxlength="64"/></div>
<div class="label">Colour</div>
<div class="swatches"><div class="sw" data-for="k : cl_colors" data-class-selected="k.selected" data-style-background-color="'#' + k.color" data-action="cl-color" data-attr-data-arg="k.key"></div></div>
<div class="actions"><div class="btn primary" data-action="cl-create">Found for {{ cl_cost }} credits<div class="tip">The credits come from your ship. You lead the clan; invite pilots afterwards.</div></div></div>
<div class="hint" data-if="cl_msg != ''" style="color: #f2b13c;">{{ cl_msg }}</div>
</div>
<div class="colm" data-if="page == 4 &amp;&amp; cl_in">
<div class="clan-head">
<div class="sw" data-style-background-color="'#' + cl_color"></div>
<span class="tagname" data-style-color="'#' + cl_color">{{ cl_head }}</span>
<span class="spacer"></span>
<span class="chip">Rank <span class="v">{{ cl_me }}</span></span>
<span class="chip">Clan bank <span class="v">{{ cl_bank }}</span></span>
</div>
<div class="subtabs">
<div class="tab" data-class-active="cl_sub == 0" data-action="cl-sub" data-arg="0">Members</div>
<div class="tab" data-class-active="cl_sub == 1" data-action="cl-sub" data-arg="1">Bank &amp; depot</div>
<div class="tab" data-class-active="cl_sub == 2" data-action="cl-sub" data-arg="2">Ranks</div>
<div class="tab" data-class-active="cl_sub == 3" data-action="cl-sub" data-arg="3">Log</div>
<div class="tab" data-class-active="cl_sub == 5" data-action="cl-sub" data-arg="5">Diplomacy</div>
<div class="tab" data-class-active="cl_sub == 6" data-action="cl-sub" data-arg="6">NPC profile</div>
<div class="tab" data-class-active="cl_sub == 4" data-action="cl-sub" data-arg="4">Clan</div>
</div>
<!-- members -->
<div class="colm" data-if="cl_sub == 0">
<div class="table cl-table" style="flex: 1;">
<div class="head"><span class="c1">Pilot</span><span class="c2">Rank</span><span class="c3">Online</span></div>
<div class="body">
<div class="row" data-for="m : cl_members" data-class-selected="m.selected" data-action="cl-member" data-ctx="cl-member-menu" data-attr-data-arg="m.key">
<span class="c1">{{ m.a }}</span><span class="c2">{{ m.b }}</span><span class="c3" data-class-on="m.on">{{ m.c }}</span>
</div>
</div>
</div>
<div class="hint" style="margin: 6dp 0;">Right click a member: rank, leader, remove.</div>
<div class="namefield" data-if="cl_may_invite"><span class="label">Invite pilot</span><input class="text" type="text" data-value="cl_invite_in" maxlength="40"/><div class="btn primary" data-action="cl-invite" style="margin-left: 8dp;">Invite<div class="tip">The pilot must be online; the invitation stays open for two days.</div></div></div>
<div class="actions"><div class="btn" data-action="cl-leave">Leave the clan<div class="tip">The leader hands the clan over first (right click a member: Make the leader).</div></div></div>
</div>
<!-- bank and depot -->
<div class="split" data-if="cl_sub == 1">
<div class="colm gap">
<h3>Clan bank</h3>
<div class="big-num">{{ cl_bank }}</div>
<div class="namefield"><span class="label">Amount</span><input class="text" type="text" data-value="cl_amount_in" maxlength="13"/></div>
<div class="actions">
<div class="btn primary" data-action="cl-bankin">Pay in<div class="tip">Moves the amount from your ship's credits into the clan bank.</div></div>
<div class="btn primary" data-if="cl_may_bankout" data-action="cl-bankout">Take out<div class="tip">Moves the amount from the clan bank to your ship (your rank's daily limit).</div></div>
</div>
<div class="hint">{{ cl_limits }}</div>
<div class="hint" data-class-debt="cl_debt">{{ cl_upkeep }}</div>
<h3 style="margin-top: 14dp;">Your cargo</h3>
<div class="table cl-items" style="flex: 1;">
<div class="body">
<div class="empty" data-if="!cl_docked">Dock at a base to store items.</div>
<div class="empty" data-if="cl_docked &amp;&amp; cl_cargo.size == 0">Nothing in the hold.</div>
<div class="row" data-for="r : cl_cargo" data-class-selected="r.selected" data-action="cl-pick-cargo" data-attr-data-arg="r.key"><span class="c1">{{ r.a }}</span><span class="c3">{{ r.c }}</span></div>
</div>
</div>
</div>
<div class="colm">
<h3>Clan depot</h3>
<div class="table cl-items" style="flex: 1;">
<div class="head"><span class="c1">Item</span><span class="c3">Amount</span></div>
<div class="body">
<div class="empty" data-if="cl_depot.size == 0">The clan depot is empty.</div>
<div class="row" data-for="r : cl_depot" data-class-selected="r.selected" data-action="cl-pick-depot" data-attr-data-arg="r.key"><span class="c1">{{ r.a }}</span><span class="c3">{{ r.c }}</span></div>
</div>
</div>
<div class="amount">
<span class="label">Amount</span>
<input class="range" type="range" min="1" step="1" data-attr-max="cl_qty_max" data-value="cl_qty"/>
<span class="v">{{ cl_qty_text }}</span>
<div class="btn" data-action="cl-qty-max">Max</div>
</div>
<div class="actions">
<div class="btn primary" data-if="cl_docked" data-action="cl-store">Store in the clan depot<div class="tip">Moves the amount of the cargo item you picked into the clan depot - at any base.</div></div>
<div class="btn primary" data-if="cl_docked &amp;&amp; cl_may_depotout" data-action="cl-take">Take to the hold<div class="tip">Moves the amount of the depot item you picked into your hold (your rank's daily limit).</div></div>
</div>
</div>
</div>
<!-- ranks: the four on the left, the picked one's rights and limits on the right -->
<div class="split" data-if="cl_sub == 2">
<div class="colm gap" style="flex: 0.8;">
<div class="table cl-table" style="flex: 1;">
<div class="body">
<div class="row" data-for="r : cl_ranks" data-class-selected="r.selected" data-action="cl-rank" data-attr-data-arg="r.key"><span class="c1">{{ r.a }}</span><span class="c2">{{ r.b }}</span></div>
</div>
</div>
<div class="hint" style="margin-top: 8dp;">Only the leader changes the ranks. The leader has every right.</div>
</div>
<div class="colm">
<div class="namefield"><span class="label">Name</span><input class="text" type="text" data-value="cl_rk_name" maxlength="24"/></div>
<div class="right" data-for="x : cl_rights" data-class-on="x.on" data-action="cl-right" data-attr-data-arg="x.key"><span class="n">{{ x.a }}</span><span>{{ x.on ? 'yes' : 'no' }}</span></div>
<div class="limits" data-if="cl_rank_pick != 0">
<div class="namefield"><span class="label">Credits / day</span><input class="text" type="text" data-value="cl_rk_bank" maxlength="12"/></div>
<div class="namefield"><span class="label">Items / day</span><input class="text" type="text" data-value="cl_rk_depot" maxlength="8"/></div>
</div>
<div class="hint">-1: no limit, 0: nothing.</div>
<div class="actions" data-if="cl_leader"><div class="btn primary" data-action="cl-rank-save">Save the rank</div></div>
</div>
</div>
<!-- log -->
<div class="colm" data-if="cl_sub == 3">
<div class="table cl-log" style="flex: 1;">
<div class="body">
<div class="empty" data-if="cl_log.size == 0">Nothing yet.</div>
<div class="row" data-for="l : cl_log"><span class="c1">{{ l.a }}</span><span class="c2">{{ l.b }}</span><span class="c3">{{ l.c }}</span></div>
</div>
</div>
<div class="actions"><div class="btn" data-action="cl-refresh">Refresh</div></div>
</div>
<!-- the clan: colour, description, disband -->
<div class="colm" data-if="cl_sub == 4">
<div class="hint" style="margin-bottom: 8dp;">Founded {{ cl_founded }}.</div>
<div class="label">Colour</div>
<div class="swatches"><div class="sw" data-for="k : cl_colors" data-class-selected="k.selected" data-style-background-color="'#' + k.color" data-action="cl-color" data-attr-data-arg="k.key"></div></div>
<div class="namefield"><span class="label">Description</span><input class="text" type="text" data-value="cl_desc_in" maxlength="500"/></div>
<div class="actions" data-if="cl_may_edit"><div class="btn primary" data-action="cl-edit">Save</div></div>
<div data-if="cl_leader" style="margin-top: 24dp;">
<h3 style="margin-bottom: 6dp;">Disband</h3>
<div class="hint" style="margin-bottom: 6dp;">Ends the clan for good - the clan bank and the clan depot are lost. Type the tag to confirm.</div>
<div class="namefield"><span class="label">Tag</span><input class="text" type="text" data-value="cl_disband_in" maxlength="16"/><div class="btn danger" data-action="cl-disband" style="margin-left: 8dp;">Disband</div></div>
</div>
</div>
<!-- diplomacy: the other clans, the picked one's stance -->
<div class="colm" data-if="cl_sub == 5">
<div class="table cl-table" style="flex: 1;">
<div class="head"><span class="c1">Clan</span><span class="c2">Stances</span><span class="c3">Relation</span></div>
<div class="body">
<div class="empty" data-if="cl_rels.size == 0">No other clans yet.</div>
<div class="row" data-for="r : cl_rels" data-class-selected="r.selected" data-action="cl-rel" data-attr-data-arg="r.key">
<span class="c1" data-style-color="'#' + r.color">{{ r.a }}</span><span class="c2">{{ r.b }}</span><span class="c3" data-class-war="r.on">{{ r.c }}</span>
</div>
</div>
</div>
<div class="hint" style="margin: 6dp 0;">{{ cl_rel_info }}</div>
<div class="actions" data-if="cl_may_diplo">
<div class="btn" data-action="cl-diplo" data-arg="ally">Ally<div class="tip">An alliance holds once both clans say ally: green for each other, their stations and platforms let you be.</div></div>
<div class="btn" data-action="cl-diplo" data-arg="neutral">Neutral<div class="tip">Ends an alliance, offers peace in a war (the war ends when no side keeps it).</div></div>
<div class="btn danger" data-action="cl-diplo" data-arg="war">Declare war<div class="tip">News at once; the war begins after the delay. Red for each other, your clan's platforms fire at them, your stations shut them out. PVE characters are never part of a war.</div></div>
</div>
<div class="hint">{{ cl_diplo_costs }} Only between players - NPCs keep their own reputations.</div>
</div>
<!-- NPC profile: the clan's reputations towards the NPC factions, taking them, the tag -->
<div class="colm" data-if="cl_sub == 6">
<div class="hint" style="margin-bottom: 6dp;">{{ cl_prof_info }}</div>
<div class="table cl-table" style="flex: 1;">
<div class="head"><span class="c1">Faction</span><span class="c2">Profile</span><span class="c3">Yours now</span></div>
<div class="body">
<div class="row" data-for="p : cl_prof" data-class-selected="p.selected">
<span class="c1">{{ p.a }}</span>
<span class="btn small" data-if="cl_may_profile" data-action="cl-prof-down" data-attr-data-arg="p.key">&#8592;</span>
<span class="c2" style="text-align: center;">{{ p.b }}</span>
<span class="btn small" data-if="cl_may_profile" data-action="cl-prof-up" data-attr-data-arg="p.key">&#8594;</span>
<span class="c3" data-class-on="p.on">{{ p.c }}</span>
</div>
</div>
</div>
<div class="actions">
<div class="btn primary" data-if="cl_has_profile" data-action="cl-adopt">{{ cl_adopt_text }}<div class="tip">Sets your NPC reputations to the profile. Taken whole you carry the clan's tag where your faction was. Free once after the profile changed.</div></div>
<div class="btn" data-if="cl_tagged" data-action="cl-untag">Drop the tag</div>
<div class="btn primary" data-if="cl_may_profile &amp;&amp; cl_prof_dirty" data-action="cl-prof-save">Save the profile</div>
<div class="btn" data-if="cl_prof_dirty" data-action="cl-prof-reset">Undo</div>
</div>
<div class="hint">The Nomads are hostile to everyone - they are no part of a profile. The tag stays until you drop it or leave the clan.</div>
</div>
<div class="hint" data-if="cl_msg != ''" style="color: #f2b13c;">{{ cl_msg }}</div>
</div>
</div>
</div>
<div class="win-foot">