Skip to content

Commit

Permalink
protectiond around, for funny admins, no calls and edits
Browse files Browse the repository at this point in the history
  • Loading branch information
Deleted user committed Aug 19, 2024
1 parent ca05d3f commit c5aaf14
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion code/datums/statistics/entities/player_entity.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
var/statistic_name
var/value

BSQL_PROTECT_DATUM(/datum/entity/statistic)

/datum/entity_meta/statistic
entity_type = /datum/entity/statistic
table_name = "player_statistic"
Expand Down Expand Up @@ -80,6 +82,8 @@
var/list/statistic_info = list()
var/list/statistic_all = list()

BSQL_PROTECT_DATUM(/datum/statistic_groups)

/datum/statistic_groups/proc/load_statistic_deaths(list/datum/entity/statistic_death/statistics)
nemesis.nemesis_name = ""
nemesis.value = 0
Expand Down Expand Up @@ -133,6 +137,8 @@
var/list/statistic_all = list()
var/list/total = list()

BSQL_PROTECT_DATUM(/datum/player_statistic)

/datum/player_statistic/proc/load_statistic()
for(var/subtype in statistic_all)
var/datum/player_statistic_detail/statistic = statistics[subtype]
Expand Down Expand Up @@ -177,10 +183,14 @@
var/list/top_values_statistics = list()
var/list/statistics = list()

BSQL_PROTECT_DATUM(/datum/player_statistic_detail)

/datum/player_statistic_nemesis
var/nemesis_name
var/value

BSQL_PROTECT_DATUM(/datum/player_statistic_nemesis)

/////////////////////////////////////////////////////////////////////////////////////
//Player Entity

Expand All @@ -191,6 +201,8 @@
var/list/datum/entity/statistic/medal/medals = list()
var/list/statistics = list()

BSQL_PROTECT_DATUM(/datum/player_entity)

/datum/player_entity/proc/get_statistic(faction, statistic_type, general_name, statistic_name)
var/datum/statistic_groups/match_statistic = statistics[faction]
if(!match_statistic)
Expand Down Expand Up @@ -226,7 +238,7 @@

DB_FILTER(/datum/entity/statistic_death, DB_AND(
DB_COMP("player_id", DB_EQUALS, player.id),
DB_COMP("faction_name", DB_EQUALS, new_group.group_name)),
DB_COMP("faction_name", DB_EQUALS, faction_to_get)),
CALLBACK(new_group, TYPE_PROC_REF(/datum/statistic_groups, load_statistic_deaths)))

DB_FILTER(/datum/entity/statistic, DB_AND(
Expand Down

0 comments on commit c5aaf14

Please sign in to comment.