(rest string, mob *mobs.Mob, room *rooms.Room)
| 177 | } |
| 178 | |
| 179 | func (c *CleanupModule) mobBuryCommand(rest string, mob *mobs.Mob, room *rooms.Room) (bool, error) { |
| 180 | |
| 181 | args := util.SplitButRespectQuotes(strings.ToLower(rest)) |
| 182 | |
| 183 | if len(args) == 0 { |
| 184 | return true, nil |
| 185 | } |
| 186 | |
| 187 | if corpse, corpseFound := room.FindCorpse(rest); corpseFound { |
| 188 | |
| 189 | if room.RemoveCorpse(corpse) { |
| 190 | |
| 191 | corpseColor := `mob-corpse` |
| 192 | if corpse.UserId > 0 { |
| 193 | corpseColor = `user-corpse` |
| 194 | } |
| 195 | |
| 196 | room.SendText(fmt.Sprintf(`<ansi fg="mobname">%s</ansi> buries the <ansi fg="%s">%s corpse</ansi>.`, mob.Character.Name, corpseColor, corpse.Character.Name)) |
| 197 | return true, nil |
| 198 | |
| 199 | } |
| 200 | |
| 201 | return true, nil |
| 202 | } |
| 203 | |
| 204 | return true, nil |
| 205 | } |
nothing calls this directly
no test coverage detected