Skip to content

Commit

Permalink
More descriptions (#3105)
Browse files Browse the repository at this point in the history
* Improved descriptions to deprecated funcs

* More warning descriptions

* Update e2descriptions.lua

* Thought I removed those

---------

Co-authored-by: thegrb93 <[email protected]>
  • Loading branch information
deltamolfar and thegrb93 authored Jul 26, 2024
1 parent 33f65db commit a65a006
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 73 deletions.
4 changes: 2 additions & 2 deletions lua/entities/gmod_wire_expression2/core/custom/prop.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ e2function void entity:setLocalPos(vector pos)
WireLib.setLocalPos(this, pos)
end

[deprecated]
[deprecated = "Use setPos instead"]
e2function void entity:reposition(vector pos) = e2function void entity:setPos(vector pos)

e2function void entity:setAng(angle rot)
Expand All @@ -1088,7 +1088,7 @@ e2function void entity:setLocalAng(angle rot)
WireLib.setLocalAng(this, rot)
end

[deprecated]
[deprecated = "Use setAng instead"]
e2function void entity:rerotate(angle rot) = e2function void entity:setAng(angle rot)

e2function void bone:setPos(vector pos)
Expand Down
26 changes: 13 additions & 13 deletions lua/entities/gmod_wire_expression2/core/files.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,19 @@ end

__e2setcost(5)

[deprecated]
[deprecated = "Use the file events instead"]
e2function number fileLoaded()
local pfile = uploads[self.player].last

return not pfile.uploading and pfile.uploaded and 1 or 0
end

[deprecated]
[deprecated = "Use the file events instead"]
e2function number fileLoading()
return uploads[self.player].last.uploading and 1 or 0
end

[deprecated]
[deprecated = "Use the file events instead"]
e2function number fileStatus()
return run_on.file.status or FILE_UNKNOWN
end
Expand All @@ -173,7 +173,7 @@ end

__e2setcost( 10 )

[deprecated, nodiscard]
[deprecated = "Use the file events instead", nodiscard]
e2function string fileRead()
local pfile = uploads[self.player].last

Expand Down Expand Up @@ -227,19 +227,19 @@ end

__e2setcost(5)

[deprecated, nodiscard]
[deprecated = "Use the file events instead", nodiscard]
e2function number fileLoadedList()
local plist = lists[self.player].last

return not plist.uploading and plist.uploaded and 1 or 0
end

[deprecated, nodiscard]
[deprecated = "Use the file events instead", nodiscard]
e2function number fileLoadingList()
return lists[self.player].last.uploading and 1 or 0
end

[deprecated, nodiscard]
[deprecated = "Use the file events instead", nodiscard]
e2function array fileReadList()
local plist = lists[self.player]

Expand All @@ -250,17 +250,17 @@ end

__e2setcost( 5 )

[deprecated]
[deprecated = "Use the file events instead"]
e2function void runOnFile( active )
run_on.file.ents[self.entity] = (active ~= 0)
end

[deprecated]
[deprecated = "Use the file events instead"]
e2function number fileClk()
return self.data.runOnFile and 1 or 0
end

[deprecated]
[deprecated = "Use the file events instead"]
e2function number fileClk( string filename )
return (self.data.runOnFile and run_on.file.name == filename) and 1 or 0
end
Expand All @@ -269,17 +269,17 @@ end

__e2setcost( 5 )

[deprecated]
[deprecated = "Use the file events instead"]
e2function void runOnList(active)
run_on.list.ents[self.entity] = active ~= 0
end

[deprecated]
[deprecated = "Use the file events instead"]
e2function number fileListClk()
return self.data.runOnFileList and 1 or 0
end

[deprecated]
[deprecated = "Use the file events instead"]
e2function number fileListClk( string dir )
return (self.data.runOnFileList and run_on.list.dir == dir) and 1 or 0
end
Expand Down
2 changes: 1 addition & 1 deletion lua/entities/gmod_wire_expression2/core/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ e2function number teamMemberCount(teamNum)
return team.NumPlayers(teamNum)
end

[deprecated]
[deprecated = "Use function teamMemberCount instead"]
e2function number teamPlayers(teamNum) = e2function number teamMemberCount(teamNum)

e2function number teamDeaths(teamNum)
Expand Down
Loading

0 comments on commit a65a006

Please sign in to comment.