Merge branch 'master' into upstream-merge-27379

This commit is contained in:
LetterJay
2017-05-22 12:45:18 -05:00
committed by GitHub
218 changed files with 62590 additions and 61413 deletions
+53
View File
@@ -358,6 +358,59 @@
active = FALSE
..()
/datum/action/item_action/initialize_ninja_suit
name = "Toggle ninja suit"
/datum/action/item_action/ninjajaunt
name = "Phase Jaunt (10E)"
desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
button_icon_state = "ninja_phase"
/datum/action/item_action/ninjasmoke
name = "Smoke Bomb"
desc = "Blind your enemies momentarily with a well-placed smoke bomb."
button_icon_state = "smoke"
/datum/action/item_action/ninjaboost
name = "Adrenaline Boost"
desc = "Inject a secret chemical that will counteract all movement-impairing effect."
button_icon_state = "repulse"
/datum/action/item_action/ninjapulse
name = "EM Burst (25E)"
desc = "Disable any nearby technology with a electro-magnetic pulse."
button_icon_state = "emp"
/datum/action/item_action/ninjastar
name = "Create Throwing Stars (1E)"
desc = "Creates some throwing stars"
button_icon_state = "throwingstar"
icon_icon = 'icons/obj/weapons.dmi'
/datum/action/item_action/ninjanet
name = "Energy Net (20E)"
desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
button_icon_state = "energynet"
icon_icon = 'icons/effects/effects.dmi'
/datum/action/item_action/ninja_sword_recall
name = "Recall Energy Katana (Variable Cost)"
desc = "Teleports the Energy Katana linked to this suit to its wearer, cost based on distance."
button_icon_state = "energy_katana"
icon_icon = 'icons/obj/weapons.dmi'
/datum/action/item_action/ninja_stealth
name = "Toggle Stealth"
desc = "Toggles stealth mode on and off."
button_icon_state = "ninja_cloak"
/datum/action/item_action/toggle_glove
name = "Toggle interaction"
desc = "Switch between normal interaction and drain mode."
button_icon_state = "s-ninjan"
icon_icon = 'icons/obj/clothing/gloves.dmi'
/datum/action/item_action/organ_action
check_flags = AB_CHECK_CONSCIOUS
+153
View File
@@ -0,0 +1,153 @@
/datum/antagonist/ninja
name = "Ninja"
var/team
var/helping_station = 0
var/give_objectives = TRUE
/datum/antagonist/ninja/friendly
helping_station = 1
/datum/antagonist/ninja/friendly/noobjective
give_objectives = FALSE
/datum/antagonist/ninja/New(datum/mind/new_owner)
if(new_owner && !ishuman(new_owner.current))//It's fine if we aren't passed a mind, but if we are, they have to be human.
throw EXCEPTION("Only humans and/or humanoids may be ninja'ed")
..(new_owner)
/datum/antagonist/ninja/randomAllegiance/New(datum/mind/new_owner)
..(new_owner)
helping_station = rand(0,1)
/datum/antagonist/ninja/proc/equip_space_ninja(mob/living/carbon/human/H = owner.current, safety=0)//Safety in case you need to unequip stuff for existing characters.
if(safety)
qdel(H.w_uniform)
qdel(H.wear_suit)
qdel(H.wear_mask)
qdel(H.head)
qdel(H.shoes)
qdel(H.gloves)
var/obj/item/clothing/suit/space/space_ninja/theSuit = new(H)
var/obj/item/weapon/katana/energy/EK = new(H)
theSuit.energyKatana = EK
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/space_ninja(H), slot_shoes)
H.equip_to_slot_or_del(theSuit, slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/space_ninja(H), slot_gloves)
H.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/space_ninja(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/space_ninja(H), slot_wear_mask)
H.equip_to_slot_or_del(new /obj/item/clothing/glasses/night(H), slot_glasses)
H.equip_to_slot_or_del(EK, slot_belt)
H.equip_to_slot_or_del(new /obj/item/device/flashlight(H), slot_r_store)
H.equip_to_slot_or_del(new /obj/item/weapon/grenade/plastic/x4(H), slot_l_store)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/internals/emergency_oxygen(H), slot_s_store)
H.equip_to_slot_or_del(new /obj/item/weapon/tank/jetpack/carbondioxide(H), slot_back)
theSuit.randomize_param()
var/obj/item/weapon/implant/explosive/E = new/obj/item/weapon/implant/explosive(H)
E.implant(H)
return 1
/datum/antagonist/ninja/proc/addMemories()
owner.store_memory("I am an elite mercenary assassin of the mighty Spider Clan. A <font color='red'><B>SPACE NINJA</B></font>!")
owner.store_memory("Surprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!")
owner.store_memory("Officially, [helping_station?"Nanotrasen":"The Syndicate"] are my employer.")
/datum/antagonist/ninja/proc/addObjectives(quantity = 6)
var/list/possible_targets = list()
for(var/datum/mind/M in SSticker.minds)
if(M.current && M.current.stat != DEAD)
if(ishuman(M.current))
if(M.special_role)
possible_targets[M] = 0 //bad-guy
else if(M.assigned_role in GLOB.command_positions)
possible_targets[M] = 1 //good-guy
var/list/objectives = list(1,2,3,4)
while(owner.objectives.len < quantity)
switch(pick_n_take(objectives))
if(1) //research
var/datum/objective/download/O = new /datum/objective/download()
O.owner = owner
O.gen_amount_goal()
owner.objectives += O
if(2) //steal
var/datum/objective/steal/special/O = new /datum/objective/steal/special()
O.owner = owner
owner.objectives += O
if(3) //protect/kill
if(!possible_targets.len) continue
var/index = rand(1,possible_targets.len)
var/datum/mind/M = possible_targets[index]
var/is_bad_guy = possible_targets[M]
possible_targets.Cut(index,index+1)
if(is_bad_guy ^ helping_station) //kill (good-ninja + bad-guy or bad-ninja + good-guy)
var/datum/objective/assassinate/O = new /datum/objective/assassinate()
O.owner = owner
O.target = M
O.explanation_text = "Slay \the [M.current.real_name], the [M.assigned_role]."
owner.objectives += O
else //protect
var/datum/objective/protect/O = new /datum/objective/protect()
O.owner = owner
O.target = M
O.explanation_text = "Protect \the [M.current.real_name], the [M.assigned_role], from harm."
owner.objectives += O
if(4) //debrain/capture
if(!possible_targets.len) continue
var/selected = rand(1,possible_targets.len)
var/datum/mind/M = possible_targets[selected]
var/is_bad_guy = possible_targets[M]
possible_targets.Cut(selected,selected+1)
if(is_bad_guy ^ helping_station) //debrain (good-ninja + bad-guy or bad-ninja + good-guy)
var/datum/objective/debrain/O = new /datum/objective/debrain()
O.owner = owner
O.target = M
O.explanation_text = "Steal the brain of [M.current.real_name]."
owner.objectives += O
else //capture
var/datum/objective/capture/O = new /datum/objective/capture()
O.owner = owner
O.gen_amount_goal()
owner.objectives += O
else
break
var/datum/objective/O = new /datum/objective/survive()
O.owner = owner
owner.objectives += O
/proc/remove_ninja(mob/living/L)
if(!L || !L.mind)
return FALSE
var/datum/antagonist/datum = L.mind.has_antag_datum(ANTAG_DATUM_NINJA)
datum.on_removal()
return TRUE
/proc/add_ninja(mob/living/carbon/human/H, type = ANTAG_DATUM_NINJA_RANDOM)
if(!H || !H.mind)
return FALSE
return H.mind.add_antag_datum(type)
/proc/is_ninja(mob/living/M)
return M && M.mind && M.mind.has_antag_datum(ANTAG_DATUM_NINJA)
/datum/antagonist/ninja/greet()
owner.current << sound('sound/effects/ninja_greeting.ogg')
to_chat(owner.current, "I am an elite mercenary assassin of the mighty Spider Clan. A <font color='red'><B>SPACE NINJA</B></font>!")
to_chat(owner.current, "Surprise is my weapon. Shadows are my armor. Without them, I am nothing. (//initialize your suit by right clicking on it, to use abilities like stealth)!")
to_chat(owner.current, "Officially, [helping_station?"Nanotrasen":"The Syndicate"] are my employer.")
return
/datum/antagonist/ninja/on_gain()
if(give_objectives)
addObjectives()
addMemories()
-12
View File
@@ -737,18 +737,6 @@
src.give_disease(M)
href_list["datumrefresh"] = href_list["give_spell"]
else if(href_list["ninja"])
if(!check_rights(R_FUN))
return
var/mob/M = locate(href_list["ninja"])
if(!istype(M))
to_chat(usr, "This can only be used on instances of type /mob")
return
src.cmd_admin_ninjafy(M)
href_list["datumrefresh"] = href_list["ninja"]
else if(href_list["gib"])
if(!check_rights(R_FUN))
return
@@ -36,7 +36,7 @@ Bonus
/datum/symptom/heal/proc/Heal(mob/living/M, datum/disease/advance/A)
var/heal_amt = 0.5
if(M.toxloss > 0 && prob(20))
new /obj/effect/overlay/temp/heal(get_turf(M), "#66FF99")
new /obj/effect/temp_visual/heal(get_turf(M), "#66FF99")
M.adjustToxLoss(-heal_amt)
return 1
@@ -67,7 +67,7 @@ Bonus
/datum/symptom/heal/plus/Heal(mob/living/M, datum/disease/advance/A)
var/heal_amt = 1
if(M.toxloss > 0 && prob(20))
new /obj/effect/overlay/temp/heal(get_turf(M), "#00FF00")
new /obj/effect/temp_visual/heal(get_turf(M), "#00FF00")
M.adjustToxLoss(-heal_amt)
return 1
@@ -110,7 +110,7 @@ Bonus
M.update_damage_overlays()
if(prob(20))
new /obj/effect/overlay/temp/heal(get_turf(M), "#FF3333")
new /obj/effect/temp_visual/heal(get_turf(M), "#FF3333")
return 1
@@ -148,7 +148,7 @@ Bonus
if(M.getCloneLoss() > 0)
M.adjustCloneLoss(-1)
M.take_bodypart_damage(0, 1) //Deals BURN damage, which is not cured by this symptom
new /obj/effect/overlay/temp/heal(get_turf(M), "#33FFCC")
new /obj/effect/temp_visual/heal(get_turf(M), "#33FFCC")
if(!parts.len)
return
@@ -158,7 +158,7 @@ Bonus
M.update_damage_overlays()
if(prob(20))
new /obj/effect/overlay/temp/heal(get_turf(M), "#CC1100")
new /obj/effect/temp_visual/heal(get_turf(M), "#CC1100")
return 1
@@ -201,7 +201,7 @@ Bonus
M.update_damage_overlays()
if(prob(20))
new /obj/effect/overlay/temp/heal(get_turf(M), "#FF9933")
new /obj/effect/temp_visual/heal(get_turf(M), "#FF9933")
return 1
@@ -248,7 +248,7 @@ Bonus
M.update_damage_overlays()
if(prob(20))
new /obj/effect/overlay/temp/heal(get_turf(M), "#CC6600")
new /obj/effect/temp_visual/heal(get_turf(M), "#CC6600")
return 1
+44 -4
View File
@@ -326,7 +326,8 @@
"traitor", // "traitorchan",
"monkey",
"clockcult",
"devil"
"devil",
"ninja"
)
var/text = ""
@@ -614,9 +615,27 @@
text += "|Disabled in Prefs"
sections["devil"] = text
/** NINJA ***/
text = "ninja"
if(SSticker.mode.config_tag == "ninja")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
var/datum/antagonist/ninja/ninjainfo = has_antag_datum(ANTAG_DATUM_NINJA)
if(ninjainfo)
if(ninjainfo.helping_station)
text += "<a href='?src=\ref[src];ninja=clear'>employee</a> | syndicate | <b>NANOTRASEN</b> | <b><a href='?src=\ref[src];ninja=equip'>EQUIP</a></b>"
else
text += "<a href='?src=\ref[src];ninja=clear'>employee</a> | <b>SYNDICATE</b> | nanotrasen | <b><a href='?src=\ref[src];ninja=equip'>EQUIP</a></b>"
else
text += "<b>EMPLOYEE</b> | <a href='?src=\ref[src];ninja=syndicate'>syndicate</a> | <a href='?src=\ref[src];ninja=nanotrasen'>nanotrasen</a> | <a href='?src=\ref[src];ninja=random'>random allegiance</a>"
if(current && current.client && (ROLE_NINJA in current.client.prefs.be_special))
text += " | Enabled in Prefs"
else
text += " | Disabled in Prefs"
sections["ninja"] = text
/** SILICON ***/
/** SILICON ***/
if(issilicon(current))
text = "silicon"
var/mob/living/silicon/robot/robot = current
@@ -1202,7 +1221,28 @@
else
to_chat(usr, "<span class='warning'>This only works on humans!</span>")
return
else if(href_list["ninja"])
var/datum/antagonist/ninja/ninjainfo = has_antag_datum(ANTAG_DATUM_NINJA)
switch(href_list["ninja"])
if("clear")
remove_ninja(current)
message_admins("[key_name_admin(usr)] has de-ninja'ed [current].")
log_admin("[key_name(usr)] has de-ninja'ed [current].")
if("equip")
ninjainfo.equip_space_ninja()
return
if("nanotrasen")
add_ninja(current, ANTAG_DATUM_NINJA_FRIENDLY)
message_admins("[key_name_admin(usr)] has friendly ninja'ed [current].")
log_admin("[key_name(usr)] has friendly ninja'ed [current].")
if("syndicate")
add_ninja(current, ANTAG_DATUM_NINJA)
message_admins("[key_name_admin(usr)] has syndie ninja'ed [current].")
log_admin("[key_name(usr)] has syndie ninja'ed [current].")
if("random")
add_ninja(current)
message_admins("[key_name_admin(usr)] has random ninja'ed [current].")
log_admin("[key_name(usr)] has random ninja'ed [current].")
else if(href_list["abductor"])
switch(href_list["abductor"])
if("clear")
@@ -1615,4 +1655,4 @@
/mob/living/silicon/pai/mind_initialize()
..()
mind.assigned_role = "pAI"
mind.special_role = ""
mind.special_role = ""