mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
+16
-28
@@ -1,37 +1,25 @@
|
||||
// This needs moving somewhere more sensible
|
||||
// Code reviewers I choose you to help me
|
||||
// If this PR gets merged with this comment in you're all fired
|
||||
// -aa07
|
||||
/proc/can_use_species(mob/M, species)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
return TRUE
|
||||
// Always if human
|
||||
if(species == "human" || species == "Human")
|
||||
return TRUE
|
||||
|
||||
var/datum/species/S = GLOB.all_species[species]
|
||||
// Part of me feels like the below checks could be merged but ehh
|
||||
|
||||
// No if species is not selectable
|
||||
if(NOT_SELECTABLE in S.species_traits)
|
||||
return FALSE
|
||||
|
||||
// Yes if admin
|
||||
if(check_rights(R_ADMIN, FALSE))
|
||||
return TRUE
|
||||
|
||||
// Cant be using this if youre not an admin
|
||||
var/datum/species/S = GLOB.all_species[species]
|
||||
// No if species is blacklisted
|
||||
if(S.blacklisted)
|
||||
return FALSE
|
||||
|
||||
var/package_id = species2package(species)
|
||||
if(!package_id)
|
||||
return TRUE // Not a valid karma package
|
||||
if(M.client.karmaholder.hasPackage(package_id)) // They have it
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/proc/species2package(species_id)
|
||||
switch(species_id)
|
||||
if("Grey")
|
||||
return KARMAPACKAGE_SPECIES_GREY
|
||||
if("Kidan")
|
||||
return KARMAPACKAGE_SPECIES_KIDAN
|
||||
if("Slime People")
|
||||
return KARMAPACKAGE_SPECIES_SLIMEPEOPLE
|
||||
if("Vox")
|
||||
return KARMAPACKAGE_SPECIES_VOX
|
||||
if("Drask")
|
||||
return KARMAPACKAGE_SPECIES_DRASK
|
||||
if("Machine")
|
||||
return KARMAPACKAGE_SPECIES_MACHINE
|
||||
if("Plasmaman")
|
||||
return KARMAPACKAGE_SPECIES_PLASMAMAN
|
||||
return TRUE
|
||||
|
||||
@@ -96,7 +96,6 @@
|
||||
name = "magic mirror"
|
||||
icon_state = "magic_mirror"
|
||||
var/options = list("Name", "Body", "Voice")
|
||||
var/use_whitelist = TRUE
|
||||
var/organ_warn = FALSE
|
||||
|
||||
/obj/structure/mirror/magic/attack_hand(mob/user)
|
||||
@@ -125,11 +124,7 @@
|
||||
if("Body")
|
||||
if(organ_warn)
|
||||
to_chat(user, "<span class='boldwarning'>Using the mirror will destroy any non biochip implants in you!</span>")
|
||||
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian")
|
||||
if(use_whitelist)
|
||||
for(var/species in GLOB.whitelisted_species)
|
||||
if(can_use_species(H, species))
|
||||
race_list += species
|
||||
var/list/race_list = list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Slime People", "Grey", "Drask", "Kidan")
|
||||
|
||||
var/datum/ui_module/appearance_changer/AC = ui_users[user]
|
||||
if(!AC)
|
||||
@@ -178,6 +173,5 @@
|
||||
name = "M.A.G.I.C mirror"
|
||||
desc = "The M.A.G.I.C mirror will let you change your species in a flash! Be careful, any implants (not biochips) in you will be destroyed on use."
|
||||
options = list("Body")
|
||||
use_whitelist = FALSE
|
||||
organ_warn = TRUE
|
||||
|
||||
|
||||
@@ -261,7 +261,6 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
GLOB.http_log = "[GLOB.log_directory]/http.log"
|
||||
GLOB.sql_log = "[GLOB.log_directory]/sql.log"
|
||||
GLOB.chat_debug_log = "[GLOB.log_directory]/chat_debug.log"
|
||||
GLOB.karma_log = "[GLOB.log_directory]/karma.log"
|
||||
start_log(GLOB.world_game_log)
|
||||
start_log(GLOB.world_href_log)
|
||||
start_log(GLOB.world_runtime_log)
|
||||
@@ -270,7 +269,6 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
start_log(GLOB.http_log)
|
||||
start_log(GLOB.sql_log)
|
||||
start_log(GLOB.chat_debug_log)
|
||||
start_log(GLOB.karma_log)
|
||||
|
||||
#ifdef REFERENCE_TRACKING
|
||||
GLOB.gc_log = "[GLOB.log_directory]/gc_debug.log"
|
||||
|
||||
Reference in New Issue
Block a user