mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Merge remote-tracking branch 'upstream/master' into lungsss
# Conflicts: # code/modules/mob/living/carbon/alien/humanoid/life.dm # code/modules/mob/living/carbon/human/life.dm # code/modules/mob/living/carbon/human/species/station.dm # code/modules/surgery/surgery.dm
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
var/jobban_runonce // Updates legacy bans with new info
|
||||
var/jobban_keylist[0] // Linear list of jobban strings, kept around for the legacy system
|
||||
var/jobban_assoclist[0] // Associative list, for efficiency
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
to_chat(usr, "<span class='notice'>Admin rank changed.</span>")
|
||||
|
||||
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
|
||||
if(config.admin_legacy_system)
|
||||
if(config.admin_legacy_system)
|
||||
return
|
||||
|
||||
if(!usr.client)
|
||||
@@ -153,13 +153,15 @@
|
||||
var/DBQuery/log_query = dbcon.NewQuery("INSERT INTO `test`.[format_table_name("admin_log")] (`id` ,`datetime` ,`adminckey` ,`adminip` ,`log` ) VALUES (NULL , NOW( ) , '[usr.ckey]', '[usr.client.address]', 'Added permission [rights2text(new_permission)] (flag = [new_permission]) to admin [adm_ckey]')")
|
||||
log_query.Execute()
|
||||
to_chat(usr, "<span class='notice'>Permission added.</span>")
|
||||
|
||||
|
||||
/datum/admins/proc/updateranktodb(ckey,newrank)
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
return
|
||||
if(!check_rights(R_PERMISSIONS))
|
||||
return
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
var/sql_admin_rank = sanitizeSQL(newrank)
|
||||
|
||||
var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastadminrank = '[sql_admin_rank]' WHERE ckey = '[sql_ckey]'")
|
||||
query_update.Execute()
|
||||
query_update.Execute()
|
||||
|
||||
+105
-42
@@ -1741,6 +1741,9 @@
|
||||
btypes += "Heal Over Time"
|
||||
btypes += "Permanent Regeneration"
|
||||
btypes += "Super Powers"
|
||||
btypes += "Scarab Guardian"
|
||||
btypes += "Human Protector"
|
||||
btypes += "Pet"
|
||||
var/blessing = input(owner, "How would you like to bless [M]?", "Its good to be good...", "") as null|anything in btypes
|
||||
if(!(blessing in btypes))
|
||||
return
|
||||
@@ -1766,6 +1769,7 @@
|
||||
H.dna.SetSEState(REGENERATEBLOCK, 1)
|
||||
genemutcheck(H, REGENERATEBLOCK, null, MUTCHK_FORCED)
|
||||
H.update_mutations()
|
||||
H.gene_stability = 100
|
||||
logmsg = "permanent regeneration."
|
||||
if("Super Powers")
|
||||
var/list/default_genes = list(REGENERATEBLOCK, BREATHLESSBLOCK, COLDBLOCK)
|
||||
@@ -1773,7 +1777,44 @@
|
||||
H.dna.SetSEState(gene, 1)
|
||||
genemutcheck(H, gene, null, MUTCHK_FORCED)
|
||||
H.update_mutations()
|
||||
H.gene_stability = 100
|
||||
logmsg = "superpowers."
|
||||
if("Scarab Guardian")
|
||||
var/obj/item/weapon/guardiancreator/biological/scarab = new /obj/item/weapon/guardiancreator/biological(H)
|
||||
var/list/possible_guardians = list("Chaos", "Standard", "Ranged", "Support", "Explosive", "Random")
|
||||
var/typechoice = input("Select Guardian Type", "Type") as null|anything in possible_guardians
|
||||
if(isnull(typechoice))
|
||||
return
|
||||
if(typechoice != "Random")
|
||||
possible_guardians -= "Random"
|
||||
scarab.possible_guardians = list()
|
||||
scarab.possible_guardians += typechoice
|
||||
scarab.attack_self(H)
|
||||
spawn(700)
|
||||
qdel(scarab)
|
||||
logmsg = "scarab guardian."
|
||||
if("Pet")
|
||||
var/pets = subtypesof(/mob/living/simple_animal/pet)
|
||||
var/petchoice = input("Select pet type", "Pets") as null|anything in pets
|
||||
if(isnull(petchoice))
|
||||
return
|
||||
var/mob/living/simple_animal/pet/P = new petchoice(H.loc)
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [P], pet of [H]?", poll_time = 100, min_hours = 10)
|
||||
var/mob/dead/observer/theghost = null
|
||||
if(candidates.len)
|
||||
theghost = pick(candidates)
|
||||
P.key = theghost.key
|
||||
P.master_commander = H
|
||||
spawn(30)
|
||||
var/newname = sanitize(copytext(input(P, "You are [P], pet of [H]. Would you like to change your name to something else?", "Name change", P.name) as null|text,1,MAX_NAME_LEN))
|
||||
if(newname && newname != P.name)
|
||||
P.name = newname
|
||||
if(P.mind)
|
||||
P.mind.name = newname
|
||||
logmsg = "pet ([P])."
|
||||
if("Human Protector")
|
||||
usr.client.create_eventmob_for(H, 0)
|
||||
logmsg = "syndie protector."
|
||||
if(logmsg)
|
||||
log_admin("[key_name(owner)] answered [key_name(M)]'s prayer with a blessing: [logmsg]")
|
||||
message_admins("[key_name_admin(owner)] answered [key_name_admin(M)]'s prayer with a blessing: [logmsg]")
|
||||
@@ -1797,8 +1838,8 @@
|
||||
ptypes += "Mutagen Cookie"
|
||||
ptypes += "Hellwater Cookie"
|
||||
ptypes += "Assassin"
|
||||
ptypes += "Priest"
|
||||
ptypes += "Lynch"
|
||||
ptypes += "Hunter"
|
||||
ptypes += "Crew Traitor"
|
||||
var/punishment = input(owner, "How would you like to smite [M]?", "Its good to be baaaad...", "") as null|anything in ptypes
|
||||
if(!(punishment in ptypes))
|
||||
return
|
||||
@@ -1856,47 +1897,12 @@
|
||||
H.drop_l_hand()
|
||||
H.equip_to_slot_or_del(evilcookie, slot_l_hand)
|
||||
logmsg = "a hellwater cookie."
|
||||
if("Priest")
|
||||
logmsg = "priest."
|
||||
if("Hunter")
|
||||
logmsg = "hunter."
|
||||
H.mutations |= NOCLONE
|
||||
message_admins("[key_name_admin(owner)] is sending a dark priest to assassinate [key_name_admin(M)]...")
|
||||
var/list/candidates = pollCandidates("Do you want to play as a murderous dark priest?")
|
||||
if(!candidates.len)
|
||||
to_chat(usr, "ERROR: Could not create priest. No valid candidates.")
|
||||
return
|
||||
var/mob/C = pick(candidates)
|
||||
var/key_of_priest = C.key
|
||||
if(!key_of_priest)
|
||||
to_chat(usr, "ERROR: Could not create priest. Could not pick key.")
|
||||
return
|
||||
var/datum/mind/priest_mind = new /datum/mind(key_of_priest)
|
||||
priest_mind.active = 1
|
||||
var/mob/living/carbon/human/priest_mob = new /mob/living/carbon/human(pick(latejoin))
|
||||
priest_mind.transfer_to(priest_mob)
|
||||
var/datum/outfit/admin/dark_priest/O = new /datum/outfit/admin/dark_priest
|
||||
priest_mob.equipOutfit(O, FALSE)
|
||||
var/obj/item/weapon/pinpointer/advpinpointer/N = new /obj/item/weapon/pinpointer/advpinpointer(priest_mob)
|
||||
priest_mob.equip_to_slot_or_del(N, slot_r_store)
|
||||
N.active = 1
|
||||
N.mode = 2
|
||||
N.target = H
|
||||
N.point_at(N.target)
|
||||
N.flags |= NODROP
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = priest_mind
|
||||
kill_objective.target = H.mind
|
||||
kill_objective.explanation_text = "Murder [H.real_name], the [H.mind.assigned_role], in the name of the dark gods."
|
||||
priest_mind.objectives += kill_objective
|
||||
ticker.mode.traitors |= priest_mob.mind
|
||||
to_chat(priest_mob, "<span class='danger'>ATTENTION:</span> You are now a dark priest!")
|
||||
to_chat(priest_mob, "<B>Goal: <span class='danger'>MURDER [H.real_name]</span>, currently in [get_area(H.loc)], in the name of the dark gods. </B>");
|
||||
to_chat(priest_mob, "<B>The gods will prevent their revival.</B>");
|
||||
priest_mob.mind.special_role = SPECIAL_ROLE_TRAITOR
|
||||
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR]
|
||||
tatorhud.join_hud(priest_mob)
|
||||
ticker.mode.set_antag_hud(priest_mob, "hudsyndicate")
|
||||
if("Assassin")
|
||||
logmsg = "assassin."
|
||||
usr.client.create_eventmob_for(H, 1)
|
||||
if("Crew Traitor")
|
||||
logmsg = "crew traitor."
|
||||
var/list/possible_traitors = list()
|
||||
for(var/mob/living/player in living_mob_list)
|
||||
if(player.client && player.mind && !player.mind.special_role && player.stat != DEAD && player != H)
|
||||
@@ -3330,6 +3336,63 @@
|
||||
// Refresh the page
|
||||
src.view_flagged_books()
|
||||
|
||||
/client/proc/create_eventmob_for(var/mob/living/carbon/human/H, var/killthem = 0)
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
var/admin_outfits = subtypesof(/datum/outfit/admin)
|
||||
var/hunter_outfits = list()
|
||||
for(var/type in admin_outfits)
|
||||
var/datum/outfit/admin/O = type
|
||||
hunter_outfits[initial(O.name)] = type
|
||||
var/dresscode = input("Select type", "Contracted Agents") as null|anything in hunter_outfits
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
var/datum/outfit/O = hunter_outfits[dresscode]
|
||||
message_admins("[key_name_admin(mob)] is sending a ([dresscode]) to [killthem ? "assassinate" : "protect"] [key_name_admin(H)]...")
|
||||
var/list/candidates = pollCandidates("Play as a [killthem ? "murderous" : "protective"] [dresscode]?")
|
||||
if(!candidates.len)
|
||||
to_chat(usr, "ERROR: Could not create eventmob. No valid candidates.")
|
||||
return
|
||||
var/mob/C = pick(candidates)
|
||||
var/key_of_hunter = C.key
|
||||
if(!key_of_hunter)
|
||||
to_chat(usr, "ERROR: Could not create eventmob. Could not pick key.")
|
||||
return
|
||||
var/datum/mind/hunter_mind = new /datum/mind(key_of_hunter)
|
||||
hunter_mind.active = 1
|
||||
var/mob/living/carbon/human/hunter_mob = new /mob/living/carbon/human(pick(latejoin))
|
||||
hunter_mind.transfer_to(hunter_mob)
|
||||
hunter_mob.equipOutfit(O, FALSE)
|
||||
var/obj/item/weapon/pinpointer/advpinpointer/N = new /obj/item/weapon/pinpointer/advpinpointer(hunter_mob)
|
||||
hunter_mob.equip_to_slot_or_del(N, slot_in_backpack)
|
||||
N.active = 1
|
||||
N.mode = 2
|
||||
N.target = H
|
||||
N.point_at(N.target)
|
||||
if(!locate(/obj/item/weapon/implant/dust, hunter_mob))
|
||||
var/obj/item/weapon/implant/dust/D = new /obj/item/weapon/implant/dust(hunter_mob)
|
||||
D.implant(hunter_mob)
|
||||
if(killthem)
|
||||
var/datum/objective/assassinate/kill_objective = new
|
||||
kill_objective.owner = hunter_mind
|
||||
kill_objective.target = H.mind
|
||||
kill_objective.explanation_text = "Kill [H.real_name], the [H.mind.assigned_role]."
|
||||
hunter_mind.objectives += kill_objective
|
||||
else
|
||||
var/datum/objective/protect/protect_objective = new
|
||||
protect_objective.owner = hunter_mind
|
||||
protect_objective.target = H.mind
|
||||
protect_objective.explanation_text = "Protect [H.real_name], the [H.mind.assigned_role]."
|
||||
hunter_mind.objectives += protect_objective
|
||||
ticker.mode.traitors |= hunter_mob.mind
|
||||
to_chat(hunter_mob, "<span class='danger'>ATTENTION:</span> You are now on a mission!")
|
||||
to_chat(hunter_mob, "<B>Goal: <span class='danger'>[killthem ? "MURDER" : "PROTECT"] [H.real_name]</span>, currently in [get_area(H.loc)]. </B>");
|
||||
if(killthem)
|
||||
to_chat(hunter_mob, "<B>If you kill them, they cannot be revived.</B>");
|
||||
hunter_mob.mind.special_role = SPECIAL_ROLE_TRAITOR
|
||||
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_TRAITOR]
|
||||
tatorhud.join_hud(hunter_mob)
|
||||
ticker.mode.set_antag_hud(hunter_mob, "hudsyndicate")
|
||||
|
||||
/proc/admin_jump_link(var/atom/target)
|
||||
if(!target) return
|
||||
|
||||
@@ -89,7 +89,8 @@
|
||||
|
||||
if("delete")
|
||||
for(var/d in objs)
|
||||
qdel(d)
|
||||
if(!datum_is_forbidden(d))
|
||||
qdel(d)
|
||||
|
||||
if("select")
|
||||
var/text = ""
|
||||
@@ -117,6 +118,9 @@
|
||||
if("set" in query_tree)
|
||||
var/list/set_list = query_tree["set"]
|
||||
for(var/d in objs)
|
||||
// Forbid explicitly modifying an admin datum's vars
|
||||
if(datum_is_forbidden(d))
|
||||
return
|
||||
for(var/list/sets in set_list)
|
||||
var/datum/temp = d
|
||||
var/i = 0
|
||||
@@ -124,11 +128,11 @@
|
||||
if(++i == sets.len)
|
||||
if(istype(temp, /turf) && (v == "x" || v == "y" || v == "z"))
|
||||
continue
|
||||
if(istype(temp.vars[v], /datum/admins))
|
||||
continue
|
||||
if(!datum_is_forbidden(temp.vars[v]))
|
||||
return
|
||||
temp.vars[v] = SDQL_expression(d, set_list[sets])
|
||||
break
|
||||
if(temp.vars.Find(v) && (istype(temp.vars[v], /datum) || istype(temp.vars[v], /client)) && !istype(temp.vars[v], /datum/admins))
|
||||
if(temp.vars.Find(v) && (istype(temp.vars[v], /datum) || istype(temp.vars[v], /client)) && !datum_is_forbidden(temp.vars[v]))
|
||||
temp = temp.vars[v]
|
||||
else
|
||||
break
|
||||
@@ -436,6 +440,11 @@
|
||||
for(var/arg in arguments)
|
||||
new_args[++new_args.len] = SDQL_expression(source, arg)
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if(istype(object, p))
|
||||
to_chat(usr, "<span class='warning'>It is forbidden to run this object's procs.</span>")
|
||||
return
|
||||
|
||||
if(object == world) // Global proc.
|
||||
procname = "/proc/[procname]"
|
||||
return call(procname)(arglist(new_args))
|
||||
|
||||
@@ -93,6 +93,7 @@ var/global/sent_honksquad = 0
|
||||
new_honksquad.mind_initialize()
|
||||
new_honksquad.mind.assigned_role = "MODE"
|
||||
new_honksquad.mind.special_role = SPECIAL_ROLE_HONKSQUAD
|
||||
new_honksquad.add_language("Clownish")
|
||||
ticker.mode.traitors |= new_honksquad.mind//Adds them to current traitor list. Which is really the extra antagonist list.
|
||||
new_honksquad.equip_honksquad(honk_leader_selected)
|
||||
return new_honksquad
|
||||
|
||||
@@ -13,6 +13,14 @@ var/list/forbidden_varedit_object_types = list(
|
||||
feedback_add_details("admin_verb","EDITV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
*/
|
||||
|
||||
/proc/datum_is_forbidden(type)
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if(istype(type, p))
|
||||
to_chat(usr, "<span class='warning'>It is forbidden to tamper with this object.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/client/proc/cmd_modify_ticker_variables()
|
||||
set category = "Debug"
|
||||
set name = "Edit Ticker Variables"
|
||||
@@ -131,7 +139,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
L[var_value] = mod_list_add_ass() //haha
|
||||
if("No")
|
||||
L += var_value
|
||||
|
||||
|
||||
/client/proc/mod_list(var/list/L)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
@@ -497,4 +505,4 @@ var/list/forbidden_varedit_object_types = list(
|
||||
to_chat(usr, "Variable type is <b>UNKNOWN</b>.")
|
||||
class = null
|
||||
|
||||
return class
|
||||
return class
|
||||
|
||||
@@ -513,7 +513,7 @@ client/proc/one_click_antag()
|
||||
new_vox.update_eyes()
|
||||
|
||||
for(var/obj/item/organ/external/limb in new_vox.bodyparts)
|
||||
limb.status &= ~(ORGAN_DESTROYED | ORGAN_ROBOT)
|
||||
limb.status &= ~ORGAN_ROBOT
|
||||
|
||||
//Now apply cortical stack.
|
||||
var/obj/item/weapon/implant/cortical/I = new(new_vox)
|
||||
|
||||
@@ -6,7 +6,7 @@ var/list/sounds_cache = list()
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
var/sound/awful_sound = sound(null, repeat = 0, wait = 0, channel = 777)
|
||||
var/sound/awful_sound = sound(null, repeat = 0, wait = 0, channel = CHANNEL_ADMIN)
|
||||
|
||||
log_admin("[key_name(src)] stopped admin sounds.")
|
||||
message_admins("[key_name_admin(src)] stopped admin sounds.", 1)
|
||||
@@ -18,7 +18,7 @@ var/list/sounds_cache = list()
|
||||
set name = "Play Global Sound"
|
||||
if(!check_rights(R_SOUNDS)) return
|
||||
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = 777)
|
||||
var/sound/uploaded_sound = sound(S, repeat = 0, wait = 1, channel = CHANNEL_ADMIN)
|
||||
uploaded_sound.priority = 250
|
||||
|
||||
sounds_cache += S
|
||||
|
||||
Reference in New Issue
Block a user