made it so nar-sie can't be objective if < 10 players, due to it being impossible

also, made piano moveable
and cleaned up custom vote code slightly more
This commit is contained in:
Tastyfish
2012-01-01 16:44:57 -05:00
parent 1f2f0a68dd
commit 343832e431
5 changed files with 52 additions and 20 deletions

View File

@@ -46,12 +46,6 @@
/datum/game_mode/cult/pre_setup()
if(prob(50))
objectives += "survive"
objectives += "sacrifice"
else
objectives += "eldergod"
objectives += "sacrifice"
var/list/cultists_possible = get_players_for_role(BE_CULTIST)
for(var/datum/mind/player in cultists_possible)
@@ -65,6 +59,16 @@
var/datum/mind/cultist = pick(cultists_possible)
cultists_possible -= cultist
cult += cultist
// don't give summon nar-sie if less than 10 people,
// it's literally impossible in that case!
if(prob(50) || num_players() < 10)
objectives += "survive"
objectives += "sacrifice"
else
objectives += "eldergod"
objectives += "sacrifice"
return (cult.len>0)

View File

@@ -381,7 +381,8 @@
var/list/notes = dd_text2list(beat, "/")
for(var/note in dd_text2list(notes[1], "-"))
//world << "note: [note]"
if(!playing)//If the piano is playing and you don't want it playing, this will stop the proc.
if(!playing || !anchored)//If the piano is playing, or is loose
playing = 0
return
if(lentext(note) == 0)
continue
@@ -404,8 +405,12 @@
else
sleep(song.tempo)
playing = 0
updateUsrDialog()
attack_hand(var/mob/user as mob)
if(!anchored)
return
usr.machine = src
var/dat = "<HEAD><TITLE>Piano</TITLE></HEAD><BODY>"
@@ -455,7 +460,7 @@
onclose(user, "piano")
Topic(href, href_list)
if(in_range(src, usr) && !issilicon(usr))
if(in_range(src, usr) && !issilicon(usr) && !anchored)
if(href_list["tempo"])
song.tempo += text2num(href_list["tempo"])
if(song.tempo < 1)
@@ -529,3 +534,26 @@
add_fingerprint(usr)
updateUsrDialog()
return
attackby(obj/item/O as obj, mob/user as mob)
if (istype(O, /obj/item/weapon/wrench))
if (anchored)
playsound(src.loc, 'Ratchet.ogg', 50, 1)
user << "\blue You begin to loosen \the [src]'s casters..."
if (do_after(user, 40))
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"\blue You have loosened \the [src]. Now it can be pulled somewhere else.", \
"You hear ratchet.")
src.anchored = 0
else
playsound(src.loc, 'Ratchet.ogg', 50, 1)
user << "\blue You begin to tighten \the [src] to the floor..."
if (do_after(user, 20))
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"\blue You have tightened \the [src]'s casters. Now it can be played again.", \
"You hear ratchet.")
src.anchored = 1
else
..()

View File

@@ -81,7 +81,7 @@
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] was unbuckled himself!",\
"\blue [M.name] unbuckled \himself!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
// world << "[M] is no longer buckled to [src]"
@@ -102,7 +102,7 @@
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] is buckled in to [src] by [user.name]!",\
"\blue [M.name] is buckled into [src] by [user.name]!",\
"You buckled in to [src] by [user.name].",\
"You hear metal clanking")
M.anchored = 1
@@ -290,7 +290,7 @@
else
M.visible_message(\
"\blue [M.name] is buckled in to [src] by [user.name]!",\
"You buckled in to [src] by [user.name].",\
"You buckled into [src] by [user.name].",\
"You hear metal clanking")
M.anchored = 1
M.buckled = src
@@ -314,7 +314,7 @@
"You hear metal clanking")
else
M.visible_message(\
"\blue [M.name] was unbuckled himself!",\
"\blue [M.name] unbuckled \himself!",\
"You unbuckle yourself from [src].",\
"You hear metal clanking")
M.pixel_y = 0

View File

@@ -397,12 +397,8 @@
spawn(config.vote_period*10)
vote.endvote()
if(vote.mode == 2)
world << "\red<B>*** A custom vote has been initiated by [M.key].</B>"
world << "\red You have [vote.timetext(config.vote_period)] to vote."
else
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by [M.key].</B>"
world << "\red You have [vote.timetext(config.vote_period)] to vote."
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by [M.key].</B>"
world << "\red You have [vote.timetext(config.vote_period)] to vote."
log_vote("Voting to [vote.mode ? "change mode" : "restart round"] started by [M.name]/[M.key]")

View File

@@ -2233,8 +2233,12 @@
// when the vote will end
spawn(config.vote_period*10)
vote.endvote()
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by Admin [usr.key].</B>"
world << "\red You have [vote.timetext(config.vote_period)] to vote."
if(vote.mode == 2)
world << "\red<B>*** A custom vote has been initiated by [usr.key].</B>"
world << "\red You have [vote.timetext(config.vote_period)] to vote."
else
world << "\red<B>*** A vote to [vote.mode?"change game mode":"restart"] has been initiated by [usr.key].</B>"
world << "\red You have [vote.timetext(config.vote_period)] to vote."
log_admin("Voting to [vote.mode?"change mode":"restart round"] forced by admin [key_name(usr)]")