Merge branch 'master' into splint_nerf

This commit is contained in:
Vivalas
2017-08-13 23:13:24 -05:00
committed by GitHub
764 changed files with 12339 additions and 18948 deletions
+1 -48
View File
@@ -89,51 +89,4 @@
// Make it possible to escape from bodybags in morgues and crematoriums
if(loc && (isturf(loc) || istype(loc, /obj/structure/morgue) || istype(loc, /obj/structure/crematorium)))
if(!open())
to_chat(user, "<span class='notice'>It won't budge!</span>")
/obj/item/bodybag/cryobag
name = "stasis bag"
desc = "A folded, non-reusable bag designed for the preservation of an occupant's brain by stasis."
icon = 'icons/obj/cryobag.dmi'
icon_state = "bodybag_folded"
attack_self(mob/user)
var/obj/structure/closet/body_bag/cryobag/R = new /obj/structure/closet/body_bag/cryobag(user.loc)
R.add_fingerprint(user)
qdel(src)
/obj/structure/closet/body_bag/cryobag
name = "stasis bag"
desc = "A non-reusable plastic bag designed for the preservation of an occupant's brain by stasis."
icon = 'icons/obj/cryobag.dmi'
item_path = /obj/item/bodybag/cryobag
var/used = 0
var/locked = 0
req_access = list(access_medical)
open()
. = ..()
if(used)
var/obj/item/O = new/obj/item(src.loc)
O.name = "used stasis bag"
O.icon = src.icon
O.icon_state = "bodybag_used"
O.desc = "Pretty useless now.."
qdel(src)
MouseDrop(over_object, src_location, over_location)
if((over_object == usr && (in_range(src, usr) || usr.contents.Find(src))))
if(!ishuman(usr)) return
to_chat(usr, "<span class='warning'>You can't fold that up anymore..</span>")
..()
attackby(W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda))
if(src.allowed(user))
src.locked = !src.locked
to_chat(user, "The controls are now [src.locked ? "locked." : "unlocked."]")
else
to_chat(user, "<span class='warning'>Access denied.</span>")
return
to_chat(user, "<span class='notice'>It won't budge!</span>")
+27 -5
View File
@@ -73,7 +73,7 @@
temp = pick(graffiti)
else
temp = href_list["type"]
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if((usr.restrained() || usr.stat || !usr.is_in_active_hand(src)))
return
drawtype = temp
update_window(usr)
@@ -147,6 +147,29 @@
colour = "#DA00FF"
colourName = "purple"
/obj/item/toy/crayon/random/New()
icon_state = pick(list("crayonred", "crayonorange", "crayonyellow", "crayongreen", "crayonblue", "crayonpurple"))
switch(icon_state)
if("crayonred")
colour = "#DA0000"
colourName = "red"
if("crayonorange")
colour = "#FF9300"
colourName = "orange"
if("crayonyellow")
colour = "#FFF200"
colourName = "yellow"
if("crayongreen")
colour = "#A8E61D"
colourName = "green"
if("crayonblue")
colour = "#00B7EF"
colourName = "blue"
if("crayonpurple")
colour = "#DA00FF"
colourName = "purple"
..()
/obj/item/toy/crayon/white
icon_state = "crayonwhite"
colour = "#FFFFFF"
@@ -167,7 +190,7 @@
..()
/obj/item/toy/crayon/mime/Topic(href,href_list)
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if(!Adjacent(usr) || usr.incapacitated())
return
if(href_list["color"])
if(colour != "#FFFFFF")
@@ -192,11 +215,10 @@
..()
/obj/item/toy/crayon/rainbow/Topic(href,href_list[])
if(!Adjacent(usr) || usr.incapacitated())
return
if(href_list["color"])
var/temp = input(usr, "Please select colour.", "Crayon colour") as color
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
return
colour = temp
update_window(usr)
else
@@ -43,8 +43,7 @@
if(active_dummy)
eject_all()
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
qdel(active_dummy)
active_dummy = null
QDEL_NULL(active_dummy)
to_chat(usr, "<span class='notice'>You deactivate \the [src].</span>")
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
+38
View File
@@ -39,6 +39,11 @@
overcharged = 1
overlays += "overcharge"
/obj/item/device/flash/random/New()
..()
if(prob(25))
broken = 1
icon_state = "[initial(icon_state)]burnt"
/obj/item/device/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something.
broken = 1
@@ -196,4 +201,37 @@
icon_state = "memorizer"
item_state = "nullrod"
/obj/item/device/flash/armimplant
name = "photon projector"
desc = "A high-powered photon projector implant normally used for lighting purposes, but also doubles as a flashbulb weapon. Self-repair protocals fix the flashbulb if it ever burns out."
var/flashcd = 20
var/overheat = 0
var/obj/item/organ/internal/cyberimp/arm/flash/I = null
/obj/item/device/flash/armimplant/Destroy()
I = null
return ..()
/obj/item/device/flash/armimplant/burn_out()
if(I && I.owner)
to_chat(I.owner, "<span class='warning'>Your photon projector implant overheats and deactivates!</span>")
I.Retract()
overheat = FALSE
addtimer(src, "cooldown", flashcd * 2)
/obj/item/device/flash/armimplant/try_use_flash(mob/user = null)
if(overheat)
if(I && I.owner)
to_chat(I.owner, "<span class='warning'>Your photon projector is running too hot to be used again so quickly!</span>")
return FALSE
overheat = TRUE
addtimer(src, "cooldown", flashcd)
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
update_icon(1)
return TRUE
/obj/item/device/flash/armimplant/proc/cooldown()
overheat = FALSE
/obj/item/device/flash/synthetic //just a regular flash now
-45
View File
@@ -1,45 +0,0 @@
//copy pasta of the space piano, don't hurt me -Pete
/obj/item/device/guitar
name = "guitar"
desc = "It's made of wood and has bronze strings."
icon = 'icons/obj/musician.dmi'
icon_state = "guitar"
item_state = "guitar"
force = 10
burn_state = FLAMMABLE
burntime = 20
var/datum/song/handheld/song
hitsound = 'sound/effects/guitarsmash.ogg'
/obj/item/device/guitar/New()
song = new("guitar", src)
song.instrumentExt = "ogg"
/obj/item/device/guitar/Destroy()
QDEL_NULL(song)
return ..()
/obj/item/device/guitar/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/guitar/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!isliving(user) || user.incapacitated())
return
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/guitar/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
return song.ui_data(user, ui_key, state)
/obj/item/device/guitar/Topic(href, href_list)
song.Topic(href, href_list)
/datum/crafting_recipe/guitar
name = "Guitar"
result = /obj/item/device/guitar
reqs = list(/obj/item/stack/sheet/wood = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
time = 80
@@ -0,0 +1,103 @@
//copy pasta of the space piano, don't hurt me -Pete
/obj/item/device/instrument
name = "generic instrument"
icon = 'icons/obj/musician.dmi'
burn_state = FLAMMABLE
var/datum/song/handheld/song
var/instrumentId = "generic"
var/instrumentExt = "ogg"
/obj/item/device/instrument/New()
song = new(instrumentId, src)
song.instrumentExt = instrumentExt
..()
/obj/item/device/instrument/Destroy()
QDEL_NULL(song)
return ..()
/obj/item/device/instrument/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] begins to play 'Gloomy Sunday'! It looks like \he's trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/device/instrument/initialize(mapload)
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
/obj/item/device/instrument/attack_self(mob/user)
ui_interact(user)
/obj/item/device/instrument/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
if(!isliving(user) || user.incapacitated())
return
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/instrument/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
return song.ui_data(user, ui_key, state)
/obj/item/device/instrument/Topic(href, href_list)
song.Topic(href, href_list)
/obj/item/device/instrument/violin
name = "space violin"
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon_state = "violin"
item_state = "violin"
force = 10
hitsound = "swing_hit"
instrumentId = "violin"
/obj/item/device/instrument/violin/golden
name = "golden violin"
desc = "A golden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon_state = "golden_violin"
item_state = "golden_violin"
burn_state = LAVA_PROOF
/obj/item/device/instrument/guitar
name = "guitar"
desc = "It's made of wood and has bronze strings."
icon_state = "guitar"
item_state = "guitar"
force = 10
attack_verb = list("played metal on", "serenaded", "crashed", "smashed")
hitsound = 'sound/effects/guitarsmash.ogg'
instrumentId = "guitar"
/obj/item/device/instrument/eguitar
name = "electric guitar"
desc = "Makes all your shredding needs possible."
icon_state = "eguitar"
item_state = "eguitar"
force = 12
attack_verb = list("played metal on", "shredded", "crashed", "smashed")
hitsound = 'sound/weapons/stringsmash.ogg'
instrumentId = "eguitar"
/datum/crafting_recipe/violin
name = "Violin"
result = /obj/item/device/instrument/violin
reqs = list(/obj/item/stack/sheet/wood = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
time = 80
/datum/crafting_recipe/guitar
name = "Guitar"
result = /obj/item/device/instrument/guitar
reqs = list(/obj/item/stack/sheet/wood = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
time = 80
/datum/crafting_recipe/eguitar
name = "Electric Guitar"
result = /obj/item/device/instrument/eguitar
reqs = list(/obj/item/stack/sheet/metal = 5,
/obj/item/stack/cable_coil = 6,
/obj/item/stack/tape_roll = 5)
tools = list(/obj/item/weapon/screwdriver, /obj/item/weapon/wirecutters)
time = 80
@@ -81,7 +81,7 @@
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if((HULK in H.mutations) || (H.species.flags & NOGUNS))
if((HULK in H.mutations) || (NOGUNS in H.species.species_traits))
user << "<span class='warning'>Your fingers can't press the button!</span>"
return
@@ -37,6 +37,7 @@ var/global/list/default_medbay_channels = list(
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/disable_timer = 0 //How many times this is disabled by EMPs
var/is_special = 0 //For electropacks mostly, skips Topic() checks
@@ -246,6 +247,13 @@ var/global/list/default_medbay_channels = list(
A.name = from
A.role = role
A.message = message
var/jammed = FALSE
for(var/obj/item/device/jammer/jammer in active_jammers)
if(get_dist(get_turf(src), get_turf(jammer)) < jammer.range)
jammed = TRUE
break
if(jammed)
message = Gibberish(message, 100)
Broadcast_Message(connection, A,
0, "*garbled automated announcement*", src,
message, from, "Automated Announcement", from, "synthesized voice",
@@ -331,6 +339,12 @@ var/global/list/default_medbay_channels = list(
var/datum/radio_frequency/connection = message_mode
var/turf/position = get_turf(src)
var/jammed = FALSE
for(var/obj/item/device/jammer/jammer in active_jammers)
if(get_dist(position, get_turf(jammer)) < jammer.range)
jammed = TRUE
break
//#### Tagging the signal with all appropriate identity values ####//
// ||-- The mob's name identity --||
@@ -344,6 +358,9 @@ var/global/list/default_medbay_channels = list(
var/jobname // the mob's "job"
if(jammed)
message = Gibberish(message, 100)
// --- Human: use their actual job ---
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -599,12 +616,25 @@ var/global/list/default_medbay_channels = list(
else return
/obj/item/device/radio/emp_act(severity)
on = 0
disable_timer++
addtimer(src, "enable_radio", rand(100, 200))
if(listening)
visible_message("<span class='warning'>[src] buzzes violently!</span>")
broadcasting = 0
listening = 0
for(var/ch_name in channels)
channels[ch_name] = 0
..()
/obj/item/device/radio/proc/enable_radio()
if(disable_timer > 0)
disable_timer--
if(!disable_timer)
on = 1
///////////////////////////////
//////////Borg Radios//////////
///////////////////////////////
+26 -25
View File
@@ -14,6 +14,7 @@ REAGENT SCANNER
icon_state = "t-ray0"
var/on = 0
slot_flags = SLOT_BELT
w_class = 2
w_class = WEIGHT_CLASS_SMALL
item_state = "electronic"
materials = list(MAT_METAL=150)
@@ -96,7 +97,7 @@ REAGENT SCANNER
if(H.reagents.reagent_list.len)
user.show_message("<span class='notice'>Subject contains the following reagents:</span>")
for(var/datum/reagent/R in H.reagents.reagent_list)
user.show_message("<span class='notice'>[R.volume]u of [R.name][R.overdosed == 1 ? "</span> - <span class = 'boldannounce'>OVERDOSING</span>" : ".</span>"]")
user.show_message("<span class='notice'>[R.volume]u of [R.name][R.overdosed ? "</span> - <span class = 'boldannounce'>OVERDOSING</span>" : ".</span>"]")
else
user.show_message("<span class = 'notice'>Subject contains no reagents.</span>")
if(H.reagents.addiction_list.len)
@@ -164,15 +165,9 @@ REAGENT SCANNER
var/mob/living/carbon/human/H = M
var/list/damaged = H.get_damaged_organs(1,1)
user.show_message("<span class='notice'>Localized Damage, Brute/Burn:</span>",1)
if(length(damaged)>0)
if(length(damaged) > 0)
for(var/obj/item/organ/external/org in damaged)
user.show_message(text("<span class='notice'>\t []: [][] - []</span>", \
capitalize(org.name), \
(org.brute_dam > 0) ? "<span class='warning'>[org.brute_dam]</span>" :0, \
(org.status & ORGAN_BLEEDING)?"<span class='danger'>\[Bleeding\]</span>":"\t", \
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
else
user.show_message("<span class='notice'>\t Limbs are OK.</span>",1)
user.show_message("\t\t<span class='info'>[capitalize(org.name)]: [(org.brute_dam > 0) ? "<font color='red'>[org.brute_dam]</font></span>" : "<font color='red'>0</font>"]-[(org.burn_dam > 0) ? "<font color='#FF8000'>[org.burn_dam]</font>" : "<font color='#FF8000'>0</font>"]")
OX = M.getOxyLoss() > 50 ? "<font color='blue'><b>Severe oxygen deprivation detected</b></font>" : "Subject bloodstream oxygen level normal"
TX = M.getToxLoss() > 50 ? "<font color='green'><b>Dangerous amount of toxins detected</b></font>" : "Subject bloodstream toxin level minimal"
@@ -184,9 +179,10 @@ REAGENT SCANNER
if(istype(M, /mob/living/carbon))
if(upgraded)
chemscan(user, M)
for(var/datum/disease/D in M.viruses)
for(var/thing in M.viruses)
var/datum/disease/D = thing
if(!(D.visibility_flags & HIDDEN_SCANNER))
to_chat(user, "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
user.show_message("<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
if(M.getStaminaLoss())
user.show_message("<span class='info'>Subject appears to be suffering from fatigue.</span>")
if(M.getCloneLoss())
@@ -220,23 +216,28 @@ REAGENT SCANNER
user.show_message(text("<span class='warning'>Bone fractures detected. Advanced scanner required for location.</span>"), 1)
break
for(var/obj/item/organ/external/e in H.bodyparts)
for(var/datum/wound/W in e.wounds) if(W.internal)
if(e.internal_bleeding)
user.show_message(text("<span class='warning'>Internal bleeding detected. Advanced scanner required for location.</span>"), 1)
break
if(H.vessel)
var/blood_type = H.get_blood_name()
var/blood_volume = round(H.vessel.get_reagent_amount(blood_type))
var/blood_percent = blood_volume / BLOOD_VOLUME_NORMAL
blood_percent *= 100
if(blood_volume <= 500)
user.show_message("<span class='warning'><b>Warning: Blood Level LOW: [blood_percent]% [blood_volume]cl</span>")
else if(blood_volume <= 336)
user.show_message("<span class='warning'><b>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl</span>")
var/blood_id = H.get_blood_id()
if(blood_id)
if(H.bleed_rate)
user.show_message("<span class='danger'>Subject is bleeding!</span>")
var/blood_percent = round((H.blood_volume / BLOOD_VOLUME_NORMAL)*100)
var/blood_type = H.b_type
if(blood_id != "blood")//special blood substance
var/datum/reagent/R = chemical_reagents_list[blood_id]
if(R)
blood_type = R.name
else
blood_type = blood_id
if(H.blood_volume <= BLOOD_VOLUME_SAFE && H.blood_volume > BLOOD_VOLUME_OKAY)
user.show_message("<span class='danger'>LOW blood level [blood_percent] %, [H.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
else if(H.blood_volume <= BLOOD_VOLUME_OKAY)
user.show_message("<span class='danger'>CRITICAL blood level [blood_percent] %, [H.blood_volume] cl,</span> <span class='info'>type: [blood_type]</span>")
else
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl</span>")
if(H.species.exotic_blood)
user.show_message("<span class='warning'>Subject possesses exotic blood.</span>")
user.show_message("<span class='warning'>Exotic blood type: [blood_type].</span>")
user.show_message("<span class='info'>Blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]</span>")
if(H.undergoing_cardiac_arrest() && H.stat != DEAD)
user.show_message("<span class='userdanger'>Subject suffering from heart attack: Apply defibrillator immediately.</span>")
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
@@ -146,3 +146,22 @@ effective or pretty fucking useless.
attack_self(usr)
add_fingerprint(usr)
return
/obj/item/device/jammer
name = "radio jammer"
desc = "Device used to disrupt nearby radio communication."
icon_state = "jammer"
var/active = FALSE
var/range = 12
/obj/item/device/jammer/Destroy()
active_jammers -= src
return ..()
/obj/item/device/jammer/attack_self(mob/user)
to_chat(user,"<span class='notice'>You [active ? "deactivate" : "activate"] the [src].</span>")
active = !active
if(active)
active_jammers |= src
else
active_jammers -= src
-41
View File
@@ -1,41 +0,0 @@
//copy pasta of the space piano, don't hurt me -Pete
/obj/item/device/violin
name = "space violin"
desc = "A wooden musical instrument with four strings and a bow. \"The devil went down to space, he was looking for an assistant to grief.\""
icon = 'icons/obj/musician.dmi'
icon_state = "violin"
item_state = "violin"
attack_verb = list("strung", "fiddled", "tuned", "pitched")
force = 10
burn_state = FLAMMABLE
burntime = 20
hitsound = 'sound/weapons/smash.ogg'
var/datum/song/handheld/song
/obj/item/device/violin/New()
song = new("violin", src)
song.instrumentExt = "ogg"
/obj/item/device/violin/Destroy()
QDEL_NULL(song)
return ..()
/obj/item/device/violin/initialize()
song.tempo = song.sanitize_tempo(song.tempo) // tick_lag isn't set when the map is loaded
..()
/obj/item/device/violin/attack_self(mob/user as mob)
ui_interact(user)
/obj/item/device/violin/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
if(!isliving(user) || user.incapacitated())
return
song.ui_interact(user, ui_key, ui, force_open)
/obj/item/device/violin/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
return song.ui_data(user, ui_key, state)
/obj/item/device/violin/Topic(href, href_list)
song.Topic(href, href_list)
+1 -1
View File
@@ -59,5 +59,5 @@
var/obj/item/weapon/tank/T = W
blow(T, user)
return
if(is_sharp(W) || is_hot(W) || can_puncture(W))
if(is_sharp(W) || is_hot(W) || is_pointed(W))
burst()
+1 -1
View File
@@ -174,7 +174,7 @@ var/list/tape_roll_applications = list()
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == INTENT_HELP && ((!can_puncture(W) && src.allowed(user))))
if(user.a_intent == INTENT_HELP && ((!is_pointed(W) && src.allowed(user))))
to_chat(user, "You can't break the [src] with that!")
return
user.visible_message("<span class=warning>[user] breaks the [src]!</span>", "<span class=warning>You break the [src]!</span>")
+14 -5
View File
@@ -7,7 +7,7 @@
slot_flags = SLOT_BELT
var/list/part = null
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
var/model_info
var/model_info = "Unbranded"
dir = SOUTH
/obj/item/robot_parts/New(newloc, model)
@@ -23,33 +23,38 @@
else
name = "robot [initial(name)]"
/obj/item/robot_parts/attack_self(mob/user)
var/choice = input(user, "Select the company appearance for this limb.", "Limb Company Selection") as null|anything in selectable_robolimbs
if(!choice)
return
if(loc != user)
return
model_info = choice
to_chat(usr, "<span class='notice'>You change the company limb model to [choice].</span>")
/obj/item/robot_parts/l_arm
name = "left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
part = list("l_arm","l_hand")
model_info = 1
/obj/item/robot_parts/r_arm
name = "right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
part = list("r_arm","r_hand")
model_info = 1
/obj/item/robot_parts/l_leg
name = "left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
part = list("l_leg","l_foot")
model_info = 1
/obj/item/robot_parts/r_leg
name = "right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
part = list("r_leg","r_foot")
model_info = 1
/obj/item/robot_parts/chest
name = "torso"
@@ -80,6 +85,7 @@
name = "endoskeleton"
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
icon_state = "robo_suit"
model_info = null
var/obj/item/robot_parts/l_arm/l_arm = null
var/obj/item/robot_parts/r_arm/r_arm = null
var/obj/item/robot_parts/l_leg/l_leg = null
@@ -108,6 +114,9 @@
forced_ai = null
return ..()
/obj/item/robot_parts/robot_suit/attack_self(mob/user)
return
/obj/item/robot_parts/robot_suit/proc/updateicon()
overlays.Cut()
if(l_arm)
@@ -37,8 +37,7 @@
R.hands.icon_state = "nomod"
R.icon_state = "robot"
R.module.remove_subsystems_and_actions(R)
qdel(R.module)
R.module = null
QDEL_NULL(R.module)
R.camera.network.Remove(list("Engineering", "Medical", "Mining Outpost"))
R.rename_character(R.real_name, R.get_default_name("Default"))
+27 -20
View File
@@ -11,6 +11,7 @@
var/heal_burn = 0
var/self_delay = 20
var/unique_handling = 0 //some things give a special prompt, do we want to bypass some checks in parent?
var/stop_bleeding = 0
/obj/item/stack/medical/attack(mob/living/M, mob/user)
if(!iscarbon(M) && !isanimal(M))
@@ -37,6 +38,14 @@
to_chat(user, "<span class='danger'>This can't be used on a robotic limb.</span>")
return 1
if(stop_bleeding)
if(H.bleedsuppress)
to_chat(user, "<span class='warning'>[H]'s bleeding is already bandaged!</span>")
return 1
else if(!H.bleed_rate)
to_chat(user, "<span class='warning'>[H] isn't bleeding!</span>")
return 1
if(M == user && !unique_handling)
user.visible_message("<span class='notice'>[user] starts to apply [src] on [H]...</span>")
if(!do_mob(user, H, self_delay))
@@ -76,6 +85,7 @@
desc = "Some sterile gauze to wrap around bloody stumps."
icon_state = "gauze"
origin_tech = "biotech=2"
stop_bleeding = 1800
/obj/item/stack/medical/bruise_pack/attack(mob/living/M, mob/user)
if(..())
@@ -86,19 +96,17 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
var/bandaged = affecting.bandage()
var/disinfected = affecting.disinfect()
affecting.germ_level = 0
if(!(bandaged || disinfected))
to_chat(user, "<span class='warning'>The wounds on [H]'s [affecting.name] have already been bandaged.</span>")
return 1
else
user.visible_message("<span class='green'>[user] bandages the wounds on [H]'s [affecting.name].", \
"<span class='green'>You bandage the wounds on [H]'s [affecting.name].</span>" )
user.visible_message("<span class='green'>[user] bandages the wounds on [H]'s [affecting.name].</span>", \
"<span class='green'>You bandage the wounds on [H]'s [affecting.name].</span>" )
affecting.heal_damage(heal_brute, heal_burn)
H.UpdateDamageIcon()
use(1)
if(stop_bleeding)
if(!H.bleedsuppress) //so you can't stack bleed suppression
H.suppress_bloodloss(stop_bleeding)
affecting.heal_damage(heal_brute, heal_burn)
H.UpdateDamageIcon()
use(1)
else
to_chat(user, "<span class='warning'>[affecting] is cut open, you'll need more than a bandage!</span>")
@@ -109,6 +117,7 @@
desc = "An advanced trauma kit for severe injuries."
icon_state = "traumakit"
heal_brute = 25
stop_bleeding = 0
@@ -132,15 +141,13 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open == 0)
if(!affecting.salve())
to_chat(user, "<span class='warning'>The wounds on [H]'s [affecting.name] have already been salved.</span>")
return 1
else
user.visible_message("<span class='green'>[user] salves the wounds on [H]'s [affecting.name].", \
"<span class='green'>You salve the wounds on [H]'s [affecting.name].</span>" )
affecting.heal_damage(heal_brute, heal_burn)
H.UpdateDamageIcon()
use(1)
affecting.germ_level = 0
user.visible_message("<span class='green'>[user] salves the wounds on [H]'s [affecting.name].</span>", \
"<span class='green'>You salve the wounds on [H]'s [affecting.name].</span>" )
affecting.heal_damage(heal_brute, heal_burn)
H.UpdateDamageIcon()
use(1)
else
to_chat(user, "<span class='warning'>[affecting] is cut open, you'll need more than some ointment!</span>")
+1 -1
View File
@@ -55,7 +55,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
"<span class='italics'>You hear welding.</span>")
var/replace = user.get_inactive_hand() == src
var/replace = user.is_in_inactive_hand(src)
use(2)
if(get_amount() <= 0 && replace)
user.unEquip(src, 1)
@@ -123,6 +123,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
*/
var/global/list/datum/stack_recipe/plasteel_recipes = list(
new /datum/stack_recipe("AI core", /obj/structure/AIcore, 4, time = 50, one_per_turf = 1),
new /datum/stack_recipe("bomb assembly", /obj/machinery/syndicatebomb/empty, 10, time = 50),
new /datum/stack_recipe("Surgery Table", /obj/machinery/optable, 5, time = 50, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("Metal crate", /obj/structure/closet/crate, 10, time = 50, one_per_turf = 1),
new /datum/stack_recipe("Mass Driver frame", /obj/machinery/mass_driver_frame, 3, time = 50, one_per_turf = 1)
+26 -8
View File
@@ -36,6 +36,23 @@
/obj/item/stack/attack_self(mob/user)
list_recipes(user)
/obj/item/stack/attack_self_tk(mob/user)
list_recipes(user)
/obj/item/stack/attack_tk(mob/user)
if(user.stat || !isturf(loc)) return
// Allow remote stack splitting, because telekinetic inventory managing
// is really cool
if(src in user.tkgrabbed_objects)
var/obj/item/stack/F = split(user, 1)
F.attack_tk(user)
if(src && user.machine == src)
spawn(0)
interact(user)
else
..()
/obj/item/stack/proc/list_recipes(mob/user, recipes_sublist)
if(!recipes)
return
@@ -107,7 +124,7 @@
/obj/item/stack/Topic(href, href_list)
..()
if(usr.incapacitated() || usr.get_active_hand() != src)
if(usr.incapacitated() || !usr.is_in_active_hand(src))
return 0
if(href_list["sublist"] && !href_list["make"])
@@ -124,6 +141,7 @@
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
var/atom/creation_loc = (loc == usr) ? usr.loc : loc
if(!multiplier)
multiplier = 1
@@ -134,11 +152,11 @@
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>")
return 0
if(R.one_per_turf && (locate(R.result_type) in usr.loc))
if(R.one_per_turf && (locate(R.result_type) in creation_loc))
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
return 0
if(R.on_floor && !istype(usr.loc, /turf/simulated))
if(R.on_floor && !istype(creation_loc, /turf/simulated))
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
return 0
@@ -150,7 +168,7 @@
if(amount < R.req_amount * multiplier)
return
var/atom/O = new R.result_type(usr.loc)
var/atom/O = new R.result_type(creation_loc)
O.dir = usr.dir
if(R.max_res_amount > 1)
var/obj/item/stack/new_item = O
@@ -215,7 +233,7 @@
return max_amount
/obj/item/stack/proc/split(mob/user, amt)
var/obj/item/stack/F = new type(user, amt)
var/obj/item/stack/F = new type(loc, amt)
F.copy_evidences(src)
if(isliving(user))
add_fingerprint(user)
@@ -224,7 +242,7 @@
return F
/obj/item/stack/attack_hand(mob/user)
if(user.get_inactive_hand() == src)
if(user.is_in_inactive_hand(src))
var/obj/item/stack/F = split(user, 1)
user.put_in_hands(F)
if(src && usr.machine == src)
@@ -241,7 +259,7 @@
return 1
var/to_transfer
if(user.get_inactive_hand() == src)
if(user.is_in_inactive_hand(src))
var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num
if(!desired)
return
@@ -267,4 +285,4 @@
fingerprints = from.fingerprints
fingerprintshidden = from.fingerprintshidden
fingerprintslast = from.fingerprintslast
//TODO bloody overlay
//TODO bloody overlay
+1 -2
View File
@@ -1288,8 +1288,7 @@ obj/item/toy/cards/deck/syndicate/black
if(stored_minature)
to_chat(user, "<span class='danger'>\The [src] makes a violent grinding noise as it tears apart the miniature figure inside!</span>")
qdel(stored_minature)
stored_minature = null
QDEL_NULL(stored_minature)
playsound(user, 'sound/goonstation/effects/gib.ogg', 20, 1)
cooldown = world.time
+18 -10
View File
@@ -1,12 +1,10 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/*
CONTAINS:
RCD
*/
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls and floors."
desc = "A device used to rapidly build and deconstruct walls, floors and airlocks."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
opacity = 0
@@ -68,7 +66,7 @@ RCD
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='notice'>The RCD cant hold any more matter-units.</span>")
to_chat(user, "<span class='notice'>The RCD can't hold any more matter-units.</span>")
return
matter += R.ammoamt
user.drop_item()
@@ -84,6 +82,9 @@ RCD
//Change the mode
ui_interact(user)
/obj/item/weapon/rcd/attack_self_tk(mob/user)
ui_interact(user)
/obj/item/weapon/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -199,7 +200,8 @@ RCD
to_chat(user, "Building Wall ...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20 * toolspeed, target = A))
if(!useResource(3, user)) return 0
if(!useResource(3, user))
return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/wall)
@@ -212,7 +214,10 @@ RCD
to_chat(user, "Building Airlock...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(10, user)) return 0
for(var/obj/machinery/door/airlock/D in A.contents)
return 0
if(!useResource(10, user))
return 0
activate()
var/obj/machinery/door/airlock/T = new door_type(A)
T.name = door_name
@@ -233,7 +238,8 @@ RCD
to_chat(user, "Deconstructing Wall...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 40 * toolspeed, target = A))
if(!useResource(5, user)) return 0
if(!useResource(5, user))
return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/floor/plating)
@@ -245,7 +251,8 @@ RCD
to_chat(user, "Deconstructing Floor...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(5, user)) return 0
if(!useResource(5, user))
return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/space)
@@ -257,7 +264,8 @@ RCD
to_chat(user, "Deconstructing Airlock...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(20, user)) return 0
if(!useResource(20, user))
return 0
activate()
qdel(A)
return 1
@@ -361,7 +369,7 @@ RCD
/obj/item/weapon/rcd/borg/New()
..()
desc = "A device used to rapidly build and deconstruct walls and floors."
desc = "A device used to rapidly build and deconstruct walls, floors and airlocks."
canRwall = 1
+5 -4
View File
@@ -55,7 +55,8 @@
proc/dead_legs(mob/living/carbon/human/H as mob)
var/obj/item/organ/external/l = H.get_organ("l_leg")
var/obj/item/organ/external/r = H.get_organ("r_leg")
if(l && !(l.status & ORGAN_DESTROYED))
l.status |= ORGAN_DESTROYED
if(r && !(r.status & ORGAN_DESTROYED))
r.status |= ORGAN_DESTROYED
if(l)
l.droplimb(0, DROPLIMB_SHARP)
if(r)
r.droplimb(0, DROPLIMB_SHARP)
@@ -5,49 +5,6 @@
* Bike Horns
*/
/*
* Soap
*/
/obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
M.slip("soap", 4, 2)
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
if(!proximity) return
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
if(user.client && (target in user.client.screen))
to_chat(user, "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>")
else if(target == user && user.a_intent == INTENT_GRAB && ishuman(target))
var/mob/living/carbon/human/muncher = user
if(muncher && muncher.get_species() == "Drask")
to_chat(user, "You take a bite of the [src.name]. Delicious!")
playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0)
user.nutrition += 2
else if(istype(target,/obj/effect/decal/cleanable))
user.visible_message("<span class='warning'>[user] begins to scrub \the [target.name] out with [src].</span>")
if(do_after(user, src.cleanspeed, target = target) && target)
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
qdel(target)
else
user.visible_message("<span class='warning'>[user] begins to clean \the [target.name] with [src].</span>")
if(do_after(user, src.cleanspeed, target = target))
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.clean_blood()
if(istype(target, /turf/simulated))
var/turf/simulated/T = target
T.dirt = 0
return
/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == "mouth" )
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>")
return
..()
/*
* Bike Horns
*/
+2 -2
View File
@@ -99,7 +99,7 @@
if(!get_location_accessible(H, "mouth"))
to_chat(user, "<span class='warning'>The mask is in the way.</span>")
return
if((C.species && C.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
if((C.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of facial hair.</span>")
return
if(C.f_style == "Shaved")
@@ -130,7 +130,7 @@
if(!get_location_accessible(H, "head"))
to_chat(user, "<span class='warning'>The headgear is in the way.</span>")
return
if((C.species && C.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
if((C.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of hair.</span>")
return
if(C.h_style == "Bald" || C.h_style == "Balding Hair" || C.h_style == "Skinhead")
+157 -167
View File
@@ -337,105 +337,100 @@
update_icon()
defib.cooldowncheck(user)
return
if(user.zone_sel && user.zone_sel.selecting == "chest")
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30 * toolspeed, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H.key = ghost.key
log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), src)
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30 * toolspeed, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H.key = ghost.key
log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), src)
qdel(ghost)
ghost = null
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/suit/space))
if(!defib.combat)
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
if(H.undergoing_cardiac_arrest())
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
QDEL_NULL(ghost)
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/suit/space))
if(!defib.combat)
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
else
H.set_heartattack(FALSE)
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
defib.deductcharge(revivecost)
busy = 0
cooldown = 1
update_icon()
defib.cooldowncheck(user)
return
if(H.stat == DEAD)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations) && (H.get_int_organ(/obj/item/organ/internal/heart) || H.get_int_organ(/obj/item/organ/internal/brain/slime)))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
defib.deductcharge(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit|| !H.get_int_organ(/obj/item/organ/internal/heart))
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
window_flash(ghost.client)
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
defib.deductcharge(revivecost)
update_icon()
cooldown = 1
defib.cooldowncheck(user)
else
user.visible_message("<span class='notice'>[defib] buzzes: Patient is not in a valid state. Operation aborted.</span>")
if(H.undergoing_cardiac_arrest())
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
else
to_chat(user, "<span class='notice'>You need to target your patient's chest with [src].</span>")
return
busy = 0
update_icon()
return
else
H.set_heartattack(FALSE)
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
defib.deductcharge(revivecost)
busy = 0
cooldown = 1
update_icon()
defib.cooldowncheck(user)
return
if(H.stat == DEAD)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations) && (H.get_int_organ(/obj/item/organ/internal/heart) || H.get_int_organ(/obj/item/organ/internal/brain/slime)))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
defib.deductcharge(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit|| !H.get_int_organ(/obj/item/organ/internal/heart))
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
window_flash(ghost.client)
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
defib.deductcharge(revivecost)
update_icon()
cooldown = 1
defib.cooldowncheck(user)
else
user.visible_message("<span class='notice'>[defib] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
/obj/item/weapon/borg_defib
name = "defibrillator paddles"
@@ -487,80 +482,75 @@
cooldown = 0
update_icon()
return
if(user.zone_sel && user.zone_sel.selecting == "chest")
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30 * toolspeed, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H.key = ghost.key
log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), H)
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30 * toolspeed, target = M)) //beginning to place the paddles on patient's chest to allow some time for people to move away to stop the process
user.visible_message("<span class='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H.key = ghost.key
log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), H)
qdel(ghost)
ghost = null
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(H.stat == 2)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='notice'>[user] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[user] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
window_flash(ghost.client)
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
update_icon()
cooldown = 1
spawn(50)
cooldown = 0
update_icon()
QDEL_NULL(ghost)
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(H.stat == 2)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='notice'>[user] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
user.visible_message("<span class='notice'>[user] buzzes: Patient is not in a valid state. Operation aborted.</span>")
if(tplus > tlimit)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[user] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
window_flash(ghost.client)
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
else
to_chat(user, "<span class='notice'>You need to target your patient's chest with [src].</span>")
return
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
update_icon()
cooldown = 1
spawn(50)
cooldown = 0
update_icon()
else
user.visible_message("<span class='notice'>[user] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
@@ -74,7 +74,7 @@
H = M
spawn(0) //Some mutations have sleeps in them, like monkey
if(!(NOCLONE in M.mutations) && !(H && (H.species.flags & NO_DNA))) // prevents drained people from having their DNA changed
if(!(NOCLONE in M.mutations) && !(H && (NO_DNA in H.species.species_traits))) // prevents drained people from having their DNA changed
var/prev_ue = M.dna.unique_enzymes
var/mutflags = 0
// UI in syringe.
@@ -113,7 +113,7 @@
if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure.
var/mob/living/carbon/human/H = M
if(H.species.flags & NO_DNA)
if(NO_DNA in H.species.species_traits)
return 0
if(!user.IsAdvancedToolUser())
+13 -12
View File
@@ -19,40 +19,41 @@
if(!ishuman(M) || !ishuman(user))
return
if(src.used)
if(used)
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & NO_DNA)
if(NO_DNA in H.species.species_traits)
to_chat(user, "<span class='warning'>You failed to inject [M], as they have no DNA to scramble, nor flesh to inject.</span>")
return
if(M == user)
user.visible_message("<span class='danger'>[user] injects \himself with [src]!</span>")
src.injected(user,user)
injected(user, user)
else
user.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>")
if(do_mob(user,M,30))
user.visible_message("<span class='danger'>[user] injects [M] with [src].</span>")
src.injected(M, user)
injected(M, user)
else
to_chat(user, "<span class='warning'>You failed to inject [M].</span>")
proc/injected(var/mob/living/carbon/target, var/mob/living/carbon/user)
scramble(1, target, 100)
target.generate_name()
if(istype(target, /mob/living/carbon/human))
proc/injected(var/mob/living/carbon/human/target, var/mob/living/carbon/user)
if(istype(target))
var/mob/living/carbon/human/H = target
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
H.update_body(0)
H.reset_hair() // No more winding up with hairstyles you're not supposed to have, and blowing your cover
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
H.reset_markings() //...Or markings.
H.dna.ResetUIFrom(H)
target.update_icons()
log_attack("[key_name(user)] injected [key_name(target)] with the [name]")
log_game("[key_name_admin(user)] injected [key_name_admin(target)] with the [name]")
src.used = 1
src.update_icon()
src.name = "used " + src.name
used = 1
update_icon()
name = "used " + name
@@ -61,7 +61,7 @@
nadeassembly.attack_self(user)
return
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_hand() == src)
if(user.is_in_active_hand(src))
newtime = Clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
@@ -62,7 +62,7 @@
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
if(flag) return // too close
// Make sure our user is still holding us
if(user && user.get_active_hand() == src)
if(user && user.is_in_active_hand(src))
var/turf/target_turf = get_turf(target)
if(target_turf)
var/turflist = getline(user, target_turf)
@@ -72,7 +72,7 @@
/obj/item/weapon/lipstick/random,
/obj/item/weapon/grenade/smokebomb,
/obj/item/weapon/grown/corncob,
/obj/item/weapon/contraband/poster,
/obj/item/weapon/poster/random_contraband,
/obj/item/weapon/bikehorn,
/obj/item/weapon/beach_ball,
/obj/item/weapon/beach_ball/holoball,
@@ -88,8 +88,8 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/deus,
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosia/vulgaris,
/obj/item/device/paicard,
/obj/item/device/violin,
/obj/item/device/guitar,
/obj/item/device/instrument/violin,
/obj/item/device/instrument/guitar,
/obj/item/weapon/storage/belt/utility/full,
/obj/item/clothing/accessory/horrible,
/obj/random/carp_plushie,
@@ -19,6 +19,9 @@
var/obj/item/device/assembly_holder/nadeassembly = null
var/label = null
var/assemblyattacher
var/ignition_temp = 10 // The amount of heat added to the reagents when this grenade goes off.
var/threatscale = 1 // Used by advanced grenades to make them slightly more worthy.
var/no_splash = FALSE //If the grenade deletes even if it has no reagents to splash with. Used for slime core reactions.
/obj/item/weapon/grenade/chem_grenade/New()
create_reagents(1000)
@@ -99,6 +102,7 @@
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])")
bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])"
to_chat(user, "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>")
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
active = 1
update_icon()
if(iscarbon(user))
@@ -148,7 +152,7 @@
var/turf/bombturf = get_turf(loc)
var/area/A = bombturf.loc
message_admins("[key_name_admin(usr)] has completed [name] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a> [contained].")
log_game("[key_name(usr)] has completed [name] at [bombturf.x], [bombturf.y], [bombturf.z].")
log_game("[key_name(usr)] has completed [name] at [bombturf.x], [bombturf.y], [bombturf.z]. [contained]")
else
to_chat(user, "<span class='notice'>You need to add at least one beaker before locking the assembly.</span>")
else if(stage == READY && !nadeassembly)
@@ -264,13 +268,18 @@
if(stage != READY)
return
var/has_reagents = 0
var/list/datum/reagents/reactants = list()
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(G.reagents.total_volume)
has_reagents = 1
reactants += G.reagents
if(!has_reagents)
playsound(loc, usesound, 50, 1)
if(!chem_splash(get_turf(src), affected_area, reactants, ignition_temp, threatscale) && !no_splash)
playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1)
if(beakers.len)
for(var/obj/O in beakers)
O.forceMove(get_turf(src))
beakers = list()
stage = EMPTY
update_icon()
return
if(nadeassembly)
@@ -281,31 +290,9 @@
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> ([admin_jump_link(M)]) and last touched by [key_name_admin(last)]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
playsound(loc, 'sound/effects/bamf.ogg', 50, 1)
update_mob()
invisibility = INVISIBILITY_MAXIMUM //kaboom
qdel(nadeassembly) // do this now to stop infrared beams
var/end_temp = 0
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
end_temp += G.reagents.chem_temp
reagents.chem_temp = end_temp
if(reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, loc))
if(A == src)
continue
reagents.reaction(A, 1, 10)
spawn(15) //Making sure all reagents can work
qdel(src) //correctly before deleting the grenade.
qdel(src)
/obj/item/weapon/grenade/chem_grenade/proc/CreateDefaultTrigger(var/typekey)
if(ispath(typekey,/obj/item/device/assembly))
@@ -327,64 +314,37 @@
//Large chem grenades accept slime cores and use the appropriately.
/obj/item/weapon/grenade/chem_grenade/large
name = "large grenade casing"
desc = "For oversized grenades; fits additional contents and affects a greater area."
desc = "A custom made large grenade. It affects a larger area."
icon_state = "large_grenade"
bomb_state = "largebomb"
allowed_containers = list(/obj/item/weapon/reagent_containers/glass,/obj/item/weapon/reagent_containers/food/condiment,
/obj/item/weapon/reagent_containers/food/drinks)
origin_tech = "combat=3;engineering=3"
affected_area = 4
affected_area = 5
ignition_temp = 25 // Large grenades are slightly more effective at setting off heat-sensitive mixtures than smaller grenades.
threatscale = 1.1 // 10% more effective.
/obj/item/weapon/grenade/chem_grenade/large/prime()
if(stage != READY)
return
var/has_reagents = 0
var/obj/item/slime_extract/valid_core = null
for(var/obj/item/slime_extract/S in beakers)
if(S.Uses)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(S, G.reagents.total_volume)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
if(!istype(G)) continue
if(G.reagents.total_volume) has_reagents = 1
for(var/obj/item/slime_extract/E in beakers)
if(!istype(E)) continue
if(E.Uses) valid_core = E
if(E.reagents.total_volume) has_reagents = 1
//If there is still a core (sometimes it's used up)
//and there are reagents left, behave normally,
//otherwise drop it on the ground for timed reactions like gold.
if(!has_reagents)
playsound(loc, prime_sound, 50, 1)
return
playsound(loc, 'sound/effects/bamf.ogg', 50, 1)
update_mob()
if(valid_core)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(valid_core, G.reagents.total_volume)
//If there is still a core (sometimes it's used up)
//and there are reagents left, behave normally
if(valid_core && valid_core.reagents && valid_core.reagents.total_volume)
valid_core.reagents.trans_to(src,valid_core.reagents.total_volume)
else
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to(src, G.reagents.total_volume)
if(reagents.total_volume) //The possible reactions didnt use up all reagents.
var/datum/effect/system/steam_spread/steam = new /datum/effect/system/steam_spread()
steam.set_up(10, 0, get_turf(src))
steam.attach(src)
steam.start()
for(var/atom/A in view(affected_area, loc))
if( A == src ) continue
reagents.reaction(A, 1, 10)
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
qdel(src) //correctly before deleting the grenade.
if(S)
if(S.reagents && S.reagents.total_volume)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
S.reagents.trans_to(G, S.reagents.total_volume)
else
S.forceMove(get_turf(src))
no_splash = TRUE
..()
//I tried to just put it in the allowed_containers list but
@@ -399,6 +359,71 @@
else
return ..()
/obj/item/weapon/grenade/chem_grenade/cryo // Intended for rare cryogenic mixes. Cools the area moderately upon detonation.
name = "cryo grenade"
desc = "A custom made cryogenic grenade. It rapidly cools its contents upon detonation."
icon_state = "cryog"
affected_area = 2
ignition_temp = -100
/obj/item/weapon/grenade/chem_grenade/pyro // Intended for pyrotechnical mixes. Produces a small fire upon detonation, igniting potentially flammable mixtures.
name = "pyro grenade"
desc = "A custom made pyrotechnical grenade. It heats up and ignites its contents upon detonation."
icon_state = "pyrog"
origin_tech = "combat=4;engineering=4"
affected_area = 3
ignition_temp = 500 // This is enough to expose a hotspot.
/obj/item/weapon/grenade/chem_grenade/adv_release // Intended for weaker, but longer lasting effects. Could have some interesting uses.
name = "advanced release grenade"
desc = "A custom made advanced release grenade. It is able to be detonated more than once. Can be configured using a multitool."
icon_state = "timeg"
origin_tech = "combat=3;engineering=4"
var/unit_spread = 10 // Amount of units per repeat. Can be altered with a multitool.
/obj/item/weapon/grenade/chem_grenade/adv_release/attackby(obj/item/I, mob/user, params)
if(ismultitool(I))
switch(unit_spread)
if(0 to 24)
unit_spread += 5
if(25 to 99)
unit_spread += 25
else
unit_spread = 5
to_chat(user, "<span class='notice'> You set the time release to [unit_spread] units per detonation.</span>")
return
..()
/obj/item/weapon/grenade/chem_grenade/adv_release/prime()
if(stage != READY)
return
var/total_volume = 0
for(var/obj/item/weapon/reagent_containers/RC in beakers)
total_volume += RC.reagents.total_volume
if(!total_volume)
qdel(src)
qdel(nadeassembly)
return
var/fraction = unit_spread/total_volume
var/datum/reagents/reactants = new(unit_spread)
reactants.my_atom = src
for(var/obj/item/weapon/reagent_containers/RC in beakers)
RC.reagents.trans_to(reactants, RC.reagents.total_volume*fraction, threatscale, 1, 1)
chem_splash(get_turf(src), affected_area, list(reactants), ignition_temp, threatscale)
if(nadeassembly)
var/mob/M = get_mob_by_ckey(assemblyattacher)
var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast)
var/turf/T = get_turf(src)
var/area/A = get_area(T)
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) and last touched by [key_name_admin(last)]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[last]'>FLW</A>) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
else
addtimer(src, "prime", det_time)
var/turf/DT = get_turf(src)
var/area/DA = get_area(DT)
log_game("A grenade detonated at [DA.name] ([DT.x], [DT.y], [DT.z])")
/obj/item/weapon/grenade/chem_grenade/metalfoam
payload_name = "metal foam"
@@ -50,24 +50,20 @@
*/
/obj/item/weapon/grown/bananapeel/traitorpeel
trip_stun = 0
trip_weaken = 7
trip_tiles = 4
trip_walksafe = FALSE
trip_chance = 100
/obj/item/weapon/grown/bananapeel/traitorpeel/Crossed(AM as mob|obj)
var/burned = rand(2,5)
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
if(ishuman(M))
if(isobj(M:shoes))
if((M:shoes.flags&NOSLIP) || (M:species.bodyflags & FEET_NOSLIP))
return
else
to_chat(M, "<span class='warning'>Your feet feel like they're on fire!</span>")
M.take_overall_damage(0, max(0, (burned - 2)))
if(!istype(M, /mob/living/carbon/slime) && !isrobot(M))
M.slip("banana peel!", 0, 7, 4)
M.take_organ_damage(2) // Was 5 -- TLE
M.take_overall_damage(0, burned)
/obj/item/weapon/grown/bananapeel/traitorpeel/on_trip(mob/living/carbon/human/H)
. = ..()
if(.)
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
H.take_overall_damage(0, rand(2,8))
H.take_organ_damage(2) // Was 5 -- TLE
/obj/item/weapon/grown/bananapeel/traitorpeel/throw_impact(atom/hit_atom)
var/burned = rand(1,3)
@@ -37,7 +37,7 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/internal/eyes/E = H.get_int_organ(/obj/item/organ/internal/eyes)
if(E)
E.damage += 8
E.take_damage(8, 1)
if(M.flash_eyes(affect_silicon = 1))
M.Stun(max(10/distance, 3))
@@ -32,7 +32,7 @@
/*/obj/item/weapon/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if(istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if(istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if((user.get_active_hand() == src) && (!active) && (clown_check(user)) && target.loc != src.loc)
if((user.is_in_active_hand(src)) && (!active) && (clown_check(user)) && target.loc != src.loc)
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
active = 1
icon_state = initial(icon_state) + "_active"
@@ -104,6 +104,10 @@
/obj/item/weapon/restraints/handcuffs/cable/white
color = COLOR_WHITE
/obj/item/weapon/restraints/handcuffs/cable/random/New()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()
/obj/item/weapon/restraints/handcuffs/alien
icon_state = "handcuffAlien"
@@ -100,7 +100,6 @@
slot_flags = SLOT_BACK|SLOT_BELT
block_chance = 30
sharp = 1
edge = 1
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -187,7 +186,6 @@
armour_penetration = 35
slot_flags = SLOT_BACK
sharp = 1
edge = 1
attack_verb = list("chopped", "sliced", "cut", "reaped")
hitsound = 'sound/weapons/rapierhit.ogg'
@@ -266,7 +264,6 @@
w_class = WEIGHT_CLASS_HUGE
flags = NODROP | ABSTRACT
sharp = 1
edge = 1
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = 'sound/weapons/chainsaw.ogg'
@@ -278,7 +275,6 @@
desc = "Used for absolutely hilarious sacrifices."
hitsound = 'sound/items/bikehorn.ogg'
sharp = 1
edge = 1
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut", "honked")
/obj/item/weapon/nullrod/whip
@@ -324,7 +320,6 @@
flags = ABSTRACT | NODROP
w_class = WEIGHT_CLASS_HUGE
sharp = 1
edge = 1
/obj/item/weapon/nullrod/carp
name = "carp-sie plushie"
@@ -354,7 +349,6 @@
block_chance = 40
slot_flags = SLOT_BACK
sharp = 0
edge = 0
hitsound = "swing_hit"
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
icon = 'icons/obj/weapons.dmi'
@@ -368,7 +362,6 @@
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."
sharp = 1
edge = 1
slot_flags = null
flags = HANDSLOW
hitsound = 'sound/weapons/bladeslice.ogg'
@@ -394,7 +387,6 @@
attack_verb = list("poked", "impaled", "pierced", "jabbed")
hitsound = 'sound/weapons/bladeslice.ogg'
sharp = 1
edge = 1
/obj/item/weapon/nullrod/rosary
name = "prayer beads"
@@ -0,0 +1,11 @@
/obj/item/weapon/implant/health
name = "health implant"
activated = FALSE
var/healthstring = ""
/obj/item/weapon/implant/health/proc/sensehealth()
if(!imp_in)
return "ERROR"
else
healthstring = "[round(imp_in.getOxyLoss())] - [round(imp_in.getFireLoss())] - [round(imp_in.getToxLoss())] - [round(imp_in.getBruteLoss())]"
return healthstring
@@ -35,7 +35,7 @@
var/mob/M = imp_in
var/area/t = get_area(M)
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(src)
a.follow_target = M
switch(cause)
@@ -52,7 +52,7 @@
else
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm")
qdel(src)
qdel(a)
/obj/item/weapon/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
@@ -159,6 +159,11 @@
return 0
to_chat(imp_in, "<span class='notice'>Your dusting implant activates!</span>")
imp_in.visible_message("<span class = 'warning'>[imp_in] burns up in a flash!</span>")
for(var/obj/item/I in imp_in.contents)
if(I == src)
continue
if(I.flags & NODROP)
qdel(I)
imp_in.dust()
/obj/item/weapon/implant/dust/emp_act(severity)
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/machinery/implantchair
name = "mindshield implanter"
desc = "Used to implant occupants with mindshield implants."
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/implantpad
name = "implantpad"
desc = "Used to modify implants."
+7 -3
View File
@@ -98,9 +98,7 @@
throw_range = 6
materials = list(MAT_METAL=12000)
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
no_embed = 1
sharp = 1
edge = 1
/obj/item/weapon/kitchen/knife/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is slitting \his wrists with the [src.name]! It looks like \he's trying to commit suicide.</span>", \
@@ -114,7 +112,6 @@
icon_state = "pknife"
item_state = "knife"
sharp = 0
edge = 0
/obj/item/weapon/kitchen/knife/ritual
name = "ritual knife"
@@ -151,6 +148,13 @@
origin_tech = "materials=3;combat=4"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
/obj/item/weapon/kitchen/knife/combat/cyborg
name = "cyborg knife"
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "knife"
desc = "A cyborg-mounted plasteel knife. Extremely sharp and durable."
origin_tech = null
/obj/item/weapon/kitchen/knife/carrotshiv
name = "carrot shiv"
icon_state = "carrotshiv"
+15 -13
View File
@@ -6,7 +6,6 @@
var/w_class_on = WEIGHT_CLASS_BULKY
var/icon_state_on = "axe1"
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
no_embed = 1 // Physically impossible for energy weapons to embed themselves into people, this should fix that. -- Dave
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
usesound = 'sound/weapons/blade1.ogg'
toolspeed = 1
@@ -25,6 +24,7 @@
force = force_on
throwforce = throwforce_on
hitsound = 'sound/weapons/blade1.ogg'
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
@@ -38,6 +38,7 @@
force = initial(force)
throwforce = initial(throwforce)
hitsound = initial(hitsound)
throw_speed = initial(throw_speed)
if(attack_verb_on.len)
attack_verb = list()
icon_state = initial(icon_state)
@@ -70,7 +71,6 @@
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = list()
sharp = 1
edge = 1
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] swings the [src.name] towards /his head! It looks like \he's trying to commit suicide.</span>")
@@ -85,11 +85,12 @@
throw_speed = 3
throw_range = 5
hitsound = "swing_hit"
embed_chance = 75
embedded_impact_pain_multiplier = 10
armour_penetration = 35
origin_tech = "combat=3;magnets=4;syndicate=4"
block_chance = 50
sharp = 1
edge = 1
var/hacked = 0
var/blade_color
@@ -121,7 +122,6 @@
force_on = 30
force = 18 //About as much as a spear
sharp = 1
edge = 1
hitsound = 'sound/weapons/circsawhit.ogg'
icon = 'icons/obj/surgery.dmi'
icon_state = "esaw_0"
@@ -200,26 +200,28 @@
name = "energy blade"
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
icon_state = "blade"
force = 30
sharp = 1
edge = 1
force = 30 //Normal attacks deal esword damage
hitsound = 'sound/weapons/blade1.ogg'
active = 1
throwforce = 1//Throwing or dropping the item deletes it.
throw_speed = 3
throw_range = 1
w_class = WEIGHT_CLASS_BULKY //So you can't hide it in your pocket or some such.
armour_penetration = 50
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/datum/effect/system/spark_spread/spark_system
sharp = 1
//Most of the other special functions are handled in their own files. aka special snowflake code so kewl
/obj/item/weapon/melee/energy/blade/New()
..()
spark_system = new /datum/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/melee/energy/blade/dropped()
..()
qdel(src)
/obj/item/weapon/melee/energy/blade/attack_self(mob/user)
return
/obj/item/weapon/melee/energy/blade/hardlight
name = "hardlight blade"
desc = "An extremely sharp blade made out of hard light. Packs quite a punch."
icon_state = "lightblade"
item_state = "lightblade"
@@ -32,7 +32,6 @@
block_chance = 50
armour_penetration = 75
sharp = 1
edge = 1
origin_tech = "combat=5"
attack_verb = list("lunged at", "stabbed")
hitsound = 'sound/weapons/rapierhit.ogg'
+49 -24
View File
@@ -1,12 +1,10 @@
#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune))
/obj/item/weapon/mop
desc = "The world of janitalia wouldn't be complete without a mop."
name = "mop"
icon = 'icons/obj/janitor.dmi'
icon_state = "mop"
force = 3.0
throwforce = 5.0
force = 3
throwforce = 5
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
@@ -43,23 +41,25 @@
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
return
var/turf/simulated/turf = A
if(is_cleanable(A))
turf = A.loc
A = null
var/turf/simulated/T = get_turf(A)
if(istype(turf))
user.visible_message("[user] begins to clean \the [turf] with [src].", "<span class='notice'>You begin to clean \the [turf] with [src]...</span>")
if(istype(A, /obj/item/weapon/reagent_containers/glass/bucket) || istype(A, /obj/structure/janitorialcart))
return
if(do_after(user, src.mopspeed, target = turf))
if(istype(T))
user.visible_message("[user] begins to clean [T] with [src].", "<span class='notice'>You begin to clean [T] with [src]...</span>")
if(do_after(user, src.mopspeed, target = T))
to_chat(user, "<span class='notice'>You finish mopping.</span>")
clean(turf)
clean(T)
/obj/effect/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap))
return
..()
else
return ..()
/obj/item/weapon/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J)
J.put_in_cart(src, user)
@@ -75,22 +75,47 @@
/obj/item/weapon/mop/advanced
desc = "The most advanced tool in a custodian's arsenal. Just think of all the viscera you will clean up with this!"
name = "advanced mop"
mopcap = 15
mopcap = 10
icon_state = "advmop"
item_state = "mop" //meh will do for now until TG makes one
item_state = "mop"
origin_tech = "materials=3;engineering=3"
force = 6
throwforce = 8
throw_range = 4
mopspeed = 10
mopspeed = 20
var/refill_enabled = TRUE //Self-refill toggle for when a janitor decides to mop with something other than water.
var/refill_rate = 1 //Rate per process() tick mop refills itself
var/refill_reagent = "water" //Determins what reagent to use for refilling, just in case someone wanted to make a HOLY MOP OF PURGING
/obj/item/weapon/mop/advanced/New()
..()
processing_objects.Add(src)
/obj/item/weapon/mop/advanced/attack_self(mob/user)
refill_enabled = !refill_enabled
if(refill_enabled)
processing_objects.Add(src)
else
processing_objects.Remove(src)
to_chat(user, "<span class='notice'>You set the condenser switch to the '[refill_enabled ? "ON" : "OFF"]' position.</span>")
playsound(user, 'sound/machines/click.ogg', 30, 1)
/obj/item/weapon/mop/advanced/process()
if(reagents.total_volume < mopcap)
reagents.add_reagent(refill_reagent, refill_rate)
/obj/item/weapon/mop/advanced/examine(mob/user)
..()
to_chat(user, "<span class='notice'>The condenser switch is set to <b>[refill_enabled ? "ON" : "OFF"]</b>.</span>")
/obj/item/weapon/mop/advanced/Destroy()
if(refill_enabled)
processing_objects.Remove(src)
return ..()
/obj/item/weapon/mop/advanced/cyborg
mopcap = 40
/obj/item/weapon/mop/advanced/cyborg/New()
..()
reagents.add_reagent("water", mopcap)
/obj/item/weapon/mop/advanced/cyborg/examine(mob/user)
..(user)
to_chat(user, "<span class='notice'>The mop's water tank has [round(reagents.get_reagent_amount("water"))] units of water left.</span>")
/obj/item/weapon/mop/advanced/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J)
return
+13 -13
View File
@@ -26,17 +26,17 @@
to_chat(user, "<span class='notice'>You'll need to get closer to see any more.</span>")
return
if(tank)
to_chat(user, "<span class='notice'>\icon [tank] It has \the [tank] mounted onto it.</span>")
to_chat(user, "<span class='notice'>[bicon(tank)] It has [tank] mounted onto it.</span>")
/obj/item/weapon/melee/powerfist/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/tank))
if(!tank)
var/obj/item/weapon/tank/IT = W
if(IT.volume <= 3)
to_chat(user, "<span class='warning'>\The [IT] is too small for \the [src].</span>")
to_chat(user, "<span class='warning'>[IT] is too small for [src].</span>")
return
updateTank(W, 0, user)
else if(istype(W, /obj/item/weapon/wrench))
else if(iswrench(W))
switch(fisto_setting)
if(1)
fisto_setting = 2
@@ -45,8 +45,8 @@
if(3)
fisto_setting = 1
playsound(loc, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You tweak \the [src]'s piston valve to [fisto_setting].</span>")
else if(istype(W, /obj/item/weapon/screwdriver))
to_chat(user, "<span class='notice'>You tweak [src]'s piston valve to [fisto_setting].</span>")
else if(isscrewdriver(W))
if(tank)
updateTank(tank, 1, user)
@@ -54,29 +54,29 @@
/obj/item/weapon/melee/powerfist/proc/updateTank(obj/item/weapon/tank/thetank, removing = 0, mob/living/carbon/human/user)
if(removing)
if(!tank)
to_chat(user, "<span class='notice'>\The [src] currently has no tank attached to it.</span>")
to_chat(user, "<span class='notice'>[src] currently has no tank attached to it.</span>")
return
to_chat(user, "<span class='notice'>You detach \the [thetank] from \the [src].</span>")
to_chat(user, "<span class='notice'>You detach [thetank] from [src].</span>")
tank.forceMove(get_turf(user))
user.put_in_hands(tank)
tank = null
if(!removing)
if(tank)
to_chat(user, "<span class='warning'>\The [src] already has a tank.</span>")
to_chat(user, "<span class='warning'>[src] already has a tank.</span>")
return
if(!user.unEquip(thetank))
return
to_chat(user, "<span class='notice'>You hook \the [thetank] up to \the [src].</span>")
to_chat(user, "<span class='notice'>You hook [thetank] up to [src].</span>")
tank = thetank
thetank.forceMove(src)
/obj/item/weapon/melee/powerfist/attack(mob/living/target, mob/living/user)
if(!tank)
to_chat(user, "<span class='warning'>\The [src] can't operate without a source of gas!</span>")
to_chat(user, "<span class='warning'>[src] can't operate without a source of gas!</span>")
return
if(tank && !tank.air_contents.remove(gasperfist * fisto_setting))
to_chat(user, "<span class='warning'>\The [src]'s piston-ram lets out a weak hiss, it needs more gas!</span>")
to_chat(user, "<span class='warning'>[src]'s piston-ram lets out a weak hiss, it needs more gas!</span>")
playsound(loc, 'sound/effects/refill.ogg', 50, 1)
return
@@ -90,8 +90,8 @@
playsound(loc, 'sound/weapons/genhit2.ogg', 50, 1)
var/atom/throw_target = get_edge_target_turf(target, get_dir(src, get_step_away(target, src)))
spawn(0)
target.throw_at(throw_target, 5 * fisto_setting, 0.2)
target.throw_at(throw_target, 5 * fisto_setting, 0.2)
add_logs(user, target, "power fisted", src)
+262
View File
@@ -0,0 +1,262 @@
/*Contains:
Rapid Pipe Dispenser
*/
#define SIMPLE_CAP 20
#define SUPPLY_CAP 32
#define SCRUBBERS_CAP 33
#define HE_EXCHANGER 17
#define CONNECTOR 4
#define UNARY_VENT 7
#define PASSIVE_VENT 37
#define GAS_SCRUBBER 10
#define INJECTOR 34
#define GAS_SENSOR 98
#define METER 99
#define DISPOSALS_JUNCTION 2
#define ATMOS_MODE 1
#define DISPOSALS_MODE 2
#define ROTATION_MODE 3
#define FLIP_MODE 4
#define DELETE_MODE 5
#define ATMOS_PIPING 1
#define SUPPLY_PIPING 2
#define SCRUBBERS_PIPING 3
#define DEVICES 4
#define HEAT_PIPING 5
/obj/item/weapon/rpd
name = "rapid pipe dispenser"
desc = "This device can rapidly dispense atmospherics and disposals piping, manipulate loose piping, and recycle any detached pipes it is applied to."
icon = 'icons/obj/tools.dmi'
icon_state = "rpd"
opacity = 0
density = 0
anchored = 0
flags = CONDUCT
force = 10
throwforce = 10
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL = 30000, MAT_GLASS = 5000)
origin_tech = "engineering=4;materials=2"
var/datum/effect/system/spark_spread/spark_system
var/lastused
var/iconrotation = 0 //used to orient icons and pipes
var/mode = 1 //Disposals, atmospherics, etc.
var/pipetype = 1//For nanoUI menus
var/whatpipe = 0 //What kind of pipe is it? See code/game/machinery/pipe/construction.dm for a list of defines
var/whatdpipe = 0 //What kind of disposals pipe is it? See code/game/machinery/pipe/dispenser.dm for a list of defines
var/spawndelay = 4 //How long should we have to wait between dispensing pipes?
var/walldelay = 40 //How long should drilling into a wall take?
/obj/item/weapon/rpd/New()
..()
spark_system = new /datum/effect/system/spark_spread()
spark_system.set_up(1, 0, src)
spark_system.attach(src)
//Procs
/obj/item/weapon/rpd/proc/Activaterpd(delay)
playsound(loc, "sound/machines/click.ogg", 50, 1)
if(prob(15))
spark_system.start()
if(delay)
lastused = world.time
/obj/item/weapon/rpd/proc/Manipulatepipes(subject, atmosverb, disposalsverb)
if(istype(subject, /obj/item/pipe))
call(subject, atmosverb)()
else if(istype(subject, /obj/structure/disposalconstruct/))
call(subject, disposalsverb)()
//Lists of things
var/list/pipelist = list( //id refers to the pipe_type found in construction.dm, icon refers to the name of the icon state in icons/obj/pipe-item.dmi. Icons are made with the asset-cache
list("pipename" = "Straight pipe", "id" = 0, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent pipe", "id" = 1, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "T-manifold", "id" = 5, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way manifold", "id" = 19, "category" = ATMOS_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Pipe cap", "id" = 20, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Manual valve", "id" = 8, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "mvalve"),
list("pipename" = "Digital valve", "id" = 35, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "dvalve"),
list("pipename" = "Manual T-valve", "id" = 18, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "tvalve"),
list("pipename" = "Digital T-valve", "id" = 38, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "dtvalve"),
list("pipename" = "Straight supply pipe", "id" = 24, "category" = SUPPLY_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent supply pipe", "id" = 25, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "Supply T-manifold", "id" = 28, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way supply manifold", "id" = 30, "category" = SUPPLY_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Supply pipe cap", "id" = 32, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Straight scrubbers pipe", "id" = 26, "category" = SCRUBBERS_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent scrubbers pipe", "id" = 27, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "Scrubbers T-manifold", "id" = 29, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way scrubbers manifold", "id" = 31, "category" = SCRUBBERS_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Scrubbers pipe cap", "id" = 33, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Universal pipe adapter", "id" = 23, "category" = DEVICES, "orientations" = 2, "icon" = "universal"),
list("pipename" = "Connector", "id" = 4, "category" = DEVICES, "orientations" = 4, "icon" = "connector"),
list("pipename" = "Unary vent", "id" = 7, "category" = DEVICES, "orientations" = 4, "icon" = "uvent"),
list("pipename" = "Scrubber", "id" = 10, "category" = DEVICES, "orientations" = 4, "icon" = "scrubber"),
list("pipename" = "Gas pump", "id" = 9, "category" = DEVICES, "orientations" = 4, "icon" = "pump"),
list("pipename" = "Volume pump", "id" = 16, "category" = DEVICES, "orientations" = 4, "icon" = "volumepump"),
list("pipename" = "Passive gate", "id" = 15, "category" = DEVICES, "orientations" = 4, "icon" = "passivegate"),
list("pipename" = "Gas filter", "id" = 13, "category" = DEVICES, "orientations" = 4, "icon" = "filter"),
list("pipename" = "Gas mixer", "id" = 14, "category" = DEVICES, "orientations" = 4, "icon" = "mixer"),
list("pipename" = "Gas sensor", "id" = 98, "category" = DEVICES, "orientations" = 1, "icon" = "sensor"),
list("pipename" = "Meter", "id" = 99, "category" = DEVICES, "orientations" = 1, "icon" = "meter"),
list("pipename" = "Passive vent", "id" = 37, "category" = DEVICES, "orientations" = 4, "icon" = "passive vent"),
list("pipename" = "Dual-port vent pump", "id" = 36, "category" = DEVICES, "orientations" = 2, "icon" = "dual-port vent"),
list("pipename" = "Air injector", "id" = 34, "category" = DEVICES, "orientations" = 4, "icon" = "injector"),
list("pipename" = "Straight HE pipe", "id" = 2, "category" = HEAT_PIPING, "orientations" = 2, "icon" = "he"),
list("pipename" = "Bent HE pipe", "id" = 3, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "he", "bendy" = 1),
list("pipename" = "Junction", "id" = 6, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "junction"),
list("pipename" = "Heat exchanger", "id" = 17, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "heunary"))
var/list/dpipelist = list(
list("pipename" = "Straight pipe", "id" = 0, "orientations" = 2, "icon" = "conpipe-s"),
list("pipename" = "Bent pipe", "id" = 1, "orientations" = 4, "icon" = "conpipe-c"),
list("pipename" = "Junction", "id" = 2, "orientations" = 4, "icon" = "conpipe-j1"),
list("pipename" = "Y-junction", "id" = 4, "orientations" = 4, "icon" = "conpipe-y"),
list("pipename" = "Trunk", "id" = 5, "orientations" = 4, "icon" = "conpipe-t"),
list("pipename" = "Bin", "id" = 6, "orientations" = 1, "icon" = "condisposal"),
list("pipename" = "Outlet", "id" = 7, "orientations" = 4, "icon" = "outlet"),
list("pipename" = "Chute", "id" = 8, "orientations" = 4, "icon" = "intake"))
var/list/mainmenu = list(
list("category" = "Atmospherics", "mode" = 1, "icon" = "wrench"),
list("category" = "Disposals", "mode" = 2, "icon" = "recycle"),
list("category" = "Rotate", "mode" = 3, "icon" = "rotate-right"),
list("category" = "Flip", "mode" = 4, "icon" = "exchange"),
list("category" = "Recycle", "mode" = 5, "icon" = "trash"))
var/list/pipemenu = list(
list("pipecategory" = "Normal", "pipemode" = 1),
list("pipecategory" = "Supply", "pipemode" = 2),
list("pipecategory" = "Scrubber", "pipemode" = 3),
list("pipecategory" = "Devices", "pipemode" = 4),
list("pipecategory" = "Heat exchange", "pipemode" = 5))
//NanoUI stuff
/obj/item/weapon/rpd/attack_self(mob/user)
ui_interact(user)
/obj/item/weapon/rpd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "rpd.tmpl", "[name]", 400, 650, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/weapon/rpd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
var/data[0]
data["dpipelist"] = dpipelist
data["iconrotation"] = iconrotation
data["mainmenu"] = mainmenu
data["mode"] = mode
data["pipelist"] = pipelist
data["pipemenu"] = pipemenu
data["pipetype"] = pipetype
data["whatdpipe"] = whatdpipe
data["whatpipe"] = whatpipe
return data
/obj/item/weapon/rpd/Topic(href, href_list, nowindow, state)
..()
if(href_list["iconrotation"])
iconrotation = text2num(sanitize(href_list["iconrotation"]))
else if(href_list["whatpipe"])
whatpipe = text2num(sanitize(href_list["whatpipe"]))
else if(href_list["whatdpipe"])
whatdpipe = text2num(sanitize(href_list["whatdpipe"]))
else if(href_list["pipetype"])
pipetype = text2num(sanitize(href_list["pipetype"]))
else if(href_list["mode"])
mode = text2num(sanitize(href_list["mode"]))
else
return
nanomanager.update_uis(src)
//What the RPD actually does
/obj/item/weapon/rpd/afterattack(atom/target, mob/user, proximity)
..()
var/turf/T = get_turf(target)
if(src.loc != user || ismob(target) || istype(target, /obj/structure/window) || !proximity || world.time < lastused + spawndelay)
return
if(mode == ATMOS_MODE && !istype(T, /turf/simulated/shuttle)) //No pipes on shuttles nerds
if(istype(T, /turf/simulated/wall)) //Drilling into walls takes time
playsound(loc, "sound/weapons/circsawhit.ogg", 50, 1)
user.visible_message("<span class = 'notice'>[user] starts drilling a hole in [T]...</span>", "<span class = 'notice'>You start drilling a hole in [T]...</span>", "<span class = 'warning'>You hear a drill.</span>")
if(!do_after(user, walldelay, target = T))
return
user.visible_message("<span class = 'notice'>[user] finishes drilling a hole in [T]!</span>", "<span class = 'notice'>You finish drilling a hole in [T]!</span>", "<span class = 'warning'>You hear clanking.</span>")
var/obj/item/pipe/P
if(whatpipe == GAS_SENSOR)
P = new /obj/item/pipe_gsensor(T)
else if(whatpipe == METER)
P = new /obj/item/pipe_meter(T)
else
P = new(T, pipe_type = whatpipe, dir = user.dir)
if(iconrotation == 0 && P.is_bent_pipe()) //Automatic rotation of dispensed pipes
P.dir = turn(user.dir, 135)
else if(iconrotation == 0 && P.pipe_type in list(CONNECTOR, UNARY_VENT, GAS_SCRUBBER, HE_EXCHANGER, SIMPLE_CAP, SUPPLY_CAP, SCRUBBERS_CAP, INJECTOR, PASSIVE_VENT)) //Some pipes dispense oppositely to what you'd expect, but we don't want to do anything if they selected a direction
P.flip()
else if(iconrotation != 0 && P.is_bent_pipe()) //If they selected a rotation and the pipe is bent
P.dir = turn(iconrotation, -45)
else if(iconrotation != 0)
P.dir = iconrotation
to_chat(user, "<span class = 'notice'>[src] rapidly dispenses [P]!</span>")
Activaterpd(1)
else if(mode == DISPOSALS_MODE && !istype(T, /turf/simulated/shuttle))
if(istype(T, /turf/simulated/wall)) //No disposals pipes on walls
to_chat(user, "<span class = 'warning'>That type of pipe won't fit on [T]!</span>")
return
var/obj/structure/disposalconstruct/P = new(T) //Now we make the pipe
P.dir = iconrotation
P.ptype = whatdpipe
if(iconrotation == 0) //Automatic rotation
P.dir = user.dir
if(iconrotation == 0 && whatdpipe != DISPOSALS_JUNCTION) //Disposals pipes are in the opposite direction to atmos pipes, so we need to flip them. Junctions don't have this quirk though
P.flip()
P.update()
to_chat(user, "<span class = 'notice'>[src] rapidly dispenses [P]!</span>")
Activaterpd(1)
else if(mode == ROTATION_MODE)
for(var/obj/W in T)
Manipulatepipes(W, /obj/item/pipe/verb/rotate, /obj/structure/disposalconstruct/verb/rotate)
else if(mode == FLIP_MODE)
for(var/obj/W in T)
Manipulatepipes(W, /obj/item/pipe/verb/flip, /obj/structure/disposalconstruct/verb/flip)
else if(mode == DELETE_MODE)
var/eaten
for(var/obj/W in T)
if(istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter) || istype(W, /obj/item/pipe_gsensor) || istype(W, /obj/structure/disposalconstruct) && !W.anchored)
QDEL_NULL(W)
eaten = TRUE
if(eaten)
to_chat(user, "<span class='notice'>[src] sucks up the loose pipes on [T].")
Activaterpd()
else
to_chat(user, "<span class='notice'>There were no loose pipes on [T].</span>")
#undef SIMPLE_CAP
#undef SUPPLY_CAP
#undef SCRUBBERS_CAP
#undef HE_EXCHANGER
#undef CONNECTOR
#undef UNARY_VENT
#undef PASSIVE_VENT
#undef GAS_SCRUBBER
#undef INJECTOR
#undef GAS_SENSOR
#undef METER
#undef DISPOSALS_JUNCTION
#undef ATMOS_MODE
#undef DISPOSALS_MODE
#undef ROTATION_MODE
#undef FLIP_MODE
#undef DELETE_MODE
#undef ATMOS_PIPING
#undef SUPPLY_PIPING
#undef SCRUBBERS_PIPING
#undef DEVICES
#undef HEAT_PIPING
+7 -10
View File
@@ -5,7 +5,6 @@
item_state = "scissor"
force = 5
sharp = 1
edge = 1
w_class = WEIGHT_CLASS_SMALL
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("slices", "cuts", "stabs", "jabs")
@@ -39,14 +38,14 @@
for(var/i in facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
if(C.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
if(C.species.flags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(C.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_facial_hair += i
else
if(C.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(C.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_facial.species_allowed)
species_facial_hair += i
@@ -62,14 +61,14 @@
for(var/i in hair_styles_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
if(C.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
if(C.species.flags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(C.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_hair += i
else
if(C.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(C.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_hair.species_allowed)
species_hair += i
@@ -95,7 +94,6 @@
user.visible_message("<span class='notice'>[user] finishes cutting [M]'s hair!</span>")
/obj/item/weapon/scissors/safety //Totally safe, I assure you.
name = "safety scissors"
desc = "The blades of the scissors appear to be made of some sort of ultra-strong metal alloy."
force = 18 //same as e-daggers
var/is_cutting = 0 //to prevent spam clicking this for huge accumulation of losebreath.
@@ -118,10 +116,9 @@
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
user.visible_message("<span class='danger'>[user] abruptly stops cutting [M]'s hair and slices their throat!</span>", "<span class='danger'>You stop cutting [M]'s hair and slice their throat!</span>") //Just a little off the top.
H.AdjustLoseBreath(10) //30 Oxy damage over time
H.apply_damage(18, BRUTE, "head", sharp =1, edge =1, used_weapon = "scissors")
var/turf/location = get_turf(H)
if(istype(location, /turf/simulated))
location.add_blood(H)
H.apply_damage(18, BRUTE, "head", sharp =1, used_weapon = "scissors")
var/turf/location = get_turf(src)
H.add_splatter_floor(location)
H.bloody_hands(H)
H.bloody_body(H)
var/mob/living/carbon/human/U = user
+53 -40
View File
@@ -4,12 +4,11 @@
name = "glass shard"
icon = 'icons/obj/shards.dmi'
icon_state = "large"
sharp = 1
edge = 1
sharp = TRUE
desc = "Could probably be used as ... a throwing weapon?"
w_class = WEIGHT_CLASS_TINY
force = 5.0
throwforce = 10.0
force = 5
throwforce = 10
item_state = "shard-glass"
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
attack_verb = list("stabbed", "slashed", "sliced", "cut")
@@ -21,19 +20,18 @@
return (BRUTELOSS)
/obj/item/weapon/shard/New()
src.icon_state = pick("large", "medium", "small")
switch(src.icon_state)
if("small")
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
if("medium")
src.pixel_x = rand(-8, 8)
src.pixel_y = rand(-8, 8)
if("large")
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
else
..()
icon_state = pick("large", "medium", "small")
switch(icon_state)
if("small")
pixel_x = rand(-12, 12)
pixel_y = rand(-12, 12)
if("medium")
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
if("large")
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/weapon/shard/afterattack(atom/movable/AM, mob/user, proximity)
if(!proximity || !(src in user))
@@ -54,7 +52,7 @@
H.updatehealth()
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/weldingtool))
if(iswelder(I))
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/glass/NG = new (user.loc)
@@ -66,7 +64,8 @@
G.attackby(NG, user)
to_chat(user, "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>")
qdel(src)
..()
else
return ..()
/obj/item/weapon/shard/Crossed(AM as mob|obj)
if(isliving(AM))
@@ -74,7 +73,7 @@
if(M.incorporeal_move || M.flying || M.throwing)//you are incorporal or flying or being thrown ..no shard stepping!
return
to_chat(M, "<span class='danger'>You step on \the [src]!</span>")
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
playsound(loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -90,26 +89,40 @@
H.updatehealth()
..()
// Shrapnel
/obj/item/weapon/shard/plasma
name = "plasma shard"
desc = "A shard of plasma glass. Considerably tougher then normal glass shards. Apparently not tough enough to be a window."
force = 8
throwforce = 15
icon_state = "plasmalarge"
sharp = TRUE
/obj/item/weapon/shard/shrapnel
name = "shrapnel"
icon = 'icons/obj/shards.dmi'
icon_state = "shrapnellarge"
desc = "A bunch of tiny bits of shattered metal."
/obj/item/weapon/shard/plasma/New()
..()
icon_state = pick("plasmalarge", "plasmamedium", "plasmasmall")
switch(icon_state)
if("plasmasmall")
pixel_x = rand(-12, 12)
pixel_y = rand(-12, 12)
if("plasmamedium")
pixel_x = rand(-8, 8)
pixel_y = rand(-8, 8)
if("plasmalarge")
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/item/weapon/shard/shrapnel/New()
src.icon_state = pick("shrapnellarge", "shrapnelmedium", "shrapnelsmall")
switch(src.icon_state)
if("shrapnelsmall")
src.pixel_x = rand(-12, 12)
src.pixel_y = rand(-12, 12)
if("shrapnelmedium")
src.pixel_x = rand(-8, 8)
src.pixel_y = rand(-8, 8)
if("shrapnellarge")
src.pixel_x = rand(-5, 5)
src.pixel_y = rand(-5, 5)
else
return
/obj/item/weapon/shard/plasma/attackby(obj/item/weapon/W, mob/user, params)
if(iswelder(W))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/plasmaglass/NG = new (user.loc)
for(var/obj/item/stack/sheet/plasmaglass/G in user.loc)
if(G == NG)
continue
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user, params)
to_chat(usr, "You add the newly-formed plasma glass to the stack. It now contains [NG.amount] sheets.")
qdel(src)
else
return ..()
+44 -1
View File
@@ -9,8 +9,51 @@
throw_speed = 4
throw_range = 20
discrete = 1
trip_stun = 4
trip_weaken = 2
trip_chance = 100
trip_walksafe = FALSE
trip_verb = TV_SLIP
var/cleanspeed = 50 //slower than mop
/obj/item/weapon/soap/afterattack(atom/target, mob/user, proximity)
if(!proximity) return
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
if(user.client && (target in user.client.screen))
to_chat(user, "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>")
else if(target == user && user.a_intent == INTENT_GRAB && ishuman(target))
var/mob/living/carbon/human/muncher = user
if(muncher && muncher.get_species() == "Drask")
to_chat(user, "You take a bite of the [src.name]. Delicious!")
playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0)
user.nutrition += 2
else if(istype(target,/obj/effect/decal/cleanable))
user.visible_message("<span class='warning'>[user] begins to scrub \the [target.name] out with [src].</span>")
if(do_after(user, src.cleanspeed, target = target) && target)
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
qdel(target)
else
user.visible_message("<span class='warning'>[user] begins to clean \the [target.name] with [src].</span>")
if(do_after(user, src.cleanspeed, target = target))
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.clean_blood()
if(istype(target, /turf/simulated))
var/turf/simulated/T = target
T.dirt = 0
/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_sel &&user.zone_sel.selecting == "mouth" )
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>")
return
..()
/obj/item/weapon/soap/nanotrasen
desc = "A Nanotrasen brand bar of soap. Smells of plasma."
icon_state = "soapnt"
@@ -38,7 +81,7 @@
else if(istype(target,/mob/living/carbon))
for(var/obj/item/carried_item in target.contents)
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
carried_item.add_blood(target)//Oh yes, there will be blood...
carried_item.add_mob_blood(target)//Oh yes, there will be blood...
var/mob/living/carbon/human/H = target
H.bloody_hands(target,0)
H.bloody_body(target)
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/storage/lockbox
name = "lockbox"
desc = "A locked box."
@@ -216,6 +216,14 @@
for(var/i = 0, i < storage_slots - 2, i++)
handle_item_insertion(new /obj/item/stack/spacecash/c1000, 1)
/obj/item/weapon/storage/secure/briefcase/reaper/New()
..()
handle_item_insertion(new /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow, 1)
handle_item_insertion(new /obj/item/weapon/gun/projectile/revolver/mateba, 1)
handle_item_insertion(new /obj/item/ammo_box/a357, 1)
handle_item_insertion(new /obj/item/weapon/grenade/plastic/c4, 1)
// -----------------------------
// Secure Safe
// -----------------------------
@@ -478,7 +478,7 @@
/obj/item/weapon/storage/attack_self(mob/user as mob)
//Clicking on itself will empty it, if it has the verb to do that.
if(user.get_active_hand() == src)
if(user.is_in_active_hand(src))
if(src.verbs.Find(/obj/item/weapon/storage/verb/quick_empty))
src.quick_empty()
return
@@ -568,6 +568,8 @@
for(var/thing in data["content"])
if(islist(thing))
list_to_object(thing, src)
else if(thing == null)
log_runtime(EXCEPTION("Null entry found in storage/deserialize."), src)
else
log_runtime(EXCEPTION("Non-list thing found in storage/deserialize."), src, list("Thing: [thing]"))
..()
@@ -157,6 +157,22 @@
new /obj/item/weapon/grenade/empgrenade(src)
new /obj/item/weapon/implanter/emp/(src)
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons
name = "boxed throwing kit"
can_hold = list(/obj/item/weapon/throwing_star, /obj/item/weapon/restraints/legcuffs/bola/tactical)
max_combined_w_class = 16
max_w_class = WEIGHT_CLASS_NORMAL
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons/New()
..()
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/throwing_star(src)
new /obj/item/weapon/restraints/legcuffs/bola/tactical(src)
new /obj/item/weapon/restraints/legcuffs/bola/tactical(src)
/obj/item/weapon/storage/box/syndie_kit/sarin
name = "Sarin Gas Grenades"
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/weapon/tank/jetpack
name = "Jetpack (Empty)"
desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution."
@@ -109,6 +107,14 @@
..()
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
/obj/item/weapon/tank/jetpack/oxygen/captain
name = "Captain's jetpack"
desc = "A compact, lightweight jetpack containing a high amount of compressed oxygen."
icon_state = "jetpack-captain"
item_state = "jetpack-captain"
volume = 90
w_class = WEIGHT_CLASS_NORMAL
/obj/item/weapon/tank/jetpack/oxygen/harness
name = "jet harness (oxygen)"
desc = "A lightweight tactical harness, used by those who don't want to be weighed down by traditional jetpacks."
@@ -54,7 +54,9 @@
C.update_internals_hud_icon(0)
else
var/can_open_valve = 0
if(C.wear_mask && C.wear_mask.flags & AIRTIGHT)
if(C.get_organ_slot("breathing_tube"))
can_open_valve = 1
else if(C.wear_mask && C.wear_mask.flags & AIRTIGHT)
can_open_valve = 1
else if(ishuman(C))
var/mob/living/carbon/human/H = C
@@ -128,7 +128,7 @@ Frequency:
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
if(!t1 || (user.get_active_hand() != src || user.stat || user.restrained()))
if(!t1 || (!user.is_in_active_hand(src) || user.stat || user.restrained()))
return
if(active_portals >= 3)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
+1 -5
View File
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/* Tools!
* Note: Multitools are /obj/item/device
*
@@ -228,7 +226,6 @@
hitsound = 'sound/items/Wirecutter.ogg'
usesound = 'sound/items/Wirecutter.ogg'
sharp = 1
edge = 1
toolspeed = 1
/obj/item/weapon/wirecutters/New(loc, param_color = null)
@@ -241,8 +238,7 @@
/obj/item/weapon/wirecutters/attack(mob/living/carbon/C, mob/user)
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
qdel(C.handcuffed)
C.handcuffed = null
QDEL_NULL(C.handcuffed)
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob(C)
C.update_handcuffed()
@@ -162,7 +162,6 @@
force = 5
throwforce = 15
sharp = 1
edge = 1
w_class = WEIGHT_CLASS_BULKY
slot_flags = SLOT_BACK
force_unwielded = 5
@@ -209,8 +208,6 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 75
sharp = 1
edge = 1
no_embed = 1 // Like with the single-handed esword, this shouldn't be embedding in people.
/obj/item/weapon/twohanded/dualsaber/New()
blade_color = pick("red", "blue", "green", "purple")
@@ -297,7 +294,6 @@
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
sharp = 1
edge = 1
no_spin_thrown = 1
var/obj/item/weapon/grenade/explosive = null
var/war_cry = "AAAAARGH!!!"
@@ -442,7 +438,6 @@
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
hitsound = "swing_hit"
sharp = 1
edge = 1
actions_types = list(/datum/action/item_action/startchainsaw)
var/on = 0
@@ -499,8 +494,6 @@
origin_tech = "materials=6;syndicate=4"
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
sharp = 1
edge = 1
no_embed = 1
/obj/item/weapon/twohanded/chainsaw/update_icon()
if(wielded)
@@ -539,7 +532,6 @@
icon_state = "mjollnir0"
flags = CONDUCT
slot_flags = SLOT_BACK
no_embed = 1
force = 5
force_unwielded = 5
force_wielded = 20
@@ -604,7 +596,6 @@
icon_state = "mjollnir0"
flags = CONDUCT
slot_flags = SLOT_BACK
no_embed = 1
force = 5
force_unwielded = 5
force_wielded = 25
@@ -652,7 +643,6 @@
icon_state = "knighthammer0"
flags = CONDUCT
slot_flags = SLOT_BACK
no_embed = 1
force = 5
force_unwielded = 5
force_wielded = 30
@@ -718,7 +708,6 @@
force = 5
throwforce = 15
sharp = 1
edge = 1
w_class = WEIGHT_CLASS_HUGE
armour_penetration = 20
slot_flags = SLOT_BACK
+14 -3
View File
@@ -43,7 +43,6 @@
force = 40
throwforce = 10
sharp = 1
edge = 1
w_class = WEIGHT_CLASS_NORMAL
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
@@ -67,7 +66,6 @@
force = 40
throwforce = 10
sharp = 1
edge = 1
w_class = WEIGHT_CLASS_NORMAL
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -83,7 +81,6 @@
/obj/item/weapon/harpoon
name = "harpoon"
sharp = 1
edge = 0
desc = "Tharr she blows!"
icon_state = "harpoon"
item_state = "harpoon"
@@ -130,6 +127,20 @@ obj/item/weapon/wirerod/attackby(obj/item/I, mob/user, params)
qdel(I)
qdel(src)
/obj/item/weapon/throwing_star
name = "throwing star"
desc = "An ancient weapon still used to this day due to it's ease of lodging itself into victim's body parts"
icon_state = "throwingstar"
item_state = "eshield0"
force = 2
throwforce = 20 //This is never used on mobs since this has a 100% embed chance.
throw_speed = 4
embedded_pain_multiplier = 4
w_class = WEIGHT_CLASS_SMALL
embed_chance = 100
embedded_fall_chance = 0 //Hahaha!
sharp = 1
materials = list(MAT_METAL=500, MAT_GLASS=500)
/obj/item/weapon/spear/kidan
icon_state = "kidanspear"
+1 -2
View File
@@ -19,7 +19,7 @@
if(I.force >= max || I.throwforce >= max)//no esword sharpening
to_chat(user, "<span class='notice'>[I] is much too powerful to sharpen further.</span>")
return
if(requires_sharpness && !I.edge)
if(requires_sharpness && !I.sharp)
to_chat(user, "<span class='notice'>You can only sharpen items that are already sharp, such as knives.</span>")
return
if(istype(I, /obj/item/weapon/twohanded))//some twohanded items should still be sharpenable, but handle force differently. therefore i need this stuff
@@ -39,7 +39,6 @@
return
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>")
if(!requires_sharpness)
I.edge = 1
I.sharp = 1
I.force = Clamp(I.force + increment, 0, max)
I.throwforce = Clamp(I.throwforce + increment, 0, max)