diff options
author | Bryant Mairs <bwmairs@ucsc.edu> | 2013-12-03 18:51:57 -0800 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-03-30 17:40:54 -0400 |
commit | a6dae893d66319739e8dfe962f67285221eb9b91 (patch) | |
tree | 930921c10801b4327b2218a268172e1f0d6f808b | |
parent | 49052d6f4a2ca8d0e7b058e59c0f93ed7e8df32b (diff) |
Modify the cost, range, and cost-per-shot of all 3 lasers.
-rw-r--r-- | technic/tools/mining_lasers.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/technic/tools/mining_lasers.lua b/technic/tools/mining_lasers.lua index 2a5a6b2..e919f64 100644 --- a/technic/tools/mining_lasers.lua +++ b/technic/tools/mining_lasers.lua @@ -1,12 +1,11 @@ local r_corr = 0.25 -- Remove a bit more nodes (if shooting diagonal) to let it look like a hole (sth like antialiasing) -local mk1_charge = 40000 local mining_lasers_list = { --- {<num>, <range of the laser shots>, <max_charge>}, - {"1", 7, mk1_charge}, - {"2", 11, mk1_charge * 4}, - {"3", 30, mk1_charge * 16}, +-- {<num>, <range of the laser shots>, <max_charge>, <charge_per_shot>}, + {"1", 7, 50000, 1000}, + {"2", 14, 200000, 2000}, + {"3", 21, 650000, 3000}, } local f_1 = 0.5 - r_corr @@ -174,7 +173,10 @@ for _, m in pairs(mining_lasers_list) do if not meta or not meta.charge then return end - if meta.charge - 400 > 0 then + + -- If there's enough charge left, fire the laser + if meta.charge >= m[4] then + meta.charge = meta.charge - m[4] laser_shoot(user, m[2], "technic_laser_beam_mk"..m[1]..".png", "technic_laser_mk"..m[1]) meta.charge = meta.charge - 400 technic.set_RE_wear(itemstack, meta.charge, m[3]) |