FreeBSD Bugzilla – Attachment 186954 Details for
Bug 222823
games/pioneer: Update to 20171001
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch (since 449591 revision)
pioneer.diff (text/plain), 6.08 KB, created by
lightside
on 2017-10-06 14:43:21 UTC
(
hide
)
Description:
Proposed patch (since 449591 revision)
Filename:
MIME Type:
Creator:
lightside
Created:
2017-10-06 14:43:21 UTC
Size:
6.08 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 451105) >+++ Makefile (working copy) >@@ -3,12 +3,8 @@ > > PORTNAME= pioneer > PORTVERSION= 0.0.${GH_TAGNAME} >-PORTREVISION= 4 > CATEGORIES= games > >-PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ >-PATCHFILES= a53fdbe8b046.patch:-p1 >- > MAINTAINER= lightside@gmx.com > COMMENT= Space adventure game set in the Milky Way galaxy > >@@ -31,18 +27,18 @@ > LICENSE_PERMS_SIL= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept > > BUILD_DEPENDS= ${LOCALBASE}/include/GL/glu.h:graphics/libGLU >-LIB_DEPENDS= libcurl.so:ftp/curl \ >- libsigc-2.0.so:devel/libsigc++20 \ >+LIB_DEPENDS= libsigc-2.0.so:devel/libsigc++20 \ > libfreetype.so:print/freetype2 \ > libvorbisfile.so:audio/libvorbis \ > libpng.so:graphics/png \ > libassimp.so:multimedia/assimp > >+USES= autoreconf compiler:c++11-lib gmake pkgconfig >+ > USE_GITHUB= yes > GH_ACCOUNT= pioneerspacesim >-GH_TAGNAME= 20170304 >+GH_TAGNAME= 20171001 > >-USES= autoreconf compiler:c++11-lib gmake pkgconfig > USE_GL= gl > USE_SDL= image2 sdl2 > >@@ -63,7 +59,7 @@ > > SUB_FILES= pkg-message > >-OPTIONS_DEFINE= DOCS MODELCOMPILER NOGPUJOBS PROFILER >+OPTIONS_DEFINE= DOCS MODELCOMPILER NOGPUJOBS PROFILER SERVERAGENT > OPTIONS_DEFAULT= MODELCOMPILER > DOCS_SUB_LIST= QUICKSTART_PATH="${DOCSDIR}" > DOCS_SUB_LIST_OFF= \ >@@ -73,6 +69,9 @@ > NOGPUJOBS_DESC= Disable EnableGPUJobs for config.ini by default > PROFILER_DESC= Build with internal profiler > PROFILER_CONFIGURE_ON= --enable-profiler >+SERVERAGENT_DESC= Build with server agent >+SERVERAGENT_CONFIGURE_WITH= server-agent >+SERVERAGENT_LIB_DEPENDS= libcurl.so:ftp/curl > > .include <bsd.port.pre.mk> > >Index: distinfo >=================================================================== >--- distinfo (revision 451105) >+++ distinfo (working copy) >@@ -1,5 +1,3 @@ >-TIMESTAMP = 1488555232 >-SHA256 (pioneerspacesim-pioneer-0.0.20170304-20170304_GH0.tar.gz) = 45d448a5ac53c9e230522600f03dad7abc70788367d09c3edcb4ae4285050004 >-SIZE (pioneerspacesim-pioneer-0.0.20170304-20170304_GH0.tar.gz) = 194776151 >-SHA256 (a53fdbe8b046.patch) = f9b438480642ad4a9a71cd976c007bc9c5a0fa82d3dc2d4d0892c1d6e00b78d7 >-SIZE (a53fdbe8b046.patch) = 1109 >+TIMESTAMP = 1506816107 >+SHA256 (pioneerspacesim-pioneer-0.0.20171001-20171001_GH0.tar.gz) = 154118bd3dac2f9b8ea43a837bcb967abcc8c3a8ee5ab61d35183bae85e8b0db >+SIZE (pioneerspacesim-pioneer-0.0.20171001-20171001_GH0.tar.gz) = 210900753 >Index: files/patch-data_modules_SearchRescue_SearchRescue.lua >=================================================================== >--- files/patch-data_modules_SearchRescue_SearchRescue.lua (nonexistent) >+++ files/patch-data_modules_SearchRescue_SearchRescue.lua (working copy) >@@ -0,0 +1,83 @@ >+Fix SAR selection of ship sizes for missions >+https://github.com/pioneerspacesim/pioneer/commit/008e30a857036a8cc40c42bf89ef68e65b47a41e >+ >+--- data/modules/SearchRescue/SearchRescue.lua.orig 2017-10-01 00:01:47 UTC >++++ data/modules/SearchRescue/SearchRescue.lua >+@@ -613,7 +613,20 @@ local createTargetShipParameters = funct >+ ---- loading drive, weapons etc. >+ if flavour.id == 1 or flavour.id == 6 then >+ for i,shipdef in pairs(shipdefs) do >+- if shipdef.capacity / 10 < 1 then shipdefs[i] = nil end >++ >++ -- get mass of hyperdrive if this ship has a default drive >++ -- if no default drive assume lowest mass drive >++ -- higher mass drives will only be fitted later at ship creation if capacity is huge >++ local drive = Equipment.hyperspace['hyperdrive_'..tostring(shipdef.hyperdriveClass)] >++ if not drive then >++ local drives = {} >++ for i = 9, 1, -1 do >++ table.insert(drives, Equipment.hyperspace['hyperdrive_'..tostring(i)]) >++ end >++ table.sort(drives, function (a,b) return a.capabilities.mass < b.capabilities.mass end) >++ drive = drives[1] >++ end >++ if (shipdef.capacity-drive.capabilities.mass) / 10 < 1 then shipdefs[i] = nil end >+ end >+ elseif flavour.pickup_pass > 0 then >+ for i,shipdef in pairs(shipdefs) do >+@@ -661,7 +674,16 @@ local createTargetShipParameters = funct >+ if flavour.id == 1 or flavour.id == 6 then >+ local any_pass = rand:Integer(0,1) >+ if any_pass > 0 then >+- pickup_pass = rand:Integer(1, math.min((shipdef.capacity / 10)+1, max_pass)) >++ local drive = Equipment.hyperspace['hyperdrive_'..tostring(shipdef.hyperdriveClass)] >++ if not drive then >++ local drives = {} >++ for i = 9, 1, -1 do >++ table.insert(drives, Equipment.hyperspace['hyperdrive_'..tostring(i)]) >++ end >++ table.sort(drives, function (a,b) return a.capabilities.mass < b.capabilities.mass end) >++ drive = drives[1] >++ end >++ pickup_pass = rand:Integer(1, math.min(((shipdef.capacity-drive.capabilities.mass) / 10)+1, max_pass)) >+ else >+ pickup_pass = 0 >+ end >+@@ -709,22 +731,25 @@ local createTargetShip = function (missi >+ ship:SetPattern(pattern) >+ >+ -- load a hyperdrive >+- local default_drive = Equipment.hyperspace['hyperdrive_'..tostring(shipdef.hyperdriveClass)] >+- if default_drive then >+- ship:AddEquip(default_drive) >+- else >+- local drive >++ -- 1st try: default drive for this ship class >++ -- 2nd try: largest drive possible that doesn't take more than a 10th of available room >++ -- fallback: smallest drive >++ local drives = {} >++ local drive = Equipment.hyperspace['hyperdrive_'..tostring(shipdef.hyperdriveClass)] >++ if not drive then >+ for i = 9, 1, -1 do >+- drive = Equipment.hyperspace['hyperdrive_'..tostring(i)] >+- if shipdef.capacity / 10 > drive.capabilities.mass then >+- ship:AddEquip(drive) >+- break >+- end >++ table.insert(drives, Equipment.hyperspace['hyperdrive_'..tostring(i)]) >+ end >+- if not drive then >+- ship:AddEquip(Equipment.hyperspace['hyperdrive_1']) >++ table.sort(drives, function (a,b) return a.capabilities.mass < b.capabilities.mass end) >++ for i = #drives, 1, -1 do >++ local test_drive = drives[i] >++ if shipdef.capacity / 10 > test_drive.capabilities.mass then >++ drive = test_drive >++ end >+ end >+ end >++ if not drive then drive = drives[1] end >++ ship:AddEquip(drive) >+ >+ -- add thruster fuel >+ if mission.flavour.id == 2 or mission.flavour.id == 4 or mission.flavour.id == 5 then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
lightside
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 222823
:
186946
| 186954