Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdeb5bfb

Browse files
committed
Supporting Naev 0.11, use a new API (player.outfitNum) if exists.
1 parent52be7db commitdeb5bfb

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

‎events/local_system_map_seller.lua‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
<event name="Local System Map Seller">
44
<chance>100</chance>
55
<location>enter</location>
6-
<cond>player.numOutfit("Local System Map") &lt; 1 </cond>
6+
<cond>
7+
if player.outfitNum then
8+
return player.outfitNum("Local System Map") &lt; 1
9+
else
10+
return player.numOutfit("Local System Map") &lt; 1
11+
end
12+
</cond>
713
</event>
814
--]]
915
--[[
@@ -42,6 +48,14 @@ local timeouthook
4248
localseller=nil
4349
localNPC_name=_("A vending machine of a map seller")
4450

51+
functionhasLocalMap ()
52+
ifplayer.outfitNumthen
53+
returnplayer.outfitNum("Local System Map")>0
54+
else
55+
returnplayer.numOutfit("Local System Map")>0
56+
end
57+
end
58+
4559
functioncreate ()
4660
localcur=system.cur()
4761
local_,vol,_=cur:nebula()
@@ -61,7 +75,7 @@ function create ()
6175
end
6276

6377
functionno_seller_is_found ()
64-
ifplayer.numOutfit("Local System Map")>0then
78+
ifhasLocalMap()then
6579
-- A player may discover the information in a few second.
6680
evt.finish()
6781
return
@@ -72,7 +86,7 @@ function no_seller_is_found ()
7286
end
7387

7488
functionspawn ()
75-
ifplayer.numOutfit("Local System Map")>0then
89+
ifhasLocalMap()then
7690
-- A player may discover the information in a few second.
7791
evt.finish()
7892
return
@@ -95,7 +109,7 @@ end
95109
functionhail ()
96110
hook.rm(timeouthook)
97111
hook.rm(hailhook)
98-
ifplayer.numOutfit("Local System Map")>0then
112+
ifhasLocalMap()then
99113
-- A player may discover the information in a few second.
100114
tk.msg(NPC_name,_[["OH! YOU SEEM TO NEED NO LOCAL SYSTEM MAP, SORRY."]])
101115
else

‎plugin.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<author>oo13 @ github</author>
44
<version>1.0</version>
55
<description>A plugin to get the local system maps easily. You can remove this plugin without any side effects anytime you like.</description>
6-
<compatibility>^0\.10\..*</compatibility>
6+
<compatibility>^0\.1[01]\..*</compatibility>
77
<priority>5</priority>
88
</plugin>
99
<!--

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp