User:Moonmoon/del player

From Werewolf Wiki
Jump to navigation Jump to search

Converted things

  • del_player function now takes one required arg: player (the User of the person we're killing). Formerly it took cli, nick as required args. All kwarg keys are the same, however in instances where we took nicks (original, deadlist) we now take Users.
  • wolflist event
    • signature is now (evt, var, wolf, player) -- wolf and player both Users. wolf is the wolf being displayed in the list and player is who the wolflist is being sent to.
  • assassinate event
    • data["pl"] is now a Set[User], data["target"] is now a User
    • params.deadlist, params.original, params.killer now Users
    • params.del_player has updated del_player signature mentioned above
    • params.refresh_pl returns a Set[User]
    • signature is now (evt, var, killer, target, active_protection) -- killer, target are Users; active_protection is str
  • del_player event
    • data["pl"] is now a Set[User]
    • params.deadlist, params.original now Users
    • params.del_player has updated del_player signature mentioned above
    • params.refresh_pl returns a Set[User]
    • signature is unchanged
  • update_stats event
    • signature is now (evt, var, player, mainrole, revealrole, allroles), where player is the User that died

Things still pending conversion

  • get_reveal_role
  • var.ACTIVE_PROTECTIONS
  • day/night timers (on time lord death)
  • Moving the IRC code out of del_player (devoice, var.QUIET_DEAD_PLAYERS, var.OLD_MODES)
  • var.GAMEMODE_VOTES
  • var.START_VOTES
  • var.DEAD
  • var.DISCONNECTED
  • var.VOTES
  • var.NO_LYNCH

Bugs

  • Things are still checking var.HVISITED; that var should no longer exist since harlot has been split. It is not being used. Removed the check in del_player but other things elsewhere in wolfgame.py still use it
  • Make del_player's kwargs kwarg-only so we don't have things like del_player(player, True) which is less than helpful in terms of meaning. wtf is that True? I consulted my magic 8 ball but all it said was "without a doubt."