Merge pull request #1783 from Citadel-Station-13/upstream-merge-28644
[MIRROR] Ninja Dash
This commit is contained in:
@@ -29,7 +29,7 @@
|
|||||||
qdel(H.gloves)
|
qdel(H.gloves)
|
||||||
|
|
||||||
var/obj/item/clothing/suit/space/space_ninja/theSuit = new(H)
|
var/obj/item/clothing/suit/space/space_ninja/theSuit = new(H)
|
||||||
var/obj/item/weapon/katana/energy/EK = new(H)
|
var/obj/item/weapon/dash/energy_katana/EK = new(H)
|
||||||
theSuit.energyKatana = EK
|
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/device/radio/headset(H), slot_ears)
|
||||||
|
|||||||
@@ -309,7 +309,7 @@
|
|||||||
/obj/item/weapon/melee/supermatter_sword,
|
/obj/item/weapon/melee/supermatter_sword,
|
||||||
/obj/item/weapon/shield/changeling,
|
/obj/item/weapon/shield/changeling,
|
||||||
/obj/item/weapon/lava_staff,
|
/obj/item/weapon/lava_staff,
|
||||||
/obj/item/weapon/katana/energy,
|
/obj/item/weapon/dash/energy_katana,
|
||||||
/obj/item/weapon/hierophant_club,
|
/obj/item/weapon/hierophant_club,
|
||||||
/obj/item/weapon/his_grace,
|
/obj/item/weapon/his_grace,
|
||||||
/obj/item/weapon/gun/ballistic/minigun,
|
/obj/item/weapon/gun/ballistic/minigun,
|
||||||
|
|||||||
@@ -1,30 +1,93 @@
|
|||||||
/obj/item/weapon/katana/energy
|
/obj/item/weapon/dash
|
||||||
|
name = "abstract dash weapon"
|
||||||
|
var/max_charges = 3
|
||||||
|
var/current_charges = 3
|
||||||
|
var/charge_rate = 30 //In deciseconds
|
||||||
|
var/dash_toggled = TRUE
|
||||||
|
|
||||||
|
var/bypass_density = FALSE //Can we beam past windows/airlocks/etc
|
||||||
|
|
||||||
|
var/start_effect_type = /obj/effect/temp_visual/dir_setting/ninja/phase/out
|
||||||
|
var/end_effect_type = /obj/effect/temp_visual/dir_setting/ninja/phase
|
||||||
|
var/beam_icon_state = "blur"
|
||||||
|
var/dash_beam_type = /obj/effect/ebeam
|
||||||
|
|
||||||
|
/obj/item/weapon/dash/proc/charge()
|
||||||
|
current_charges = Clamp(current_charges + 1, 0, max_charges)
|
||||||
|
if(istype(loc, /mob/living))
|
||||||
|
to_chat(loc, "<span class='notice'>[src] now has [current_charges]/[max_charges] charges.</span>")
|
||||||
|
|
||||||
|
/obj/item/weapon/dash/attack_self(mob/user)
|
||||||
|
dash_toggled = !dash_toggled
|
||||||
|
to_chat(user, "<span class='notice'>You [dash_toggled ? "enable" : "disable"] the dash function on [src].</span>")
|
||||||
|
|
||||||
|
/obj/item/weapon/dash/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||||
|
if(dash_toggled)
|
||||||
|
dash(user, target)
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/dash/proc/dash(mob/user, atom/target)
|
||||||
|
if(!current_charges)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(Adjacent(target))
|
||||||
|
return
|
||||||
|
|
||||||
|
if(target.density)
|
||||||
|
return
|
||||||
|
|
||||||
|
var/turf/T = get_turf(target)
|
||||||
|
|
||||||
|
if(!bypass_density)
|
||||||
|
for(var/turf/turf in getline(get_turf(user),T))
|
||||||
|
for(var/atom/A in turf)
|
||||||
|
if(A.density)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(target in view(user.client.view, get_turf(user)))
|
||||||
|
var/obj/spot1 = new start_effect_type(T, user.dir)
|
||||||
|
user.forceMove(T)
|
||||||
|
playsound(T, 'sound/magic/blink.ogg', 25, 1)
|
||||||
|
playsound(T, "sparks", 50, 1)
|
||||||
|
var/obj/spot2 = new end_effect_type(get_turf(user), user.dir)
|
||||||
|
spot1.Beam(spot2, beam_icon_state,time = 2, maxdistance = 20, beam_type = dash_beam_type)
|
||||||
|
current_charges--
|
||||||
|
addtimer(CALLBACK(src, .proc/charge), charge_rate)
|
||||||
|
|
||||||
|
/obj/item/weapon/dash/energy_katana
|
||||||
name = "energy katana"
|
name = "energy katana"
|
||||||
desc = "A katana infused with strong energy."
|
desc = "A katana infused with strong energy."
|
||||||
icon_state = "energy_katana"
|
icon_state = "energy_katana"
|
||||||
item_state = "energy_katana"
|
item_state = "energy_katana"
|
||||||
force = 40
|
force = 40
|
||||||
throwforce = 20
|
throwforce = 20
|
||||||
|
block_chance = 50
|
||||||
armour_penetration = 50
|
armour_penetration = 50
|
||||||
|
w_class = WEIGHT_CLASS_NORMAL
|
||||||
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||||
|
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||||
|
block_chance = 50
|
||||||
|
sharpness = IS_SHARP
|
||||||
|
obj_integrity = 200
|
||||||
|
max_integrity = 200
|
||||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||||
|
bypass_density = TRUE
|
||||||
var/datum/effect_system/spark_spread/spark_system
|
var/datum/effect_system/spark_spread/spark_system
|
||||||
|
|
||||||
/obj/item/weapon/katana/energy/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
/obj/item/weapon/dash/energy_katana/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||||
if(!user || !target)
|
if(dash_toggled)
|
||||||
return
|
return ..()
|
||||||
|
if(proximity_flag && (isobj(target) || issilicon(target)))
|
||||||
if(proximity_flag)
|
spark_system.start()
|
||||||
if(isobj(target) || issilicon(target))
|
playsound(user, "sparks", 50, 1)
|
||||||
spark_system.start()
|
playsound(user, 'sound/weapons/blade1.ogg', 50, 1)
|
||||||
playsound(user, "sparks", 50, 1)
|
target.emag_act(user)
|
||||||
playsound(user, 'sound/weapons/blade1.ogg', 50, 1)
|
|
||||||
target.emag_act(user)
|
|
||||||
|
|
||||||
|
|
||||||
//If we hit the Ninja who owns this Katana, they catch it.
|
//If we hit the Ninja who owns this Katana, they catch it.
|
||||||
//Works for if the Ninja throws it or it throws itself or someone tries
|
//Works for if the Ninja throws it or it throws itself or someone tries
|
||||||
//To throw it at the ninja
|
//To throw it at the ninja
|
||||||
/obj/item/weapon/katana/energy/throw_impact(atom/hit_atom)
|
/obj/item/weapon/dash/energy_katana/throw_impact(atom/hit_atom)
|
||||||
if(ishuman(hit_atom))
|
if(ishuman(hit_atom))
|
||||||
var/mob/living/carbon/human/H = hit_atom
|
var/mob/living/carbon/human/H = hit_atom
|
||||||
if(istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
if(istype(H.wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||||
@@ -35,7 +98,7 @@
|
|||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/katana/energy/proc/returnToOwner(mob/living/carbon/human/user, doSpark = 1, caught = 0)
|
/obj/item/weapon/dash/energy_katana/proc/returnToOwner(mob/living/carbon/human/user, doSpark = 1, caught = 0)
|
||||||
if(!istype(user))
|
if(!istype(user))
|
||||||
return
|
return
|
||||||
forceMove(get_turf(user))
|
forceMove(get_turf(user))
|
||||||
@@ -62,13 +125,12 @@
|
|||||||
if(msg)
|
if(msg)
|
||||||
to_chat(user, "<span class='notice'>[msg]</span>")
|
to_chat(user, "<span class='notice'>[msg]</span>")
|
||||||
|
|
||||||
/obj/item/weapon/katana/energy/New()
|
/obj/item/weapon/dash/energy_katana/Initialize()
|
||||||
..()
|
. = ..()
|
||||||
spark_system = new /datum/effect_system/spark_spread()
|
spark_system = new /datum/effect_system/spark_spread()
|
||||||
spark_system.set_up(5, 0, src)
|
spark_system.set_up(5, 0, src)
|
||||||
spark_system.attach(src)
|
spark_system.attach(src)
|
||||||
|
|
||||||
/obj/item/weapon/katana/energy/Destroy()
|
/obj/item/weapon/dash/energy_katana/Destroy()
|
||||||
qdel(spark_system)
|
QDEL_NULL(spark_system)
|
||||||
spark_system = null
|
return ..()
|
||||||
return ..()
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Contents:
|
|||||||
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30, fire = 100, acid = 100)
|
armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30, fire = 100, acid = 100)
|
||||||
strip_delay = 12
|
strip_delay = 12
|
||||||
|
|
||||||
actions_types = list(/datum/action/item_action/initialize_ninja_suit, /datum/action/item_action/ninjajaunt, /datum/action/item_action/ninjasmoke, /datum/action/item_action/ninjaboost, /datum/action/item_action/ninjapulse, /datum/action/item_action/ninjastar, /datum/action/item_action/ninjanet, /datum/action/item_action/ninja_sword_recall, /datum/action/item_action/ninja_stealth, /datum/action/item_action/toggle_glove)
|
actions_types = list(/datum/action/item_action/initialize_ninja_suit, /datum/action/item_action/ninjasmoke, /datum/action/item_action/ninjaboost, /datum/action/item_action/ninjapulse, /datum/action/item_action/ninjastar, /datum/action/item_action/ninjanet, /datum/action/item_action/ninja_sword_recall, /datum/action/item_action/ninja_stealth, /datum/action/item_action/toggle_glove)
|
||||||
|
|
||||||
//Important parts of the suit.
|
//Important parts of the suit.
|
||||||
var/mob/living/carbon/human/affecting = null
|
var/mob/living/carbon/human/affecting = null
|
||||||
@@ -31,7 +31,7 @@ Contents:
|
|||||||
var/list/reagent_list = list("omnizine","salbutamol","spaceacillin","charcoal","nutriment","radium","potass_iodide")//The reagents ids which are added to the suit at New().
|
var/list/reagent_list = list("omnizine","salbutamol","spaceacillin","charcoal","nutriment","radium","potass_iodide")//The reagents ids which are added to the suit at New().
|
||||||
var/list/stored_research = list()//For stealing station research.
|
var/list/stored_research = list()//For stealing station research.
|
||||||
var/obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk.
|
var/obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk.
|
||||||
var/obj/item/weapon/katana/energy/energyKatana //For teleporting the katana back to the ninja (It's an ability)
|
var/obj/item/weapon/dash/energy_katana/energyKatana //For teleporting the katana back to the ninja (It's an ability)
|
||||||
|
|
||||||
//Other articles of ninja gear worn together, used to easily reference them after initializing.
|
//Other articles of ninja gear worn together, used to easily reference them after initializing.
|
||||||
var/obj/item/clothing/head/helmet/space/space_ninja/n_hood
|
var/obj/item/clothing/head/helmet/space/space_ninja/n_hood
|
||||||
@@ -181,9 +181,6 @@ Contents:
|
|||||||
if(!s_initialized)
|
if(!s_initialized)
|
||||||
to_chat(user, "<span class='warning'><b>ERROR</b>: suit offline. Please activate suit.</span>")
|
to_chat(user, "<span class='warning'><b>ERROR</b>: suit offline. Please activate suit.</span>")
|
||||||
return FALSE
|
return FALSE
|
||||||
if(istype(action, /datum/action/item_action/ninjajaunt))
|
|
||||||
ninjajaunt()
|
|
||||||
return TRUE
|
|
||||||
if(istype(action, /datum/action/item_action/ninjasmoke))
|
if(istype(action, /datum/action/item_action/ninjasmoke))
|
||||||
ninjasmoke()
|
ninjasmoke()
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -71,7 +71,6 @@
|
|||||||
|
|
||||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_three(delay, mob/living/carbon/human/U)
|
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_three(delay, mob/living/carbon/human/U)
|
||||||
to_chat(U, "<span class='notice'>Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>.</span>")
|
to_chat(U, "<span class='notice'>Logging off, [U:real_name]. Shutting down <B>SpiderOS</B>.</span>")
|
||||||
remove_ninja_verbs()
|
|
||||||
addtimer(CALLBACK(src, .proc/deinitialize_four, delay, U), delay)
|
addtimer(CALLBACK(src, .proc/deinitialize_four, delay, U), delay)
|
||||||
|
|
||||||
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_four(delay, mob/living/carbon/human/U)
|
/obj/item/clothing/suit/space/space_ninja/proc/deinitialize_four(delay, mob/living/carbon/human/U)
|
||||||
|
|||||||
@@ -22,11 +22,5 @@ Contents:
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs()
|
/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs()
|
||||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
|
||||||
|
|
||||||
s_initialized=1
|
s_initialized=1
|
||||||
slowdown=0
|
slowdown=0
|
||||||
|
|
||||||
|
|
||||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs()
|
|
||||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 60 KiB |
@@ -1875,7 +1875,6 @@
|
|||||||
#include "code\modules\ninja\suit\n_suit_verbs\ninja_stars.dm"
|
#include "code\modules\ninja\suit\n_suit_verbs\ninja_stars.dm"
|
||||||
#include "code\modules\ninja\suit\n_suit_verbs\ninja_stealth.dm"
|
#include "code\modules\ninja\suit\n_suit_verbs\ninja_stealth.dm"
|
||||||
#include "code\modules\ninja\suit\n_suit_verbs\ninja_sword_recall.dm"
|
#include "code\modules\ninja\suit\n_suit_verbs\ninja_sword_recall.dm"
|
||||||
#include "code\modules\ninja\suit\n_suit_verbs\ninja_teleporting.dm"
|
|
||||||
#include "code\modules\orbit\orbit.dm"
|
#include "code\modules\orbit\orbit.dm"
|
||||||
#include "code\modules\paperwork\clipboard.dm"
|
#include "code\modules\paperwork\clipboard.dm"
|
||||||
#include "code\modules\paperwork\contract.dm"
|
#include "code\modules\paperwork\contract.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user