Skip to content

Instantly share code, notes, and snippets.

@leper
leper / wip1207.patch
Created January 21, 2014 20:52
on top of r14114 (possibly broken)
diff --git a/binaries/data/mods/public/gui/session/input.js b/binaries/data/mods/public/gui/session/input.js
index dd7eff3..73f69c6 100644
--- a/binaries/data/mods/public/gui/session/input.js
+++ b/binaries/data/mods/public/gui/session/input.js
@@ -1381,7 +1381,7 @@ function doAction(action, ev)
return true;
case "setup-trade-route":
- Engine.PostNetworkCommand({"type": "setup-trade-route", "entities": selection, "target": action.target});
+ Engine.PostNetworkCommand({"type": "setup-trade-route", "entities": selection, "target": action.target, "queued": queued});
@leper
leper / commands.txt
Created February 12, 2014 23:44
aegis r14764 + #67 not expanding on bactria
start {"settings":{"PlayerData":[{"Name":"Spieler 1","AI":"","AIDiff":2,"Civ":"athen","Team":-1},{"Name":"Xanthippos","AI":"aegis","AIDiff":2,"Civ":"cart","Team":-1}],"Seed":5987,"CheatsEnabled":true,"CircularMap":true,"Description":"Die trockenen und steinigen Gegenden von Baktrien (im Gebiet des heutige Afghanistan) am Fuße des Hindukusch-Gebirges.\u000a\u000aIn der Mitte der Karte befindet sich ein vegetationsloser Berg. Dieser wird beidseitig von Gebirgen und Hügelland umgrenzt, welche von trügerischen Pässen und alten Handelsstraßen durchzogen sind.","GameType":"conquest","Keywords":[],"LockTeams":false,"Name":"Baktrien (2)","Preview":"bactria_2.png","RevealMap":false,"PopulationCap":300,"StartingResources":300,"Size":128,"mapType":"skirmish"},"mapFilter":"default","map":"maps/skirmishes/Bactria (2)","mapType":"skirmish","mapPath":"maps/skirmishes/","matchID":"F83EE1EF15C0B8FF","gameSpeed":1}
turn 0 200
end
turn 1 200
end
turn 2 200
end
turn 3 200
end
turn 4 200
@leper
leper / commands.txt
Created July 24, 2014 22:01
r15550 (or something like that)
start {"settings":{"PlayerData":[{"Name":"Player 1","AI":"","AIDiff":2,"Civ":"mace","Team":-1},{"Name":"Player 2","AI":"","AIDiff":2,"Civ":"brit","Team":-1}],"Seed":32294,"CheatsEnabled":true,"CircularMap":true,"Description":"Each player starts the match atop a large flat plateau, otherwise known as an acropolis.\n\nTo the East lies a large bay with fishing opportunities. To the West is a rugged hinterland with an unclaimed acropolis commanding the valley below.","GameType":"conquest","Keywords":[],"LockTeams":false,"Name":"Acropolis Bay (2)","Preview":"acropolis_bay.png","RevealMap":false,"VictoryScripts":["scripts/Conquest.js"],"PopulationCap":300,"StartingResources":300,"Size":128,"TriggerScripts":["scripts/Conquest.js"],"mapType":"skirmish"},"mapFilter":"default","map":"maps/skirmishes/Acropolis Bay (2)","mapType":"skirmish","mapPath":"maps/skirmishes/","matchID":"D7CAEAEF5CE2582D","gameSpeed":1}
turn 0 200
end
turn 1 200
end
turn 2 200
end
turn 3 200
end
turn 4 200
Index: build/premake/extern_libs4.lua
===================================================================
--- build/premake/extern_libs4.lua (revision 15764)
+++ build/premake/extern_libs4.lua (working copy)
@@ -235,7 +235,8 @@
-- Suppress all the Boost warnings on OS X by including it as a system directory
buildoptions { "-isystem../" .. libraries_dir .. "boost/include" }
end
- if os.getversion().description == "OpenBSD" then
+-- if os.getversion().description == "OpenBSD" then
Index: build/premake/extern_libs4.lua
===================================================================
--- build/premake/extern_libs4.lua (revision 15776)
+++ build/premake/extern_libs4.lua (working copy)
@@ -235,7 +235,8 @@
-- Suppress all the Boost warnings on OS X by including it as a system directory
buildoptions { "-isystem../" .. libraries_dir .. "boost/include" }
end
- if os.getversion().description == "OpenBSD" then
+ -- TODO This actually applies to most libraries we use on BSDs, make this a global setting.
@leper
leper / template_mod.diff
Created November 21, 2014 02:46
WIP for #2936
diff --git a/binaries/data/mods/public/simulation/templates/units/rome_infantry_swordsman_a.xml b/binaries/data/mods/public/simulation/templates/units/rome_infantry_swordsman_a.xml
index 743ada5..77c0c44 100644
--- a/binaries/data/mods/public/simulation/templates/units/rome_infantry_swordsman_a.xml
+++ b/binaries/data/mods/public/simulation/templates/units/rome_infantry_swordsman_a.xml
@@ -7,7 +7,7 @@
</Armour>
<Attack>
<Melee>
- <Hack>14</Hack>
+ <Hack method="add">14.0</Hack>
@leper
leper / attributes_without_attributes.diff
Created November 30, 2014 18:37
in addition to #2936
Index: source/simulation2/components/CCmpFootprint.cpp
===================================================================
--- source/simulation2/components/CCmpFootprint.cpp (revision 16013)
+++ source/simulation2/components/CCmpFootprint.cpp (working copy)
@@ -59,15 +59,15 @@
"<choice>"
"<element name='Square' a:help='Set the footprint to a square of the given size'>"
"<attribute name='width' a:help='Size of the footprint along the left/right direction (in metres)'>"
- "<ref name='positiveDecimal'/>"
+ "<ref name='positiveDecimalAttribute'/>"
diff --git a/lib/glew/CMakeLists.txt b/lib/glew/CMakeLists.txt
index a6d2c9a..ebe8edb 100644
--- a/lib/glew/CMakeLists.txt
+++ b/lib/glew/CMakeLists.txt
@@ -7,6 +7,9 @@ if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -arch i386 -F/Library/Frameworks")
endif()
+find_package(OpenGL REQUIRED)
+include_directories(${OPENGL_INCLUDE_DIR})
@leper
leper / ResourceHealthGatherer.js
Created February 22, 2015 15:59
Possibly working code
function ResourceHealthGatherer() {}
ResourceHealthGatherer.prototype.Schema =
"<a:help>Lets the unit gather resources from entities that have the ResourceSupply component.</a:help>" +
"<a:example>" +
"<MaxDistance>2.0</MaxDistance>" +
"<BaseSpeed>1.0</BaseSpeed>" +
"<Rates>" +
"<food.fish>1</food.fish>" +
"<metal.ore>3</metal.ore>" +
@leper
leper / first bt
Last active February 25, 2018 18:17
hwengine bt
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5b82ab8 in lockf64 () from /usr/lib/libc.so.6
(gdb) bt full
#0 0x00007ffff5b82ab8 in lockf64 () from /usr/lib/libc.so.6
No symbol table info available.
#1 0x00007ffff42e9743 in ?? ()
from /usr/lib/nvidia/libnvidia-glcore.so.340.106
No symbol table info available.
#2 0x00007ffff42eb094 in ?? ()
from /usr/lib/nvidia/libnvidia-glcore.so.340.106