mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Merge pull request #2316 from Yoshax/whiteliststuff
Fixes change appearance not allowing people to select other species
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
var/flags = 0 // Various runtime options.
|
||||
|
||||
// Used for setting appearance.
|
||||
var/list/valid_species = list("Unathi","Tajara","Skrell","Human")
|
||||
var/list/valid_species = list("Unathi","Tajara","Skrell","Human","Diona","Teshari")
|
||||
|
||||
// Runtime vars.
|
||||
var/datum/mind/leader // Current leader, if any.
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
if(!preserve_appearance && (flags & ANTAG_SET_APPEARANCE))
|
||||
spawn(3)
|
||||
var/mob/living/carbon/human/H = player.current
|
||||
if(istype(H)) H.change_appearance(APPEARANCE_ALL, H.loc, H, valid_species, state = z_state)
|
||||
if(istype(H))
|
||||
H.change_appearance(APPEARANCE_ALL, H.loc, H, species_whitelist = valid_species, state = z_state)
|
||||
return player.current
|
||||
|
||||
/datum/antagonist/proc/update_access(var/mob/living/player)
|
||||
|
||||
@@ -62,21 +62,22 @@ NOTE: It checks usr by default. Supply the "user" argument if you wish to check
|
||||
if(ismob(C))
|
||||
var/mob/M = C
|
||||
C = M.client
|
||||
if(!C)
|
||||
return FALSE
|
||||
if(!C.holder)
|
||||
if(show_msg)
|
||||
C << "<span class='warning'>Error: You are not an admin.</span>"
|
||||
return FALSE
|
||||
|
||||
if(C)
|
||||
if(rights_required)
|
||||
if(rights_required & C.holder.rights)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
C << "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>"
|
||||
if(rights_required)
|
||||
if(rights_required & C.holder.rights)
|
||||
return TRUE
|
||||
else
|
||||
if(C.holder)
|
||||
return 1
|
||||
else
|
||||
if(show_msg)
|
||||
C << "<font color='red'>Error: You are not an admin.</font>"
|
||||
return 0
|
||||
if(show_msg)
|
||||
C << "<span class='warning'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</span>"
|
||||
return FALSE
|
||||
else
|
||||
return TRUE
|
||||
|
||||
//probably a bit iffy - will hopefully figure out a better solution
|
||||
/proc/check_if_greater_rights_than(client/other)
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
continue
|
||||
if(blacklist.len && (current_species_name in blacklist))
|
||||
continue
|
||||
if((current_species.spawn_flags & SPECIES_IS_WHITELISTED) && !is_alien_whitelisted(src, current_species_name))
|
||||
if((current_species.spawn_flags & SPECIES_IS_WHITELISTED) && !is_alien_whitelisted(src, current_species))
|
||||
continue
|
||||
|
||||
valid_species += current_species_name
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Yoshax
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- bugfix: "The change appearance window provided to antagoniss such as mercenaries, heisters or suchlike (including traders!) will now properly allow people to select species they are whitelisted for."
|
||||
Reference in New Issue
Block a user