Skip to content

Commit

Permalink
Adds a configurable message to be sent to mobs on polymorph (tgstatio…
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss authored and lzimann committed Jun 21, 2017
1 parent 930a96e commit e5b1e68
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@

var/irc_announce_new_game = FALSE

var/list/policies = list()

/datum/configuration/New()
gamemode_cache = typecacheof(/datum/game_mode,TRUE)
for(var/T in gamemode_cache)
Expand All @@ -288,6 +290,7 @@
/datum/configuration/proc/Reload()
load("config/config.txt")
load("config/game_options.txt","game_options")
load("config/policies.txt", "policies")
loadsql("config/dbconfig.txt")
if (maprotation)
loadmaplist("config/maps.txt")
Expand Down Expand Up @@ -779,6 +782,8 @@
mice_roundstart = text2num(value)
else
GLOB.config_error_log << "Unknown setting in configuration: '[name]'"
else if(type == "policies")
policies[name] = value

fps = round(fps)
if(fps <= 0)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/projectile/magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@

to_chat(new_mob, "<span class='warning'>Your form morphs into that of a [randomize].</span>")

to_chat(new_mob, config.policies["polymorph"])

qdel(M)
return new_mob

Expand Down
5 changes: 5 additions & 0 deletions config/policies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## SERVER POLICIES ##
# Each line is pure html that gets sent to the user under certain conditions

# When a mob is polymorphed
POLYMORPH <span class='danger'>Note that you are allowed to act as an antagonist while transformed into a hostile mob, unless you volunteered for or sought out transformation.</span>

0 comments on commit e5b1e68

Please sign in to comment.