@@ -103,7 +103,7 @@ type WeaponFiredEvent struct {
103103// NadeEventIf is the interface for all NadeEvents. Used to catch
104104// the different events with the same handler.
105105type NadeEventIf interface {
106- dummyNade ()
106+ implementsNadeEventIf ()
107107}
108108
109109// NadeEvent contains the common attributes of nade events. Dont register
@@ -115,7 +115,7 @@ type NadeEvent struct {
115115}
116116
117117// Make NadeEvents implement NadeEventIf
118- func (NadeEvent ) dummyNade () {}
118+ func (NadeEvent ) implementsNadeEventIf () {}
119119
120120// HeExplodedEvent signals the explosion of a HE.
121121type HeExplodedEvent struct {
@@ -163,31 +163,34 @@ type PlayerFlashedEvent struct {
163163 Player * common.Player
164164}
165165
166- // BombEventIf is the interface for alll the bomb events. Like NadeEventIf for NadeEvents.
166+ // BombEventIf is the interface for all the bomb events. Like NadeEventIf for NadeEvents.
167167type BombEventIf interface {
168- dummyBomb ()
168+ implementsBombEventIf ()
169169}
170170
171+ type bombsite rune
172+
173+ // Bombsite identifiers
174+ const (
175+ BombsiteA bombsite = 'A'
176+ BombsiteB bombsite = 'B'
177+ )
178+
171179// BombEvent contains the common attributes of bomb events. Dont register
172180// handlers on this tho, you want BombEventIf for that.
173181type BombEvent struct {
174182 Player * common.Player
175- Site rune
183+ Site bombsite
176184}
177185
178186// Make BombEvent implement BombEventIf
179- func (BombEvent ) dummyBomb () {}
187+ func (BombEvent ) implementsBombEventIf () {}
180188
181189// BombBeginPlant signals the start of a plant.
182190type BombBeginPlant struct {
183191 BombEvent
184192}
185193
186- // BombAbortPlant signals the abortion of a plant.
187- type BombAbortPlant struct {
188- BombEvent
189- }
190-
191194// BombPlantedEvent signals that the bomb has been planted.
192195type BombPlantedEvent struct {
193196 BombEvent
@@ -205,15 +208,11 @@ type BombExplodedEvent struct {
205208
206209// BombBeginDefuseEvent signals the start of defusing.
207210type BombBeginDefuseEvent struct {
208- Defuser * common.Player
209- HasKit bool
211+ Player * common.Player
212+ HasKit bool
210213}
211214
212- // BombAbortDefuseEvent signals that defusing was aborted.
213- type BombAbortDefuseEvent struct {
214- Defuser * common.Player
215- HasKit bool
216- }
215+ func (BombBeginDefuseEvent ) implementsBombEventIf () {}
217216
218217// PlayerHurtEvent signals that a player has been damaged.
219218type PlayerHurtEvent struct {
0 commit comments