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
+1 -1
View File
@@ -68,7 +68,7 @@
/atom/movable/proc/user_buckle_mob(mob/living/M, mob/user, var/forced = FALSE, var/silent = FALSE)
if(!ticker)
user << "<span class='warning'>You can't buckle anyone in before the game starts.</span>"
if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat || istype(user, /mob/living/silicon/pai))
if(!user.Adjacent(M) || user.restrained() || user.stat || istype(user, /mob/living/silicon/pai))
return
if(M == buckled_mob)
return
+2 -2
View File
@@ -120,7 +120,7 @@
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(W))
var/aforce = W.force
health = max(0, health - aforce)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
@@ -227,7 +227,7 @@ Alien plants should do something if theres a lot of poison
return
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(W))
if(W.attack_verb.len)
visible_message("<span class='danger'>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]</span>")
else
+2 -2
View File
@@ -3,7 +3,7 @@
icon = 'icons/effects/effects.dmi'
icon_state = "extinguish"
mouse_opacity = 0
pass_flags = PASSTABLE | PASSGRILLE
pass_flags = PASSTABLE | PASSGRILLE | PASSBLOB
/obj/effect/effect/water/New(loc)
..()
@@ -27,7 +27,7 @@
var/mob/M
for(var/atom/A in T)
if(!ismob(A) && A.simulated) // Mobs are handled differently
reagents.touch(A)
reagents.touch(A, reagents.total_volume)
else if(ismob(A) && !M)
M = A
if(M)
@@ -67,4 +67,10 @@
spawn(5)
var/datum/effect/effect/system/smoke_spread/S = new/datum/effect/effect/system/smoke_spread()
S.set_up(5,0,location,null)
S.start()
S.start()
/datum/effect/system/explosion/smokeless/start()
new/obj/effect/explosion(location)
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
P.set_up(10,location)
P.start()
+24 -20
View File
@@ -21,7 +21,7 @@
return
/obj/effect/spider/attackby(var/obj/item/weapon/W, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(W))
if(W.attack_verb.len)
visible_message("<span class='warning'>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]</span>")
@@ -218,25 +218,8 @@
//=================
if(isturf(loc))
if(prob(25))
var/list/nearby = trange(5, src) - loc
if(nearby.len)
var/target_atom = pick(nearby)
walk_to(src, target_atom, 5)
if(prob(25))
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
else if(prob(5))
//vent crawl!
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
if(!v.welded)
entry_vent = v
walk_to(src, entry_vent, 5)
break
skitter()
if(amount_grown >= 100)
var/spawn_type = pick(grow_as)
new spawn_type(src.loc, src)
qdel(src)
else if(isorgan(loc))
if(!amount_grown) amount_grown = 1
var/obj/item/organ/external/O = loc
@@ -257,6 +240,27 @@
if(amount_grown)
amount_grown += rand(0,2)
/obj/effect/spider/spiderling/proc/skitter()
if(isturf(loc))
if(prob(25))
var/list/nearby = trange(5, src) - loc
if(nearby.len)
var/target_atom = pick(nearby)
walk_to(src, target_atom, 5)
if(prob(25))
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
else if(prob(5))
//vent crawl!
for(var/obj/machinery/atmospherics/unary/vent_pump/v in view(7,src))
if(!v.welded)
entry_vent = v
walk_to(src, entry_vent, 5)
break
if(amount_grown >= 100)
var/spawn_type = pick(grow_as)
new spawn_type(src.loc, src)
qdel(src)
/obj/effect/decal/cleanable/spiderling_remains
name = "spiderling remains"
desc = "Green squishy mess."
@@ -269,7 +273,7 @@
icon_state = "cocoon1"
health = 60
New()
/obj/effect/spider/cocoon/New()
icon_state = pick("cocoon1","cocoon2","cocoon3")
/obj/effect/spider/cocoon/Destroy()
+1 -4
View File
@@ -175,12 +175,9 @@ var/global/list/tele_landmarks = list() // Terrible, but the alternative is loop
if(isliving(A)) // Someday, implement parachutes. For now, just turbomurder whoever falls.
var/mob/living/L = A
for(var/i = 1 to 6)
L.adjustBruteLoss(100)
L.fall_impact(T, 42, 90, FALSE, TRUE) //You will not be defibbed from this.
message_admins("\The [A] fell out of the sky.")
explosion(T, 0, 1, 2)
A.forceMove(T)
T.visible_message("<span class='danger'><font size='3'>\A [A] falls out of the sky and crashes into \the [T]!</font></span>")
else
message_admins("ERROR: planetary_fall step trigger lacks a planet to fall onto.")
return
+11 -1
View File
@@ -80,6 +80,8 @@
var/list/sprite_sheets_obj = list()
var/toolspeed = 1.0 // This is a multipler on how 'fast' a tool works. e.g. setting this to 0.5 will make the tool work twice as fast.
var/attackspeed = DEFAULT_ATTACK_COOLDOWN // How long click delay will be when using this, in 1/10ths of a second. Checked in the user's get_attack_speed().
var/reach = 1 // Length of tiles it can reach, 1 is adjacent.
var/addblends // Icon overlay for ADD highlights when applicable.
/obj/item/New()
@@ -457,7 +459,7 @@ var/list/global/slot_flags_enumeration = list(
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
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>)") //BS12 EDIT ALG
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed())
user.do_attack_animation(M)
src.add_fingerprint(user)
@@ -640,3 +642,11 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/proc/pwr_drain()
return 0 // Process Kill
// Used for non-adjacent melee attacks with specific weapons capable of reaching more than one tile.
// This uses changeling range string A* but for this purpose its also applicable.
/obj/item/proc/attack_can_reach(var/atom/us, var/atom/them, var/range)
if(us.Adjacent(them))
return TRUE // Already adjacent.
if(AStar(get_turf(us), get_turf(them), /turf/proc/AdjacentTurfsRangedSting, /turf/proc/Distance, max_nodes=25, max_node_depth=range))
return TRUE
return FALSE
@@ -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)
+18 -1
View File
@@ -327,7 +327,6 @@
prob(2);/obj/item/weapon/gun/projectile/shotgun/pump/combat,
prob(4);/obj/item/weapon/gun/projectile/shotgun/pump/rifle,
prob(3);/obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever,
prob(3);/obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin,
prob(2);/obj/item/weapon/gun/projectile/silenced)
/obj/random/projectile/sec
@@ -1079,4 +1078,22 @@ var/list/multi_point_spawns
/obj/item/clothing/suit/space/void/security/riot,
/obj/item/clothing/head/helmet/space/void/security/riot
)
)
/obj/random/multiple/voidsuit/mining
name = "Random Mining Voidsuit"
desc = "This is a random mining voidsuit."
icon = 'icons/obj/clothing/suits.dmi'
icon_state = "rig-mining"
/obj/random/multiple/voidsuit/mining/item_to_spawn()
return pick(
prob(5);list(
/obj/item/clothing/suit/space/void/mining,
/obj/item/clothing/head/helmet/space/void/mining
),
prob(1);list(
/obj/item/clothing/suit/space/void/mining/alt,
/obj/item/clothing/head/helmet/space/void/mining/alt
)
)
+1 -1
View File
@@ -38,7 +38,7 @@
prob(8);/obj/item/weapon/melee/energy/sword,\
prob(8);/obj/item/weapon/gun/projectile/derringer,\
prob(8);/obj/item/weapon/gun/projectile/revolver/lemat,\
prob(8);/obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin,\
/* prob(8);/obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin,\ */
/* prob(8);/obj/item/weapon/gun/projectile/automatic/m41a,\ */
prob(7);/obj/item/weapon/material/butterfly,\
prob(7);/obj/item/weapon/material/butterfly/switchblade,\
@@ -0,0 +1,79 @@
// These contain structures to make certain 'alien' (as in the ayyy ones, not xenomorphs) submaps more filled, and don't really do anything.
/obj/structure/prop/alien
name = "some alien thing"
desc = "My description is broken, bug a developer."
icon = 'icons/obj/abductor.dmi'
density = TRUE
anchored = TRUE
var/interaction_message = null
/obj/structure/prop/alien/attack_hand(mob/living/user) // Used to tell the player that this isn't useful for anything.
if(!istype(user))
return FALSE
if(!interaction_message)
return ..()
else
to_chat(user, interaction_message)
/obj/structure/prop/alien/computer
name = "alien console"
desc = "The console flashes what appear to be symbols you've never seen before."
icon_state = "console-c"
interaction_message = "<span class='warning'>The console flashes a series of unknown symbols as you press a button on what is presumably a keyboard. It probably some sort of \
authentication error. Since you're not an alien, you should probably leave it alone.</span>"
/obj/structure/prop/alien/computer/camera
desc = "This console is briefly flashing video feeds of various locations close by."
icon_state = "camera"
/obj/structure/prop/alien/computer/camera/flipped
icon_state = "camera_flipped"
/obj/structure/prop/alien/dispenser
name = "alien dispenser"
desc = "This looks like it dispenses... something?"
icon_state = "dispenser"
interaction_message = "<span class='warning'>You don't see any mechanism to operate this. Probably for the best.</span>"
/obj/structure/prop/alien/pod
name = "alien pod"
desc = "This seems to be a container for something."
icon_state = "experiment"
interaction_message = "<span class='warning'>You don't see any mechanism to open this thing. Probably for the best.</span>"
/obj/structure/prop/alien/pod/open
name = "opened alien pod"
desc = "At one point, this probably contained something interesting..."
icon_state = "experiment-open"
interaction_message = "<span class='warning'>You don't see any mechanism to close this thing.</span>"
/obj/structure/prop/alien/power
name = "void core"
icon_state = "core"
desc = "An alien machine that seems to be producing energy seemingly out of nowhere."
interaction_message = "<span class='warning'>Messing with something that makes energy out of nowhere seems very unwise.</span>"
/obj/item/prop/alien
name = "some alien item"
desc = "My description is broken, bug a developer."
icon = 'icons/obj/abductor.dmi'
// Mostly useless. Research might like it, however.
/obj/item/prop/alien/junk
name = "alien object"
desc = "You have no idea what this thing does."
icon_state = "health"
w_class = ITEMSIZE_SMALL
var/static/list/possible_states = list("health", "spider", "slime", "emp", "species", "egg", "vent", "mindshock", "viral", "gland")
var/static/list/possible_tech = list(TECH_MATERIAL, TECH_ENGINEERING, TECH_PHORON, TECH_POWER, TECH_BIO, TECH_COMBAT, TECH_MAGNET, TECH_DATA)
/obj/item/prop/alien/junk/initialize()
..()
icon_state = pick(possible_states)
var/list/techs = possible_tech.Copy()
origin_tech = list()
for(var/i = 1 to rand(1, 4))
var/new_tech = pick(techs)
techs -= new_tech
origin_tech[new_tech] = rand(5, 9)
+1 -1
View File
@@ -81,7 +81,7 @@
health = maxhealth
else
take_damage(C.force)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(C))
return ..()
/obj/structure/catwalk/Crossed()
@@ -186,6 +186,9 @@
A.forceMove(src.loc)
qdel(src)
/obj/structure/closet/blob_act()
damage(100)
/obj/structure/closet/proc/damage(var/damage)
health -= damage
if(health <= 0)
@@ -313,6 +316,12 @@
if(!src.toggle())
usr << "<span class='notice'>It won't budge!</span>"
/obj/structure/closet/attack_ghost(mob/ghost)
if(ghost.client && ghost.client.inquisitive_ghost)
ghost.examinate(src)
if (!src.opened)
to_chat(ghost, "It contains: [english_list(contents)].")
/obj/structure/closet/verb/verb_toggleopen()
set src in oview(1)
set category = "Object"
@@ -134,3 +134,12 @@
new /obj/item/clothing/head/helmet/thunderdome(src)
new /obj/item/clothing/head/helmet/thunderdome(src)
new /obj/item/clothing/head/helmet/thunderdome(src)
/obj/structure/closet/alien
name = "alien container"
desc = "Contains secrets of the universe."
icon = 'icons/obj/abductor.dmi'
icon_state = "alien_locker"
icon_closed = "alien_locker"
icon_opened = "alien_locker_open"
anchored = TRUE
@@ -20,10 +20,12 @@
new /obj/item/clothing/head/that(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/clothing/head/hairflower(src)
new /obj/item/clothing/head/hairflower/pink(src)
new /obj/item/clothing/head/hairflower/yellow(src)
new /obj/item/clothing/head/hairflower/blue(src)
new /obj/item/clothing/head/pin/flower(src)
new /obj/item/clothing/head/pin/flower/pink(src)
new /obj/item/clothing/head/pin/flower/yellow(src)
new /obj/item/clothing/head/pin/flower/blue(src)
new /obj/item/clothing/head/pin/pink(src)
new /obj/item/clothing/head/pin/magnetic(src)
new /obj/item/clothing/under/sl_suit(src)
new /obj/item/clothing/under/sl_suit(src)
new /obj/item/clothing/under/rank/bartender(src)
@@ -34,6 +36,7 @@
new /obj/item/clothing/accessory/wcoat(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/shoes/laceup(src)
/*
* Chef
@@ -55,6 +58,8 @@
new /obj/item/weapon/storage/box/mousetraps(src)
new /obj/item/clothing/under/rank/chef(src)
new /obj/item/clothing/head/chefhat(src)
new /obj/item/weapon/storage/bag/food(src)
new /obj/item/weapon/storage/bag/food(src)
/*
* Janitor
@@ -68,6 +73,7 @@
/obj/structure/closet/jcloset/New()
..()
new /obj/item/clothing/under/rank/janitor(src)
new /obj/item/clothing/under/dress/maid/janitor(src)
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/weapon/cartridge/janitor(src)
new /obj/item/clothing/gloves/black(src)
+1 -1
View File
@@ -55,7 +55,7 @@
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
src.health -= W.force
@@ -117,6 +117,12 @@
base_icon_state = "voidcraft_vertical"
airlock_type = "/voidcraft/vertical"
/obj/structure/door_assembly/door_assembly_alien
base_icon_state = "alien"
base_name = "alien airlock"
airlock_type = "/alien"
glass = -1
/obj/structure/door_assembly/multi_tile
icon = 'icons/obj/doors/door_assembly2x1.dmi'
dir = EAST
+1 -1
View File
@@ -18,7 +18,7 @@
to_chat(user, "<span class='warning'>You need more energy to use the punching bag. Go eat something.</span>")
else
if(user.a_intent == I_HURT)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed())
flick("[icon_state]_hit", src)
playsound(src.loc, 'sound/effects/woodhit.ogg', 25, 1, -1)
user.do_attack_animation(src)
+3 -3
View File
@@ -140,7 +140,7 @@
/obj/structure/flora/skeleton
name = "hanging skeleton model"
icon = 'icons/obj/plants.dmi'
icon = 'icons/obj/plants.dmi' //what an interesting plant
icon_state = "hangskele"
desc = "It's an anatomical model of a human skeletal system made of plaster."
@@ -200,7 +200,7 @@
/obj/structure/flora/pottedplant/orientaltree
name = "potted oriental tree"
desc = "This is a rather oriental style tree. It's flowers are bright pink."
desc = "This is a rather oriental style tree. Its flowers are bright pink."
icon_state = "plant-10"
/obj/structure/flora/pottedplant/smallcactus
@@ -214,7 +214,7 @@
icon_state = "plant-12"
/obj/structure/flora/pottedplant/sticky
name = "styicky potted plant"
name = "sticky potted plant"
desc = "This is an odd plant. Its sticky leaves trap insects."
icon_state = "plant-13"
+1 -1
View File
@@ -36,7 +36,7 @@
to_chat(user, "<span class='warning'>\The [W] is ineffective at harming \the [src].</span>")
hit_animation()
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
// Shakes the tree slightly, more or less stolen from lockers.
+3
View File
@@ -43,6 +43,9 @@
return
/obj/structure/girder/blob_act()
dismantle()
/obj/structure/girder/proc/reset_girder()
anchored = 1
cover = initial(cover)
+2 -2
View File
@@ -27,7 +27,7 @@
/obj/structure/grille/attack_hand(mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed())
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.do_attack_animation(src)
@@ -151,7 +151,7 @@
//window placing end
else if(!(W.flags & CONDUCT) || !shock(user, 70))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
@@ -66,6 +66,9 @@
deflate(1)
return
/obj/structure/inflatable/blob_act()
deflate(1)
/obj/structure/inflatable/attack_hand(mob/user as mob)
add_fingerprint(user)
return
+10 -9
View File
@@ -1,7 +1,7 @@
//////Kitchen Spike
/obj/structure/kitchenspike
name = "a meat spike"
name = "meat spike"
icon = 'icons/obj/kitchen.dmi'
icon_state = "spike"
desc = "A spike for collecting meat from animals."
@@ -16,16 +16,16 @@
if(!istype(G, /obj/item/weapon/grab) || !ismob(G.affecting))
return
if(occupied)
user << "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>"
to_chat(user, "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>")
else
if(spike(G.affecting))
visible_message("<span class = 'danger'>[user] has forced [G.affecting] onto the spike, killing them instantly!</span>")
visible_message("<span class = 'danger'>[user] has forced [G.affecting] onto the spike, killing \him instantly!</span>")
var/mob/M = G.affecting
M.forceMove(src)
qdel(G)
qdel(M)
else
user << "<span class='danger'>They are too big for the spike, try something smaller!</span>"
to_chat(user, "<span class='danger'>They are too big for the spike, try something smaller!</span>")
/obj/structure/kitchenspike/proc/spike(var/mob/living/victim)
if(!istype(victim))
@@ -33,10 +33,11 @@
if(istype(victim, /mob/living/carbon/human))
var/mob/living/carbon/human/H = victim
if(!issmall(H))
if(istype(H.species, /datum/species/monkey))
meat_type = H.species.meat_type
icon_state = "spikebloody"
else
return 0
meat_type = H.species.meat_type
icon_state = "spikebloody"
else if(istype(victim, /mob/living/carbon/alien))
meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
icon_state = "spikebloodygreen"
@@ -54,8 +55,8 @@
meat--
new meat_type(get_turf(src))
if(meat > 1)
user << "You remove some meat from \the [victim_name]."
to_chat(user, "You cut some meat from \the [victim_name]'s body.")
else if(meat == 1)
user << "You remove the last piece of meat from \the [victim_name]!"
to_chat(user, "You remove the last piece of meat from \the [victim_name]!")
icon_state = "spike"
occupied = 0
@@ -400,6 +400,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
/obj/item/device/universal_translator,
/obj/item/device/aicard,
/obj/item/borg/upgrade/jetpack,
/obj/item/borg/upgrade/advhealth,
/obj/item/borg/upgrade/vtec,
/obj/item/borg/upgrade/tasercooler,
/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser,
@@ -435,3 +436,89 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
loot_depletion = TRUE
loot_left = 5 // This is to prevent people from asking the whole station to go down to some alien ruin to get massive amounts of phat lewt.
// Base type for alien piles.
/obj/structure/loot_pile/surface/alien
name = "alien pod"
desc = "A pod which looks bigger on the inside. Something quiet shiny might be inside?"
icon_state = "alien_pile1"
/obj/structure/loot_pile/surface/alien
common_loot = list(
/obj/item/prop/alien/junk
)
// May contain alien tools.
/obj/structure/loot_pile/surface/alien/engineering
uncommon_loot = list(
/obj/item/device/multitool/alien,
/obj/item/stack/cable_coil/alien,
/obj/item/weapon/crowbar/alien,
/obj/item/weapon/screwdriver/alien,
/obj/item/weapon/weldingtool/alien,
/obj/item/weapon/wirecutters/alien,
/obj/item/weapon/wrench/alien
)
rare_loot = list(
/obj/item/weapon/storage/belt/utility/alien/full
)
// May contain alien surgery equipment or powerful medication.
/obj/structure/loot_pile/surface/alien/medical
uncommon_loot = list(
/obj/item/weapon/surgical/FixOVein/alien,
/obj/item/weapon/surgical/bone_clamp/alien,
/obj/item/weapon/surgical/cautery/alien,
/obj/item/weapon/surgical/circular_saw/alien,
/obj/item/weapon/surgical/hemostat/alien,
/obj/item/weapon/surgical/retractor/alien,
/obj/item/weapon/surgical/scalpel/alien,
/obj/item/weapon/surgical/surgicaldrill/alien
)
rare_loot = list(
/obj/item/weapon/storage/belt/medical/alien
)
// May contain powercells or alien weaponry.
/obj/structure/loot_pile/surface/alien/security
uncommon_loot = list(
/obj/item/weapon/cell/device/weapon/recharge/alien,
/obj/item/clothing/suit/armor/alien,
/obj/item/clothing/head/helmet/alien
)
rare_loot = list(
/obj/item/clothing/suit/armor/alien/tank,
/obj/item/weapon/gun/energy/alien
)
// The pile found at the very end, and as such has the best loot.
/obj/structure/loot_pile/surface/alien/end
chance_uncommon = 30
chance_rare = 10
common_loot = list(
/obj/item/device/multitool/alien,
/obj/item/stack/cable_coil/alien,
/obj/item/weapon/crowbar/alien,
/obj/item/weapon/screwdriver/alien,
/obj/item/weapon/weldingtool/alien,
/obj/item/weapon/wirecutters/alien,
/obj/item/weapon/wrench/alien,
/obj/item/weapon/surgical/FixOVein/alien,
/obj/item/weapon/surgical/bone_clamp/alien,
/obj/item/weapon/surgical/cautery/alien,
/obj/item/weapon/surgical/circular_saw/alien,
/obj/item/weapon/surgical/hemostat/alien,
/obj/item/weapon/surgical/retractor/alien,
/obj/item/weapon/surgical/scalpel/alien,
/obj/item/weapon/surgical/surgicaldrill/alien,
/obj/item/weapon/cell/device/weapon/recharge/alien,
/obj/item/clothing/suit/armor/alien,
/obj/item/clothing/head/helmet/alien,
/obj/item/weapon/gun/energy/alien
)
uncommon_loot = list(
/obj/item/weapon/storage/belt/medical/alien,
/obj/item/weapon/storage/belt/utility/alien/full,
/obj/item/clothing/suit/armor/alien/tank,
/obj/item/clothing/head/helmet/alien/tank,
)
+24 -99
View File
@@ -77,6 +77,9 @@
return
return
/obj/structure/morgue/attack_robot(mob/user)
if(Adjacent(user))
attack_hand(user)
/obj/structure/morgue/attack_hand(mob/user as mob)
if (src.connected)
@@ -156,6 +159,10 @@
connected = null
return ..()
/obj/structure/m_tray/attack_robot(mob/user)
if(Adjacent(user))
attack_hand(user)
/obj/structure/m_tray/attack_hand(mob/user as mob)
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
@@ -181,7 +188,7 @@
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
B << "<span class='warning'>\The [user] stuffs [O] into [src]!</span>"
to_chat(B, "<span class='warning'>\The [user] stuffs [O] into [src]!</span>")
return
@@ -189,25 +196,16 @@
* Crematorium
*/
/obj/structure/crematorium
/obj/structure/morgue/crematorium
name = "crematorium"
desc = "A human incinerator. Works well on barbeque nights."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "crema1"
density = 1
var/obj/structure/c_tray/connected = null
anchored = 1.0
var/cremating = 0
var/id = 1
var/locked = 0
/obj/structure/crematorium/Destroy()
if(connected)
qdel(connected)
connected = null
return ..()
/obj/structure/crematorium/proc/update()
/obj/structure/morgue/crematorium/update()
if (src.connected)
src.icon_state = "crema0"
else
@@ -217,37 +215,7 @@
src.icon_state = "crema1"
return
/obj/structure/crematorium/ex_act(severity)
switch(severity)
if(1.0)
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(2.0)
if (prob(50))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
if(3.0)
if (prob(5))
for(var/atom/movable/A as mob|obj in src)
A.forceMove(src.loc)
ex_act(severity)
qdel(src)
return
return
/obj/structure/crematorium/attack_hand(mob/user as mob)
// if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH
// user.show_message("<span class='warning'>Uh-oh, that was a bad idea.</span>", 1)
// //usr << "Uh-oh, that was a bad idea."
// src:loc:poison += 20000000
// src:loc:firelevel = src:loc:poison
// return
/obj/structure/morgue/crematorium/attack_hand(mob/user as mob)
if (cremating)
usr << "<span class='warning'>It's locked.</span>"
return
@@ -260,7 +228,7 @@
qdel(src.connected)
else if (src.locked == 0)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
src.connected = new /obj/structure/c_tray( src.loc )
src.connected = new /obj/structure/m_tray/c_tray( src.loc )
step(src.connected, dir) //Vorestation Edit
src.connected.layer = OBJ_LAYER
var/turf/T = get_step(src, dir) //Vorestation Edit
@@ -276,7 +244,7 @@
src.add_fingerprint(user)
update()
/obj/structure/crematorium/attackby(P as obj, mob/user as mob)
/obj/structure/morgue/crematorium/attackby(P as obj, mob/user as mob)
if (istype(P, /obj/item/weapon/pen))
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
if (user.get_active_hand() != P)
@@ -291,13 +259,13 @@
src.add_fingerprint(user)
return
/obj/structure/crematorium/relaymove(mob/user as mob)
/obj/structure/morgue/crematorium/relaymove(mob/user as mob)
if (user.stat || locked)
return
src.connected = new /obj/structure/c_tray( src.loc )
step(src.connected, SOUTH)
src.connected = new /obj/structure/m_tray/c_tray( src.loc )
step(src.connected, EAST)
src.connected.layer = OBJ_LAYER
var/turf/T = get_step(src, SOUTH)
var/turf/T = get_step(src, EAST)
if (T.contents.Find(src.connected))
src.connected.connected = src
src.icon_state = "crema0"
@@ -309,25 +277,22 @@
src.connected = null
return
/obj/structure/crematorium/proc/cremate(atom/A, mob/user as mob)
// for(var/obj/machinery/crema_switch/O in src) //trying to figure a way to call the switch, too drunk to sort it out atm
// if(var/on == 1)
// return
/obj/structure/morgue/crematorium/proc/cremate(atom/A, mob/user as mob)
if(cremating)
return //don't let you cremate something twice or w/e
if(contents.len <= 0)
for (var/mob/M in viewers(src))
M.show_message("<span class='warning'>You hear a hollow crackle.</span>", 1)
to_chat(M,"<span class='warning'>You hear a hollow crackle.</span>")
return
else
if(!isemptylist(src.search_contents_for(/obj/item/weapon/disk/nuclear)))
usr << "You get the feeling that you shouldn't cremate one of the items in the cremator."
to_chat(user,"You get the feeling that you shouldn't cremate one of the items in the cremator.")
return
for (var/mob/M in viewers(src))
M.show_message("<span class='warning'>You hear a roar as the crematorium activates.</span>", 1)
to_chat(M,"<span class='warning'>You hear a roar as the crematorium activates.</span>")
cremating = 1
locked = 1
@@ -363,51 +328,11 @@
/*
* Crematorium tray
*/
/obj/structure/c_tray
/obj/structure/m_tray/c_tray
name = "crematorium tray"
desc = "Apply body before burning."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "cremat"
density = 1
layer = 2.0
var/obj/structure/crematorium/connected = null
anchored = 1
throwpass = 1
/obj/structure/c_tray/Destroy()
if(connected && connected.connected == src)
connected.connected = null
connected = null
return ..()
/obj/structure/c_tray/attack_hand(mob/user as mob)
if (src.connected)
for(var/atom/movable/A as mob|obj in src.loc)
if (!( A.anchored ))
A.forceMove(src.connected)
//Foreach goto(26)
src.connected.connected = null
src.connected.update()
add_fingerprint(user)
//SN src = null
qdel(src)
return
return
/obj/structure/c_tray/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
if ((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
return
if (!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
return
if (!ismob(user) || user.stat || user.lying || user.stunned)
return
O.forceMove(src.loc)
if (user != O)
for(var/mob/B in viewers(user, 3))
if ((B.client && !( B.blinded )))
B << text("<span class='warning'>[] stuffs [] into []!</span>", user, O, src)
//Foreach goto(99)
return
/obj/machinery/button/crematorium
name = "crematorium igniter"
@@ -421,9 +346,9 @@
if(..())
return
if(src.allowed(user))
for (var/obj/structure/crematorium/C in world)
for (var/obj/structure/morgue/crematorium/C in world)
if (C.id == id)
if (!C.cremating)
C.cremate(user)
else
usr << "<span class='warning'>Access denied.</span>"
to_chat(user,"<span class='warning'>Access denied.</span>")
+2 -2
View File
@@ -1,11 +1,11 @@
/obj/structure/crematorium/vr
/obj/structure/morgue/crematorium/vr
var/list/allowed_items = list(/obj/item/organ,
/obj/item/weapon/implant,
/obj/item/weapon/material/shard/shrapnel,
/mob/living)
/obj/structure/crematorium/vr/cremate(atom/A, mob/user as mob)
/obj/structure/morgue/crematorium/vr/cremate(atom/A, mob/user as mob)
if(cremating)
return //don't let you cremate something twice or w/e
+17
View File
@@ -27,6 +27,23 @@
desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
icon_state = "piano"
/obj/structure/device/piano/verb/rotate()
set name = "Rotate Piano"
set category = "Object"
set src in oview(1)
if(istype(usr,/mob/living/simple_animal/mouse))
return
else if(!usr || !isturf(usr.loc))
return
else if(usr.stat || usr.restrained())
return
else if (istype(usr,/mob/observer/ghost) && !config.ghost_interaction)
return
else
src.set_dir(turn(src.dir, 90))
return
/obj/structure/device/piano/proc/playnote(var/note as text)
//world << "Note: [note]"
var/soundfile
+4 -4
View File
@@ -199,7 +199,7 @@
/obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob)
// Dismantle
if(istype(W, /obj/item/weapon/wrench) && !anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<span class='notice'>\The [user] dismantles \the [src].</span>", "<span class='notice'>You dismantle \the [src].</span>")
new /obj/item/stack/material/steel(get_turf(usr), 2)
@@ -210,7 +210,7 @@
if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/F = W
if(F.welding)
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
playsound(src.loc, F.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>", "<span class='notice'>You repair some damage to \the [src].</span>")
health = min(health+(maxhealth/5), maxhealth) // 20% repair per application
@@ -219,7 +219,7 @@
// Install
if(istype(W, /obj/item/weapon/screwdriver))
user.visible_message(anchored ? "<span class='notice'>\The [user] begins unscrewing \the [src].</span>" : "<span class='notice'>\The [user] begins fasten \the [src].</span>" )
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(loc, W.usesound, 75, 1)
if(do_after(user, 10, src))
to_chat(user, (anchored ? "<span class='notice'>You have unfastened \the [src] from the floor.</span>" : "<span class='notice'>You have fastened \the [src] to the floor.</span>"))
anchored = !anchored
@@ -258,7 +258,7 @@
else
playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
take_damage(W.force)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(W))
return ..()
+15 -12
View File
@@ -42,9 +42,9 @@ FLOOR SAFES
/obj/structure/safe/proc/check_unlocked(mob/user as mob, canhear)
if(user && canhear)
if(tumbler_1_pos == tumbler_1_open)
user << "<span class='notice'>You hear a [pick("tonk", "krunk", "plunk")] from [src].</span>"
to_chat(user, "<span class='notice'>You hear a [pick("tonk", "krunk", "plunk")] from \the [src].</span>")
if(tumbler_2_pos == tumbler_2_open)
user << "<span class='notice'>You hear a [pick("tink", "krink", "plink")] from [src].</span>"
to_chat(user, "<span class='notice'>You hear a [pick("tink", "krink", "plink")] from \the [src].</span>")
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
if(user) visible_message("<b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b>")
return 1
@@ -95,13 +95,13 @@ FLOOR SAFES
if(href_list["open"])
if(check_unlocked())
user << "<span class='notice'>You [open ? "close" : "open"] [src].</span>"
to_chat(user, "<span class='notice'>You [open ? "close" : "open"] [src].</span>")
open = !open
update_icon()
updateUsrDialog()
return
else
user << "<span class='notice'>You can't [open ? "close" : "open"] [src], the lock is engaged!</span>"
to_chat(user, "<span class='notice'>You can't [open ? "close" : "open"] [src], the lock is engaged!</span>")
return
if(href_list["decrement"])
@@ -109,12 +109,14 @@ FLOOR SAFES
if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 71)
tumbler_1_pos = decrement(tumbler_1_pos)
if(canhear)
user << "<span class='notice'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>"
to_chat(user, "<span class='notice'>You hear a [pick("clack", "scrape", "clank")] from \the [src].</span>")
if(tumbler_1_pos == tumbler_2_pos + 37 || tumbler_1_pos == tumbler_2_pos - 35)
tumbler_2_pos = decrement(tumbler_2_pos)
if(canhear)
user << "<span class='notice'>You hear a [pick("click", "chink", "clink")] from [src].</span>"
check_unlocked(user, canhear)
to_chat(user, "<span class='notice'>You hear a [pick("click", "chink", "clink")] from \the [src].</span>")
playsound(user, 'sound/machines/click.ogg', 20, 1)
check_unlocked(user, canhear)
updateUsrDialog()
return
@@ -123,11 +125,12 @@ FLOOR SAFES
if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 71)
tumbler_1_pos = increment(tumbler_1_pos)
if(canhear)
user << "<span class='notice'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>"
to_chat(user, "<span class='notice'>You hear a [pick("clack", "scrape", "clank")] from \the [src].</span>")
if(tumbler_1_pos == tumbler_2_pos - 37 || tumbler_1_pos == tumbler_2_pos + 35)
tumbler_2_pos = increment(tumbler_2_pos)
if(canhear)
user << "<span class='notice'>You hear a [pick("click", "chink", "clink")] from [src].</span>"
to_chat(user, "<span class='notice'>You hear a [pick("click", "chink", "clink")] from \the [src].</span>")
playsound(user, 'sound/machines/click.ogg', 20, 1)
check_unlocked(user, canhear)
updateUsrDialog()
return
@@ -148,15 +151,15 @@ FLOOR SAFES
space += I.w_class
user.drop_item()
I.loc = src
user << "<span class='notice'>You put [I] in [src].</span>"
to_chat(user, "<span class='notice'>You put [I] in \the [src].</span>")
updateUsrDialog()
return
else
user << "<span class='notice'>[I] won't fit in [src].</span>"
to_chat(user, "<span class='notice'>[I] won't fit in \the [src].</span>")
return
else
if(istype(I, /obj/item/clothing/accessory/stethoscope))
user << "Hold [I] in one of your hands while you manipulate the dial."
to_chat(user, "Hold [I] in one of your hands while you manipulate the dial.")
return
+57 -4
View File
@@ -156,9 +156,11 @@
/obj/structure/sign/warning/docking_area
name = "\improper KEEP CLEAR: DOCKING AREA"
icon_state = "evac"
/obj/structure/sign/warning/engineering_access
name = "\improper ENGINEERING ACCESS"
icon_state = "engine"
/obj/structure/sign/warning/fire
name = "\improper DANGER: FIRE"
@@ -185,9 +187,11 @@
/obj/structure/sign/warning/mail_delivery
name = "\improper MAIL DELIVERY"
icon_state = "mail"
/obj/structure/sign/warning/moving_parts
name = "\improper MOVING PARTS"
icon_state = "movingparts"
/obj/structure/sign/warning/nosmoking_1
name = "\improper NO SMOKING"
@@ -207,12 +211,15 @@
/obj/structure/sign/warning/secure_area
name = "\improper SECURE AREA"
icon_state = "securearea2"
/obj/structure/sign/warning/secure_area/armory
name = "\improper ARMORY"
icon_state = "armory"
/obj/structure/sign/warning/server_room
name = "\improper SERVER ROOM"
icon_state = "server"
/obj/structure/sign/warning/siphon_valve
name = "\improper SIPHON VALVE"
@@ -224,16 +231,19 @@
/obj/structure/sign/warning/vent_port
name = "\improper EJECTION/VENTING PORT"
/obj/structure/sign/warning/emergence
name = "\improper EMERGENT INTELLIGENCE DETAILS"
icon_state = "rogueai"
/obj/structure/sign/redcross
name = "medbay"
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
icon_state = "redcross"
icon_state = "bluecross"
/obj/structure/sign/greencross
name = "medbay"
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here."
icon_state = "greencross"
icon_state = "bluecross2"
/obj/structure/sign/goldenplaque
name = "The Most Robust Men Award for Robustness"
@@ -250,6 +260,11 @@
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
icon_state = "atmosplaque"
/obj/structure/sign/periodic
name = "periodic table"
desc = "A sign reminding those visiting of the elements of the periodic table- though, they should have memorized them by now."
icon_state = "periodic"
/obj/structure/sign/double/maltesefalcon //The sign is 64x32, so it needs two tiles. ;3
name = "The Maltese Falcon"
desc = "The Maltese Falcon, Space Bar and Grill."
@@ -262,7 +277,7 @@
/obj/structure/sign/science //These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
name = "\improper SCIENCE!"
desc = "A warning sign which reads 'SCIENCE!'."
desc = "A warning sign which reads 'SCIENCE'."
icon_state = "science1"
/obj/structure/sign/chemistry
@@ -278,13 +293,18 @@
/obj/structure/sign/hydro
name = "\improper HYDROPONICS"
desc = "A sign labelling an area as a place where plants are grown."
icon_state = "hydro1"
icon_state = "hydro2"
/obj/structure/sign/hydrostorage
name = "\improper HYDROPONICS STORAGE"
desc = "A sign labelling an area as a place where plant growing supplies are kept."
icon_state = "hydro3"
/obj/structure/sign/xenobio
name = "\improper XENOBIOLOGY"
desc = "A warning sign which reads XENOBIOLOGY."
icon_state = "xenobio3"
/obj/structure/sign/directions
name = "direction sign"
desc = "A direction sign, claiming to know the way."
@@ -342,6 +362,11 @@
icon_state = "direction_elv"
// VOREStation Edit End
/obj/structure/sign/directions/roomnum
name = "room number"
desc = "A sign detailing the number of the room beside it."
icon_state = "roomnum"
/obj/structure/sign/christmas/lights
name = "Christmas lights"
desc = "Flashy and pretty."
@@ -719,3 +744,31 @@
/obj/structure/sign/hangar/three
name = "\improper Hangar Three"
icon_state = "hangar-3"
/obj/structure/sign/atmos
name = "\improper WASTE"
icon_state = "atmos_waste"
/obj/structure/sign/atmos/o2
name = "\improper OXYGEN"
icon_state = "atmos_o2"
/obj/structure/sign/atmos/co2
name = "\improper CARBON DIOXIDE"
icon_state = "atmos_co2"
/obj/structure/sign/atmos/phoron
name = "\improper PHORON"
icon_state = "atmos_phoron"
/obj/structure/sign/atmos/n2o
name = "\improper NITROUS OXIDE"
icon_state = "atmos_n2o"
/obj/structure/sign/atmos/n2
name = "\improper NITROGEN"
icon_state = "atmos_n2"
/obj/structure/sign/atmos/air
name = "\improper AIR"
icon_state = "atmos_air"
@@ -96,7 +96,7 @@
qdel(src)
else if(istype(W,/obj/item/stack))
if(padding_material)
user << "\The [src] is already padded."
to_chat(user, "\The [src] is already padded.")
return
var/obj/item/stack/C = W
if(C.get_amount() < 1) // How??
@@ -111,21 +111,21 @@
if(M.material && (M.material.flags & MATERIAL_PADDING))
padding_type = "[M.material.name]"
if(!padding_type)
user << "You cannot pad \the [src] with that."
to_chat(user, "You cannot pad \the [src] with that.")
return
C.use(1)
if(!istype(src.loc, /turf))
user.drop_from_inventory(src)
src.loc = get_turf(src)
user << "You add padding to \the [src]."
to_chat(user, "You add padding to \the [src].")
add_padding(padding_type)
return
else if (istype(W, /obj/item/weapon/wirecutters))
if(!padding_material)
user << "\The [src] has no padding to remove."
to_chat(user, "\The [src] has no padding to remove.")
return
user << "You remove the padding from \the [src]."
to_chat(user, "You remove the padding from \the [src].")
playsound(src.loc, W.usesound, 100, 1)
remove_padding()
@@ -133,7 +133,7 @@
var/obj/item/weapon/grab/G = W
var/mob/living/affecting = G.affecting
if(buckled_mob) //Handles trying to buckle someone else to a chair when someone else is on it
user << "<span class='notice'>\The [src] already has someone buckled to it.</span>"
to_chat(user, "<span class='notice'>\The [src] already has someone buckled to it.</span>")
return
user.visible_message("<span class='notice'>[user] attempts to buckle [affecting] into \the [src]!</span>")
if(do_after(user, 20, G.affecting))
@@ -175,13 +175,6 @@
/obj/structure/bed/padded/New(var/newloc)
..(newloc,"plastic","cotton")
/obj/structure/bed/alien
name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
/obj/structure/bed/alien/New(var/newloc)
..(newloc,"resin")
/obj/structure/bed/double
name = "double bed"
icon_state = "doublebed"
@@ -203,13 +196,22 @@
*/
/obj/structure/bed/roller
name = "roller bed"
desc = "A portable bed-on-wheels made for transporting medical patients."
icon = 'icons/obj/rollerbed.dmi'
icon_state = "down"
icon_state = "rollerbed"
anchored = 0
surgery_odds = 75
var/bedtype = /obj/structure/bed/roller
var/rollertype = /obj/item/roller
/obj/structure/bed/roller/adv
name = "advanced roller bed"
icon_state = "rollerbedadv"
bedtype = /obj/structure/bed/roller/adv
rollertype = /obj/item/roller/adv
/obj/structure/bed/roller/update_icon()
return // Doesn't care about material or anything else.
return
/obj/structure/bed/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench) || istype(W,/obj/item/stack) || istype(W, /obj/item/weapon/wirecutters))
@@ -219,7 +221,7 @@
user_unbuckle_mob(user)
else
visible_message("[user] collapses \the [src.name].")
new/obj/item/roller(get_turf(src))
new rollertype(get_turf(src))
spawn(0)
qdel(src)
return
@@ -229,32 +231,42 @@
name = "roller bed"
desc = "A collapsed roller bed that can be carried around."
icon = 'icons/obj/rollerbed.dmi'
icon_state = "folded"
icon_state = "folded_rollerbed"
slot_flags = SLOT_BACK
w_class = ITEMSIZE_LARGE // Can't be put in backpacks. Oh well.
w_class = ITEMSIZE_LARGE
var/rollertype = /obj/item/roller
var/bedtype = /obj/structure/bed/roller
/obj/item/roller/attack_self(mob/user)
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
R.add_fingerprint(user)
qdel(src)
var/obj/structure/bed/roller/R = new bedtype(user.loc)
R.add_fingerprint(user)
qdel(src)
/obj/item/roller/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/roller_holder))
var/obj/item/roller_holder/RH = W
if(!RH.held)
user << "<span class='notice'>You collect the roller bed.</span>"
to_chat(user, "<span class='notice'>You collect the roller bed.</span>")
src.loc = RH
RH.held = src
return
..()
/obj/item/roller/adv
name = "advanced roller bed"
desc = "A high-tech, compact version of the regular roller bed."
icon_state = "folded_rollerbedadv"
w_class = ITEMSIZE_NORMAL
rollertype = /obj/item/roller/adv
bedtype = /obj/structure/bed/roller/adv
/obj/item/roller_holder
name = "roller bed rack"
desc = "A rack for carrying a collapsed roller bed."
icon = 'icons/obj/rollerbed.dmi'
icon_state = "folded"
icon_state = "rollerbed"
var/obj/item/roller/held
/obj/item/roller_holder/New()
@@ -264,11 +276,11 @@
/obj/item/roller_holder/attack_self(mob/user as mob)
if(!held)
user << "<span class='notice'>The rack is empty.</span>"
to_chat(user, "<span class='notice'>The rack is empty.</span>")
return
user << "<span class='notice'>You deploy the roller bed.</span>"
var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc)
to_chat(user, "<span class='notice'>You deploy the roller bed.</span>")
var/obj/structure/bed/roller/R = new held.bedtype(user.loc)
R.add_fingerprint(user)
qdel(held)
held = null
@@ -287,13 +299,13 @@
M.pixel_y = 6
M.old_y = 6
density = 1
icon_state = "up"
icon_state = "[initial(icon_state)]_up"
else
M.pixel_y = 0
M.old_y = 0
density = 0
icon_state = "down"
icon_state = "[initial(icon_state)]"
update_icon()
return ..()
/obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location)
@@ -302,7 +314,19 @@
if(!ishuman(usr)) return
if(buckled_mob) return 0
visible_message("[usr] collapses \the [src.name].")
new/obj/item/roller(get_turf(src))
new rollertype(get_turf(src))
spawn(0)
qdel(src)
return
/obj/structure/bed/alien
name = "resting contraption"
desc = "Whatever species designed this must've enjoyed relaxation as well. Looks vaguely comfy."
icon = 'icons/obj/abductor.dmi'
icon_state = "bed"
/obj/structure/bed/alien/update_icon()
return // Doesn't care about material or anything else.
/obj/structure/bed/alien/attackby(obj/item/weapon/W, mob/user)
return // No deconning.
@@ -72,7 +72,7 @@ var/global/list/stool_cache = list() //haha stool
/obj/item/weapon/stool/attack(mob/M as mob, mob/user as mob)
if (prob(5) && istype(M,/mob/living))
user.visible_message("<span class='danger'>[user] breaks [src] over [M]'s back!</span>")
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed())
user.do_attack_animation(M)
user.drop_from_inventory(src)
+2 -2
View File
@@ -18,7 +18,7 @@
/obj/structure/toilet/attack_hand(mob/living/user as mob)
if(swirlie)
usr.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
usr.setClickCooldown(user.get_attack_speed())
usr.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie.name]'s head!</span>", "<span class='notice'>You slam the toilet seat onto [swirlie.name]'s head!</span>", "You hear reverberating porcelain.")
swirlie.adjustBruteLoss(5)
return
@@ -54,7 +54,7 @@
return
if(istype(I, /obj/item/weapon/grab))
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(I))
var/obj/item/weapon/grab/G = I
if(isliving(G.affecting))
+7 -4
View File
@@ -125,6 +125,9 @@
shatter(0)
return
/obj/structure/window/blob_act()
take_damage(50)
//TODO: Make full windows a separate type of window.
//Once a full window, it will always be a full window, so there's no point
//having the same type for both.
@@ -172,7 +175,7 @@
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
/obj/structure/window/attack_hand(mob/user as mob)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed())
if(HULK in user.mutations)
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
@@ -200,7 +203,7 @@
return
/obj/structure/window/attack_generic(var/mob/user, var/damage)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed())
if(!damage)
return
if(damage >= 10)
@@ -295,7 +298,7 @@
var/obj/item/frame/F = W
F.try_build(src)
else
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(user.get_attack_speed(W))
if(W.damtype == BRUTE || W.damtype == BURN)
user.do_attack_animation(src)
hit(W.force)
@@ -428,7 +431,7 @@
var/list/dirs = list()
if(anchored)
for(var/obj/structure/window/W in orange(src,1))
if(W.anchored && W.density && W.type == src.type && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
if(W.anchored && W.density && W.glasstype == src.glasstype && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
dirs += get_dir(src, W)
var/list/connections = dirs_to_corner_states(dirs)
+26 -1
View File
@@ -2,6 +2,7 @@
name = "weapon"
icon = 'icons/obj/weapons.dmi'
hitsound = "swing_hit"
var/cleaving = FALSE // Used to avoid infinite cleaving.
/obj/item/weapon/Bump(mob/M as mob)
spawn(0)
@@ -12,4 +13,28 @@
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_melee.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi',
)
)
// Attacks mobs (atm only simple ones due to friendly fire issues) that are adjacent to the target and user.
/obj/item/weapon/proc/cleave(var/mob/living/user, var/mob/living/target)
if(cleaving)
return // We're busy.
cleaving = TRUE
var/hit_mobs = 0
for(var/mob/living/simple_animal/SA in orange(get_turf(target), 1))
if(SA.stat == DEAD) // Don't beat a dead horse.
continue
if(SA == user) // Don't hit ourselves. Simple mobs shouldn't be able to do this but that might change later to be able to hit all mob/living-s.
continue
if(SA == target) // We (presumably) already hit the target before cleave() was called. orange() should prevent this but just to be safe...
continue
if(user.faction == SA.faction) // Avoid friendly fire.
continue
if(!SA.Adjacent(user) || !SA.Adjacent(target)) // Cleaving only hits mobs near the target mob and user.
continue
if(resolve_attackby(SA, user)) // Hit them with the weapon. This won't cause recursive cleaving due to the cleaving variable being set to true.
hit_mobs++
if(hit_mobs)
to_chat(user, "<span class='danger'>You used \the [src] to attack [hit_mobs] other thing\s!</span>")
cleaving = FALSE // We're done now.