<commit_before>/*
 * Copyright  2014 <NAME>
 * Distributed under the GNU Affero General Public License, version 3.
 * Your changes must be made public.
 * For the full license text, see LICENSE.txt.
 */
obj/destination
	invisibility=2
mob
	ministryfinancer
		icon_state="divo"
		icon = 'NPCs.dmi'
		density=1
		name = "<NAME>"
		verb
			Talk()
				set src in oview(3)
				var/mob/Player/p = usr
				if(p.Rank == "Minister of Magic")
					hearers() << npcsay("Head of Finance: Hello, Minister. We currently have [worldData.ministrybank] gold.")
					var/choice = input("What would you like to do?") as null|anything in list("Deposit gold","Withdraw gold","Change tax rate")
					switch(choice)
						if("Deposit gold")
							var/amount = input("How much would you like to deposit?",,usr.gold.get()) as null|num
							if(!amount)return
							if(p.gold.get() >= amount && amount > 0)
								hearers() << npcsay("Head of Finance: I've placed the [amount] gold into the account.")
								worldData.ministrybank += amount
								p.gold.add(-amount)
							else
								hearers() << npcsay("Head of Finance: You don't have that much gold.")
						if("Withdraw gold")
							var/amount = input("How much would you like to withdraw?",,worldData.ministrybank) as null|num
							if(!amount)return
							if(amount <= worldData.ministrybank && amount > 0)
								hearers() << npcsay("Head of Finance: Here is the [amount] gold.")
								worldData.ministrybank -= amount
								p.gold.add(amount)
							else
								hearers() << npcsay("Head of Finance: There isn't that much gold in the ministry account.")

						if("Change tax rate")
							var/newtaxrate = input("What will the new taxrate be? (%)","New Tax Rate",worldData.taxrate) as null|num
							if(!newtaxrate)return
							worldData.taxrate = newtaxrate
							hearers() << npcsay("Head of Finance: The tax rate is now [worldData.taxrate]%.")
				else
					hearers() << npcsay("Head of Finance: Unfortunately, I can only discuss the finances of the Ministry with the Minister.")
obj/ministrybox
	name = "Ministry Mail Box"
	icon = 'desk.dmi'
	icon_state = "ministrybox"
	mouse_over_pointer = MOUSE_HAND_POINTER
	New()
		..()
		ministrybox = src
	Click()
		if(!(src in oview(1)))return
		var/mob/Player/p = usr
		if(p.House=="Ministry")
			var/reply = alert("Do you wish to retrieve the mail, or add something?",,"Retrieve","Add","Cancel")
			if(reply=="Cancel")return
			else if(reply == "Retrieve")
				var/i = 0
				for(var/obj/O in src.contents)
					O.Move(usr)
					i++
				p.Resort_Stacking_Inv()
				p << "<b>Ministry Box:</b> <i> [i] item[i==1 ? "" : "s"] of mail [i==1 ? "has" : "have"] been added to your inventory.</i>"
				return

		var/list/obj/items/scroll/scrolls = list()
		for(var/obj/items/scroll/S in usr)
			scrolls += S
		if(scrolls.len<1)
			view(src) << "<b>Ministry Box:</b> <i>You need to be carrying a scroll before you can drop it in the box.</i>"
		else
			var/obj/items/scroll/S = input("Which scroll would you like to give to the ministry? Note that junk mail is not permitted - if you abuse this system you will be banned from the Ministry of Magic premises.") as null|obj in scrolls
			if(!S) return
			if(!S.content)
				view(src) << "<b>Ministry Box:</b> <i>Your scroll doesn't have anything written on it.</i>"
			else
				S.Move(src)
				view(src) << "<b>Ministry Box:</b> <i>Thank you!</i>"
<commit_msg>Removes ministry financer<commit_after>/*
 * Copyright  2014 <NAME>
 * Distributed under the GNU Affero General Public License, version 3.
 * Your changes must be made public.
 * For the full license text, see LICENSE.txt.
 */
obj/destination
	invisibility=2
{'fraction_non_alphanumeric': 0.13531984691088025, 'fraction_numerical': 0.005740841990158557, 'mean_word_length': 3.2497096399535423, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4373777', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1163, 'n_words': 386}