Skip to content
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

Imported the CFD And SGC Monitor, Server from CAP and Fixed English Shield translation #129

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lua/data/language_data/en/sgentities.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ entity_apple_core = Apple Core
entity_arthurs_mantle = Arthur's Mantle
entity_dest_bar = Destiny Bar
entity_dest_console = Destiny Console
entity_dest_timer = Destiny Timer
entity_dest_timer = Destiny Timer
entity_kino_dis = Kino Dispenser
entity_lant_holo = Lantean Hologram
entity_telchak = Telchak Healing Device
entity_hangar = Hangar
entity_cfd = CFD

//SpaceShips
ent_ship_alkesh = Alkesh
Expand Down Expand Up @@ -240,4 +241,4 @@ anti_prior_c_3 = No one

// MALP
malp = MALP
weapon_malp_remote = MALP Remote
weapon_malp_remote = MALP Remote
91 changes: 70 additions & 21 deletions lua/data/language_data/en/sgtools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ stool_gravitycontroller_lbd = Local Brake Description
stool_gravitycontroller_lbd_desc = If you enable that, the GC will brake seperate on every axis. If you set every but one axis to 100, it will 'slide' along that axis. So if you want your ship not to brake as hard forward as it should sideways or upwards, this is for you!
stool_gravitycontroller_sga = SGA Powernode Mode

//Ashen
//Ashen
entity_asgard_ashen_def = Ashen Defence
stool_ashen_defence_spawner = Ashen Defence Spawner
stool_ashen_defence_create = Spawn Ashen Defences
Expand Down Expand Up @@ -254,25 +254,26 @@ stool_staff_weapon_color = Color:
stool_staff_weapon_explosion = Explosion

// Shield
stool_stargate_shield_spawner = Shield Spawner
stool_stargate_shield_create = Creates a Shield
stool_stargate_shield_desc = Left click, to spawn a Shield
stool_stargate_shield_undone = Shield removed
stool_stargate_shield_cleanup = Shields
stool_stargate_shield_cleaned = Removed all Shields
stool_stargate_shield_limit = Hit the Shield limit
stool_stargate_shield_str = Faster - Stronger
stool_stargate_shield_str_desc = Note: Increasing the Strength will result into slower Regeneration and more Energy Usage
stool_stargate_shield_str_color = Color:
stool_stargate_shield_imm = When this is enabled, the owner of the shield can always go or shoot through\nno matter if he was inside the shield when it was turned on or not
stool_stargate_shield_db = Draw Bubble
stool_stargate_shield_db_desc = Draw a bubble when hit?
stool_stargate_shield_se = Show Effect when Passing Shield
stool_stargate_shield_se_desc = Draws the shield effect, when something passes it
stool_stargate_shield_co = Containment
stool_stargate_shield_co_desc = Enable this to keep things inside a shield instead of keeping it away
stool_stargate_shield_an = Anti Noclip
stool_stargate_shield_an_desc = People can't noclip in the shield?
stool_shield = Shield
stool_shield_spawner = Shield Spawner
stool_shield_create = Creates a Shield
stool_shield_desc = Left click, to spawn a Shield
stool_shield_undone = Shield removed
stool_shield_cleanup = Shields
stool_shield_cleaned = Removed all Shields
stool_shield_limit = Hit the Shield limit
stool_shield_str = Faster - Stronger
stool_shield_str_desc = Note: Increasing the Strength will result into slower Regeneration and more Energy Usage
stool_shield_str_color = Color:
stool_shield_imm = When this is enabled, the owner of the shield can always go or shoot through\nno matter if he was inside the shield when it was turned on or not
stool_shield_db = Draw Bubble
stool_shield_db_desc = Draw a bubble when hit?
stool_shield_se = Show Effect when Passing Shield
stool_shield_se_desc = Draws the shield effect, when something passes it
stool_shield_co = Containment
stool_shield_co_desc = Enable this to keep things inside a shield instead of keeping it away
stool_shield_an = Anti Noclip
stool_shield_an_desc = People can't noclip in the shield?

// Shield identifier
shieldid_title = Shield Identifier
Expand Down Expand Up @@ -480,4 +481,52 @@ stool_atlantis_light_create = Spawns an Atlantis Light
stool_atlantis_light_desc = Left click to spawn the light
stool_atlantis_light_undone = Atlantis Light removed
stool_atlantis_light_cleanup = Atlantis Lights
stool_atlantis_light_cleaned = Removed all Atlantis Lights
stool_atlantis_light_cleaned = Removed all Atlantis Lights

// SGC Screens
stool_sgcscreen = SGC Screens
stool_sgcscreen_spawner = SGC Screen Spawner
stool_sgcscreen_create = Creates a SGC Screen or SGC Server
stool_sgcscreen_desc = Left click to spawn SGC Screen, Right click to spawn SGC Server
stool_sgcscreen_undone = SGC Screen removed
stool_sgcscreen_cleanup = SGC Screens
stool_sgcscreen_cleaned = Removed all SGC Screens
stool_sgcscreen_limit = Hit the SGC Screens limit
stool_sgcscreen_limit_sv = Hit the SGC Servers limit
stool_sgcscreen_menu = Codes manager
stool_sgcscreen_fulldesc =[[This is the SGC Screens from tv series.
Author: glebqip
Improvements and stool by AlexALX]]
stool_sgcscreen_sv = Server options:
stool_sgcscreen_cl = Screen options:
stool_sgcscreen_conn_sv = Auto-connect to nearest server
stool_sgcscreen_conn_sg = Auto-connect to nearest stargate
stool_sgcscreen_conn_ic = Auto-connect to nearest iris computer
stool_sgcscreen_conn_nb = Auto-connect to nearest naquadah bomb
stool_sgcscreen_key = Program selection key:
stool_sgcscreen_keyd = Self-descruct menu key:
stool_sgcscreen_keyboard = Spawn with keyboard
stool_sgcscreen_keyboard_weld = Make keyboard parented to screen
stool_sgcscreen_program = Program:
stool_sgcscreen_program_1 = Dialing computer
stool_sgcscreen_program_2 = Address book
stool_sgcscreen_program_3 = Gate data monitor
stool_sgcscreen_program_4 = Gate integrity monitor
stool_sgcscreen_program_5 = Galaxy map
stool_sgcscreen_program_6 = 7 Chevron
stool_sgcscreen_program_7 = Gate active
stool_sgcscreen_program_8 = Energy output (movie)
stool_sgcscreen_program_9 = Energy output (series)
stool_sgcscreen_program_10 = Energy flux

// SGC Screen menu
sgcscreen_title = StarGate Command - Codes Manager
sgcscreen_code = Code
sgcscreen_dcode = Self-destruct code
sgcscreen_rcode = Reset code
sgcscreen_desc = Description
sgcscreen_save = Save
sgcscreen_cancel = Cancel
// make sure to check this field, change \n positions to fit in menu
sgcscreen_info = Require two players to start/cancel self-desctruct.\nIn this case you need enter two different codes.

6 changes: 3 additions & 3 deletions lua/eap_librairies/server/general.lua
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ local function RandomAll(max)
return ret
end

function Lib.RandomGatesName(ply,ent,count,wire,mode)
function Lib.RandomGateName(ply,ent,count,wire,mode)
local conv = GetConVar("stargate_eap_random_address")
if (conv and conv:GetBool() or wire) then
if (IsValid(ent) and ent.IsStargate and ent:GetClass()!="sg_orlin") then
Expand All @@ -766,7 +766,7 @@ function Lib.RandomGatesName(ply,ent,count,wire,mode)
count = count or 1;
if valid then
if (count>5) then return end -- fix infinity loop
Lib.RandomGatesName(ply,ent,count+1,wire,mode); return
Lib.RandomGateName(ply,ent,count+1,wire,mode); return
end
ent:SetGateAddress(randadr);
end
Expand All @@ -784,4 +784,4 @@ function Lib.RandomGatesName(ply,ent,count,wire,mode)
end
end
end
hook.Add( "PlayerSpawnedSENT", "RandomGatesName", Lib.RandomGatesName );
hook.Add( "PlayerSpawnedSENT", "RandomGateName", Lib.RandomGateName );
14 changes: 14 additions & 0 deletions lua/eap_librairies/server/wire.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,17 @@ function Lib.Wire.PostEntityPaste(self,Player,Ent,CreatedEntities)
end
end
end


Lib.KeysConst = Lib.KeysConst or {
[KEY_ENTER] = 10,
[KEY_BACKSPACE] = 127,
}

hook.Add( "Initialize", "Lib.Wiremod.KeysInit", function()
if (Wire_Keyboard_Remap and Wire_Keyboard_Remap.American and Wire_Keyboard_Remap.American.normal) then
Lib.KeysConst[KEY_ENTER] = Wire_Keyboard_Remap.American.normal[KEY_ENTER]
Lib.KeysConst[KEY_BACKSPACE] = Wire_Keyboard_Remap.American.normal[KEY_BACKSPACE]
end
end)

7 changes: 4 additions & 3 deletions lua/eap_librairies/shared/general.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ MsgN("eap_librairies/shared/general.lua")
Lib = Lib or {}
Lib.Hook = Lib.Hook or {}


--###########
-- ramps.lua
--###########
Expand Down Expand Up @@ -258,11 +259,11 @@ function Lib.LOSVector(startpos, endpos, filter, radius)
return x and y and z;
end

--Stargates
--Stargates
Lib.EventHorizonTypes = Lib.EventHorizonTypes or {}
function Lib.RegisterEventHorizon(type,data)
Lib.EventHorizonTypes[type] = data
end
end

function Lib.IsIrisClosed(gate)
return gate.irisclosed == true || (gate.Iris ~= nil && gate.Iris.IsActivated == true)
Expand Down Expand Up @@ -971,4 +972,4 @@ local function InitPostEntity( )


end
hook.Add( "InitPostEntity", "LoadPhysicsModule", InitPostEntity );
hook.Add( "InitPostEntity", "LoadPhysicsModule", InitPostEntity );
123 changes: 123 additions & 0 deletions lua/entities/call_forwarding_device.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/*
Modul for GarrysMod10
Copyright (C) 2011 Llapp
*/

if (Lib!=nil and Lib.Wire!=nil) then Lib.Wiremod(ENT); end
if (Lib!=nil and Lib.RD!=nil) then Lib.LifeSupport(ENT); end

ENT.Type = "anim"
ENT.Base = "base_gmodentity" --gmodentity
ENT.PrintName = "CFD"
ENT.Author = "Llapp"
ENT.WireDebugName = "Call Forwarding Device"
ENT.Category = ""
ENT.Spawnable = true

list.Set("EAP", ENT.PrintName, ENT);

if CLIENT then
if (Lib.Language!=nil and Lib.Language.GetMessage!=nil) then
ENT.Category = Lib.Language.GetMessage("cat_others");
ENT.PrintName = Lib.Language.GetMessage("entity_cfd");
language.Add("call_forwarding_device", Lib.Language.GetMessage("entity_cfd_full"));
end
end

if SERVER then

--if (Lib==nil or Lib.CheckModule==nil or not Lib.CheckModule("extra")) then return end

AddCSLuaFile();

function ENT:Initialize()
self.Entity:SetModel("models/Assassin21/dial_device/dial_device.mdl");
self.Entity:PhysicsInit(SOLID_VPHYSICS);
self.Entity:SetMoveType(MOVETYPE_VPHYSICS);
self.Entity:SetSolid(SOLID_VPHYSICS);
self.Activated = false;
self.Unlock = nil;
self:CreateWireInputs("Activate","Unlock Code [STRING]");
self:CreateWireOutputs("Active");
local phys = self.Entity:GetPhysicsObject();
if(phys:IsValid())then
phys:EnableMotion(false);
phys:SetMass(50);
end
end

function ENT:SpawnFunction(p,t)
if (not t.Hit) then return end
local ang = p:GetAimVector():Angle(); ang.p = (90) % 360; ang.r = 0; ang.y = (ang.y+180) % 360;
local pos = t.HitPos+Vector(0,0,1);
local e = ents.Create("call_forwarding_device");
e:SetPos(pos);
e:SetAngles(ang);
e:DrawShadow(true);
e:SetVar("Owner",p)
e:SetUseType(SIMPLE_USE)
e:Spawn();
e:Activate();
return e;
end

function ENT:Use()
if(not self.Activated)then
self.Activated = true;
elseif(self.Activated)then
self.Activated = false;
end
end

function ENT:Window(v,unlockcode,force)
local add = "(Offline)";
local c = "can";
if(v)then
add = "(Online)"
c = "can't";
end;
self:SetOverlayText("Module "..add.."\nHumans "..c.." go through the Gate!\nUnlock Code ("..unlockcode..")");
end

function ENT:Think()
local letters = {"A","B","C","D","E","F"};
local c = {};
for i=1,8 do
c[i] = math.random(0,15);
if(c[i] > 9)then c[i] = letters[c[i]-9] end;
end
local unlockcode = tostring(c[1]..""..c[2]..""..c[3]..""..c[4]..""..c[5]..""..c[6]..""..c[7]..""..c[8]);
if(self.Unlock == unlockcode)then
self.Activated = false;
end
self:Window(self.Activated, unlockcode);
self:SetWire("Active",self.Activated);
self.Entity:NextThink(CurTime()+0.5);
return true;
end

function ENT:TriggerInput(k,v)
if(k == "Activate")then
if (v>0) then
self.Activated = true;
else
self.Activated = false;
end
end
if(k == "Unlock Code")then
if(v ~= "")then
self.Unlock = v;
end
end
end

function ENT:PostEntityPaste(ply, Ent, CreatedEntities)
if (StarGate.NotSpawnable(Ent:GetClass(),ply)) then self.Entity:Remove(); return end
StarGate.WireRD.PostEntityPaste(self,ply,Ent,CreatedEntities)
end

if (Lib and Lib.EAP_GmodDuplicator) then
duplicator.RegisterEntityClass( "call_forwarding_device", Lib.EAP_GmodDuplicator, "Data" )
end

end
Loading