mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-29 15:06:39 +01:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into radiation_tweaks
# Conflicts: # code/game/objects/items/devices/defib.dm
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
//..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
user << "You cut the tag off the bodybag"
|
||||
to_chat(user, "You cut the tag off the bodybag")
|
||||
src.name = "body bag"
|
||||
src.overlays.Cut()
|
||||
return
|
||||
@@ -160,7 +160,7 @@
|
||||
O.name = "used stasis bag"
|
||||
O.icon = src.icon
|
||||
O.icon_state = "bodybag_used"
|
||||
O.desc = "Pretty useless now.."
|
||||
O.desc = "Pretty useless now..."
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/MouseDrop(over_object, src_location, over_location)
|
||||
@@ -211,9 +211,9 @@
|
||||
/obj/structure/closet/body_bag/cryobag/examine(mob/user)
|
||||
..()
|
||||
if(Adjacent(user)) //The bag's rather thick and opaque from a distance.
|
||||
user << "<span class='info'>You peer into \the [src].</span>"
|
||||
to_chat(user, "<span class='info'>You peer into \the [src].</span>")
|
||||
if(syringe)
|
||||
user << "<span class='info'>It has a syringe added to it.</span>"
|
||||
to_chat(user, "<span class='info'>It has a syringe added to it.</span>")
|
||||
for(var/mob/living/L in contents)
|
||||
L.examine(user)
|
||||
|
||||
|
||||
@@ -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,10 +284,12 @@
|
||||
return "buzzes, \"Resuscitation failed - Excessive neural degeneration. Further attempts futile.\""
|
||||
|
||||
H.updatehealth()
|
||||
if(H.isSynthetic() && H.health + H.getOxyLoss() + H.getToxLoss() <= config.health_threshold_dead || (HUSK in H.mutations))
|
||||
return "buzzes, \"Resuscitation failed - Severe damage detected. Begin manual repair before further attempts futile.\""
|
||||
|
||||
if(!H.isSynthetic() && 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(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)
|
||||
@@ -377,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>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define RAD_LEVEL_LOW 5 //10 // Around the level at which radiation starts to become harmful
|
||||
#define RAD_LEVEL_MODERATE 15 //15
|
||||
#define RAD_LEVEL_HIGH 50 //50
|
||||
#define RAD_LEVEL_VERY_HIGH 100 //100
|
||||
#define RAD_LEVEL_LOW 0.01 // Around the level at which radiation starts to become harmful
|
||||
#define RAD_LEVEL_MODERATE 10
|
||||
#define RAD_LEVEL_HIGH 25
|
||||
#define RAD_LEVEL_VERY_HIGH 50
|
||||
|
||||
//Geiger counter
|
||||
//Rewritten version of TG's geiger counter
|
||||
@@ -19,7 +19,14 @@
|
||||
/obj/item/device/geiger/New()
|
||||
processing_objects |= src
|
||||
|
||||
/obj/item/device/geiger/Destroy()
|
||||
processing_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/geiger/process()
|
||||
get_radiation()
|
||||
|
||||
/obj/item/device/geiger/proc/get_radiation()
|
||||
if(!scanning)
|
||||
return
|
||||
radiation_count = radiation_repository.get_rads_at_turf(get_turf(src))
|
||||
@@ -27,12 +34,29 @@
|
||||
|
||||
/obj/item/device/geiger/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "<span class='warning'>[scanning ? "ambient" : "stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>")
|
||||
get_radiation()
|
||||
to_chat(user, "<span class='warning'>[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.</span>")
|
||||
|
||||
/obj/item/device/geiger/rad_act(amount)
|
||||
if(!amount || !scanning)
|
||||
return FALSE
|
||||
|
||||
if(amount > radiation_count)
|
||||
radiation_count = amount
|
||||
|
||||
var/sound = "geiger"
|
||||
if(amount < 5)
|
||||
sound = "geiger_weak"
|
||||
playsound(src, sound, between(10, 10 + (radiation_count * 4), 100), 0)
|
||||
if(sound == "geiger_weak") // A weak geiger sound every two seconds sounds too infrequent.
|
||||
spawn(1 SECOND)
|
||||
playsound(src, sound, between(10, 10 + (radiation_count * 4), 100), 0)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/geiger/attack_self(var/mob/user)
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
to_chat(user, "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] [src].</span>")
|
||||
to_chat(user, "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] \the [src].</span>")
|
||||
|
||||
/obj/item/device/geiger/update_icon()
|
||||
if(!scanning)
|
||||
@@ -40,12 +64,18 @@
|
||||
return 1
|
||||
|
||||
switch(radiation_count)
|
||||
if(null) icon_state = "geiger_on_1"
|
||||
if(-INFINITY to RAD_LEVEL_LOW) icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_LOW + 1 to RAD_LEVEL_MODERATE) icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH) icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH) icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH + 1 to INFINITY) icon_state = "geiger_on_5"
|
||||
if(null)
|
||||
icon_state = "geiger_on_1"
|
||||
if(-INFINITY to RAD_LEVEL_LOW)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_LOW to RAD_LEVEL_MODERATE)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE to RAD_LEVEL_HIGH)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH to RAD_LEVEL_VERY_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH to INFINITY)
|
||||
icon_state = "geiger_on_5"
|
||||
|
||||
#undef RAD_LEVEL_LOW
|
||||
#undef RAD_LEVEL_MODERATE
|
||||
|
||||
@@ -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_MATERIALS = 2, TECH_BLUESPACE = 2, TECH_MAGNETS = 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_MATERIALS = 2, TECH_BLUESPACE = 3, TECH_MAGNETS = 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)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/spamcheck = 0
|
||||
var/emagged = 0
|
||||
var/insults = 0
|
||||
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
|
||||
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TERRORIST!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "GLORY TO ALMACH!")
|
||||
|
||||
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
|
||||
if (user.client)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
/obj/item/gunbox
|
||||
name = "detective's gun box"
|
||||
desc = "A secure box containing a Detective's sidearm."
|
||||
icon = 'icons/obj/storage.dmi'
|
||||
icon_state = "gunbox"
|
||||
w_class = ITEMSIZE_HUGE
|
||||
|
||||
/obj/item/gunbox/attack_self(mob/living/user)
|
||||
var/list/options = list()
|
||||
options[".45 Pistol"] = list(/obj/item/weapon/gun/projectile/colt/detective, /obj/item/ammo_magazine/m45/rubber, /obj/item/ammo_magazine/m45/rubber)
|
||||
options[".45 Revolver"] = list(/obj/item/weapon/gun/projectile/revolver/detective45, /obj/item/ammo_magazine/s45/rubber, /obj/item/ammo_magazine/s45/rubber)
|
||||
var/choice = input(user,"Would you prefer a pistol or a revolver?") as null|anything in options
|
||||
if(src && choice)
|
||||
var/list/things_to_spawn = options[choice]
|
||||
for(var/new_type in things_to_spawn) // Spawn all the things, the gun and the ammo.
|
||||
var/atom/movable/AM = new new_type(get_turf(src))
|
||||
if(istype(AM, /obj/item/weapon/gun))
|
||||
to_chat(user, "You have chosen \the [AM]. Say hello to your new friend.")
|
||||
qdel(src)
|
||||
@@ -75,11 +75,11 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open)
|
||||
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
return
|
||||
|
||||
if(affecting.is_bandaged())
|
||||
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>"
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
|
||||
@@ -93,9 +93,13 @@
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
user << "<span class='notice'>You must stand still to bandage wounds.</span>"
|
||||
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
|
||||
break
|
||||
|
||||
if(affecting.is_bandaged()) // We do a second check after the delay, in case it was bandaged after the first check.
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
|
||||
return 1
|
||||
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message("<span class='notice'>\The [user] bandages \a [W.desc] on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You bandage \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
@@ -111,9 +115,9 @@
|
||||
affecting.update_damages()
|
||||
if(used == amount)
|
||||
if(affecting.is_bandaged())
|
||||
user << "<span class='warning'>\The [src] is used up.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up.</span>")
|
||||
else
|
||||
user << "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>")
|
||||
use(used)
|
||||
|
||||
/obj/item/stack/medical/ointment
|
||||
@@ -135,17 +139,20 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open)
|
||||
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
return
|
||||
|
||||
if(affecting.is_salved())
|
||||
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>"
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
|
||||
if(!do_mob(user, M, 10))
|
||||
user << "<span class='notice'>You must stand still to salve wounds.</span>"
|
||||
to_chat(user, "<span class='notice'>You must stand still to salve wounds.</span>")
|
||||
return 1
|
||||
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
user.visible_message("<span class='notice'>[user] salved wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You salved wounds on [M]'s [affecting.name].</span>" )
|
||||
@@ -169,11 +176,11 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open)
|
||||
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
return
|
||||
|
||||
if(affecting.is_bandaged() && affecting.is_disinfected())
|
||||
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been treated.</span>"
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been treated.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts treating [M]'s [affecting.name].</span>", \
|
||||
@@ -187,8 +194,11 @@
|
||||
if(used == amount)
|
||||
break
|
||||
if(!do_mob(user, M, W.damage/5))
|
||||
user << "<span class='notice'>You must stand still to bandage wounds.</span>"
|
||||
to_chat(user, "<span class='notice'>You must stand still to bandage wounds.</span>")
|
||||
break
|
||||
if(affecting.is_bandaged() && affecting.is_disinfected()) // We do a second check after the delay, in case it was bandaged after the first check.
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been bandaged.</span>")
|
||||
return 1
|
||||
if (W.current_stage <= W.max_bleeding_stage)
|
||||
user.visible_message("<span class='notice'>\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.</span>", \
|
||||
"<span class='notice'>You clean and seal \a [W.desc] on [M]'s [affecting.name].</span>" )
|
||||
@@ -205,9 +215,9 @@
|
||||
affecting.update_damages()
|
||||
if(used == amount)
|
||||
if(affecting.is_bandaged())
|
||||
user << "<span class='warning'>\The [src] is used up.</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up.</span>")
|
||||
else
|
||||
user << "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>"
|
||||
to_chat(user, "<span class='warning'>\The [src] is used up, but there are more wounds to treat on \the [affecting.name].</span>")
|
||||
use(used)
|
||||
|
||||
/obj/item/stack/medical/advanced/ointment
|
||||
@@ -228,16 +238,19 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(affecting.open)
|
||||
user << "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>"
|
||||
to_chat(user, "<span class='notice'>The [affecting.name] is cut open, you'll need more than a bandage!</span>")
|
||||
|
||||
if(affecting.is_salved())
|
||||
user << "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>"
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
else
|
||||
user.visible_message("<span class='notice'>\The [user] starts salving wounds on [M]'s [affecting.name].</span>", \
|
||||
"<span class='notice'>You start salving the wounds on [M]'s [affecting.name].</span>" )
|
||||
if(!do_mob(user, M, 10))
|
||||
user << "<span class='notice'>You must stand still to salve wounds.</span>"
|
||||
to_chat(user, "<span class='notice'>You must stand still to salve wounds.</span>")
|
||||
return 1
|
||||
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
|
||||
to_chat(user, "<span class='warning'>The wounds on [M]'s [affecting.name] have already been salved.</span>")
|
||||
return 1
|
||||
user.visible_message( "<span class='notice'>[user] covers wounds on [M]'s [affecting.name] with regenerative membrane.</span>", \
|
||||
"<span class='notice'>You cover wounds on [M]'s [affecting.name] with regenerative membrane.</span>" )
|
||||
@@ -264,20 +277,23 @@
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
if(!(affecting.organ_tag in splintable_organs))
|
||||
user << "<span class='danger'>You can't use \the [src] to apply a splint there!</span>"
|
||||
to_chat(user, "<span class='danger'>You can't use \the [src] to apply a splint there!</span>")
|
||||
return
|
||||
if(affecting.splinted)
|
||||
user << "<span class='danger'>[M]'s [limb] is already splinted!</span>"
|
||||
to_chat(user, "<span class='danger'>[M]'s [limb] is already splinted!</span>")
|
||||
return
|
||||
if (M != user)
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You start to apply \the [src] to [M]'s [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
else
|
||||
if(( !user.hand && (affecting.organ_tag in list(BP_R_ARM, BP_R_HAND)) || \
|
||||
user.hand && (affecting.organ_tag in list(BP_L_ARM, BP_L_HAND)) ))
|
||||
user << "<span class='danger'>You can't apply a splint to the arm you're using!</span>"
|
||||
to_chat(user, "<span class='danger'>You can't apply a splint to the arm you're using!</span>")
|
||||
return
|
||||
user.visible_message("<span class='danger'>[user] starts to apply \the [src] to their [limb].</span>", "<span class='danger'>You start to apply \the [src] to your [limb].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
if(do_after(user, 50, M))
|
||||
if(affecting.splinted)
|
||||
to_chat(user, "<span class='danger'>[M]'s [limb] is already splinted!</span>")
|
||||
return
|
||||
if(M == user && prob(75))
|
||||
user.visible_message("<span class='danger'>\The [user] fumbles [src].</span>", "<span class='danger'>You fumble [src].</span>", "<span class='danger'>You hear something being wrapped.</span>")
|
||||
return
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_state = "nanopaste"
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
||||
amount = 10
|
||||
toolspeed = 0.75 //Used in surgery, shouldn't be the same speed as a normal screwdriver on mechanical organ repair.
|
||||
w_class = ITEMSIZE_SMALL
|
||||
no_variants = FALSE
|
||||
|
||||
@@ -14,12 +15,13 @@
|
||||
return 0
|
||||
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if (R.getBruteLoss() || R.getFireLoss() )
|
||||
R.adjustBruteLoss(-15)
|
||||
R.adjustFireLoss(-15)
|
||||
R.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applied some [src] on [R]'s damaged areas.</span>",\
|
||||
if (R.getBruteLoss() || R.getFireLoss())
|
||||
if(do_after(user,7 * toolspeed))
|
||||
R.adjustBruteLoss(-15)
|
||||
R.adjustFireLoss(-15)
|
||||
R.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applied some [src] on [R]'s damaged areas.</span>",\
|
||||
"<span class='notice'>You apply some [src] at [R]'s damaged areas.</span>")
|
||||
else
|
||||
user << "<span class='notice'>All [R]'s systems are nominal.</span>"
|
||||
@@ -28,14 +30,17 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(S.open >= 2)
|
||||
if (S && (S.robotic >= ORGAN_ROBOT))
|
||||
if(!S.get_damage())
|
||||
user << "<span class='notice'>Nothing to fix here.</span>"
|
||||
else if(can_use(1))
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
S.heal_damage(15, 15, robo_repair = 1)
|
||||
H.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applies some nanite paste on [user != M ? "[M]'s [S.name]" : "[S]"] with [src].</span>",\
|
||||
"<span class='notice'>You apply some nanite paste on [user == M ? "your" : "[M]'s"] [S.name].</span>")
|
||||
if (S && (S.robotic >= ORGAN_ROBOT))
|
||||
if(!S.get_damage())
|
||||
user << "<span class='notice'>Nothing to fix here.</span>"
|
||||
else if(can_use(1))
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
if(S.open >= 2)
|
||||
if(do_after(user,5 * toolspeed))
|
||||
S.heal_damage(20, 20, robo_repair = 1)
|
||||
else if(do_after(user,5 * toolspeed))
|
||||
S.heal_damage(10,10, robo_repair =1)
|
||||
H.updatehealth()
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applies some nanite paste on [user != M ? "[M]'s [S.name]" : "[S]"] with [src].</span>",\
|
||||
"<span class='notice'>You apply some nanite paste on [user == M ? "your" : "[M]'s"] [S.name].</span>")
|
||||
|
||||
@@ -699,54 +699,6 @@
|
||||
desc = "A \"Space Life\" brand Emergency Response Team Commander action figure."
|
||||
icon_state = "ert"
|
||||
|
||||
/obj/item/toy/therapy_red
|
||||
name = "red therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is red."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyred"
|
||||
item_state = "egg4" // It's the red egg in items_left/righthand
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/item/toy/therapy_purple
|
||||
name = "purple therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is purple."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapypurple"
|
||||
item_state = "egg1" // It's the magenta egg in items_left/righthand
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/item/toy/therapy_blue
|
||||
name = "blue therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is blue."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyblue"
|
||||
item_state = "egg2" // It's the blue egg in items_left/righthand
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/item/toy/therapy_yellow
|
||||
name = "yellow therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is yellow."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyyellow"
|
||||
item_state = "egg5" // It's the yellow egg in items_left/righthand
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/item/toy/therapy_orange
|
||||
name = "orange therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is orange."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyorange"
|
||||
item_state = "egg4" // It's the red one again, lacking an orange item_state and making a new one is pointless
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/obj/item/toy/therapy_green
|
||||
name = "green therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is green."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapygreen"
|
||||
item_state = "egg3" // It's the green egg in items_left/righthand
|
||||
w_class = ITEMSIZE_TINY
|
||||
|
||||
/*
|
||||
* Plushies
|
||||
*/
|
||||
@@ -800,9 +752,10 @@
|
||||
//Small plushies.
|
||||
/obj/item/toy/plushie
|
||||
name = "generic small plush"
|
||||
desc = "A very generic small plushie. It seems to not want to exist."
|
||||
desc = "A small toy plushie. It's very cute."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "nymphplushie"
|
||||
w_class = ITEMSIZE_TINY
|
||||
var/last_message = 0
|
||||
|
||||
/obj/item/toy/plushie/attack_self(mob/user as mob)
|
||||
@@ -815,9 +768,24 @@
|
||||
else if (user.a_intent == I_GRAB)
|
||||
user.visible_message("<span class='warning'><b>\The [user]</b> attempts to strangle [src]!</span>","<span class='warning'>You attempt to strangle [src]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='notice'><b>\The [user]</b> pokes the [src].</span>","<span class='notice'>You poke the [src].</span>")
|
||||
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()
|
||||
set name = "Name Plushie"
|
||||
set category = "Object"
|
||||
set desc = "Give your plushie a cute name!"
|
||||
var/mob/M = usr
|
||||
if(!M.mind)
|
||||
return 0
|
||||
|
||||
var/input = sanitizeSafe(input("What do you want to name the plushie?", ,""), MAX_NAME_LEN)
|
||||
|
||||
if(src && input && !M.stat && in_range(M,src))
|
||||
name = input
|
||||
to_chat(M, "You name the plushie [input], giving it a hug for good luck.")
|
||||
return 1
|
||||
|
||||
/obj/item/toy/plushie/nymph
|
||||
name = "diona nymph plush"
|
||||
desc = "A plushie of an adorable diona nymph! While its level of self-awareness is still being debated, its level of cuteness is not."
|
||||
@@ -830,7 +798,7 @@
|
||||
|
||||
/obj/item/toy/plushie/kitten
|
||||
name = "kitten plush"
|
||||
desc = "A plushie of a cute kitten! Watch as it purrs it's way right into your heart."
|
||||
desc = "A plushie of a cute kitten! Watch as it purrs its way right into your heart."
|
||||
icon_state = "kittenplushie"
|
||||
|
||||
/obj/item/toy/plushie/lizard
|
||||
@@ -848,6 +816,49 @@
|
||||
desc = "A farwa plush doll. It's soft and comforting!"
|
||||
icon_state = "farwaplushie"
|
||||
|
||||
/obj/item/toy/plushie/therapy/red
|
||||
name = "red therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is red."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyred"
|
||||
item_state = "egg4" // It's the red egg in items_left/righthand
|
||||
|
||||
/obj/item/toy/plushie/therapy/purple
|
||||
name = "purple therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is purple."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapypurple"
|
||||
item_state = "egg1" // It's the magenta egg in items_left/righthand
|
||||
|
||||
/obj/item/toy/plushie/therapy/blue
|
||||
name = "blue therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is blue."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyblue"
|
||||
item_state = "egg2" // It's the blue egg in items_left/righthand
|
||||
|
||||
/obj/item/toy/plushie/therapy/yellow
|
||||
name = "yellow therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is yellow."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyyellow"
|
||||
item_state = "egg5" // It's the yellow egg in items_left/righthand
|
||||
|
||||
/obj/item/toy/plushie/therapy/orange
|
||||
name = "orange therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is orange."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapyorange"
|
||||
item_state = "egg4" // It's the red one again, lacking an orange item_state and making a new one is pointless
|
||||
|
||||
/obj/item/toy/plushie/therapy/green
|
||||
name = "green therapy doll"
|
||||
desc = "A toy for therapeutic and recreational purposes. This one is green."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "therapygreen"
|
||||
item_state = "egg3" // It's the green egg in items_left/righthand
|
||||
|
||||
|
||||
//Toy cult sword
|
||||
/obj/item/toy/cultsword
|
||||
name = "foam sword"
|
||||
|
||||
@@ -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)
|
||||
@@ -202,6 +202,15 @@
|
||||
/obj/item/weapon/reagent_containers/syringe = 3,
|
||||
/obj/item/stack/material/glass/reinforced = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/vr_sleeper
|
||||
name = T_BOARD("VR sleeper")
|
||||
build_path = /obj/machinery/vr_sleeper
|
||||
board_type = new /datum/frame/frame_types/medical_pod
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2)
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/stack/material/glass/reinforced = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/dna_analyzer
|
||||
name = T_BOARD("dna analyzer")
|
||||
build_path = /obj/machinery/dnaforensics
|
||||
@@ -221,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)
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -373,8 +373,8 @@
|
||||
job_access_type = /datum/job/bartender
|
||||
|
||||
/obj/item/weapon/card/id/civilian/botanist
|
||||
assignment = "Gardener"
|
||||
rank = "Gardener"
|
||||
assignment = "Botanist"
|
||||
rank = "Botanist"
|
||||
job_access_type = /datum/job/hydro
|
||||
|
||||
/obj/item/weapon/card/id/civilian/chaplain
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -656,6 +656,61 @@
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("fuel", 1)
|
||||
|
||||
/*
|
||||
* Backpack Welder.
|
||||
*/
|
||||
|
||||
/obj/item/weapon/weldingtool/tubefed
|
||||
name = "tube-fed welding tool"
|
||||
desc = "A bulky, cooler-burning welding tool that draws from a worn welding tank."
|
||||
icon_state = "tubewelder"
|
||||
max_fuel = 10
|
||||
w_class = ITEMSIZE_NO_CONTAINER
|
||||
matter = null
|
||||
toolspeed = 1.25
|
||||
change_icons = 0
|
||||
flame_intensity = 1
|
||||
eye_safety_modifier = 1
|
||||
always_process = TRUE
|
||||
var/obj/item/weapon/weldpack/mounted_pack = null
|
||||
|
||||
/obj/item/weapon/weldingtool/tubefed/New(location)
|
||||
..()
|
||||
if(istype(location, /obj/item/weapon/weldpack))
|
||||
var/obj/item/weapon/weldpack/holder = location
|
||||
mounted_pack = holder
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/weldingtool/tubefed/Destroy()
|
||||
mounted_pack.nozzle = null
|
||||
mounted_pack = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/weldingtool/tubefed/process()
|
||||
if(mounted_pack)
|
||||
if(!istype(mounted_pack.loc,/mob/living/carbon/human))
|
||||
mounted_pack.return_nozzle()
|
||||
else
|
||||
var/mob/living/carbon/human/H = mounted_pack.loc
|
||||
if(H.back != mounted_pack)
|
||||
mounted_pack.return_nozzle()
|
||||
|
||||
if(mounted_pack.loc != src.loc && src.loc != mounted_pack)
|
||||
mounted_pack.return_nozzle()
|
||||
visible_message("<span class='notice'>\The [src] retracts to its fueltank.</span>")
|
||||
|
||||
if(get_fuel() <= get_max_fuel())
|
||||
mounted_pack.reagents.trans_to_obj(src, 1)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/weldingtool/tubefed/dropped(mob/user)
|
||||
..()
|
||||
if(src.loc != user)
|
||||
mounted_pack.return_nozzle()
|
||||
to_chat(user, "<span class='notice'>\The [src] retracts to its fueltank.</span>")
|
||||
|
||||
/*
|
||||
* Electric/Arc Welder
|
||||
*/
|
||||
|
||||
@@ -6,46 +6,140 @@
|
||||
icon_state = "welderpack"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
var/max_fuel = 350
|
||||
var/obj/item/weapon/nozzle = null //Attached welder, or other spray device.
|
||||
var/nozzle_attached = 0
|
||||
|
||||
/obj/item/weapon/weldpack/New()
|
||||
var/datum/reagents/R = new/datum/reagents(max_fuel) //Lotsa refills
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
R.add_reagent("fuel", max_fuel)
|
||||
nozzle = new/obj/item/weapon/weldingtool/tubefed(src)
|
||||
nozzle_attached = 1
|
||||
|
||||
/obj/item/weapon/weldpack/Destroy()
|
||||
qdel(nozzle)
|
||||
nozzle = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/weldpack/dropped(mob/user)
|
||||
..()
|
||||
if(nozzle)
|
||||
user.remove_from_mob(nozzle)
|
||||
return_nozzle()
|
||||
to_chat(user, "<span class='notice'>\The [nozzle] retracts to its fueltank.</span>")
|
||||
|
||||
/obj/item/weapon/weldpack/proc/get_nozzle(var/mob/living/user)
|
||||
if(!ishuman(user))
|
||||
return 0
|
||||
|
||||
var/mob/living/carbon/human/H = user
|
||||
|
||||
if(H.hands_are_full()) //Make sure our hands aren't full.
|
||||
to_chat(H, "<span class='warning'>Your hands are full. Drop something first.</span>")
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/F = nozzle
|
||||
H.put_in_hands(F)
|
||||
nozzle_attached = 0
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/weldpack/proc/return_nozzle(var/mob/living/user)
|
||||
nozzle.forceMove(src)
|
||||
nozzle_attached = 1
|
||||
|
||||
/obj/item/weapon/weldpack/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && !(W == nozzle))
|
||||
var/obj/item/weapon/weldingtool/T = W
|
||||
if(T.welding & prob(50))
|
||||
message_admins("[key_name_admin(user)] triggered a fueltank explosion.")
|
||||
log_game("[key_name(user)] triggered a fueltank explosion.")
|
||||
user << "<span class='danger'>That was stupid of you.</span>"
|
||||
to_chat(user,"<span class='danger'>That was stupid of you.</span>")
|
||||
explosion(get_turf(src),-1,0,2)
|
||||
if(src)
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
else if(T.status)
|
||||
if(T.welding)
|
||||
user << "<span class='danger'>That was close!</span>"
|
||||
to_chat(user,"<span class='danger'>That was close!</span>")
|
||||
src.reagents.trans_to_obj(W, T.max_fuel)
|
||||
user << "<span class='notice'>Welder refilled!</span>"
|
||||
to_chat(user, "<span class='notice'>Welder refilled!</span>")
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
user << "<span class='warning'>The tank scoffs at your insolence. It only provides services to welders.</span>"
|
||||
else if(nozzle)
|
||||
if(nozzle == W)
|
||||
if(!user.unEquip(W))
|
||||
to_chat(user,"<span class='notice'>\The [W] seems to be stuck to your hand.</span>")
|
||||
return
|
||||
if(!nozzle_attached)
|
||||
return_nozzle()
|
||||
to_chat(user,"<span class='notice'>You attach \the [W] to the [src].</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user,"<span class='notice'>The [src] already has a nozzle!</span>")
|
||||
else
|
||||
to_chat(user,"<span class='warning'>The tank scoffs at your insolence. It only provides services to welders.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/weldpack/attack_hand(mob/user as mob)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/wearer = user
|
||||
if(wearer.back == src)
|
||||
if(nozzle && nozzle_attached)
|
||||
if(!wearer.incapacitated())
|
||||
get_nozzle(user)
|
||||
else
|
||||
to_chat(user,"<span class='notice'>\The [src] does not have a nozzle attached!</span>")
|
||||
else
|
||||
..()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/weldpack/afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity) // this replaces and improves the get_dist(src,O) <= 1 checks used previously
|
||||
return
|
||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume < max_fuel)
|
||||
O.reagents.trans_to_obj(src, max_fuel)
|
||||
user << "<span class='notice'>You crack the cap off the top of the pack and fill it back up again from the tank.</span>"
|
||||
to_chat(user,"<span class='notice'>You crack the cap off the top of the pack and fill it back up again from the tank.</span>")
|
||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||
return
|
||||
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume == max_fuel)
|
||||
user << "<span class='warning'>The pack is already full!</span>"
|
||||
to_chat(user,"<span class='warning'>The pack is already full!</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/weldpack/MouseDrop(obj/over_object as obj) //This is terrifying.
|
||||
if(!canremove)
|
||||
return
|
||||
|
||||
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech. why?
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
|
||||
//makes sure that the thing is equipped, so that we can't drag it into our hand from miles away.
|
||||
//there's got to be a better way of doing this.
|
||||
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
|
||||
return
|
||||
|
||||
if (( usr.restrained() ) || ( usr.stat ))
|
||||
return
|
||||
|
||||
if ((src.loc == usr) && !(istype(over_object, /obj/screen)) && !usr.unEquip(src))
|
||||
return
|
||||
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
usr.u_equip(src)
|
||||
usr.put_in_r_hand(src)
|
||||
if("l_hand")
|
||||
usr.u_equip(src)
|
||||
usr.put_in_l_hand(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
/obj/item/weapon/weldpack/examine(mob/user)
|
||||
..(user)
|
||||
user << text("\icon[] [] units of fuel left!", src, src.reagents.total_volume)
|
||||
|
||||
Reference in New Issue
Block a user