# pav_library
!2021/10/05
$loc_arg = ''
$loc = 'pav_library'
$location_type = 'public_indoors'
$menu_loc = 'pav_library'
$menu_arg = ''
menu_off = 0
frost = 0
gs 'stat'
gs 'themes', 'indoors'
'<center><b><font color="maroon">Community center library</font></b></center>'
'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/gdkbibl.jpg"></center>'
'For such a small town, the library is surprisingly large - containing many interesting books on a wide variety of subjects.'
*nl
'Between the bookshelves are some tables which can be used for studying. Some of them have <a href="exec: gs ''internet_mobile'', ''get_access'', ''free'', ''noporn'',''nocamshow'' & gs ''internet_mobile'', ''add_limitation'', ''general-text'', ''On this public computer all adult content sites are blocked'' & gt ''Komp'',''start''">computers</a> for public use.'
if lernHome > 0:
'You could do your homework with the help of one of the computers.'
end
if 	mid($start_type,1,2) = 'sg' and kanikuli = 0 and week < 6 and nerdstudynight['day'] ! daystart and hour > 14:
	'The nerds are sitting at a table studying together.'
end

act 'Leave': gt 'pav_commcenter'

act 'Go to the toilets': gt 'gdktoilet', 'start'

if nerd_game['game_day'] = daystart and hour = 19: act 'Wait for game night to start': minut += 60-minut & gt 'pav_library'
if nerd_game['game_day'] = daystart and hour = 20: act 'Join the <b>nerds</b>': gt 'nerd_game_night', 'game'

if hour >= 8 and hour < 18:
	act 'Read a book on science (1:00)':
		*clr & cla
		menu_off = 1
		if blizoruk = 500 or glassqw = 1: glassqw = 1 & msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.' & gt $curloc
		if pcs_nerd > 0: lastread = totminut & lastreadday = daystart & pcs_nerd += 1
		minut += 60
		gs 'exp_gain', 'intel', rand(3,6) + (mentats_dose - rand(0,mentats_dose))
		blizoruk += 1
		grupvalue[3] +=1
		gs'stat'
		'<center><img <<$set_imgh>> src="images/pc/items/accessories/books/science1.jpg"></center>'
		'You spend an hour reading, trying to make sense of all the clever propositions writen inside and to finally understand the subject it describes.'
		act 'Put the book back': gt 'pav_library'
	end
	act 'Read an adventure novel (1:00)':
		*clr & cla
		menu_off = 1
		if blizoruk = 500 or glassqw = 1: glassqw = 1 & msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.' & gt $curloc
		if pcs_nerd > 0: lastread = totminut & lastreadday = daystart & pcs_nerd += 1
		minut += 60
		pcs_mood = 100
		blizoruk += 1
		grupvalue[3] +=1
		gs'stat'
		'<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fiction' + rand(1,2) + '.jpg"></center>'
		'You spend an hour reading an adventure novel, immersing yourself in daring deeds and awesome twists.'
		act 'Put the book back': gt 'pav_library'
	end
	act 'Read a fantasy novel (1:00)':
		*clr & cla
		menu_off = 1
		if blizoruk = 500 or glassqw = 1: glassqw = 1 & msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.' & gt $curloc
		if pcs_nerd > 0: lastread = totminut & lastreadday = daystart & pcs_nerd += 1
		minut += 60
		pcs_mood = 100
		blizoruk += 1
		grupvalue[3] +=1
		gs'stat'
		'<center><img <<$set_imgh>> src="images/pc/items/accessories/books/fantasy' + rand(1,9) + '.jpg"></center>'
		'You spend an hour reading a fantasy novel, rescuing damsels from dragons, digging for jewels with dwarves and performing word changing magic alongside elves and druids.'
		act 'Put the book back': gt 'pav_library'
	end
	act 'Read a science fiction novel (1:00)':
		*clr & cla
		menu_off = 1
		if blizoruk = 500 or glassqw = 1: glassqw = 1 & msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.' & gt $curloc
		if pcs_nerd > 0: lastread = totminut & lastreadday = daystart & pcs_nerd += 1
		minut += 60
		pcs_mood = 100
		blizoruk += 1
		grupvalue[3] +=1
		gs'stat'
		'<center><img <<$set_imgh>> src="images/pc/items/accessories/books/scifi' + rand(1,6) + '.jpg"></center>'
		'You spend an hour reading a science fiction novel - flying off into space, travelling though time, running from rogue AI''s and creating monsters with your hunchbacked assistant.'
		act 'Put the book back': gt 'pav_library'
	end
	act 'Read a romance novel (1:00)':
		*clr & cla
		menu_off = 1
		if blizoruk = 500 or glassqw = 1: glassqw = 1 & msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.' & gt $curloc
		if pcs_nerd > 0: lastread = totminut & lastreadday = daystart & pcs_nerd += 1
		minut += 60
		pcs_mood = 100
		blizoruk += 1
		pcs_horny += 20
		gs'stat'
		'<center><img <<$set_imgh>> src="images/pc/items/accessories/books/romance' + rand(1,20) + '.jpg"></center>'
		'You spend a very short hour reading a romance novel - choosing between a vampire or a werewolf, falling in love with an obscenely wealthy Grey... several of the scenes are very steamy and you find yourself getting quite aroused.'
		act 'Put the book back': gt 'pav_library'
	end
	act 'Study for an hour':
		*clr & cla
		menu_off = 1
		if blizoruk = 500 or glassqw = 1: glassqw = 1 & msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.' & gt $curloc
		if pcs_nerd > 0: lastread = totminut & lastreadday = daystart & pcs_nerd += 1
		minut += 60
		lern += rand(1,3)
		blizoruk += 1
		grupvalue[3] += 2
		gs'stat'
		'<center><img <<$set_imgh>> src="images/pc/items/accessories/books/learning' + rand(1,3) + '.jpg"></center>'
		'You read several books that should help you with your school work, you feel that you learned something today.'
		act 'Put the book back': gt 'pav_library'
	end
	act 'Read from the collected works of Leo Tolstoy (1:00)':
		*clr & cla
		menu_off = 1
		if blizoruk = 500 or glassqw = 1: glassqw = 1 & msg 'The text blurs across the page, it seems that your eyesight is actually pretty poor. Maybe you should head to the city and visit an ophthalmologist.' & gt $curloc
		if pcs_nerd > 0: lastread = totminut & lastreadday = daystart & pcs_nerd += 1
		minut += 60
		gs 'exp_gain', 'sprt', rand(3,6)
		blizoruk += 1
		grupvalue[3] +=2
		gs'stat'
		'<center><img <<$set_imgh>> src="images/pc/items/accessories/books/tolstoy.jpg"></center>'
		'You read the book for an hour. Tolstoy is certainly a classic writer, no one denies this, but he used a shit-load of words.'
		act 'Put the book back': gt 'pav_library'
	end
	gs 'willpower', 'misc', 'self', iif(grupTipe = 4 and pcs_traits['nerd_status'] = 0, 'hard', iif(pcs_traits['nerd_status'] > 0, 'easy', 'medium'))
	if pcs_traits['nerd_status'] = 2: will_cost = will_cost / 2
	if lernHome > 0 and (will_cost <= pcs_willpwr or pcs_traits['nerd_status'] = 3):
		act 'Do your homework (1:00'+iif(pcs_traits['nerd_status'] = 3, '', ' and <<will_cost>> Willpower')+')':
			cla & *clr
			'<center><img <<$set_imgh>> src="images/locations/pavlovsk/community/library/homework.jpg"></center>'
			minut += 60
			pcs_mood += 5 * pcs_traits['nerd_status']
			lern += 1
			gs 'willpower', 'misc', 'self', iif(grupTipe = 4, 'hard', iif(pcs_traits['nerd_status'] > 0, 'easy', 'medium'))
			if pcs_traits['nerd_status'] = 2: will_cost = will_cost / 2
			if pcs_traits['nerd_status'] < 3: gs 'willpower', 'pay', 'self'
			gs'stat'
			gs 'grades', 'homework', 'school', 'yes', 1, 0, 0
			'You sit down at one of the tables with a a computer and use it to help you do your homework.'
			'After an hour you have '+iif(lernHome = 0, 'completed', 'done a part of')+' your homework.'
			act 'Get up form the table': gt 'pav_library'
		end
	elseif lernHome > 0 and will_cost > pcs_willpwr:
		act 'Do your homework (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
	end
	if mid($start_type,1,2) = 'sg' and kanikuli = 0 and week < 6 and nerdstudynight['day'] ! daystart and hour > 14:
		act 'Join the nerd''s study group': gt 'pav_library_nerdstudy', 'nerd_study_night'
	end
else
	'The library is closed.'
end

--- pav_library ---------------------------------

