File tree Expand file tree Collapse file tree 6 files changed +0
-50
lines changed
pkg/demoinfocs/sendtables Expand file tree Collapse file tree 6 files changed +0
-50
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,6 @@ func (p *Property) Value() st.PropertyValue {
2323 return p .Called ().Get (0 ).(st.PropertyValue )
2424}
2525
26- // Type is a mock-implementation of Property.Type().
27- func (p * Property ) Type () st.PropertyType {
28- return p .Called ().Get (0 ).(st.PropertyType )
29- }
30-
3126// OnUpdate is a mock-implementation of Property.OnUpdate().
3227func (p * Property ) OnUpdate (handler st.PropertyUpdateHandler ) {
3328 p .Called (handler )
@@ -37,8 +32,3 @@ func (p *Property) OnUpdate(handler st.PropertyUpdateHandler) {
3732func (p * Property ) Bind (variable any , valueType st.PropertyValueType ) {
3833 p .Called (variable , valueType )
3934}
40-
41- // ArrayElementType is a mock-implementation of Property.ArrayElementType().
42- func (p * Property ) ArrayElementType () st.PropertyType {
43- return p .Called ().Get (0 ).(st.PropertyType )
44- }
Original file line number Diff line number Diff line change @@ -8,10 +8,6 @@ type Property interface {
88 Name () string
99 // Value returns the current value of the property.
1010 Value () PropertyValue
11- // Type returns the data type of the property.
12- Type () PropertyType
13- // ArrayElementType returns the data type of array entries, if Property.Type() is PropTypeArray.
14- ArrayElementType () PropertyType
1511 // OnUpdate registers a handler for updates of the property's value.
1612 //
1713 // The handler will be called with the current value upon registration.
Original file line number Diff line number Diff line change @@ -23,9 +23,6 @@ const (
2323 ValTypeBoolInt // Int that is treated as bool (1 -> true, != 1 -> false)
2424)
2525
26- // PropertyType identifies the data type of property.
27- type PropertyType int
28-
2926// PropertyValue stores parsed & decoded send-table values.
3027// For instance player health, location etc.
3128type PropertyValue struct {
@@ -103,7 +100,6 @@ type PropertyUpdateHandler func(PropertyValue)
103100type PropertyEntry struct {
104101 Name string
105102 IsArray bool
106- Type PropertyType
107103}
108104
109105// EntityCreatedHandler is the interface for handlers that are interested in EntityCreatedEvents.
Original file line number Diff line number Diff line change @@ -28,26 +28,10 @@ func (c *class) Name() string {
2828 return c .name
2929}
3030
31- func (c * class ) DataTableID () int {
32- panic ("not implemented" )
33- }
34-
35- func (c * class ) DataTableName () string {
36- panic ("not implemented" )
37- }
38-
39- func (c * class ) BaseClasses () (res []st.ServerClass ) {
40- panic ("not implemented" )
41- }
42-
4331func (c * class ) PropertyEntries () []string {
4432 return c .collectFieldsEntries (c .serializer .fields , "" )
4533}
4634
47- func (c * class ) PropertyEntryDefinitions () []st.PropertyEntry {
48- panic ("not implemented" )
49- }
50-
5135func (c * class ) OnEntityCreated (handler st.EntityCreatedHandler ) {
5236 c .createdHandlers = append (c .createdHandlers , handler )
5337}
Original file line number Diff line number Diff line change @@ -71,14 +71,6 @@ func (p property) Value() st.PropertyValue {
7171 }
7272}
7373
74- func (p property ) Type () st.PropertyType {
75- panic ("not implemented" )
76- }
77-
78- func (p property ) ArrayElementType () st.PropertyType {
79- panic ("not implemented" )
80- }
81-
8274func (p property ) OnUpdate (handler st.PropertyUpdateHandler ) {
8375 p .entity .updateHandlers [p .name ] = append (p .entity .updateHandlers [p .name ], handler )
8476}
Original file line number Diff line number Diff line change @@ -7,16 +7,8 @@ type ServerClass interface {
77 ID () int
88 // Name returns the server-class's name.
99 Name () string
10- // DataTableID returns the data-table ID.
11- DataTableID () int
12- // DataTableName returns the data-table name.
13- DataTableName () string
14- // BaseClasses returns the base-classes of this server-class.
15- BaseClasses () (res []ServerClass )
1610 // PropertyEntries returns the names of all property-entries on this server-class.
1711 PropertyEntries () []string
18- // PropertyEntryDefinitions returns all property-entries on this server-class.
19- PropertyEntryDefinitions () []PropertyEntry
2012 // OnEntityCreated registers a function to be called when a new entity is created from this serverClass.
2113 OnEntityCreated (handler EntityCreatedHandler )
2214 String () string
You can’t perform that action at this time.
0 commit comments