Merge branch 'master' of https://github.com/PolarisSS13/Polaris into parachute

# Conflicts:
#	icons/mob/back.dmi
#	icons/obj/storage.dmi
This commit is contained in:
Anewbe
2017-12-01 18:47:06 -06:00
171 changed files with 13871 additions and 11240 deletions
+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()
+1 -1
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>")
+2 -1
View File
@@ -80,6 +80,7 @@
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/addblends // Icon overlay for ADD highlights when applicable.
/obj/item/New()
@@ -457,7 +458,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)
@@ -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()
+11 -2
View File
@@ -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) || (!H.isSynthetic() && !H.can_defib))
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)
@@ -423,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)
@@ -645,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
+2 -5
View File
@@ -62,7 +62,7 @@
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
@@ -75,9 +75,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
@@ -147,7 +144,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)
@@ -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 ..()
+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"
*/
+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)
@@ -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")
+2 -2
View File
@@ -81,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>")
@@ -286,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>")
@@ -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"
@@ -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"
@@ -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)
@@ -379,6 +379,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."
@@ -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"
+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)
+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()
@@ -185,6 +185,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)
+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
+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)
+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
+1 -1
View File
@@ -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 ..()
+58 -5
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."
@@ -328,6 +348,11 @@
desc = "A direction sign, pointing out which way the Cargo department is."
icon_state = "direction_crg"
/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."
@@ -366,4 +391,32 @@
/obj/structure/sign/hangar/three
name = "\improper Hangar Three"
icon_state = "hangar-3"
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"
@@ -197,7 +197,7 @@
name = "roller bed"
desc = "A portable bed-on-wheels made for transporting medical patients."
icon = 'icons/obj/rollerbed.dmi'
icon_state = "rollerbed_down"
icon_state = "rollerbed"
anchored = 0
surgery_odds = 75
var/bedtype = /obj/structure/bed/roller
@@ -205,7 +205,7 @@
/obj/structure/bed/roller/adv
name = "advanced roller bed"
icon_state = "rollerbedadv_down"
icon_state = "rollerbedadv"
bedtype = /obj/structure/bed/roller/adv
rollertype = /obj/item/roller/adv
@@ -230,7 +230,7 @@
name = "roller bed"
desc = "A collapsed roller bed that can be carried around."
icon = 'icons/obj/rollerbed.dmi'
icon_state = "rollerbed"
icon_state = "folded_rollerbed"
slot_flags = SLOT_BACK
w_class = ITEMSIZE_LARGE
var/rollertype = /obj/item/roller
@@ -256,7 +256,7 @@
/obj/item/roller/adv
name = "advanced roller bed"
desc = "A high-tech, compact version of the regular roller bed."
icon_state = "rollerbedadv"
icon_state = "folded_rollerbedadv"
w_class = ITEMSIZE_NORMAL
rollertype = /obj/item/roller/adv
bedtype = /obj/structure/bed/roller/adv
@@ -303,7 +303,7 @@
M.pixel_y = 0
M.old_y = 0
density = 0
icon_state = "[initial(icon_state)]_down"
icon_state = "[initial(icon_state)]"
update_icon()
return ..()
@@ -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))
+6 -3
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)
+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.