Advertisement
class101

starbound.636.patch

Jan 29th, 2014
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.92 KB | None | 0 0
  1. diff -durN starbound.assets.636.orig/biomes/surface/magma/magma.undergroundparallax starbound.assets.636/biomes/surface/magma/magma.undergroundparallax
  2. --- starbound.assets.636.orig/biomes/surface/magma/magma.undergroundparallax    2014-01-29 03:58:27.126650300 +0100
  3. +++ starbound.assets.636/biomes/surface/magma/magma.undergroundparallax 2014-01-29 14:38:40.781788400 +0100
  4. @@ -1,7 +1,7 @@
  5.  {
  6.    "image" : "magmaunderground.png?brightness=-65",
  7.    "dividerimage" : "rockdivider.png?brightness=-65",
  8. -  "nohueshift" : 1,
  9. +  "nohueshift" : true,
  10.    "parallax" : 1.1,
  11.    "origin" : [0, 395]
  12.  }
  13. diff -durN starbound.assets.636.orig/biomes/surface/ocean/ocean.undergroundparallax starbound.assets.636/biomes/surface/ocean/ocean.undergroundparallax
  14. --- starbound.assets.636.orig/biomes/surface/ocean/ocean.undergroundparallax    2014-01-29 03:58:27.235677600 +0100
  15. +++ starbound.assets.636/biomes/surface/ocean/ocean.undergroundparallax 2014-01-29 04:07:04.853321800 +0100
  16. @@ -1,7 +1,7 @@
  17.  {
  18.    "image" : "oceanunderground.png",
  19.    "dividerimage" : "rockdivider.png",
  20. -  "nohueshift" : 1,
  21. +  "nohueshift" : true,
  22.    "parallax" : 1,
  23.    "origin" : [0, 180]
  24.  }
  25. diff -durN starbound.assets.636.orig/biomes/surface/volcanic/volcanic.parallax starbound.assets.636/biomes/surface/volcanic/volcanic.parallax
  26. --- starbound.assets.636.orig/biomes/surface/volcanic/volcanic.parallax 2014-01-29 03:58:27.424726500 +0100
  27. +++ starbound.assets.636/biomes/surface/volcanic/volcanic.parallax  2014-01-29 04:05:56.593001300 +0100
  28. @@ -72,7 +72,7 @@
  29.        "nightCorrelation" : 0,
  30.        "minSpeed" : 0,
  31.        "maxSpeed" : 0,
  32. -      "nohueshift" : 1,
  33. +      "nohueshift" : true,
  34.        "modifiers" : "",
  35.        "fadePercent" : 0.04
  36.      },
  37. @@ -83,7 +83,7 @@
  38.        "nightCorrelation" : 0,
  39.        "minSpeed" : 0,
  40.        "maxSpeed" : 0,
  41. -      "nohueshift" : 1,
  42. +      "nohueshift" : true,
  43.        "modifiers" : "",
  44.        "fadePercent" : 0.03
  45.      },
  46. @@ -94,7 +94,7 @@
  47.        "nightCorrelation" : 0,
  48.        "minSpeed" : 0,
  49.        "maxSpeed" : 0,
  50. -      "nohueshift" : 1,
  51. +      "nohueshift" : true,
  52.        "modifiers" : "",
  53.        "fadePercent" : 0.015
  54.      },
  55. diff -durN starbound.assets.636.orig/npcs/sleepstate.lua starbound.assets.636/npcs/sleepstate.lua
  56. --- starbound.assets.636.orig/npcs/sleepstate.lua   2014-01-29 03:58:48.405752200 +0100
  57. +++ starbound.assets.636/npcs/sleepstate.lua    2014-01-31 13:54:42.610682300 +0100
  58. @@ -29,7 +29,10 @@
  59.      end
  60.  
  61.      local bedPosition = vec2.add(world.entityPosition(stateData.bedId), { 0, 1 })
  62. -    local toTarget = world.distance(bedPosition, entity.position())
  63. +    if bedPosition == nil then return true end
  64. +    local po = entity.position()
  65. +    if po == nil then return true end
  66. +    local toTarget = world.distance(bedPosition, po)
  67.      if world.magnitude(toTarget) < entity.configParameter("sleep.lieDownRadius") then
  68.        entity.setLounging(stateData.bedId)
  69.      else
  70. diff -durN starbound.assets.636.orig/scripts/vec2.lua starbound.assets.636/scripts/vec2.lua
  71. --- starbound.assets.636.orig/scripts/vec2.lua  2014-01-29 03:59:07.696995800 +0100
  72. +++ starbound.assets.636/scripts/vec2.lua   2014-01-29 04:02:38.537703400 +0100
  73. @@ -3,31 +3,38 @@
  74.  vec2 = {}
  75.  
  76.  function vec2.eq(vector1, vector2)
  77. +  if vector1 == nil then return vector1 end
  78. +  if vector2 == nil then return vector2 end
  79.    return vector1[1] == vector2[1] and vector1[2] == vector2[2]
  80.  end
  81.  
  82.  function vec2.dup(vector)
  83. +  if vector == nil then return vector end
  84.    return { vector[1], vector[2] }
  85.  end
  86.  
  87.  function vec2.norm(vector)
  88. +  if vector == nil then return vector end
  89.    local magnitude = world.magnitude(vector)
  90.    return vec2.div(vector, magnitude)
  91.  end
  92.  
  93.  function vec2.mul(vector, scalar)
  94. +  if vector == nil then return vector end
  95.    vector[1] = vector[1] * scalar
  96.    vector[2] = vector[2] * scalar
  97.    return vector
  98.  end
  99.  
  100.  function vec2.div(vector, scalar)
  101. +  if vector == nil then return vector end
  102.    vector[1] = vector[1] / scalar
  103.    vector[2] = vector[2] / scalar
  104.    return vector
  105.  end
  106.  
  107.  function vec2.add(vector, scalar_or_vector)
  108. +  if vector == nil then return vector end
  109.    if type(scalar_or_vector) == "table" then
  110.      vector[1] = vector[1] + scalar_or_vector[1]
  111.      vector[2] = vector[2] + scalar_or_vector[2]
  112. @@ -40,6 +47,7 @@
  113.  end
  114.  
  115.  function vec2.sub(vector, scalar_or_vector)
  116. +  if vector == nil then return vector end
  117.    if type(scalar_or_vector) == "table" then
  118.      vector[1] = vector[1] - scalar_or_vector[1]
  119.      vector[2] = vector[2] - scalar_or_vector[2]
  120. @@ -52,6 +60,7 @@
  121.  end
  122.  
  123.  function vec2.angle(vector)
  124. +  if vector == nil then return vector end
  125.    local angle = math.atan2(vector[2], vector[1])
  126.    if angle < 0 then angle = angle + 2 * math.pi end
  127.    if vector[1] < 0 then angle = math.pi - angle end
  128. @@ -59,6 +68,7 @@
  129.  end
  130.  
  131.  function vec2.rotate(vector, angle)
  132. +  if vector == nil then return vector end
  133.    local sinAngle = math.sin(angle)
  134.    local cosAngle = math.cos(angle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement