Update 1.01

This commit is contained in:
SchnitzelPommes 2019-02-13 22:53:43 +01:00
parent 6476a5e526
commit d576657e5a
19 changed files with 150 additions and 143 deletions

View File

@ -84,7 +84,7 @@ class DeathHandler
{
msg = GetMessage(GetFileHandler().GetConfig("Welcome_Message_Join"), VName);
int count = msg.Replace("{Player}", player.GetName());
GetGame().ChatPlayer(0, msg);
GetGame().ChatPlayer(msg);
}
}
void KilledHandler(Object killer, PlayerBase pbKilled)
@ -108,7 +108,7 @@ class DeathHandler
{
if (OutMessage != "")
{
GetGame().ChatPlayer(0, OutMessage);
GetGame().ChatPlayer(OutMessage);
}
}
@ -237,7 +237,7 @@ class DeathHandler
string KilledBySuicide = GetFileHandler().GetConfig("KillFeed_Suicide");
Killedname = sbKilled.GetPFullName();
GetGame().ChatPlayer( 0, GetMessage(KilledBySuicide, Killedname));
GetGame().ChatPlayer(GetMessage(KilledBySuicide, Killedname));
// TL.all(GetMessage(KilledBySuicide, Killedname));
// TL.all(sbKilled.GetPFullName() + " took his own life");
@ -247,14 +247,14 @@ class DeathHandler
string KilledByPlayer = GetFileHandler().GetConfig("KillFeed_ByPlayer");
Killername = sbKiller.GetPFullName();
Killedname = sbKilled.GetPFullName();
GetGame().ChatPlayer( 0, GetMessage(KilledByPlayer, Killedname , Killername));
GetGame().ChatPlayer(GetMessage(KilledByPlayer, Killedname , Killername));
// TL.all(GetMessage(KilledByPlayer, Killedname, Killername));
}
} else
{
string KilledByBleed = GetFileHandler().GetConfig("KillFeed_Bleeding_Zombie");
Killedname = sbKilled.GetPFullName();
GetGame().ChatPlayer( 0, GetMessage(KilledByBleed, Killedname));
GetGame().ChatPlayer(GetMessage(KilledByBleed, Killedname));
// TL.all(GetMessage(KilledByBleed, Killedname));
}
}

View File

@ -137,7 +137,7 @@ class LogHandler
if ( GetGame().IsServer() )
{
GetGame().ChatPlayer(0, msg);
GetGame().ChatPlayer(msg);
}else{
ScriptRPC Rpc = new ScriptRPC();
Rpc.Write(msg);

View File

@ -35,7 +35,7 @@ modded class MissionGameplay
Print( " Mission Gameplay Constructor ");
m_LogHandler = new ref LogHandler();
// m_AdminMenuGui = new ref AdminMenuGui();
// m_PermissionBase = new ref PermissionBase;
m_PermissionBase = new ref PermissionBase;
devTeleport = new DevTeleport();
devCam = new DevCam();
adminMenu = new AdminMenu();
@ -49,7 +49,7 @@ modded class MissionGameplay
delete m_LogHandler;
delete adminMenuManager;
delete adminMenu;
// delete m_PermissionBase;
delete m_PermissionBase;
}
override void OnInit()
@ -59,17 +59,17 @@ modded class MissionGameplay
Print( " Mission Gameplay ");
}
// override void OnMissionStart()
// {
override void OnMissionStart()
{
// super.OnMissionStart();
// m_PermissionBase.OnStart();
// GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Player_UpdatePlayers, new Param1<string>( "" ), false, NULL );
// }
super.OnMissionStart();
m_PermissionBase.OnStart();
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Player_UpdatePlayers, new Param1<string>( "" ), false, NULL );
}
override void OnMissionFinish()
{
// m_PermissionBase.OnFinish();
m_PermissionBase.OnFinish();
GetGame().GetUIManager().CloseMenu( MENU_INGAME );
super.OnMissionFinish();
}

View File

@ -263,7 +263,7 @@ modded class MissionServer
{
super.OnUpdate( timeslice );
//m_PermissionBase.OnUpdate( timeslice );
m_PermissionBase.OnUpdate( timeslice );
}
void CLogInfo(string log)

View File

@ -140,6 +140,7 @@ class PermissionBase
Adding.Write(PData);
Adding.Send(NULL, M_RPCs.M_Admin_Player_UpdatePlayer, true, sender);
//GetRPCManager().SendRPC( "PermissionBase", "UpdatePlayer", new Param1< ref PlayerDataN >( SerializePlayer( GetFileHandler().GetPlayers().Get( i ) ) ), true, sender );
Print("Perm Base Update PLayers");
}
}
}
@ -150,6 +151,7 @@ class PermissionBase
{
ctx.Read(PData);
GetFileHandler().FPPlayers.RemoveItem( DeserializePlayer( PData ) );
Print("Perm Base remove Player");
}
break;
@ -158,6 +160,7 @@ class PermissionBase
{
ctx.Read(PData);
DeserializePlayer( PData );
Print("Perm Base Update Player");
}
break;

View File

@ -31,7 +31,7 @@ class PlayerModule
{
}
/*
void ReceiveRPC( PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx )
{
PlayerBase Admin;
@ -331,53 +331,53 @@ class PlayerModule
break;
case M_RPCs.M_Admin_Player_RepairTransport:
ctx.Read(Dstring);
if ( !FileHandler().HasPermission( "Admin", sender ) )
return;
if ( GetGame().IsServer() )
{
array< Transport > completedTransports = new array< Transport >;
// ctx.Read(Dstring);
// if ( !FileHandler().HasPermission( "Admin", sender ) )
// return;
// if ( GetGame().IsServer() )
// {
// array< Transport > completedTransports = new array< Transport >;
players = DeserializePlayersGUID( Dstring );
// players = DeserializePlayersGUID( Dstring );
for (i = 0; i < players.Count(); i++ )
{
player = players[i].PlayerObject;
// for (i = 0; i < players.Count(); i++ )
// {
// player = players[i].PlayerObject;
if ( player == NULL || player.GetTransport() == NULL ) continue;
//if ( player == NULL || player.GetTransport() == NULL ) continue;
Transport transport = player.GetTransport();
// Transport transport = player.GetTransport();
if ( completedTransports.Find( transport ) > -1 )
{
ItemBase radiator;
// if ( completedTransports.Find( transport ) > -1 )
// {
// ItemBase radiator;
Class.CastTo( radiator, transport.FindAttachmentBySlotName("CarRadiator") );
// Class.CastTo( radiator, transport.FindAttachmentBySlotName("CarRadiator") );
if ( radiator )
{
radiator.SetHealth( "", "", 1 );
}
// if ( radiator )
// {
// radiator.SetHealth( "", "", 1 );
// }
transport.SetHealth( "Engine", "", 1 );
transport.SetHealth( "FuelTank", "", 1 );
// transport.SetHealth( "Engine", "", 1 );
// transport.SetHealth( "FuelTank", "", 1 );
CarScript car = CarScript.Cast( transport );
// CarScript car = CarScript.Cast( transport );
if ( car )
{
car.Fill( CarFluid.FUEL, car.GetFluidCapacity( CarFluid.FUEL ) );
car.Fill( CarFluid.OIL, car.GetFluidCapacity( CarFluid.OIL ) );
car.Fill( CarFluid.BRAKE, car.GetFluidCapacity( CarFluid.BRAKE ) );
car.Fill( CarFluid.COOLANT, car.GetFluidCapacity( CarFluid.COOLANT ) );
}
// if ( car )
// {
// car.Fill( CarFluid.FUEL, car.GetFluidCapacity( CarFluid.FUEL ) );
// car.Fill( CarFluid.OIL, car.GetFluidCapacity( CarFluid.OIL ) );
// car.Fill( CarFluid.BRAKE, car.GetFluidCapacity( CarFluid.BRAKE ) );
// car.Fill( CarFluid.COOLANT, car.GetFluidCapacity( CarFluid.COOLANT ) );
// }
completedTransports.Insert( transport );
// completedTransports.Insert( transport );
//COTLog( sender, "Repaired transport for " + players[i].GetGUID() );
}
}
}
// }
// }
// }
break;
case M_RPCs.M_Admin_Player_TeleportToMe:
@ -587,5 +587,5 @@ class PlayerModule
// break;
}
}
*/
}

View File

@ -0,0 +1,44 @@
/*
DayZ SA Tomato Gui Admin tool for DayZ Standalone. Contact DayZ-SA-Tomato@Primary-Network.de
Copyright (C) 2018 DayZ-SA-Tomato
This file is part of DayZ SA Tomato.
DayZ SA Tomato is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DayZ SA Tomato is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DayZ SA Tomato. If not, see <https://www.gnu.org/licenses/>.
*/
class AdminMenuGuiAbout2 extends ScriptedWidgetEventHandler
{
protected Widget m_Root;
protected AdminMenuGui m_Menu;
protected MultilineTextWidget m_Text_Txt;
void AdminMenuGuiAbout2( Widget parent, AdminMenuGui menu )
{
m_Root = GetGame().GetWorkspace().CreateWidgets( "com\\DayZ-SA-Tomato\\scripts\\5_Mission\\core\\modules\\GUI\\Layouts\\Admin_About.layout", parent );
m_Menu = menu;
m_Text_Txt = MultilineTextWidget.Cast( m_Root.FindAnyWidget( "Text_About_Txt" ) );
}
void ~AdminMenuGuiAbout2()
{
}
void Focus()
{
}
}

View File

@ -26,8 +26,7 @@ class AdminMenuGui extends UIScriptedMenu
protected ref AdminMenuGuiMap m_MapTab;
protected ref AdminMenuGuiTeleport m_TeleportTab;
protected ref AdminMenuGuiAbout m_AboutTab;
protected ref AdminMenuGuiTeleport m_todo;
protected ref AdminMenuGuiTeleport m_todo2;
protected ref AdminMenuGuiAbout2 m_AboutTab2;
ref AdminMenuManager AMenuM;
protected ref map<string, string> m_TestListS;
protected string m_TestListPath = "$CurrentDir:\\DayZ-SA-Tomato\\";
@ -151,6 +150,7 @@ class AdminMenuGui extends UIScriptedMenu
m_MapTab = new AdminMenuGuiMap( layoutRoot.FindAnyWidget( "Tab_3" ), this );
m_TeleportTab = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_4" ), this );
m_AboutTab = new AdminMenuGuiAbout( layoutRoot.FindAnyWidget( "Tab_5" ), this );
m_AboutTab2 = new AdminMenuGuiAbout2( layoutRoot.FindAnyWidget( "Tab_6" ), this );
//m_todo = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_5" ), this );
//m_todo2 = new AdminMenuGuiTeleport( layoutRoot.FindAnyWidget( "Tab_5" ), this );
@ -171,9 +171,11 @@ class AdminMenuGui extends UIScriptedMenu
{
delete m_SpawnTab;
delete m_AboutTab;
delete m_AboutTab2;
delete m_MapTab;
delete m_CommandTab;
delete m_TeleportTab;
delete m_PlayerTab;
}
void SetStatus(string txt)
@ -360,7 +362,7 @@ class AdminMenuGui extends UIScriptedMenu
}
case 6:
{
//m_AboutTab.Focus();
m_AboutTab2.Focus();
break;
}
}

View File

@ -339,7 +339,7 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
GetGame().RPCSingleParam( NULL, M_RPCs.M_Admin_Menu_Player_Stamina_Request, new Param1<string>(selectedIdentity.GetName()), false, NULL );
}
}
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.UpdateStats, 1500, true );
//GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( this.UpdateStats, 1500, true );
}
@ -364,6 +364,9 @@ class AdminMenuGuiPlayer extends ScriptedWidgetEventHandler
string result;
m_PlayerList.GetItemText( m_PlayerList.GetSelectedRow(), 0, result );
return result;
}else
{
GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).Remove( this.UpdateStats );
}
return "";

View File

@ -15,7 +15,7 @@ FrameWidgetClass rootFrame {
hexactsize 0
vexactsize 0
{
TextWidgetClass TextWidget0 {
TextWidgetClass _Title {
position 0 10
size 1 50
halign center_ref

View File

@ -117,7 +117,7 @@ FrameWidgetClass rootFrame {
vexactsize 1
text "Delete Obj on cursor"
}
TextWidgetClass TextWidget0 {
TextWidgetClass _Title {
position 0 10
size 1 50
halign center_ref

View File

@ -69,7 +69,7 @@ FrameWidgetClass settings_menu_root {
GridSpacerWidgetClass Tab_Control_Container {
ignorepointer 1
position 0 0
size 1050 1
size 1500 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -80,7 +80,7 @@ FrameWidgetClass settings_menu_root {
Margin 0
"Size To Content H" 1
"Size To Content V" 1
Columns 10
Columns 7
Rows 1
{
PanelWidgetClass Tab_Control_0 {
@ -120,7 +120,7 @@ FrameWidgetClass settings_menu_root {
ignorepointer 1
color 1 1 1 0.7843
position 0 0
size 710 1
size 161.36 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -176,8 +176,8 @@ FrameWidgetClass settings_menu_root {
inheritalpha 0
ignorepointer 1
color 1 1 1 0.7843
position -160 0
size 710 1
position -1.87289 0
size 172.717 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -232,8 +232,8 @@ FrameWidgetClass settings_menu_root {
inheritalpha 0
ignorepointer 1
color 1 1 1 0.7843
position -330 0
size 710 1
position -1.51495 0
size 163.10701 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -255,7 +255,7 @@ FrameWidgetClass settings_menu_root {
visible 1
clipchildren 1
position 0 0
size 170 1
size 220.437 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -289,8 +289,8 @@ FrameWidgetClass settings_menu_root {
inheritalpha 0
ignorepointer 1
color 1 1 1 0.7843
position -160 0
size 710 1
position -1.34311 0
size 223.33301 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -311,8 +311,8 @@ FrameWidgetClass settings_menu_root {
PanelWidgetClass Tab_Control_3 {
visible 1
clipchildren 1
position 0 0
size 170 1
position 7.61502 0
size 162.38501 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -346,8 +346,8 @@ FrameWidgetClass settings_menu_root {
inheritalpha 0
ignorepointer 1
color 1 1 1 0.7843
position -490 0
size 710 1
position -0.8492 -0.05504
size 165.811 0.95827
hexactpos 1
vexactpos 1
hexactsize 1
@ -403,8 +403,8 @@ FrameWidgetClass settings_menu_root {
inheritalpha 0
ignorepointer 1
color 1 1 1 0.7843
position -160 0
size 710 1
position 0.21146 0
size 169.14101 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -423,7 +423,7 @@ FrameWidgetClass settings_menu_root {
}
}
PanelWidgetClass Tab_Control_6 {
visible 0
visible 1
clipchildren 1
position 0 0
size 170 1
@ -437,8 +437,9 @@ FrameWidgetClass settings_menu_root {
"no focus" 1
"next down" "XComboBoxWidget1"
{
TextWidgetClass Tab_Control_1_Title2 {
TextWidgetClass Tab_Control_1_Title4 {
visible 1
disabled 0
ignorepointer 1
position 0 0
size 1 0.48
@ -449,76 +450,19 @@ FrameWidgetClass settings_menu_root {
hexactsize 0
vexactsize 0
priority 250
text "Config"
text "WIP"
font "gui/fonts/sdf_MetronLight72"
"text halign" center
"text valign" center
}
ImageWidgetClass Tab_Control_1_Background2 {
ImageWidgetClass Tab_Control_1_Background4 {
visible 0
disabled 0
inheritalpha 0
ignorepointer 1
color 1 1 1 0.7843
position -160 0
size 710 1
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 0
draggable 0
imageTexture "{5A89D58DD2276E85}Gui/textures/SerratedBlack2.edds"
mode blend
"src alpha" 1
"no wrap" 0
stretch 1
"flip u" 0
"flip v" 0
filter 1
nocache 0
}
}
}
PanelWidgetClass Tab_Control_7 {
visible 0
clipchildren 1
position 0 0
size 170 1
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 0
priority 200
userID 0
style blank
"no focus" 1
"next down" "XComboBoxWidget1"
{
TextWidgetClass Tab_Control_1_Title3 {
visible 1
ignorepointer 1
position 0 0
size 1 0.48
halign center_ref
valign center_ref
hexactpos 1
vexactpos 1
hexactsize 0
vexactsize 0
priority 250
text "Config"
font "gui/fonts/sdf_MetronLight72"
"text halign" center
"text valign" center
}
ImageWidgetClass Tab_Control_1_Background3 {
visible 0
disabled 0
inheritalpha 0
ignorepointer 1
color 1 1 1 0.7843
position -160 0
size 710 1
position 0.21146 0
size 169.14101 1
hexactpos 1
vexactpos 1
hexactsize 1
@ -686,9 +630,20 @@ FrameWidgetClass settings_menu_root {
"text valign" center
wrap 1
}
FrameWidgetClass Tab_6 {
visible 0
ignorepointer 1
position 0 110
size 1400 800
halign center_ref
hexactpos 1
vexactpos 1
hexactsize 1
vexactsize 1
}
}
TextWidgetClass SettingsTextWidget {
}
TextWidgetClass _Title {
ignorepointer 1
position 0.00178 2.4828
size 1 37.15

View File

@ -14,7 +14,7 @@ FrameWidgetClass rootFrame {
hexactsize 0
vexactsize 0
{
TextWidgetClass TextWidget0 {
TextWidgetClass _Title {
position 0 10
size 1 50
halign center_ref

View File

@ -111,7 +111,7 @@ FrameWidgetClass rootFrame {
vexactsize 1
text "Heal Player"
}
TextWidgetClass TextWidget0 {
TextWidgetClass _Title {
position 0 10
size 1 50
halign center_ref

View File

@ -15,7 +15,7 @@ FrameWidgetClass rootFrame {
hexactsize 0
vexactsize 0
{
TextWidgetClass TextWidget0 {
TextWidgetClass _Title {
position 0 10
size 1 50
halign center_ref

View File

@ -14,7 +14,7 @@ FrameWidgetClass rootFrame {
hexactsize 0
vexactsize 0
{
TextWidgetClass TextWidget0 {
TextWidgetClass _Title {
position 0 10
size 1 50
halign center_ref

View File

@ -50,7 +50,7 @@ class HordeModule
{
string msg = GetFileHandler().GetConfig("Horde_Message_Location");
int count = msg.Replace("{Location}", name);
GetGame().ChatPlayer(0, msg);
GetGame().ChatPlayer(msg);
TL().status(sender, msg);
}
TL().status(sender, "Horde Spawned at Location : " + name);