Merge branch 'master' into policy

This commit is contained in:
silicons
2020-07-02 01:23:19 -07:00
committed by GitHub
366 changed files with 7700 additions and 5598 deletions
@@ -91,7 +91,7 @@
var/mob/living/carbon/human/H = O
var/obj/item/clothing/shoes/S = H.shoes
if(S && S.bloody_shoes[blood_state])
if(color != bloodtype_to_color(S.last_bloodtype))
if(color != S.last_blood_color)
return
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
shoe_types |= S.type
@@ -104,7 +104,7 @@
var/mob/living/carbon/human/H = O
var/obj/item/clothing/shoes/S = H.shoes
if(S && S.bloody_shoes[blood_state])
if(color != bloodtype_to_color(S.last_bloodtype))//last entry - we check its color
if(color != S.last_blood_color)//last entry - we check its color
return
S.bloody_shoes[blood_state] = max(S.bloody_shoes[blood_state] - BLOOD_LOSS_PER_STEP, 0)
shoe_types |= S.type
+1 -2
View File
@@ -146,14 +146,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>")
@@ -451,7 +451,7 @@
lootcount = 1
spawn_on_turf = FALSE
//Note this is out of a 100 - Meaning the number you see is also the percent its going to pick that
//This is ment for "low" loot that anyone could fine in a toilet, for better gear use high loot toilet
//This is meant for "low" loot that anyone could find in a toilet, for better gear use high loot toilet
loot = list("" = 30,
/obj/item/lighter = 2,
/obj/item/tape/random = 1,
@@ -476,7 +476,7 @@
lootcount = 1
spawn_on_turf = FALSE
//Note this is out of a 100 - Meaning the number you see is also the percent its going to pick that
//This is ment for "prison" loot that is rather rare and ment for "prisoners if they get a crowbar to fine, or sec.
//This is meant for "prison" loot that is rather rare and meant for "prisoners if they get a crowbar to fine, or sec.
loot = list("" = 10,
/obj/item/lighter = 5,
/obj/item/poster/random_contraband = 5,
+1
View File
@@ -778,6 +778,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
..()
/obj/item/proc/microwave_act(obj/machinery/microwave/M)
SEND_SIGNAL(src, COMSIG_ITEM_MICROWAVE_ACT, M)
if(istype(M) && M.dirty < 100)
M.dirty++
+35 -29
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,26 @@
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()
/obj/item/rcl/ComponentInitialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
AddComponent(/datum/component/two_handed)
/obj/item/twohanded/rcl/attackby(obj/item/W, mob/user)
/// 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/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
@@ -86,26 +97,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 +124,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 +132,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 +141,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 +166,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 +174,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 +182,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 +215,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 +231,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 +249,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 +265,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 +296,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 +314,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"
+65
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
+69
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()
+93
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 ..()
@@ -61,6 +61,14 @@
name = "Experimental Clone Pod (Machine Board)"
build_path = /obj/machinery/clonepod/experimental
/obj/item/circuitboard/machine/sheetifier
name = "Sheet-meister 2000 (Machine Board)"
icon_state = "supply"
build_path = /obj/machinery/sheetifier
req_components = list(
/obj/item/stock_parts/manipulator = 2,
/obj/item/stock_parts/matter_bin = 2)
/obj/item/circuitboard/machine/abductor
name = "alien board (Report This)"
icon_state = "abductor_mod"
+1 -6
View File
@@ -737,12 +737,7 @@
to_chat(usr, "<span class='warning'>A color that dark on an object like this? Surely not...</span>")
return FALSE
if(istype(target, /obj/structure/window))
var/obj/structure/window/W = target
W.spraycan_paint(paint_color)
else
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
target.add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
. = use_charges(user, 2)
var/fraction = min(1, . / reagents.maximum_volume)
+50 -50
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()
@@ -684,14 +684,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)
@@ -703,7 +703,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
@@ -258,6 +258,9 @@ GLOBAL_LIST_INIT(channel_tokens, list(
name = "\proper mini Integrated Subspace Transceiver "
subspace_transmission = FALSE
/obj/item/radio/headset/silicon/pai/ComponentInitialize()
. = ..()
AddElement(/datum/element/empprotection, EMP_PROTECT_WIRES)
/obj/item/radio/headset/silicon/ai
name = "\proper Integrated Subspace Transceiver "
+353
View File
@@ -0,0 +1,353 @@
/*
* 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")
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
block_parry_data = /datum/block_parry_data/dual_esword
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
/datum/block_parry_data/dual_esword
block_damage_absorption = 2
block_damage_multiplier = 0.15
block_damage_multiplier_override = list(
ATTACK_TYPE_MELEE = 0.25
)
block_start_delay = 0 // instantaneous block
block_stamina_cost_per_second = 2.5
block_stamina_efficiency = 3
block_lock_sprinting = TRUE
// no attacking while blocking
block_lock_attacking = TRUE
block_projectile_mitigation = 75
parry_time_windup = 0
parry_time_active = 8
parry_time_spindown = 0
// we want to signal to players the most dangerous phase, the time when automatic counterattack is a thing.
parry_time_windup_visual_override = 1
parry_time_active_visual_override = 3
parry_time_spindown_visual_override = 4
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK // esword users can attack while parrying.
parry_time_perfect = 2 // first ds isn't perfect
parry_time_perfect_leeway = 1
parry_imperfect_falloff_percent = 10
parry_efficiency_to_counterattack = 100
parry_efficiency_considered_successful = 25 // VERY generous
parry_efficiency_perfect = 90
parry_failed_stagger_duration = 3 SECONDS
parry_failed_clickcd_duration = CLICK_CD_MELEE
// more efficient vs projectiles
block_stamina_efficiency_override = list(
TEXT_ATTACK_TYPE_PROJECTILE = 4
)
/obj/item/dualsaber/Initialize()
. = ..()
RegisterSignal(src, COMSIG_TWOHANDED_WIELD, .proc/on_wield)
RegisterSignal(src, COMSIG_TWOHANDED_UNWIELD, .proc/on_unwield)
/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)
item_flags |= (ITEM_CAN_BLOCK|ITEM_CAN_PARRY)
/// 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)
item_flags &= ~(ITEM_CAN_BLOCK|ITEM_CAN_PARRY)
/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)
+263
View File
@@ -0,0 +1,263 @@
/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
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)
block_parry_data = /datum/block_parry_data/electrostaff
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
// haha security desword time /s
/datum/block_parry_data/electrostaff
block_damage_absorption = 0
block_damage_multiplier = 1
can_block_attack_types = ~ATTACK_TYPE_PROJECTILE // only able to parry non projectiles
block_damage_multiplier_override = list(
TEXT_ATTACK_TYPE_MELEE = 0.5, // only useful on melee and unarmed
TEXT_ATTACK_TYPE_UNARMED = 0.3
)
block_start_delay = 0.5 // near instantaneous block
block_stamina_cost_per_second = 3
block_stamina_efficiency = 2 // haha this is a horrible idea
// more slowdown that deswords because security
block_slowdown = 2
// no attacking while blocking
block_lock_attacking = TRUE
parry_time_windup = 1
parry_time_active = 5
parry_time_spindown = 0
parry_time_spindown_visual_override = 1
parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK | PARRY_LOCK_ATTACKING // no attacking while parrying
parry_time_perfect = 0
parry_time_perfect_leeway = 0.5
parry_efficiency_perfect = 100
parry_imperfect_falloff_percent = 1
parry_imperfect_falloff_percent_override = list(
TEXT_ATTACK_TYPE_PROJECTILE = 45 // really crappy vs projectiles
)
parry_time_perfect_leeway_override = list(
TEXT_ATTACK_TYPE_PROJECTILE = 1 // extremely harsh window for projectiles
)
// not extremely punishing to fail, but no spamming the parry.
parry_cooldown = 2.5 SECONDS
parry_failed_stagger_duration = 1.5 SECONDS
parry_failed_clickcd_duration = 1 SECONDS
/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/proc/min_hitcost()
return min(stun_cost, lethal_cost)
/obj/item/electrostaff/proc/turn_on(obj/item/source, mob/user)
wielded = TRUE
item_flags |= (ITEM_CAN_BLOCK|ITEM_CAN_PARRY)
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
item_flags &= ~(ITEM_CAN_BLOCK|ITEM_CAN_PARRY)
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 to use [src] properly.</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 ..()
var/list/return_list = list()
if(target.mob_run_block(src, 0, "[user]'s [name]", ATTACK_TYPE_MELEE, 0, user, null, return_list) & 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, null, return_list))
user.do_attack_animation(target)
user.adjustStaminaLossBuffered(stun_stam_cost)
return
else if(!harm_act(target, user, null, return_list))
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, list/block_return = list())
var/stunforce = block_calculate_resultant_damage(stun_stamdmg, block_return)
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, list/block_return = list())
var/lethal_force = block_calculate_resultant_damage(lethal_damage, block_return)
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)
+71
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")
+1 -1
View File
@@ -510,7 +510,7 @@
oneuse = FALSE
remarks = list("So that is how icing is made!", "Placing fruit on top? How simple...", "Huh layering cake seems harder then this...", "This book smells like candy", "A clown must have made this page, or they forgot to spell check it before printing...", "Wait, a way to cook slime to be safe?")
/obj/item/book/granter/crafting_recipe/coldcooking //IceCream
/obj/item/book/granter/crafting_recipe/coldcooking //Icecream
name = "Cooking with Ice"
desc = "A cook book that teaches you many old icecream treats."
crafting_recipe_types = list(/datum/crafting_recipe/food/banana_split, /datum/crafting_recipe/food/root_float, /datum/crafting_recipe/food/bluecharrie_float, /datum/crafting_recipe/food/charrie_float)
+1 -1
View File
@@ -369,7 +369,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
+1 -1
View File
@@ -689,7 +689,7 @@
item_state = "mace_greyscale"
lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi'
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS //Material type changes the prefix as well as the color.
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS //Material type changes the prefix as well as the color.
custom_materials = list(/datum/material/iron = 12000) //Defaults to an Iron Mace.
slot_flags = ITEM_SLOT_BELT
force = 14
+101
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
@@ -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
+12 -14
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]"
+50 -25
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
+185
View File
@@ -0,0 +1,185 @@
//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("impact_pain_mult" = 3)
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
embedding = list(embed_chance = 75, pain_mult = 1.5) //plasmaglass spears are sharper
updateEmbedding()
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"
embedding = list(embed_chance = 0, pain_mult = 1)//elances should not be embeddable
updateEmbedding()
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")
-1
View File
@@ -17,7 +17,6 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
throw_speed = 3
throw_range = 7
custom_materials = list(/datum/material/iron=1000)
mats_per_stack = 1000
max_amount = 50
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
@@ -39,9 +39,11 @@ GLOBAL_LIST_INIT(sandstone_recipes, list ( \
item_state = "sheet-sandstone"
throw_speed = 3
throw_range = 5
custom_materials = list(/datum/material/glass=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/sandstone=MINERAL_MATERIAL_AMOUNT)
sheettype = "sandstone"
merge_type = /obj/item/stack/sheet/mineral/sandstone
walltype = /turf/closed/wall/mineral/sandstone
material_type = /datum/material/sandstone
/obj/item/stack/sheet/mineral/sandstone/get_main_recipes()
. = ..()
@@ -107,6 +109,7 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
point_value = 25
merge_type = /obj/item/stack/sheet/mineral/diamond
material_type = /datum/material/diamond
walltype = /turf/closed/wall/mineral/diamond
GLOBAL_LIST_INIT(diamond_recipes, list ( \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
@@ -135,6 +138,7 @@ GLOBAL_LIST_INIT(diamond_recipes, list ( \
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/uranium
material_type = /datum/material/uranium
walltype = /turf/closed/wall/mineral/uranium
GLOBAL_LIST_INIT(uranium_recipes, list ( \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
@@ -163,6 +167,7 @@ GLOBAL_LIST_INIT(uranium_recipes, list ( \
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/plasma
material_type = /datum/material/plasma
walltype = /turf/closed/wall/mineral/plasma
/obj/item/stack/sheet/mineral/plasma/suicide_act(mob/living/carbon/user)
user.visible_message("<span class='suicide'>[user] begins licking \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
@@ -205,6 +210,7 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/gold
material_type = /datum/material/gold
walltype = /turf/closed/wall/mineral/gold
GLOBAL_LIST_INIT(gold_recipes, list ( \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
@@ -236,6 +242,7 @@ GLOBAL_LIST_INIT(gold_recipes, list ( \
merge_type = /obj/item/stack/sheet/mineral/silver
material_type = /datum/material/silver
tableVariant = /obj/structure/table/optable
walltype = /turf/closed/wall/mineral/silver
GLOBAL_LIST_INIT(silver_recipes, list ( \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
@@ -266,6 +273,7 @@ GLOBAL_LIST_INIT(silver_recipes, list ( \
point_value = 50
merge_type = /obj/item/stack/sheet/mineral/bananium
material_type = /datum/material/bananium
walltype = /turf/closed/wall/mineral/bananium
GLOBAL_LIST_INIT(bananium_recipes, list ( \
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
@@ -294,6 +302,7 @@ GLOBAL_LIST_INIT(bananium_recipes, list ( \
point_value = 20
merge_type = /obj/item/stack/sheet/mineral/titanium
material_type = /datum/material/titanium
walltype = /turf/closed/wall/mineral/titanium
GLOBAL_LIST_INIT(titanium_recipes, list ( \
new/datum/stack_recipe("titanium tile", /obj/item/stack/tile/mineral/titanium, 1, 4, 20), \
@@ -324,6 +333,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \
custom_materials = list(/datum/material/titanium=MINERAL_MATERIAL_AMOUNT, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
point_value = 45
merge_type = /obj/item/stack/sheet/mineral/plastitanium
walltype = /turf/closed/wall/mineral/plastitanium
/obj/item/stack/sheet/mineral/plastitanium/fifty
amount = 50
@@ -390,11 +400,14 @@ GLOBAL_LIST_INIT(adamantine_recipes, list(
name = "snow"
icon_state = "sheet-snow"
item_state = "sheet-snow"
custom_materials = list(/datum/material/snow = MINERAL_MATERIAL_AMOUNT)
singular_name = "snow block"
force = 1
throwforce = 2
grind_results = list(/datum/reagent/consumable/ice = 20)
merge_type = /obj/item/stack/sheet/mineral/snow
walltype = /turf/closed/wall/mineral/snow
material_type = /datum/material/snow
GLOBAL_LIST_INIT(snow_recipes, list ( \
new/datum/stack_recipe("Snow Wall", /turf/closed/wall/mineral/snow, 5, one_per_turf = 1, on_floor = 1), \
@@ -417,6 +430,7 @@ GLOBAL_LIST_INIT(snow_recipes, list ( \
singular_name = "alien alloy sheet"
sheettype = "abductor"
merge_type = /obj/item/stack/sheet/mineral/abductor
walltype = /turf/closed/wall/mineral/abductor
GLOBAL_LIST_INIT(abductor_recipes, list ( \
new/datum/stack_recipe("alien bed", /obj/structure/bed/abductor, 2, one_per_turf = 1, on_floor = 1), \
@@ -205,7 +205,7 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \
desc = "This sheet is an alloy of iron and plasma."
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
custom_materials = list(/datum/material/iron=2000, /datum/material/plasma=2000)
custom_materials = list(/datum/material/iron=MINERAL_MATERIAL_AMOUNT, /datum/material/plasma=MINERAL_MATERIAL_AMOUNT)
throwforce = 10
flags_1 = CONDUCT_1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 80)
@@ -289,6 +289,7 @@ GLOBAL_LIST_INIT(wood_recipes, list ( \
novariants = TRUE
material_type = /datum/material/wood
grind_results = list(/datum/reagent/carbon = 20)
walltype = /turf/closed/wall/mineral/wood
/obj/item/stack/sheet/mineral/wood/attackby(obj/item/W, mob/user, params) // NOTE: sheet_types.dm is where the WOOD stack lives. Maybe move this over there.
// Taken from /obj/item/stack/rods/attackby in [rods.dm]
@@ -344,11 +345,13 @@ GLOBAL_LIST_INIT(bamboo_recipes, list ( \
icon_state = "sheet-bamboo"
item_state = "sheet-bamboo"
icon = 'icons/obj/stack_objects.dmi'
custom_materials = list(/datum/material/bamboo = MINERAL_MATERIAL_AMOUNT)
throwforce = 15
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 0)
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/mineral/bamboo
grind_results = list(/datum/reagent/carbon = 5)
material_type = /datum/material/bamboo
/obj/item/stack/sheet/mineral/bamboo/get_main_recipes()
. = ..()
@@ -513,12 +516,14 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
desc = "Large sheets of card, like boxes folded flat."
singular_name = "cardboard sheet"
icon_state = "sheet-card"
custom_materials = list(/datum/material/cardboard = MINERAL_MATERIAL_AMOUNT)
item_state = "sheet-card"
resistance_flags = FLAMMABLE
force = 0
throwforce = 0
merge_type = /obj/item/stack/sheet/cardboard
novariants = TRUE
material_type = /datum/material/cardboard
/obj/item/stack/sheet/cardboard/get_main_recipes()
. = ..()
@@ -558,10 +563,12 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \
icon_state = "sheet-runed"
item_state = "sheet-runed"
icon = 'icons/obj/stack_objects.dmi'
custom_materials = list(/datum/material/runedmetal = MINERAL_MATERIAL_AMOUNT)
sheettype = "runed"
merge_type = /obj/item/stack/sheet/runed_metal
novariants = TRUE
grind_results = list(/datum/reagent/iron = 5, /datum/reagent/blood = 15)
material_type = /datum/material/runedmetal
/obj/item/stack/sheet/runed_metal/ratvar_act()
new /obj/item/stack/tile/brass(loc, amount)
@@ -680,6 +687,7 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
icon_state = "sheet-brass"
item_state = "sheet-brass"
icon = 'icons/obj/stack_objects.dmi'
custom_materials = list(/datum/material/bronze = MINERAL_MATERIAL_AMOUNT)
resistance_flags = FIRE_PROOF | ACID_PROOF
throwforce = 10
max_amount = 50
@@ -690,6 +698,7 @@ GLOBAL_LIST_INIT(bronze_recipes, list ( \
grind_results = list(/datum/reagent/iron = 5, /datum/reagent/copper = 3) //we have no "tin" reagent so this is the closest thing
merge_type = /obj/item/stack/tile/bronze
tableVariant = /obj/structure/table/bronze
material_type = /datum/material/bronze
/obj/item/stack/tile/bronze/attack_self(mob/living/user)
if(is_servant_of_ratvar(user)) //still lets them build with it, just gives a message
@@ -737,6 +746,7 @@ GLOBAL_LIST_INIT(bone_recipes, list(
icon = 'icons/obj/mining.dmi'
icon_state = "bone"
item_state = "sheet-bone"
custom_materials = list(/datum/material/bone = MINERAL_MATERIAL_AMOUNT)
singular_name = "bone"
desc = "Someone's been drinking their milk."
force = 7
@@ -747,6 +757,7 @@ GLOBAL_LIST_INIT(bone_recipes, list(
throw_range = 3
grind_results = list(/datum/reagent/carbon = 10)
merge_type = /obj/item/stack/sheet/bone
material_type = /datum/material/bone
/obj/item/stack/sheet/bone/get_main_recipes()
. = ..()
@@ -774,6 +785,7 @@ GLOBAL_LIST_INIT(plastic_recipes, list(
custom_materials = list(/datum/material/plastic=MINERAL_MATERIAL_AMOUNT)
throwforce = 7
grind_results = list(/datum/reagent/glitter/white = 60)
material_type = /datum/material/plastic
merge_type = /obj/item/stack/sheet/plastic
/obj/item/stack/sheet/plastic/fifty
@@ -799,9 +811,11 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
singular_name = "paper frame"
icon_state = "sheet-paper"
item_state = "sheet-paper"
custom_materials = list(/datum/material/paper = MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/paperframes
resistance_flags = FLAMMABLE
merge_type = /obj/item/stack/sheet/paperframes
material_type = /datum/material/paper
/obj/item/stack/sheet/paperframes/get_main_recipes()
. = ..()
@@ -842,3 +856,55 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra
merge_type = /obj/item/stack/sheet/cotton/durathread
pull_effort = 70
loom_result = /obj/item/stack/sheet/durathread
/obj/item/stack/sheet/meat
name = "meat sheets"
desc = "Something's bloody meat compressed into a nice solid sheet"
singular_name = "meat sheet"
icon_state = "sheet-meat"
material_flags = MATERIAL_COLOR
custom_materials = list(/datum/material/meat = MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/meat
material_type = /datum/material/meat
material_modifier = 1 //None of that wussy stuff
/obj/item/stack/sheet/meat/fifty
amount = 50
/obj/item/stack/sheet/meat/twenty
amount = 20
/obj/item/stack/sheet/meat/five
amount = 5
/obj/item/stack/sheet/pizza
name = "pepperoni sheetzzas"
desc = "It's a delicious pepperoni sheetzza!"
singular_name = "pepperoni sheetzza"
icon_state = "sheet-pizza"
custom_materials = list(/datum/material/pizza = MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/pizza
material_type = /datum/material/pizza
material_modifier = 1
/obj/item/stack/sheet/pizza/fifty
amount = 50
/obj/item/stack/sheet/pizza/twenty
amount = 20
/obj/item/stack/sheet/pizza/five
amount = 5
/obj/item/stack/sheet/sandblock
name = "blocks of sand"
desc = "You're too old to be playing with sandcastles. Now you build... sandstations."
singular_name = "block of sand"
icon_state = "sheet-sandstone"
custom_materials = list(/datum/material/sand = MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/sandblock
material_type = /datum/material/sand
material_modifier = 1
/obj/item/stack/sheet/sandblock/fifty
amount = 50
/obj/item/stack/sheet/sandblock/twenty
amount = 20
/obj/item/stack/sheet/sandblock/five
amount = 5
@@ -10,10 +10,14 @@
throw_range = 3
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
novariants = FALSE
mats_per_stack = MINERAL_MATERIAL_AMOUNT
var/sheettype = null //this is used for girders in the creation of walls/false walls
var/point_value = 0 //turn-in value for the gulag stacker - loosely relative to its rarity
var/shard_type // the shard debris typepath left over by solar panels and windows etc.
///this is used for girders in the creation of walls/false walls
var/sheettype = null
///turn-in value for the gulag stacker - loosely relative to its rarity
var/point_value = 0
/// the shard debris typepath left over by solar panels and windows etc.
var/shard_type
///What type of wall does this sheet spawn
var/walltype
/obj/item/stack/sheet/Initialize(mapload, new_amount, merge)
. = ..()
+18 -11
View File
@@ -22,7 +22,7 @@
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
var/full_w_class = WEIGHT_CLASS_NORMAL //The weight class the stack should have at amount > 2/3rds max_amount
var/novariants = TRUE //Determines whether the item should update it's sprites based on amount.
var/mats_per_stack = 0
var/list/mats_per_unit //list that tells you how much is in a single unit.
///Datum material type that this stack is made of
var/material_type
//NOTE: When adding grind_results, the amounts should be for an INDIVIDUAL ITEM - these amounts will be multiplied by the stack size in on_grind()
@@ -47,8 +47,11 @@
if(!merge_type)
merge_type = type
if(custom_materials && custom_materials.len)
mats_per_unit = list()
var/in_process_mat_list = custom_materials.Copy()
for(var/i in custom_materials)
custom_materials[SSmaterials.GetMaterialRef(i)] = mats_per_stack * amount
mats_per_unit[SSmaterials.GetMaterialRef(i)] = in_process_mat_list[i]
custom_materials[i] *= amount
. = ..()
if(merge)
for(var/obj/item/stack/S in loc)
@@ -60,7 +63,7 @@
var/datum/material/M = SSmaterials.GetMaterialRef(material_type) //First/main material
for(var/i in M.categories)
switch(i)
if(MAT_CATEGORY_RIGID)
if(MAT_CATEGORY_BASE_RECIPES)
var/list/temp = SSmaterials.rigid_stack_recipes.Copy()
recipes += temp
update_weight()
@@ -315,10 +318,13 @@
if (amount < used)
return FALSE
amount -= used
if(check)
zero_amount()
for(var/i in custom_materials)
custom_materials[i] = amount * mats_per_stack
if(check && zero_amount())
return TRUE
if(length(mats_per_unit))
var/temp_materials = custom_materials.Copy()
for(var/i in mats_per_unit)
temp_materials[i] = mats_per_unit[i] * src.amount
set_custom_materials(temp_materials)
update_icon()
update_weight()
return TRUE
@@ -350,10 +356,11 @@
source.add_charge(amount * cost)
else
src.amount += amount
if(custom_materials && custom_materials.len)
for(var/i in custom_materials)
custom_materials[SSmaterials.GetMaterialRef(i)] = MINERAL_MATERIAL_AMOUNT * src.amount
set_custom_materials() //Refresh
if(length(mats_per_unit))
var/temp_materials = custom_materials.Copy()
for(var/i in mats_per_unit)
temp_materials[i] = mats_per_unit[i] * src.amount
set_custom_materials(temp_materials)
update_icon()
update_weight()
@@ -9,16 +9,35 @@
throw_speed = 3
throw_range = 7
max_amount = 60
mats_per_stack = 500
var/turf_type = null
var/mineralType = null
novariants = TRUE
var/human_maxHealth = 100
/obj/item/stack/tile/Initialize(mapload, amount)
. = ..()
pixel_x = rand(-3, 3)
pixel_y = rand(-3, 3) //randomize a little
/obj/item/stack/tile/examine(mob/user)
. = ..()
if(throwforce && !is_cyborg) //do not want to divide by zero or show the message to borgs who can't throw
var/verb
switch(CEILING(human_maxHealth / throwforce, 1)) //throws to crit a human
if(1 to 3)
verb = "superb"
if(4 to 6)
verb = "great"
if(7 to 9)
verb = "good"
if(10 to 12)
verb = "fairly decent"
if(13 to 15)
verb = "mediocre"
if(!verb)
return
. += "<span class='notice'>Those could work as a [verb] throwing weapon.</span>"
/obj/item/stack/tile/attackby(obj/item/W, mob/user, params)
if (istype(W, /obj/item/weldingtool))
@@ -470,7 +489,7 @@
/obj/item/stack/tile/plasteel
name = "floor tile"
singular_name = "floor tile"
desc = "Those could work as a pretty decent throwing weapon."
desc = "The ground you walk on."
icon_state = "tile"
force = 6
custom_materials = list(/datum/material/iron=500)
@@ -482,7 +501,15 @@
resistance_flags = FIRE_PROOF
/obj/item/stack/tile/plasteel/cyborg
desc = "The ground you walk on." //Not the usual floor tile desc as that refers to throwing, Cyborgs can't do that - RR
custom_materials = null // All other Borg versions of items have no Metal or Glass - RR
is_cyborg = 1
cost = 125
/obj/item/stack/tile/material
name = "floor tile"
singular_name = "floor tile"
desc = "The ground you walk on."
throwforce = 10
icon_state = "material_tile"
turf_type = /turf/open/floor/material
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
+19 -1
View File
@@ -444,4 +444,22 @@
STR.max_combined_w_class = 30
STR.max_items = 3
STR.display_numerical_stacking = FALSE
STR.can_hold = typecacheof(list(/obj/item/ammo_box/magazine, /obj/item/ammo_casing))
STR.can_hold = typecacheof(list(/obj/item/ammo_box/magazine, /obj/item/ammo_casing))
/obj/item/storage/bag/material
name = "material pouch"
desc = "A pouch for sheets and RCD ammunition that manages to hang where you would normally put things in your pocket."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "materialpouch"
slot_flags = ITEM_SLOT_POCKET
w_class = WEIGHT_CLASS_BULKY
resistance_flags = FLAMMABLE
/obj/item/storage/bag/material/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.max_w_class = WEIGHT_CLASS_NORMAL
STR.max_combined_w_class = INFINITY
STR.max_items = 2
STR.display_numerical_stacking = TRUE
STR.can_hold = typecacheof(list(/obj/item/rcd_ammo, /obj/item/stack/sheet))
+1 -1
View File
@@ -586,7 +586,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,
+2 -2
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)
+2 -2
View File
@@ -106,10 +106,10 @@
/obj/item/storage/briefcase/medical
name = "medical briefcase"
icon_state = "medbriefcase"
desc = "A white with a blue cross brieface, this is ment to hold medical gear that would not be able to normally fit in a bag."
desc = "A white with a blue cross brieface, this is meant to hold medical gear that would not be able to normally fit in a bag."
/obj/item/storage/briefcase/medical/PopulateContents()
new /obj/item/clothing/neck/stethoscope(src)
new /obj/item/healthanalyzer(src)
..() //In case of paperwork
..() //Incase of paperwork
@@ -370,6 +370,14 @@
for(var/i in 1 to 7)
new /obj/item/reagent_containers/pill/breast_enlargement(src)
/obj/item/storage/pill_bottle/neurine
name = "bottle of neurine pills"
desc = "Contains pills to treat non-severe mental traumas."
/obj/item/storage/pill_bottle/neurine/PopulateContents()
for(var/i in 1 to 5)
new /obj/item/reagent_containers/pill/neurine(src)
/////////////
//Organ Box//
/////////////
+1 -1
View File
@@ -25,7 +25,7 @@ GLOBAL_LIST_EMPTY(rubber_toolbox_icons)
icon_state = "toolbox_default"
item_state = "toolbox_default"
can_rubberify = FALSE
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
/obj/item/storage/toolbox/Initialize(mapload)
if(has_latches)
@@ -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)
+17 -13
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,41 +437,46 @@
/*
* 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
block_parry_data = null
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
@@ -823,12 +828,11 @@
var/obj/item/toy/cards/singlecard/H = new/obj/item/toy/cards/singlecard(user.loc)
if(holo)
holo.spawned += H // track them leaving the holodeck
choice = cards[1]
choice = popleft(cards)
H.cardname = choice
H.parentdeck = src
var/O = src
H.apply_card_vars(H,O)
src.cards -= choice
H.pickup(user)
user.put_in_hands(H)
user.visible_message("[user] draws a card from the deck.", "<span class='notice'>You draw a card from the deck.</span>")
File diff suppressed because it is too large Load Diff
+58 -2
View File
@@ -263,7 +263,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))
@@ -475,7 +475,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)
@@ -759,3 +759,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
@@ -155,7 +155,7 @@
///Material chair
/obj/structure/chair/greyscale
icon_state = "chair_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
item_chair = /obj/item/chair/greyscale
buildstacktype = null //Custom mats handle this
@@ -384,7 +384,7 @@
/obj/item/chair/greyscale
icon_state = "chair_greyscale_toppled"
item_state = "chair_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
origin_type = /obj/structure/chair/greyscale
/obj/item/chair/stool
@@ -273,8 +273,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)
+3 -3
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
+8 -7
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,24 +300,25 @@
throw_speed = 2
throw_range = 4
/obj/item/twohanded/required/kirbyplants/Initialize()
/obj/item/kirbyplants/ComponentInitialize()
. = ..()
AddElement(/datum/element/tactical)
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 500)), 0)
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
@@ -329,12 +330,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"
+10 -4
View File
@@ -170,7 +170,7 @@
qdel(src)
return
if(S.sheettype && S.sheettype != "runed")
if(S.sheettype != "runed")
var/M = S.sheettype
if(state == GIRDER_DISPLACED)
var/F = text2path("/obj/structure/falsewall/[M]")
@@ -188,9 +188,13 @@
transfer_fingerprints_to(FW)
qdel(src)
else
var/F = text2path("/turf/closed/wall/mineral/[M]")
var/list/material_list
var/F = S.walltype
if(!F)
return
F = /turf/closed/wall/material
if(S.material_type)
material_list = list()
material_list[SSmaterials.GetMaterialRef(S.material_type)] = MINERAL_MATERIAL_AMOUNT * 2
if(S.get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two sheets to add plating!</span>")
return
@@ -201,7 +205,9 @@
S.use(2)
to_chat(user, "<span class='notice'>You add the plating.</span>")
var/turf/T = get_turf(src)
T.PlaceOnTop(F)
var/turf/newturf = T.PlaceOnTop(F)
if(material_list)
newturf.set_custom_materials(material_list)
transfer_fingerprints_to(T)
qdel(src)
return
+3 -3
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()
. = ..()
+3 -3
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)
+3 -1
View File
@@ -134,6 +134,8 @@
if(!ishuman(pushed_mob))
return
var/mob/living/carbon/human/H = pushed_mob
if(iscatperson(H))
H.emote("nya")
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table)
/obj/structure/table/shove_act(mob/living/target, mob/living/user)
@@ -218,7 +220,7 @@
/obj/structure/table/greyscale
icon = 'icons/obj/smooth_structures/table_greyscale.dmi'
icon_state = "table"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS | MATERIAL_EFFECTS
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR | MATERIAL_AFFECT_STATISTICS
buildstack = null //No buildstack, so generate from mat datums
///Table on wheels
+8 -7
View File
@@ -157,7 +157,6 @@
secret_type = /obj/effect/spawner/lootdrop/prison_loot_toilet
/obj/structure/toilet/greyscale
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
buildstacktype = null
@@ -582,6 +581,12 @@
G.use(1)
return
if(istype(O, /obj/item/stack/ore/glass))
new /obj/item/stack/sheet/sandblock(loc)
to_chat(user, "<span class='notice'>You wet the sand in the sink and form it into a block.</span>")
O.use(1)
return
if(!istype(O))
return
if(O.item_flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
@@ -673,7 +678,7 @@
if(steps == 4 && istype(S, /obj/item/stack/sheet/mineral/wood))
if(S.use(3))
steps = 5
desc = "A dug out well, A dug out well with out rope. Just add some cloth!"
desc = "A dug out well, A dug out well without rope. Just add some cloth!"
icon_state = "well_4"
return TRUE
else
@@ -702,11 +707,6 @@
icon_state = "puddle"
resistance_flags = UNACIDABLE
/obj/structure/sink/greyscale
icon_state = "sink_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
buildstacktype = null
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/structure/sink/puddle/attack_hand(mob/M)
icon_state = "puddle-splash"
@@ -722,6 +722,7 @@
qdel(src)
/obj/structure/sink/greyscale
icon_state = "sink_greyscale"
material_flags = MATERIAL_ADD_PREFIX | MATERIAL_COLOR
buildstacktype = null
+12 -16
View File
@@ -271,29 +271,27 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
air_update_turf(TRUE)
update_nearby_icons()
/obj/structure/window/proc/spraycan_paint(paint_color)
if(color_hex2num(paint_color) < 255)
set_opacity(255)
else
set_opacity(initial(opacity))
add_atom_colour(paint_color, WASHABLE_COLOUR_PRIORITY)
/obj/structure/window/proc/electrochromatic_dim()
if(electrochromatic_status == ELECTROCHROMATIC_DIMMED)
return
electrochromatic_status = ELECTROCHROMATIC_DIMMED
animate(src, color = "#222222", time = 2)
set_opacity(TRUE)
var/current = color
add_atom_colour("#222222", FIXED_COLOUR_PRIORITY)
var/newcolor = color
if(color != current)
color = current
animate(src, color = newcolor, time = 2)
/obj/structure/window/proc/electrochromatic_off()
if(electrochromatic_status == ELECTROCHROMATIC_OFF)
return
electrochromatic_status = ELECTROCHROMATIC_OFF
var/current = color
update_atom_colour()
remove_atom_colour(FIXED_COLOUR_PRIORITY, "#222222")
var/newcolor = color
color = current
animate(src, color = newcolor, time = 2)
if(color != current)
color = current
animate(src, color = newcolor, time = 2)
/obj/structure/window/proc/remove_electrochromatic()
electrochromatic_off()
@@ -348,11 +346,9 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
GLOB.electrochromatic_window_lookup[electrochromatic_id] |= src
/obj/structure/window/update_atom_colour()
if((electrochromatic_status != ELECTROCHROMATIC_OFF) && (electrochromatic_status != ELECTROCHROMATIC_DIMMED))
return FALSE
. = ..()
if(color && (color_hex2num(color) < 255))
set_opacity(255)
if(electrochromatic_status == ELECTROCHROMATIC_DIMMED || (color && (color_hex2num(color) < 255)))
set_opacity(TRUE)
else
set_opacity(FALSE)