@@ -1310,7 +1310,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
if(value instanceof UnitType) type = UnitType.class;
|
||||
|
||||
if(builder != null && builder.isPlayer()){
|
||||
lastAccessed = builder.getPlayer().coloredName();
|
||||
updateLastAccess(builder.getPlayer());
|
||||
}
|
||||
|
||||
if(block.configurations.containsKey(type)){
|
||||
@@ -1324,6 +1324,10 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
}
|
||||
|
||||
public void updateLastAccess(Player player){
|
||||
lastAccessed = player.coloredName();
|
||||
}
|
||||
|
||||
/** Called when the block is tapped by the local player. */
|
||||
public void tapped(){
|
||||
|
||||
|
||||
@@ -734,7 +734,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
/** @return name of direct or indirect player controller. */
|
||||
@Override
|
||||
public @Nullable String getControllerName(){
|
||||
if(isPlayer()) return getPlayer().name;
|
||||
if(isPlayer()) return getPlayer().coloredName();
|
||||
if(controller instanceof LogicAI ai && ai.controller != null) return ai.controller.lastAccessed;
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
if(build == null || build.team() != player.team() || !build.block.commandable) continue;
|
||||
|
||||
build.onCommand(target);
|
||||
build.lastAccessed = player.name;
|
||||
build.updateLastAccess(player);
|
||||
|
||||
if(!state.isPaused() && player == Vars.player){
|
||||
Fx.moveCommand.at(target);
|
||||
@@ -596,7 +596,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
throw new ValidateException(player, "Player cannot rotate a block.");
|
||||
}
|
||||
|
||||
if(player != null) build.lastAccessed = player.name;
|
||||
if(player != null) build.updateLastAccess(player);
|
||||
int previous = build.rotation;
|
||||
build.rotation = Mathf.mod(build.rotation + Mathf.sign(direction), 4);
|
||||
build.updateProximity();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mindustry.ui.dialogs;
|
||||
|
||||
import arc.*;
|
||||
import arc.scene.ui.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import mindustry.gen.*;
|
||||
@@ -39,7 +40,7 @@ public class AdminsDialog extends BaseDialog{
|
||||
res.labelWrap("[lightgray]" + info.lastName).width(w - h - 24f);
|
||||
res.add().growX();
|
||||
res.button(Icon.cancel, () -> {
|
||||
ui.showConfirm("@confirm", "@confirmunadmin", () -> {
|
||||
ui.showConfirm("@confirm", Core.bundle.format("@confirmunadmin", info.lastName), () -> {
|
||||
netServer.admins.unAdminPlayer(info.id);
|
||||
Groups.player.each(player -> {
|
||||
if(player != null && !player.isLocal() && player.uuid().equals(info.id)){
|
||||
|
||||
Reference in New Issue
Block a user