Merge remote-tracking branch 'tgstation/master' into toolboxcrusaders

This commit is contained in:
KorPhaeron
2015-09-22 23:41:02 -05:00
220 changed files with 5747 additions and 5972 deletions
+26 -3
View File
@@ -252,6 +252,7 @@
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
body += "<option value='?_src_=vars;offer_control=\ref[D]'>Offer Control to Ghosts</option>"
if(iscarbon(D))
body += "<option value>---</option>"
body += "<option value='?_src_=vars;editorgans=\ref[D]'>Modify organs</option>"
@@ -592,6 +593,29 @@ body
if(usr.client)
usr.client.cmd_assume_direct_control(M)
else if(href_list["offer_control"])
if(!check_rights(0)) return
var/mob/M = locate(href_list["offer_control"])
if(!istype(M))
usr << "This can only be used on instances of type /mob"
return
M << "Control of your mob has been offered to dead players."
log_admin("[key_name(usr)] has offered control of ([key_name(M)]) to ghosts.")
message_admins("[key_name_admin(usr)] has offered control of ([key_name_admin(M)]) to ghosts")
var/list/mob/dead/observer/candidates = pollCandidates("Do you want to play as [M.real_name]?", "pAI", null, FALSE, 100)
var/mob/dead/observer/theghost = null
if(candidates.len)
theghost = pick(candidates)
M << "Your mob has been taken over by a ghost!"
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(M)])")
M.ghostize()
M.key = theghost.key
else
M << "There were no ghosts willing to take control."
message_admins("No ghosts were willing to take control of [key_name_admin(M)])")
else if(href_list["delall"])
if(!check_rights(R_DEBUG|R_SERVER)) return
@@ -813,8 +837,7 @@ body
if(result)
var/newtype = species_list[result]
hardset_dna(H, null, null, null, null, newtype)
H.regenerate_icons()
H.set_species(newtype)
else if(href_list["purrbation"])
if(!check_rights(R_SPAWN)) return
@@ -828,7 +851,7 @@ body
usr << "Mob doesn't exist anymore"
return
if(H.dna && H.dna.species.id == "human")
if(H.dna.species.id == "human")
if(H.dna.features["tail_human"] == "None" || H.dna.features["ears"] == "None")
usr << "Put [H] on purrbation."
H << "You suddenly feel valid."
@@ -35,6 +35,6 @@ Bonus
M << "<span class='notice'>[pick("You feel confused.", "You forgot what you were thinking about.")]</span>"
else
M << "<span class='notice'>You are unable to think straight!</span>"
M.confused = min(100, M.confused + 2)
M.confused = min(100, M.confused + 8)
return
@@ -31,7 +31,8 @@ Bonus
..()
if(prob(SYMPTOM_ACTIVATION_PROB * 5)) // 15% chance
var/mob/living/carbon/M = A.affected_mob
if(!check_dna_integrity(M)) return
if(!M.has_dna())
return
switch(A.stage)
if(4, 5)
M << "<span class='notice'>[pick("Your skin feels itchy.", "You feel light headed.")]</span>"
@@ -44,7 +45,7 @@ Bonus
possible_mutations = (bad_mutations | not_good_mutations) - mutations_list[RACEMUT]
var/mob/living/carbon/M = A.affected_mob
if(M)
if(!check_dna_integrity(M))
if(!M.has_dna())
return
archived_dna = M.dna.struc_enzymes
@@ -52,10 +53,10 @@ Bonus
/datum/symptom/genetic_mutation/End(datum/disease/advance/A)
var/mob/living/carbon/M = A.affected_mob
if(M && archived_dna)
if(!check_dna_integrity(M))
if(!M.has_dna())
return
hardset_dna(M, se = archived_dna)
domutcheck(M)
M.dna.struc_enzymes = archived_dna
M.domutcheck()
/*
//////////////////////////////////////
+9 -11
View File
@@ -43,7 +43,7 @@
affected_mob.adjustToxLoss(2)
affected_mob.updatehealth()
if(4)
if(!src.transformed && !src.carrier)
if(!transformed && !carrier)
//Save original dna for when the disease is cured.
original_dna = new affected_mob.dna.type
affected_mob.dna.copy_dna(original_dna)
@@ -51,24 +51,22 @@
affected_mob << "<span class='danger'>You don't feel like yourself..</span>"
var/datum/dna/transform_dna = strain_data["dna"]
transform_dna.transfer_identity(affected_mob)
transform_dna.transfer_identity(affected_mob, transfer_SE = 1)
affected_mob.real_name = affected_mob.dna.real_name
affected_mob.updateappearance(mutcolor_update=1)
affected_mob.domutcheck()
updateappearance(affected_mob)
domutcheck(affected_mob)
src.transformed = 1
src.carrier = 1 //Just chill out at stage 4
transformed = 1
carrier = 1 //Just chill out at stage 4
return
/datum/disease/dnaspread/Del()
if (original_dna && transformed && affected_mob)
original_dna.transfer_identity(affected_mob)
original_dna.transfer_identity(affected_mob, transfer_SE = 1)
affected_mob.real_name = affected_mob.dna.real_name
updateappearance(affected_mob)
domutcheck(affected_mob)
affected_mob.updateappearance(mutcolor_update=1)
affected_mob.domutcheck()
affected_mob << "<span class='notice'>You feel more like yourself.</span>"
..()
+2 -3
View File
@@ -201,9 +201,8 @@
if(3)
if(ishuman(affected_mob))
var/mob/living/carbon/human/human = affected_mob
if(human.dna && human.dna.species.id != "slime")
hardset_dna(human, null, null, null, null, /datum/species/slime)
human.regenerate_icons()
if(human.dna.species.id != "slime")
human.set_species(/datum/species/slime)
/datum/disease/transformation/corgi
name = "The Barkening"
+13 -31
View File
@@ -27,34 +27,22 @@
/datum/martial_art/proc/basic_hit(mob/living/carbon/human/A,mob/living/carbon/human/D)
A.do_attack_animation(D)
var/damage = rand(0,9)
var/damage = rand(0,9) + A.dna.species.punchmod
var/atk_verb = "punch"
var/atk_verb = A.dna.species.attack_verb
if(D.lying)
atk_verb = "kick"
else if(A.dna)
atk_verb = A.dna.species.attack_verb
if(A.dna)
damage += A.dna.species.punchmod
if(!damage)
if(A.dna)
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
else
playsound(D.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>")
add_logs(A, D, "attempted to [atk_verb]")
return 0
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>")
add_logs(A, D, "attempted to [atk_verb]")
return 0
var/obj/item/organ/limb/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
var/armor_block = D.run_armor_check(affecting, "melee")
if(A.dna)
playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
else
playsound(D.loc, 'sound/weapons/punch1.ogg', 25, 1, -1)
playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
D.visible_message("<span class='danger'>[A] has [atk_verb]ed [D]!</span>", \
"<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>")
@@ -104,24 +92,18 @@
var/atk_verb = pick("left hook","right hook","straight punch")
var/damage = rand(5,8)
if(A.dna)
damage += A.dna.species.punchmod
var/damage = rand(5,8) + A.dna.species.punchmod
if(!damage)
if(A.dna)
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
else
playsound(D.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
D.visible_message("<span class='warning'>[A] has attempted to hit [D] with a [atk_verb]!</span>")
add_logs(A, D, "attempted to hit", atk_verb)
return 0
playsound(D.loc, A.dna.species.miss_sound, 25, 1, -1)
D.visible_message("<span class='warning'>[A] has attempted to hit [D] with a [atk_verb]!</span>")
add_logs(A, D, "attempted to hit", atk_verb)
return 0
var/obj/item/organ/limb/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
var/armor_block = D.run_armor_check(affecting, "melee")
playsound(D.loc, 'sound/weapons/punch1.ogg', 25, 1, -1)
playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
D.visible_message("<span class='danger'>[A] has hit [D] with a [atk_verb]!</span>", \
"<span class='userdanger'>[A] has hit [D] with a [atk_verb]!</span>")
+4 -4
View File
@@ -976,10 +976,10 @@
usr << "<span class='danger'>Resetting DNA failed!</span>"
else
var/mob/living/carbon/C = current
C.dna = changeling.first_prof.dna
changeling.first_prof.dna.transfer_identity(C, transfer_SE=1)
C.real_name = changeling.first_prof.name
updateappearance(C)
domutcheck(C)
C.updateappearance(mutcolor_update=1)
C.domutcheck()
else if (href_list["nuclear"])
switch(href_list["nuclear"])
@@ -1409,7 +1409,7 @@
var/mob/living/carbon/human/H = current
hardset_dna(H,null,null,null,null,/datum/species/abductor,null)
H.set_species(/datum/species/abductor)
var/datum/species/abductor/S = H.dna.species
switch(role)
+52 -22
View File
@@ -16,6 +16,9 @@
var/text_gain_indication = ""
var/text_lose_indication = ""
var/list/visual_indicators = list()
var/layer_used = MUTATIONS_LAYER //which mutation layer to use
var/list/species_allowed = list() //to restrict mutation to only certain species
var/health_req //minimum health required to acquire the mutation
/datum/mutation/human/proc/force_give(mob/living/carbon/human/owner)
set_block(owner)
@@ -33,7 +36,7 @@
return before + injection + after
/datum/mutation/human/proc/set_block(mob/living/carbon/owner, on = 1)
if(owner && istype(owner) && owner.dna)
if(owner && owner.has_dna())
owner.dna.struc_enzymes = set_se(owner.dna.struc_enzymes, on)
/datum/mutation/human/proc/check_block_string(se_string)
@@ -51,17 +54,25 @@
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/owner)
if(!owner || !istype(owner) || (src in owner.dna.mutations))
return 1
if(species_allowed.len && !species_allowed.Find(owner.dna.species.id))
return 1
if(health_req && owner.health < health_req)
return 1
owner.dna.mutations.Add(src)
owner << text_gain_indication
if(text_gain_indication)
owner << text_gain_indication
if(visual_indicators.len)
owner.update_mutation_overlays()
var/list/mut_overlay = list(get_visual_indicator(owner))
if(owner.overlays_standing[layer_used])
mut_overlay = owner.overlays_standing[layer_used]
mut_overlay |= get_visual_indicator(owner)
owner.remove_overlay(layer_used)
owner.overlays_standing[layer_used] = mut_overlay
owner.apply_overlay(layer_used)
/datum/mutation/human/proc/get_visual_indicator(mob/living/carbon/human/owner)
return
/datum/mutation/human/proc/lose_indication(mob/living/carbon/human/owner)
owner.overlays.Remove(visual_indicators)
/datum/mutation/human/proc/on_attack_hand(mob/living/carbon/human/owner, atom/target)
return
@@ -76,9 +87,16 @@
/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner)
if(owner && istype(owner) && (owner.dna.mutations.Remove(src)))
owner << text_lose_indication
if(text_lose_indication)
owner << text_lose_indication
if(visual_indicators.len)
owner.update_mutation_overlays()
var/list/mut_overlay = list()
if(owner.overlays_standing[layer_used])
mut_overlay = owner.overlays_standing[layer_used]
owner.remove_overlay(layer_used)
mut_overlay.Remove(get_visual_indicator(owner))
owner.overlays_standing[layer_used] = mut_overlay
owner.apply_overlay(layer_used)
return 0
return 1
@@ -96,6 +114,8 @@
get_chance = 15
lowest_value = 256 * 12
text_gain_indication = "<span class='notice'>Your muscles hurt!</span>"
species_allowed = list("human") //no skeleton/lizard hulk
health_req = 25
/datum/mutation/human/hulk/New()
..()
@@ -583,32 +603,42 @@
message = replacetext(message," muh valids "," getting my kicks ")
return trim(message)
/datum/mutation/human/laser_eyes
name = "Laser Eyes"
quality = POSITIVE
dna_block = NON_SCANNABLE
text_gain_indication = "<span class='notice'>You feel pressure building up behind your eyes.</span>"
layer_used = FRONT_MUTATIONS_LAYER
/datum/mutation/human/laser_eyes/New()
..()
visual_indicators |= image("icon"='icons/effects/genetics.dmi', "icon_state"="lasereyes_s", "layer"=-FRONT_MUTATIONS_LAYER)
/datum/mutation/human/laser_eyes/get_visual_indicator(mob/living/carbon/human/owner)
return visual_indicators[1]
/datum/mutation/human/laser_eyes/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
if(owner.a_intent == "harm")
owner.LaserEyes(target)
/mob/living/carbon/human/proc/update_mutation_overlays()
remove_overlay(MUTATIONS_LAYER)
var/image/standing
/mob/living/carbon/proc/update_mutations_overlay()
return
/mob/living/carbon/human/update_mutations_overlay()
for(var/datum/mutation/human/CM in dna.mutations)
if(CM.species_allowed.len && !CM.species_allowed.Find(dna.species.id))
CM.force_lose(src) //shouldn't have that mutation at all
continue
if(CM.visual_indicators.len)
var/list/mut_overlay = list()
if(overlays_standing[CM.layer_used])
mut_overlay = overlays_standing[CM.layer_used]
var/image/V = CM.get_visual_indicator(src)
if(!standing)
standing = V
else
standing.overlays += V
if(standing)
overlays_standing[MUTATIONS_LAYER] = standing
apply_overlay(MUTATIONS_LAYER)
if(!mut_overlay.Find(V)) //either we lack the visual indicator or we have the wrong one
remove_overlay(CM.layer_used)
for(var/image/I in CM.visual_indicators)
mut_overlay.Remove(I)
mut_overlay |= V
overlays_standing[CM.layer_used] = mut_overlay
apply_overlay(CM.layer_used)
+8 -7
View File
@@ -1,13 +1,14 @@
/obj/effect/proc_holder/spell/bloodcrawl
name = "Blood crawl"
desc = "Use blood to travel."
charge_max = 10
name = "Blood Crawl"
desc = "Use pools of blood to phase out of existence."
charge_max = 0
clothes_req = 0
selection_type = "range"
range = 1
cooldown_min = 0
overlay = null
action_icon_state = "bloodcrawl"
action_background_icon_state = "bg_demon"
var/phased = 0
/obj/effect/proc_holder/spell/bloodcrawl/choose_targets(mob/user = usr)
@@ -16,7 +17,7 @@
perform(target)
return
revert_cast()
user << "<span class='warning'>You need blood to blood crawl.</span>"
user << "<span class='warning'>There must be a nearby source of blood!</span>"
/obj/effect/proc_holder/spell/bloodcrawl/perform(obj/effect/decal/cleanable/target, recharge = 1, mob/living/user = usr)
if(istype(user))
@@ -24,9 +25,9 @@
if(user.phasein(target))
phased = 0
else
user.phaseout(target)
phased = 1
if(user.phaseout(target))
phased = 1
start_recharge()
return
revert_cast()
user << "<span class='warning'>You cannot blood crawl.</span>"
user << "<span class='warning'>You are unable to blood crawl!</span>"
+2 -2
View File
@@ -55,7 +55,7 @@
lich.real_name = user.mind.name
user.mind.transfer_to(lich)
hardset_dna(lich,null,null,lich.real_name,null,/datum/species/skeleton)
lich.hardset_dna(null,null,lich.real_name,null,/datum/species/skeleton)
lich << "<span class='warning'>Your bones clatter and shutter as they're pulled back into this world!</span>"
charge_max += 600
var/mob/old_body = current_body
@@ -98,7 +98,7 @@
marked_item.desc = "A terrible aura surrounds this item, its very existence is offensive to life itself..."
marked_item.color = "#003300"
user << "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>"
hardset_dna(user, null, null, null, null, /datum/species/skeleton)
user.set_species(/datum/species/skeleton)
current_body = user.mind.current
if(ishuman(user))
var/mob/living/carbon/human/H = user
+1 -2
View File
@@ -41,7 +41,6 @@
clothes_req = 1
invocation = "BIRUZ BENNAR"
invocation_type = "shout"
message = "<span class='notice'>You feel strong! You feel a pressure building behind your eyes!</span>"
range = -1
include_user = 1
centcom_cancast = 0
@@ -248,7 +247,7 @@
sound="sound/magic/Blind.ogg"
/obj/effect/proc_holder/spell/targeted/genetic/blind
disabilities = 1
disabilities = BLIND
duration = 300
sound="sound/magic/Blind.ogg"