Porting the twohanded component.

This commit is contained in:
Ghommie
2020-05-17 18:16:53 +02:00
parent 0a298c2361
commit 30ab79e09e
138 changed files with 2861 additions and 2601 deletions

View File

@@ -128,14 +128,13 @@
spawn(0)
new /datum/hallucination/delusion(victim, TRUE, "demon",duration,0)
var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
var/obj/item/chainsaw/doomslayer/chainsaw = new(victim.loc)
victim.log_message("entered a blood frenzy", LOG_ATTACK)
ADD_TRAIT(chainsaw, TRAIT_NODROP, CHAINSAW_FRENZY_TRAIT)
victim.drop_all_held_items()
victim.put_in_hands(chainsaw, forced = TRUE)
chainsaw.attack_self(victim)
chainsaw.wield(victim)
victim.reagents.add_reagent(/datum/reagent/medicine/adminordrazine,25)
to_chat(victim, "<span class='warning'>KILL, KILL, KILL! YOU HAVE NO ALLIES ANYMORE, KILL THEM ALL!</span>")

View File

@@ -1,4 +1,4 @@
/obj/item/twohanded/rcl
/obj/item/rcl
name = "rapid cable layer"
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables. Do not use without insulation!"
icon = 'icons/obj/tools.dmi'
@@ -23,15 +23,25 @@
var/datum/radial_menu/persistent/wiring_gui_menu
var/mob/listeningTo
/obj/item/twohanded/rcl/Initialize()
/obj/item/rcl/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
update_icon()
/obj/item/twohanded/rcl/ComponentInitialize()
/// triggered on wield of two handed item
/obj/item/rcl/proc/on_wield(obj/item/source, mob/user)
active = TRUE
/// triggered on unwield of two handed item
/obj/item/rcl/proc/on_unwield(obj/item/source, mob/user)
active = FALSE
/obj/item/rcl/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
/obj/item/rcl/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
@@ -86,26 +96,26 @@
else
..()
/obj/item/twohanded/rcl/examine(mob/user)
/obj/item/rcl/examine(mob/user)
. = ..()
if(loaded)
. += "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>"
/obj/item/twohanded/rcl/Destroy()
/obj/item/rcl/Destroy()
QDEL_NULL(loaded)
last = null
listeningTo = null
QDEL_NULL(wiring_gui_menu)
return ..()
/obj/item/twohanded/rcl/update_icon_state()
/obj/item/rcl/update_icon_state()
icon_state = initial(icon_state)
item_state = initial(item_state)
if(!loaded || !loaded.amount)
icon_state += "-empty"
item_state += "-0"
/obj/item/twohanded/rcl/update_overlays()
/obj/item/rcl/update_overlays()
. = ..()
if(!loaded || !loaded.amount)
return
@@ -113,7 +123,7 @@
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
. += cable_overlay
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
/obj/item/rcl/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
. = ..()
if(!isinhands || !(loaded?.amount))
return
@@ -121,7 +131,7 @@
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
. += cable_overlay
/obj/item/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
/obj/item/rcl/proc/is_empty(mob/user, loud = 1)
update_icon()
if(!loaded || !loaded.amount)
if(loud)
@@ -130,26 +140,23 @@
QDEL_NULL(loaded)
loaded = null
QDEL_NULL(wiring_gui_menu)
unwield(user)
active = wielded
return TRUE
return FALSE
/obj/item/twohanded/rcl/pickup(mob/user)
/obj/item/rcl/pickup(mob/user)
..()
getMobhook(user)
/obj/item/twohanded/rcl/dropped(mob/wearer)
/obj/item/rcl/dropped(mob/wearer)
..()
UnregisterSignal(wearer, COMSIG_MOVABLE_MOVED)
listeningTo = null
last = null
/obj/item/twohanded/rcl/attack_self(mob/user)
/obj/item/rcl/attack_self(mob/user)
..()
active = wielded
if(!active)
last = null
else if(!last)
@@ -158,7 +165,7 @@
last = C
break
obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
obj/item/rcl/proc/getMobhook(mob/to_hook)
if(listeningTo == to_hook)
return
if(listeningTo)
@@ -166,7 +173,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
RegisterSignal(to_hook, COMSIG_MOVABLE_MOVED, .proc/trigger)
listeningTo = to_hook
/obj/item/twohanded/rcl/proc/trigger(mob/user)
/obj/item/rcl/proc/trigger(mob/user)
if(active)
layCable(user)
if(wiring_gui_menu) //update the wire options as you move
@@ -174,7 +181,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
//previous contents of trigger(), lays cable each time the player moves
/obj/item/twohanded/rcl/proc/layCable(mob/user)
/obj/item/rcl/proc/layCable(mob/user)
if(!isturf(user.loc))
return
if(is_empty(user, 0))
@@ -207,7 +214,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
update_icon()
//searches the current tile for a stub cable of the same colour
/obj/item/twohanded/rcl/proc/findLinkingCable(mob/user)
/obj/item/rcl/proc/findLinkingCable(mob/user)
var/turf/T
if(!isturf(user.loc))
return
@@ -223,10 +230,8 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
continue
if(C.d1 == 0)
return C
return
/obj/item/twohanded/rcl/proc/wiringGuiGenerateChoices(mob/user)
/obj/item/rcl/proc/wiringGuiGenerateChoices(mob/user)
var/fromdir = 0
var/obj/structure/cable/linkingCable = findLinkingCable(user)
if(linkingCable)
@@ -243,12 +248,12 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
wiredirs[icondir] = img
return wiredirs
/obj/item/twohanded/rcl/proc/showWiringGui(mob/user)
/obj/item/rcl/proc/showWiringGui(mob/user)
var/list/choices = wiringGuiGenerateChoices(user)
wiring_gui_menu = show_radial_menu_persistent(user, src , choices, select_proc = CALLBACK(src, .proc/wiringGuiReact, user), radius = 42)
/obj/item/twohanded/rcl/proc/wiringGuiUpdate(mob/user)
/obj/item/rcl/proc/wiringGuiUpdate(mob/user)
if(!wiring_gui_menu)
return
@@ -259,7 +264,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
//Callback used to respond to interactions with the wiring menu
/obj/item/twohanded/rcl/proc/wiringGuiReact(mob/living/user,choice)
/obj/item/rcl/proc/wiringGuiReact(mob/living/user,choice)
if(!choice) //close on a null choice (the center button)
QDEL_NULL(wiring_gui_menu)
return
@@ -290,7 +295,7 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
wiringGuiUpdate(user)
/obj/item/twohanded/rcl/ui_action_click(mob/user, action)
/obj/item/rcl/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/rcl_col))
current_color_index++;
if (current_color_index > colors.len)
@@ -308,13 +313,13 @@ obj/item/twohanded/rcl/proc/getMobhook(mob/to_hook)
else //open the menu
showWiringGui(user)
/obj/item/twohanded/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
/obj/item/rcl/pre_loaded/Initialize() //Comes preloaded with cable, for testing stuff
loaded = new()
loaded.max_amount = max_amount
loaded.amount = max_amount
return ..()
/obj/item/twohanded/rcl/ghetto
/obj/item/rcl/ghetto
actions_types = list()
max_amount = 30
name = "makeshift rapid cable layer"

View File

@@ -0,0 +1,65 @@
/obj/item/binoculars
name = "binoculars"
desc = "Used for long-distance surveillance."
item_state = "binoculars"
icon_state = "binoculars"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
slot_flags = ITEM_SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
var/mob/listeningTo
var/zoom_out_amt = 6
var/zoom_amt = 10
/obj/item/binoculars/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/binoculars/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12)
/obj/item/binoculars/Destroy()
listeningTo = null
return ..()
/obj/item/binoculars/proc/on_wield(obj/item/source, mob/user)
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/unwield)
listeningTo = user
user.visible_message("<span class='notice'>[user] holds [src] up to [user.p_their()] eyes.</span>", "<span class='notice'>You hold [src] up to your eyes.</span>")
item_state = "binoculars_wielded"
user.regenerate_icons()
if(!user?.client)
return
var/client/C = user.client
var/_x = 0
var/_y = 0
switch(user.dir)
if(NORTH)
_y = zoom_amt
if(EAST)
_x = zoom_amt
if(SOUTH)
_y = -zoom_amt
if(WEST)
_x = -zoom_amt
C.change_view(world.view + zoom_out_amt)
C.pixel_x = world.icon_size*_x
C.pixel_y = world.icon_size*_y
/obj/item/binoculars/proc/on_unwield(obj/item/source, mob/user)
unwield(user)
/obj/item/binoculars/proc/unwield(mob/user)
if(listeningTo)
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
listeningTo = null
user.visible_message("<span class='notice'>[user] lowers [src].</span>", "<span class='notice'>You lower [src].</span>")
item_state = "binoculars"
user.regenerate_icons()
if(user && user.client)
user.regenerate_icons()
var/client/C = user.client
C.change_view(CONFIG_GET(string/default_view))
user.client.pixel_x = 0
user.client.pixel_y = 0

View File

@@ -0,0 +1,69 @@
/obj/item/broom
name = "broom"
desc = "This is my BROOMSTICK! It can be used manually or braced with two hands to sweep items as you move. It has a telescopic handle for compact storage."
icon = 'icons/obj/janitor.dmi'
icon_state = "broom0"
lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi'
force = 8
throwforce = 10
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("swept", "brushed off", "bludgeoned", "whacked")
resistance_flags = FLAMMABLE
/obj/item/broom/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/broom/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12, icon_wielded="broom1")
/obj/item/broom/update_icon_state()
icon_state = "broom0"
/// triggered on wield of two handed item
/obj/item/broom/proc/on_wield(obj/item/source, mob/user)
to_chat(user, "<span class='notice'>You brace the [src] against the ground in a firm sweeping stance.</span>")
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/sweep)
/// triggered on unwield of two handed item
/obj/item/broom/proc/on_unwield(obj/item/source, mob/user)
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
/obj/item/broom/afterattack(atom/A, mob/user, proximity)
. = ..()
if(!proximity)
return
sweep(user, A, FALSE)
/obj/item/broom/proc/sweep(mob/user, atom/A, moving = TRUE)
var/turf/target
if (!moving)
if (isturf(A))
target = A
else
target = A.loc
else
target = user.loc
if (!isturf(target))
return
if (locate(/obj/structure/table) in target.contents)
return
var/i = 0
for(var/obj/item/garbage in target.contents)
if(!garbage.anchored)
garbage.Move(get_step(target, user.dir), user.dir)
i++
if(i >= 20)
break
if(i >= 1)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 30, TRUE, -1)
/obj/item/broom/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) //bless you whoever fixes this copypasta
J.put_in_cart(src, user)
J.mybroom=src
J.update_icon()

View File

@@ -0,0 +1,93 @@
// CHAINSAW
/obj/item/chainsaw
name = "chainsaw"
desc = "A versatile power tool. Useful for limbing trees and delimbing humans."
icon_state = "chainsaw_off"
lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
flags_1 = CONDUCT_1
force = 13
var/force_on = 24
w_class = WEIGHT_CLASS_HUGE
throwforce = 13
throw_speed = 2
throw_range = 4
custom_materials = list(/datum/material/iron=13000)
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = "swing_hit"
sharpness = IS_SHARP
actions_types = list(/datum/action/item_action/startchainsaw)
tool_behaviour = TOOL_SAW
toolspeed = 0.5
var/on = FALSE
var/wielded = FALSE // track wielded status on item
/obj/item/chainsaw/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/chainsaw/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 30, 100, 0, 'sound/weapons/chainsawhit.ogg', TRUE)
AddComponent(/datum/component/two_handed, require_twohands=TRUE)
AddElement(/datum/element/update_icon_updates_onmob)
/// triggered on wield of two handed item
/obj/item/chainsaw/proc/on_wield(obj/item/source, mob/user)
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/chainsaw/proc/on_unwield(obj/item/source, mob/user)
wielded = FALSE
/obj/item/chainsaw/suicide_act(mob/living/carbon/user)
if(on)
user.visible_message("<span class='suicide'>[user] begins to tear [user.p_their()] head off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/weapons/chainsawhit.ogg', 100, 1)
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
if(myhead)
myhead.dismember()
else
user.visible_message("<span class='suicide'>[user] smashes [src] into [user.p_their()] neck, destroying [user.p_their()] esophagus! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(src, 'sound/weapons/genhit1.ogg', 100, 1)
return(BRUTELOSS)
/obj/item/chainsaw/attack_self(mob/user)
on = !on
to_chat(user, "As you pull the starting cord dangling from [src], [on ? "it begins to whirr." : "the chain stops moving."]")
force = on ? force_on : initial(force)
throwforce = on ? force_on : force
update_icon()
var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering)
butchering.butchering_enabled = on
if(on)
hitsound = 'sound/weapons/chainsawhit.ogg'
else
hitsound = "swing_hit"
/obj/item/chainsaw/update_icon_state()
icon_state = "chainsaw_[on ? "on" : "off"]"
/obj/item/chainsaw/get_dismemberment_chance()
if(wielded)
. = ..()
/obj/item/chainsaw/doomslayer
name = "THE GREAT COMMUNICATOR"
desc = "<span class='warning'>VRRRRRRR!!!</span>"
armour_penetration = 100
force_on = 30
/obj/item/chainsaw/doomslayer/check_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
block_return[BLOCK_RETURN_REFLECT_PROJECTILE_CHANCE] = 100
return ..()
/obj/item/chainsaw/doomslayer/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(attack_type & ATTACK_TYPE_PROJECTILE)
owner.visible_message("<span class='danger'>Ranged attacks just make [owner] angrier!</span>")
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
return ..()

View File

@@ -19,7 +19,7 @@
var/on = FALSE //if the paddles are equipped (1) or on the defib (0)
var/safety = TRUE //if you can zap people with the defibs on harm mode
var/powered = FALSE //if there's a cell in the defib with enough power for a revive, blocks paddles from reviving otherwise
var/obj/item/twohanded/shockpaddles/paddles
var/obj/item/shockpaddles/paddles
var/obj/item/stock_parts/cell/cell
var/combat = FALSE //can we revive through space suits?
var/grab_ghost = FALSE // Do we pull the ghost back into their body?
@@ -106,7 +106,6 @@
/obj/item/defibrillator/attackby(obj/item/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
else if(istype(W, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/C = W
@@ -170,7 +169,6 @@
return
else
//Remove from their hands and back onto the defib unit
paddles.unwield()
remove_paddles(user)
update_power()
@@ -179,7 +177,7 @@
A.UpdateButtonIcon()
/obj/item/defibrillator/proc/make_paddles()
return new /obj/item/twohanded/shockpaddles(src)
return new /obj/item/shockpaddles(src)
/obj/item/defibrillator/equipped(mob/user, slot)
..()
@@ -256,13 +254,12 @@
/obj/item/defibrillator/compact/combat/loaded/attackby(obj/item/W, mob/user, params)
if(W == paddles)
paddles.unwield()
toggle_paddles()
return
//paddles
/obj/item/twohanded/shockpaddles
/obj/item/shockpaddles
name = "defibrillator paddles"
desc = "A pair of plastic-gripped paddles with flat metal surfaces that are used to deliver powerful electric shocks."
icon = 'icons/obj/items_and_weapons.dmi'
@@ -284,24 +281,48 @@
var/grab_ghost = FALSE
var/tlimit = DEFIB_TIME_LIMIT * 10
var/disarm_shock_time = 10
var/wielded = FALSE // track wielded status on item
var/mob/listeningTo
/obj/item/shockpaddles/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
if(!req_defib)
return //If it doesn't need a defib, just say it exists
if (!loc || !istype(loc, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
return INITIALIZE_HINT_QDEL
defib = loc
busy = FALSE
update_icon()
/obj/item/twohanded/shockpaddles/ComponentInitialize()
/obj/item/shockpaddles/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12)
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
/// triggered on wield of two handed item
/obj/item/shockpaddles/proc/on_wield(obj/item/source, mob/user)
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/shockpaddles/proc/on_unwield(obj/item/source, mob/user)
wielded = FALSE
/obj/item/shockpaddles/Destroy()
defib = null
return ..()
/obj/item/shockpaddles/equipped(mob/user, slot)
. = ..()
if(!req_defib)
return
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/check_range)
/obj/item/twohanded/shockpaddles/Moved()
/obj/item/shockpaddles/Moved()
. = ..()
check_range()
/obj/item/twohanded/shockpaddles/proc/check_range()
/obj/item/shockpaddles/proc/check_range()
if(!req_defib || !defib)
return
if(!in_range(src,defib))
@@ -312,7 +333,7 @@
visible_message("<span class='notice'>[src] snap back into [defib].</span>")
snap_back()
/obj/item/twohanded/shockpaddles/proc/recharge(var/time)
/obj/item/shockpaddles/proc/recharge(var/time)
if(req_defib || !time)
return
cooldown = TRUE
@@ -324,57 +345,36 @@
cooldown = FALSE
update_icon()
/obj/item/twohanded/shockpaddles/New(mainunit)
..()
if(check_defib_exists(mainunit, src) && req_defib)
defib = mainunit
forceMove(defib)
busy = FALSE
update_icon()
/obj/item/twohanded/shockpaddles/update_icon_state()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown"
/obj/item/twohanded/shockpaddles/suicide_act(mob/user)
/obj/item/shockpaddles/suicide_act(mob/user)
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(req_defib)
defib.deductcharge(revivecost)
playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
return (OXYLOSS)
/obj/item/twohanded/shockpaddles/dropped(mob/user)
/obj/item/shockpaddles/update_icon_state()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown"
/obj/item/shockpaddles/dropped(mob/user)
if(!req_defib)
return ..()
if(user)
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
var/obj/item/twohanded/offhand/O = user.get_inactive_held_item()
if(istype(O))
O.unwield()
if(user != loc)
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
snap_back()
return unwield(user)
/obj/item/twohanded/shockpaddles/proc/snap_back()
/obj/item/shockpaddles/proc/snap_back()
if(!defib)
return
defib.on = FALSE
forceMove(defib)
defib.update_power()
/obj/item/twohanded/shockpaddles/proc/check_defib_exists(mainunit, mob/living/carbon/M, obj/O)
if(!req_defib)
return TRUE //If it doesn't need a defib, just say it exists
if (!mainunit || !istype(mainunit, /obj/item/defibrillator)) //To avoid weird issues from admin spawns
qdel(O)
return FALSE
else
return TRUE
/obj/item/twohanded/shockpaddles/attack(mob/M, mob/user)
/obj/item/shockpaddles/attack(mob/M, mob/user)
if(busy)
return
@@ -426,7 +426,7 @@
do_help(H, user)
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
/obj/item/shockpaddles/proc/shock_touching(dmg, mob/H)
if(!H.pulledby || !isliving(H.pulledby))
return
if(req_defib && defib.pullshocksafely)
@@ -437,7 +437,7 @@
M.visible_message("<span class='danger'>[M] is electrocuted by [M.p_their()] contact with [H]!</span>")
M.emote("scream")
/obj/item/twohanded/shockpaddles/proc/do_disarm(mob/living/M, mob/living/user)
/obj/item/shockpaddles/proc/do_disarm(mob/living/M, mob/living/user)
if(req_defib && defib.safety)
return
if(!req_defib && !combat)
@@ -465,7 +465,7 @@
else
recharge(60)
/obj/item/twohanded/shockpaddles/proc/do_harm(mob/living/carbon/H, mob/living/user)
/obj/item/shockpaddles/proc/do_harm(mob/living/carbon/H, mob/living/user)
if(req_defib && defib.safety)
return
if(!req_defib && !combat)
@@ -520,7 +520,7 @@
busy = FALSE
update_icon()
/obj/item/twohanded/shockpaddles/proc/do_help(mob/living/carbon/H, mob/living/user)
/obj/item/shockpaddles/proc/do_help(mob/living/carbon/H, mob/living/user)
user.visible_message("<span class='warning'>[user] begins to place [src] on [H]'s chest.</span>", "<span class='warning'>You begin to place [src] on [H]'s chest...</span>")
busy = TRUE
update_icon()
@@ -677,14 +677,14 @@
return TRUE
return ..()
/obj/item/twohanded/shockpaddles/cyborg
/obj/item/shockpaddles/cyborg
name = "cyborg defibrillator paddles"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
req_defib = FALSE
/obj/item/twohanded/shockpaddles/cyborg/attack(mob/M, mob/user)
/obj/item/shockpaddles/cyborg/attack(mob/M, mob/user)
if(iscyborg(user))
var/mob/living/silicon/robot/R = user
if(R.emagged)
@@ -696,7 +696,7 @@
. = ..()
/obj/item/twohanded/shockpaddles/syndicate
/obj/item/shockpaddles/syndicate
name = "syndicate defibrillator paddles"
desc = "A pair of paddles used to revive deceased operatives. It possesses both the ability to penetrate armor and to deliver powerful shocks offensively."
combat = TRUE

View File

@@ -0,0 +1,310 @@
/*
* Double-Bladed Energy Swords - Cheridan
*/
/obj/item/dualsaber
icon_state = "dualsaber0"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
name = "double-bladed energy sword"
desc = "Handle with care."
force = 3
throwforce = 5
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_SMALL
item_flags = SLOWS_WHILE_IN_HAND
var/w_class_on = WEIGHT_CLASS_BULKY
hitsound = "swing_hit"
var/hitsound_on = 'sound/weapons/blade1.ogg'
armour_penetration = 35
var/saber_color = "green"
light_color = "#00ff00"//green
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 75
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70)
resistance_flags = FIRE_PROOF
var/hacked = FALSE
/// Can this reflect all energy projectiles?
var/can_reflect = TRUE
var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD
var/list/possible_colors = list("red", "blue", "green", "purple")
var/list/rainbow_colors = list(LIGHT_COLOR_RED, LIGHT_COLOR_GREEN, LIGHT_COLOR_LIGHT_CYAN, LIGHT_COLOR_LAVENDER)
var/spinnable = TRUE
total_mass = 0.4 //Survival flashlights typically weigh around 5 ounces.
var/total_mass_on = 3.4
var/wielded = FALSE // track wielded status on item
var/slowdown_wielded = 0
/obj/item/dualsaber/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=3, force_wielded=34, \
wieldsound='sound/weapons/saberon.ogg', unwieldsound='sound/weapons/saberoff.ogg')
/obj/item/dualsaber/Initialize()
. = ..()
if(LAZYLEN(possible_colors))
saber_color = pick(possible_colors)
switch(saber_color)
if("red")
light_color = LIGHT_COLOR_RED
if("green")
light_color = LIGHT_COLOR_GREEN
if("blue")
light_color = LIGHT_COLOR_LIGHT_CYAN
if("purple")
light_color = LIGHT_COLOR_LAVENDER
/// Triggered on wield of two handed item
/// Specific hulk checks due to reflection chance for balance issues and switches hitsounds.
/obj/item/dualsaber/proc/on_wield(obj/item/source, mob/living/carbon/user)
if(user.has_dna() && user.dna.check_mutation(HULK))
to_chat(user, "<span class='warning'>You lack the grace to wield this!</span>")
return COMPONENT_TWOHANDED_BLOCK_WIELD
wielded = TRUE
sharpness = IS_SHARP
w_class = w_class_on
total_mass = total_mass_on
hitsound = 'sound/weapons/blade1.ogg'
slowdown += slowdown_wielded
START_PROCESSING(SSobj, src)
set_light(brightness_on)
AddElement(/datum/element/sword_point)
/// Triggered on unwield of two handed item
/// switch hitsounds
/obj/item/dualsaber/proc/on_unwield(obj/item/source, mob/living/carbon/user)
sharpness = initial(sharpness)
w_class = initial(w_class)
total_mass = initial(total_mass)
wielded = FALSE
hitsound = "swing_hit"
slowdown_wielded -= slowdown_wielded
STOP_PROCESSING(SSobj, src)
set_light(0)
RemoveElement(/datum/element/sword_point)
/obj/item/dualsaber/Destroy()
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/dualsaber/update_icon_state()
if(wielded)
icon_state = "dualsaber[saber_color][wielded]"
else
icon_state = "dualsaber0"
clean_blood()
/obj/item/dualsaber/suicide_act(mob/living/carbon/user)
if(wielded)
user.visible_message("<span class='suicide'>[user] begins spinning way too fast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)//stole from chainsaw code
var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN)
B.organ_flags &= ~ORGAN_VITAL //this cant possibly be a good idea
var/randdir
for(var/i in 1 to 24)//like a headless chicken!
if(user.is_holding(src))
randdir = pick(GLOB.alldirs)
user.Move(get_step(user, randdir),randdir)
user.emote("spin")
if (i == 3 && myhead)
myhead.drop_limb()
sleep(3)
else
user.visible_message("<span class='suicide'>[user] panics and starts choking to death!</span>")
return OXYLOSS
else
user.visible_message("<span class='suicide'>[user] begins beating [user.p_them()]self to death with \the [src]'s handle! It probably would've been cooler if [user.p_they()] turned it on first!</span>")
return BRUTELOSS
/obj/item/dualsaber/attack(mob/target, mob/living/carbon/human/user)
if(user.has_dna() && user.dna.check_mutation(HULK))
to_chat(user, "<span class='warning'>You grip the blade too hard and accidentally drop it!</span>")
user.dropItemToGround(src)
return
..()
if(HAS_TRAIT(user, TRAIT_CLUMSY) && (wielded) && prob(40))
impale(user)
return
if(spinnable && (wielded) && prob(50))
INVOKE_ASYNC(src, .proc/jedi_spin, user)
/obj/item/dualsaber/proc/jedi_spin(mob/living/user)
for(var/i in list(NORTH,SOUTH,EAST,WEST,EAST,SOUTH,NORTH,SOUTH,EAST,WEST,EAST,SOUTH))
user.setDir(i)
if(i == WEST)
user.emote("flip")
sleep(1)
/obj/item/dualsaber/proc/impale(mob/living/user)
to_chat(user, "<span class='warning'>You twirl around a bit before losing your balance and impaling yourself on [src].</span>")
if (force)
user.take_bodypart_damage(20,25)
else
user.adjustStaminaLoss(25)
/obj/item/dualsaber/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(!wielded)
return NONE
if(can_reflect && is_energy_reflectable_projectile(object) && (attack_type & ATTACK_TYPE_PROJECTILE))
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER //no you
return BLOCK_SHOULD_REDIRECT | BLOCK_SUCCESS | BLOCK_REDIRECTED
return ..()
/obj/item/dualsaber/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
if(wielded)
to_chat(user, "<span class='warning'>You can't pick up such dangerous item with your meaty hands without losing fingers, better not to!</span>")
return 1
/obj/item/dualsaber/process()
if(wielded)
if(hacked)
rainbow_process()
open_flame()
else
STOP_PROCESSING(SSobj, src)
/obj/item/dualsaber/proc/rainbow_process()
light_color = pick(rainbow_colors)
/obj/item/dualsaber/ignition_effect(atom/A, mob/user)
// same as /obj/item/melee/transforming/energy, mostly
if(!wielded)
return ""
var/in_mouth = ""
if(iscarbon(user))
var/mob/living/carbon/C = user
if(C.wear_mask)
in_mouth = ", barely missing [user.p_their()] nose"
. = "<span class='warning'>[user] swings [user.p_their()] [name][in_mouth]. [user.p_they(TRUE)] light[user.p_s()] [user.p_their()] [A.name] in the process.</span>"
playsound(loc, hitsound, get_clamped_volume(), 1, -1)
add_fingerprint(user)
// Light your candles while spinning around the room
if(spinnable)
INVOKE_ASYNC(src, .proc/jedi_spin, user)
/obj/item/dualsaber/green
possible_colors = list("green")
/obj/item/dualsaber/red
possible_colors = list("red")
/obj/item/dualsaber/blue
possible_colors = list("blue")
/obj/item/dualsaber/purple
possible_colors = list("purple")
/obj/item/dualsaber/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/multitool))
if(!hacked)
hacked = TRUE
to_chat(user, "<span class='warning'>2XRNBW_ENGAGE</span>")
saber_color = "rainbow"
update_icon()
else
to_chat(user, "<span class='warning'>It's starting to look like a triple rainbow - no, nevermind.</span>")
else
return ..()
/////////////////////////////////////////////////////
// HYPEREUTACTIC Blades /////////////////////////
/////////////////////////////////////////////////////
/obj/item/dualsaber/hypereutactic
icon = 'icons/obj/1x2.dmi'
icon_state = "hypereutactic"
lefthand_file = 'icons/mob/inhands/64x64_lefthand.dmi'
righthand_file = 'icons/mob/inhands/64x64_righthand.dmi'
item_state = "hypereutactic"
inhand_x_dimension = 64
inhand_y_dimension = 64
name = "hypereutactic blade"
desc = "A supermassive weapon envisioned to cleave the very fabric of space and time itself in twain, the hypereutactic blade dynamically flash-forges a hypereutactic crystaline nanostructure capable of passing through most known forms of matter like a hot knife through butter."
force = 7
hitsound_on = 'sound/weapons/nebhit.ogg'
armour_penetration = 60
light_color = "#37FFF7"
rainbow_colors = list("#FF0000", "#FFFF00", "#00FF00", "#00FFFF", "#0000FF","#FF00FF", "#3399ff", "#ff9900", "#fb008b", "#9800ff", "#00ffa3", "#ccff00")
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "destroyed", "ripped", "devastated", "shredded")
spinnable = FALSE
total_mass_on = 4
slowdown_wielded = 1
/obj/item/dualsaber/hypereutactic/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=7, force_wielded=40, \
wieldsound='sound/weapons/nebon.ogg', unwieldsound='sound/weapons/nebhit.ogg')
AddElement(/datum/element/update_icon_updates_onmob)
/obj/item/dualsaber/hypereutactic/update_icon_state()
return
/obj/item/dualsaber/hypereutactic/update_overlays()
. = ..()
var/mutable_appearance/blade_overlay = mutable_appearance(icon, "hypereutactic_blade")
var/mutable_appearance/gem_overlay = mutable_appearance(icon, "hypereutactic_gem")
if(light_color)
blade_overlay.color = light_color
gem_overlay.color = light_color
. += gem_overlay
if(wielded)
. += blade_overlay
clean_blood()
/obj/item/dualsaber/hypereutactic/AltClick(mob/living/user)
. = ..()
if(!user.canUseTopic(src, BE_CLOSE, FALSE) || hacked)
return
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null
if(!energy_color_input || !user.canUseTopic(src, BE_CLOSE, FALSE) || hacked)
return
light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
update_icon()
update_light()
return TRUE
/obj/item/dualsaber/hypereutactic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
. = ..()
if(isinhands)
var/mutable_appearance/gem_inhand = mutable_appearance(icon_file, "hypereutactic_gem")
gem_inhand.color = light_color
. += gem_inhand
if(wielded)
var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "hypereutactic_blade")
blade_inhand.color = light_color
. += blade_inhand
/obj/item/dualsaber/hypereutactic/examine(mob/user)
. = ..()
if(!hacked)
. += "<span class='notice'>Alt-click to recolor it.</span>"
/obj/item/dualsaber/hypereutactic/rainbow_process()
. = ..()
update_icon()
update_light()
/obj/item/dualsaber/hypereutactic/chaplain
name = "divine lightblade"
desc = "A giant blade of bright and holy light, said to cut down the wicked with ease."
force = 5
block_chance = 50
armour_penetration = 0
var/chaplain_spawnable = TRUE
can_reflect = FALSE
obj_flags = UNIQUE_RENAME
/obj/item/dualsaber/hypereutactic/chaplain/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=20, \
wieldsound='sound/weapons/nebon.ogg', unwieldsound='sound/weapons/nebhit.ogg')
AddComponent(/datum/component/anti_magic, TRUE, TRUE, FALSE, null, null, FALSE)

View File

@@ -0,0 +1,229 @@
/obj/item/electrostaff
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "electrostaff"
item_state = "electrostaff"
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
name = "riot suppression electrostaff"
desc = "A large quarterstaff, with massive silver electrodes mounted at the end."
w_class = WEIGHT_CLASS_HUGE
slot_flags = ITEM_SLOT_BACK | ITEM_SLOT_OCLOTHING
throwforce = 15 //if you are a madman and finish someone off with this, power to you.
throw_speed = 1
item_flags = NO_MAT_REDEMPTION
block_chance = 30
attack_verb = list("struck", "beaten", "thwacked", "pulped")
total_mass = 5 //yeah this is a heavy thing, beating people with it while it's off is not going to do you any favors. (to curb stun-kill rampaging without it being on)
var/obj/item/stock_parts/cell/cell = /obj/item/stock_parts/cell/high
var/on = FALSE
var/can_block_projectiles = FALSE //can't block guns
var/lethal_cost = 400 //10000/400*20 = 500. decent enough?
var/lethal_damage = 20
var/lethal_stam_cost = 4
var/stun_cost = 333 //10000/333*25 = 750. stunbatons are at time of writing 10000/1000*49 = 490.
var/stun_status_effect = STATUS_EFFECT_ELECTROSTAFF //a small slowdown effect
var/stun_stamdmg = 40
var/stun_status_duration = 25
var/stun_stam_cost = 3.5
var/wielded = FALSE // track wielded status on item
/obj/item/electrostaff/Initialize(mapload)
. = ..()
if(ispath(cell))
cell = new cell
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/turn_on)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/turn_off)
/obj/item/electrostaff/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_multiplier=2, wieldsound="sparks", unwieldsound="sparks")
/obj/item/electrostaff/Destroy()
STOP_PROCESSING(SSobj, src)
QDEL_NULL(cell)
return ..()
/obj/item/electrostaff/get_cell()
. = cell
if(iscyborg(loc))
var/mob/living/silicon/robot/R = loc
. = R.get_cell()
/obj/item/electrostaff/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(!on || (!can_block_projectiles && (attack_type & ATTACK_TYPE_PROJECTILE)))
return BLOCK_NONE
return ..()
/obj/item/electrostaff/proc/min_hitcost()
return min(stun_cost, lethal_cost)
/obj/item/electrostaff/proc/turn_on(obj/item/source, mob/user)
wielded = TRUE
if(!cell)
if(user)
to_chat(user, "<span class='warning'>[src] has no cell.</span>")
return
if(cell.charge < min_hitcost())
if(user)
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
return
on = TRUE
START_PROCESSING(SSobj, src)
if(user)
to_chat(user, "<span class='warning'>You turn [src] on.</span>")
/obj/item/electrostaff/proc/turn_off(obj/item/source, mob/user)
wielded = FALSE
if(user)
to_chat(user, "<span class='warning'>You turn [src] off.</span>")
on = FALSE
STOP_PROCESSING(SSobj, src)
/obj/item/electrostaff/update_icon_state()
if(!wielded)
icon_state = item_state = "electrostaff"
else
icon_state = item_state = (on? "electrostaff_1" : "electrostaff_0")
set_light(7, on? 1 : 0, LIGHT_COLOR_CYAN)
/obj/item/electrostaff/examine(mob/living/user)
. = ..()
if(cell)
. += "<span class='notice'>The cell charge is [round(cell.percent())]%.</span>"
else
. += "<span class='warning'>There is no cell installed!</span>"
/obj/item/electrostaff/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/stock_parts/cell))
var/obj/item/stock_parts/cell/C = W
if(cell)
to_chat(user, "<span class='warning'>[src] already has a cell!</span>")
else
if(C.maxcharge < min_hit_cost())
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
return
if(!user.transferItemToLoc(W, src))
return
cell = C
to_chat(user, "<span class='notice'>You install a cell in [src].</span>")
else if(W.tool_behaviour == TOOL_SCREWDRIVER)
if(cell)
cell.update_icon()
cell.forceMove(get_turf(src))
cell = null
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
turn_off(user, TRUE)
else
return ..()
/obj/item/electrostaff/process()
deductcharge(50) //Wasteful!
/obj/item/electrostaff/proc/min_hit_cost()
return min(lethal_cost, stun_cost)
/obj/item/electrostaff/proc/deductcharge(amount)
var/obj/item/stock_parts/cell/C = get_cell()
if(!C)
turn_off()
return FALSE
C.use(min(amount, C.charge))
if(QDELETED(src))
return FALSE
if(C.charge < min_hit_cost())
turn_off()
/obj/item/electrostaff/attack(mob/living/target, mob/living/user)
if(IS_STAMCRIT(user))//CIT CHANGE - makes it impossible to baton in stamina softcrit
to_chat(user, "<span class='danger'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
return //CIT CHANGE - ditto
if(on && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
clowning_around(user) //ouch!
return
if(iscyborg(target))
..()
return
if(target.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, null) & BLOCK_SUCCESS) //No message; run_block() handles that
playsound(target, 'sound/weapons/genhit.ogg', 50, 1)
return FALSE
if(user.a_intent != INTENT_HARM)
if(stun_act(target, user))
user.do_attack_animation(target)
user.adjustStaminaLossBuffered(stun_stam_cost)
return
else if(!harm_act(target, user))
return ..() //if you can't fry them just beat them with it
else //we did harm act them
user.do_attack_animation(target)
user.adjustStaminaLossBuffered(lethal_stam_cost)
/obj/item/electrostaff/proc/stun_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE)
var/stunforce = stun_stamdmg
if(!no_charge_and_force)
if(!on)
target.visible_message("<span class='warning'>[user] has bapped [target] with [src]. Luckily it was off.</span>", \
"<span class='warning'>[user] has bapped you with [src]. Luckily it was off</span>")
turn_off() //if it wasn't already off
return FALSE
var/obj/item/stock_parts/cell/C = get_cell()
var/chargeleft = C.charge
deductcharge(stun_cost)
if(QDELETED(src) || QDELETED(C)) //boom
return FALSE
if(chargeleft < stun_cost)
stunforce *= round(chargeleft/stun_cost, 0.1)
target.adjustStaminaLoss(stunforce)
target.apply_effect(EFFECT_STUTTER, stunforce)
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK)
if(user)
target.lastattacker = user.real_name
target.lastattackerckey = user.ckey
target.visible_message("<span class='danger'>[user] has shocked [target] with [src]!</span>", \
"<span class='userdanger'>[user] has shocked you with [src]!</span>")
log_combat(user, target, "stunned with an electrostaff")
playsound(src, 'sound/weapons/staff.ogg', 50, 1, -1)
target.apply_status_effect(stun_status_effect, stun_status_duration)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.forcesay(GLOB.hit_appends)
return TRUE
/obj/item/electrostaff/proc/harm_act(mob/living/target, mob/living/user, no_charge_and_force = FALSE)
var/lethal_force = lethal_damage
if(!no_charge_and_force)
if(!on)
return FALSE //standard item attack
var/obj/item/stock_parts/cell/C = get_cell()
var/chargeleft = C.charge
deductcharge(lethal_cost)
if(QDELETED(src) || QDELETED(C)) //boom
return FALSE
if(chargeleft < stun_cost)
lethal_force *= round(chargeleft/lethal_cost, 0.1)
target.adjustFireLoss(lethal_force) //good against ointment spam
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK)
if(user)
target.lastattacker = user.real_name
target.lastattackerckey = user.ckey
target.visible_message("<span class='danger'>[user] has seared [target] with [src]!</span>", \
"<span class='userdanger'>[user] has seared you with [src]!</span>")
log_combat(user, target, "burned with an electrostaff")
playsound(src, 'sound/weapons/sear.ogg', 50, 1, -1)
return TRUE
/obj/item/electrostaff/proc/clowning_around(mob/living/user)
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
harm_act(user, user, TRUE)
stun_act(user, user, TRUE)
deductcharge(lethal_cost)
/obj/item/electrostaff/emp_act(severity)
. = ..()
if (!(. & EMP_PROTECT_SELF))
turn_off()
if(!iscyborg(loc))
deductcharge(1000 / severity, TRUE, FALSE)

View File

@@ -0,0 +1,71 @@
/*
* Fireaxe
*/
/obj/item/fireaxe // DEM AXES MAN, marker -Agouri
icon_state = "fireaxe0"
lefthand_file = 'icons/mob/inhands/weapons/axes_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/axes_righthand.dmi'
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 5
throwforce = 15
w_class = WEIGHT_CLASS_BULKY
slot_flags = ITEM_SLOT_BACK
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
var/wielded = FALSE // track wielded status on item
/obj/item/fireaxe/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/fireaxe/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 100, 80, 0 , hitsound) //axes are not known for being precision butchering tools
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=24, icon_wielded="fireaxe1")
/// triggered on wield of two handed item
/obj/item/fireaxe/proc/on_wield(obj/item/source, mob/user)
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/fireaxe/proc/on_unwield(obj/item/source, mob/user)
wielded = FALSE
/obj/item/fireaxe/update_icon_state()
icon_state = "fireaxe0"
/obj/item/fireaxe/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] axes [user.p_them()]self from head to toe! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/fireaxe/afterattack(atom/A, mob/living/user, proximity)
. = ..()
if(!proximity || !wielded || IS_STAMCRIT(user))
return
if(istype(A, /obj/structure/window)) //destroys windows and grilles in one hit (or more if it has a ton of health like plasmaglass)
var/obj/structure/window/W = A
W.take_damage(200, BRUTE, "melee", 0)
else if(istype(A, /obj/structure/grille))
var/obj/structure/grille/G = A
G.take_damage(40, BRUTE, "melee", 0)
/*
* Bone Axe
*/
/obj/item/fireaxe/boneaxe // Blatant imitation of the fireaxe, but made out of bone.
icon_state = "bone_axe0"
name = "bone axe"
desc = "A large, vicious axe crafted out of several sharpened bone plates and crudely tied together. Made of monsters, by killing monsters, for killing monsters."
/obj/item/fireaxe/boneaxe/update_icon_state()
icon_state = "bone_axe0"
/obj/item/fireaxe/boneaxe/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=23, icon_wielded="bone_axe1")

View File

@@ -345,7 +345,7 @@
return
else
to_chat(user, "<span class='notice'>You combine the two light swords, making a single supermassive blade! You're cool.</span>")
new /obj/item/twohanded/dualsaber/hypereutactic(user.drop_location())
new /obj/item/dualsaber/hypereutactic(user.drop_location())
qdel(W)
qdel(src)
else

View File

@@ -0,0 +1,101 @@
/obj/item/pitchfork
icon_state = "pitchfork0"
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
name = "pitchfork"
desc = "A simple tool used for moving hay."
force = 7
throwforce = 15
w_class = WEIGHT_CLASS_BULKY
attack_verb = list("attacked", "impaled", "pierced")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
var/wielded = FALSE // track wielded status on item
/obj/item/pitchfork/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/pitchfork/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=7, force_wielded=15, icon_wielded="pitchfork1")
AddElement(/datum/element/sword_point)
/// triggered on wield of two handed item
/obj/item/pitchfork/proc/on_wield(obj/item/source, mob/user)
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/pitchfork/proc/on_unwield(obj/item/source, mob/user)
wielded = FALSE
/obj/item/pitchfork/update_icon_state()
icon_state = "pitchfork0"
/obj/item/pitchfork/demonic
name = "demonic pitchfork"
desc = "A red pitchfork, it looks like the work of the devil."
force = 19
throwforce = 24
/obj/item/pitchfork/demonic/Initialize()
. = ..()
set_light(3,6,LIGHT_COLOR_RED)
/obj/item/pitchfork/demonic/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=19, force_wielded=25)
/obj/item/pitchfork/demonic/greater
force = 24
throwforce = 50
/obj/item/pitchfork/demonic/greater/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=24, force_wielded=34)
/obj/item/pitchfork/demonic/ascended
force = 100
throwforce = 100
/obj/item/pitchfork/demonic/ascended/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=100, force_wielded=500000) // Kills you DEAD
/obj/item/pitchfork/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] impales [user.p_them()]self in [user.p_their()] abdomen with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/pitchfork/demonic/pickup(mob/living/user)
. = ..()
if(isliving(user) && user.mind && user.owns_soul() && !is_devil(user))
var/mob/living/U = user
U.visible_message("<span class='warning'>As [U] picks [src] up, [U]'s arms briefly catch fire.</span>", \
"<span class='warning'>\"As you pick up [src] your arms ignite, reminding you of all your past sins.\"</span>")
if(ishuman(U))
var/mob/living/carbon/human/H = U
H.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
else
U.adjustFireLoss(rand(force/2,force))
/obj/item/pitchfork/demonic/attack(mob/target, mob/living/carbon/human/user)
if(user.mind && user.owns_soul() && !is_devil(user))
to_chat(user, "<span class='warning'>[src] burns in your hands.</span>")
user.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
..()
/obj/item/pitchfork/demonic/ascended/afterattack(atom/target, mob/user, proximity)
. = ..()
if(!proximity || !wielded)
return
if(iswallturf(target))
var/turf/closed/wall/W = target
user.visible_message("<span class='danger'>[user] blasts \the [target] with \the [src]!</span>")
playsound(target, 'sound/magic/disintegrate.ogg', 100, TRUE)
W.break_wall()
W.ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
return

View File

@@ -459,7 +459,7 @@
/obj/item/borg/upgrade/defib/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
var/obj/item/twohanded/shockpaddles/cyborg/S = locate() in R.module
var/obj/item/shockpaddles/cyborg/S = locate() in R.module
R.module.remove_module(S, TRUE)
/obj/item/borg/upgrade/processor

View File

@@ -24,24 +24,22 @@
if(istype(I, /obj/item/melee/transforming/energy))
to_chat(user, "<span class='warning'>You don't think \the [I] will be the thing getting modified if you use it on \the [src]!</span>")
return
if(istype(I, /obj/item/twohanded))//some twohanded items should still be sharpenable, but handle force differently. therefore i need this stuff
var/obj/item/twohanded/TH = I
if(TH.force_wielded >= max)
to_chat(user, "<span class='warning'>[TH] is much too powerful to sharpen further!</span>")
return
if(TH.wielded)
to_chat(user, "<span class='warning'>[TH] must be unwielded before it can be sharpened!</span>")
return
if(TH.force_wielded > initial(TH.force_wielded))
to_chat(user, "<span class='warning'>[TH] has already been refined before. It cannot be sharpened further!</span>")
return
TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
if(I.force > initial(I.force))
var/signal_out = SEND_SIGNAL(I, COMSIG_ITEM_SHARPEN_ACT, increment, max)
if(signal_out & COMPONENT_BLOCK_SHARPEN_MAXED)
to_chat(user, "<span class='warning'>[I] is much too powerful to sharpen further!</span>")
return
if(signal_out & COMPONENT_BLOCK_SHARPEN_BLOCKED)
to_chat(user, "<span class='warning'>[I] is not able to be sharpened right now!</span>")
return
if((signal_out & COMPONENT_BLOCK_SHARPEN_ALREADY) || (I.force > initial(I.force) && !signal_out))
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
return
if(!(signal_out & COMPONENT_BLOCK_SHARPEN_APPLIED))
I.force = clamp(I.force + increment, 0, max)
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
I.sharpness = IS_SHARP_ACCURATE
I.force = clamp(I.force + increment, 0, max)
I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
name = "worn out [name]"

View File

@@ -1,4 +1,4 @@
/obj/item/twohanded/singularityhammer
/obj/item/singularityhammer
name = "singularity hammer"
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
icon_state = "mjollnir0"
@@ -7,35 +7,47 @@
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
force = 5
force_unwielded = 5
force_wielded = 20
throwforce = 15
throw_range = 1
w_class = WEIGHT_CLASS_HUGE
var/charged = 5
armor = list("melee" = 50, "bullet" = 50, "laser" = 50, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100)
resistance_flags = FIRE_PROOF | ACID_PROOF
force_string = "LORD SINGULOTH HIMSELF"
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
var/charged = 5
var/wielded = FALSE // track wielded status on item
/obj/item/twohanded/singularityhammer/New()
/obj/item/singularityhammer/New()
..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
START_PROCESSING(SSobj, src)
/obj/item/twohanded/singularityhammer/Destroy()
/obj/item/singularityhammer/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_multiplier=4, icon_wielded="mjollnir1")
/// triggered on wield of two handed item
/obj/item/singularityhammer/proc/on_wield(obj/item/source, mob/user)
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/singularityhammer/proc/on_unwield(obj/item/source, mob/user)
wielded = FALSE
/obj/item/singularityhammer/update_icon_state()
icon_state = "mjollnir0"
/obj/item/singularityhammer/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/twohanded/singularityhammer/process()
/obj/item/singularityhammer/process()
if(charged < 5)
charged++
return
/obj/item/twohanded/singularityhammer/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "mjollnir[wielded]"
return
/obj/item/twohanded/singularityhammer/proc/vortex(turf/pull, mob/wielder)
/obj/item/singularityhammer/proc/vortex(turf/pull, mob/wielder)
for(var/atom/X in orange(5,pull))
if(ismovable(X))
var/atom/movable/A = X
@@ -55,9 +67,8 @@
step_towards(H,pull)
step_towards(H,pull)
step_towards(H,pull)
return
/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
/obj/item/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
. = ..()
if(!proximity)
return
@@ -71,7 +82,7 @@
var/turf/target = get_turf(A)
vortex(target,user)
/obj/item/twohanded/mjollnir
/obj/item/mjollnir
name = "Mjolnir"
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
icon_state = "mjollnir0"
@@ -80,14 +91,33 @@
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
force = 5
force_unwielded = 5
force_wielded = 25
throwforce = 30
throw_range = 7
w_class = WEIGHT_CLASS_HUGE
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
var/wielded = FALSE // track wielded status on item
/obj/item/twohanded/mjollnir/proc/shock(mob/living/target)
/obj/item/mjollnir/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/mjollnir/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_multiplier=5, icon_wielded="mjollnir1", attacksound="sparks")
/// triggered on wield of two handed item
/obj/item/mjollnir/proc/on_wield(obj/item/source, mob/user)
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/mjollnir/proc/on_unwield(obj/item/source, mob/user)
wielded = FALSE
/obj/item/mjollnir/update_icon_state()
icon_state = "mjollnir0"
/obj/item/mjollnir/proc/shock(mob/living/target)
target.Stun(60)
var/datum/effect_system/lightning_spread/s = new /datum/effect_system/lightning_spread
s.set_up(5, 1, target.loc)
@@ -99,17 +129,12 @@
target.throw_at(throw_target, 200, 4)
return
/obj/item/twohanded/mjollnir/attack(mob/living/M, mob/user)
/obj/item/mjollnir/attack(mob/living/M, mob/user)
..()
if(wielded)
playsound(src.loc, "sparks", 50, 1)
shock(M)
/obj/item/twohanded/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
/obj/item/mjollnir/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
. = ..()
if(isliving(hit_atom))
shock(hit_atom)
/obj/item/twohanded/mjollnir/update_icon_state() //Currently only here to fuck with the on-mob icons.
icon_state = "mjollnir[wielded]"
return

View File

@@ -0,0 +1,181 @@
//spears
/obj/item/spear
icon_state = "spearglass0"
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
force = 10
w_class = WEIGHT_CLASS_BULKY
slot_flags = ITEM_SLOT_BACK
throwforce = 20
throw_speed = 4
embedding = list("embedded_impact_pain_multiplier" = 3, "embed_chance" = 90)
armour_penetration = 10
custom_materials = list(/datum/material/iron=1150, /datum/material/glass=2075)
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
sharpness = IS_SHARP
max_integrity = 200
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/obj/item/grenade/explosive = null
var/war_cry = "AAAAARGH!!!"
var/icon_prefix = "spearglass"
var/wielded = FALSE // track wielded status on item
/obj/item/spear/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/spear/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 100, 70) //decent in a pinch, but pretty bad.
AddComponent(/datum/component/jousting)
AddElement(/datum/element/sword_point)
AddComponent(/datum/component/two_handed, force_unwielded=10, force_wielded=18, icon_wielded="[icon_prefix]1")
/// triggered on wield of two handed item
/obj/item/spear/proc/on_wield(obj/item/source, mob/user)
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/spear/proc/on_unwield(obj/item/source, mob/user)
wielded = FALSE
/obj/item/spear/rightclick_attack_self(mob/user)
if(explosive)
explosive.attack_self(user)
return
. = ..()
/obj/item/spear/update_icon_state()
icon_state = "[icon_prefix]0"
/obj/item/spear/update_overlays()
. = ..()
if(explosive)
. += "spearbomb_overlay"
/obj/item/spear/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins to sword-swallow \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
if(explosive) //Citadel Edit removes qdel and explosive.forcemove(AM)
user.say("[war_cry]", forced="spear warcry")
explosive.prime()
user.gib()
return BRUTELOSS
return BRUTELOSS
/obj/item/spear/examine(mob/user)
. = ..()
if(explosive)
. += "<span class='notice'>Alt-click to set your war cry.</span>"
. += "<span class='notice'>Right-click in combat mode to activate the attached explosive.</span>"
/obj/item/spear/afterattack(atom/movable/AM, mob/user, proximity)
. = ..()
if(!proximity)
return
if(isopenturf(AM)) //So you can actually melee with it
return
if(explosive && wielded) //Citadel edit removes qdel and explosive.forcemove(AM)
user.say("[war_cry]", forced="spear warcry")
explosive.prime()
/obj/item/spear/grenade_prime_react(obj/item/grenade/nade) //Citadel edit, removes throw_impact because memes
nade.forceMove(get_turf(src))
qdel(src)
/obj/item/spear/AltClick(mob/user)
. = ..()
if(user.canUseTopic(src, BE_CLOSE))
..()
if(!explosive)
return
if(istype(user) && loc == user)
var/input = stripped_input(user,"What do you want your war cry to be? You will shout it when you hit someone in melee.", ,"", 50)
if(input)
src.war_cry = input
return TRUE
/obj/item/spear/CheckParts(list/parts_list)
var/obj/item/shard/tip = locate() in parts_list
if (istype(tip, /obj/item/shard/plasma))
throwforce = 21
icon_prefix = "spearplasma"
AddComponent(/datum/component/two_handed, force_unwielded=11, force_wielded=19, icon_wielded="[icon_prefix]1")
qdel(tip)
var/obj/item/spear/S = locate() in parts_list
if(S)
if(S.explosive)
S.explosive.forceMove(get_turf(src))
S.explosive = null
parts_list -= S
qdel(S)
..()
var/obj/item/grenade/G = locate() in contents
if(G)
explosive = G
name = "explosive lance"
desc = "A makeshift spear with \a [G] attached to it."
update_icon()
//GREY TIDE
/obj/item/spear/grey_tide
icon_state = "spearglass0"
name = "\improper Grey Tide"
desc = "Recovered from the aftermath of a revolt aboard Defense Outpost Theta Aegis, in which a seemingly endless tide of Assistants caused heavy casualities among Nanotrasen military forces."
throwforce = 20
throw_speed = 4
attack_verb = list("gored")
var/clonechance = 50
var/clonedamage = 12
var/clonespeed = 0
var/clone_replication_chance = 30
var/clone_lifespan = 100
/obj/item/spear/grey_tide/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=15, force_wielded=25, icon_wielded="[icon_prefix]1")
/obj/item/spear/grey_tide/afterattack(atom/movable/AM, mob/living/user, proximity)
. = ..()
if(!proximity)
return
user.faction |= "greytide([REF(user)])"
if(isliving(AM))
var/mob/living/L = AM
if(istype (L, /mob/living/simple_animal/hostile/illusion))
return
if(!L.stat && prob(clonechance))
var/mob/living/simple_animal/hostile/illusion/M = new(user.loc)
M.faction = user.faction.Copy()
M.set_varspeed(clonespeed)
M.Copy_Parent(user, clone_lifespan, user.health/2.5, clonedamage, clone_replication_chance)
M.GiveTarget(L)
/*
* Bone Spear
*/
/obj/item/spear/bonespear //Blatant imitation of spear, but made out of bone. Not valid for explosive modification.
icon_state = "bone_spear0"
lefthand_file = 'icons/mob/inhands/weapons/polearms_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/polearms_righthand.dmi'
name = "bone spear"
desc = "A haphazardly-constructed yet still deadly weapon. The pinnacle of modern technology."
force = 11
w_class = WEIGHT_CLASS_BULKY
slot_flags = ITEM_SLOT_BACK
reach = 2
throwforce = 22
embedding = list("embedded_impact_pain_multiplier" = 3)
armour_penetration = 15 //Enhanced armor piercing
custom_materials = null
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
sharpness = IS_SHARP
icon_prefix = "bone_spear"
/obj/item/spear/bonespear/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=11, force_wielded=20, icon_wielded="[icon_prefix]1")

View File

@@ -585,7 +585,7 @@
/obj/item/key/janitor,
/obj/item/clothing/gloves,
/obj/item/melee/flyswatter,
/obj/item/twohanded/broom,
/obj/item/broom,
/obj/item/paint/paint_remover,
/obj/item/assembly/mousetrap,
/obj/item/screwdriver,

View File

@@ -173,12 +173,12 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
var/unholy2clean = A.reagents.get_reagent_amount(/datum/reagent/fuel/unholywater)
A.reagents.del_reagent(/datum/reagent/fuel/unholywater)
A.reagents.add_reagent(/datum/reagent/water/holywater,unholy2clean)
if(istype(A, /obj/item/twohanded/required/cult_bastard) || istype(A, /obj/item/melee/cultblade) && !iscultist(user))
if(istype(A, /obj/item/cult_bastard) || istype(A, /obj/item/melee/cultblade) && !iscultist(user))
to_chat(user, "<span class='notice'>You begin to exorcise [A].</span>")
playsound(src,'sound/hallucinations/veryfar_noise.ogg',40,1)
if(do_after(user, 40, target = A))
playsound(src,'sound/effects/pray_chaplain.ogg',60,1)
if(istype(A, /obj/item/twohanded/required/cult_bastard))
if(istype(A, /obj/item/cult_bastard))
for(var/obj/item/soulstone/SS in A.contents)
SS.usability = TRUE
for(var/mob/living/simple_animal/shade/EX in SS)

View File

@@ -117,7 +117,7 @@
new /obj/item/pizzabox/bomb
if("darklord") //20 tc + tk + summon item close enough for now
new /obj/item/twohanded/dualsaber(src)
new /obj/item/dualsaber(src)
new /obj/item/dnainjector/telemut/darkbundle(src)
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/card/id/syndicate(src)

View File

@@ -272,7 +272,7 @@
return
else
to_chat(user, "<span class='notice'>You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.</span>")
var/obj/item/twohanded/dualsaber/toy/newSaber = new /obj/item/twohanded/dualsaber/toy(user.loc)
var/obj/item/dualsaber/toy/newSaber = new /obj/item/dualsaber/toy(user.loc)
if(hacked) // That's right, we'll only check the "original" "sword".
newSaber.hacked = TRUE
qdel(W)
@@ -363,7 +363,7 @@
return
else
to_chat(user, "<span class='notice'>You combine the two plastic swords, making a single supermassive toy! You're fake-cool.</span>")
new /obj/item/twohanded/dualsaber/hypereutactic/toy(user.loc)
new /obj/item/dualsaber/hypereutactic/toy(user.loc)
qdel(W)
qdel(src)
else
@@ -437,40 +437,45 @@
/*
* Subtype of Double-Bladed Energy Swords
*/
/obj/item/twohanded/dualsaber/toy
/obj/item/dualsaber/toy
name = "double-bladed toy sword"
desc = "A cheap, plastic replica of TWO energy swords. Double the fun!"
force = 0
throwforce = 0
throw_speed = 3
throw_range = 5
force_unwielded = 0
force_wielded = 0
attack_verb = list("attacked", "struck", "hit")
total_mass_on = TOTAL_MASS_TOY_SWORD
sharpness = IS_BLUNT
/obj/item/twohanded/dualsaber/toy/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
/obj/item/dualsaber/toy/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, wieldsound='sound/weapons/saberon.ogg', unwieldsound='sound/weapons/saberoff.ogg')
/obj/item/dualsaber/toy/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
return BLOCK_NONE
/obj/item/twohanded/dualsaber/hypereutactic/toy
/obj/item/dualsaber/hypereutactic/toy
name = "\improper DX Hyper-Euplastic LightSword"
desc = "A supermassive toy envisioned to cleave the very fabric of space and time itself in twain. Realistic visuals and sounds! Ages 8 and up."
force = 0
throwforce = 0
throw_speed = 3
throw_range = 5
force_unwielded = 0
force_wielded = 0
attack_verb = list("attacked", "struck", "hit")
total_mass_on = TOTAL_MASS_TOY_SWORD
slowdown_wielded = 0
sharpness = IS_BLUNT
/obj/item/twohanded/dualsaber/hypereutactic/toy/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
/obj/item/dualsaber/toy/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, wieldsound='sound/weapons/saberon.ogg', unwieldsound='sound/weapons/saberoff.ogg')
/obj/item/dualsaber/hypereutactic/toy/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
return BLOCK_NONE
/obj/item/twohanded/dualsaber/hypereutactic/toy/rainbow
/obj/item/dualsaber/hypereutactic/toy/rainbow
name = "\improper Hyper-Euclidean Reciprocating Trigonometric Zweihander"
desc = "A custom-built toy with fancy rainbow lights built-in."
hacked = TRUE

File diff suppressed because it is too large Load Diff

View File

@@ -261,7 +261,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/wirerod/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/shard))
var/obj/item/twohanded/spear/S = new /obj/item/twohanded/spear
var/obj/item/spear/S = new /obj/item/spear
remove_item_from_storage(user)
if (!user.transferItemToLoc(I, S))
@@ -457,7 +457,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/mounted_chainsaw/Destroy()
var/obj/item/bodypart/part
new /obj/item/twohanded/required/chainsaw(get_turf(src))
new /obj/item/chainsaw(get_turf(src))
if(iscarbon(loc))
var/mob/living/carbon/holder = loc
var/index = holder.get_held_index_of_item(src)
@@ -734,3 +734,59 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
to_chat(user, "<span class='warning'>[M] is too close to use [src] on.</span>")
return
M.attack_hand(user)
//HF blade
/obj/item/vibro_weapon
icon_state = "hfrequency0"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
name = "vibro sword"
desc = "A potent weapon capable of cutting through nearly anything. Wielding it in two hands will allow you to deflect gunfire."
armour_penetration = 100
block_chance = 40
throwforce = 20
throw_speed = 4
sharpness = IS_SHARP
attack_verb = list("cut", "sliced", "diced")
w_class = WEIGHT_CLASS_BULKY
slot_flags = ITEM_SLOT_BACK
hitsound = 'sound/weapons/bladeslice.ogg'
var/wielded = FALSE // track wielded status on item
/obj/item/vibro_weapon/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/obj/item/vibro_weapon/ComponentInitialize()
. = ..()
AddComponent(/datum/component/butchering, 20, 105)
AddComponent(/datum/component/two_handed, force_multiplier=2, icon_wielded="hfrequency1")
AddElement(/datum/element/sword_point)
/// triggered on wield of two handed item
/obj/item/vibro_weapon/proc/on_wield(obj/item/source, mob/user)
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/vibro_weapon/proc/on_unwield(obj/item/source, mob/user)
wielded = FALSE
/obj/item/vibro_weapon/update_icon_state()
icon_state = "hfrequency0"
/obj/item/vibro_weapon/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if(wielded)
final_block_chance *= 2
if(wielded || !(attack_type & ATTACK_TYPE_PROJECTILE))
if(prob(final_block_chance))
if(attack_type & ATTACK_TYPE_PROJECTILE)
owner.visible_message("<span class='danger'>[owner] deflects [attack_text] with [src]!</span>")
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL
else
owner.visible_message("<span class='danger'>[owner] parries [attack_text] with [src]!</span>")
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
return NONE

View File

@@ -272,8 +272,8 @@
icon_state = "tac"
/obj/structure/closet/secure_closet/lethalshots/PopulateContents()
..()
new /obj/item/twohanded/electrostaff(src)
new /obj/item/twohanded/electrostaff(src)
new /obj/item/electrostaff(src)
new /obj/item/electrostaff(src)
for(var/i in 1 to 3)
new /obj/item/storage/box/lethalshot(src)

View File

@@ -11,7 +11,7 @@
integrity_failure = 0.33
var/locked = TRUE
var/open = FALSE
var/obj/item/twohanded/fireaxe/fireaxe
var/obj/item/fireaxe/fireaxe
/obj/structure/fireaxecabinet/Initialize()
. = ..()
@@ -50,8 +50,8 @@
obj_integrity = max_integrity
update_icon()
else if(open || broken)
if(istype(I, /obj/item/twohanded/fireaxe) && !fireaxe)
var/obj/item/twohanded/fireaxe/F = I
if(istype(I, /obj/item/fireaxe) && !fireaxe)
var/obj/item/fireaxe/F = I
if(F.wielded)
to_chat(user, "<span class='warning'>Unwield the [F.name] first.</span>")
return

View File

@@ -288,7 +288,7 @@
icon_state = "fullgrass_[rand(1, 3)]"
. = ..()
/obj/item/twohanded/required/kirbyplants
/obj/item/kirbyplants
name = "potted plant"
icon = 'icons/obj/flora/plants.dmi'
icon_state = "plant-01"
@@ -300,23 +300,24 @@
throw_speed = 2
throw_range = 4
/obj/item/twohanded/required/kirbyplants/Initialize()
/obj/item/kirbyplants/ComponentInitialize()
. = ..()
AddComponent(/datum/component/tactical)
AddComponent(/datum/component/two_handed, require_twohands=TRUE, force_unwielded=10, force_wielded=10)
/obj/item/twohanded/required/kirbyplants/random
/obj/item/kirbyplants/random
icon = 'icons/obj/flora/_flora.dmi'
icon_state = "random_plant"
var/list/static/states
/obj/item/twohanded/required/kirbyplants/random/Initialize()
/obj/item/kirbyplants/random/Initialize()
. = ..()
icon = 'icons/obj/flora/plants.dmi'
if(!states)
generate_states()
icon_state = pick(states)
/obj/item/twohanded/required/kirbyplants/random/proc/generate_states()
/obj/item/kirbyplants/random/proc/generate_states()
states = list()
for(var/i in 1 to 25)
var/number
@@ -328,12 +329,12 @@
states += "applebush"
/obj/item/twohanded/required/kirbyplants/dead
/obj/item/kirbyplants/dead
name = "RD's potted plant"
desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..."
icon_state = "plant-25"
/obj/item/twohanded/required/kirbyplants/photosynthetic
/obj/item/kirbyplants/photosynthetic
name = "photosynthetic potted plant"
desc = "A bioluminescent plant."
icon_state = "plant-09"

View File

@@ -6,7 +6,7 @@
density = FALSE
anchored = TRUE
var/bonespear = FALSE
var/obj/item/twohanded/spear/spear
var/obj/item/spear/spear
var/obj/item/bodypart/head/victim
/obj/structure/headpike/bone //for bone spears
@@ -20,9 +20,9 @@
name = "[victim.name] on a spear"
update_icon()
if(bonespear)
spear = locate(/obj/item/twohanded/bonespear) in parts_list
spear = locate(/obj/item/spear/bonespear) in parts_list
else
spear = locate(/obj/item/twohanded/spear) in parts_list
spear = locate(/obj/item/spear) in parts_list
/obj/structure/headpike/Initialize()
. = ..()

View File

@@ -8,7 +8,7 @@
//copypaste sorry
var/obj/item/storage/bag/trash/mybag
var/obj/item/mop/mymop
var/obj/item/twohanded/broom/mybroom
var/obj/item/broom/mybroom
var/obj/item/reagent_containers/spray/cleaner/myspray
var/obj/item/lightreplacer/myreplacer
var/signs = 0
@@ -48,9 +48,9 @@
m.janicart_insert(user, src)
else
to_chat(user, fail_msg)
else if(istype(I, /obj/item/twohanded/broom))
else if(istype(I, /obj/item/broom))
if(!mybroom)
var/obj/item/twohanded/broom/b=I
var/obj/item/broom/b=I
b.janicart_insert(user,src)
else
to_chat(user, fail_msg)