Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- obj/Perkz
- var
- preseticon
- preseticon_state=""
- presetdescription=""
- presetname=""
- presetcolor=""
- presetnote=""
- creator = ""
- tier //Oleic
- perk_type //Oleic
- obj/Perkz/Core
- New()
- spawn(10)
- src.icon=src.preseticon
- src.icon_state="[src.preseticon_state]"
- // src.name=src.presetname
- obj/Perkz/SkillCard
- New()
- spawn(10)
- src.icon=src.preseticon
- src.icon_state="[src.preseticon_state]"
- // src.name=src.presetname
- obj/Perkz/Will
- New()
- spawn(10)
- src.icon=src.preseticon
- src.icon_state="[src.preseticon_state]"
- // src.name=src.presetname
- obj/Perkz
- proc //Oleic. Modularized this ugly process
- assign_icon_and_state()
- preseticon = input("Pick an icon for this perk","Perk Image") as icon
- preseticon_state = input("Perks","Type the name of the perk's icon state. If none, place this blank.") as text
- //Names the perk
- assign_name()
- presetname = input("What is the name of the perk?","Name") as text
- //Adds a description and note
- assign_desc_note()
- presetdescription = input("Enter the perk's description","Description") as message
- presetnote = input("Perks","Does this perk have a note?") as text
- presetcolor = input("Enter perk's text color. Example: '#8FBC8F' or 'red'","Color") as text
- //Adds a tier to the perk
- assign_tier()
- switch(input("Does this count toward's the player's rank?","Pool Points") in list ("Yes","No"))
- if("Yes")
- tier = input("What tier level is this? Enter 0 for none","Tier") as num
- //Gives the perk a type (Core, Will, Skill)
- assign_type()
- var/obj/type_holder = input("What kind of perk is this?","Type") in list("Core","Skillcard","Will")
- type_holder = new type_holder
- src = text2path("/obj/Perkz/[type_holder.type]")
- //Asks if the perk should be added to the database
- add_to_database(mob/admin)
- switch(input("Add to database?","Database") in list("Yes","No"))
- if("Yes")
- if(isnull(NeoPerkDatabase))
- admin <<"Perk Database file does not exist! Perk creation cancelled."
- loc = null
- return
- if(!NeoPerkDatabase.len)
- admin <<"There are currently no perks saved in the Perk Database! Cannot upload to Perk Database! Perk creation canclled."
- loc = null
- return
- else
- NeoPerkDatabase.Add(src)
- Perks_List_Save2()
- if("No")
- admin << "Perk was not added to the database"
- //Gives player the created perk
- assign_player(mob/admin)
- var/mob/player = input("Which player is receiving this perk?","Player") as mob in world
- player.contents.Add(src)
- for(var/mob/MM in players) if(MM.Admin) MM<< {"<font color=#F88017>[admin] gives [player] the perk: [src.presetname]."}
- Admin_Logs+="<br>[admin]([admin.key]) gave [player] a perk( [src.presetname] )"
- admin << "Give perk added to logs..."
- if(SaveLogs())
- admin << "Logs saved."
- else
- admin << "Error. SaveLogs did not save!"
- player.update_points()
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement