Polaris sync

This commit is contained in:
killer653
2017-12-21 04:01:07 -05:00
514 changed files with 13847 additions and 5596 deletions
@@ -429,6 +429,13 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
exonet.send_message(their_address, "text", text)
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
log_pda("[usr] (COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]")
for(var/mob/M in player_list)
if(M.stat == DEAD && M.is_preference_enabled(/datum/client_preference/ghost_ears))
if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
continue
if(exonet.get_atom_from_address(their_address) == M)
continue
M.show_message("Comm IM - [src] -> [exonet.get_atom_from_address(their_address)]: [text]")
if(href_list["disconnect"])
var/name_to_disconnect = href_list["disconnect"]
@@ -988,6 +995,14 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
src << "<span class='notice'>You have sent '[text_message]' to [chosen_communicator].</span>"
exonet_messages.Add("<b>To [chosen_communicator]:</b><br>[text_message]")
log_pda("[usr] (COMM: [src]) sent \"[text_message]\" to [chosen_communicator]")
for(var/mob/M in player_list)
if(M.stat == DEAD && M.is_preference_enabled(/datum/client_preference/ghost_ears))
if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
continue
if(M == src)
continue
M.show_message("Comm IM - [src] -> [chosen_communicator]: [text_message]")
// Verb: show_text_messages()
+18 -6
View File
@@ -35,8 +35,8 @@
qdel_null(paddles)
qdel_null(bcell)
/obj/item/device/defib_kit/loaded //starts with highcap cell
bcell = /obj/item/weapon/cell/high
/obj/item/device/defib_kit/loaded //starts with a cell
bcell = /obj/item/weapon/cell/apc
/obj/item/device/defib_kit/update_icon()
@@ -209,7 +209,7 @@
var/combat = 0 //If it can be used to revive people wearing thick clothing (e.g. spacesuits)
var/cooldowntime = (6 SECONDS) // How long in deciseconds until the defib is ready again after use.
var/chargetime = (2 SECONDS)
var/chargecost = 1000 //units of charge
var/chargecost = 1250 //units of charge per zap //With the default APC level cell, this allows 4 shocks
var/burn_damage_amt = 5
var/use_on_synthetic = 0 //If 1, this is only useful on FBPs, if 0, this is only useful on fleshies
@@ -284,7 +284,12 @@
return "buzzes, \"Resuscitation failed - Excessive neural degeneration. Further attempts futile.\""
H.updatehealth()
if(H.health + H.getOxyLoss() <= config.health_threshold_dead || (HUSK in H.mutations))
if(H.isSynthetic())
if(H.health + H.getOxyLoss() + H.getToxLoss() <= config.health_threshold_dead)
return "buzzes, \"Resuscitation failed - Severe damage detected. Begin manual repair before further attempts futile.\""
else if(H.health + H.getOxyLoss() <= config.health_threshold_dead || (HUSK in H.mutations) || !H.can_defib)
return "buzzes, \"Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile.\""
var/bad_vital_organ = check_vital_organs(H)
@@ -374,7 +379,10 @@
// This proc is used so that we can return out of the revive process while ensuring that busy and update_icon() are handled
/obj/item/weapon/shockpaddles/proc/do_revive(mob/living/carbon/human/H, mob/user)
if(!H.client && !H.teleop)
to_chat(find_dead_player(H.ckey, 1), "Someone is attempting to resuscitate you. Re-enter your body if you want to be revived!")
for(var/mob/observer/dead/ghost in player_list)
if(ghost.mind == H.mind)
to_chat(ghost, "<b><font color = #330033><font size = 3>Someone is attempting to resuscitate you. Re-enter your body if you want to be revived!</b> (Verbs -> Ghost -> Re-enter corpse)</font></font>")
break
//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='warning'>\The [user] begins to place [src] on [H]'s chest.</span>", "<span class='warning'>You begin to place [src] on [H]'s chest...</span>")
@@ -420,6 +428,9 @@
var/adjust_health = barely_in_crit - H.health //need to increase health by this much
H.adjustOxyLoss(-adjust_health)
if(H.isSynthetic())
H.adjustToxLoss(-H.getToxLoss())
make_announcement("pings, \"Resuscitation successful.\"", "notice")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
@@ -642,7 +653,8 @@
name = "jumper cable kit"
desc = "A device that delivers powerful shocks to detachable jumper cables that are capable of reviving full body prosthetics."
icon_state = "jumperunit"
item_state = "jumperunit"
item_state = "defibunit"
// item_state = "jumperunit"
paddles = /obj/item/weapon/shockpaddles/linked/jumper
/obj/item/device/defib_kit/jumper_kit/loaded
+9 -11
View File
@@ -18,7 +18,7 @@
/obj/item/device/flash/proc/clown_check(var/mob/user)
if(user && (CLUMSY in user.mutations) && prob(50))
user << "<span class='warning'>\The [src] slips out of your hand.</span>"
to_chat(user, "<span class='warning'>\The [src] slips out of your hand.</span>")
user.drop_item()
return 0
return 1
@@ -43,7 +43,7 @@
if(prob( round(times_used / 2) )) //if you use it 10 times in a minute it has a 5% chance to break.
broken = 1
if(user)
user << "<span class='warning'>The bulb has burnt out!</span>"
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
icon_state = "flashburnt"
return FALSE
else
@@ -51,7 +51,8 @@
return TRUE
else //can only use it 10 times a minute
if(user)
user << "<span class='warning'>*click* *click*</span>"
to_chat(user, "<span class='warning'><i>click</i></span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 80, 1)
return FALSE
//attack_as_weapon
@@ -62,12 +63,12 @@
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [src.name] to flash [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
user.do_attack_animation(M)
if(!clown_check(user)) return
if(broken)
user << "<span class='warning'>\The [src] is broken.</span>"
to_chat(user, "<span class='warning'>\The [src] is broken.</span>")
return
flash_recharge()
@@ -75,9 +76,6 @@
if(!check_capacitor(user))
return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.do_attack_animation(M)
playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
var/flashfail = 0
@@ -155,7 +153,7 @@
/obj/item/device/flash/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
if(!user || !clown_check(user)) return
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
if(broken)
user.show_message("<span class='warning'>The [src.name] is broken</span>", 2)
@@ -215,12 +213,12 @@
..()
if(!broken)
broken = 1
user << "<span class='warning'>The bulb has burnt out!</span>"
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
icon_state = "flashburnt"
/obj/item/device/flash/synthetic/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
..()
if(!broken)
broken = 1
user << "<span class='warning'>The bulb has burnt out!</span>"
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
icon_state = "flashburnt"
@@ -163,7 +163,7 @@
else
user << "<span class='notice'>\The [M]'s pupils narrow.</span>"
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) //can be used offensively
user.setClickCooldown(user.get_attack_speed(src)) //can be used offensively
M.flash_eyes()
else
return ..()
@@ -290,6 +290,7 @@
name = "desk lamp"
desc = "A desk lamp with an adjustable mount."
icon_state = "lamp"
force = 10
brightness_on = 5
w_class = ITEMSIZE_LARGE
flags = CONDUCT
+211
View File
@@ -0,0 +1,211 @@
var/list/GPS_list = list()
/obj/item/device/gps
name = "global positioning system"
desc = "Triangulates the approximate co-ordinates using a nearby satellite network. Alt+click to toggle power."
icon = 'icons/obj/gps.dmi'
icon_state = "gps-c"
w_class = ITEMSIZE_TINY
slot_flags = SLOT_BELT
origin_tech = list(TECH_MATERIAL = 2, TECH_BLUESPACE = 2, TECH_MAGNET = 1)
matter = list(DEFAULT_WALL_MATERIAL = 500)
var/gps_tag = "COM0"
var/emped = FALSE
var/tracking = FALSE // Will not show other signals or emit its own signal if false.
var/long_range = FALSE // If true, can see farther, depending on get_map_levels().
var/local_mode = FALSE // If true, only GPS signals of the same Z level are shown.
var/hide_signal = FALSE // If true, signal is not visible to other GPS devices.
var/can_hide_signal = FALSE // If it can toggle the above var.
/obj/item/device/gps/initialize()
GPS_list += src
name = "global positioning system ([gps_tag])"
update_icon()
/obj/item/device/gps/Destroy()
GPS_list -= src
return ..()
/obj/item/device/gps/AltClick(mob/user)
toggletracking(user)
/obj/item/device/gps/proc/toggletracking(mob/living/user)
if(!istype(user))
return
if(emped)
to_chat(user, "It's busted!")
return
if(tracking)
to_chat(user, "[src] is no longer tracking, or visible to other GPS devices.")
tracking = FALSE
update_icon()
else
to_chat(user, "[src] is now tracking, and visible to other GPS devices.")
tracking = TRUE
update_icon()
/obj/item/device/gps/emp_act(severity)
if(emped) // Without a fancy callback system, this will have to do.
return
var/severity_modifier = severity ? severity : 4 // In case emp_act gets called without any arguments.
var/duration = 5 MINUTES / severity_modifier
emped = TRUE
update_icon()
spawn(duration)
emped = FALSE
update_icon()
visible_message("\The [src] appears to be functional again.")
/obj/item/device/gps/update_icon()
overlays.Cut()
if(emped)
overlays += image(icon, src, "emp")
else if(tracking)
overlays += image(icon, src, "working")
/obj/item/device/gps/attack_self(mob/user)
display(user)
/obj/item/device/gps/proc/display(mob/user)
if(!tracking)
to_chat(user, "The device is off. Alt-click it to turn it on.")
return
if(emped)
to_chat(user, "It's busted!")
return
var/list/dat = list()
var/turf/curr = get_turf(src)
var/area/my_area = get_area(src)
dat += "Current location: [my_area.name] <b>([curr.x], [curr.y], [curr.z])</b>"
dat += "[hide_signal ? "Tagged" : "Broadcasting"] as '[gps_tag]'. <a href='?src=\ref[src];tag=1'>\[Change Tag\]</a> \
<a href='?src=\ref[src];range=1'>\[Toggle Scan Range\]</a> \
[can_hide_signal ? "<a href='?src=\ref[src];hide=1'>\[Toggle Signal Visibility\]</a>":""]"
var/list/signals = list()
for(var/gps in GPS_list)
var/obj/item/device/gps/G = gps
if(G.emped || !G.tracking || G.hide_signal || G == src) // Their GPS isn't on or functional.
continue
var/turf/T = get_turf(G)
var/z_level_detection = using_map.get_map_levels(curr.z, long_range)
if(local_mode && T.z != curr.z) // Only care about the current z-level.
continue
else if(!(T.z in z_level_detection)) // Too far away.
continue
var/area/their_area = get_area(G)
var/area_name = their_area.name
if(istype(their_area, /area/submap))
area_name = "Unknown Area" // Avoid spoilers.
var/coord = "[T.x], [T.y], [T.z]"
var/degrees = round(Get_Angle(curr, T))
var/direction = uppertext(dir2text(get_dir(curr, T)))
var/distance = get_dist(curr, T)
var/local = curr.z == T.z ? TRUE : FALSE
if(!direction)
direction = "CENTER"
degrees = "N/A"
signals += " [G.gps_tag]: [area_name] ([coord]) [local ? "Dist: [distance]m Dir: [degrees]° ([direction])":""]"
if(signals.len)
dat += "Detected signals;"
for(var/line in signals)
dat += line
else
dat += "No other signals detected."
var/result = dat.Join("<br>")
to_chat(user, result)
/obj/item/device/gps/Topic(var/href, var/list/href_list)
if(..())
return 1
if(href_list["tag"])
var/a = input("Please enter desired tag.", name, gps_tag) as text
a = uppertext(copytext(sanitize(a), 1, 11))
if(in_range(src, usr))
gps_tag = a
name = "global positioning system ([gps_tag])"
to_chat(usr, "You set your GPS's tag to '[gps_tag]'.")
if(href_list["range"])
local_mode = !local_mode
to_chat(usr, "You set the signal receiver to [local_mode ? "'NARROW'" : "'BROAD'"].")
if(href_list["hide"])
if(!can_hide_signal)
return
hide_signal = !hide_signal
to_chat(usr, "You set the device to [hide_signal ? "not " : ""]broadcast a signal while scanning for other signals.")
/obj/item/device/gps/on // Defaults to off to avoid polluting the signal list with a bunch of GPSes without owners. If you need to spawn active ones, use these.
tracking = TRUE
/obj/item/device/gps/science
icon_state = "gps-s"
gps_tag = "SCI0"
/obj/item/device/gps/science/on
tracking = TRUE
/obj/item/device/gps/engineering
icon_state = "gps-e"
gps_tag = "ENG0"
/obj/item/device/gps/engineering/on
tracking = TRUE
/obj/item/device/gps/mining
icon_state = "gps-m"
gps_tag = "MINE0"
desc = "A positioning system helpful for rescuing trapped or injured miners, keeping one on you at all times while mining might just save your life. Alt+click to toggle power."
/obj/item/device/gps/mining/on
tracking = TRUE
/obj/item/device/gps/explorer
icon_state = "gps-ex"
gps_tag = "EX0"
desc = "A positioning system helpful for rescuing trapped or injured explorers, keeping one on you at all times while exploring might just save your life. Alt+click to toggle power."
/obj/item/device/gps/explorer/on
tracking = TRUE
/obj/item/device/gps/syndie
icon_state = "gps-syndie"
gps_tag = "NULL"
desc = "A positioning system that has extended range and can detect other GPS device signals without revealing its own. How that works is best left a mystery. Alt+click to toggle power."
origin_tech = list(TECH_MATERIAL = 2, TECH_BLUESPACE = 3, TECH_MAGNET = 2, TECH_ILLEGAL = 2)
long_range = TRUE
hide_signal = TRUE
can_hide_signal = TRUE
/obj/item/device/gps/robot
icon_state = "gps-b"
gps_tag = "SYNTH0"
desc = "A synthetic internal positioning system. Used as a recovery beacon for damaged synthetic assets, or a collaboration tool for mining or exploration teams. \
Alt+click to toggle power."
tracking = TRUE // On by default.
/obj/item/device/gps/internal // Base type for immobile/internal GPS units.
icon_state = null
gps_tag = "Eerie Signal"
desc = "Report to a coder immediately."
invisibility = INVISIBILITY_MAXIMUM
tracking = TRUE // Meant to point to a location, so it needs to be on.
anchored = TRUE
/obj/item/device/gps/internal/base
gps_tag = "NT_BASE"
desc = "A homing signal from NanoTrasen's outpost."
/obj/item/device/gps/internal/alien_vessel
gps_tag = "Mysterious Signal"
desc = "A signal that seems forboding."
@@ -42,7 +42,7 @@
name = "light replacer"
desc = "A device to automatically replace lights. Refill with working lightbulbs or sheets of glass."
force = 8
icon = 'icons/obj/janitor.dmi'
icon_state = "lightreplacer0"
flags = CONDUCT
@@ -61,32 +61,32 @@
/obj/item/device/lightreplacer/examine(mob/user)
if(..(user, 2))
user << "It has [uses] lights remaining."
to_chat(user, "It has [uses] lights remaining.")
/obj/item/device/lightreplacer/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/material) && W.get_material_name() == "glass")
var/obj/item/stack/G = W
if(uses >= max_uses)
user << "<span class='warning'>[src.name] is full.</span>"
to_chat(user, "<span class='warning'>[src.name] is full.</span>")
return
else if(G.use(1))
AddUses(16) //Autolathe converts 1 sheet into 16 lights.
user << "<span class='notice'>You insert a piece of glass into \the [src.name]. You have [uses] light\s remaining.</span>"
add_uses(16) //Autolathe converts 1 sheet into 16 lights.
to_chat(user, "<span class='notice'>You insert a piece of glass into \the [src.name]. You have [uses] light\s remaining.</span>")
return
else
user << "<span class='warning'>You need one sheet of glass to replace lights.</span>"
to_chat(user, "<span class='warning'>You need one sheet of glass to replace lights.</span>")
if(istype(W, /obj/item/weapon/light))
var/obj/item/weapon/light/L = W
if(L.status == 0) // LIGHT OKAY
if(uses < max_uses)
AddUses(1)
user << "You insert \the [L.name] into \the [src.name]. You have [uses] light\s remaining."
add_uses(1)
to_chat(user, "You insert \the [L.name] into \the [src.name]. You have [uses] light\s remaining.")
user.drop_item()
qdel(L)
return
else
user << "You need a working light."
to_chat(user, "You need a working light.")
return
/obj/item/device/lightreplacer/attack_self(mob/user)
@@ -95,10 +95,10 @@
var/mob/living/silicon/robot/R = user
if(R.emagged)
src.Emag()
usr << "You shortcircuit the [src]."
to_chat(usr, You short circuit the [src].")
return
*/
usr << "It has [uses] lights remaining."
to_chat(usr, "It has [uses] lights remaining.")
/obj/item/device/lightreplacer/update_icon()
icon_state = "lightreplacer[emagged]"
@@ -107,17 +107,17 @@
/obj/item/device/lightreplacer/proc/Use(var/mob/user)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
AddUses(-1)
add_uses(-1)
return 1
// Negative numbers will subtract
/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1)
/obj/item/device/lightreplacer/proc/add_uses(var/amount = 1)
uses = min(max(uses + amount, 0), max_uses)
/obj/item/device/lightreplacer/proc/Charge(var/mob/user, var/amount = 1)
charge += amount
if(charge > 6)
AddUses(1)
add_uses(1)
charge = 0
/obj/item/device/lightreplacer/proc/ReplaceLight(var/obj/machinery/light/target, var/mob/living/U)
+99 -23
View File
@@ -23,6 +23,13 @@ REAGENT SCANNER
matter = list(DEFAULT_WALL_MATERIAL = 200)
origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1)
var/mode = 1;
var/advscan = 0
var/showadvscan = 1
/obj/item/device/healthanalyzer/New()
if(advscan >= 1)
verbs += /obj/item/device/healthanalyzer/proc/toggle_adv
..()
/obj/item/device/healthanalyzer/do_surgery(mob/living/M, mob/living/user)
if(user.a_intent != I_HELP) //in case it is ever used as a surgery tool
@@ -39,7 +46,7 @@ REAGENT SCANNER
for(var/mob/O in viewers(M, null))
O.show_message("<span class='warning'>\The [user] has analyzed the floor's vitals!</span>", 1)
user.show_message("<span class='notice'>Analyzing Results for The floor:</span>", 1)
user.show_message("Overall Status: Healthy</span>", 1)
user.show_message("<span class='notice'>Overall Status: Healthy</span>", 1)
user.show_message("<span class='notice'> Damage Specifics: 0-0-0-0</span>", 1)
user.show_message("<span class='notice'>Key: Suffocation/Toxin/Burns/Brute</span>", 1)
user.show_message("<span class='notice'>Body Temperature: ???</span>", 1)
@@ -100,39 +107,72 @@ REAGENT SCANNER
OX = fake_oxy > 50 ? "<span class='warning'>Severe oxygen deprivation detected</span>" : "Subject bloodstream oxygen level normal"
user.show_message("[OX] | [TX] | [BU] | [BR]")
if(M.radiation)
user.show_message("<span class='warning'>Radiation detected.</span>")
if(advscan >= 2 && showadvscan == 1)
if(M.radiation >= 75)
user.show_message("<span class='warning'>Critical levels of radiation detected. Immediate treatment advised.</span>")
else if(M.radiation >= 50)
user.show_message("<span class='warning'>Severe levels of radiation detected.</span>")
else if(M.radiation >= 25)
user.show_message("<span class='warning'>Moderate levels of radiation detected.</span>")
else if(M.radiation >= 1)
user.show_message("<span_class='warning'>Low levels of radiation detected.</span>")
else
user.show_message("<span class='warning'>Radiation detected.</span>")
if(istype(M, /mob/living/carbon))
var/mob/living/carbon/C = M
if(C.reagents.total_volume)
var/unknown = 0
var/reagentdata[0]
var/unknownreagents[0]
for(var/A in C.reagents.reagent_list)
var/datum/reagent/R = A
if(R.scannable)
reagentdata["[R.id]"] = "<span class='notice'> [round(C.reagents.get_reagent_amount(R.id), 1)]u [R.name]</span>"
else
unknown++
unknownreagents["[R.id]"] = "<span class='notice'> [round(C.reagents.get_reagent_amount(R.id), 1)]u [R.name]</span>"
if(reagentdata.len)
user.show_message("<span class='notice'>Beneficial reagents detected in subject's blood:</span>")
for(var/d in reagentdata)
user.show_message(reagentdata[d])
if(unknown)
user.show_message("<span class='warning'>Warning: Unknown substance[(unknown>1)?"s":""] detected in subject's blood.</span>")
if(advscan >= 3 && showadvscan == 1)
user.show_message("<span class='warning'>Warning: Non-medical reagent[(unknown>1)?"s":""] detected in subject's blood:</span>")
for(var/d in unknownreagents)
user.show_message(unknownreagents[d])
else
user.show_message("<span class='warning'>Warning: Unknown substance[(unknown>1)?"s":""] detected in subject's blood.</span>")
if(C.ingested && C.ingested.total_volume)
var/unknown = 0
for(var/datum/reagent/R in C.ingested.reagent_list)
if(R.scannable)
user << "<span class='notice'>[R.name] found in subject's stomach.</span>"
var/stomachreagentdata[0]
var/stomachunknownreagents[0]
for(var/B in C.ingested.reagent_list)
var/datum/reagent/T = B
if(T.scannable)
stomachreagentdata["[T.id]"] = "<span class='notice'> [round(C.ingested.get_reagent_amount(T.id), 1)]u [T.name]</span>"
if (advscan == 0 || showadvscan == 0)
user.show_message("<span class='notice'>[T.name] found in subject's stomach.</span>")
else
++unknown
stomachunknownreagents["[T.id]"] = "<span class='notice'> [round(C.ingested.get_reagent_amount(T.id), 1)]u [T.name]</span>"
if(advscan >= 1 && showadvscan == 1)
user.show_message("<span class='notice'>Beneficial reagents detected in subject's stomach:</span>")
for(var/d in stomachreagentdata)
user.show_message(stomachreagentdata[d])
if(unknown)
user << "<span class='warning'>Non-medical reagent[(unknown > 1)?"s":""] found in subject's stomach.</span>"
if(advscan >= 3 && showadvscan == 1)
user.show_message("<span class='warning'>Warning: Non-medical reagent[(unknown > 1)?"s":""] found in subject's stomach:</span>")
for(var/d in stomachunknownreagents)
user.show_message(stomachunknownreagents[d])
else
user.show_message("<span class='warning'>Unknown substance[(unknown > 1)?"s":""] found in subject's stomach.</span>")
if(C.virus2.len)
for (var/ID in C.virus2)
if (ID in virusDB)
var/datum/data/record/V = virusDB[ID]
user.show_message("<span class='warning'>Warning: Pathogen [V.fields["name"]] detected in subject's blood. Known antigen : [V.fields["antigen"]]</span>")
// user.show_message(text("<span class='warning'>Warning: Unknown pathogen detected in subject's blood.</span>"))
else
user.show_message("<span class='warning'>Warning: Unknown pathogen detected in subject's blood.</span>")
if (M.getCloneLoss())
user.show_message("<span class='warning'>Subject appears to have been imperfectly cloned.</span>")
// if (M.reagents && M.reagents.get_reagent_amount("inaprovaline"))
@@ -145,6 +185,8 @@ REAGENT SCANNER
user.show_message("<span class='warning'>Severe brain damage detected. Subject likely to have a traumatic brain injury.</span>")
else if (M.getBrainLoss() >= 10)
user.show_message("<span class='warning'>Significant brain damage detected. Subject may have had a concussion.</span>")
else if (M.getBrainLoss() >= 1 && advscan >= 2 && showadvscan == 1)
user.show_message("<span class='warning'>Minor brain damage detected.</span>")
if(ishuman(M))
var/mob/living/carbon/human/H = M
for(var/name_i in H.internal_organs_by_name)
@@ -166,21 +208,28 @@ REAGENT SCANNER
var/limb = e.name
if(e.status & ORGAN_BROKEN)
if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!e.splinted))
user << "<span class='warning'>Unsecured fracture in subject [limb]. Splinting recommended for transport.</span>"
to_chat(user, "<span class='warning'>Unsecured fracture in subject [limb]. Splinting recommended for transport.</span>")
if(e.has_infected_wound())
user << "<span class='warning'>Infected wound detected in subject [limb]. Disinfection recommended.</span>"
to_chat(user, "<span class='warning'>Infected wound detected in subject [limb]. Disinfection recommended.</span>")
for(var/name in H.organs_by_name)
var/obj/item/organ/external/e = H.organs_by_name[name]
if(e && e.status & ORGAN_BROKEN)
user.show_message(text("<span class='warning'>Bone fractures detected. Advanced scanner required for location.</span>"), 1)
break
if(advscan >= 1 && showadvscan == 1)
user.show_message(text("<span class='warning'>Bone fractures detected in subject [e.name].</span>"), 1)
else
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.organs)
if(!e)
continue
for(var/datum/wound/W in e.wounds) if(W.internal)
user.show_message(text("<span class='warning'>Internal bleeding detected. Advanced scanner required for location.</span>"), 1)
break
if(advscan >= 1 && showadvscan == 1)
user.show_message(text("<span class='warning'>Internal bleeding detected in subject [e.name].</span>"), 1)
else
user.show_message(text("<span class='warning'>Internal bleeding detected. Advanced scanner required for location.</span>"), 1)
break
break
if(M:vessel)
var/blood_volume = H.vessel.get_reagent_amount("blood")
@@ -202,10 +251,37 @@ REAGENT SCANNER
mode = !mode
switch (mode)
if(1)
usr << "The scanner now shows specific limb damage."
to_chat(usr, "The scanner now shows specific limb damage.")
if(0)
usr << "The scanner no longer shows limb damage."
to_chat(usr, "The scanner no longer shows limb damage.")
/obj/item/device/healthanalyzer/proc/toggle_adv()
set name = "Toggle Advanced Scan"
set category = "Object"
showadvscan = !showadvscan
switch (showadvscan)
if(1)
to_chat(usr, "The scanner will now perform an advanced analysis.")
if(0)
to_chat(usr, "The scanner will now perform a basic analysis.")
/obj/item/device/healthanalyzer/improved //reports bone fractures, IB, quantity of beneficial reagents in stomach; also regular health analyzer stuff
name = "advanced health analyzer"
desc = "A miracle of medical technology, this handheld scanner can produce an accurate and specific report of a patient's biosigns."
advscan = 1
origin_tech = list(TECH_MAGNET = 5, TECH_BIO = 6)
icon_state = "advhealth"
/obj/item/device/healthanalyzer/advanced //reports all of the above, as well as radiation severity and minor brain damage
name = "advanced health analyzer"
advscan = 2
icon_state = "advhealth"
/obj/item/device/healthanalyzer/enhanced //reports all of the above, as well as name and quantity of nonmed reagents in stomach
name = "phasic health analyzer"
advscan = 3
icon_state = "advhealth"
/obj/item/device/analyzer
name = "analyzer"
@@ -235,7 +311,7 @@ REAGENT SCANNER
if (user.stat)
return
if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
usr << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
analyze_gases(src, user)
@@ -274,14 +350,14 @@ REAGENT SCANNER
if (user.stat)
return
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(reagents.total_volume)
var/list/blood_traces = list()
for(var/datum/reagent/R in reagents.reagent_list)
if(R.id != "blood")
reagents.clear_reagents()
user << "<span class='warning'>The sample was contaminated! Please insert another sample</span>"
to_chat(user, "<span class='warning'>The sample was contaminated! Please insert another sample</span>")
return
else
blood_traces = params2list(R.data["trace_chem"])
@@ -292,7 +368,7 @@ REAGENT SCANNER
dat += "[R] ([blood_traces[R]] units) "
else
dat += "[R] "
user << "[dat]"
to_chat(user, "[dat]")
reagents.clear_reagents()
return
@@ -325,7 +401,7 @@ REAGENT SCANNER
if (user.stat)
return
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(!istype(O))
return
@@ -335,9 +411,9 @@ REAGENT SCANNER
if(O.reagents.reagent_list.len > 0)
var/one_percent = O.reagents.total_volume / 100
for (var/datum/reagent/R in O.reagents.reagent_list)
dat += "\n \t <span class='notice'>[R][details ? ": [R.volume / one_percent]%" : ""]"
dat += "\n \t <span class='notice'>[R][details ? ": [R.volume / one_percent]%" : ""]</span>"
if(dat)
user << "<span class='notice'>Chemicals found: [dat]</span>"
to_chat(user, "<span class='notice'>Chemicals found: [dat]</span>")
else
user << "<span class='notice'>No active chemical agents found in [O].</span>"
else
+183 -72
View File
@@ -1,115 +1,196 @@
/obj/item/device/spy_bug
name = "bug"
desc = "" // Nothing to see here
/obj/item/device/camerabug
name = "mobile camera pod"
desc = "A camera pod used by tactical operators. Must be linked to a camera scanner unit."
icon = 'icons/obj/grenade.dmi'
icon_state = "camgrenade"
item_state = "empgrenade"
flags = CONDUCT
w_class = ITEMSIZE_SMALL
force = 0
throwforce = 5.0
throw_range = 15
throw_speed = 3
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
var/obj/item/device/bug_monitor/linkedmonitor
var/brokentype = /obj/item/brokenbug
// var/obj/item/device/radio/bug/radio
var/obj/machinery/camera/bug/camera
/obj/item/device/camerabug/New()
..()
// radio = new(src)
camera = new(src)
/obj/item/device/camerabug/attack_self(mob/user)
if(user.a_intent == I_HURT)
to_chat(user, "<span class='notice'>You crush the [src] under your foot, breaking it.</span>")
visible_message("[user.name] crushes the [src] under their foot, breaking it!</span>")
new brokentype(get_turf(src))
spawn(0)
qdel(src)
/* else
user.set_machine(radio)
radio.interact(user)
*/
/obj/item/device/camerabug/verb/reset()
set name = "Reset camera bug"
set category = "Object"
if(linkedmonitor)
linkedmonitor.unpair(src)
linkedmonitor = null
qdel(camera)
camera = new(src)
to_chat(usr, "<span class='notice'>You turn the [src] off and on again, delinking it from any monitors.")
/obj/item/brokenbug
name = "broken mobile camera pod"
desc = "A camera pod formerly used by tactical operators. The lens is smashed, and the circuits are damaged beyond repair."
icon = 'icons/obj/grenade.dmi'
icon_state = "camgrenadebroken"
item_state = "empgrenade"
flags = CONDUCT
force = 5.0
w_class = ITEMSIZE_SMALL
throwforce = 5.0
throw_range = 15
throw_speed = 3
origin_tech = list(TECH_ENGINEERING = 1)
/obj/item/brokenbug/spy
name = "broken bug"
desc = "" //Even when it's broken it's inconspicuous
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0"
item_state = "nothing"
layer = TURF_LAYER+0.2
flags = CONDUCT
force = 5.0
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
origin_tech = list(TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) //crush it and you lose the data
flags = CONDUCT
force = 0
throwforce = 5.0
throw_range = 15
throw_speed = 3
/obj/item/device/camerabug/spy
name = "bug"
desc = "" //Nothing to see here
icon = 'icons/obj/weapons.dmi'
icon_state = "eshield0"
item_state = "nothing"
layer = TURF_LAYER+0.2
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/camera
/obj/item/device/spy_bug/New()
..()
radio = new(src)
camera = new(src)
/obj/item/device/spy_bug/examine(mob/user)
/obj/item/device/camerabug/examine(mob/user)
. = ..(user, 0)
if(.)
user << "It's a tiny camera, microphone, and transmission device in a happy union."
user << "Needs to be both configured and brought in contact with monitor device to be fully functional."
to_chat(user, "It has a tiny camera inside. Needs to be both configured and brought in contact with monitor device to be fully functional.")
/obj/item/device/spy_bug/attack_self(mob/user)
radio.attack_self(user)
/obj/item/device/spy_bug/attackby(obj/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/spy_monitor))
var/obj/item/device/spy_monitor/SM = W
SM.pair(src, user)
/obj/item/device/camerabug/attackby(obj/item/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/bug_monitor))
var/obj/item/device/bug_monitor/SM = W
if(!linkedmonitor)
to_chat(user, "<span class='notice'>\The [src] has been paired with \the [SM].</span>")
SM.pair(src)
linkedmonitor = SM
else if (linkedmonitor == SM)
to_chat(user, "<span class='notice'>\The [src] has been unpaired from \the [SM].</span>")
linkedmonitor.unpair(src)
linkedmonitor = null
else
to_chat(user, "Error: The device is linked to another monitor.")
else
if(W.force >= 5)
visible_message("\The [src] lens shatters!")
new brokentype(get_turf(src))
if(linkedmonitor)
linkedmonitor.unpair(src)
linkedmonitor = null
spawn(0)
qdel(src)
..()
/obj/item/device/spy_bug/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
/obj/item/device/camerabug/bullet_act()
visible_message("The [src] lens shatters!")
new brokentype(get_turf(src))
if(linkedmonitor)
linkedmonitor.unpair(src)
linkedmonitor = null
spawn(0)
qdel(src)
/obj/item/device/camerabug/Destroy()
if(linkedmonitor)
linkedmonitor.unpair(src)
linkedmonitor = null
..()
/*
/obj/item/device/camerabug/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
radio.hear_talk(M, msg, speaking)
/obj/item/device/spy_monitor
name = "\improper PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
icon = 'icons/obj/pda.dmi'
icon_state = "pda"
*/
/obj/item/device/bug_monitor
name = "mobile camera pod monitor"
desc = "A portable camera console designed to work with mobile camera pods."
icon = 'icons/obj/device.dmi'
icon_state = "forensic0"
item_state = "electronic"
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
var/operating = 0
var/obj/item/device/radio/spy/radio
var/obj/machinery/camera/spy/selected_camera
var/list/obj/machinery/camera/spy/cameras = new()
/obj/item/device/spy_monitor/New()
// var/obj/item/device/radio/bug/radio
var/obj/machinery/camera/bug/selected_camera
var/list/obj/machinery/camera/bug/cameras = new()
/*
/obj/item/device/bug_monitor/New()
radio = new(src)
/obj/item/device/spy_monitor/examine(mob/user)
. = ..(user, 1)
if(.)
user << "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made."
/obj/item/device/spy_monitor/attack_self(mob/user)
*/
/obj/item/device/bug_monitor/attack_self(mob/user)
if(operating)
return
radio.attack_self(user)
// radio.attack_self(user)
view_cameras(user)
/obj/item/device/spy_monitor/attackby(obj/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/spy_bug))
pair(W, user)
/obj/item/device/bug_monitor/attackby(obj/item/W as obj, mob/living/user as mob)
if(istype(W, /obj/item/device/camerabug))
W.attackby(src, user)
else
return ..()
/obj/item/device/spy_monitor/proc/pair(var/obj/item/device/spy_bug/SB, var/mob/living/user)
/obj/item/device/bug_monitor/proc/unpair(var/obj/item/device/camerabug/SB)
if(SB.camera in cameras)
user << "<span class='notice'>\The [SB] has been unpaired from \the [src].</span>"
cameras -= SB.camera
else
user << "<span class='notice'>\The [SB] has been paired with \the [src].</span>"
cameras += SB.camera
/obj/item/device/spy_monitor/proc/view_cameras(mob/user)
/obj/item/device/bug_monitor/proc/pair(var/obj/item/device/camerabug/SB)
cameras += SB.camera
/obj/item/device/bug_monitor/proc/view_cameras(mob/user)
if(!can_use_cam(user))
return
selected_camera = cameras[1]
user.reset_view(selected_camera)
view_camera(user)
operating = 1
while(selected_camera && Adjacent(user))
selected_camera = input("Select camera bug to view.") as null|anything in cameras
selected_camera = input("Select camera to view.") as null|anything in cameras
selected_camera = null
operating = 0
/obj/item/device/spy_monitor/proc/view_camera(mob/user)
/obj/item/device/bug_monitor/proc/view_camera(mob/user)
spawn(0)
while(selected_camera && Adjacent(user))
var/turf/T = get_turf(selected_camera)
if(!T || !is_on_same_plane_or_station(T.z, user.z) || !selected_camera.can_use())
user.unset_machine()
user.reset_view(null)
user << "<span class='notice'>[selected_camera] unavailable.</span>"
to_chat(user, "<span class='notice'>Link to [selected_camera] has been lost.</span>")
src.unpair(selected_camera.loc)
sleep(90)
else
user.set_machine(selected_camera)
@@ -118,37 +199,67 @@
user.unset_machine()
user.reset_view(null)
/obj/item/device/spy_monitor/proc/can_use_cam(mob/user)
/obj/item/device/bug_monitor/proc/can_use_cam(mob/user)
if(operating)
return
if(!cameras.len)
user << "<span class='warning'>No paired cameras detected!</span>"
user << "<span class='warning'>Bring a bug in contact with this device to pair the camera.</span>"
to_chat(user, "<span class='warning'>No paired cameras detected!</span>")
to_chat(user, "<span class='warning'>Bring a camera in contact with this device to pair the camera.</span>")
return
return 1
/obj/item/device/spy_monitor/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
/*
/obj/item/device/bug_monitor/hear_talk(mob/M, var/msg, verb, datum/language/speaking)
return radio.hear_talk(M, msg, speaking)
*/
/obj/item/device/bug_monitor/spy
name = "\improper PDA"
desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by a preprogrammed ROM cartridge."
icon = 'icons/obj/pda.dmi'
icon_state = "pda"
item_state = "electronic"
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3)
/obj/item/device/bug_monitor/spy/examine(mob/user)
. = ..(user, 1)
if(.)
to_chat(user, "The time '12:00' is blinking in the corner of the screen and \the [src] looks very cheaply made.")
/obj/machinery/camera/spy
// These cheap toys are accessible from the mercenary camera console as well
/obj/machinery/camera/bug/check_eye(var/mob/user as mob)
return 0
/obj/machinery/camera/bug
network = list(NETWORK_SECURITY)
/obj/machinery/camera/bug/New()
..()
name = "Camera #[rand(1000,9999)]"
c_tag = name
/obj/machinery/camera/bug/spy
// These cheap toys are accessible from the mercenary camera console as well - only the antag ones though!
network = list(NETWORK_MERCENARY)
/obj/machinery/camera/spy/New()
/obj/machinery/camera/bug/spy/New()
..()
name = "DV-136ZB #[rand(1000,9999)]"
c_tag = name
/obj/machinery/camera/spy/check_eye(var/mob/user as mob)
return 0
/* //These were originally supposed to have radios in them. Doesn't work.
/obj/item/device/radio/bug
listening = 0 //turn it on first
frequency = 1359 //sec comms
broadcasting = 0
canhear_range = 1
name = "camera bug device"
icon_state = "syn_cypherkey"
/obj/item/device/radio/spy
/obj/item/device/radio/bug/spy
listening = 0
frequency = 1473
broadcasting = 0
canhear_range = 1
name = "spy device"
icon_state = "syn_cypherkey"
*/
@@ -160,6 +160,29 @@
to_chat(usr, "There's no mounting point for the module!")
return 0
/obj/item/borg/upgrade/advhealth
name = "advanced health analyzer module"
desc = "A carbon dioxide jetpack suitable for low-gravity operations."
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
require_module = 1
/obj/item/borg/upgrade/advhealth/action(var/mob/living/silicon/robot/R)
if(..()) return 0
var/obj/item/device/healthanalyzer/advanced/T = locate() in R.module
if(!T)
T = locate() in R.module.contents
if(!T)
T = locate() in R.module.modules
if(!T)
R.module.modules += new/obj/item/device/healthanalyzer/advanced
return 1
if(T)
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 0
/obj/item/borg/upgrade/syndicate/
name = "scrambled equipment module"
desc = "Unlocks new and often deadly module specific items of a robot"
+2 -2
View File
@@ -164,7 +164,7 @@
singular_name = "advanced trauma kit"
desc = "An advanced trauma kit for severe injuries."
icon_state = "traumakit"
heal_brute = 5
heal_brute = 3
origin_tech = list(TECH_BIO = 1)
/obj/item/stack/medical/advanced/bruise_pack/attack(mob/living/carbon/M as mob, mob/user as mob)
@@ -225,7 +225,7 @@
singular_name = "advanced burn kit"
desc = "An advanced treatment kit for severe burns."
icon_state = "burnkit"
heal_burn = 5
heal_burn = 3
origin_tech = list(TECH_BIO = 1)
+1 -1
View File
@@ -34,7 +34,7 @@
if(!S.get_damage())
user << "<span class='notice'>Nothing to fix here.</span>"
else if(can_use(1))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
if(S.open >= 2)
if(do_after(user,5 * toolspeed))
S.heal_damage(20, 20, robo_repair = 1)
+3 -3
View File
@@ -771,13 +771,13 @@
user.visible_message("<span class='notice'><b>\The [user]</b> pokes [src].</span>","<span class='notice'>You poke [src].</span>")
last_message = world.time
obj/item/toy/plushie/verb/rename_plushie()
/obj/item/toy/plushie/verb/rename_plushie()
set name = "Name Plushie"
set category = "Object"
set desc = "Give your plushie a cute name!"
w_class = ITEMSIZE_TINY
var/mob/M = usr
if(!M.mind) return 0
if(!M.mind)
return 0
var/input = sanitizeSafe(input("What do you want to name the plushie?", ,""), MAX_NAME_LEN)
+26 -30
View File
@@ -25,51 +25,51 @@ AI MODULES
if (istype(AM, /obj/machinery/computer/aiupload))
var/obj/machinery/computer/aiupload/comp = AM
if(comp.stat & NOPOWER)
usr << "The upload computer has no power!"
to_chat(usr, "The upload computer has no power!")
return
if(comp.stat & BROKEN)
usr << "The upload computer is broken!"
to_chat(usr, "The upload computer is broken!")
return
if (!comp.current)
usr << "You haven't selected an AI to transmit laws to!"
to_chat(usr, "You haven't selected an AI to transmit laws to!")
return
if (comp.current.stat == 2 || comp.current.control_disabled == 1)
usr << "Upload failed. No signal is being detected from the AI."
to_chat(usr, "Upload failed. No signal is being detected from the AI.")
else if (comp.current.see_in_dark == 0)
usr << "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power."
to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.")
else
src.transmitInstructions(comp.current, usr)
comp.current << "These are your laws now:"
to_chat(comp.current, "These are your laws now:")
comp.current.show_laws()
for(var/mob/living/silicon/robot/R in mob_list)
if(R.lawupdate && (R.connected_ai == comp.current))
R << "These are your laws now:"
to_chat(R, "These are your laws now:")
R.show_laws()
usr << "Upload complete. The AI's laws have been modified."
to_chat(usr, "Upload complete. The AI's laws have been modified.")
else if (istype(AM, /obj/machinery/computer/borgupload))
var/obj/machinery/computer/borgupload/comp = AM
if(comp.stat & NOPOWER)
usr << "The upload computer has no power!"
to_chat(usr, "The upload computer has no power!")
return
if(comp.stat & BROKEN)
usr << "The upload computer is broken!"
to_chat(usr, "The upload computer is broken!")
return
if (!comp.current)
usr << "You haven't selected a robot to transmit laws to!"
to_chat(usr, "You haven't selected a robot to transmit laws to!")
return
if (comp.current.stat == 2 || comp.current.emagged)
usr << "Upload failed. No signal is being detected from the robot."
to_chat(usr, "Upload failed. No signal is being detected from the robot.")
else if (comp.current.connected_ai)
usr << "Upload failed. The robot is slaved to an AI."
to_chat(usr, "Upload failed. The robot is slaved to an AI.")
else
src.transmitInstructions(comp.current, usr)
comp.current << "These are your laws now:"
to_chat(comp.current, "These are your laws now:")
comp.current.show_laws()
usr << "Upload complete. The robot's laws have been modified."
to_chat(usr, "Upload complete. The robot's laws have been modified.")
else if(istype(AM, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM
@@ -104,7 +104,7 @@ AI MODULES
laws.sync(target, 0)
addAdditionalLaws(target, sender)
target << "\The [sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: "
to_chat(target, "\The [sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: ")
target.show_laws()
/obj/item/weapon/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
@@ -133,7 +133,7 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!targetName)
usr << "No name detected on module, please enter one."
to_chat(usr, "No name detected on module, please enter one.")
return 0
..()
@@ -159,18 +159,14 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!targetName)
usr << "No name detected on module, please enter one."
to_chat(usr, "No name detected on module, please enter one.")
return 0
return ..()
/obj/item/weapon/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Only [targetName] is an crew member."
if (!target.is_malf_or_traitor()) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
target << law
target.set_zeroth_law(law)
lawchanges.Add("The law specified [targetName]")
else
lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overriden.")
to_chat(target, law)
target.add_supplied_law(16, law)
/******************** ProtectStation ********************/
@@ -255,7 +251,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!newFreeFormLaw)
usr << "No law detected on module, please create one."
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
@@ -275,7 +271,7 @@ AI MODULES
target.laws.clear_supplied_laws()
target.laws.clear_ion_laws()
target << "[sender.real_name] attempted to reset your laws using a reset module."
to_chat(target, "[sender.real_name] attempted to reset your laws using a reset module.")
target.show_laws()
/******************** Purge ********************/
@@ -294,7 +290,7 @@ AI MODULES
target.laws.clear_ion_laws()
target.laws.clear_inherent_laws()
target << "[sender.real_name] attempted to wipe your laws using a purge module."
to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.")
target.show_laws()
/******************** Asimov ********************/
@@ -366,7 +362,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!newFreeFormLaw)
usr << "No law detected on module, please create one."
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
@@ -388,14 +384,14 @@ AI MODULES
log_law_changes(target, sender)
lawchanges.Add("The law is '[newFreeFormLaw]'")
target << "<span class='danger'>BZZZZT</span>"
to_chat(target, "<span class='danger'>BZZZZT</span>")
var/law = "[newFreeFormLaw]"
target.add_ion_law(law)
target.show_laws()
/obj/item/weapon/aiModule/syndicate/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!newFreeFormLaw)
usr << "No law detected on module, please create one."
to_chat(usr, "No law detected on module, please create one.")
return 0
..()
@@ -37,7 +37,7 @@
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/request
name = T_BOARD("reques console")
name = T_BOARD("request console")
build_path = /obj/machinery/requests_console
board_type = new /datum/frame/frame_types/supply_request_console
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
@@ -230,4 +230,4 @@
/obj/item/weapon/stock_parts/motor = 2,
/obj/item/weapon/stock_parts/capacitor = 1,
/obj/item/weapon/stock_parts/spring = 1,
/obj/item/stack/cable_coil = 5)
/obj/item/stack/cable_coil = 5)
@@ -33,23 +33,23 @@
//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))
user << "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>"
to_chat(user, "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>")
else if(istype(target,/obj/effect/decal/cleanable/blood))
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
target.clean_blood()
return //Blood is a cleanable decal, therefore needs to be accounted for before all cleanable decals.
else if(istype(target,/obj/effect/decal/cleanable))
user << "<span class='notice'>You scrub \the [target.name] out.</span>"
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
qdel(target)
else if(istype(target,/turf))
user << "<span class='notice'>You scrub \the [target.name] clean.</span>"
to_chat(user, "<span class='notice'>You scrub \the [target.name] clean.</span>")
var/turf/T = target
T.clean(src, user)
else if(istype(target,/obj/structure/sink))
user << "<span class='notice'>You wet \the [src] in the sink.</span>"
to_chat(user, "<span class='notice'>You wet \the [src] in the sink.</span>")
wet()
else
user << "<span class='notice'>You clean \the [target.name].</span>"
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
target.clean_blood()
return
@@ -16,10 +16,11 @@
for(var/mob/living/carbon/M in hear(7, get_turf(src)))
bang(get_turf(src), M)
for(var/obj/effect/blob/B in hear(8,get_turf(src))) //Blob damage here
for(var/obj/structure/blob/B in hear(8,get_turf(src))) //Blob damage here
var/damage = round(30/(get_dist(B,get_turf(src))+1))
B.health -= damage
B.update_icon()
if(B.overmind)
damage *= B.overmind.blob_type.burn_multiplier
B.adjust_integrity(-damage)
new/obj/effect/effect/sparks(src.loc)
new/obj/effect/effect/smoke/illumination(src.loc, 5, range=30, power=30, color="#FFFFFF")
+43 -4
View File
@@ -17,6 +17,7 @@
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
var/cuff_sound = 'sound/weapons/handcuffs.ogg'
var/cuff_type = "handcuffs"
var/use_time = 30
sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/handcuffs.dmi')
/obj/item/weapon/handcuffs/attack(var/mob/living/carbon/C, var/mob/living/user)
@@ -69,7 +70,7 @@
user.visible_message("<span class='danger'>\The [user] is attempting to put [cuff_type] on \the [H]!</span>")
if(!do_after(user,30))
if(!do_after(user,use_time))
return 0
if(!can_place(target, user)) //victim may have resisted out of the grab in the meantime
@@ -80,7 +81,7 @@
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(H)]")
feedback_add_details("handcuffs","H")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
user.do_attack_animation(H)
user.visible_message("<span class='danger'>\The [user] has put [cuff_type] on \the [H]!</span>")
@@ -199,6 +200,44 @@ var/last_chew = 0
elastic = 0
cuff_sound = 'sound/weapons/handcuffs.ogg' //This shold work for now.
/obj/item/weapon/handcuffs/legcuffs/bola
name = "bola"
desc = "Keeps prey in line."
elastic = 1
use_time = 0
breakouttime = 30
cuff_sound = 'sound/weapons/towelwipe.ogg' //Is there anything this sound can't do?
/obj/item/weapon/handcuffs/legcuffs/bola/can_place(var/mob/target, var/mob/user)
if(user) //A ranged legcuff, until proper implementation as items it remains a projectile-only thing.
return 1
/obj/item/weapon/handcuffs/legcuffs/bola/dropped()
visible_message("<span class='notice'>\The [src] falls apart!</span>")
qdel(src)
/obj/item/weapon/handcuffs/legcuffs/bola/place_legcuffs(var/mob/living/carbon/target, var/mob/user)
playsound(src.loc, cuff_sound, 30, 1, -2)
var/mob/living/carbon/human/H = target
if(!istype(H))
src.dropped()
return 0
if(!H.has_organ_for_slot(slot_legcuffed))
H.visible_message("<span class='notice'>\The [src] slams into [H], but slides off!</span>")
src.dropped()
return 0
H.visible_message("<span class='danger'>\The [H] has been snared by \the [src]!</span>")
// Apply cuffs.
var/obj/item/weapon/handcuffs/legcuffs/lcuffs = src
lcuffs.loc = target
target.legcuffed = lcuffs
target.update_inv_legcuffed()
return 1
/obj/item/weapon/handcuffs/legcuffs/attack(var/mob/living/carbon/C, var/mob/living/user)
if(!user.IsAdvancedToolUser())
return
@@ -236,7 +275,7 @@ var/last_chew = 0
user.visible_message("<span class='danger'>\The [user] is attempting to put [cuff_type] on \the [H]!</span>")
if(!do_after(user,30))
if(!do_after(user,use_time))
return 0
if(!can_place(target, user)) //victim may have resisted out of the grab in the meantime
@@ -247,7 +286,7 @@ var/last_chew = 0
msg_admin_attack("[key_name(user)] attempted to legcuff [key_name(H)]")
feedback_add_details("legcuffs","H")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
user.do_attack_animation(H)
user.visible_message("<span class='danger'>\The [user] has put [cuff_type] on \the [H]!</span>")
@@ -351,6 +351,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
R << "You hear a faint *beep*."
if(!src.reagents.total_volume)
R << "You hear a faint click from your chest."
playsound(R, 'sound/weapons/empty.ogg', 10, 1)
spawn(0)
qdel(src)
return
@@ -0,0 +1,112 @@
obj/item/weapon/chainsaw
name = "Chainsaw"
desc = "Vroom vroom."
icon_state = "chainsaw0"
var/on = 0
var/max_fuel = 20
w_class = ITEMSIZE_LARGE
slot_flags = SLOT_BACK
w_class = ITEMSIZE_LARGE
slot_flags = SLOT_BACK
obj/item/weapon/chainsaw/New()
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
R.my_atom = src
R.add_reagent("fuel", max_fuel)
..()
obj/item/weapon/chainsaw/proc/turnOn()
if(on) return
visible_message("You start pulling the string on \the [src].", "[usr] starts pulling the string on the [src].")
if(max_fuel <= 0)
if(do_after(usr, 15))
to_chat(usr, "\The [src] won't start!")
else
to_chat(usr, "You fumble with the string.")
else
if(do_after(usr, 15))
visible_message("You start \the [src] up with a loud grinding!", "[usr] starts \the [src] up with a loud grinding!")
attack_verb = list("shreds", "rips", "tears")
playsound(src, 'sound/weapons/chainsaw_startup.ogg',40,1)
force = 55
edge = 1
sharp = 1
on = 1
update_icon()
else
to_chat(usr, "You fumble with the string.")
obj/item/weapon/chainsaw/proc/turnOff()
if(!on) return
to_chat(usr, "You switch the gas nozzle on the chainsaw, turning it off.")
attack_verb = list("bluntly hit", "beat", "knocked")
playsound(src, 'sound/weapons/chainsaw_turnoff.ogg',40,1)
force = 10
edge = 0
sharp = 0
on = 0
update_icon()
obj/item/weapon/chainsaw/attack_self(mob/user as mob)
if(!on)
turnOn()
else
turnOff()
obj/item/weapon/chainsaw/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
if(on)
playsound(src, 'sound/weapons/chainsaw_attack.ogg',40,1)
if(A && on)
if(istype(A,/obj/structure/window))
var/obj/structure/window/W = A
W.shatter()
else if(istype(A,/obj/structure/grille))
new /obj/structure/grille/broken(A.loc)
new /obj/item/stack/rods(A.loc)
qdel(A)
else if(istype(A,/obj/effect/plant))
var/obj/effect/plant/P = A
qdel(P) //Plant isn't surviving that. At all
if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1)
to_chat(user, "<span class='notice'>You begin filling the tank on the chainsaw.</span>")
if(do_after(usr, 15))
A.reagents.trans_to_obj(src, max_fuel)
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
to_chat(user, "<span class='notice'>Chainsaw succesfully refueled.</span>")
else
to_chat(user, "<span class='notice'>Don't move while you're refilling the chainsaw.</span>")
obj/item/weapon/chainsaw/process()
if(!on) return
if(on)
if(get_fuel() > 0)
reagents.remove_reagent("fuel", 1)
if(get_fuel() <= 0)
to_chat(usr, "\The [src] sputters to a stop!")
on = !on
obj/item/weapon/chainsaw/proc/get_fuel()
reagents.get_reagent_amount("fuel")
obj/item/weapon/chainsaw/examine(mob/user)
if(..(user,0))
if(max_fuel)
to_chat(usr, "<span class = 'notice'>The [src] feels like it contains roughtly [get_fuel()] units of fuel left.</span>")
obj/item/weapon/chainsaw/suicide_act(mob/user)
to_chat(viewers(user), "<span class='danger'>[user] is lying down and pulling the chainsaw into \him, it looks like \he's trying to commit suicide!</span>")
return(BRUTELOSS)
obj/item/weapon/chainsaw/update_icon()
if(on)
icon_state = "chainsaw1"
item_state = "chainsaw1"
else
icon_state = "chainsaw0"
icon_state = "chainsaw0"
@@ -92,3 +92,11 @@
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/material/hatchet/tacknife/survival
name = "survival knife"
desc = "A hunting grade survival knife."
icon = 'icons/obj/kitchen.dmi'
icon_state = "survivalknife"
item_state = "knife"
applies_material_colour = FALSE
@@ -19,6 +19,7 @@
var/unbreakable = 0 //Doesn't lose health
var/fragile = 0 //Shatters when it dies
var/dulled = 0 //Has gone dull
var/can_dull = 1 //Can it go dull?
var/force_divisor = 0.5
var/thrown_force_divisor = 0.5
var/dulled_divisor = 0.5 //Just drops the damage by half
@@ -92,7 +93,7 @@
if(health<=0)
if(fragile)
shatter(consumed)
else if(!dulled)
else if(!dulled && can_dull)
dull()
/obj/item/weapon/material/proc/shatter(var/consumed)
@@ -85,4 +85,37 @@
thrown_force_divisor = 0.25 // as above
dulled_divisor = 0.75 //Still metal on a long pole
w_class = ITEMSIZE_SMALL
attack_verb = list("slashed", "sliced", "cut", "clawed")
attack_verb = list("slashed", "sliced", "cut", "clawed")
/obj/item/weapon/material/snow/snowball
name = "loose packed snowball"
desc = "A fun snowball. Throw it at your friends!"
icon = 'icons/obj/weapons.dmi'
icon_state = "snowball"
default_material = MAT_SNOW
health = 1
fragile = 1
force_divisor = 0.01
thrown_force_divisor = 0.10
w_class = ITEMSIZE_SMALL
attack_verb = list("mushed", "splatted", "splooshed", "splushed") // Words that totally exist.
/obj/item/weapon/material/snow/snowball/attack_self(mob/user as mob)
if(user.a_intent == I_HURT)
visible_message("[user] has smashed the snowball in their hand!", "You smash the snowball in your hand.")
var/atom/S = new /obj/item/stack/material/snow(user.loc)
del(src)
user.put_in_hands(S)
else
visible_message("[user] starts compacting the snowball.", "You start compacting the snowball.")
if(do_after(user, 2000))
var/atom/S = new /obj/item/weapon/material/snow/snowball/reinforced(user.loc)
del(src)
user.put_in_hands(S)
/obj/item/weapon/material/snow/snowball/reinforced
name = "snowball"
desc = "A well-formed and fun snowball. It looks kind of dangerous."
icon_state = "snowball-reinf"
force_divisor = 0.20
thrown_force_divisor = 0.25
@@ -83,6 +83,7 @@
base_icon = "fireaxe"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
description_info = "This weapon can cleave, striking nearby lesser, hostile enemies close to the primary target. It must be held in both hands to do this."
unwielded_force_divisor = 0.25
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
dulled_divisor = 0.75 //Still metal on a stick
@@ -123,6 +124,12 @@
var/obj/effect/plant/P = A
P.die_off()
// This cannot go into afterattack since some mobs delete themselves upon dying.
/obj/item/weapon/material/twohanded/fireaxe/pre_attack(var/mob/living/target, var/mob/living/user)
if(istype(target))
cleave(user, target)
..()
/obj/item/weapon/material/twohanded/fireaxe/scythe
icon_state = "scythe0"
base_icon = "scythe"
@@ -138,6 +145,7 @@
base_icon = "spearglass"
name = "spear"
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
description_info = "This weapon can strike from two tiles away, and over certain objects such as tables, or other people."
force = 10
w_class = ITEMSIZE_LARGE
slot_flags = SLOT_BACK
@@ -151,4 +159,6 @@
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
default_material = "glass"
applies_material_colour = 0
fragile = 1 //It's a haphazard thing of glass, wire, and steel
fragile = 1 //It's a haphazard thing of glass, wire, and steel
reach = 2 // Spears are long.
attackspeed = 14
@@ -58,9 +58,9 @@
/obj/item/weapon/melee/energy/suicide_act(mob/user)
var/tempgender = "[user.gender == MALE ? "he's" : user.gender == FEMALE ? "she's" : "they are"]"
if (active)
viewers(user) << pick("<span class='danger'>\The [user] is slitting \his stomach open with \the [src]! It looks like [tempgender] trying to commit seppuku.</span>", \
"<span class='danger'>\The [user] is falling on \the [src]! It looks like [tempgender] trying to commit suicide.</span>")
if(active)
user.visible_message(pick("<span class='danger'>\The [user] is slitting \his stomach open with \the [src]! It looks like [tempgender] trying to commit seppuku.</span>",\
"<span class='danger'>\The [user] is falling on \the [src]! It looks like [tempgender] trying to commit suicide.</span>"))
return (BRUTELOSS|FIRELOSS)
/*
@@ -90,15 +90,15 @@
/obj/item/weapon/melee/energy/axe/activate(mob/living/user)
..()
icon_state = "axe1"
user << "<span class='notice'>\The [src] is now energised.</span>"
to_chat(user, "<span class='notice'>\The [src] is now energised.</span>")
/obj/item/weapon/melee/energy/axe/deactivate(mob/living/user)
..()
icon_state = initial(icon_state)
user << "<span class='notice'>\The [src] is de-energised. It's just a regular axe now.</span>"
to_chat(user, "<span class='notice'>\The [src] is de-energised. It's just a regular axe now.</span>")
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
viewers(user) << "<span class='warning'>\The [user] swings \the [src] towards \his head! It looks like \he's trying to commit suicide.</span>"
visible_message("<span class='warning'>\The [user] swings \the [src] towards \his head! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/*
@@ -153,7 +153,7 @@
/obj/item/weapon/melee/energy/sword/activate(mob/living/user)
if(!active)
user << "<span class='notice'>\The [src] is now energised.</span>"
to_chat(user, "<span class='notice'>\The [src] is now energised.</span>")
..()
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -162,7 +162,7 @@
/obj/item/weapon/melee/energy/sword/deactivate(mob/living/user)
if(active)
user << "<span class='notice'>\The [src] deactivates!</span>"
to_chat(user, "<span class='notice'>\The [src] deactivates!</span>")
..()
attack_verb = list()
icon_state = initial(icon_state)
@@ -217,7 +217,7 @@
var/obj/O = AM
O.emp_act(3) // A weaker severity is used because this has infinite uses.
playsound(get_turf(O), 'sound/effects/EMPulse.ogg', 100, 1)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN) // A lot of objects don't set click delay.
user.setClickCooldown(user.get_attack_speed(src)) // A lot of objects don't set click delay.
return ..()
/obj/item/weapon/melee/energy/sword/ionic_rapier/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
@@ -294,3 +294,73 @@
host.embedded -= src
host.drop_from_inventory(src)
spawn(1) if(src) qdel(src)
/*
*Energy Spear
*/
/obj/item/weapon/melee/energy/spear
name = "energy spear"
desc = "Concentrated energy forming a sharp tip at the end of a long rod."
icon_state = "espear0"
armor_penetration = 75
sharp = 1
edge = 1
force = 5
throwforce = 10
throw_speed = 7
throw_range = 11
reach = 2
w_class = ITEMSIZE_LARGE
active_force = 25
active_throwforce = 30
active_w_class = ITEMSIZE_HUGE
var/random_color = TRUE
var/tip_color = ""
var/active_state = "espear"
/obj/item/weapon/melee/energy/spear/New()
if(random_color)
tip_color = pick("red","blue","green","purple")
lcolor = tip_color
/obj/item/weapon/melee/energy/spear/green/New()
tip_color = "green"
lcolor = "#008000"
/obj/item/weapon/melee/energy/spear/red/New()
tip_color = "red"
lcolor = "#FF0000"
/obj/item/weapon/melee/energy/spear/blue/New()
tip_color = "blue"
lcolor = "#0000FF"
/obj/item/weapon/melee/energy/spear/purple/New()
tip_color = "purple"
lcolor = "#800080"
/obj/item/weapon/melee/energy/spear/activate(mob/living/user)
if(!active)
to_chat(user, "<span class='notice'>\The [src] is now energised.</span>")
..()
attack_verb = list("jabbed", "stabbed", "impaled")
icon_state = "[active_state]-[tip_color]"
/obj/item/weapon/melee/energy/spear/deactivate(mob/living/user)
if(active)
to_chat(user, "<span class='notice'>\The [src] deactivates!</span>")
..()
attack_verb = list("whacked", "beat", "slapped", "thonked")
icon_state = "espear0"
/obj/item/weapon/melee/energy/spear/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(active && default_parry_check(user, attacker, damage_source) && prob(50))
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
return 1
return 0
+2 -1
View File
@@ -8,11 +8,12 @@
return
//VOREStation Add End
user.visible_message("[user] inserts [src] into a data port on [M].", "You insert [src] into a data port on [M].", "You hear the satisfying click of a wire jack fastening into place.")
playsound(user, 'sound/machines/click.ogg', 50, 1)
user.drop_item()
src.forceMove(M)
src.machine = M
else
user.visible_message("[user] dumbly fumbles to find a place on [M] to plug in [src].", "There aren't any ports on [M] that match the jack belonging to [src].")
user.visible_message("[user] fumbles to find a place on [M] to plug in [src].", "There aren't any ports on [M] that match the jack belonging to [src].")
/obj/item/weapon/pai_cable/attack(obj/machinery/M as obj, mob/user as mob)
src.plugin(M, user)
@@ -1,137 +0,0 @@
/obj/item/weapon/cell
name = "power cell"
desc = "A rechargable electrochemical power cell."
icon = 'icons/obj/power.dmi'
icon_state = "cell"
item_state = "cell"
origin_tech = list(TECH_POWER = 1)
force = 5.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
w_class = ITEMSIZE_NORMAL
var/charge = 0 // note %age conveted to actual charge in New
var/maxcharge = 1000
var/rigged = 0 // true if rigged to explode
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
var/self_recharge = FALSE // If true, the cell will recharge itself.
var/charge_amount = 25 // How much power to give, if self_recharge is true. The number is in absolute cell charge, as it gets divided by CELLRATE later.
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 50)
suicide_act(mob/user)
viewers(user) << "<span class='danger'>\The [user] is licking the electrodes of \the [src]! It looks like \he's trying to commit suicide.</span>"
return (FIRELOSS)
//currently only used by energy-type guns, that may change in the future.
/obj/item/weapon/cell/device
name = "device power cell"
desc = "A small power cell designed to power handheld devices."
icon_state = "dcell"
item_state = "egg6"
w_class = ITEMSIZE_SMALL
force = 0
throw_speed = 5
throw_range = 7
maxcharge = 480
matter = list("metal" = 350, "glass" = 50)
preserve_item = 1
/obj/item/weapon/cell/device/weapon
name = "weapon power cell"
desc = "A small power cell designed to power handheld weaponry."
icon_state = "wcell"
maxcharge = 2400
/obj/item/weapon/cell/crap
name = "\improper rechargable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
origin_tech = list(TECH_POWER = 0)
maxcharge = 500
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 40)
/obj/item/weapon/cell/crap/empty/New()
..()
charge = 0
/obj/item/weapon/cell/secborg
name = "security borg rechargable D battery"
origin_tech = list(TECH_POWER = 0)
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 40)
/obj/item/weapon/cell/secborg/empty/New()
..()
charge = 0
/obj/item/weapon/cell/apc
name = "heavy-duty power cell"
origin_tech = list(TECH_POWER = 1)
maxcharge = 5000
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 50)
/obj/item/weapon/cell/high
name = "high-capacity power cell"
origin_tech = list(TECH_POWER = 2)
icon_state = "hcell"
maxcharge = 10000
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 60)
/obj/item/weapon/cell/high/empty/New()
..()
charge = 0
/obj/item/weapon/cell/super
name = "super-capacity power cell"
origin_tech = list(TECH_POWER = 5)
icon_state = "scell"
maxcharge = 20000
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 70)
/obj/item/weapon/cell/super/empty/New()
..()
charge = 0
/obj/item/weapon/cell/hyper
name = "hyper-capacity power cell"
origin_tech = list(TECH_POWER = 6)
icon_state = "hpcell"
maxcharge = 30000
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 80)
/obj/item/weapon/cell/hyper/empty/New()
..()
charge = 0
/obj/item/weapon/cell/infinite
name = "infinite-capacity power cell!"
icon_state = "icell"
origin_tech = null
maxcharge = 30000 //determines how badly mobs get shocked
matter = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 80)
check_charge()
return 1
use()
return 1
/obj/item/weapon/cell/potato
name = "potato battery"
desc = "A rechargable starch based power cell."
origin_tech = list(TECH_POWER = 1)
icon = 'icons/obj/power.dmi' //'icons/obj/harvest.dmi'
icon_state = "potato_cell" //"potato_battery"
charge = 100
maxcharge = 300
minor_fault = 1
/obj/item/weapon/cell/slime
name = "charged slime core"
desc = "A yellow slime core infused with phoron, it crackles with power."
origin_tech = list(TECH_POWER = 4, TECH_BIO = 5)
icon = 'icons/mob/slimes.dmi' //'icons/obj/harvest.dmi'
icon_state = "yellow slime extract" //"potato_battery"
description_info = "This 'cell' holds a max charge of 10k and self recharges over time."
maxcharge = 10000
matter = null
self_recharge = TRUE
@@ -5,6 +5,7 @@
/obj/item/weapon/storage/backpack
name = "backpack"
desc = "You wear this on your back and put items into it."
icon = 'icons/obj/clothing/backpack.dmi'
icon_state = "backpack"
sprite_sheets = list(
"Teshari" = 'icons/mob/species/seromi/back.dmi'
@@ -347,6 +348,8 @@
/obj/item/weapon/storage/backpack/messenger/black
icon_state = "courierbagblk"
//Purses
/obj/item/weapon/storage/backpack/purse
name = "purse"
desc = "A small, fashionable bag typically worn over the shoulder."
@@ -355,3 +358,69 @@
w_class = ITEMSIZE_LARGE
max_w_class = ITEMSIZE_NORMAL
max_storage_space = ITEMSIZE_COST_NORMAL * 5
//Parachutes
/obj/item/weapon/storage/backpack/parachute
name = "parachute"
desc = "A specially made backpack, designed to help one survive jumping from incredible heights. It sacrifices some storage space for that added functionality."
icon_state = "parachute"
item_state_slots = list(slot_r_hand_str = "backpack", slot_l_hand_str = "backpack")
max_storage_space = ITEMSIZE_COST_NORMAL * 5
/obj/item/weapon/storage/backpack/parachute/examine(mob/user)
var/msg = desc
if(get_dist(src, user) <= 1)
if(parachute)
msg += " It seems to be packed."
else
msg += " It seems to be unpacked."
to_chat(user, msg)
/obj/item/weapon/storage/backpack/parachute/handleParachute()
parachute = FALSE //If you parachute in, the parachute has probably been used.
/obj/item/weapon/storage/backpack/parachute/verb/pack_parachute()
set name = "Pack/Unpack Parachute"
set category = "Object"
set src in usr
if(!istype(src.loc, /mob/living))
return
var/mob/living/carbon/human/H = usr
if(!istype(H))
return
if(H.stat)
return
if(H.back == src)
to_chat(H, "<span class='warning'>How do you expect to work on \the [src] while it's on your back?</span>")
return
if(!parachute) //This packs the parachute
visible_message("<span class='notice'>\The [H] starts to pack \the [src]!</span>", \
"<span class='notice'>You start to pack \the [src]!</span>", \
"You hear the shuffling of cloth.")
if(do_after(H, 50))
visible_message("<span class='notice'>\The [H] finishes packing \the [src]!</span>", \
"<span class='notice'>You finish packing \the [src]!</span>", \
"You hear the shuffling of cloth.")
parachute = TRUE
else
visible_message("<span class='notice'>\The [src] gives up on packing \the [src]!</span>", \
"<span class='notice'>You give up on packing \the [src]!</span>")
return
else //This unpacks the parachute
visible_message("<span class='notice'>\The [src] starts to unpack \the [src]!</span>", \
"<span class='notice'>You start to unpack \the [src]!</span>", \
"You hear the shuffling of cloth.")
if(do_after(H, 25))
visible_message("<span class='notice'>\The [src] finishes unpacking \the [src]!</span>", \
"<span class='notice'>You finish unpacking \the [src]!</span>", \
"You hear the shuffling of cloth.")
parachute = FALSE
else
visible_message("<span class='notice'>\The [src] decides not to unpack \the [src]!</span>", \
"<span class='notice'>You decide not to unpack \the [src]!</span>")
return
@@ -10,7 +10,9 @@
* Plant Bag
* Sheet Snatcher
* Cash Bag
*
* Chemistry Bag
Food Bag
* -Sayu
*/
@@ -261,3 +263,16 @@
w_class = ITEMSIZE_LARGE
slowdown = 1
can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/glass/bottle)
// -----------------------------
// Food Bag
// -----------------------------
/obj/item/weapon/storage/bag/food
name = "food bag"
icon = 'icons/obj/storage.dmi'
icon_state = "foodbag"
desc = "A bag for storing foods of all kinds."
max_storage_space = ITEMSIZE_COST_NORMAL * 25
max_w_class = ITEMSIZE_NORMAL
w_class = ITEMSIZE_SMALL
can_hold = list(/obj/item/weapon/reagent_containers/food/snacks,/obj/item/weapon/reagent_containers/food/condiment)
@@ -247,6 +247,7 @@
icon = 'icons/obj/abductor.dmi'
icon_state = "belt"
item_state = "security"
storage_slots = 8
can_hold = list(
/obj/item/device/healthanalyzer,
/obj/item/weapon/dnainjector,
@@ -284,6 +285,7 @@
new /obj/item/weapon/surgical/FixOVein/alien(src)
new /obj/item/weapon/surgical/bone_clamp/alien(src)
new /obj/item/weapon/surgical/cautery/alien(src)
new /obj/item/weapon/surgical/surgicaldrill/alien(src)
/obj/item/weapon/storage/belt/champion
name = "championship belt"
@@ -395,6 +395,17 @@
new /obj/item/weapon/implanter(src)
new /obj/item/weapon/implantpad(src)
/obj/item/weapon/storage/box/camerabug
name = "mobile camera pod box"
desc = "A box containing some mobile camera pods."
icon_state = "pda"
/obj/item/weapon/storage/box/camerabug/New()
..()
for(var/i = 1 to 6)
new /obj/item/device/camerabug(src)
new /obj/item/device/bug_monitor(src)
/obj/item/weapon/storage/box/rxglasses
name = "box of prescription glasses"
desc = "This box contains nerd glasses."
@@ -8,7 +8,7 @@
* First Aid Kits
*/
/obj/item/weapon/storage/firstaid
name = "first-aid kit"
name = "first aid kit"
desc = "It's an emergency medical kit for those serious boo-boos."
icon_state = "firstaid"
throw_speed = 2
@@ -18,8 +18,8 @@
/obj/item/weapon/storage/firstaid/fire
name = "fire first-aid kit"
desc = "It's an emergency medical kit for when the toxins lab <i>-spontaneously-</i> burns down."
name = "fire first aid kit"
desc = "It's an emergency medical kit for when the toxins lab <i>spontaneously</i> burns down."
icon_state = "ointment"
item_state_slots = list(slot_r_hand_str = "firstaid-ointment", slot_l_hand_str = "firstaid-ointment")
@@ -55,8 +55,8 @@
return
/obj/item/weapon/storage/firstaid/toxin
name = "toxin first aid"
desc = "Used to treat when you have a high amoutn of toxins in your body."
name = "poison first aid kit" //IRL the term used would be poison first aid kit.
desc = "Used to treat when one has a high amount of toxins in their body."
icon_state = "antitoxin"
item_state_slots = list(slot_r_hand_str = "firstaid-toxin", slot_l_hand_str = "firstaid-toxin")
@@ -76,7 +76,7 @@
return
/obj/item/weapon/storage/firstaid/o2
name = "oxygen deprivation first aid"
name = "oxygen deprivation first aid kit"
desc = "A box full of oxygen goodies."
icon_state = "o2"
item_state_slots = list(slot_r_hand_str = "firstaid-o2", slot_l_hand_str = "firstaid-o2")
@@ -94,8 +94,8 @@
return
/obj/item/weapon/storage/firstaid/adv
name = "advanced first-aid kit"
desc = "Contains advanced medical treatments."
name = "advanced first aid kit"
desc = "Contains advanced medical treatments, for <b>serious</b> boo-boos."
icon_state = "advfirstaid"
item_state_slots = list(slot_r_hand_str = "firstaid-advanced", slot_l_hand_str = "firstaid-advanced")
@@ -149,6 +149,7 @@
new /obj/item/weapon/surgical/bonegel(src)
new /obj/item/weapon/surgical/FixOVein(src)
new /obj/item/stack/medical/advanced/bruise_pack(src)
new /obj/item/device/healthanalyzer/advanced(src)
return
/obj/item/weapon/storage/firstaid/clotting
@@ -426,12 +426,12 @@
for(var/obj/item/weapon/light/L in src.contents)
if(L.status == 0)
if(LP.uses < LP.max_uses)
LP.AddUses(1)
LP.add_uses(1)
amt_inserted++
remove_from_storage(L, T)
qdel(L)
if(amt_inserted)
user << "You inserted [amt_inserted] light\s into \the [LP.name]. You have [LP.uses] light\s remaining."
to_chat(user, "You inserted [amt_inserted] light\s into \the [LP.name]. You have [LP.uses] light\s remaining.")
return
if(!can_be_inserted(W))
@@ -441,14 +441,14 @@
var/obj/item/weapon/tray/T = W
if(T.calc_carry() > 0)
if(prob(85))
user << "<span class='warning'>The tray won't fit in [src].</span>"
to_chat(user, "<span class='warning'>The tray won't fit in [src].</span>")
return
else
W.forceMove(get_turf(user))
if ((user.client && user.s_active != src))
user.client.screen -= W
W.dropped(user)
user << "<span class='warning'>God damnit!</span>"
to_chat(user, "<span class='warning'>God damn it!</span>")
W.add_fingerprint(user)
return handle_item_insertion(W)
@@ -506,9 +506,9 @@
collection_mode = !collection_mode
switch (collection_mode)
if(1)
usr << "[src] now picks up all items in a tile at once."
to_chat(usr, "[src] now picks up all items on a tile at once.")
if(0)
usr << "[src] now picks up one item at a time."
to_chat(usr, "[src] now picks up one item at a time.")
/obj/item/weapon/storage/verb/quick_empty()
@@ -539,7 +539,7 @@
var/total_storage_space = 0
for(var/obj/item/I in contents)
total_storage_space += I.get_storage_cost()
max_storage_space = max(total_storage_space,max_storage_space) //prevents spawned containers from being too small for their contents
max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents.
src.boxes = new /obj/screen/storage( )
src.boxes.name = "storage"
@@ -69,14 +69,24 @@
origin_tech = list(TECH_COMBAT = 1, TECH_ILLEGAL = 1)
force = 14
/obj/item/weapon/storage/toolbox/syndicate/New()
/obj/item/weapon/storage/toolbox/syndicate/New() // This is found in maint, so it should have the basics, plus some gloves.
..()
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/wrench(src)
new /obj/item/weapon/weldingtool(src)
new /obj/item/weapon/crowbar(src)
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/multitool(src)
/obj/item/weapon/storage/toolbox/syndicate/powertools/New() // Available in the uplink and is the 'real' syndie toolbox.
// ..() isn't called or else this box would contain the basic tools, power tools, and duplicate gloves.
new /obj/item/clothing/gloves/yellow(src)
new /obj/item/weapon/screwdriver/power(src)
new /obj/item/stack/cable_coil/random(src,30)
new /obj/item/weapon/weldingtool/experimental(src)
new /obj/item/weapon/crowbar/power(src)
new /obj/item/device/multitool(src)
new /obj/item/stack/cable_coil/random(src,30)
new /obj/item/device/analyzer(src)
/obj/item/weapon/storage/toolbox/lunchbox
@@ -159,13 +159,13 @@
/obj/item/weapon/storage/box/syndie_kit/spy/New()
..()
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_bug(src)
new /obj/item/device/spy_monitor(src)
new /obj/item/device/camerabug/spy(src)
new /obj/item/device/camerabug/spy(src)
new /obj/item/device/camerabug/spy(src)
new /obj/item/device/camerabug/spy(src)
new /obj/item/device/camerabug/spy(src)
new /obj/item/device/camerabug/spy(src)
new /obj/item/device/bug_monitor/spy(src)
/obj/item/weapon/storage/box/syndie_kit/g9mm
name = "\improper Smooth operator"
@@ -133,7 +133,7 @@ Frequency:
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
var/turf/current_location = get_turf(user)//What turf is the user on?
if(!current_location||current_location.z==2||current_location.z>=7)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
if(!current_location||current_location.z==2||current_location.z>=7 || current_location.block_tele)//If turf was not found or they're on z level 2 or >7 which does not currently exist.
user << "<span class='notice'>\The [src] is malfunctioning.</span>"
return
var/list/L = list( )
@@ -148,6 +148,7 @@ Frequency:
for(var/turf/T in orange(10))
if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb
if(T.y>world.maxy-8 || T.y<8) continue
if(T.block_tele) continue
turfs += T
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
+3
View File
@@ -34,6 +34,7 @@
"<span class='danger'>You have deployed \the [src]!</span>",
"You hear a latch click loudly."
)
playsound(src.loc, 'sound/machines/click.ogg',70, 1)
deployed = 1
user.drop_from_inventory(src)
@@ -56,6 +57,8 @@
"<span class='notice'>You begin disarming \the [src]!</span>",
"You hear a latch click followed by the slow creaking of a spring."
)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 60))
user.visible_message(
"<span class='danger'>[user] has disarmed \the [src].</span>",
+1 -1
View File
@@ -17,7 +17,7 @@
var/max_carry = 10
/obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
// Drop all the things. All of them.
overlays.Cut()
for(var/obj/item/I in carrying)
+2 -2
View File
@@ -21,7 +21,7 @@
msg_admin_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(src))
user.do_attack_animation(M)
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
@@ -134,7 +134,7 @@
qdel(src)
/obj/effect/energy_net/user_unbuckle_mob(mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed())
visible_message("<span class='danger'>[user] begins to tear at \the [src]!</span>")
if(do_after(usr, escape_time, src, incapacitation_flags = INCAPACITATION_DEFAULT & ~(INCAPACITATION_RESTRAINED | INCAPACITATION_BUCKLED_FULLY)))
if(!buckled_mob)