Merge branch 'master' into cool-ipcs
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
var/buckle_prevents_pull = FALSE
|
||||
|
||||
//Interaction
|
||||
/atom/movable/attack_hand(mob/living/user)
|
||||
/atom/movable/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -145,3 +145,13 @@
|
||||
var/mob/living/L = M.pulledby
|
||||
L.set_pull_offsets(M, L.grab_state)
|
||||
return M
|
||||
|
||||
/atom/movable/proc/precise_user_unbuckle_mob(mob/user)
|
||||
if(!buckled_mobs)
|
||||
return
|
||||
else if(length(buckled_mobs) == 1)
|
||||
return user_unbuckle_mob(buckled_mobs[1], user)
|
||||
else
|
||||
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
|
||||
return user_unbuckle_mob(unbuckled, user)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
anchored = TRUE
|
||||
light_range = 3
|
||||
var/movechance = 70
|
||||
var/obj/item/assembly/signaler/anomaly/aSignal
|
||||
var/obj/item/assembly/signaler/anomaly/aSignal = /obj/item/assembly/signaler/anomaly
|
||||
var/area/impact_area
|
||||
|
||||
var/lifespan = 990
|
||||
@@ -23,8 +23,10 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
impact_area = get_area(src)
|
||||
|
||||
aSignal = new(src)
|
||||
aSignal.name = "[name] core"
|
||||
if (!impact_area)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
aSignal = new aSignal(src)
|
||||
aSignal.code = rand(1,100)
|
||||
aSignal.anomaly_type = type
|
||||
|
||||
@@ -75,7 +77,7 @@
|
||||
|
||||
|
||||
/obj/effect/anomaly/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/analyzer))
|
||||
if(I.tool_behaviour == TOOL_ANALYZER) //revert if runtimed
|
||||
to_chat(user, "<span class='notice'>Analyzing... [src]'s unstable field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code].</span>")
|
||||
|
||||
///////////////////////
|
||||
@@ -85,6 +87,7 @@
|
||||
icon_state = "shield2"
|
||||
density = FALSE
|
||||
var/boing = 0
|
||||
aSignal = /obj/item/assembly/signaler/anomaly/grav
|
||||
|
||||
/obj/effect/anomaly/grav/anomalyEffect()
|
||||
..()
|
||||
@@ -95,17 +98,23 @@
|
||||
for(var/mob/living/M in range(0, src))
|
||||
gravShock(M)
|
||||
for(var/mob/living/M in orange(4, src))
|
||||
step_towards(M,src)
|
||||
if(!M.mob_negates_gravity()) //delete when runtimed
|
||||
step_towards(M,src)
|
||||
for(var/obj/O in range(0,src))
|
||||
if(!O.anchored)
|
||||
//if(isturf(O.loc))
|
||||
// var/turf/T = O.loc
|
||||
// if(T.intact && HAS_TRAIT(O, TRAIT_T_RAY_VISIBLE))
|
||||
// continue
|
||||
var/mob/living/target = locate() in view(4,src)
|
||||
if(target && !target.stat)
|
||||
O.throw_at(target, 5, 10)
|
||||
|
||||
/obj/effect/anomaly/grav/Crossed(mob/A)
|
||||
gravShock(A)
|
||||
/obj/effect/anomaly/grav/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
gravShock(AM)
|
||||
|
||||
/obj/effect/anomaly/grav/Bump(mob/A)
|
||||
/obj/effect/anomaly/grav/Bump(atom/A)
|
||||
gravShock(A)
|
||||
|
||||
/obj/effect/anomaly/grav/Bumped(atom/movable/AM)
|
||||
@@ -138,6 +147,7 @@
|
||||
name = "flux wave anomaly"
|
||||
icon_state = "electricity2"
|
||||
density = TRUE
|
||||
aSignal = /obj/item/assembly/signaler/anomaly/flux
|
||||
var/canshock = FALSE
|
||||
var/shockdamage = 20
|
||||
var/explosive = TRUE
|
||||
@@ -148,11 +158,12 @@
|
||||
for(var/mob/living/M in range(0, src))
|
||||
mobShock(M)
|
||||
|
||||
/obj/effect/anomaly/flux/Crossed(mob/living/M)
|
||||
mobShock(M)
|
||||
/obj/effect/anomaly/flux/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
mobShock(AM)
|
||||
|
||||
/obj/effect/anomaly/flux/Bump(mob/living/M)
|
||||
mobShock(M)
|
||||
/obj/effect/anomaly/flux/Bump(atom/A)
|
||||
mobShock(A)
|
||||
|
||||
/obj/effect/anomaly/flux/Bumped(atom/movable/AM)
|
||||
mobShock(AM)
|
||||
@@ -160,7 +171,7 @@
|
||||
/obj/effect/anomaly/flux/proc/mobShock(mob/living/M)
|
||||
if(canshock && istype(M))
|
||||
canshock = FALSE //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
|
||||
M.electrocute_act(shockdamage, "[name]", flags = SHOCK_NOGLOVES)
|
||||
M.electrocute_act(shockdamage, name, flags = SHOCK_NOGLOVES)
|
||||
|
||||
/obj/effect/anomaly/flux/detonate()
|
||||
if(explosive)
|
||||
@@ -176,6 +187,7 @@
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "bluespace"
|
||||
density = TRUE
|
||||
aSignal = /obj/item/assembly/signaler/anomaly/bluespace
|
||||
|
||||
/obj/effect/anomaly/bluespace/anomalyEffect()
|
||||
..()
|
||||
@@ -187,7 +199,7 @@
|
||||
do_teleport(AM, locate(AM.x, AM.y, AM.z), 8, channel = TELEPORT_CHANNEL_BLUESPACE)
|
||||
|
||||
/obj/effect/anomaly/bluespace/detonate()
|
||||
var/turf/T = safepick(get_area_turfs(impact_area))
|
||||
var/turf/T = pick(get_area_turfs(impact_area))
|
||||
if(T)
|
||||
// Calculate new position (searches through beacons in world)
|
||||
var/obj/item/beacon/chosen
|
||||
@@ -224,21 +236,23 @@
|
||||
if(!A.Move(newloc) && newloc) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
|
||||
A.forceMove(newloc)
|
||||
|
||||
spawn()
|
||||
if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect
|
||||
var/mob/M = A
|
||||
if(M.client)
|
||||
var/obj/blueeffect = new /obj(src)
|
||||
blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
blueeffect.icon = 'icons/effects/effects.dmi'
|
||||
blueeffect.icon_state = "shieldsparkles"
|
||||
blueeffect.layer = FLASH_LAYER
|
||||
blueeffect.plane = FULLSCREEN_PLANE
|
||||
blueeffect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
M.client.screen += blueeffect
|
||||
sleep(20)
|
||||
M.client.screen -= blueeffect
|
||||
qdel(blueeffect)
|
||||
if(ismob(A) && !(A in flashers)) // don't flash if we're already doing an effect
|
||||
var/mob/M = A
|
||||
if(M.client)
|
||||
INVOKE_ASYNC(src, .proc/blue_effect, M)
|
||||
|
||||
/obj/effect/anomaly/bluespace/proc/blue_effect(mob/M)
|
||||
var/obj/blueeffect = new /obj(src)
|
||||
blueeffect.screen_loc = "WEST,SOUTH to EAST,NORTH"
|
||||
blueeffect.icon = 'icons/effects/effects.dmi'
|
||||
blueeffect.icon_state = "shieldsparkles"
|
||||
blueeffect.layer = FLASH_LAYER
|
||||
blueeffect.plane = FULLSCREEN_PLANE
|
||||
blueeffect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
M.client.screen += blueeffect
|
||||
sleep(20)
|
||||
M.client.screen -= blueeffect
|
||||
qdel(blueeffect)
|
||||
|
||||
/////////////////////
|
||||
|
||||
@@ -246,6 +260,7 @@
|
||||
name = "pyroclastic anomaly"
|
||||
icon_state = "mustard"
|
||||
var/ticks = 0
|
||||
aSignal = /obj/item/assembly/signaler/anomaly/pyro
|
||||
|
||||
/obj/effect/anomaly/pyro/anomalyEffect()
|
||||
..()
|
||||
@@ -278,6 +293,7 @@
|
||||
name = "vortex anomaly"
|
||||
icon_state = "bhole3"
|
||||
desc = "That's a nice station you have there. It'd be a shame if something happened to it."
|
||||
aSignal = /obj/item/assembly/signaler/anomaly/vortex
|
||||
|
||||
/obj/effect/anomaly/bhole/anomalyEffect()
|
||||
..()
|
||||
|
||||
@@ -101,10 +101,7 @@
|
||||
to_chat(user, "<span class='notice'>You carefully remove the poster from the wall.</span>")
|
||||
roll_and_drop(user.loc)
|
||||
|
||||
/obj/structure/sign/poster/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/structure/sign/poster/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(ruined)
|
||||
return
|
||||
visible_message("[user] rips [src] in a single, decisive motion!" )
|
||||
@@ -212,6 +209,11 @@
|
||||
desc = "A heretical poster depicting the titular star of an equally heretical book."
|
||||
icon_state = "poster4"
|
||||
|
||||
/obj/structure/sign/poster/contraband/post_ratvar
|
||||
name = "Post This Ratvar"
|
||||
desc = "Oh what in the hell? Those cultists have animated paper technology and they use it for a meme?"
|
||||
icon_state = "postvar"
|
||||
|
||||
/obj/structure/sign/poster/contraband/syndicate_recruitment
|
||||
name = "Syndicate Recruitment"
|
||||
desc = "See the galaxy! Shatter corrupt megacorporations! Join today!"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -137,10 +137,7 @@
|
||||
random_icon_states = list("vomit_1", "vomit_2", "vomit_3", "vomit_4")
|
||||
beauty = -150
|
||||
|
||||
/obj/effect/decal/cleanable/vomit/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/effect/decal/cleanable/vomit/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(isflyperson(H))
|
||||
|
||||
@@ -40,12 +40,11 @@
|
||||
if(hotspot && istype(T) && T.air)
|
||||
qdel(hotspot)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
var/plas_amt = min(30,G.gases[/datum/gas/plasma]) //Absorb some plasma
|
||||
G.gases[/datum/gas/plasma] -= plas_amt
|
||||
var/plas_amt = min(30,G.get_moles(/datum/gas/plasma)) //Absorb some plasma
|
||||
G.adjust_moles(/datum/gas/plasma,-plas_amt)
|
||||
absorbed_plasma += plas_amt
|
||||
if(G.temperature > T20C)
|
||||
G.temperature = max(G.temperature/2,T20C)
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
if(G.return_temperature() > T20C)
|
||||
G.set_temperature(max(G.return_temperature()/2,T20C))
|
||||
T.air_update_turf()
|
||||
|
||||
/obj/effect/particle_effect/foam/firefighting/kill_foam()
|
||||
@@ -269,6 +268,8 @@
|
||||
gender = PLURAL
|
||||
max_integrity = 20
|
||||
CanAtmosPass = ATMOS_PASS_DENSITY
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
|
||||
/obj/structure/foamedmetal/Initialize()
|
||||
. = ..()
|
||||
@@ -285,11 +286,7 @@
|
||||
/obj/structure/foamedmetal/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
|
||||
/obj/structure/foamedmetal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
/obj/structure/foamedmetal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
to_chat(user, "<span class='warning'>You hit [src] but bounce off it!</span>")
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, 1)
|
||||
@@ -317,15 +314,13 @@
|
||||
O.ClearWet()
|
||||
if(O.air)
|
||||
var/datum/gas_mixture/G = O.air
|
||||
G.temperature = 293.15
|
||||
G.set_temperature(293.15)
|
||||
for(var/obj/effect/hotspot/H in O)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
for(var/I in G_gases)
|
||||
for(var/I in G.get_gases())
|
||||
if(I == /datum/gas/oxygen || I == /datum/gas/nitrogen)
|
||||
continue
|
||||
G_gases[I] = 0
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
G.set_moles(I, 0)
|
||||
O.air_update_turf()
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in O)
|
||||
if(!U.welded)
|
||||
|
||||
@@ -166,15 +166,13 @@
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(!distcheck || get_dist(T, location) < blast) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = temperature
|
||||
G.set_temperature(temperature)
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
var/list/G_gases = G.gases
|
||||
if(G_gases[/datum/gas/plasma])
|
||||
G_gases[/datum/gas/nitrogen] += (G_gases[/datum/gas/plasma])
|
||||
G_gases[/datum/gas/plasma] = 0
|
||||
GAS_GARBAGE_COLLECT(G.gases)
|
||||
if(G.get_moles(/datum/gas/plasma))
|
||||
G.adjust_moles(/datum/gas/nitrogen, G.get_moles(/datum/gas/plasma))
|
||||
G.set_moles(/datum/gas/plasma, 0)
|
||||
if (weldvents)
|
||||
for(var/obj/machinery/atmospherics/components/unary/U in T)
|
||||
if(!isnull(U.welded) && !U.welded) //must be an unwelded vent pump or vent scrubber.
|
||||
|
||||
@@ -63,3 +63,23 @@
|
||||
|
||||
/datum/effect_system/lightning_spread
|
||||
effect_type = /obj/effect/particle_effect/sparks/electricity
|
||||
|
||||
//fake sparks, not subtyped because we don't want light/heat, nor checks inside an often used proc for a rare subcase for saving like 10 lines of code
|
||||
/obj/effect/particle_effect/fake_sparks
|
||||
name = "lightning"
|
||||
icon_state = "electricity"
|
||||
|
||||
/obj/effect/particle_effect/fake_sparks/Initialize()
|
||||
. = ..()
|
||||
flick(icon_state, src) // replay the animation
|
||||
playsound(src, "sparks", 100, TRUE)
|
||||
QDEL_IN(src, 20)
|
||||
|
||||
/datum/effect_system/fake_spark_spread
|
||||
effect_type = /obj/effect/particle_effect/fake_sparks
|
||||
|
||||
/proc/do_fake_sparks(n, c, source)
|
||||
var/datum/effect_system/fake_spark_spread/sparks = new
|
||||
sparks.set_up(n, c, source)
|
||||
sparks.autocleanup = TRUE
|
||||
sparks.start()
|
||||
|
||||
@@ -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>")
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
/proc/create_portal_pair(turf/source, turf/destination, _creator = null, _lifespan = 300, accuracy = 0, newtype = /obj/effect/portal, atmos_link_override)
|
||||
/proc/create_portal_pair(turf/source, turf/destination, _lifespan = 300, accuracy = 0, newtype = /obj/effect/portal, atmos_link_override)
|
||||
if(!istype(source) || !istype(destination))
|
||||
return
|
||||
var/turf/actual_destination = get_teleport_turf(destination, accuracy)
|
||||
var/obj/effect/portal/P1 = new newtype(source, _creator, _lifespan, null, FALSE, null, atmos_link_override)
|
||||
var/obj/effect/portal/P2 = new newtype(actual_destination, _creator, _lifespan, P1, TRUE, null, atmos_link_override)
|
||||
var/obj/effect/portal/P1 = new newtype(source, _lifespan, null, FALSE, null, atmos_link_override)
|
||||
var/obj/effect/portal/P2 = new newtype(actual_destination, _lifespan, P1, TRUE, null, atmos_link_override)
|
||||
if(!istype(P1)||!istype(P2))
|
||||
return
|
||||
P1.link_portal(P2)
|
||||
@@ -21,7 +21,6 @@
|
||||
var/obj/effect/portal/linked
|
||||
var/hardlinked = TRUE //Requires a linked portal at all times. Destroy if there's no linked portal, if there is destroy it when this one is deleted.
|
||||
var/teleport_channel = TELEPORT_CHANNEL_BLUESPACE
|
||||
var/creator
|
||||
var/turf/hard_target //For when a portal needs a hard target and isn't to be linked.
|
||||
var/atmos_link = FALSE //Link source/destination atmos.
|
||||
var/turf/open/atmos_source //Atmos link source
|
||||
@@ -35,6 +34,7 @@
|
||||
name = "wormhole"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "anom"
|
||||
layer = RIPPLE_LAYER
|
||||
mech_sized = TRUE
|
||||
teleport_channel = TELEPORT_CHANNEL_WORMHOLE
|
||||
|
||||
@@ -49,7 +49,9 @@
|
||||
user.forceMove(get_turf(src))
|
||||
return TRUE
|
||||
|
||||
/obj/effect/portal/Crossed(atom/movable/AM, oldloc)
|
||||
/obj/effect/portal/Crossed(atom/movable/AM, oldloc, force_stop = 0)
|
||||
if(force_stop)
|
||||
return ..()
|
||||
if(isobserver(AM))
|
||||
return ..()
|
||||
if(linked && (get_turf(oldloc) == get_turf(linked)))
|
||||
@@ -60,16 +62,13 @@
|
||||
/obj/effect/portal/attack_tk(mob/user)
|
||||
return
|
||||
|
||||
/obj/effect/portal/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/effect/portal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(get_turf(user) == get_turf(src))
|
||||
teleport(user)
|
||||
if(Adjacent(user))
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
/obj/effect/portal/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override)
|
||||
/obj/effect/portal/Initialize(mapload, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override)
|
||||
. = ..()
|
||||
GLOB.portals += src
|
||||
if(!istype(_linked) && automatic_link)
|
||||
@@ -81,7 +80,6 @@
|
||||
atmos_link = atmos_link_override
|
||||
link_portal(_linked)
|
||||
hardlinked = automatic_link
|
||||
creator = _creator
|
||||
if(isturf(hard_target_override))
|
||||
hard_target = hard_target_override
|
||||
|
||||
@@ -132,10 +130,7 @@
|
||||
LAZYREMOVE(atmos_destination.atmos_adjacent_turfs, atmos_source)
|
||||
atmos_destination = null
|
||||
|
||||
/obj/effect/portal/Destroy() //Calls on_portal_destroy(destroyed portal, location of destroyed portal) on creator if creator has such call.
|
||||
if(creator && hascall(creator, "on_portal_destroy"))
|
||||
call(creator, "on_portal_destroy")(src, src.loc)
|
||||
creator = null
|
||||
/obj/effect/portal/Destroy()
|
||||
GLOB.portals -= src
|
||||
unlink_atmos()
|
||||
if(hardlinked && !QDELETED(linked))
|
||||
@@ -156,8 +151,6 @@
|
||||
return FALSE
|
||||
if(!force && (!ismecha(M) && !istype(M, /obj/item/projectile) && M.anchored && !allow_anchored))
|
||||
return
|
||||
if(ismegafauna(M))
|
||||
message_admins("[M] has used a portal at [ADMIN_VERBOSEJMP(src)] made by [usr].")
|
||||
var/no_effect = FALSE
|
||||
if(last_effect == world.time)
|
||||
no_effect = TRUE
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
var/obj/item/tank/internals/plasma/PT = new(V)
|
||||
var/obj/item/tank/internals/oxygen/OT = new(V)
|
||||
|
||||
PT.air_contents.gases[/datum/gas/plasma] = pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p))
|
||||
PT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_p)
|
||||
PT.air_contents.set_moles(/datum/gas/plasma, pressure_p*PT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_p)))
|
||||
PT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_p))
|
||||
|
||||
OT.air_contents.gases[/datum/gas/oxygen] = pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o))
|
||||
OT.air_contents.temperature = CELSIUS_TO_KELVIN(temp_o)
|
||||
OT.air_contents.set_moles(/datum/gas/oxygen, pressure_o*OT.volume/(R_IDEAL_GAS_EQUATION*CELSIUS_TO_KELVIN(temp_o)))
|
||||
OT.air_contents.set_temperature(CELSIUS_TO_KELVIN(temp_o))
|
||||
|
||||
V.tank_one = PT
|
||||
V.tank_two = OT
|
||||
|
||||
@@ -168,3 +168,26 @@
|
||||
items = list(
|
||||
/obj/item/clothing/mask/gas/sexymime,
|
||||
/obj/item/clothing/under/rank/civilian/mime/sexy)
|
||||
|
||||
/obj/effect/spawner/bundle/crate/Initialize(mapload)
|
||||
if(items && items.len)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/closet/LC = locate(/obj/structure/closet) in T
|
||||
if(LC)
|
||||
for(var/path in items)
|
||||
new path(LC)
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
/obj/effect/spawner/bundle/crate/mosin
|
||||
name = "Mosin-Nagant spawner"
|
||||
items = list(
|
||||
/obj/item/gun/ballistic/shotgun/boltaction,
|
||||
/obj/item/ammo_box/a762
|
||||
)
|
||||
|
||||
/obj/effect/spawner/bundle/crate/surplusrifle
|
||||
name = "surplus rifle spawner"
|
||||
items = list(
|
||||
/obj/item/gun/ballistic/automatic/surplus,
|
||||
/obj/item/ammo_box/magazine/m10mm/rifle
|
||||
)
|
||||
|
||||
@@ -380,8 +380,6 @@
|
||||
name = "random keg spawner"
|
||||
lootcount = 1
|
||||
loot = list(/obj/structure/reagent_dispensers/keg/mead = 5,
|
||||
/obj/structure/reagent_dispensers/keg/aphro = 2,
|
||||
/obj/structure/reagent_dispensers/keg/aphro/strong = 2,
|
||||
/obj/structure/reagent_dispensers/keg/gargle = 1)
|
||||
|
||||
/obj/effect/spawner/lootdrop/coin
|
||||
@@ -451,7 +449,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,
|
||||
@@ -466,7 +464,7 @@
|
||||
/obj/effect/spawner/lootdrop/cigars_cases/no_turf = 2,
|
||||
/obj/effect/spawner/lootdrop/space_cash/no_turf = 5,
|
||||
/obj/item/reagent_containers/food/snacks/grown/cannabis = 5,
|
||||
/obj/item/storage/pill_bottle/dice = 5,
|
||||
/obj/item/storage/box/dice = 5,
|
||||
/obj/item/toy/cards/deck = 5,
|
||||
/obj/effect/spawner/lootdrop/druggie_pill/no_turf = 5
|
||||
)
|
||||
@@ -476,7 +474,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,
|
||||
@@ -485,7 +483,7 @@
|
||||
/obj/effect/spawner/lootdrop/cig_packs/no_turf = 10,
|
||||
/obj/effect/spawner/lootdrop/cigars_cases/no_turf = 5,
|
||||
/obj/item/reagent_containers/food/snacks/grown/cannabis = 5,
|
||||
/obj/item/storage/pill_bottle/dice = 5,
|
||||
/obj/item/storage/box/dice = 5,
|
||||
/obj/item/toy/cards/deck = 5,
|
||||
/obj/effect/spawner/lootdrop/druggie_pill/no_turf = 5,
|
||||
/obj/item/kitchen/knife = 5,
|
||||
@@ -666,28 +664,18 @@
|
||||
lootcount = 1
|
||||
spawn_on_turf = FALSE
|
||||
loot = list("" = 50,
|
||||
/obj/item/weaponcrafting/improvised_parts/barrel_rifle = 10,
|
||||
/obj/item/weaponcrafting/improvised_parts/barrel_shotgun = 5,
|
||||
/obj/item/weaponcrafting/improvised_parts/barrel_pistol = 5,
|
||||
/obj/item/weaponcrafting/improvised_parts/rifle_receiver = 10,
|
||||
/obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 3,
|
||||
/obj/item/weaponcrafting/improvised_parts/pistol_receiver = 3,
|
||||
/obj/item/weaponcrafting/improvised_parts/laser_receiver = 1,
|
||||
/obj/item/weaponcrafting/improvised_parts/trigger_assembly = 10,
|
||||
/obj/item/weaponcrafting/improvised_parts/makeshift_lens = 3,
|
||||
/obj/item/weaponcrafting/improvised_parts/rifle_receiver = 13,
|
||||
/obj/item/weaponcrafting/improvised_parts/shotgun_receiver = 13,
|
||||
/obj/item/weaponcrafting/improvised_parts/trigger_assembly = 12,
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/weapon_parts
|
||||
name = "random weapon parts spawner 25%"
|
||||
name = "random weapon parts spawner 20%"
|
||||
lootcount = 1
|
||||
spawn_on_turf = FALSE
|
||||
loot = list("" = 75,
|
||||
/obj/item/weaponcrafting/improvised_parts/barrel_rifle = 5,
|
||||
/obj/item/weaponcrafting/improvised_parts/barrel_pistol = 5,
|
||||
loot = list("" = 80,
|
||||
/obj/item/weaponcrafting/improvised_parts/rifle_receiver = 5,
|
||||
/obj/item/weaponcrafting/improvised_parts/pistol_receiver = 2,
|
||||
/obj/item/weaponcrafting/improvised_parts/trigger_assembly = 5,
|
||||
/obj/item/weaponcrafting/improvised_parts/makeshift_lens = 3,
|
||||
)
|
||||
|
||||
/obj/effect/spawner/lootdrop/ammo
|
||||
@@ -695,8 +683,6 @@
|
||||
lootcount = 1
|
||||
spawn_on_turf = FALSE
|
||||
loot = list("" = 25,
|
||||
/obj/item/ammo_box/c32mm = 15,
|
||||
/obj/item/ammo_box/r32mm = 15,
|
||||
/obj/item/ammo_box/magazine/wt550m9 = 1,
|
||||
/obj/item/ammo_casing/shotgun/buckshot = 7,
|
||||
/obj/item/ammo_casing/shotgun/rubbershot = 7,
|
||||
@@ -709,8 +695,6 @@
|
||||
lootcount = 1
|
||||
spawn_on_turf = FALSE
|
||||
loot = list("" = 50,
|
||||
/obj/item/ammo_box/c32mm = 7,
|
||||
/obj/item/ammo_box/r32mm = 7,
|
||||
/obj/item/ammo_box/magazine/wt550m9 = 2,
|
||||
/obj/item/ammo_casing/shotgun/buckshot = 10,
|
||||
/obj/item/ammo_casing/shotgun/rubbershot = 10,
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
if(prob(50))
|
||||
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
else if(istype(mover, /obj/item/projectile))
|
||||
return prob(30)
|
||||
|
||||
@@ -119,6 +120,8 @@
|
||||
var/poison_type = "toxin"
|
||||
var/poison_per_bite = 5
|
||||
var/list/faction = list("spiders")
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
|
||||
/obj/structure/spider/spiderling/Destroy()
|
||||
new/obj/item/reagent_containers/food/snacks/spiderling(get_turf(src))
|
||||
@@ -152,10 +155,9 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/spider/spiderling/attack_hand(mob/user)
|
||||
/obj/structure/spider/spiderling/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
. = ..()
|
||||
if(user.a_intent != INTENT_HELP)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<span class='warning'>[user] splats [src].</span>", "<span class='warning'>You splat [src].</span>", "<span class='italics'>You hear a splat...</span>")
|
||||
playsound(loc, 'sound/effects/snap.ogg', 25)
|
||||
@@ -252,8 +254,6 @@
|
||||
|
||||
/obj/structure/spider/cocoon/container_resist(mob/living/user)
|
||||
var/breakout_time = 600
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You struggle against the tight bonds... (This will take about [DisplayTimeText(breakout_time)].)</span>")
|
||||
visible_message("You see something struggling and writhing in \the [src]!")
|
||||
if(do_after(user,(breakout_time), target = src))
|
||||
@@ -261,8 +261,6 @@
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
/obj/structure/spider/cocoon/Destroy()
|
||||
var/turf/T = get_turf(src)
|
||||
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
|
||||
|
||||
@@ -139,6 +139,23 @@
|
||||
/obj/effect/temp_visual/dir_setting/curse/hand
|
||||
icon_state = "cursehand"
|
||||
|
||||
/obj/effect/temp_visual/bsa_splash
|
||||
name = "\improper Bluespace energy wave"
|
||||
desc = "A massive, rippling wave of bluepace energy, all rapidly exhausting itself the moment it leaves the concentrated beam of light."
|
||||
icon = 'icons/effects/beam_splash.dmi'
|
||||
icon_state = "beam_splash_l"
|
||||
layer = ABOVE_ALL_MOB_LAYER
|
||||
pixel_y = -16
|
||||
duration = 50
|
||||
|
||||
/obj/effect/temp_visual/bsa_splash/Initialize(mapload, dir)
|
||||
. = ..()
|
||||
switch(dir)
|
||||
if(WEST)
|
||||
icon_state = "beam_splash_w"
|
||||
if(EAST)
|
||||
icon_state = "beam_splash_e"
|
||||
|
||||
/obj/effect/temp_visual/wizard
|
||||
name = "water"
|
||||
icon = 'icons/mob/mob.dmi'
|
||||
@@ -486,4 +503,15 @@
|
||||
addtimer(CALLBACK(src, .proc/end), 15)
|
||||
|
||||
/obj/effect/constructing_effect/proc/end()
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/space_wind
|
||||
icon = 'icons/effects/atmospherics.dmi'
|
||||
icon_state = "space_wind"
|
||||
layer = FLY_LAYER
|
||||
duration = 20
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/space_wind/Initialize(mapload, set_dir, set_alpha = 255)
|
||||
. = ..()
|
||||
alpha = set_alpha
|
||||
|
||||
+50
-25
@@ -11,6 +11,10 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
name = "item"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
blocks_emissive = EMISSIVE_BLOCK_GENERIC
|
||||
|
||||
attack_hand_speed = 0
|
||||
attack_hand_is_action = FALSE
|
||||
attack_hand_unwieldlyness = 0
|
||||
|
||||
///icon state name for inhand overlays
|
||||
var/item_state = null
|
||||
@@ -58,16 +62,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
/// How long, in deciseconds, this staggers for, if null it will autocalculate from w_class and force. Unlike total mass this supports 0 and negatives.
|
||||
var/stagger_force
|
||||
|
||||
/**
|
||||
* Set FALSE and then checked at the end of on mob/living/attackby(), set TRUE on living/pre_attacked_by().
|
||||
* Should it be FALSE by the end of the item/attack(), that means the item overrode the standard attack behaviour
|
||||
* and the user still needs the delay applied. We can't be using return values since that'll stop afterattack() from being triggered.
|
||||
*/
|
||||
var/attack_delay_done = FALSE
|
||||
///next_move click/attack delay of this item.
|
||||
var/click_delay = CLICK_CD_MELEE
|
||||
|
||||
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
|
||||
var/current_equipped_slot
|
||||
pass_flags = PASSTABLE
|
||||
pressure_resistance = 4
|
||||
var/obj/item/master = null
|
||||
@@ -107,12 +103,12 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
|
||||
|
||||
var/list/embedding = NONE
|
||||
var/list/embedding
|
||||
|
||||
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
|
||||
var/heat = 0
|
||||
///All items with sharpness of IS_SHARP or higher will automatically get the butchering component.
|
||||
var/sharpness = IS_BLUNT
|
||||
///All items with sharpness of SHARP_EDGED or higher will automatically get the butchering component.
|
||||
var/sharpness = SHARP_NONE
|
||||
|
||||
var/tool_behaviour = NONE
|
||||
var/toolspeed = 1
|
||||
@@ -179,6 +175,11 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
|
||||
if(used_skills)
|
||||
for(var/path in used_skills)
|
||||
var/datum/skill/S = GLOB.skill_datums[path]
|
||||
LAZYADD(used_skills[path], S.skill_traits)
|
||||
|
||||
/obj/item/Destroy()
|
||||
item_flags &= ~DROPDEL //prevent reqdels
|
||||
if(ismob(loc))
|
||||
@@ -205,7 +206,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
if(GLOB.rpg_loot_items)
|
||||
AddComponent(/datum/component/fantasy)
|
||||
|
||||
if(sharpness) //give sharp objects butchering functionality, for consistency
|
||||
if(sharpness && force > 5) //give sharp objects butchering functionality, for consistency
|
||||
AddComponent(/datum/component/butchering, 80 * toolspeed)
|
||||
|
||||
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
|
||||
@@ -257,7 +258,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
. += "[src] is made of cold-resistant materials."
|
||||
if(resistance_flags & FIRE_PROOF)
|
||||
. += "[src] is made of fire-retardant materials."
|
||||
|
||||
|
||||
if(item_flags & (ITEM_CAN_BLOCK | ITEM_CAN_PARRY))
|
||||
var/datum/block_parry_data/data = return_block_parry_datum(block_parry_data)
|
||||
. += "[src] has the capacity to be used to block and/or parry. <a href='?src=[REF(data)];name=[name];block=[item_flags & ITEM_CAN_BLOCK];parry=[item_flags & ITEM_CAN_PARRY];render=1'>\[Show Stats\]</a>"
|
||||
@@ -307,14 +308,15 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
add_fingerprint(usr)
|
||||
return ..()
|
||||
|
||||
/obj/item/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/item/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(!user)
|
||||
return
|
||||
if(anchored)
|
||||
return
|
||||
if(loc == user && current_equipped_slot && current_equipped_slot != SLOT_HANDS)
|
||||
if(current_equipped_slot in user.check_obscured_slots())
|
||||
to_chat(src, "<span class='warning'>You are unable to unequip that while wearing other garments over it!</span>")
|
||||
return FALSE
|
||||
|
||||
if(resistance_flags & ON_FIRE)
|
||||
var/mob/living/carbon/C = user
|
||||
@@ -336,7 +338,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
C.update_damage_overlays()
|
||||
return
|
||||
|
||||
if(acid_level > 20 && !ismob(loc))// so we can still remove the clothes on us that have acid.
|
||||
if(acid_level > 20 && ismob(loc))// so we can still remove the clothes on us that have acid.
|
||||
var/mob/living/carbon/C = user
|
||||
if(istype(C))
|
||||
if(!C.gloves || (!(C.gloves.resistance_flags & (UNACIDABLE|ACID_PROOF))))
|
||||
@@ -379,6 +381,11 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
return
|
||||
if(anchored)
|
||||
return
|
||||
if(loc == user && current_equipped_slot && current_equipped_slot != SLOT_HANDS)
|
||||
if(current_equipped_slot in user.check_obscured_slots())
|
||||
to_chat(src, "<span class='warning'>You are unable to unequip that while wearing other garments over it!</span>")
|
||||
return FALSE
|
||||
|
||||
|
||||
SEND_SIGNAL(loc, COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE)
|
||||
|
||||
@@ -423,6 +430,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
/obj/item/proc/dropped(mob/user)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
current_equipped_slot = null
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(user)
|
||||
@@ -457,6 +465,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
usr.UnarmedAttack(src, TRUE)
|
||||
if(usr.get_active_held_item() == src)
|
||||
melee_attack_chain(usr, over)
|
||||
usr.FlushCurrentAction()
|
||||
return TRUE //returning TRUE as a "is this overridden?" flag
|
||||
if(!Adjacent(usr) || !over.Adjacent(usr))
|
||||
return // should stop you from dragging through windows
|
||||
@@ -470,7 +479,9 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
// for items that can be placed in multiple slots
|
||||
// note this isn't called during the initial dressing of a player
|
||||
/obj/item/proc/equipped(mob/user, slot)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
. = SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
current_equipped_slot = slot
|
||||
if(!(. & COMPONENT_NO_GRANT_ACTIONS))
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
@@ -496,11 +507,11 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
//if this is being done by a mob other than M, it will include the mob equipper, who is trying to equip the item to mob M. equipper will be null otherwise.
|
||||
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
|
||||
//Set disable_warning to TRUE if you wish it to not give you outputs.
|
||||
/obj/item/proc/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
|
||||
/obj/item/proc/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
|
||||
if(!M)
|
||||
return FALSE
|
||||
|
||||
return M.can_equip(src, slot, disable_warning, bypass_equip_delay_self)
|
||||
return M.can_equip(src, slot, disable_warning, bypass_equip_delay_self, clothing_check, return_warning)
|
||||
|
||||
/obj/item/verb/verb_pickup()
|
||||
set src in oview(1)
|
||||
@@ -635,6 +646,18 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
var/itempush = 1
|
||||
if(w_class < 4)
|
||||
itempush = 0 //too light to push anything
|
||||
if(isliving(hit_atom)) //Living mobs handle hit sounds differently.
|
||||
var/volume = get_volume_by_throwforce_and_or_w_class()
|
||||
if (throwforce > 0)
|
||||
if (throwhitsound)
|
||||
playsound(hit_atom, throwhitsound, volume, TRUE, -1)
|
||||
else if(hitsound)
|
||||
playsound(hit_atom, hitsound, volume, TRUE, -1)
|
||||
else
|
||||
playsound(hit_atom, 'sound/weapons/genhit.ogg',volume, TRUE, -1)
|
||||
else
|
||||
playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1)
|
||||
|
||||
return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum)
|
||||
|
||||
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
|
||||
@@ -766,6 +789,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++
|
||||
|
||||
@@ -822,7 +846,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
// Called when a mob tries to use the item as a tool.
|
||||
// Handles most checks.
|
||||
/obj/item/proc/use_tool(atom/target, mob/living/user, delay, amount=0, volume=0, datum/callback/extra_checks, skill_gain_mult = 1, max_level = INFINITY)
|
||||
/obj/item/proc/use_tool(atom/target, mob/living/user, delay, amount=0, volume=0, datum/callback/extra_checks, skill_gain_mult = STD_USE_TOOL_MULT)
|
||||
// No delay means there is no start message, and no reason to call tool_start_check before use_tool.
|
||||
// Run the start check here so we wouldn't have to call it manually.
|
||||
if(!delay && !tool_start_check(user, amount))
|
||||
@@ -867,7 +891,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
for(var/skill in used_skills)
|
||||
if(!(SKILL_TRAINING_TOOL in used_skills[skill]))
|
||||
continue
|
||||
user.mind.auto_gain_experience(skill, gain*skill_gain_mult, GET_STANDARD_LVL(max_level))
|
||||
var/datum/skill/S = GLOB.skill_datums[skill]
|
||||
user.mind.auto_gain_experience(skill, gain*skill_gain_mult*S.item_skill_gain_multi)
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -1065,7 +1090,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
|
||||
|
||||
/obj/item/proc/updateEmbedding()
|
||||
if(!islist(embedding) || !LAZYLEN(embedding))
|
||||
if(!LAZYLEN(embedding))
|
||||
return
|
||||
|
||||
AddElement(/datum/element/embed,\
|
||||
@@ -1081,4 +1106,4 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
jostle_pain_mult = (!isnull(embedding["jostle_pain_mult"]) ? embedding["jostle_pain_mult"] : EMBEDDED_JOSTLE_PAIN_MULTIPLIER),\
|
||||
pain_stam_pct = (!isnull(embedding["pain_stam_pct"]) ? embedding["pain_stam_pct"] : EMBEDDED_PAIN_STAM_PCT),\
|
||||
embed_chance_turf_mod = (!isnull(embedding["embed_chance_turf_mod"]) ? embedding["embed_chance_turf_mod"] : EMBED_CHANCE_TURF_MOD))
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
@@ -135,6 +135,14 @@ RLD
|
||||
flick("[icon_state]_empty", src) //somewhat hacky thing to make RCDs with ammo counters actually have a blinking yellow light
|
||||
return .
|
||||
|
||||
|
||||
/obj/item/construction/proc/check_menu(mob/living/user)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/proc/range_check(atom/A, mob/user)
|
||||
if(!(A in range(custom_range, get_turf(user))))
|
||||
to_chat(user, "<span class='warning'>The \'Out of Range\' light on [src] blinks red.</span>")
|
||||
@@ -276,13 +284,6 @@ RLD
|
||||
//Not scaling these down to button size because they look horrible then, instead just bumping up radius.
|
||||
return MA
|
||||
|
||||
/obj/item/construction/rcd/proc/check_menu(mob/living/user)
|
||||
if(!istype(user))
|
||||
return FALSE
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/rcd/proc/change_computer_dir(mob/user)
|
||||
if(!user)
|
||||
return
|
||||
@@ -856,6 +857,82 @@ RLD
|
||||
desc = "It contains the design for firelock, air alarm, fire alarm, apc circuits and crap power cells."
|
||||
upgrade = RCD_UPGRADE_SIMPLE_CIRCUITS
|
||||
|
||||
/obj/item/construction/plumbing
|
||||
name = "Plumbing Constructor"
|
||||
desc = "An expertly modified RCD outfitted to construct plumbing machinery. Reload with compressed matter cartridges."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "arcd"
|
||||
item_state = "oldrcd"
|
||||
has_ammobar = FALSE
|
||||
matter = 200
|
||||
max_matter = 200
|
||||
|
||||
///type of the plumbing machine
|
||||
var/blueprint = null
|
||||
///index, used in the attack self to get the type. stored here since it doesnt change
|
||||
var/list/choices = list()
|
||||
///index, used in the attack self to get the type. stored here since it doesnt change
|
||||
var/list/name_to_type = list()
|
||||
///
|
||||
var/list/machinery_data = list("cost" = list(), "delay" = list())
|
||||
|
||||
/obj/item/construction/plumbing/attack_self(mob/user)
|
||||
..()
|
||||
if(!choices.len)
|
||||
for(var/A in subtypesof(/obj/machinery/plumbing))
|
||||
var/obj/machinery/plumbing/M = A
|
||||
if(initial(M.rcd_constructable))
|
||||
choices += list(initial(M.name) = image(icon = initial(M.icon), icon_state = initial(M.icon_state)))
|
||||
name_to_type[initial(M.name)] = M
|
||||
machinery_data["cost"][A] = initial(M.rcd_cost)
|
||||
machinery_data["delay"][A] = initial(M.rcd_delay)
|
||||
|
||||
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
|
||||
if(!check_menu(user))
|
||||
return
|
||||
|
||||
blueprint = name_to_type[choice]
|
||||
playsound(src, 'sound/effects/pop.ogg', 50, FALSE)
|
||||
to_chat(user, "<span class='notice'>You change [name]s blueprint to '[choice]'.</span>")
|
||||
|
||||
///pretty much rcd_create, but named differently to make myself feel less bad for copypasting from a sibling-type
|
||||
/obj/item/construction/plumbing/proc/create_machine(atom/A, mob/user)
|
||||
if(!machinery_data || !isopenturf(A))
|
||||
return FALSE
|
||||
|
||||
if(checkResource(machinery_data["cost"][blueprint], user) && blueprint)
|
||||
if(do_after(user, machinery_data["delay"][blueprint], target = A))
|
||||
if(checkResource(machinery_data["cost"][blueprint], user) && canPlace(A))
|
||||
useResource(machinery_data["cost"][blueprint], user)
|
||||
activate()
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
|
||||
new blueprint (A, FALSE, FALSE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/construction/plumbing/proc/canPlace(turf/T)
|
||||
if(!isopenturf(T))
|
||||
return FALSE
|
||||
. = TRUE
|
||||
for(var/obj/O in T.contents)
|
||||
if(O.density) //let's not built ontop of dense stuff, like big machines and other obstacles, it kills my immershion
|
||||
return FALSE
|
||||
|
||||
/obj/item/construction/plumbing/afterattack(atom/A, mob/user)
|
||||
. = ..()
|
||||
if(!range_check(A, user))
|
||||
return
|
||||
if(istype(A, /obj/machinery/plumbing))
|
||||
var/obj/machinery/plumbing/P = A
|
||||
if(P.anchored)
|
||||
to_chat(user, "<span class='warning'>The [P.name] needs to be unanchored!</span>")
|
||||
return
|
||||
if(do_after(user, 20, target = P))
|
||||
P.deconstruct() //Let's not substract matter
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE) //this is just such a great sound effect
|
||||
else
|
||||
create_machine(A, user)
|
||||
|
||||
|
||||
#undef GLOW_MODE
|
||||
#undef LIGHT_MODE
|
||||
#undef REMOVE_MODE
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -6,6 +6,7 @@ RPD
|
||||
#define ATMOS_CATEGORY 0
|
||||
#define DISPOSALS_CATEGORY 1
|
||||
#define TRANSIT_CATEGORY 2
|
||||
#define PLUMBING_CATEGORY 3
|
||||
|
||||
#define BUILD_MODE (1<<0)
|
||||
#define WRENCH_MODE (1<<1)
|
||||
@@ -75,6 +76,13 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
)
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(fluid_duct_recipes, list(
|
||||
"Fluid Ducts" = list(
|
||||
new /datum/pipe_info/plumbing("Duct", /obj/machinery/duct, PIPE_ONEDIR),
|
||||
new /datum/pipe_info/plumbing/multilayer("Duct Layer-Manifold",/obj/machinery/duct/multilayered, PIPE_STRAIGHT)
|
||||
)
|
||||
))
|
||||
|
||||
/datum/pipe_info
|
||||
var/name
|
||||
var/icon_state
|
||||
@@ -175,6 +183,15 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if(dt == PIPE_UNARY_FLIPPABLE)
|
||||
icon_state = "[icon_state]_preview"
|
||||
|
||||
/datum/pipe_info/plumbing/New(label, obj/path, dt=PIPE_UNARY)
|
||||
name = label
|
||||
id = path
|
||||
icon_state = initial(path.icon_state)
|
||||
dirtype = dt
|
||||
|
||||
/datum/pipe_info/plumbing/multilayer //exists as identifier so we can see the difference between multi_layer and just ducts properly later on
|
||||
|
||||
|
||||
/obj/item/pipe_dispenser
|
||||
name = "Rapid Piping Device (RPD)"
|
||||
desc = "A device used to rapidly pipe things."
|
||||
@@ -200,15 +217,19 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
var/atmos_build_speed = 5 //deciseconds (500ms)
|
||||
var/disposal_build_speed = 5
|
||||
var/transit_build_speed = 5
|
||||
var/plumbing_build_speed = 5
|
||||
var/destroy_speed = 5
|
||||
var/paint_speed = 5
|
||||
var/category = ATMOS_CATEGORY
|
||||
var/piping_layer = PIPING_LAYER_DEFAULT
|
||||
var/ducting_layer = DUCT_LAYER_DEFAULT
|
||||
var/datum/pipe_info/recipe
|
||||
var/static/datum/pipe_info/first_atmos
|
||||
var/static/datum/pipe_info/first_disposal
|
||||
var/static/datum/pipe_info/first_transit
|
||||
var/mode = BUILD_MODE | DESTROY_MODE | WRENCH_MODE
|
||||
var/static/datum/pipe_info/first_plumbing
|
||||
var/locked = FALSE //wheter we can change categories. Useful for the plumber
|
||||
|
||||
/obj/item/pipe_dispenser/New()
|
||||
. = ..()
|
||||
@@ -238,29 +259,30 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
playsound(get_turf(user), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
return(BRUTELOSS)
|
||||
|
||||
/obj/item/pipe_dispenser/ui_base_html(html)
|
||||
var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/pipes)
|
||||
. = replacetext(html, "<!--customheadhtml-->", assets.css_tag())
|
||||
/obj/item/pipe_dispenser/ui_assets(mob/user)
|
||||
return list(
|
||||
get_asset_datum(/datum/asset/spritesheet/pipes),
|
||||
)
|
||||
|
||||
/obj/item/pipe_dispenser/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/item/pipe_dispenser/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/spritesheet/pipes)
|
||||
assets.send(user)
|
||||
|
||||
ui = new(user, src, ui_key, "rpd", name, 425, 472, master_ui, state)
|
||||
ui = new(user, src, "RapidPipeDispenser", name)
|
||||
ui.open()
|
||||
|
||||
/obj/item/pipe_dispenser/ui_data(mob/user)
|
||||
var/list/data = list(
|
||||
"category" = category,
|
||||
"piping_layer" = piping_layer,
|
||||
|
||||
"ducting_layer" = ducting_layer,
|
||||
|
||||
"preview_rows" = recipe.get_preview(p_dir),
|
||||
"categories" = list(),
|
||||
"selected_color" = paint_color,
|
||||
"paint_colors" = GLOB.pipe_paint_colors,
|
||||
"mode" = mode
|
||||
"mode" = mode,
|
||||
"locked" = locked
|
||||
)
|
||||
|
||||
var/list/recipes
|
||||
@@ -271,6 +293,8 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
recipes = GLOB.disposal_pipe_recipes
|
||||
if(TRANSIT_CATEGORY)
|
||||
recipes = GLOB.transit_tube_recipes
|
||||
if(PLUMBING_CATEGORY)
|
||||
recipes = GLOB.fluid_duct_recipes
|
||||
for(var/c in recipes)
|
||||
var/list/cat = recipes[c]
|
||||
var/list/r = list()
|
||||
@@ -284,7 +308,7 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
/obj/item/pipe_dispenser/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
if(!usr.canUseTopic(src))
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
var/playeffect = TRUE
|
||||
switch(action)
|
||||
@@ -299,11 +323,16 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
recipe = first_atmos
|
||||
if(TRANSIT_CATEGORY)
|
||||
recipe = first_transit
|
||||
if(PLUMBING_CATEGORY)
|
||||
recipe = first_plumbing
|
||||
p_dir = NORTH
|
||||
playeffect = FALSE
|
||||
if("piping_layer")
|
||||
piping_layer = text2num(params["piping_layer"])
|
||||
playeffect = FALSE
|
||||
// if("ducting_layer")
|
||||
// ducting_layer = text2num(params["ducting_layer"])
|
||||
// playeffect = FALSE
|
||||
if("pipe_type")
|
||||
var/static/list/recipes
|
||||
if(!recipes)
|
||||
@@ -320,11 +349,9 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
mode &= ~n
|
||||
else
|
||||
mode |= n
|
||||
|
||||
if(playeffect && world.time >= effectcooldown)
|
||||
if(playeffect)
|
||||
spark_system.start()
|
||||
effectcooldown = world.time + 100
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, 0)
|
||||
playsound(get_turf(src), 'sound/effects/pop.ogg', 50, FALSE)
|
||||
return TRUE
|
||||
|
||||
/obj/item/pipe_dispenser/pre_attack(atom/A, mob/user)
|
||||
@@ -469,16 +496,56 @@ GLOBAL_LIST_INIT(transit_tube_recipes, list(
|
||||
if(mode & WRENCH_MODE)
|
||||
tube.wrench_act(user, src)
|
||||
return
|
||||
|
||||
if(PLUMBING_CATEGORY) //Plumbing.
|
||||
if(!can_make_pipe)
|
||||
return ..()
|
||||
A = get_turf(A)
|
||||
if(isclosedturf(A))
|
||||
to_chat(user, "<span class='warning'>[src]'s error light flickers; there's something in the way!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start building a fluid duct...</span>")
|
||||
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, plumbing_build_speed, target = A))
|
||||
var/obj/machinery/duct/D
|
||||
if(recipe.type == /datum/pipe_info/plumbing/multilayer)
|
||||
var/temp_connects = NORTH + SOUTH
|
||||
if(queued_p_dir == EAST)
|
||||
temp_connects = EAST + WEST
|
||||
D = new queued_p_type (A, TRUE, GLOB.pipe_paint_colors[paint_color], ducting_layer, temp_connects)
|
||||
else
|
||||
D = new queued_p_type (A, TRUE, GLOB.pipe_paint_colors[paint_color], ducting_layer)
|
||||
D.add_fingerprint(usr)
|
||||
if(mode & WRENCH_MODE)
|
||||
D.wrench_act(user, src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/pipe_dispenser/proc/activate()
|
||||
playsound(get_turf(src), 'sound/items/deconstruct.ogg', 50, 1)
|
||||
/* unneeded, you can craft ducts from plastic
|
||||
/obj/item/pipe_dispenser/plumbing
|
||||
name = "Plumberinator"
|
||||
desc = "A crude device to rapidly plumb things."
|
||||
icon_state = "plumberer"
|
||||
category = PLUMBING_CATEGORY
|
||||
locked = TRUE
|
||||
|
||||
/obj/item/pipe_dispenser/plumbing/Initialize()
|
||||
. = ..()
|
||||
spark_system = new
|
||||
spark_system.set_up(5, 0, src)
|
||||
spark_system.attach(src)
|
||||
if(!first_plumbing)
|
||||
first_plumbing = GLOB.fluid_duct_recipes[GLOB.fluid_duct_recipes[1]][1]
|
||||
|
||||
recipe = first_plumbing
|
||||
|
||||
*/
|
||||
|
||||
#undef ATMOS_CATEGORY
|
||||
#undef DISPOSALS_CATEGORY
|
||||
#undef TRANSIT_CATEGORY
|
||||
#undef PLUMBING_CATEGORY
|
||||
|
||||
#undef BUILD_MODE
|
||||
#undef DESTROY_MODE
|
||||
|
||||
@@ -26,6 +26,7 @@ RSF
|
||||
/obj/item/rsf/cyborg
|
||||
matter = 30
|
||||
|
||||
|
||||
/obj/item/rsf/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/rcd_ammo))
|
||||
if((matter + 10) > 30)
|
||||
@@ -64,15 +65,16 @@ RSF
|
||||
return
|
||||
if (!(istype(A, /obj/structure/table) || isfloorturf(A)))
|
||||
return
|
||||
|
||||
if(matter < 1)
|
||||
to_chat(user, "<span class='warning'>\The [src] doesn't have enough matter left.</span>")
|
||||
return
|
||||
if(iscyborg(user))
|
||||
matter = 30 //borgs dont actually use the matter so this is mostly just so it doesnt fail the next check incase of shennanigans
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(!R.cell || R.cell.charge < 200)
|
||||
to_chat(user, "<span class='warning'>You do not have enough power to use [src].</span>")
|
||||
return
|
||||
if(matter < 1)
|
||||
to_chat(user, "<span class='warning'>\The [src] doesn't have enough matter left.</span>")
|
||||
return
|
||||
|
||||
|
||||
var/turf/T = get_turf(A)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
@@ -91,7 +93,7 @@ RSF
|
||||
use_matter(50, user)
|
||||
if(4)
|
||||
to_chat(user, "Dispensing Dice Pack...")
|
||||
new /obj/item/storage/pill_bottle/dice(T)
|
||||
new /obj/item/storage/box/dice(T)
|
||||
use_matter(200, user)
|
||||
if(5)
|
||||
to_chat(user, "Dispensing Cigarette...")
|
||||
|
||||
@@ -180,10 +180,10 @@
|
||||
stored_decal_total = "[stored_decal][yellow_fix][stored_color]"
|
||||
return
|
||||
|
||||
/obj/item/airlock_painter/decal/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/item/airlock_painter/decal/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "decal_painter", name, 500, 400, master_ui, state)
|
||||
ui = new(user, src, "DecalPainter", name)
|
||||
ui.open()
|
||||
|
||||
/obj/item/airlock_painter/decal/ui_data(mob/user)
|
||||
@@ -233,4 +233,4 @@
|
||||
|
||||
/obj/item/airlock_painter/decal/debug/Initialize()
|
||||
. = ..()
|
||||
ink = new /obj/item/toner/extreme(src)
|
||||
ink = new /obj/item/toner/extreme(src)
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
// Armor kits! Reinforcing uniforms to maintain fashion and also armor capabilities.
|
||||
|
||||
/obj/item/armorkit
|
||||
name = "durathread armor kit"
|
||||
desc = "A glorified sewing kit with durathread sheets, thread, and a titanium needle, for reinforcing jumpsuits and uniforms."
|
||||
icon = 'icons/obj/clothing/reinf_kits.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon_state = "durathread_kit" // shoutout to my guy Toriate for being good at sprites tho
|
||||
|
||||
/obj/item/armorkit/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
// yeah have fun making subtypes and modifying the afterattack if you want to make variants
|
||||
// idiot
|
||||
// - hatter
|
||||
var/used = FALSE
|
||||
|
||||
if(isobj(target) && istype(target, /obj/item/clothing/under))
|
||||
var/obj/item/clothing/under/C = target
|
||||
if(C.armor.melee < 10)
|
||||
C.armor.melee = 10
|
||||
used = TRUE
|
||||
if(C.armor.laser < 10)
|
||||
C.armor.laser = 10
|
||||
used = TRUE
|
||||
if(C.armor.fire < 40)
|
||||
C.armor.fire = 40
|
||||
used = TRUE
|
||||
if(C.armor.acid < 10)
|
||||
C.armor.acid = 10
|
||||
used = TRUE
|
||||
if(C.armor.bomb < 5)
|
||||
C.armor.bomb = 5
|
||||
used = TRUE
|
||||
|
||||
if(used)
|
||||
user.visible_message("<span class = 'notice'>[user] uses [src] on [C], reinforcing it and tossing the empty case away afterwards.</span>", \
|
||||
"<span class = 'notice'>You reinforce [C] with [src], making it a little more protective! You toss the empty casing away afterwards.</span>")
|
||||
C.name = "durathread [C.name]" // this disappears if it gets repaired, which is annoying
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class = 'notice'>You stare at [src] and [C], coming to the conclusion that you probably don't need to reinforce it any further.")
|
||||
return
|
||||
else
|
||||
return
|
||||
@@ -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
|
||||
@@ -71,8 +71,6 @@
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't get out while you're restrained like this!</span>")
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
to_chat(user, "<span class='notice'>You claw at the fabric of [src], trying to tear it open...</span>")
|
||||
to_chat(loc, "<span class='warning'>Someone starts trying to break free of [src]!</span>")
|
||||
if(!do_after(user, 200, target = src))
|
||||
|
||||
@@ -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()
|
||||
@@ -6,6 +6,8 @@
|
||||
icon_state = "cutout_basic"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
resistance_flags = FLAMMABLE
|
||||
attack_hand_speed = CLICK_CD_MELEE
|
||||
attack_hand_is_action = TRUE
|
||||
/// Possible restyles for the cutout, add an entry in change_appearance() if you add to here
|
||||
var/static/list/possible_appearances
|
||||
/// If the cutout is pushed over and has to be righted
|
||||
@@ -43,8 +45,7 @@
|
||||
"Monkey" = image(icon = src.icon, icon_state = "cutout_monky"),
|
||||
))
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
|
||||
/obj/item/cardboard_cutout/on_attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(user.a_intent == INTENT_HELP || pushed_over)
|
||||
return ..()
|
||||
user.visible_message("<span class='warning'>[user] pushes over [src]!</span>", "<span class='danger'>You push over [src]!</span>")
|
||||
@@ -81,7 +82,6 @@
|
||||
else if(I.hitsound)
|
||||
playsound(loc, I.hitsound, get_clamped_volume(), 1, -1)
|
||||
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
|
||||
if(I.force)
|
||||
|
||||
@@ -113,6 +113,26 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>It has <b>[uses ? uses : "no"]</b> charges left.</span>"
|
||||
|
||||
/obj/item/card/id/examine_more(mob/user)
|
||||
var/list/msg = list("<span class='notice'><i>You examine [src] closer, and note the following...</i></span>")
|
||||
|
||||
if(mining_points)
|
||||
msg += "There's [mining_points] mining equipment redemption point\s loaded onto this card."
|
||||
if(registered_account)
|
||||
msg += "The account linked to the ID belongs to '[registered_account.account_holder]' and reports a balance of [registered_account.account_balance] cr."
|
||||
if(registered_account.account_job)
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(registered_account.account_job.paycheck_department)
|
||||
if(D)
|
||||
msg += "The [D.account_holder] reports a balance of [D.account_balance] cr."
|
||||
msg += "<span class='info'>Alt-Click the ID to pull money from the linked account in the form of holochips.</span>"
|
||||
msg += "<span class='info'>You can insert credits into the linked account by pressing holochips, cash, or coins against the ID.</span>"
|
||||
if(registered_account.account_holder == user.real_name)
|
||||
msg += "<span class='boldnotice'>If you lose this ID card, you can reclaim your account by Alt-Clicking a blank ID card while holding it and entering your account ID number.</span>"
|
||||
else
|
||||
msg += "<span class='info'>There is no registered account linked to this card. Alt-Click to add one.</span>"
|
||||
|
||||
return msg
|
||||
|
||||
/obj/item/card/emag/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/emagrecharge))
|
||||
var/obj/item/emagrecharge/ER = W
|
||||
@@ -204,7 +224,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
switch(var_name)
|
||||
if("assignment","registered_name")
|
||||
if(NAMEOF(src, assignment),NAMEOF(src, registered_name)) //,NAMEOF(src, registered_age))
|
||||
update_label()
|
||||
|
||||
/obj/item/card/id/attack_self(mob/user)
|
||||
@@ -230,15 +250,13 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/card/id/proc/insert_money(obj/item/I, mob/user, physical_currency)
|
||||
if(!registered_account)
|
||||
to_chat(user, "<span class='warning'>[src] doesn't have a linked account to deposit [I] into!</span>")
|
||||
return
|
||||
var/cash_money = I.get_item_credit_value()
|
||||
if(!cash_money)
|
||||
to_chat(user, "<span class='warning'>[I] doesn't seem to be worth anything!</span>")
|
||||
return
|
||||
|
||||
if(!registered_account)
|
||||
to_chat(user, "<span class='warning'>[src] doesn't have a linked account to deposit [I] into!</span>")
|
||||
return
|
||||
|
||||
registered_account.adjust_money(cash_money)
|
||||
if(physical_currency)
|
||||
to_chat(user, "<span class='notice'>You stuff [I] into [src]. It disappears in a small puff of bluespace smoke, adding [cash_money] credits to the linked account.</span>")
|
||||
@@ -249,17 +267,20 @@
|
||||
qdel(I)
|
||||
|
||||
/obj/item/card/id/proc/mass_insert_money(list/money, mob/user)
|
||||
if(!registered_account)
|
||||
to_chat(user, "<span class='warning'>[src] doesn't have a linked account to deposit into!</span>")
|
||||
return FALSE
|
||||
|
||||
if (!money || !money.len)
|
||||
return FALSE
|
||||
|
||||
var/total = 0
|
||||
|
||||
for (var/obj/item/physical_money in money)
|
||||
var/cash_money = physical_money.get_item_credit_value()
|
||||
total += physical_money.get_item_credit_value()
|
||||
CHECK_TICK
|
||||
|
||||
total += cash_money
|
||||
|
||||
registered_account.adjust_money(cash_money)
|
||||
registered_account.adjust_money(total)
|
||||
|
||||
QDEL_LIST(money)
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
|
||||
// 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 = SHARP_EDGED
|
||||
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/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 ..()
|
||||
@@ -53,32 +53,32 @@
|
||||
|
||||
/obj/item/chromosome/stabilizer
|
||||
name = "stabilizer chromosome"
|
||||
desc = "A chromosome that adjusts to the body to reduce genetic damage by 20%."
|
||||
desc = "A chromosome that reduces mutation instability by 20%."
|
||||
icon_state = "stabilizer"
|
||||
stabilizer_coeff = 0.8
|
||||
weight = 1
|
||||
|
||||
/obj/item/chromosome/synchronizer
|
||||
name = "synchronizer chromosome"
|
||||
desc = "A chromosome that gives the mind more controle over the mutation, reducing knockback and downsides by 50%."
|
||||
desc = "A chromosome that reduces mutation knockback and downsides by 50%."
|
||||
icon_state = "synchronizer"
|
||||
synchronizer_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/power
|
||||
name = "power chromosome"
|
||||
desc = "A power chromosome for boosting certain mutation's power by 50%."
|
||||
desc = "A chromosome that increases mutation power by 50%."
|
||||
icon_state = "power"
|
||||
power_coeff = 1.5
|
||||
|
||||
/obj/item/chromosome/energy
|
||||
name = "energetic chromosome"
|
||||
desc = "A chromosome that reduces cooldown on action based mutations by 50%."
|
||||
desc = "A chromosome that reduces action based mutation cooldowns by by 50%."
|
||||
icon_state = "energy"
|
||||
energy_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/reinforcer
|
||||
name = "reinforcement chromosome"
|
||||
desc = "Renders the mutation immune to mutadone."
|
||||
desc = "A chromosome that renders mutations immune to mutadone."
|
||||
icon_state = "reinforcer"
|
||||
weight = 3
|
||||
|
||||
|
||||
@@ -246,9 +246,9 @@
|
||||
|
||||
/obj/effect/chrono_field/return_air() //we always have nominal air and temperature
|
||||
var/datum/gas_mixture/GM = new
|
||||
GM.gases[/datum/gas/oxygen] = MOLES_O2STANDARD
|
||||
GM.gases[/datum/gas/nitrogen] = MOLES_N2STANDARD
|
||||
GM.temperature = T20C
|
||||
GM.set_moles(/datum/gas/oxygen, MOLES_O2STANDARD)
|
||||
GM.set_moles(/datum/gas/nitrogen, MOLES_N2STANDARD)
|
||||
GM.set_temperature(T20C)
|
||||
return GM
|
||||
|
||||
/obj/effect/chrono_field/Move()
|
||||
|
||||
@@ -794,6 +794,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
reagents.clear_reagents()
|
||||
|
||||
/obj/item/clothing/mask/vape/equipped(mob/user, slot)
|
||||
. = ..()
|
||||
if(slot == SLOT_WEAR_MASK)
|
||||
if(!screw)
|
||||
to_chat(user, "<span class='notice'>You start puffing on the vape.</span>")
|
||||
|
||||
@@ -116,9 +116,9 @@
|
||||
build_path = /obj/machinery/computer/cloning
|
||||
var/list/records = list()
|
||||
|
||||
/obj/item/circuitboard/computer/prototype_cloning
|
||||
/obj/item/circuitboard/computer/cloning/prototype
|
||||
name = "Prototype Cloning (Computer Board)"
|
||||
build_path = /obj/machinery/computer/prototype_cloning
|
||||
build_path = /obj/machinery/computer/cloning/prototype
|
||||
|
||||
/obj/item/circuitboard/computer/arcade/battle
|
||||
name = "Arcade Battle (Computer Board)"
|
||||
|
||||
@@ -48,6 +48,13 @@
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/medipen_refiller
|
||||
name = "Medipen Refiller (Machine Board)"
|
||||
icon_state = "medical"
|
||||
build_path = /obj/machinery/medipen_refiller
|
||||
req_components = list(
|
||||
/obj/item/stock_parts/matter_bin = 1)
|
||||
|
||||
/obj/item/circuitboard/machine/clonepod
|
||||
name = "Clone Pod (Machine Board)"
|
||||
build_path = /obj/machinery/clonepod
|
||||
@@ -61,6 +68,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"
|
||||
@@ -504,6 +519,10 @@
|
||||
/obj/item/stack/sheet/glass = 1)
|
||||
needs_anchored = FALSE
|
||||
|
||||
/obj/item/circuitboard/machine/hydroponics/automagic
|
||||
name = "Automatic Hydroponics Tray (Machine Board)"
|
||||
build_path = /obj/machinery/hydroponics/constructable/automagic
|
||||
|
||||
/obj/item/circuitboard/machine/seed_extractor
|
||||
name = "Seed Extractor (Machine Board)"
|
||||
build_path = /obj/machinery/seed_extractor
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
var/obj/effect/decal/cleanable/C = locate() in target
|
||||
qdel(C)
|
||||
target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
target.clean_blood()
|
||||
SEND_SIGNAL(target, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM)
|
||||
target.wash_cream()
|
||||
return
|
||||
@@ -180,4 +181,4 @@
|
||||
name = "Canned Laughter"
|
||||
desc = "Just looking at this makes you want to giggle."
|
||||
icon_state = "laughter"
|
||||
list_reagents = list(/datum/reagent/consumable/laughter = 50)
|
||||
list_reagents = list(/datum/reagent/consumable/laughter = 50)
|
||||
|
||||
@@ -188,4 +188,4 @@
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -32,6 +32,6 @@
|
||||
if(istype(I, /obj/item/gavelhammer))
|
||||
playsound(loc, 'sound/items/gavel.ogg', 100, 1)
|
||||
user.visible_message("<span class='warning'>[user] strikes [src] with [I].</span>")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -147,23 +147,23 @@
|
||||
to_chat(user, "<span class='warning'>There is not enough of [src] left!</span>")
|
||||
. = TRUE
|
||||
|
||||
/obj/item/toy/crayon/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
// tgui is a plague upon this codebase
|
||||
/obj/item/toy/crayon/ui_state(mob/user)
|
||||
return GLOB.hands_state
|
||||
|
||||
SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/item/toy/crayon/ui_interact(mob/user, datum/tgui/ui)
|
||||
// tgui is a plague upon this codebase
|
||||
// no u
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "crayon", name, 600, 600,
|
||||
master_ui, state)
|
||||
ui = new(user, src, "Crayon", name)
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
if(has_cap)
|
||||
is_capped = !is_capped
|
||||
to_chat(user, "<span class='notice'>The cap on [src] is now [is_capped ? "on" : "off"].</span>")
|
||||
update_icon()
|
||||
return TRUE
|
||||
|
||||
/obj/item/toy/crayon/CtrlClick(mob/user)
|
||||
if(can_change_colour && !isturf(loc) && user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
@@ -273,7 +273,9 @@
|
||||
. = ..()
|
||||
if(!proximity || !check_allowed_items(target))
|
||||
return
|
||||
draw_on(target, user, proximity, params)
|
||||
|
||||
/obj/item/toy/crayon/proc/draw_on(atom/target, mob/user, proximity, params)
|
||||
var/static/list/punctuation = list("!","?",".",",","/","+","-","=","%","#","&")
|
||||
|
||||
var/cost = 1
|
||||
@@ -568,9 +570,9 @@
|
||||
dye_color = DYE_RAINBOW
|
||||
charges = -1
|
||||
|
||||
/obj/item/toy/crayon/rainbow/afterattack(atom/target, mob/user, proximity, params)
|
||||
/obj/item/toy/crayon/rainbow/draw_on(atom/target, mob/user, proximity, params)
|
||||
paint_color = rgb(rand(0,255), rand(0,255), rand(0,255))
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
/*
|
||||
* Crayon Box
|
||||
@@ -693,7 +695,7 @@
|
||||
. += "It is empty."
|
||||
. += "<span class='notice'>Alt-click [src] to [ is_capped ? "take the cap off" : "put the cap on"].</span>"
|
||||
|
||||
/obj/item/toy/crayon/spraycan/afterattack(atom/target, mob/user, proximity, params)
|
||||
/obj/item/toy/crayon/spraycan/draw_on(atom/target, mob/user, proximity, params)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
@@ -737,12 +739,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)
|
||||
@@ -771,7 +768,7 @@
|
||||
desc = "A metallic container containing shiny synthesised paint."
|
||||
charges = -1
|
||||
|
||||
/obj/item/toy/crayon/spraycan/borg/afterattack(atom/target,mob/user,proximity, params)
|
||||
/obj/item/toy/crayon/spraycan/borg/draw_on(atom/target,mob/user,proximity, params)
|
||||
var/diff = ..()
|
||||
if(!iscyborg(user))
|
||||
to_chat(user, "<span class='notice'>How did you get this?</span>")
|
||||
|
||||
@@ -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?
|
||||
@@ -77,8 +77,7 @@
|
||||
/obj/item/defibrillator/ui_action_click()
|
||||
toggle_paddles()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/defibrillator/attack_hand(mob/user)
|
||||
/obj/item/defibrillator/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(loc == user)
|
||||
if(slot_flags == ITEM_SLOT_BACK)
|
||||
if(user.get_item_by_slot(SLOT_BACK) == src)
|
||||
@@ -106,7 +105,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 +168,6 @@
|
||||
return
|
||||
else
|
||||
//Remove from their hands and back onto the defib unit
|
||||
paddles.unwield()
|
||||
remove_paddles(user)
|
||||
|
||||
update_power()
|
||||
@@ -179,7 +176,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 +253,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 +280,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 +332,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 +344,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 +425,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 +436,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 +464,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 +519,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()
|
||||
@@ -619,6 +618,13 @@
|
||||
if(req_defib)
|
||||
if(defib.healdisk)
|
||||
H.heal_overall_damage(25, 25)
|
||||
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
|
||||
var/timelimit = CONFIG_GET(number/defib_cmd_time_limit)
|
||||
var/late = timelimit && (tplus > timelimit)
|
||||
var/policy = late? policies[POLICYCONFIG_ON_DEFIB_LATE] : policies[POLICYCONFIG_ON_DEFIB_INTACT]
|
||||
if(policy)
|
||||
to_chat(H, policy)
|
||||
H.log_message("revived using a defibrillator, [tplus] deciseconds from time of death, considered [late? "late" : "memory-intact"] revival under configured policy limits.", LOG_GAME)
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
cooldown = 1
|
||||
@@ -677,14 +683,14 @@
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/twohanded/shockpaddles/cyborg
|
||||
/obj/item/shockpaddles/cyborg
|
||||
name = "cyborg defibrillator paddles"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = FALSE
|
||||
|
||||
/obj/item/twohanded/shockpaddles/cyborg/attack(mob/M, mob/user)
|
||||
/obj/item/shockpaddles/cyborg/attack(mob/M, mob/user)
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.emagged)
|
||||
@@ -696,7 +702,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
|
||||
|
||||
@@ -437,7 +437,6 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
dat += "Unable to obtain a reading.<br>"
|
||||
else
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/list/env_gases = environment.gases
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
@@ -445,12 +444,12 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
dat += "Air Pressure: [round(pressure,0.1)] kPa<br>"
|
||||
|
||||
if (total_moles)
|
||||
for(var/id in env_gases)
|
||||
var/gas_level = env_gases[id]/total_moles
|
||||
for(var/id in environment.get_gases())
|
||||
var/gas_level = environment.get_moles(id)/total_moles
|
||||
if(gas_level > 0)
|
||||
dat += "[GLOB.meta_gas_names[id]]: [round(gas_level*100, 0.01)]%<br>"
|
||||
|
||||
dat += "Temperature: [round(environment.temperature-T0C)]°C<br>"
|
||||
dat += "Temperature: [round(environment.return_temperature()-T0C)]°C<br>"
|
||||
dat += "<br>"
|
||||
else//Else it links to the cart menu proc. Although, it really uses menu hub 4--menu 4 doesn't really exist as it simply redirects to hub.
|
||||
dat += cartridge.generate_menu()
|
||||
@@ -1028,6 +1027,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
else if(is_type_in_list(C, contained_item)) //Checks if there is a pen
|
||||
if(inserted_item)
|
||||
to_chat(user, "<span class='warning'>There is already \a [inserted_item] in \the [src]!</span>")
|
||||
return ..()
|
||||
else
|
||||
if(!user.transferItemToLoc(C, src))
|
||||
return
|
||||
|
||||
@@ -54,18 +54,20 @@
|
||||
name = initial(name)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/aicard/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.hands_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/item/aicard/ui_state(mob/user)
|
||||
return GLOB.hands_state
|
||||
|
||||
/obj/item/aicard/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "intellicard", name, 500, 500, master_ui, state)
|
||||
ui = new(user, src, "Intellicard", name)
|
||||
ui.open()
|
||||
|
||||
/obj/item/aicard/ui_data()
|
||||
var/list/data = list()
|
||||
if(AI)
|
||||
data["name"] = AI.name
|
||||
data["laws"] = AI.laws.get_law_list(include_zeroth = 1)
|
||||
data["laws"] = AI.laws.get_law_list(include_zeroth = TRUE, render_html = FALSE)
|
||||
data["health"] = (AI.health + 100) / 2
|
||||
data["wireless"] = !AI.control_disabled //todo disabled->enabled
|
||||
data["radio"] = AI.radio_enabled
|
||||
@@ -86,19 +88,19 @@
|
||||
if(confirm == "Yes" && !..())
|
||||
flush = TRUE
|
||||
if(AI && AI.loc == src)
|
||||
to_chat(AI, "Your core files are being wiped!")
|
||||
to_chat(AI, "<span class='userdanger'>Your core files are being wiped!</span>")
|
||||
while(AI.stat != DEAD && flush)
|
||||
AI.adjustOxyLoss(1)
|
||||
AI.adjustOxyLoss(5)
|
||||
AI.updatehealth()
|
||||
sleep(5)
|
||||
flush = FALSE
|
||||
. = TRUE
|
||||
if("wireless")
|
||||
AI.control_disabled = !AI.control_disabled
|
||||
to_chat(AI, "[src]'s wireless port has been [AI.control_disabled ? "disabled" : "enabled"]!")
|
||||
to_chat(AI, "<span class='warning'>[src]'s wireless port has been [AI.control_disabled ? "disabled" : "enabled"]!</span>")
|
||||
. = TRUE
|
||||
if("radio")
|
||||
AI.radio_enabled = !AI.radio_enabled
|
||||
to_chat(AI, "Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!")
|
||||
to_chat(AI, "<span class='warning'>Your Subspace Transceiver has been [AI.radio_enabled ? "enabled" : "disabled"]!</span>")
|
||||
. = TRUE
|
||||
update_icon()
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
/obj/effect/dummy/chameleon/attackby()
|
||||
master.disrupt()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/effect/dummy/chameleon/attack_hand()
|
||||
/obj/effect/dummy/chameleon/on_attack_hand()
|
||||
master.disrupt()
|
||||
|
||||
/obj/effect/dummy/chameleon/attack_animal()
|
||||
|
||||
@@ -116,8 +116,6 @@
|
||||
if(!hound)
|
||||
go_out(user)
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
if(user.a_intent == INTENT_HELP)
|
||||
return
|
||||
var/voracious = TRUE
|
||||
@@ -165,12 +163,13 @@
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/dogborg/sleeper/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
/obj/item/dogborg/sleeper/ui_state(mob/user)
|
||||
return GLOB.notcontained_state
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/item/dogborg/sleeper/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "dogborg_sleeper", name, 375, 550, master_ui, state)
|
||||
ui = new(user, src, "dogborg_sleeper", name, 375, 550) //UI DOES NOT EXIST
|
||||
ui.open()
|
||||
|
||||
/obj/item/dogborg/sleeper/ui_data()
|
||||
|
||||
@@ -183,9 +183,21 @@
|
||||
var/T = get_turf(target)
|
||||
if(locate(/mob/living) in T)
|
||||
new /obj/effect/temp_visual/medical_holosign(T,user) //produce a holographic glow
|
||||
holo_cooldown = world.time + 100
|
||||
holo_cooldown = world.time + 10 SECONDS
|
||||
return
|
||||
|
||||
// see: [/datum/wound/burn/proc/uv()]
|
||||
/obj/item/flashlight/pen/paramedic
|
||||
name = "paramedic penlight"
|
||||
desc = "A high-powered UV penlight intended to help stave off infection in the field on serious burned patients. Probably really bad to look into."
|
||||
icon_state = "penlight_surgical"
|
||||
/// Our current UV cooldown
|
||||
var/uv_cooldown = 0
|
||||
/// How long between UV fryings
|
||||
var/uv_cooldown_length = 1 MINUTES
|
||||
/// How much sanitization to apply to the burn wound
|
||||
var/uv_power = 1
|
||||
|
||||
/obj/effect/temp_visual/medical_holosign
|
||||
name = "medical holosign"
|
||||
desc = "A small holographic glow that indicates a medic is coming to treat a patient."
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
user.visible_message("<span class='warning'>[user] projects a forcefield!</span>","<span class='notice'>You project a forcefield.</span>")
|
||||
var/obj/structure/projected_forcefield/F = new(T, src)
|
||||
current_fields += F
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
|
||||
/obj/item/forcefield_projector/attack_self(mob/user)
|
||||
if(LAZYLEN(current_fields))
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
rad_flags = RAD_NO_CONTAMINATE
|
||||
custom_materials = list(/datum/material/iron = 150, /datum/material/glass = 150)
|
||||
|
||||
var/grace = RAD_GRACE_PERIOD
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
GLOBAL_LIST_EMPTY(GPS_list)
|
||||
|
||||
/obj/item/gps
|
||||
name = "global positioning system"
|
||||
desc = "Helping lost spacemen find their way through the planets since 2016."
|
||||
@@ -8,138 +8,10 @@ GLOBAL_LIST_EMPTY(GPS_list)
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
obj_flags = UNIQUE_RENAME
|
||||
var/gpstag = "COM0"
|
||||
var/emped = FALSE
|
||||
var/tracking = TRUE
|
||||
var/updating = TRUE //Automatic updating of GPS list. Can be set to manual by user.
|
||||
var/global_mode = TRUE //If disabled, only GPS signals of the same Z level are shown
|
||||
|
||||
/obj/item/gps/examine(mob/user)
|
||||
. = ..()
|
||||
var/turf/curr = get_turf(src)
|
||||
. += "The screen says: [get_area_name(curr, TRUE)] ([curr.x], [curr.y], [curr.z])"
|
||||
. += "<span class='notice'>Alt-click to switch it [tracking ? "off":"on"].</span>"
|
||||
|
||||
/obj/item/gps/Initialize()
|
||||
. = ..()
|
||||
GLOB.GPS_list += src
|
||||
name = "global positioning system ([gpstag])"
|
||||
add_overlay("working")
|
||||
|
||||
/obj/item/gps/Destroy()
|
||||
GLOB.GPS_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/gps/emp_act(severity)
|
||||
. = ..()
|
||||
if (. & EMP_PROTECT_SELF)
|
||||
return
|
||||
emped = TRUE
|
||||
cut_overlay("working")
|
||||
add_overlay("emp")
|
||||
addtimer(CALLBACK(src, .proc/reboot), 300, TIMER_UNIQUE|TIMER_OVERRIDE) //if a new EMP happens, remove the old timer so it doesn't reactivate early
|
||||
SStgui.close_uis(src) //Close the UI control if it is open.
|
||||
|
||||
/obj/item/gps/proc/reboot()
|
||||
emped = FALSE
|
||||
cut_overlay("emp")
|
||||
add_overlay("working")
|
||||
|
||||
/obj/item/gps/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
toggletracking(user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/gps/proc/toggletracking(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE))
|
||||
return //user not valid to use gps
|
||||
if(emped)
|
||||
to_chat(user, "It's busted!")
|
||||
return
|
||||
if(tracking)
|
||||
cut_overlay("working")
|
||||
to_chat(user, "[src] is no longer tracking, or visible to other GPS devices.")
|
||||
tracking = FALSE
|
||||
else
|
||||
add_overlay("working")
|
||||
to_chat(user, "[src] is now tracking, and visible to other GPS devices.")
|
||||
tracking = TRUE
|
||||
|
||||
|
||||
/obj/item/gps/ui_interact(mob/user, ui_key = "gps", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) // Remember to use the appropriate state.
|
||||
if(emped)
|
||||
to_chat(user, "[src] fizzles weakly.")
|
||||
return
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
// Variable window height, depending on how many GPS units there are
|
||||
// to show, clamped to relatively safe range.
|
||||
var/gps_window_height = clamp(325 + GLOB.GPS_list.len * 14, 325, 700)
|
||||
ui = new(user, src, ui_key, "gps", "Global Positioning System", 470, gps_window_height, master_ui, state) //width, height
|
||||
ui.open()
|
||||
|
||||
ui.set_autoupdate(state = updating)
|
||||
|
||||
|
||||
/obj/item/gps/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["power"] = tracking
|
||||
data["tag"] = gpstag
|
||||
data["updating"] = updating
|
||||
data["globalmode"] = global_mode
|
||||
if(!tracking || emped) //Do not bother scanning if the GPS is off or EMPed
|
||||
return data
|
||||
|
||||
var/turf/curr = get_turf(src)
|
||||
data["current"] = "[get_area_name(curr, TRUE)] ([curr.x], [curr.y], [curr.z])"
|
||||
data["currentArea"] = "[get_area_name(curr, TRUE)]"
|
||||
data["currentCoords"] = "[curr.x], [curr.y], [curr.z]"
|
||||
|
||||
var/list/signals = list()
|
||||
data["signals"] = list()
|
||||
|
||||
for(var/gps in GLOB.GPS_list)
|
||||
var/obj/item/gps/G = gps
|
||||
if(G.emped || !G.tracking || G == src)
|
||||
continue
|
||||
var/turf/pos = get_turf(G)
|
||||
if(!global_mode && pos.z != curr.z)
|
||||
continue
|
||||
var/list/signal = list()
|
||||
signal["entrytag"] = G.gpstag //Name or 'tag' of the GPS
|
||||
signal["coords"] = "[pos.x], [pos.y], [pos.z]"
|
||||
if(pos.z == curr.z) //Distance/Direction calculations for same z-level only
|
||||
signal["dist"] = max(get_dist(curr, pos), 0) //Distance between the src and remote GPS turfs
|
||||
signal["degrees"] = round(Get_Angle(curr, pos)) //0-360 degree directional bearing, for more precision.
|
||||
|
||||
signals += list(signal) //Add this signal to the list of signals
|
||||
data["signals"] = signals
|
||||
return data
|
||||
|
||||
|
||||
|
||||
/obj/item/gps/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("rename")
|
||||
var/a = input("Please enter desired tag.", name, gpstag) as text
|
||||
a = copytext(sanitize(a), 1, 20)
|
||||
gpstag = a
|
||||
. = TRUE
|
||||
name = "global positioning system ([gpstag])"
|
||||
|
||||
if("power")
|
||||
toggletracking(usr)
|
||||
. = TRUE
|
||||
if("updating")
|
||||
updating = !updating
|
||||
. = TRUE
|
||||
if("globalmode")
|
||||
global_mode = !global_mode
|
||||
. = TRUE
|
||||
|
||||
AddComponent(/datum/component/gps/item, gpstag)
|
||||
|
||||
/obj/item/gps/science
|
||||
icon_state = "gps-s"
|
||||
|
||||
@@ -263,3 +263,11 @@
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "multitool"
|
||||
toolspeed = 0.2
|
||||
|
||||
/obj/item/multitool/advanced/brass
|
||||
name = "clockwork multitool"
|
||||
desc = "A brass...multitool? With three prongs arcing electricity between them. It vibrates subtly in your hand."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "clockitool"
|
||||
toolspeed = 0.2
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/stack/circuit_stack/attack_self(mob/user)// Prevents the crafting menu, and tells you how to use it.
|
||||
to_chat(user, "<span class='warning'>You can't use [src] by itself, you'll have to try and remove one of these circuits by hand... carefully.</span>")
|
||||
|
||||
/obj/item/stack/circuit_stack/attack_hand(mob/user)
|
||||
/obj/item/stack/circuit_stack/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!user.get_inactive_held_item() == src)
|
||||
return ..()
|
||||
|
||||
@@ -97,10 +97,7 @@ GLOBAL_LIST_EMPTY(power_sinks)
|
||||
/obj/item/powersink/attack_ai()
|
||||
return
|
||||
|
||||
/obj/item/powersink/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/item/powersink/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
switch(mode)
|
||||
if(DISCONNECTED)
|
||||
..()
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
var/on = TRUE
|
||||
var/shock_cooldown = FALSE
|
||||
|
||||
var/ui_x = 260
|
||||
var/ui_y = 137
|
||||
|
||||
/obj/item/electropack/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] hooks [user.p_them()]self to the electropack and spams the trigger! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (FIRELOSS)
|
||||
@@ -26,10 +29,9 @@
|
||||
|
||||
/obj/item/electropack/Destroy()
|
||||
SSradio.remove_object(src, frequency)
|
||||
. = ..()
|
||||
return ..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/electropack/attack_hand(mob/user)
|
||||
/obj/item/electropack/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(src == C.back)
|
||||
@@ -37,7 +39,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/electropack/attackby(obj/item/W, mob/living/user, params)
|
||||
/obj/item/electropack/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/clothing/head/helmet))
|
||||
var/obj/item/assembly/shock_kit/A = new /obj/item/assembly/shock_kit(user)
|
||||
A.icon = 'icons/obj/assemblies.dmi'
|
||||
@@ -57,56 +59,12 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/electropack/Topic(href, href_list)
|
||||
var/mob/living/carbon/C = usr
|
||||
if(usr.stat || usr.restrained() || C.back == src)
|
||||
return
|
||||
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
usr << browse(null, "window=radio")
|
||||
onclose(usr, "radio")
|
||||
return
|
||||
|
||||
if(href_list["set"])
|
||||
if(href_list["set"] == "freq")
|
||||
var/new_freq = input(usr, "Input a new receiving frequency", "Electropack Frequency", format_frequency(frequency)) as num|null
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
new_freq = unformat_frequency(new_freq)
|
||||
new_freq = sanitize_frequency(new_freq, TRUE)
|
||||
set_frequency(new_freq)
|
||||
|
||||
if(href_list["set"] == "code")
|
||||
var/new_code = input(usr, "Input a new receiving code", "Electropack Code", code) as num|null
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
new_code = round(new_code)
|
||||
new_code = clamp(new_code, 1, 100)
|
||||
code = new_code
|
||||
|
||||
if(href_list["set"] == "power")
|
||||
if(!usr.canUseTopic(src, BE_CLOSE))
|
||||
return
|
||||
on = !(on)
|
||||
icon_state = "electropack[on]"
|
||||
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
|
||||
return
|
||||
|
||||
/obj/item/electropack/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
SSradio.add_object(src, frequency, RADIO_SIGNALER)
|
||||
return
|
||||
|
||||
/obj/item/electropack/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.data["code"] != code)
|
||||
return
|
||||
|
||||
if(isliving(loc) && on)
|
||||
if(shock_cooldown == TRUE)
|
||||
if(shock_cooldown)
|
||||
return
|
||||
shock_cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, shock_cooldown, FALSE), 100)
|
||||
@@ -122,28 +80,59 @@
|
||||
|
||||
if(master)
|
||||
master.receive_signal()
|
||||
return
|
||||
|
||||
/obj/item/electropack/ui_interact(mob/user)
|
||||
if(!ishuman(user))
|
||||
/obj/item/electropack/proc/set_frequency(new_frequency)
|
||||
SSradio.remove_object(src, frequency)
|
||||
frequency = new_frequency
|
||||
SSradio.add_object(src, frequency, RADIO_SIGNALER)
|
||||
|
||||
/obj/item/electropack/ui_state(mob/user)
|
||||
return GLOB.hands_state
|
||||
|
||||
/obj/item/electropack/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Electropack", name)
|
||||
ui.open()
|
||||
|
||||
/obj/item/electropack/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["power"] = on
|
||||
data["frequency"] = frequency
|
||||
data["code"] = code
|
||||
data["minFrequency"] = MIN_FREE_FREQ
|
||||
data["maxFrequency"] = MAX_FREE_FREQ
|
||||
return data
|
||||
|
||||
/obj/item/electropack/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
<TT>
|
||||
Turned [on ? "On" : "Off"] - <A href='?src=[REF(src)];set=power'>Toggle</A><BR>
|
||||
<B>Frequency/Code</B> for electropack:<BR>
|
||||
Frequency:
|
||||
[format_frequency(src.frequency)]
|
||||
<A href='byond://?src=[REF(src)];set=freq'>Set</A><BR>
|
||||
switch(action)
|
||||
if("power")
|
||||
on = !on
|
||||
icon_state = "electropack[on]"
|
||||
. = TRUE
|
||||
if("freq")
|
||||
var/value = unformat_frequency(params["freq"])
|
||||
if(value)
|
||||
frequency = sanitize_frequency(value, TRUE)
|
||||
set_frequency(frequency)
|
||||
. = TRUE
|
||||
if("code")
|
||||
var/value = text2num(params["code"])
|
||||
if(value)
|
||||
value = round(value)
|
||||
code = clamp(value, 1, 100)
|
||||
. = TRUE
|
||||
if("reset")
|
||||
if(params["reset"] == "freq")
|
||||
frequency = initial(frequency)
|
||||
. = TRUE
|
||||
else if(params["reset"] == "code")
|
||||
code = initial(code)
|
||||
. = TRUE
|
||||
|
||||
Code:
|
||||
[src.code]
|
||||
<A href='byond://?src=[REF(src)];set=code'>Set</A><BR>
|
||||
</TT>"}
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
/obj/item/electropack/shockcollar
|
||||
name = "shock collar"
|
||||
@@ -153,7 +142,7 @@ Code:
|
||||
icon_state = "shockcollar"
|
||||
item_state = "shockcollar"
|
||||
body_parts_covered = NECK
|
||||
slot_flags = ITEM_SLOT_NECK | ITEM_SLOT_DENYPOCKET //no more pocket shockers
|
||||
slot_flags = ITEM_SLOT_NECK //no more pocket shockers. Now done without lazyness
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
strip_delay = 60
|
||||
equip_delay_other = 60
|
||||
@@ -169,22 +158,24 @@ Code:
|
||||
materials = list(/datum/material/iron = 5000, /datum/material/glass =2000)
|
||||
category = list("hacked", "Misc")
|
||||
|
||||
/obj/item/electropack/shockcollar/attack_hand(mob/user)
|
||||
/obj/item/electropack/shockcollar/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(loc == user && user.get_item_by_slot(SLOT_NECK))
|
||||
to_chat(user, "<span class='warning'>The collar is fastened tight! You'll need help taking this off!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/electropack/shockcollar/receive_signal(datum/signal/signal)
|
||||
/obj/item/electropack/shockcollar/receive_signal(datum/signal/signal) //we have to override this because of text
|
||||
if(!signal || signal.data["code"] != code)
|
||||
return
|
||||
|
||||
if(isliving(loc) && on)
|
||||
if(isliving(loc) && on) //the "on" arg is currently useless
|
||||
var/mob/living/L = loc
|
||||
if(!L.get_item_by_slot(SLOT_NECK)) //**properly** stops pocket shockers
|
||||
return
|
||||
if(shock_cooldown == TRUE)
|
||||
return
|
||||
shock_cooldown = TRUE
|
||||
addtimer(VARSET_CALLBACK(src, shock_cooldown, FALSE), 100)
|
||||
var/mob/living/L = loc
|
||||
step(L, pick(GLOB.cardinals))
|
||||
|
||||
to_chat(L, "<span class='danger'>You feel a sharp shock from the collar!</span>")
|
||||
@@ -204,10 +195,13 @@ Code:
|
||||
if(t)
|
||||
tagname = t
|
||||
name = "[initial(name)] - [t]"
|
||||
return
|
||||
if(istype(W, /obj/item/clothing/head/helmet)) //lazy method of denying this
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/electropack/shockcollar/ui_interact(mob/user) //on_click calls this
|
||||
/obj/item/electropack/shockcollar/ui_interact(mob/user) //note to src: use tgooey
|
||||
var/dat = {"
|
||||
<TT>
|
||||
<B>Frequency/Code</B> for shock collar:<BR>
|
||||
|
||||
@@ -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 "
|
||||
|
||||
@@ -86,10 +86,7 @@
|
||||
/obj/item/radio/intercom/attack_ai(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/radio/intercom/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/item/radio/intercom/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
interact(user)
|
||||
|
||||
/obj/item/radio/intercom/interact(mob/user)
|
||||
|
||||
@@ -107,19 +107,15 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/radio/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
. = ..()
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/item/radio/ui_state(mob/user)
|
||||
return GLOB.inventory_state
|
||||
|
||||
/obj/item/radio/ui_interact(mob/user, datum/tgui/ui, datum/ui_state/state)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
var/ui_width = 360
|
||||
var/ui_height = 106
|
||||
if(subspace_transmission)
|
||||
if(channels.len > 0)
|
||||
ui_height += 6 + channels.len * 21
|
||||
else
|
||||
ui_height += 24
|
||||
ui = new(user, src, ui_key, "radio", name, ui_width, ui_height, master_ui, state)
|
||||
ui = new(user, src, "Radio", name)
|
||||
if(state)
|
||||
ui.set_state(state)
|
||||
ui.open()
|
||||
|
||||
/obj/item/radio/ui_data(mob/user)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
to_chat(loc, "<span class='userdanger'>*ding*</span>")
|
||||
addtimer(CALLBACK(src, .proc/snap), 2)
|
||||
|
||||
/obj/item/reverse_bear_trap/attack_hand(mob/user)
|
||||
/obj/item/reverse_bear_trap/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
if(C.get_item_by_slot(SLOT_HEAD) == src)
|
||||
|
||||
@@ -10,6 +10,14 @@ NANITE SCANNER
|
||||
GENETICS SCANNER
|
||||
|
||||
*/
|
||||
|
||||
// Describes the three modes of scanning available for health analyzers
|
||||
#define SCANMODE_HEALTH 0
|
||||
#define SCANMODE_CHEMICAL 1
|
||||
#define SCANMODE_WOUND 2
|
||||
#define SCANNER_CONDENSED 0
|
||||
#define SCANNER_VERBOSE 1
|
||||
|
||||
/obj/item/t_scanner
|
||||
name = "\improper T-ray scanner"
|
||||
desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes."
|
||||
@@ -80,7 +88,7 @@ GENETICS SCANNER
|
||||
throw_range = 7
|
||||
custom_materials = list(/datum/material/iron=200)
|
||||
var/mode = 1
|
||||
var/scanmode = 0
|
||||
var/scanmode = SCANMODE_HEALTH
|
||||
var/advanced = FALSE
|
||||
|
||||
/obj/item/healthanalyzer/suicide_act(mob/living/carbon/user)
|
||||
@@ -88,37 +96,40 @@ GENETICS SCANNER
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/healthanalyzer/attack_self(mob/user)
|
||||
if(!scanmode)
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>")
|
||||
scanmode = 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to check physical health.</span>")
|
||||
scanmode = 0
|
||||
scanmode = (scanmode + 1) % 3
|
||||
switch(scanmode)
|
||||
if(SCANMODE_HEALTH)
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to check physical health.</span>")
|
||||
if(SCANMODE_CHEMICAL)
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to scan chemical contents.</span>")
|
||||
if(SCANMODE_WOUND)
|
||||
to_chat(user, "<span class='notice'>You switch the health analyzer to report extra info on wounds.</span>")
|
||||
|
||||
/obj/item/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
|
||||
flick("[icon_state]-scan", src) //makes it so that it plays the scan animation upon scanning, including clumsy scanning
|
||||
|
||||
// Clumsiness/brain damage check
|
||||
if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50))
|
||||
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
||||
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
|
||||
var/msg = "<span class='info'>*---------*\nAnalyzing results for The floor:\n\tOverall status: <b>Healthy</b>\n"
|
||||
msg += "Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font>\n"
|
||||
msg += "\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font>\n"
|
||||
msg += "Body temperature: ???\n"
|
||||
msg += "*---------*</span>"
|
||||
to_chat(user, msg)
|
||||
user.visible_message("<span class='warning'>[user] analyzes the floor's vitals!</span>", \
|
||||
"<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
||||
to_chat(user, "<span class='info'>Analyzing results for The floor:\n\tOverall status: <b>Healthy</b></span>\
|
||||
\n<span class='info'>Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FF8000'>Burn</font>/<font color='red'>Brute</font></span>\
|
||||
\n<span class='info'>\tDamage specifics: <font color='blue'>0</font>-<font color='green'>0</font>-<font color='#FF8000'>0</font>-<font color='red'>0</font></span>\
|
||||
\n<span class='info'>Body temperature: ???</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.</span>")
|
||||
user.visible_message("<span class='notice'>[user] analyzes [M]'s vitals.</span>", \
|
||||
"<span class='notice'>You analyze [M]'s vitals.</span>")
|
||||
|
||||
if(scanmode == 0)
|
||||
if(scanmode == SCANMODE_HEALTH)
|
||||
healthscan(user, M, mode, advanced)
|
||||
else if(scanmode == 1)
|
||||
else if(scanmode == SCANMODE_CHEMICAL)
|
||||
chemscan(user, M)
|
||||
else
|
||||
woundscan(user, M, src)
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
|
||||
// Used by the PDA medical scanner too
|
||||
/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE)
|
||||
if(isliving(user) && (user.incapacitated() || user.eye_blind))
|
||||
@@ -402,6 +413,17 @@ GENETICS SCANNER
|
||||
msg += "<span class='danger'> Intervention recommended.</span>\n"
|
||||
else
|
||||
msg += "\n"
|
||||
// Wounds
|
||||
if(iscarbon(M))
|
||||
var/mob/living/carbon/C = M
|
||||
var/list/wounded_parts = C.get_wounded_bodyparts()
|
||||
for(var/i in wounded_parts)
|
||||
var/obj/item/bodypart/wounded_part = i
|
||||
msg += "<span class='alert ml-1'><b>Warning: Physical trauma[LAZYLEN(wounded_part.wounds) > 1? "s" : ""] detected in [wounded_part.name]</b>"
|
||||
for(var/k in wounded_part.wounds)
|
||||
var/datum/wound/W = k
|
||||
msg += "<div class='ml-2'>Type: [W.name]\nSeverity: [W.severity_text()]\nRecommended Treatment: [W.treat_text]</div>\n" // less lines than in woundscan() so we don't overload people trying to get basic med info
|
||||
msg += "</span>\n"
|
||||
|
||||
for(var/thing in M.diseases)
|
||||
var/datum/disease/D = thing
|
||||
@@ -414,7 +436,7 @@ GENETICS SCANNER
|
||||
var/blood_typepath = C.get_blood_id()
|
||||
if(blood_typepath)
|
||||
if(ishuman(C))
|
||||
if(H.bleed_rate)
|
||||
if(H.is_bleeding())
|
||||
msg += "<span class='danger'>Subject is bleeding!</span>\n"
|
||||
var/blood_percent = round((C.scan_blood_volume() / (BLOOD_VOLUME_NORMAL * C.blood_ratio))*100)
|
||||
var/blood_type = C.dna.blood_type
|
||||
@@ -505,6 +527,67 @@ GENETICS SCANNER
|
||||
desc = "A hand-held body scanner able to distinguish vital signs of the subject with high accuracy."
|
||||
advanced = TRUE
|
||||
|
||||
/// Displays wounds with extended information on their status vs medscanners
|
||||
/proc/woundscan(mob/user, mob/living/carbon/patient, obj/item/healthanalyzer/wound/scanner)
|
||||
if(!istype(patient))
|
||||
return
|
||||
|
||||
var/render_list = ""
|
||||
for(var/i in patient.get_wounded_bodyparts())
|
||||
var/obj/item/bodypart/wounded_part = i
|
||||
render_list += "<span class='alert ml-1'><b>Warning: Physical trauma[LAZYLEN(wounded_part.wounds) > 1? "s" : ""] detected in [wounded_part.name]</b>"
|
||||
for(var/k in wounded_part.wounds)
|
||||
var/datum/wound/W = k
|
||||
render_list += "<div class='ml-2'>[W.get_scanner_description()]</div>\n"
|
||||
render_list += "</span>"
|
||||
|
||||
if(render_list == "")
|
||||
if(istype(scanner))
|
||||
// Only emit the cheerful scanner message if this scan came from a scanner
|
||||
playsound(scanner, 'sound/machines/ping.ogg', 50, FALSE)
|
||||
to_chat(user, "<span class='notice'>\The [scanner] makes a happy ping and briefly displays a smiley face with several exclamation points! It's really excited to report that [patient] has no wounds!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice ml-1'>No wounds detected in subject.</span>")
|
||||
else
|
||||
to_chat(user, jointext(render_list, ""))
|
||||
|
||||
/obj/item/healthanalyzer/wound
|
||||
name = "first aid analyzer"
|
||||
icon_state = "adv_spectrometer"
|
||||
desc = "A prototype MeLo-Tech medical scanner used to diagnose injuries and recommend treatment for serious wounds, but offers no further insight into the patient's health. You hope the final version is less annoying to read!"
|
||||
var/next_encouragement
|
||||
var/greedy
|
||||
|
||||
/obj/item/healthanalyzer/wound/attack_self(mob/user)
|
||||
if(next_encouragement < world.time)
|
||||
playsound(src, 'sound/machines/ping.ogg', 50, FALSE)
|
||||
var/list/encouragements = list("briefly displays a happy face, gazing emptily at you", "briefly displays a spinning cartoon heart", "displays an encouraging message about eating healthy and exercising", \
|
||||
"reminds you that everyone is doing their best", "displays a message wishing you well", "displays a sincere thank-you for your interest in first-aid", "formally absolves you of all your sins")
|
||||
to_chat(user, "<span class='notice'>\The [src] makes a happy ping and [pick(encouragements)]!</span>")
|
||||
next_encouragement = world.time + 10 SECONDS
|
||||
greedy = FALSE
|
||||
else if(!greedy)
|
||||
to_chat(user, "<span class='warning'>\The [src] displays an eerily high-definition frowny face, chastizing you for asking it for too much encouragement.</span>")
|
||||
greedy = TRUE
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, FALSE)
|
||||
if(isliving(user))
|
||||
var/mob/living/L = user
|
||||
to_chat(L, "<span class='warning'>\The [src] makes a disappointed buzz and pricks your finger for being greedy. Ow!</span>")
|
||||
L.adjustBruteLoss(4)
|
||||
L.dropItemToGround(src)
|
||||
|
||||
/obj/item/healthanalyzer/wound/attack(mob/living/carbon/patient, mob/living/carbon/human/user)
|
||||
add_fingerprint(user)
|
||||
user.visible_message("<span class='notice'>[user] scans [patient] for serious injuries.</span>", "<span class='notice'>You scan [patient] for serious injuries.</span>")
|
||||
|
||||
if(!istype(patient))
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
|
||||
to_chat(user, "<span class='notice'>\The [src] makes a sad buzz and briefly displays a frowny face, indicating it can't scan [patient].</span>")
|
||||
return
|
||||
|
||||
woundscan(user, patient, src)
|
||||
|
||||
/obj/item/analyzer
|
||||
desc = "A hand-held environmental scanner which reports current gas levels. Alt-Click to use the built in barometer function."
|
||||
name = "analyzer"
|
||||
@@ -541,57 +624,13 @@ GENETICS SCANNER
|
||||
if (user.stat || user.eye_blind)
|
||||
return
|
||||
|
||||
var/turf/location = user.loc
|
||||
//Functionality moved down to proc/scan_turf()
|
||||
var/turf/location = get_turf(user)
|
||||
if(!istype(location))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
|
||||
to_chat(user, "<span class='info'><B>Results:</B></span>")
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
to_chat(user, "<span class='info'>Pressure: [round(pressure, 0.01)] kPa</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Pressure: [round(pressure, 0.01)] kPa</span>")
|
||||
if(total_moles)
|
||||
var/list/env_gases = environment.gases
|
||||
|
||||
var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles
|
||||
var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles
|
||||
var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles
|
||||
var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles
|
||||
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)</span>")
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)</span>")
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)</span>")
|
||||
|
||||
if(plasma_concentration > 0.005)
|
||||
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)</span>")
|
||||
|
||||
GAS_GARBAGE_COLLECT(environment.gases)
|
||||
|
||||
for(var/id in env_gases)
|
||||
if(id in GLOB.hardcoded_gases)
|
||||
continue
|
||||
var/gas_concentration = env_gases[id]/total_moles
|
||||
to_chat(user, "<span class='alert'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)</span>")
|
||||
|
||||
|
||||
scan_turf(user, location)
|
||||
|
||||
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
|
||||
. = ..()
|
||||
|
||||
@@ -670,7 +709,7 @@ GENETICS SCANNER
|
||||
var/total_moles = air_contents.total_moles()
|
||||
var/pressure = air_contents.return_pressure()
|
||||
var/volume = air_contents.return_volume() //could just do mixture.volume... but safety, I guess?
|
||||
var/temperature = air_contents.temperature
|
||||
var/temperature = air_contents.return_temperature()
|
||||
var/cached_scan_results = air_contents.analyzer_results
|
||||
|
||||
if(total_moles > 0)
|
||||
@@ -678,10 +717,9 @@ GENETICS SCANNER
|
||||
to_chat(user, "<span class='notice'>Volume: [volume] L</span>")
|
||||
to_chat(user, "<span class='notice'>Pressure: [round(pressure,0.01)] kPa</span>")
|
||||
|
||||
var/list/cached_gases = air_contents.gases
|
||||
for(var/id in cached_gases)
|
||||
var/gas_concentration = cached_gases[id]/total_moles
|
||||
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)</span>")
|
||||
for(var/id in air_contents.get_gases())
|
||||
var/gas_concentration = air_contents.get_moles(id)/total_moles
|
||||
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(air_contents.get_moles(id), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='notice'>Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)</span>")
|
||||
|
||||
else
|
||||
@@ -697,6 +735,73 @@ GENETICS SCANNER
|
||||
to_chat(user, "<span class='notice'>Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.</span>")
|
||||
return
|
||||
|
||||
/obj/item/analyzer/proc/scan_turf(mob/user, turf/location)
|
||||
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
var/cached_scan_results = environment.analyzer_results
|
||||
|
||||
to_chat(user, "<span class='info'><B>Results:</B></span>")
|
||||
if(abs(pressure - ONE_ATMOSPHERE) < 10)
|
||||
to_chat(user, "<span class='info'>Pressure: [round(pressure, 0.01)] kPa</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Pressure: [round(pressure, 0.01)] kPa</span>")
|
||||
if(total_moles)
|
||||
|
||||
var/o2_concentration = environment.get_moles(/datum/gas/oxygen)/total_moles
|
||||
var/n2_concentration = environment.get_moles(/datum/gas/nitrogen)/total_moles
|
||||
var/co2_concentration = environment.get_moles(/datum/gas/carbon_dioxide)/total_moles
|
||||
var/plasma_concentration = environment.get_moles(/datum/gas/plasma)/total_moles
|
||||
|
||||
if(abs(n2_concentration - N2STANDARD) < 20)
|
||||
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/nitrogen), 0.01)] mol)</span>")
|
||||
|
||||
if(abs(o2_concentration - O2STANDARD) < 2)
|
||||
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/oxygen), 0.01)] mol)</span>")
|
||||
|
||||
if(co2_concentration > 0.01)
|
||||
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/carbon_dioxide), 0.01)] mol)</span>")
|
||||
|
||||
if(plasma_concentration > 0.005)
|
||||
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)</span>")
|
||||
else
|
||||
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(environment.get_moles(/datum/gas/plasma), 0.01)] mol)</span>")
|
||||
|
||||
for(var/id in environment.get_gases())
|
||||
if(id in GLOB.hardcoded_gases)
|
||||
continue
|
||||
var/gas_concentration = environment.get_moles(id)/total_moles
|
||||
to_chat(user, "<span class='alert'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(environment.get_moles(id), 0.01)] mol)</span>")
|
||||
to_chat(user, "<span class='info'>Temperature: [round(environment.return_temperature()-T0C, 0.01)] °C ([round(environment.return_temperature(), 0.01)] K)</span>")
|
||||
|
||||
if(cached_scan_results && cached_scan_results["fusion"]) //notify the user if a fusion reaction was detected
|
||||
var/fusion_power = round(cached_scan_results["fusion"], 0.01)
|
||||
var/tier = fusionpower2text(fusion_power)
|
||||
to_chat(user, "<span class='boldnotice'>Large amounts of free neutrons detected in the air indicate that a fusion reaction took place.</span>")
|
||||
to_chat(user, "<span class='notice'>Power of the last fusion reaction: [fusion_power]\n This power indicates it was a [tier]-tier fusion reaction.</span>")
|
||||
|
||||
/obj/item/analyzer/ranged
|
||||
desc = "A hand-held scanner which uses advanced spectroscopy and infrared readings to analyze gases as a distance. Alt-Click to use the built in barometer function."
|
||||
name = "long-range analyzer"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "ranged_analyzer"
|
||||
|
||||
/obj/item/analyzer/ranged/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
if(target.tool_act(user, src, tool_behaviour))
|
||||
return
|
||||
// Tool act didn't scan it, so let's get it's turf.
|
||||
var/turf/location = get_turf(target)
|
||||
scan_turf(user, location)
|
||||
|
||||
//slime scanner
|
||||
|
||||
/obj/item/slime_scanner
|
||||
@@ -882,3 +987,9 @@ GENETICS SCANNER
|
||||
return "[HM.name] ([HM.alias])"
|
||||
else
|
||||
return HM.alias
|
||||
|
||||
#undef SCANMODE_HEALTH
|
||||
#undef SCANMODE_CHEMICAL
|
||||
#undef SCANMODE_WOUND
|
||||
#undef SCANNER_CONDENSED
|
||||
#undef SCANNER_VERBOSE
|
||||
@@ -54,8 +54,7 @@
|
||||
mytape.ruin() //Fires destroy the tape
|
||||
..()
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/taperecorder/attack_hand(mob/user)
|
||||
/obj/item/taperecorder/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(loc == user)
|
||||
if(mytape)
|
||||
if(!user.is_holding(src))
|
||||
|
||||
@@ -76,6 +76,9 @@ effective or pretty fucking useless.
|
||||
var/used = 0 // is it cooling down?
|
||||
var/stealth = FALSE
|
||||
|
||||
var/ui_x = 320
|
||||
var/ui_y = 335
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/attack(mob/living/M, mob/living/user)
|
||||
if(!stealth || !irradiate)
|
||||
..()
|
||||
@@ -83,93 +86,102 @@ effective or pretty fucking useless.
|
||||
return
|
||||
if(!used)
|
||||
log_combat(user, M, "irradiated", src)
|
||||
var/cooldown = GetCooldown()
|
||||
used = 1
|
||||
var/cooldown = get_cooldown()
|
||||
used = TRUE
|
||||
icon_state = "health1"
|
||||
handle_cooldown(cooldown) // splits off to handle the cooldown while handling wavelength
|
||||
addtimer(VARSET_CALLBACK(src, used, FALSE), cooldown)
|
||||
addtimer(VARSET_CALLBACK(src, icon_state, "health"), cooldown)
|
||||
to_chat(user, "<span class='warning'>Successfully irradiated [M].</span>")
|
||||
spawn((wavelength+(intensity*4))*5)
|
||||
if(M)
|
||||
if(intensity >= 5)
|
||||
M.apply_effect(round(intensity/0.075), EFFECT_UNCONSCIOUS)
|
||||
M.rad_act(intensity*10)
|
||||
addtimer(CALLBACK(src, .proc/radiation_aftereffect, M), (wavelength+(intensity*4))*5)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The radioactive microlaser is still recharging.</span>")
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/proc/handle_cooldown(cooldown)
|
||||
spawn(cooldown)
|
||||
used = 0
|
||||
icon_state = "health"
|
||||
/obj/item/healthanalyzer/rad_laser/proc/radiation_aftereffect(mob/living/M)
|
||||
if(QDELETED(M))
|
||||
return
|
||||
if(intensity >= 5)
|
||||
M.apply_effect(round(intensity/0.075), EFFECT_UNCONSCIOUS)
|
||||
M.rad_act(intensity*10)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/proc/get_cooldown()
|
||||
return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/attack_self(mob/user)
|
||||
interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/proc/GetCooldown()
|
||||
return round(max(10, (stealth*30 + intensity*5 - wavelength/4)))
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/interact(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/ui_interact(mob/user)
|
||||
. = ..()
|
||||
/obj/item/healthanalyzer/rad_laser/ui_state(mob/user)
|
||||
return GLOB.hands_state
|
||||
|
||||
var/dat = "Irradiation: <A href='?src=[REF(src)];rad=1'>[irradiate ? "On" : "Off"]</A><br>"
|
||||
dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): <A href='?src=[REF(src)];stealthy=[TRUE]'>[stealth ? "On" : "Off"]</A><br>"
|
||||
dat += "Scan Mode: <a href='?src=[REF(src)];mode=1'>"
|
||||
if(!scanmode)
|
||||
dat += "Scan Health"
|
||||
else if(scanmode == 1)
|
||||
dat += "Scan Reagents"
|
||||
else
|
||||
dat += "Disabled"
|
||||
dat += "</a><br><br>"
|
||||
/obj/item/healthanalyzer/rad_laser/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "RadioactiveMicrolaser")
|
||||
ui.open()
|
||||
|
||||
dat += {"
|
||||
Radiation Intensity:
|
||||
<A href='?src=[REF(src)];radint=-5'>-</A><A href='?src=[REF(src)];radint=-1'>-</A>
|
||||
[intensity]
|
||||
<A href='?src=[REF(src)];radint=1'>+</A><A href='?src=[REF(src)];radint=5'>+</A><BR>
|
||||
/obj/item/healthanalyzer/rad_laser/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["irradiate"] = irradiate
|
||||
data["stealth"] = stealth
|
||||
data["scanmode"] = scanmode
|
||||
data["intensity"] = intensity
|
||||
data["wavelength"] = wavelength
|
||||
data["on_cooldown"] = used
|
||||
data["cooldown"] = DisplayTimeText(get_cooldown())
|
||||
return data
|
||||
|
||||
Radiation Wavelength:
|
||||
<A href='?src=[REF(src)];radwav=-5'>-</A><A href='?src=[REF(src)];radwav=-1'>-</A>
|
||||
[(wavelength+(intensity*4))]
|
||||
<A href='?src=[REF(src)];radwav=1'>+</A><A href='?src=[REF(src)];radwav=5'>+</A><BR>
|
||||
Laser Cooldown: [DisplayTimeText(GetCooldown())]<BR>
|
||||
"}
|
||||
/obj/item/healthanalyzer/rad_laser/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
var/datum/browser/popup = new(user, "radlaser", "Radioactive Microlaser Interface", 400, 240)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
/obj/item/healthanalyzer/rad_laser/Topic(href, href_list)
|
||||
if(!usr.canUseTopic(src))
|
||||
return 1
|
||||
|
||||
usr.set_machine(src)
|
||||
if(href_list["rad"])
|
||||
irradiate = !irradiate
|
||||
|
||||
else if(href_list["stealthy"])
|
||||
stealth = !stealth
|
||||
|
||||
else if(href_list["mode"])
|
||||
scanmode += 1
|
||||
if(scanmode > 2)
|
||||
scanmode = 0
|
||||
|
||||
else if(href_list["radint"])
|
||||
var/amount = text2num(href_list["radint"])
|
||||
amount += intensity
|
||||
intensity = max(1,(min(20,amount)))
|
||||
|
||||
else if(href_list["radwav"])
|
||||
var/amount = text2num(href_list["radwav"])
|
||||
amount += wavelength
|
||||
wavelength = max(0,(min(120,amount)))
|
||||
|
||||
attack_self(usr)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
switch(action)
|
||||
if("irradiate")
|
||||
irradiate = !irradiate
|
||||
. = TRUE
|
||||
if("stealth")
|
||||
stealth = !stealth
|
||||
. = TRUE
|
||||
if("scanmode")
|
||||
scanmode = !scanmode
|
||||
. = TRUE
|
||||
if("radintensity")
|
||||
var/target = params["target"]
|
||||
var/adjust = text2num(params["adjust"])
|
||||
if(target == "min")
|
||||
target = 1
|
||||
. = TRUE
|
||||
else if(target == "max")
|
||||
target = 20
|
||||
. = TRUE
|
||||
else if(adjust)
|
||||
target = intensity + adjust
|
||||
. = TRUE
|
||||
else if(text2num(target) != null)
|
||||
target = text2num(target)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target = round(target)
|
||||
intensity = clamp(target, 1, 20)
|
||||
if("radwavelength")
|
||||
var/target = params["target"]
|
||||
var/adjust = text2num(params["adjust"])
|
||||
if(target == "min")
|
||||
target = 0
|
||||
. = TRUE
|
||||
else if(target == "max")
|
||||
target = 120
|
||||
. = TRUE
|
||||
else if(adjust)
|
||||
target = wavelength + adjust
|
||||
. = TRUE
|
||||
else if(text2num(target) != null)
|
||||
target = text2num(target)
|
||||
. = TRUE
|
||||
if(.)
|
||||
target = round(target)
|
||||
wavelength = clamp(target, 0, 120)
|
||||
|
||||
/obj/item/shadowcloak
|
||||
name = "cloaker belt"
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
var/mob/attacher = null
|
||||
var/valve_open = FALSE
|
||||
var/toggle = 1
|
||||
var/ui_x = 310
|
||||
var/ui_y = 320
|
||||
|
||||
/obj/item/transfer_valve/IsAssemblyHolder()
|
||||
return TRUE
|
||||
@@ -77,7 +79,7 @@
|
||||
if(attached_device)
|
||||
attached_device.Crossed(AM)
|
||||
|
||||
/obj/item/transfer_valve/attack_hand()//Triggers mousetraps
|
||||
/obj/item/transfer_valve/on_attack_hand()//Triggers mousetraps
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -168,8 +170,8 @@
|
||||
target_self = TRUE
|
||||
if(change_volume)
|
||||
if(!target_self)
|
||||
target.volume += tank_two.volume
|
||||
target.volume += tank_one.air_contents.volume
|
||||
target.set_volume(target.return_volume() + tank_two.volume)
|
||||
target.set_volume(target.return_volume() + tank_one.air_contents.return_volume())
|
||||
var/datum/gas_mixture/temp
|
||||
temp = tank_one.air_contents.remove_ratio(1)
|
||||
target.merge(temp)
|
||||
@@ -180,17 +182,16 @@
|
||||
/obj/item/transfer_valve/proc/split_gases()
|
||||
if (!valve_open || !tank_one || !tank_two)
|
||||
return
|
||||
var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume
|
||||
var/ratio1 = tank_one.air_contents.return_volume()/tank_two.air_contents.return_volume()
|
||||
var/datum/gas_mixture/temp
|
||||
temp = tank_two.air_contents.remove_ratio(ratio1)
|
||||
tank_one.air_contents.merge(temp)
|
||||
tank_two.air_contents.volume -= tank_one.air_contents.volume
|
||||
tank_two.air_contents.set_volume(tank_two.air_contents.return_volume() - tank_one.air_contents.return_volume())
|
||||
|
||||
/*
|
||||
/*
|
||||
Exadv1: I know this isn't how it's going to work, but this was just to check
|
||||
it explodes properly when it gets a signal (and it does).
|
||||
*/
|
||||
|
||||
*/
|
||||
/obj/item/transfer_valve/proc/toggle_valve()
|
||||
if(!valve_open && tank_one && tank_two)
|
||||
valve_open = TRUE
|
||||
@@ -231,7 +232,60 @@
|
||||
valve_open = FALSE
|
||||
update_icon()
|
||||
|
||||
// this doesn't do anything but the timer etc. expects it to be here
|
||||
// eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
|
||||
/*
|
||||
This doesn't do anything but the timer etc. expects it to be here
|
||||
eventually maybe have it update icon to show state (timer, prox etc.) like old bombs
|
||||
*/
|
||||
/obj/item/transfer_valve/proc/c_state()
|
||||
return
|
||||
|
||||
/obj/item/transfer_valve/ui_state(mob/user)
|
||||
return GLOB.hands_state
|
||||
|
||||
/obj/item/transfer_valve/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "TransferValve", name)
|
||||
ui.open()
|
||||
|
||||
/obj/item/transfer_valve/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["tank_one"] = tank_one
|
||||
data["tank_two"] = tank_two
|
||||
data["attached_device"] = attached_device
|
||||
data["valve"] = valve_open
|
||||
return data
|
||||
|
||||
/obj/item/transfer_valve/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("tankone")
|
||||
if(tank_one)
|
||||
split_gases()
|
||||
valve_open = FALSE
|
||||
tank_one.forceMove(drop_location())
|
||||
tank_one = null
|
||||
. = TRUE
|
||||
if("tanktwo")
|
||||
if(tank_two)
|
||||
split_gases()
|
||||
valve_open = FALSE
|
||||
tank_two.forceMove(drop_location())
|
||||
tank_two = null
|
||||
. = TRUE
|
||||
if("toggle")
|
||||
toggle_valve()
|
||||
. = TRUE
|
||||
if("device")
|
||||
if(attached_device)
|
||||
attached_device.attack_self(usr)
|
||||
. = TRUE
|
||||
if("remove_device")
|
||||
if(attached_device)
|
||||
attached_device.on_detach()
|
||||
attached_device = null
|
||||
. = TRUE
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/obj/item/storage/pill_bottle/dice
|
||||
/obj/item/storage/box/dice
|
||||
name = "bag of dice"
|
||||
desc = "Contains all the luck you'll ever need."
|
||||
icon = 'icons/obj/dice.dmi'
|
||||
icon_state = "dicebag"
|
||||
|
||||
/obj/item/storage/pill_bottle/dice/Initialize()
|
||||
/obj/item/storage/box/dice/Initialize()
|
||||
. = ..()
|
||||
var/special_die = pick("1","2","fudge","space","00","8bd20","4dd6","100")
|
||||
if(special_die == "1")
|
||||
@@ -30,7 +30,7 @@
|
||||
if(special_die == "100")
|
||||
new /obj/item/dice/d100(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/dice/suicide_act(mob/user)
|
||||
/obj/item/storage/box/dice/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is gambling with death! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
|
||||
@@ -0,0 +1,383 @@
|
||||
/*
|
||||
* 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
|
||||
wound_bonus = -110
|
||||
bare_wound_bonus = 20
|
||||
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
|
||||
// more efficient vs projectiles
|
||||
block_stamina_efficiency_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 4
|
||||
)
|
||||
|
||||
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_failed_stagger_duration = 3 SECONDS
|
||||
parry_failed_clickcd_duration = CLICK_CD_MELEE
|
||||
|
||||
/obj/item/dualsaber/active_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
|
||||
if((attack_type & ATTACK_TYPE_PROJECTILE) && is_energy_reflectable_projectile(object))
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER
|
||||
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT
|
||||
return ..()
|
||||
|
||||
/obj/item/dualsaber/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time)
|
||||
. = ..()
|
||||
if(parry_efficiency >= 90) // perfect parry
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER
|
||||
. |= BLOCK_SHOULD_REDIRECT
|
||||
|
||||
/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 = SHARP_EDGED
|
||||
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
|
||||
armour_penetration = 0
|
||||
block_parry_data = /datum/block_parry_data/chaplain
|
||||
var/chaplain_spawnable = TRUE
|
||||
can_reflect = FALSE
|
||||
obj_flags = UNIQUE_RENAME
|
||||
|
||||
/datum/block_parry_data/chaplain
|
||||
parry_stamina_cost = 12
|
||||
parry_time_windup = 2
|
||||
parry_time_active = 5
|
||||
parry_time_spindown = 3
|
||||
// parry_flags = PARRY_DEFAULT_HANDLE_FEEDBACK
|
||||
parry_time_perfect = 1
|
||||
parry_time_perfect_leeway = 1
|
||||
parry_imperfect_falloff_percent = 7.5
|
||||
parry_efficiency_to_counterattack = 100
|
||||
parry_efficiency_considered_successful = 80
|
||||
parry_efficiency_perfect = 120
|
||||
parry_efficiency_perfect_override = list(
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 30,
|
||||
)
|
||||
parry_failed_stagger_duration = 3 SECONDS
|
||||
parry_failed_clickcd_duration = 2 SECONDS
|
||||
|
||||
/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)
|
||||
@@ -192,11 +192,13 @@
|
||||
|
||||
return top_vote
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_interact(mob/user, ui_key="main", datum/tgui/ui=null, force_open=0, datum/tgui/master_ui=null, datum/ui_state/state = GLOB.always_state)
|
||||
/obj/item/toy/eightball/haunted/ui_state(mob/user)
|
||||
return GLOB.observer_state
|
||||
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/item/toy/eightball/haunted/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "eightball", name, 400, 600, master_ui, state)
|
||||
ui = new(user, src, "EightBallVote", name)
|
||||
ui.open()
|
||||
|
||||
/obj/item/toy/eightball/haunted/ui_data(mob/user)
|
||||
@@ -229,4 +231,4 @@
|
||||
else
|
||||
votes[selected_answer] += 1
|
||||
voted[user.ckey] = selected_answer
|
||||
. = TRUE
|
||||
. = TRUE
|
||||
|
||||
@@ -0,0 +1,264 @@
|
||||
|
||||
/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
|
||||
attack_speed = CLICK_CD_MELEE
|
||||
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)
|
||||
@@ -110,7 +110,7 @@
|
||||
. += "The safety is [safety ? "on" : "off"]."
|
||||
|
||||
if(reagents.total_volume)
|
||||
. += "<span class='notice'>You can loose its <b>screws</b> to empty it.</span>"
|
||||
. += "<span class='notice'>Alt-click to empty it.</span>"
|
||||
|
||||
/obj/item/extinguisher/proc/AttemptRefill(atom/target, mob/user)
|
||||
if(istype(target, tanktype) && target.Adjacent(user))
|
||||
@@ -230,7 +230,7 @@
|
||||
repetition++
|
||||
addtimer(CALLBACK(src, /obj/item/extinguisher/proc/move_chair, B, movementdirection, repetition), timer_seconds)
|
||||
|
||||
/obj/item/extinguisher/screwdriver_act(mob/user, obj/item/tool)
|
||||
/obj/item/extinguisher/AltClick(mob/user)
|
||||
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
EmptyExtinguisher(user)
|
||||
@@ -244,7 +244,7 @@
|
||||
var/turf/open/theturf = T
|
||||
theturf.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
|
||||
|
||||
user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "<span class='info'>You quietly empty out \the [src] by loosing the release valve's screws.</span>")
|
||||
user.visible_message("[user] empties out \the [src] onto the floor using the release valve.", "<span class='info'>You quietly empty out \the [src] by using its release valve.</span>")
|
||||
|
||||
//firebot assembly
|
||||
/obj/item/extinguisher/attackby(obj/O, mob/user, params)
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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 = SHARP_EDGED
|
||||
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
|
||||
wound_bonus = -15
|
||||
bare_wound_bonus = 20
|
||||
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")
|
||||
@@ -131,6 +131,7 @@
|
||||
/obj/item/flamethrower/analyzer_act(mob/living/user, obj/item/I)
|
||||
if(ptank)
|
||||
ptank.analyzer_act(user, I)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/item/flamethrower/attack_self(mob/user)
|
||||
@@ -204,11 +205,10 @@
|
||||
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
|
||||
//Transfer 5% of current tank air contents to turf
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount)
|
||||
if(air_transfer.gases[/datum/gas/plasma])
|
||||
air_transfer.gases[/datum/gas/plasma] *= 5
|
||||
air_transfer.set_moles(/datum/gas/plasma, air_transfer.get_moles(/datum/gas/plasma) * 5)
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500)
|
||||
target.hotspot_expose((ptank.air_contents.return_temperature()*2) + 380,500)
|
||||
//location.hotspot_expose(1000,500,1)
|
||||
SSair.add_to_active(target, 0)
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
ADD_TRAIT(user, granted_trait, BOOK_TRAIT)
|
||||
|
||||
/obj/item/book/granter/trait/rifleman
|
||||
name = "\proper the Neo-Russian Rifleman\'s Primer"
|
||||
name = "The Neo-Russian Rifleman\'s Primer"
|
||||
desc = "A book with stains of vodka and...blood? The back is hard to read, but says something about bolt-actions. Or pump-actions. Both, maybe."
|
||||
oneuse = FALSE
|
||||
granted_trait = TRAIT_FAST_PUMP
|
||||
@@ -253,7 +253,7 @@
|
||||
user.set_nutrition(NUTRITION_LEVEL_STARVING + 50)
|
||||
|
||||
/obj/item/book/granter/spell/blind
|
||||
spell = /obj/effect/proc_holder/spell/targeted/trigger/blind
|
||||
spell = /obj/effect/proc_holder/spell/pointed/trigger/blind
|
||||
spellname = "blind"
|
||||
icon_state ="bookblind"
|
||||
desc = "This book looks blurry, no matter how you look at it."
|
||||
@@ -265,7 +265,7 @@
|
||||
user.blind_eyes(10)
|
||||
|
||||
/obj/item/book/granter/spell/mindswap
|
||||
spell = /obj/effect/proc_holder/spell/targeted/mind_transfer
|
||||
spell = /obj/effect/proc_holder/spell/pointed/mind_transfer
|
||||
spellname = "mindswap"
|
||||
icon_state ="bookmindswap"
|
||||
desc = "This book's cover is pristine, though its pages look ragged and torn."
|
||||
@@ -289,7 +289,7 @@
|
||||
if(stored_swap == user)
|
||||
to_chat(user,"<span class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>")
|
||||
return
|
||||
var/obj/effect/proc_holder/spell/targeted/mind_transfer/swapper = new
|
||||
var/obj/effect/proc_holder/spell/pointed/mind_transfer/swapper = new
|
||||
if(swapper.cast(list(stored_swap), user, TRUE, TRUE))
|
||||
to_chat(user,"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>")
|
||||
to_chat(stored_swap,"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>")
|
||||
@@ -324,7 +324,7 @@
|
||||
user.DefaultCombatKnockdown(40)
|
||||
|
||||
/obj/item/book/granter/spell/barnyard
|
||||
spell = /obj/effect/proc_holder/spell/targeted/barnyardcurse
|
||||
spell = /obj/effect/proc_holder/spell/pointed/barnyardcurse
|
||||
spellname = "barnyard"
|
||||
icon_state ="bookhorses"
|
||||
desc = "This book is more horse than your mind has room for."
|
||||
@@ -477,6 +477,23 @@
|
||||
name = "empty scroll"
|
||||
icon_state = "blankscroll"
|
||||
|
||||
/obj/item/book/granter/martial/krav_maga
|
||||
martial = /datum/martial_art/krav_maga
|
||||
name = "parchment scroll"
|
||||
martialname = "krav maga"
|
||||
desc = "A worn parchment scrap written in an ancient language. Somehow you can still understand the lessons!"
|
||||
greet = "<span class='sciradio'>You have learned the ancient martial art of Krav Maga. You have special attacks with which to take down your foes.</span>"
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state ="scroll2"
|
||||
remarks = list("Sweep the legs...", "Chop the throat...", "Punch the lungs...", "Get the gold...", "Where are my sick gloves..?")
|
||||
|
||||
/obj/item/book/granter/martial/krav_maga/onlearned(mob/living/carbon/user)
|
||||
. = ..()
|
||||
if(oneuse == TRUE)
|
||||
desc = "It's completely blank."
|
||||
name = "empty scroll"
|
||||
icon_state = "blankscroll"
|
||||
|
||||
// I did not include mushpunch's grant, it is not a book and the item does it just fine.
|
||||
|
||||
|
||||
@@ -510,7 +527,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)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
to_chat(user, "<span class='notice'>You add [A] to the [initial(name)] assembly.</span>")
|
||||
|
||||
else if(stage == EMPTY && istype(I, /obj/item/stack/cable_coil))
|
||||
if (I.use_tool(src, user, 0, 1, max_level = JOB_SKILL_BASIC))
|
||||
if (I.use_tool(src, user, 0, 1, skill_gain_mult = TRIVIAL_USE_TOOL_MULT))
|
||||
det_time = 50 // In case the cable_coil was removed and readded.
|
||||
stage_change(WIRED)
|
||||
to_chat(user, "<span class='notice'>You rig the [initial(name)] assembly.</span>")
|
||||
|
||||
@@ -60,6 +60,14 @@
|
||||
shrapnel_type = /obj/item/projectile/bullet/pellet/stingball/mega
|
||||
shrapnel_radius = 12
|
||||
|
||||
/obj/item/grenade/stingbang/breaker
|
||||
name = "breakbang"
|
||||
shrapnel_type = /obj/item/projectile/bullet/pellet/stingball/breaker
|
||||
|
||||
/obj/item/grenade/stingbang/shred
|
||||
name = "shredbang"
|
||||
shrapnel_type = /obj/item/projectile/bullet/pellet/stingball/shred
|
||||
|
||||
/obj/item/grenade/stingbang/prime(mob/living/lanced_by)
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/C = loc
|
||||
@@ -116,9 +124,11 @@
|
||||
/obj/item/grenade/primer/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(active)
|
||||
if(!user.CheckActionCooldown())
|
||||
return
|
||||
user.playsound_local(user, 'sound/misc/box_deploy.ogg', 50, TRUE)
|
||||
rots++
|
||||
user.changeNext_move(CLICK_CD_RAPID)
|
||||
user.DelayNextAction(CLICK_CD_RAPID)
|
||||
|
||||
/obj/item/grenade/primer/prime(mob/living/lanced_by)
|
||||
shrapnel_radius = round(rots / rots_per_mag)
|
||||
|
||||
@@ -60,7 +60,8 @@
|
||||
if(target)
|
||||
if(!QDELETED(target))
|
||||
location = get_turf(target)
|
||||
target.cut_overlay(plastic_overlay, TRUE)
|
||||
target.cut_overlay(plastic_overlay)
|
||||
UnregisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/add_plastic_overlay)
|
||||
if(!ismob(target) || full_damage_on_mobs)
|
||||
target.ex_act(EXPLODE_HEAVY, target)
|
||||
else
|
||||
@@ -126,13 +127,17 @@
|
||||
I.embedding["embed_chance"] = 0
|
||||
I.updateEmbedding()
|
||||
|
||||
target.add_overlay(plastic_overlay, TRUE)
|
||||
RegisterSignal(target, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/add_plastic_overlay)
|
||||
target.update_icon()
|
||||
if(!nadeassembly)
|
||||
to_chat(user, "<span class='notice'>You plant the bomb. Timer counting down from [det_time].</span>")
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time*10)
|
||||
else
|
||||
qdel(src) //How?
|
||||
|
||||
/obj/item/grenade/plastic/proc/add_plastic_overlay(atom/source, list/overlay_list)
|
||||
overlay_list += plastic_overlay
|
||||
|
||||
/obj/item/grenade/plastic/proc/shout_syndicate_crap(mob/M)
|
||||
if(!M)
|
||||
return
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
Crossed(user) //honk
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -168,6 +168,7 @@
|
||||
icon_state = "witchhunterhat"
|
||||
item_state = "witchhunterhat"
|
||||
flags_cover = HEADCOVERSEYES
|
||||
flags_inv = HIDEHAIR
|
||||
|
||||
/obj/item/storage/box/holy/follower
|
||||
name = "Followers of the Chaplain Kit"
|
||||
@@ -224,6 +225,7 @@
|
||||
throwforce = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
obj_flags = UNIQUE_RENAME
|
||||
wound_bonus = -10
|
||||
var/chaplain_spawnable = TRUE
|
||||
total_mass = TOTAL_MASS_MEDIEVAL_WEAPON
|
||||
|
||||
@@ -350,7 +352,7 @@
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
slot_flags = ITEM_SLOT_BACK|ITEM_SLOT_BELT
|
||||
block_chance = 30
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
@@ -450,7 +452,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
armour_penetration = 35
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
/obj/item/nullrod/scythe/Initialize()
|
||||
@@ -573,7 +575,7 @@
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
item_flags = ABSTRACT
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
@@ -592,7 +594,7 @@
|
||||
name = "clown dagger"
|
||||
desc = "Used for absolutely hilarious sacrifices."
|
||||
hitsound = 'sound/items/bikehorn.ogg'
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
|
||||
/obj/item/nullrod/pride_hammer
|
||||
@@ -643,7 +645,7 @@
|
||||
throw_speed = 4
|
||||
throw_range = 7
|
||||
throwforce = 30
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
attack_verb = list("enlightened", "redpilled")
|
||||
|
||||
/obj/item/nullrod/armblade
|
||||
@@ -655,7 +657,9 @@
|
||||
righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi'
|
||||
item_flags = ABSTRACT
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
wound_bonus = -20
|
||||
bare_wound_bonus = 25
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
|
||||
/obj/item/nullrod/armblade/Initialize()
|
||||
@@ -695,7 +699,7 @@
|
||||
force = 15
|
||||
block_chance = 40
|
||||
slot_flags = ITEM_SLOT_BACK
|
||||
sharpness = IS_BLUNT
|
||||
sharpness = SHARP_NONE
|
||||
hitsound = "swing_hit"
|
||||
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
@@ -750,7 +754,7 @@
|
||||
name = "arrhythmic knife"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
desc = "They say fear is the true mind killer, but stabbing them in the head works too. Honour compels you to not sheathe it once drawn."
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
slot_flags = null
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
@@ -778,7 +782,7 @@
|
||||
desc = "Holding this makes you look absolutely devilish."
|
||||
attack_verb = list("poked", "impaled", "pierced", "jabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
|
||||
/obj/item/nullrod/egyptian
|
||||
name = "egyptian staff"
|
||||
|
||||
@@ -38,6 +38,23 @@
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/implant/warp
|
||||
name = "warp implant"
|
||||
desc = "Saves your position somewhere, and then warps you back to it after five seconds."
|
||||
icon_state = "warp"
|
||||
uses = 15
|
||||
|
||||
/obj/item/implant/warp/activate()
|
||||
. = ..()
|
||||
uses--
|
||||
imp_in.do_adrenaline(20, TRUE, 0, 0, TRUE, list(/datum/reagent/fermi/eigenstate = 1.2), "<span class='boldnotice'>You feel an internal prick as as the bluespace starts ramping up!</span>")
|
||||
to_chat(imp_in, "<span class='notice'>You feel an internal prick as as the bluespace starts ramping up!</span>")
|
||||
if(!uses)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/implanter/warp
|
||||
name = "implanter (warp)"
|
||||
imp_type = /obj/item/implant/warp
|
||||
|
||||
/obj/item/implant/emp
|
||||
name = "emp implant"
|
||||
@@ -69,4 +86,4 @@
|
||||
healthstring = "<small>Oxygen Deprivation Damage => [round(L.getOxyLoss())]<br />Fire Damage => [round(L.getFireLoss())]<br />Toxin Damage => [round(L.getToxLoss())]<br />Brute Force Damage => [round(L.getBruteLoss())]</small>"
|
||||
if (!healthstring)
|
||||
healthstring = "ERROR"
|
||||
return healthstring
|
||||
return healthstring
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
/obj/item/implant/radio/activate()
|
||||
. = ..()
|
||||
// needs to be GLOB.deep_inventory_state otherwise it won't open
|
||||
radio.ui_interact(usr, "main", null, FALSE, null, GLOB.deep_inventory_state)
|
||||
radio.ui_interact(usr, state = GLOB.deep_inventory_state)
|
||||
|
||||
/obj/item/implant/radio/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
. = ..()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/obj/item/implant/uplink/Initialize(mapload, _owner)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc, GLOB.not_incapacitated_state)
|
||||
AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc)
|
||||
|
||||
/obj/item/implanter/uplink
|
||||
name = "implanter (uplink)"
|
||||
|
||||
@@ -26,14 +26,15 @@
|
||||
open_machine()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/ui_state(mob/user)
|
||||
return GLOB.notcontained_state
|
||||
|
||||
/obj/machinery/implantchair/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.notcontained_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
/obj/machinery/implantchair/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "implantchair", name, 375, 280, master_ui, state)
|
||||
ui = new(user, src, "ImplantChair", name)
|
||||
ui.open()
|
||||
|
||||
|
||||
/obj/machinery/implantchair/ui_data()
|
||||
var/list/data = list()
|
||||
data["occupied"] = occupant ? 1 : 0
|
||||
@@ -121,8 +122,6 @@
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/implantchair/container_resist(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
|
||||
"<span class='notice'>You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
|
||||
"<span class='italics'>You hear a metallic creaking from [src].</span>")
|
||||
@@ -191,4 +190,4 @@
|
||||
brainwash(C, objective)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] brainwashed [key_name_admin(C)] with objective '[objective]'.")
|
||||
log_game("[key_name(user)] brainwashed [key_name(C)] with objective '[objective]'.")
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
name = "fork"
|
||||
desc = "Pointy."
|
||||
icon_state = "fork"
|
||||
force = 5
|
||||
force = 4
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 0
|
||||
throw_speed = 3
|
||||
@@ -28,6 +28,7 @@
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
sharpness = SHARP_POINTY
|
||||
var/datum/reagent/forkload //used to eat omelette
|
||||
|
||||
/obj/item/kitchen/fork/suicide_act(mob/living/carbon/user)
|
||||
@@ -54,6 +55,14 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/kitchen/fork/throwing
|
||||
name = "throwing fork"
|
||||
desc = "A fork, sharpened to perfection, making it a great weapon for throwing."
|
||||
throwforce = 15
|
||||
throw_speed = 4
|
||||
throw_range = 6
|
||||
embedding = list("pain_mult" = 2, "embed_chance" = 100, "fall_chance" = 0, "embed_chance_turf_mod" = 15)
|
||||
sharpness = SHARP_EDGED
|
||||
|
||||
/obj/item/kitchen/knife
|
||||
name = "kitchen knife"
|
||||
@@ -68,9 +77,11 @@
|
||||
throw_range = 6
|
||||
custom_materials = list(/datum/material/iron=12000)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP_ACCURATE
|
||||
sharpness = SHARP_POINTY
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
|
||||
var/bayonet = FALSE //Can this be attached to a gun?
|
||||
wound_bonus = -5
|
||||
bare_wound_bonus = 10
|
||||
custom_price = PRICE_NORMAL
|
||||
|
||||
/obj/item/kitchen/knife/Initialize()
|
||||
|
||||
@@ -54,5 +54,5 @@
|
||||
var/obj/item/tank/T = W
|
||||
blow(T, user)
|
||||
return
|
||||
if (W.get_sharpness() || W.get_temperature() || is_pointed(W))
|
||||
if (W.get_sharpness() || W.get_temperature())
|
||||
burst()
|
||||
|
||||
@@ -506,7 +506,9 @@
|
||||
if(prob(50))
|
||||
step(W, pick(GLOB.alldirs))
|
||||
ADD_TRAIT(H, TRAIT_DISFIGURED, TRAIT_GENERIC)
|
||||
H.bleed_rate = 5
|
||||
for(var/i in H.bodyparts)
|
||||
var/obj/item/bodypart/BP = i
|
||||
BP.generic_bleedstacks += 5
|
||||
H.gib_animation()
|
||||
sleep(3)
|
||||
H.adjustBruteLoss(1000) //to make the body super-bloody
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
attack_verb_off = list("tapped", "poked")
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
embedding = list("embed_chance" = 75, "impact_pain_mult" = 10)
|
||||
armour_penetration = 35
|
||||
item_flags = NEEDS_PERMIT | ITEM_CAN_PARRY
|
||||
@@ -147,6 +147,12 @@
|
||||
return NONE
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/on_active_parry(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, list/block_return, parry_efficiency, parry_time)
|
||||
. = ..()
|
||||
if(parry_efficiency >= 80) // perfect parry
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_RETURN_TO_SENDER
|
||||
. |= BLOCK_SHOULD_REDIRECT
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cyborg
|
||||
sword_color = "red"
|
||||
light_color = "#ff0000"
|
||||
@@ -174,7 +180,7 @@
|
||||
sword_color = null //stops icon from breaking when turned on.
|
||||
hitcost = 75 //Costs more than a standard cyborg esword
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
light_color = "#40ceff"
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 0.7
|
||||
@@ -249,7 +255,7 @@
|
||||
throw_range = 1
|
||||
w_class = WEIGHT_CLASS_BULKY//So you can't hide it in your pocket or some such.
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
|
||||
//Most of the other special functions are handled in their own files. aka special snowflake code so kewl
|
||||
/obj/item/melee/transforming/energy/blade/Initialize()
|
||||
@@ -285,7 +291,7 @@
|
||||
attack_verb_off = list("tapped", "poked")
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
embedding = list("embedded_pain_multiplier" = 6, "embed_chance" = 20, "embedded_fall_chance" = 60)
|
||||
armour_penetration = 10
|
||||
block_chance = 35
|
||||
@@ -369,7 +375,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
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 14
|
||||
throwforce = 10
|
||||
wound_bonus = 15
|
||||
bare_wound_bonus = 10
|
||||
reach = 2
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
@@ -42,7 +44,7 @@
|
||||
throwforce = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
attack_verb = list("attacked", "impaled", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
total_mass = TOTAL_MASS_HAND_REPLACEMENT
|
||||
|
||||
/obj/item/melee/synthetic_arm_blade/Initialize()
|
||||
@@ -62,7 +64,7 @@
|
||||
throwforce = 15
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
armour_penetration = 75
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
attack_verb = list("slashed", "cut")
|
||||
hitsound = 'sound/weapons/rapierhit.ogg'
|
||||
custom_materials = list(/datum/material/iron = 1000)
|
||||
@@ -166,7 +168,7 @@
|
||||
flags_1 = CONDUCT_1
|
||||
obj_flags = UNIQUE_RENAME
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
sharpness = IS_SHARP_ACCURATE //It cant be sharpend cook -_-
|
||||
sharpness = SHARP_POINTY //It cant be sharpend cook -_-
|
||||
attack_verb = list("stabs", "punctures", "pierces", "pokes")
|
||||
hitsound = 'sound/weapons/rapierhit.ogg'
|
||||
total_mass = 0.4
|
||||
@@ -268,6 +270,8 @@
|
||||
var/force_off // Damage when off - not stunning
|
||||
var/weight_class_on // What is the new size class when turned on
|
||||
|
||||
wound_bonus = 15
|
||||
|
||||
/obj/item/melee/classic_baton/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -371,6 +375,7 @@
|
||||
var/wait_desc = get_wait_description()
|
||||
if(wait_desc)
|
||||
to_chat(user, wait_desc)
|
||||
return DISCARD_LAST_ACTION
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic
|
||||
name = "telescopic baton"
|
||||
@@ -393,6 +398,7 @@
|
||||
force_off = 0
|
||||
weight_class_on = WEIGHT_CLASS_BULKY
|
||||
total_mass = TOTAL_MASS_NORMAL_ITEM
|
||||
bare_wound_bonus = 5
|
||||
|
||||
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -621,7 +627,7 @@
|
||||
to_chat(user, "<span class='warning'>[target] doesn't seem to want to get on [src]!</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/roastingstick/attack_hand(mob/user)
|
||||
/obj/item/melee/roastingstick/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
..()
|
||||
if (held_sausage)
|
||||
user.put_in_hands(held_sausage)
|
||||
@@ -689,7 +695,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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/melee/transforming
|
||||
sharpness = IS_SHARP
|
||||
sharpness = SHARP_EDGED
|
||||
var/active = FALSE
|
||||
var/force_on = 30 //force when active
|
||||
var/faction_bonus_force = 0 //Bonus force dealt against certain factions
|
||||
@@ -84,4 +84,4 @@
|
||||
/obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user)
|
||||
if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_bodypart_damage(5,5)
|
||||
user.take_bodypart_damage(5,5)
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gangtool-blue"
|
||||
item_state = "radio"
|
||||
var/list/stored_options
|
||||
var/force_refresh = FALSE //if set to true, the beacon will recalculate its display options whenever opened
|
||||
|
||||
/obj/item/choice_beacon/attack_self(mob/user)
|
||||
if(canUseBeacon(user))
|
||||
@@ -34,18 +36,22 @@
|
||||
return FALSE
|
||||
|
||||
/obj/item/choice_beacon/proc/generate_options(mob/living/M)
|
||||
var/list/display_names = generate_display_names()
|
||||
if(!display_names.len)
|
||||
if(!stored_options || force_refresh)
|
||||
stored_options = generate_display_names()
|
||||
if(!stored_options.len)
|
||||
return
|
||||
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in display_names
|
||||
var/choice = input(M,"Which item would you like to order?","Select an Item") as null|anything in stored_options
|
||||
if(!choice || !M.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
|
||||
return
|
||||
|
||||
spawn_option(display_names[choice],M)
|
||||
spawn_option(stored_options[choice],M)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/choice_beacon/proc/spawn_option(obj/choice,mob/living/M)
|
||||
var/obj/new_item = new choice()
|
||||
/obj/item/choice_beacon/proc/create_choice_atom(atom/choice, mob/owner)
|
||||
return new choice()
|
||||
|
||||
/obj/item/choice_beacon/proc/spawn_option(atom/choice,mob/living/M)
|
||||
var/obj/new_item = create_choice_atom(choice, M)
|
||||
var/obj/structure/closet/supplypod/bluespacepod/pod = new()
|
||||
pod.explosionSize = list(0,0,0,0)
|
||||
new_item.forceMove(pod)
|
||||
@@ -149,10 +155,116 @@
|
||||
augment_list[initial(A.name)] = A
|
||||
return augment_list
|
||||
|
||||
/obj/item/choice_beacon/augments/spawn_option(obj/choice,mob/living/M)
|
||||
/obj/item/choice_beacon/augments/spawn_option(atom/choice,mob/living/M)
|
||||
new choice(get_turf(M))
|
||||
to_chat(M, "<span class='hear'>You hear something crackle from the beacon for a moment before a voice speaks. \"Please stand by for a message from S.E.L.F. Message as follows: <b>Item request received. Your package has been transported, use the autosurgeon supplied to apply the upgrade.</b> Message ends.\"</span>")
|
||||
|
||||
/obj/item/choice_beacon/pet //donator beacon that summons a small friendly animal
|
||||
name = "pet beacon"
|
||||
desc = "Straight from the outerspace pet shop to your feet."
|
||||
var/static/list/pets = list("Crab" = /mob/living/simple_animal/crab,
|
||||
"Cat" = /mob/living/simple_animal/pet/cat,
|
||||
"Space cat" = /mob/living/simple_animal/pet/cat/space,
|
||||
"Kitten" = /mob/living/simple_animal/pet/cat/kitten,
|
||||
"Dog" = /mob/living/simple_animal/pet/dog,
|
||||
"Corgi" = /mob/living/simple_animal/pet/dog/corgi,
|
||||
"Pug" = /mob/living/simple_animal/pet/dog/pug,
|
||||
"Exotic Corgi" = /mob/living/simple_animal/pet/dog/corgi/exoticcorgi,
|
||||
"Fox" = /mob/living/simple_animal/pet/fox,
|
||||
"Red Panda" = /mob/living/simple_animal/pet/redpanda,
|
||||
"Possum" = /mob/living/simple_animal/opossum)
|
||||
var/pet_name
|
||||
|
||||
/obj/item/choice_beacon/pet/generate_display_names()
|
||||
return pets
|
||||
|
||||
/obj/item/choice_beacon/pet/create_choice_atom(atom/choice, mob/owner)
|
||||
var/mob/living/simple_animal/new_choice = new choice()
|
||||
new_choice.butcher_results = null //please don't eat your pet, chef
|
||||
var/obj/item/pet_carrier/donator/carrier = new() //a donator pet carrier is just a carrier that can't be shoved in an autolathe for metal
|
||||
carrier.add_occupant(new_choice)
|
||||
new_choice.mob_size = MOB_SIZE_TINY //yeah we're not letting you use this roundstart pet to hurt people / knock them down
|
||||
new_choice.pass_flags = PASSTABLE | PASSMOB //your pet is not a bullet/person shield
|
||||
new_choice.density = FALSE
|
||||
new_choice.blood_volume = 0 //your pet cannot be used to drain blood from for a bloodsucker
|
||||
new_choice.desc = "A pet [initial(choice.name)], owned by [owner]!"
|
||||
new_choice.can_have_ai = FALSE //no it cant be sentient damnit
|
||||
if(pet_name)
|
||||
new_choice.name = pet_name
|
||||
new_choice.unique_name = TRUE
|
||||
return carrier
|
||||
|
||||
/obj/item/choice_beacon/pet/spawn_option(atom/choice,mob/living/M)
|
||||
pet_name = input(M, "What would you like to name the pet? (leave blank for default name)", "Pet Name")
|
||||
..()
|
||||
|
||||
//choice boxes (they just open in your hand instead of making a pod)
|
||||
/obj/item/choice_beacon/box
|
||||
name = "choice box (default)"
|
||||
desc = "Think really hard about what you want, and then rip it open!"
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "deliverypackage3"
|
||||
item_state = "deliverypackage3"
|
||||
|
||||
/obj/item/choice_beacon/box/spawn_option(atom/choice,mob/living/M)
|
||||
var/choice_text = choice
|
||||
if(ispath(choice_text))
|
||||
choice_text = initial(choice.name)
|
||||
to_chat(M, "<span class='hear'>The box opens, revealing the [choice_text]!</span>")
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
M.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
M.put_in_hands(new choice)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/choice_beacon/box/plushie/spawn_option(choice,mob/living/M)
|
||||
if(ispath(choice, /obj/item/toy/plush))
|
||||
..() //regular plush, spawn it naturally
|
||||
else
|
||||
//snowflake plush
|
||||
var/obj/item/toy/plush/snowflake_plushie = new(get_turf(M))
|
||||
snowflake_plushie.set_snowflake_from_config(choice)
|
||||
M.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
M.put_in_hands(new choice)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/choice_beacon/box/carpet //donator carpet beacon
|
||||
name = "choice box (carpet)"
|
||||
desc = "Contains 50 of a selected carpet inside!"
|
||||
var/static/list/carpet_list = list(/obj/item/stack/tile/carpet/black/fifty = "Black Carpet",
|
||||
"Black & Red Carpet" = /obj/item/stack/tile/carpet/blackred/fifty,
|
||||
"Monochrome Carpet" = /obj/item/stack/tile/carpet/monochrome/fifty,
|
||||
"Blue Carpet" = /obj/item/stack/tile/carpet/blue/fifty,
|
||||
"Cyan Carpet" = /obj/item/stack/tile/carpet/cyan/fifty,
|
||||
"Green Carpet" = /obj/item/stack/tile/carpet/green/fifty,
|
||||
"Orange Carpet" = /obj/item/stack/tile/carpet/orange/fifty,
|
||||
"Purple Carpet" = /obj/item/stack/tile/carpet/purple/fifty,
|
||||
"Red Carpet" = /obj/item/stack/tile/carpet/red/fifty,
|
||||
"Royal Black Carpet" = /obj/item/stack/tile/carpet/royalblack/fifty,
|
||||
"Royal Blue Carpet" = /obj/item/stack/tile/carpet/royalblue/fifty)
|
||||
|
||||
/obj/item/choice_beacon/box/carpet/generate_display_names()
|
||||
return carpet_list
|
||||
|
||||
/obj/item/choice_beacon/box/plushie
|
||||
name = "choice box (plushie)"
|
||||
desc = "Using the power of quantum entanglement, this box contains every plush, until the moment it is opened!"
|
||||
icon = 'icons/obj/plushes.dmi'
|
||||
icon_state = "box"
|
||||
item_state = "box"
|
||||
|
||||
/obj/item/choice_beacon/box/plushie/generate_display_names()
|
||||
var/list/plushie_list = list()
|
||||
//plushie set 1: just subtypes of /obj/item/toy/plush
|
||||
var/list/plushies_set_one = subtypesof(/obj/item/toy/plush) - list(/obj/item/toy/plush/narplush, /obj/item/toy/plush/awakenedplushie, /obj/item/toy/plush/random_snowflake, /obj/item/toy/plush/random) //don't allow these special ones (you can still get narplush/hugbox)
|
||||
for(var/V in plushies_set_one)
|
||||
var/atom/A = V
|
||||
plushie_list[initial(A.name)] = A
|
||||
//plushie set 2: snowflake plushies
|
||||
var/list/plushies_set_two = CONFIG_GET(keyed_list/snowflake_plushies)
|
||||
for(var/V in plushies_set_two)
|
||||
plushie_list[V] = V //easiest way to do this which works with how selecting options works, despite being snowflakey to have the key equal the value
|
||||
return plushie_list
|
||||
|
||||
/obj/item/skub
|
||||
desc = "It's skub."
|
||||
name = "skub"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if(T)
|
||||
user.visible_message("[user] cleans \the [T] with [src].", "<span class='notice'>You clean \the [T] with [src].</span>")
|
||||
clean(T)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.DelayNextAction(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(T, used_item = src)
|
||||
if(istype(L))
|
||||
L.adjustStaminaLossBuffered(stamusage)
|
||||
@@ -128,4 +128,4 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/mop/advanced/cyborg
|
||||
insertable = FALSE
|
||||
insertable = FALSE
|
||||
|
||||
@@ -22,6 +22,15 @@
|
||||
var/occupant_weight = 0
|
||||
var/max_occupants = 3 //Hard-cap so you can't have infinite mice or something in one carrier
|
||||
var/max_occupant_weight = MOB_SIZE_SMALL //This is calculated from the mob sizes of occupants
|
||||
var/entrance_name = "door" //name of the entrance to the item
|
||||
var/escape_time = 200 //how long it takes for mobs above small sizes to escape (for small sizes, its randomly 1.5 to 2x this)
|
||||
var/alternate_escape_time = 0 //how long it takes for mobs to escape when the entrance is open
|
||||
var/load_time = 30 //how long it takes for mobs to be loaded into the pet carrier
|
||||
var/has_lock_sprites = TRUE //whether to load the lock overlays or not
|
||||
var/allows_hostiles = FALSE //does the pet carrier allow hostile entities to be held within it?
|
||||
|
||||
/obj/item/pet_carrier/donator
|
||||
custom_materials = null //you cant just use the loadout item to get free metal!
|
||||
|
||||
/obj/item/pet_carrier/Destroy()
|
||||
if(occupants.len)
|
||||
@@ -51,20 +60,20 @@
|
||||
else
|
||||
. += "<span class='notice'>It has nothing inside.</span>"
|
||||
if(user.canUseTopic(src))
|
||||
. += "<span class='notice'>Activate it in your hand to [open ? "close" : "open"] its door.</span>"
|
||||
. += "<span class='notice'>Activate it in your hand to [open ? "close" : "open"] its [entrance_name].</span>"
|
||||
if(!open)
|
||||
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"] its door.</span>"
|
||||
. += "<span class='notice'>Alt-click to [locked ? "unlock" : "lock"] its [entrance_name].</span>"
|
||||
|
||||
/obj/item/pet_carrier/attack_self(mob/living/user)
|
||||
if(open)
|
||||
to_chat(user, "<span class='notice'>You close [src]'s door.</span>")
|
||||
to_chat(user, "<span class='notice'>You close [src]'s [entrance_name].</span>")
|
||||
playsound(user, 'sound/effects/bin_close.ogg', 50, TRUE)
|
||||
open = FALSE
|
||||
else
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>[src] is locked!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You open [src]'s door.</span>")
|
||||
to_chat(user, "<span class='notice'>You open [src]'s [entrance_name].</span>")
|
||||
playsound(user, 'sound/effects/bin_open.ogg', 50, TRUE)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
@@ -86,7 +95,7 @@
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
if(!open)
|
||||
to_chat(user, "<span class='warning'>You need to open [src]'s door!</span>")
|
||||
to_chat(user, "<span class='warning'>You need to open [src]'s [entrance_name]!</span>")
|
||||
return
|
||||
if(target.mob_size > max_occupant_weight)
|
||||
if(ishuman(target))
|
||||
@@ -94,13 +103,16 @@
|
||||
if(iscatperson(H))
|
||||
to_chat(user, "<span class='warning'>You'd need a lot of catnip and treats, plus maybe a laser pointer, for that to work.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Humans, generally, do not fit into pet carriers.</span>")
|
||||
to_chat(user, "<span class='warning'>Humans, generally, do not fit into [name]s.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You get the feeling [target] isn't meant for a [name].</span>")
|
||||
return
|
||||
if(user == target)
|
||||
to_chat(user, "<span class='warning'>Why would you ever do that?</span>")
|
||||
return
|
||||
if((ishostile(target) && (!allows_hostiles || !istype(target, /mob/living/simple_animal/hostile/carp/cayenne))) || target.move_resist >= MOVE_FORCE_VERY_STRONG) //don't allow goliaths into pet carriers, but let cayenne in!
|
||||
to_chat(user, "<span class='warning'>You have a feeling you shouldn't keep this as a pet.</span>")
|
||||
return
|
||||
load_occupant(user, target)
|
||||
|
||||
/obj/item/pet_carrier/relaymove(mob/living/user, direction)
|
||||
@@ -110,8 +122,8 @@
|
||||
remove_occupant(user)
|
||||
return
|
||||
else if(!locked)
|
||||
loc.visible_message("<span class='notice'>[user] pushes open the door to [src]!</span>", \
|
||||
"<span class='warning'>[user] pushes open the door of [src]!</span>")
|
||||
loc.visible_message("<span class='notice'>[user] pushes open the [entrance_name] to [src]!</span>", \
|
||||
"<span class='warning'>[user] pushes open the [entrance_name] of [src]!</span>")
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return
|
||||
@@ -119,12 +131,24 @@
|
||||
container_resist(user)
|
||||
|
||||
/obj/item/pet_carrier/container_resist(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_BREAKOUT)
|
||||
user.last_special = world.time + CLICK_CD_BREAKOUT
|
||||
//don't do the whole resist timer thing if it's open!
|
||||
if(open)
|
||||
if(alternate_escape_time > 0)
|
||||
loc.visible_message("<span class='notice'>The [src] begins to shake!</span>")
|
||||
if(do_after(user, alternate_escape_time, target = user))
|
||||
loc.visible_message("<span class='notice'>[user] jumps out of [src]</span>")
|
||||
remove_occupant(user)
|
||||
return
|
||||
else //instant escape, different message
|
||||
loc.visible_message("<span class='notice'>[user] climbs out of [src]!</span>", \
|
||||
"<span class='warning'>[user] jumps out of [src]!</span>")
|
||||
remove_occupant(user)
|
||||
return
|
||||
|
||||
if(user.mob_size <= MOB_SIZE_SMALL)
|
||||
to_chat(user, "<span class='notice'>You poke a limb through [src]'s bars and start fumbling for the lock switch... (This will take some time.)</span>")
|
||||
to_chat(loc, "<span class='warning'>You see [user] reach through the bars and fumble for the lock switch!</span>")
|
||||
if(!do_after(user, rand(300, 400), target = user) || open || !locked || !(user in occupants))
|
||||
to_chat(user, "<span class='notice'>You begin to try escaping the [src] and start fumbling for the lock switch... (This will take some time.)</span>")
|
||||
to_chat(loc, "<span class='warning'>You see [user] attempting to unlock the [src]!</span>")
|
||||
if(!do_after(user, rand(escape_time * 1.5, escape_time * 2), target = user) || open || !locked || !(user in occupants))
|
||||
return
|
||||
loc.visible_message("<span class='warning'>[user] flips the lock switch on [src] by reaching through!</span>", null, null, null, user)
|
||||
to_chat(user, "<span class='boldannounce'>Bingo! The lock pops open!</span>")
|
||||
@@ -132,12 +156,12 @@
|
||||
playsound(src, 'sound/machines/boltsup.ogg', 30, TRUE)
|
||||
update_icon()
|
||||
else
|
||||
loc.visible_message("<span class='warning'>[src] starts rattling as something pushes against the door!</span>", null, null, null, user)
|
||||
to_chat(user, "<span class='notice'>You start pushing out of [src]... (This will take about 20 seconds.)</span>")
|
||||
if(!do_after(user, 200, target = user) || open || !locked || !(user in occupants))
|
||||
loc.visible_message("<span class='warning'>[src] starts rattling as something pushes against the [entrance_name]!</span>", null, null, null, user)
|
||||
to_chat(user, "<span class='notice'>You start pushing out of [src]... (This will take about [escape_time/10] seconds.)</span>")
|
||||
if(!do_after(user, escape_time, target = user) || open || !locked || !(user in occupants))
|
||||
return
|
||||
loc.visible_message("<span class='warning'>[user] shoves out of [src]!</span>", null, null, null, user)
|
||||
to_chat(user, "<span class='notice'>You shove open [src]'s door against the lock's resistance and fall out!</span>")
|
||||
to_chat(user, "<span class='notice'>You shove open [src]'s [entrance_name] against the lock's resistance and fall out!</span>")
|
||||
locked = FALSE
|
||||
open = TRUE
|
||||
update_icon()
|
||||
@@ -151,7 +175,7 @@
|
||||
|
||||
/obj/item/pet_carrier/update_overlays()
|
||||
. = ..()
|
||||
if(!open)
|
||||
if(!open && has_lock_sprites)
|
||||
. += "[locked ? "" : "un"]locked"
|
||||
|
||||
/obj/item/pet_carrier/MouseDrop(atom/over_atom)
|
||||
@@ -166,21 +190,22 @@
|
||||
/obj/item/pet_carrier/proc/load_occupant(mob/living/user, mob/living/target)
|
||||
if(pet_carrier_full(src))
|
||||
to_chat(user, "<span class='warning'>[src] is already carrying too much!</span>")
|
||||
return
|
||||
return FALSE
|
||||
user.visible_message("<span class='notice'>[user] starts loading [target] into [src].</span>", \
|
||||
"<span class='notice'>You start loading [target] into [src]...</span>", null, null, target)
|
||||
to_chat(target, "<span class='userdanger'>[user] starts loading you into [user.p_their()] [name]!</span>")
|
||||
if(!do_mob(user, target, 30))
|
||||
return
|
||||
if(!do_mob(user, target, load_time))
|
||||
return FALSE
|
||||
if(target in occupants)
|
||||
return
|
||||
return FALSE
|
||||
if(pet_carrier_full(src)) //Run the checks again, just in case
|
||||
to_chat(user, "<span class='warning'>[src] is already carrying too much!</span>")
|
||||
return
|
||||
return FALSE
|
||||
user.visible_message("<span class='notice'>[user] loads [target] into [src]!</span>", \
|
||||
"<span class='notice'>You load [target] into [src].</span>", null, null, target)
|
||||
to_chat(target, "<span class='userdanger'>[user] loads you into [user.p_their()] [name]!</span>")
|
||||
add_occupant(target)
|
||||
return TRUE
|
||||
|
||||
/obj/item/pet_carrier/proc/add_occupant(mob/living/occupant)
|
||||
if(occupant in occupants || !istype(occupant))
|
||||
@@ -192,9 +217,137 @@
|
||||
/obj/item/pet_carrier/proc/remove_occupant(mob/living/occupant, turf/new_turf)
|
||||
if(!(occupant in occupants) || !istype(occupant))
|
||||
return
|
||||
occupant.forceMove(new_turf ? new_turf : drop_location())
|
||||
occupant.forceMove(new_turf ? new_turf : get_turf(src))
|
||||
occupants -= occupant
|
||||
occupant_weight -= occupant.mob_size
|
||||
occupant.setDir(SOUTH)
|
||||
|
||||
//bluespace jar, a reskin of the pet carrier that can fit people and smashes when thrown
|
||||
/obj/item/pet_carrier/bluespace
|
||||
name = "bluespace jar"
|
||||
desc = "A jar, that seems to be bigger on the inside, somehow allowing lifeforms to fit through its narrow entrance."
|
||||
open = FALSE //starts closed so it looks better on menus
|
||||
icon_state = "bluespace_jar"
|
||||
item_state = "bluespace_jar"
|
||||
lefthand_file = ""
|
||||
righthand_file = ""
|
||||
max_occupant_weight = MOB_SIZE_HUMAN //can fit people, like a bluespace bodybag!
|
||||
load_time = 40 //loading things into a jar takes longer than a regular pet carrier
|
||||
entrance_name = "lid"
|
||||
w_class = WEIGHT_CLASS_SMALL //it's a jar
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
max_occupants = 1 //far less than a regular carrier or bluespace bodybag, because it can be thrown to release the contents
|
||||
allows_hostiles = TRUE //can fit hostile creatures, with the move resist restrictions in place, this means they still cannot take things like legions/goliaths/etc regardless
|
||||
has_lock_sprites = FALSE //jar doesn't show the regular lock overlay
|
||||
custom_materials = list(/datum/material/glass = 1000, /datum/material/bluespace = 600)
|
||||
escape_time = 200 //equal to the time of a bluespace bodybag
|
||||
alternate_escape_time = 100
|
||||
|
||||
///gas supply for simplemobs so they don't die
|
||||
var/datum/gas_mixture/occupant_gas_supply
|
||||
///level until the reagent gets INGEST ed instead of TOUCH
|
||||
var/sipping_level = 150
|
||||
///prob50 level of sipping
|
||||
var/sipping_probably = 99
|
||||
///chem transfer rate / second
|
||||
var/transfer_rate = 5
|
||||
|
||||
/obj/item/pet_carrier/bluespace/Initialize()
|
||||
. = ..()
|
||||
create_reagents(300, OPENCONTAINER, DEFAULT_REAGENTS_VALUE) //equivalent of bsbeakers
|
||||
|
||||
/obj/item/pet_carrier/bluespace/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/pet_carrier/bluespace/attack_self(mob/living/user)
|
||||
..()
|
||||
if(reagents)
|
||||
if(open)
|
||||
reagents.reagents_holder_flags = OPENCONTAINER
|
||||
else
|
||||
reagents.reagents_holder_flags = NONE
|
||||
|
||||
/obj/item/pet_carrier/bluespace/update_icon_state()
|
||||
if(open)
|
||||
icon_state = "bluespace_jar_open"
|
||||
else
|
||||
icon_state = "bluespace_jar"
|
||||
|
||||
/obj/item/pet_carrier/bluespace/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
. = ..()
|
||||
//delete the item upon impact, releasing the creature inside (this is handled by its deletion)
|
||||
if(occupants.len)
|
||||
loc.visible_message("<span class='warning'>The bluespace jar smashes, releasing [occupants[1]]!</span>")
|
||||
|
||||
if(reagents?.total_volume && ismob(hit_atom) && hit_atom.reagents)
|
||||
reagents.total_volume *= rand(5,10) * 0.1 //Not all of it makes contact with the target
|
||||
var/mob/M = hit_atom
|
||||
var/R = reagents.log_list()
|
||||
hit_atom.visible_message("<span class='danger'>[M] has been splashed with something!</span>", \
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
var/turf/TT = get_turf(hit_atom)
|
||||
var/throwerstring
|
||||
if(thrownby)
|
||||
log_combat(thrownby, M, "splashed", R)
|
||||
var/turf/AT = get_turf(thrownby)
|
||||
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] (AREACOORD(AT)]"
|
||||
log_reagent("SPLASH: [src] mob throw_impact() onto [key_name(hit_atom)] at [TT] ([AREACOORD(TT)])[throwerstring] - [R]")
|
||||
reagents.reaction(hit_atom, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
playsound(src, "shatter", 70, 1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/pet_carrier/bluespace/add_occupant(mob/living/occupant) //update the gas supply as required, this acts like magical internals
|
||||
. = ..()
|
||||
if(!occupant_gas_supply)
|
||||
occupant_gas_supply = new
|
||||
|
||||
if(isanimal(occupant))
|
||||
var/mob/living/simple_animal/animal = occupant
|
||||
occupant_gas_supply[/datum/gas/oxygen] = 0.0064 //make sure it has some gas in so it isn't depressurized
|
||||
occupant_gas_supply.set_temperature(animal.minbodytemp) //simple animals only care about temperature/pressure when their turf isnt a location
|
||||
|
||||
if(ishuman(occupant)) //humans require resistance to cold/heat and living in no air while inside, and lose this when outside
|
||||
START_PROCESSING(SSobj, src)
|
||||
ADD_TRAIT(occupant, TRAIT_RESISTCOLD, "bluespace_container_cold_resist")
|
||||
ADD_TRAIT(occupant, TRAIT_RESISTHEAT, "bluespace_container_heat_resist")
|
||||
ADD_TRAIT(occupant, TRAIT_NOBREATH, "bluespace_container_no_breath")
|
||||
ADD_TRAIT(occupant, TRAIT_RESISTHIGHPRESSURE, "bluespace_container_resist_high_pressure")
|
||||
ADD_TRAIT(occupant, TRAIT_RESISTLOWPRESSURE, "bluespace_container_resist_low_pressure")
|
||||
|
||||
/obj/item/pet_carrier/bluespace/remove_occupant(mob/living/occupant)
|
||||
. = ..()
|
||||
if(ishuman(occupant))
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
REMOVE_TRAIT(occupant, TRAIT_RESISTCOLD, "bluespace_container_cold_resist")
|
||||
REMOVE_TRAIT(occupant, TRAIT_RESISTHEAT, "bluespace_container_heat_resist")
|
||||
REMOVE_TRAIT(occupant, TRAIT_NOBREATH, "bluespace_container_no_breath")
|
||||
REMOVE_TRAIT(occupant, TRAIT_RESISTHIGHPRESSURE, "bluespace_container_resist_high_pressure")
|
||||
REMOVE_TRAIT(occupant, TRAIT_RESISTLOWPRESSURE, "bluespace_container_resist_low_pressure")
|
||||
name = initial(name)
|
||||
|
||||
/obj/item/pet_carrier/bluespace/return_air()
|
||||
if(!occupant_gas_supply)
|
||||
occupant_gas_supply = new
|
||||
return occupant_gas_supply
|
||||
|
||||
/obj/item/pet_carrier/bluespace/process()
|
||||
if(!reagents)
|
||||
return
|
||||
for(var/mob/living/L in occupants)
|
||||
if(!ishuman(L))
|
||||
continue
|
||||
if((reagents.total_volume >= sipping_level) || ((reagents.total_volume >= sipping_probably) && prob(50))) //sipp
|
||||
reagents.reaction(L, INGEST) //consume
|
||||
reagents.trans_to(L, transfer_rate)
|
||||
else
|
||||
reagents.reaction(L, TOUCH, show_message = FALSE)
|
||||
|
||||
/obj/item/pet_carrier/bluespace/load_occupant(mob/living/user, mob/living/target)
|
||||
if(..())
|
||||
name = "[initial(name)] ([target])"
|
||||
|
||||
#undef pet_carrier_full
|
||||
|
||||
@@ -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 = SHARP_EDGED
|
||||
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
|
||||
@@ -8,6 +8,7 @@
|
||||
resistance_flags = FLAMMABLE
|
||||
var/list/squeak_override //Weighted list; If you want your plush to have different squeak sounds use this
|
||||
var/stuffed = TRUE //If the plushie has stuffing in it
|
||||
var/unstuffable = FALSE //for plushies that can't be stuffed
|
||||
var/obj/item/grenade/grenade //You can remove the stuffing from a plushie and add a grenade to it for *nefarious uses*
|
||||
//--love ~<3--
|
||||
gender = NEUTER
|
||||
@@ -174,6 +175,9 @@
|
||||
/obj/item/toy/plush/attackby(obj/item/I, mob/living/user, params)
|
||||
if(I.get_sharpness())
|
||||
if(!grenade)
|
||||
if(unstuffable)
|
||||
to_chat(user, "<span class='notice'>Nothing to do here.</span>")
|
||||
return
|
||||
if(!stuffed)
|
||||
to_chat(user, "<span class='warning'>You already murdered it!</span>")
|
||||
return
|
||||
@@ -187,6 +191,13 @@
|
||||
grenade = null
|
||||
return
|
||||
if(istype(I, /obj/item/grenade))
|
||||
if(unstuffable)
|
||||
to_chat(user, "<span class='warning'>No... you should destroy it now!</span>")
|
||||
sleep(10)
|
||||
if(QDELETED(user) || QDELETED(src))
|
||||
return
|
||||
SEND_SOUND(user, 'sound/weapons/armbomb.ogg')
|
||||
return
|
||||
if(stuffed)
|
||||
to_chat(user, "<span class='warning'>You need to remove some stuffing first!</span>")
|
||||
return
|
||||
@@ -677,6 +688,18 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
icon_state = "scrubpuppy"
|
||||
item_state = "scrubpuppy"
|
||||
|
||||
/obj/item/toy/plush/borgplushie/meddrake
|
||||
name = "MediDrake Plushie"
|
||||
desc = "An adorable stuffed toy of a Medidrake."
|
||||
icon_state = "meddrake"
|
||||
item_state = "meddrake"
|
||||
|
||||
/obj/item/toy/plush/borgplushie/secdrake
|
||||
name = "SecDrake Plushie"
|
||||
desc = "An adorable stuffed toy of a Secdrake."
|
||||
icon_state = "secdrake"
|
||||
item_state = "secdrake"
|
||||
|
||||
/obj/item/toy/plush/aiplush
|
||||
name = "AI plushie"
|
||||
desc = "A little stuffed toy AI core... it appears to be malfunctioning."
|
||||
@@ -743,3 +766,14 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
attack_verb = list("headbutt", "scritched", "bit")
|
||||
squeak_override = list('modular_citadel/sound/voice/nya.ogg' = 1)
|
||||
can_random_spawn = FALSE
|
||||
|
||||
|
||||
/obj/item/toy/plush/hairball
|
||||
name = "Hairball"
|
||||
desc = "A bundle of undigested fibers and scales. Yuck."
|
||||
icon_state = "Hairball"
|
||||
unstuffable = TRUE
|
||||
young = TRUE // Your own mouth-baby.
|
||||
squeak_override = list('sound/misc/splort.ogg'=1)
|
||||
attack_verb = list("sploshed", "splorted", "slushed")
|
||||
can_random_spawn = FALSE
|
||||
|
||||
@@ -14,12 +14,11 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 40)
|
||||
resistance_flags = FIRE_PROOF
|
||||
click_delay = CLICK_CD_MELEE * 1.5
|
||||
attack_speed = CLICK_CD_MELEE * 1.5
|
||||
var/fisto_setting = 1
|
||||
var/gasperfist = 3
|
||||
var/obj/item/tank/internals/tank = null //Tank used for the gauntlet's piston-ram.
|
||||
|
||||
|
||||
/obj/item/melee/powerfist/examine(mob/user)
|
||||
. = ..()
|
||||
if(!in_range(user, src))
|
||||
@@ -98,7 +97,7 @@
|
||||
target.visible_message("<span class='danger'>[user]'s powerfist lets out a weak hiss as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
|
||||
"<span class='userdanger'>[user]'s punch strikes with force!</span>")
|
||||
return
|
||||
target.apply_damage(totalitemdamage * fisto_setting, BRUTE)
|
||||
target.apply_damage(totalitemdamage * fisto_setting, BRUTE, wound_bonus = -25*fisto_setting**2)
|
||||
target.visible_message("<span class='danger'>[user]'s powerfist lets out a loud hiss as [user.p_they()] punch[user.p_es()] [target.name]!</span>", \
|
||||
"<span class='userdanger'>You cry out in pain as [user]'s punch flings you backwards!</span>")
|
||||
new /obj/effect/temp_visual/kinetic_blast(target.loc)
|
||||
|
||||
@@ -355,6 +355,7 @@
|
||||
emaggedhitdamage = 0
|
||||
|
||||
/obj/item/borg/lollipop/equipped()
|
||||
. = ..()
|
||||
check_amount()
|
||||
|
||||
/obj/item/borg/lollipop/dropped(mob/user)
|
||||
@@ -745,8 +746,8 @@
|
||||
***********************************************************************/
|
||||
|
||||
/obj/item/weapon/gripper
|
||||
name = "circuit gripper"
|
||||
desc = "A simple grasping tool for inserting circuitboards into machinary."
|
||||
name = "engineering gripper"
|
||||
desc = "A simple grasping tool for interacting with various engineering related items, such as circuits, gas tanks, conveyer belts and more. Alt click to drop instead of use."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "gripper"
|
||||
|
||||
@@ -754,18 +755,36 @@
|
||||
|
||||
//Has a list of items that it can hold.
|
||||
var/list/can_hold = list(
|
||||
/obj/item/circuitboard
|
||||
/obj/item/circuitboard,
|
||||
/obj/item/light,
|
||||
/obj/item/electronics,
|
||||
/obj/item/tank,
|
||||
/obj/item/conveyor_switch_construct,
|
||||
/obj/item/stack/conveyor,
|
||||
/obj/item/wallframe,
|
||||
/obj/item/vending_refill,
|
||||
/obj/item/stack/sheet,
|
||||
/obj/item/stack/tile,
|
||||
/obj/item/stack/rods,
|
||||
/obj/item/stock_parts
|
||||
)
|
||||
//Basically a blacklist for any subtypes above we dont want
|
||||
var/list/cannot_hold = list(
|
||||
/obj/item/stack/sheet/mineral/plasma,
|
||||
/obj/item/stack/sheet/plasteel
|
||||
)
|
||||
|
||||
var/obj/item/wrapped = null // Item currently being held.
|
||||
|
||||
/obj/item/weapon/gripper/attack_self()
|
||||
//Used to interact with UI's of held items, such as gas tanks and airlock electronics.
|
||||
/obj/item/weapon/gripper/AltClick(mob/user)
|
||||
if(wrapped)
|
||||
wrapped.forceMove(get_turf(wrapped))
|
||||
to_chat(user, "<span class='notice'>You drop the [wrapped].</span>")
|
||||
wrapped = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params)
|
||||
/obj/item/weapon/gripper/pre_attack(var/atom/target, var/mob/living/silicon/robot/user, proximity, params)
|
||||
|
||||
if(!proximity)
|
||||
return
|
||||
@@ -791,18 +810,21 @@
|
||||
return
|
||||
|
||||
else if(istype(target,/obj/item))
|
||||
|
||||
var/obj/item/I = target
|
||||
|
||||
var/grab = 0
|
||||
|
||||
for(var/typepath in can_hold)
|
||||
if(istype(I,typepath))
|
||||
grab = 1
|
||||
break
|
||||
for(var/badpath in cannot_hold)
|
||||
if(istype(I,badpath))
|
||||
if(!user.emagged)
|
||||
grab = 0
|
||||
continue
|
||||
|
||||
//We can grab the item, finally.
|
||||
if(grab)
|
||||
to_chat(user, "You collect \the [I].")
|
||||
to_chat(user, "<span class='notice'>You collect \the [I].</span>")
|
||||
I.loc = src
|
||||
wrapped = I
|
||||
return
|
||||
@@ -811,18 +833,24 @@
|
||||
|
||||
/obj/item/weapon/gripper/mining
|
||||
name = "shelter capsule deployer"
|
||||
desc = "A simple grasping tool for carrying and deploying shelter capsules."
|
||||
desc = "A simple grasping tool for carrying and deploying shelter capsules. Alt click to drop instead of use."
|
||||
icon_state = "gripper_mining"
|
||||
can_hold = list(
|
||||
/obj/item/survivalcapsule
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/mining/attack_self()
|
||||
if(wrapped)
|
||||
wrapped.forceMove(get_turf(wrapped))
|
||||
wrapped.attack_self()
|
||||
wrapped = null
|
||||
return
|
||||
/obj/item/weapon/gripper/medical
|
||||
name = "medical gripper"
|
||||
desc = "A simple grasping tool for interacting with medical equipment, such as beakers, blood bags, chem bags and more. Alt click to drop instead of use."
|
||||
icon_state = "gripper_medical"
|
||||
can_hold = list(
|
||||
/obj/item/storage/bag/bio,
|
||||
/obj/item/storage/bag/chemistry,
|
||||
/obj/item/storage/pill_bottle,
|
||||
/obj/item/reagent_containers/glass,
|
||||
/obj/item/reagent_containers/pill,
|
||||
/obj/item/reagent_containers/blood
|
||||
)
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/cyborg
|
||||
name = "cyborg plasma cutter"
|
||||
@@ -906,6 +934,9 @@
|
||||
icon_state = "data_1"
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
Dogborg stuff
|
||||
***********************************************************************/
|
||||
///Mere cosmetic dogborg items, remnants of what were once the most annoying cyborg modules.
|
||||
/obj/item/dogborg_tongue
|
||||
name = "synthetic tongue"
|
||||
|
||||
@@ -6,21 +6,24 @@
|
||||
desc = "Protected by FRM."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "cyborg_upgrade"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/locked = FALSE
|
||||
var/installed = 0
|
||||
var/require_module = 0
|
||||
var/list/module_type
|
||||
/// Bitflags listing module compatibility. Used in the exosuit fabricator for creating sub-categories.
|
||||
var/module_flags = NONE
|
||||
// if true, is not stored in the robot to be ejected
|
||||
// if module is reset
|
||||
var/one_use = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R, user = usr)
|
||||
if(R.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
|
||||
to_chat(user, "<span class='warning'>[src] will not function on a deceased cyborg.</span>")
|
||||
return FALSE
|
||||
if(module_type && !is_type_in_list(R.module, module_type))
|
||||
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
|
||||
to_chat(user, "There's no mounting point for the module!")
|
||||
to_chat(R, "<span class='alert'>Upgrade mounting error! No suitable hardpoint detected.</span>")
|
||||
to_chat(user, "<span class='warning'>There's no mounting point for the module!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -37,7 +40,7 @@
|
||||
one_use = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/rename/attack_self(mob/user)
|
||||
heldname = stripped_input(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN)
|
||||
heldname = sanitize_name(stripped_input(user, "Enter new robot name", "Cyborg Reclassification", heldname, MAX_NAME_LEN))
|
||||
|
||||
/obj/item/borg/upgrade/rename/action(mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
@@ -95,6 +98,7 @@
|
||||
desc = "Used to cool a mounted energy-based firearm, increasing the potential current in it and thus its recharge rate."
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_flags = BORG_MODULE_SECURITY
|
||||
|
||||
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
@@ -147,6 +151,7 @@
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/miner)
|
||||
module_flags = BORG_MODULE_MINER
|
||||
|
||||
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
@@ -207,6 +212,7 @@
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/butler)
|
||||
module_flags = BORG_MODULE_JANITOR
|
||||
|
||||
/obj/item/borg/upgrade/tboh/action(mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
@@ -234,6 +240,7 @@
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/butler)
|
||||
module_flags = BORG_MODULE_JANITOR
|
||||
|
||||
/obj/item/borg/upgrade/amop/action(mob/living/silicon/robot/R)
|
||||
. = ..()
|
||||
@@ -241,9 +248,9 @@
|
||||
for(var/obj/item/mop/cyborg/M in R.module.modules)
|
||||
R.module.remove_module(M, TRUE)
|
||||
|
||||
var/obj/item/mop/advanced/cyborg/A = new /obj/item/mop/advanced/cyborg(R.module)
|
||||
R.module.basic_modules += A
|
||||
R.module.add_module(A, FALSE, TRUE)
|
||||
var/obj/item/mop/advanced/cyborg/A = new /obj/item/mop/advanced/cyborg(R.module)
|
||||
R.module.basic_modules += A
|
||||
R.module.add_module(A, FALSE, TRUE)
|
||||
|
||||
/obj/item/borg/upgrade/amop/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
@@ -283,6 +290,7 @@
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/miner)
|
||||
module_flags = BORG_MODULE_MINER
|
||||
|
||||
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
@@ -402,6 +410,7 @@
|
||||
module_type = list(/obj/item/robot_module/medical,
|
||||
/obj/item/robot_module/syndicate_medical)
|
||||
var/list/additional_reagents = list()
|
||||
module_flags = BORG_MODULE_MEDICAL
|
||||
|
||||
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
@@ -459,7 +468,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
|
||||
@@ -471,6 +480,7 @@
|
||||
require_module = 1
|
||||
module_type = list(/obj/item/robot_module/medical,
|
||||
/obj/item/robot_module/syndicate_medical)
|
||||
module_flags = BORG_MODULE_MEDICAL
|
||||
|
||||
/obj/item/borg/upgrade/processor/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
@@ -545,7 +555,7 @@
|
||||
to_chat(usr, "<span class='notice'>This unit already has an expand module installed!</span>")
|
||||
return FALSE
|
||||
|
||||
R.notransform = TRUE
|
||||
R.mob_transforming = TRUE
|
||||
var/prev_locked_down = R.locked_down
|
||||
R.SetLockdown(1)
|
||||
R.anchored = TRUE
|
||||
@@ -559,14 +569,14 @@
|
||||
if(!prev_locked_down)
|
||||
R.SetLockdown(0)
|
||||
R.anchored = FALSE
|
||||
R.notransform = FALSE
|
||||
R.mob_transforming = FALSE
|
||||
R.resize = 2
|
||||
R.hasExpanded = TRUE
|
||||
R.update_transform()
|
||||
|
||||
/obj/item/borg/upgrade/expand/deactivate(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
if (.)
|
||||
if (. && R.hasExpanded)
|
||||
R.resize = 0.5
|
||||
R.hasExpanded = FALSE
|
||||
R.update_transform()
|
||||
@@ -578,6 +588,7 @@
|
||||
icon_state = "borg_BS_RPED"
|
||||
require_module = TRUE
|
||||
module_type = list(/obj/item/robot_module/engineering, /obj/item/robot_module/saboteur)
|
||||
module_flags = BORG_MODULE_ENGINEERING
|
||||
|
||||
/obj/item/borg/upgrade/rped/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
@@ -612,8 +623,8 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "pinpointer_crew"
|
||||
require_module = TRUE
|
||||
module_type = list(/obj/item/robot_module/medical,
|
||||
/obj/item/robot_module/syndicate_medical)
|
||||
module_type = list(/obj/item/robot_module/medical, /obj/item/robot_module/syndicate_medical)
|
||||
module_flags = BORG_MODULE_MEDICAL
|
||||
|
||||
/obj/item/borg/upgrade/pinpointer/action(mob/living/silicon/robot/R, user = usr)
|
||||
. = ..()
|
||||
|
||||
@@ -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.sharpness = SHARP_POINTY
|
||||
I.throwforce = clamp(I.throwforce + increment, 0, max)
|
||||
I.name = "[prefix] [I.name]"
|
||||
name = "worn out [name]"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/datum/block_parry_data/shield
|
||||
block_damage_multiplier = 0.25
|
||||
block_stamina_efficiency = 2.5
|
||||
block_stamina_cost_per_second = 3.5
|
||||
block_stamina_cost_per_second = 2.5
|
||||
block_slowdown = 0
|
||||
block_lock_attacking = FALSE
|
||||
block_lock_sprinting = TRUE
|
||||
@@ -106,8 +106,8 @@
|
||||
var/disarming = (target_downed && (shield_flags & SHIELD_BASH_GROUND_SLAM_DISARM)) || (shield_flags & SHIELD_BASH_ALWAYS_DISARM) || (wallhit && (shield_flags & SHIELD_BASH_WALL_DISARM))
|
||||
var/knockdown = !target_downed && ((shield_flags & SHIELD_BASH_ALWAYS_KNOCKDOWN) || (wallhit && (shield_flags & SHIELD_BASH_WALL_KNOCKDOWN)))
|
||||
if(shieldbash_stagger_duration || knockdown)
|
||||
target.visible_message("<span class='warning'>[target] is knocked [knockdown? "to the floor" : "off balanace"]!</span>",
|
||||
"<span class='userdanger'>You are knocked [knockdown? "to the floor" : "off balanace"]!</span>")
|
||||
target.visible_message("<span class='warning'>[target] is knocked [knockdown? "to the floor" : "off balance"]!</span>",
|
||||
"<span class='userdanger'>You are knocked [knockdown? "to the floor" : "off balance"]!</span>")
|
||||
if(knockdown)
|
||||
target.KnockToFloor(disarming)
|
||||
else if(disarming)
|
||||
@@ -386,7 +386,7 @@ obj/item/shield/riot/bullet_proof
|
||||
max_integrity = 100
|
||||
obj_integrity = 100
|
||||
can_shatter = FALSE
|
||||
item_flags = SLOWS_WHILE_IN_HAND
|
||||
item_flags = SLOWS_WHILE_IN_HAND | ITEM_CAN_BLOCK
|
||||
var/recharge_timerid
|
||||
var/recharge_delay = 15 SECONDS
|
||||
|
||||
@@ -446,6 +446,12 @@ obj/item/shield/riot/bullet_proof
|
||||
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/energy/active_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return, override_direction)
|
||||
if((attack_type & ATTACK_TYPE_PROJECTILE) && is_energy_reflectable_projectile(object))
|
||||
block_return[BLOCK_RETURN_REDIRECT_METHOD] = REDIRECT_METHOD_DEFLECT
|
||||
return BLOCK_SUCCESS | BLOCK_REDIRECTED | BLOCK_SHOULD_REDIRECT
|
||||
return ..()
|
||||
|
||||
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
|
||||
if(clumsy_check && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
|
||||
to_chat(user, "<span class='userdanger'>You beat yourself in the head with [src]!</span>")
|
||||
|
||||
@@ -31,10 +31,7 @@
|
||||
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/item/target/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
/obj/item/target/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(pinnedLoc)
|
||||
pinnedLoc.removeTarget(user)
|
||||
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
icon_state = "large"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
item_flags = DROPDEL
|
||||
sharpness = SHARP_EDGED
|
||||
|
||||
/obj/item/shrapnel/stingball // stingbang grenades
|
||||
name = "stingball"
|
||||
embedding = list(embed_chance=90, fall_chance=3, jostle_chance=7, ignore_throwspeed_threshold=TRUE, pain_stam_pct=0.7, pain_mult=5, jostle_pain_mult=6, rip_time=15, embed_chance_turf_mod=-100)
|
||||
icon_state = "tiny"
|
||||
sharpness = SHARP_NONE
|
||||
|
||||
/obj/item/shrapnel/bullet // bullets
|
||||
name = "bullet"
|
||||
@@ -28,21 +30,24 @@
|
||||
|
||||
/obj/item/projectile/bullet/shrapnel
|
||||
name = "flying shrapnel shard"
|
||||
damage = 9
|
||||
range = 10
|
||||
damage = 14
|
||||
range = 20
|
||||
armour_penetration = -30
|
||||
dismemberment = 5
|
||||
ricochets_max = 2
|
||||
ricochet_chance = 40
|
||||
ricochet_chance = 70
|
||||
shrapnel_type = /obj/item/shrapnel
|
||||
ricochet_incidence_leeway = 60
|
||||
sharpness = SHARP_EDGED
|
||||
wound_bonus = 40
|
||||
|
||||
/obj/item/projectile/bullet/shrapnel/mega
|
||||
name = "flying shrapnel hunk"
|
||||
range = 25
|
||||
dismemberment = 10
|
||||
ricochets_max = 4
|
||||
ricochet_chance = 90
|
||||
range = 45
|
||||
dismemberment = 15
|
||||
ricochets_max = 6
|
||||
ricochet_chance = 130
|
||||
ricochet_incidence_leeway = 0
|
||||
ricochet_decay_chance = 0.9
|
||||
|
||||
/obj/item/projectile/bullet/pellet/stingball
|
||||
@@ -62,3 +67,15 @@
|
||||
name = "megastingball pellet"
|
||||
ricochets_max = 6
|
||||
ricochet_chance = 110
|
||||
|
||||
/obj/item/projectile/bullet/pellet/stingball/breaker
|
||||
name = "breakbang pellet"
|
||||
damage = 10
|
||||
wound_bonus = 40
|
||||
sharpness = SHARP_NONE
|
||||
|
||||
/obj/item/projectile/bullet/pellet/stingball/shred
|
||||
name = "shredbang pellet"
|
||||
damage = 10
|
||||
wound_bonus = 30
|
||||
sharpness = SHARP_EDGED
|
||||
|
||||
@@ -40,4 +40,3 @@
|
||||
user.visible_message("<span class='warning'>[user] waves around \the \"[label]\" sign.</span>")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] waves around blank sign.</span>")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
//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 = SHARP_EDGED
|
||||
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
|
||||
wound_bonus = -15
|
||||
bare_wound_bonus = 15
|
||||
|
||||
/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 = SHARP_EDGED
|
||||
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")
|
||||
@@ -74,8 +74,7 @@
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_self(mob/user)// to prevent the construction menu from ever happening
|
||||
to_chat(user, "<span class='warning'>You cannot crush the polycrystal in-hand, try breaking one off.</span>")
|
||||
|
||||
//ATTACK HAND IGNORING PARENT RETURN VALUE
|
||||
/obj/item/stack/sheet/bluespace_crystal/attack_hand(mob/user)
|
||||
/obj/item/stack/sheet/bluespace_crystal/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(user.get_inactive_held_item() == src)
|
||||
if(zero_amount())
|
||||
return
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
full_w_class = WEIGHT_CLASS_TINY
|
||||
resistance_flags = FLAMMABLE
|
||||
grind_results = list(/datum/reagent/cellulose = 10)
|
||||
var/value = 0
|
||||
|
||||
/obj/item/stack/spacecash/Initialize()
|
||||
|
||||
@@ -15,11 +15,20 @@
|
||||
var/self_delay = 50
|
||||
var/other_delay = 0
|
||||
var/repeating = FALSE
|
||||
/// How much brute we heal per application
|
||||
var/heal_brute
|
||||
/// How much burn we heal per application
|
||||
var/heal_burn
|
||||
/// How much we reduce bleeding per application on cut wounds
|
||||
var/stop_bleeding
|
||||
/// How much sanitization to apply to burns on application
|
||||
var/sanitization
|
||||
/// How much we add to flesh_healing for burn wounds on application
|
||||
var/flesh_regeneration
|
||||
|
||||
/obj/item/stack/medical/attack(mob/living/M, mob/user)
|
||||
. = ..()
|
||||
try_heal(M, user)
|
||||
|
||||
INVOKE_ASYNC(src, .proc/try_heal, M, user)
|
||||
|
||||
/obj/item/stack/medical/proc/try_heal(mob/living/M, mob/user, silent = FALSE)
|
||||
if(!M.can_inject(user, TRUE))
|
||||
@@ -70,8 +79,9 @@
|
||||
icon_state = "brutepack"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
var/heal_brute = 20
|
||||
self_delay = 20
|
||||
heal_brute = 40
|
||||
self_delay = 40
|
||||
other_delay = 20
|
||||
grind_results = list(/datum/reagent/medicine/styptic_powder = 10)
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/one
|
||||
@@ -95,7 +105,8 @@
|
||||
M.heal_bodypart_damage((heal_brute/2))
|
||||
return TRUE
|
||||
if(iscarbon(M))
|
||||
return heal_carbon(M, user, heal_brute, 0)
|
||||
return heal_carbon(M, user, heal_brute, heal_burn)
|
||||
to_chat(user, "<span class='warning'>You can't heal [M] with \the [src]!</span>")
|
||||
to_chat(user, "<span class='notice'>You can't heal [M] with the \the [src]!</span>")
|
||||
|
||||
/obj/item/stack/medical/bruise_pack/suicide_act(mob/user)
|
||||
@@ -104,24 +115,52 @@
|
||||
|
||||
/obj/item/stack/medical/gauze
|
||||
name = "medical gauze"
|
||||
desc = "A roll of elastic cloth that is extremely effective at stopping bleeding, heals minor wounds."
|
||||
desc = "A roll of elastic cloth, perfect for stabilizing all kinds of wounds, from cuts and burns to broken bones."
|
||||
gender = PLURAL
|
||||
singular_name = "medical gauze"
|
||||
icon_state = "gauze"
|
||||
var/stop_bleeding = 1800
|
||||
var/heal_brute = 5
|
||||
self_delay = 10
|
||||
heal_brute = 5
|
||||
self_delay = 50
|
||||
other_delay = 20
|
||||
amount = 10
|
||||
max_amount = 10
|
||||
absorption_rate = 0.25
|
||||
absorption_capacity = 5
|
||||
splint_factor = 0.35
|
||||
custom_price = PRICE_REALLY_CHEAP
|
||||
grind_results = list(/datum/reagent/cellulose = 2)
|
||||
|
||||
/obj/item/stack/medical/gauze/heal(mob/living/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!H.bleedsuppress && H.bleed_rate) //so you can't stack bleed suppression
|
||||
H.suppress_bloodloss(stop_bleeding)
|
||||
to_chat(user, "<span class='notice'>You stop the bleeding of [M]!</span>")
|
||||
H.adjustBruteLoss(-(heal_brute))
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You can not use \the [src] on [M]!</span>")
|
||||
// gauze is only relevant for wounds, which are handled in the wounds themselves
|
||||
/obj/item/stack/medical/gauze/try_heal(mob/living/M, mob/user, silent)
|
||||
var/obj/item/bodypart/limb = M.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!limb)
|
||||
to_chat(user, "<span class='notice'>There's nothing there to bandage!</span>")
|
||||
return
|
||||
if(!LAZYLEN(limb.wounds))
|
||||
to_chat(user, "<span class='notice'>There's no wounds that require bandaging on [user==M ? "your" : "[M]'s"] [limb.name]!</span>") // good problem to have imo
|
||||
return
|
||||
|
||||
var/gauzeable_wound = FALSE
|
||||
for(var/i in limb.wounds)
|
||||
var/datum/wound/woundies = i
|
||||
if(woundies.wound_flags & ACCEPTS_GAUZE)
|
||||
gauzeable_wound = TRUE
|
||||
break
|
||||
if(!gauzeable_wound)
|
||||
to_chat(user, "<span class='notice'>There's no wounds that require bandaging on [user==M ? "your" : "[M]'s"] [limb.name]!</span>") // good problem to have imo
|
||||
return
|
||||
|
||||
if(limb.current_gauze && (limb.current_gauze.absorption_capacity * 0.8 > absorption_capacity)) // ignore if our new wrap is < 20% better than the current one, so someone doesn't bandage it 5 times in a row
|
||||
to_chat(user, "<span class='warning'>The bandage currently on [user==M ? "your" : "[M]'s"] [limb.name] is still in good condition!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='warning'>[user] begins wrapping the wounds on [M]'s [limb.name] with [src]...</span>", "<span class='warning'>You begin wrapping the wounds on [user == M ? "your" : "[M]'s"] [limb.name] with [src]...</span>")
|
||||
|
||||
if(!do_after(user, (user == M ? self_delay : other_delay), target=M))
|
||||
return
|
||||
|
||||
user.visible_message("<span class='green'>[user] applies [src] to [M]'s [limb.name].</span>", "<span class='green'>You bandage the wounds on [user == M ? "yourself" : "[M]'s"] [limb.name].</span>")
|
||||
limb.apply_gauze(src)
|
||||
|
||||
/obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params)
|
||||
if(I.tool_behaviour == TOOL_WIRECUTTER || I.get_sharpness())
|
||||
@@ -133,6 +172,14 @@
|
||||
"<span class='notice'>You cut [src] into pieces of cloth with [I].</span>", \
|
||||
"<span class='italics'>You hear cutting.</span>")
|
||||
use(2)
|
||||
else if(I.is_drainable() && I.reagents.has_reagent(/datum/reagent/space_cleaner/sterilizine))
|
||||
if(!I.reagents.has_reagent(/datum/reagent/space_cleaner/sterilizine, 10))
|
||||
to_chat(user, "<span class='warning'>There's not enough sterilizine in [I] to sterilize [src]!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] pours the contents of [I] onto [src], sterilizing it.</span>", "<span class='notice'>You pour the contents of [I] onto [src], sterilizing it.</span>")
|
||||
I.reagents.remove_reagent(/datum/reagent/space_cleaner/sterilizine, 10)
|
||||
new /obj/item/stack/medical/gauze/adv/one(user.drop_location())
|
||||
use(1)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -143,15 +190,22 @@
|
||||
/obj/item/stack/medical/gauze/improvised
|
||||
name = "improvised gauze"
|
||||
singular_name = "improvised gauze"
|
||||
desc = "A roll of cloth roughly cut from something that can stop bleeding, but does not heal wounds."
|
||||
stop_bleeding = 900
|
||||
heal_brute = 0
|
||||
desc = "A roll of cloth roughly cut from something that does a decent job of stabilizing wounds, but less efficiently than real medical gauze."
|
||||
self_delay = 60
|
||||
other_delay = 30
|
||||
absorption_rate = 0.15
|
||||
absorption_capacity = 4
|
||||
|
||||
/obj/item/stack/medical/gauze/adv
|
||||
name = "sterilized medical gauze"
|
||||
desc = "A roll of elastic sterilized cloth that is extremely effective at stopping bleeding, heals minor wounds and cleans them."
|
||||
singular_name = "sterilized medical gauze"
|
||||
self_delay = 5
|
||||
desc = "A roll of elastic sterilized cloth that is extremely effective at stopping bleeding and covering burns."
|
||||
heal_brute = 6
|
||||
self_delay = 45
|
||||
other_delay = 15
|
||||
absorption_rate = 0.4
|
||||
absorption_capacity = 6
|
||||
|
||||
/obj/item/stack/medical/gauze/adv/one
|
||||
amount = 1
|
||||
@@ -161,38 +215,9 @@
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
name = "ointment"
|
||||
desc = "Used to treat those nasty burn wounds."
|
||||
gender = PLURAL
|
||||
singular_name = "ointment"
|
||||
icon_state = "ointment"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
var/heal_burn = 20
|
||||
self_delay = 20
|
||||
grind_results = list(/datum/reagent/medicine/silver_sulfadiazine = 10)
|
||||
|
||||
/obj/item/stack/medical/ointment/one
|
||||
amount = 1
|
||||
|
||||
/obj/item/stack/medical/ointment/heal(mob/living/M, mob/user)
|
||||
if(M.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'> [M] is dead. You can not help [M.p_them()]!</span>")
|
||||
return
|
||||
if(iscarbon(M))
|
||||
return heal_carbon(M, user, 0, heal_burn)
|
||||
if(AmBloodsucker(M))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You can't heal [M] with the \the [src]!</span>")
|
||||
|
||||
/obj/item/stack/medical/ointment/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] is squeezing \the [src] into [user.p_their()] mouth! [user.p_do(TRUE)]n't [user.p_they()] know that stuff is toxic?</span>")
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/stack/medical/suture
|
||||
name = "suture"
|
||||
desc = "Sterile sutures used to seal up cuts and lacerations."
|
||||
desc = "Basic sterile sutures used to seal up cuts and lacerations and stop bleeding."
|
||||
gender = PLURAL
|
||||
singular_name = "suture"
|
||||
icon_state = "suture"
|
||||
@@ -201,9 +226,30 @@
|
||||
amount = 15
|
||||
max_amount = 15
|
||||
repeating = TRUE
|
||||
var/heal_brute = 10
|
||||
heal_brute = 10
|
||||
stop_bleeding = 0.6
|
||||
grind_results = list(/datum/reagent/medicine/spaceacillin = 2)
|
||||
|
||||
/obj/item/stack/medical/suture/emergency
|
||||
name = "emergency suture"
|
||||
desc = "A value pack of cheap sutures, not very good at repairing damage, but still decent at stopping bleeding."
|
||||
heal_brute = 5
|
||||
amount = 5
|
||||
max_amount = 5
|
||||
|
||||
/obj/item/stack/medical/suture/one
|
||||
amount = 1
|
||||
|
||||
/obj/item/stack/medical/suture/five
|
||||
amount = 5
|
||||
|
||||
/obj/item/stack/medical/suture/medicated
|
||||
name = "medicated suture"
|
||||
icon_state = "suture_purp"
|
||||
desc = "A suture infused with drugs that speed up wound healing of the treated laceration."
|
||||
heal_brute = 15
|
||||
grind_results = list(/datum/reagent/medicine/polypyr = 2)
|
||||
|
||||
/obj/item/stack/medical/suture/one
|
||||
amount = 1
|
||||
|
||||
@@ -223,10 +269,39 @@
|
||||
to_chat(user, "<span class='notice'>[M] is at full health.</span>")
|
||||
return FALSE
|
||||
user.visible_message("<span class='green'>[user] applies \the [src] on [M].</span>", "<span class='green'>You apply \the [src] on [M].</span>")
|
||||
M.heal_bodypart_damage(heal_brute)
|
||||
return TRUE
|
||||
return heal_carbon(M, user, heal_brute, heal_burn)
|
||||
|
||||
to_chat(user, "<span class='warning'>You can't heal [M] with the \the [src]!</span>")
|
||||
to_chat(user, "<span class='warning'>You can't heal [M] with \the [src]!</span>")
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
name = "ointment"
|
||||
desc = "Basic burn ointment, rated effective for second degree burns with proper bandaging, though it's still an effective stabilizer for worse burns. Not terribly good at outright healing burns though."
|
||||
gender = PLURAL
|
||||
singular_name = "ointment"
|
||||
icon_state = "ointment"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
amount = 12
|
||||
max_amount = 12
|
||||
self_delay = 40
|
||||
other_delay = 20
|
||||
|
||||
heal_burn = 5
|
||||
flesh_regeneration = 2.5
|
||||
sanitization = 0.3
|
||||
grind_results = list(/datum/reagent/medicine/kelotane = 10)
|
||||
|
||||
/obj/item/stack/medical/ointment/heal(mob/living/M, mob/user)
|
||||
if(M.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>[M] is dead! You can not help [M.p_them()].</span>")
|
||||
return
|
||||
if(iscarbon(M))
|
||||
return heal_carbon(M, user, heal_brute, heal_burn)
|
||||
to_chat(user, "<span class='warning'>You can't heal [M] with \the [src]!</span>")
|
||||
|
||||
/obj/item/stack/medical/ointment/suicide_act(mob/living/user)
|
||||
user.visible_message("<span class='suicide'>[user] is squeezing \the [src] into [user.p_their()] mouth! [user.p_do(TRUE)]n't [user.p_they()] know that stuff is toxic?</span>")
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/stack/medical/mesh
|
||||
name = "regenerative mesh"
|
||||
@@ -238,20 +313,43 @@
|
||||
other_delay = 10
|
||||
amount = 15
|
||||
max_amount = 15
|
||||
heal_burn = 10
|
||||
repeating = TRUE
|
||||
var/heal_burn = 10
|
||||
sanitization = 0.75
|
||||
flesh_regeneration = 3
|
||||
var/is_open = TRUE ///This var determines if the sterile packaging of the mesh has been opened.
|
||||
grind_results = list(/datum/reagent/medicine/spaceacillin = 2)
|
||||
|
||||
/obj/item/stack/medical/mesh/one
|
||||
amount = 1
|
||||
|
||||
/obj/item/stack/medical/mesh/five
|
||||
amount = 5
|
||||
|
||||
/obj/item/stack/medical/mesh/advanced
|
||||
name = "advanced regenerative mesh"
|
||||
desc = "An advanced mesh made with aloe extracts and sterilizing chemicals, used to treat burns."
|
||||
gender = PLURAL
|
||||
singular_name = "advanced regenerative mesh"
|
||||
icon_state = "aloe_mesh"
|
||||
heal_burn = 15
|
||||
grind_results = list(/datum/reagent/consumable/aloejuice = 1)
|
||||
|
||||
/obj/item/stack/medical/mesh/advanced/one
|
||||
amount = 1
|
||||
|
||||
/obj/item/stack/medical/mesh/Initialize()
|
||||
. = ..()
|
||||
if(amount == max_amount) //only seal full mesh packs
|
||||
is_open = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/stack/medical/mesh/advanced/update_icon_state()
|
||||
if(!is_open)
|
||||
icon_state = "aloe_mesh_closed"
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/medical/mesh/update_icon_state()
|
||||
if(!is_open)
|
||||
icon_state = "regen_mesh_closed"
|
||||
@@ -264,8 +362,8 @@
|
||||
to_chat(user, "<span class='warning'>[M] is dead! You can not help [M.p_them()].</span>")
|
||||
return
|
||||
if(iscarbon(M))
|
||||
return heal_carbon(M, user, 0, heal_burn)
|
||||
to_chat(user, "<span class='warning'>You can't heal [M] with the \the [src]!</span>")
|
||||
return heal_carbon(M, user, heal_brute, heal_burn)
|
||||
to_chat(user, "<span class='warning'>You can't heal [M] with \the [src]!</span>")
|
||||
|
||||
|
||||
/obj/item/stack/medical/mesh/try_heal(mob/living/M, mob/user, silent = FALSE)
|
||||
@@ -280,7 +378,7 @@
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/medical/mesh/attack_hand(mob/user)
|
||||
/obj/item/stack/medical/mesh/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
|
||||
if(!is_open & user.get_inactive_held_item() == src)
|
||||
to_chat(user, "<span class='warning'>You need to open [src] first.</span>")
|
||||
return
|
||||
@@ -294,3 +392,83 @@
|
||||
playsound(src, 'sound/items/poster_ripped.ogg', 20, TRUE)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/medical/bone_gel
|
||||
name = "bone gel"
|
||||
singular_name = "bone gel"
|
||||
desc = "A potent medical gel that, when applied to a damaged bone in a proper surgical setting, triggers an intense melding reaction to repair the wound. Can be directly applied alongside surgical sticky tape to a broken bone in dire circumstances, though this is very harmful to the patient and not recommended."
|
||||
|
||||
icon = 'icons/obj/surgery.dmi'
|
||||
icon_state = "bone-gel"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
|
||||
|
||||
amount = 4
|
||||
self_delay = 20
|
||||
grind_results = list(/datum/reagent/medicine/bicaridine = 10)
|
||||
novariants = TRUE
|
||||
|
||||
/obj/item/stack/medical/bone_gel/attack(mob/living/M, mob/user)
|
||||
to_chat(user, "<span class='warning'>Bone gel can only be used on fractured limbs while aggressively holding someone!</span>")
|
||||
return
|
||||
|
||||
/obj/item/stack/medical/bone_gel/suicide_act(mob/user)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.visible_message("<span class='suicide'>[C] is squirting all of \the [src] into [C.p_their()] mouth! That's not proper procedure! It looks like [C.p_theyre()] trying to commit suicide!</span>")
|
||||
if(do_after(C, 2 SECONDS))
|
||||
C.emote("scream")
|
||||
for(var/i in C.bodyparts)
|
||||
var/obj/item/bodypart/bone = i
|
||||
var/datum/wound/blunt/severe/oof_ouch = new
|
||||
oof_ouch.apply_wound(bone)
|
||||
var/datum/wound/blunt/critical/oof_OUCH = new
|
||||
oof_OUCH.apply_wound(bone)
|
||||
|
||||
for(var/i in C.bodyparts)
|
||||
var/obj/item/bodypart/bone = i
|
||||
bone.receive_damage(brute=60)
|
||||
use(1)
|
||||
return (BRUTELOSS)
|
||||
else
|
||||
C.visible_message("<span class='suicide'>[C] screws up like an idiot and still dies anyway!</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/stack/medical/bone_gel/cyborg
|
||||
custom_materials = null
|
||||
is_cyborg = 1
|
||||
cost = 250
|
||||
|
||||
/obj/item/stack/medical/aloe
|
||||
name = "aloe cream"
|
||||
desc = "A healing paste you can apply on wounds."
|
||||
|
||||
icon_state = "aloe_paste"
|
||||
self_delay = 20
|
||||
other_delay = 10
|
||||
novariants = TRUE
|
||||
amount = 20
|
||||
max_amount = 20
|
||||
var/heal = 3
|
||||
grind_results = list(/datum/reagent/consumable/aloejuice = 1)
|
||||
|
||||
/obj/item/stack/medical/aloe/heal(mob/living/M, mob/user)
|
||||
. = ..()
|
||||
if(M.stat == DEAD)
|
||||
to_chat(user, "<span class='warning'>[M] is dead! You can not help [M.p_them()].</span>")
|
||||
return FALSE
|
||||
if(iscarbon(M))
|
||||
return heal_carbon(M, user, heal, heal)
|
||||
if(isanimal(M))
|
||||
var/mob/living/simple_animal/critter = M
|
||||
if (!(critter.healable))
|
||||
to_chat(user, "<span class='warning'>You cannot use \the [src] on [M]!</span>")
|
||||
return FALSE
|
||||
else if (critter.health == critter.maxHealth)
|
||||
to_chat(user, "<span class='notice'>[M] is at full health.</span>")
|
||||
return FALSE
|
||||
user.visible_message("<span class='green'>[user] applies \the [src] on [M].</span>", "<span class='green'>You apply \the [src] on [M].</span>")
|
||||
M.heal_bodypart_damage(heal, heal)
|
||||
return TRUE
|
||||
|
||||
to_chat(user, "<span class='warning'>You can't heal [M] with the \the [src]!</span>")
|
||||
|
||||
@@ -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'
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user