Merge branch 'master' of https://github.com/VOREStation/VOREStation into Fluff_Items_worshop

This commit is contained in:
JOAN-RIG\Joan Risu
2017-08-08 14:56:29 -07:00
833 changed files with 76095 additions and 33675 deletions
@@ -122,7 +122,7 @@
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wirecutters))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
if(ruined)
user << "<span class='notice'>You remove the remnants of the poster.</span>"
qdel(src)
@@ -111,15 +111,15 @@
set name = "Instant TTV"
if(!check_rights(R_SPAWN)) return
var/obj/effect/spawner/newbomb/proto = /obj/effect/spawner/newbomb/radio/custom
var/p = input("Enter phoron amount (mol):","Phoron", initial(proto.phoron_amt)) as num|null
if(p == null) return
var/o = input("Enter oxygen amount (mol):","Oxygen", initial(proto.oxygen_amt)) as num|null
if(o == null) return
var/c = input("Enter carbon dioxide amount (mol):","Carbon Dioxide", initial(proto.carbon_amt)) as num|null
if(c == null) return
@@ -129,13 +129,13 @@
name = "TTV bomb"
icon = 'icons/mob/screen1.dmi'
icon_state = "x"
var/assembly_type = /obj/item/device/assembly/signaler
//Note that the maximum amount of gas you can put in a 70L air tank at 1013.25 kPa and 519K is 16.44 mol.
var/phoron_amt = 10.96
var/oxygen_amt = 16.44
var/carbon_amt = 0.0
var/phoron_amt = 12
var/oxygen_amt = 18
var/carbon_amt = 0
/obj/effect/spawner/newbomb/timer
name = "TTV bomb - timer"
@@ -144,8 +144,8 @@
/obj/effect/spawner/newbomb/timer/syndicate
name = "TTV bomb - merc"
//High yield bombs. Yes, it is possible to make these with toxins
phoron_amt = 15.66
oxygen_amt = 24.66
phoron_amt = 18.5
oxygen_amt = 28.5
/obj/effect/spawner/newbomb/proximity
name = "TTV bomb - proximity"
@@ -170,15 +170,20 @@
PT.master = V
OT.master = V
PT.air_contents.temperature = PHORON_FLASHPOINT
PT.valve_welded = 1
PT.air_contents.gas["phoron"] = phoron_amt
PT.air_contents.gas["carbon_dioxide"] = carbon_amt
PT.air_contents.total_moles = phoron_amt + carbon_amt
PT.air_contents.temperature = PHORON_MINIMUM_BURN_TEMPERATURE+1
PT.air_contents.update_values()
OT.air_contents.temperature = PHORON_FLASHPOINT
OT.valve_welded = 1
OT.air_contents.gas["oxygen"] = oxygen_amt
OT.air_contents.total_moles = oxygen_amt
OT.air_contents.temperature = PHORON_MINIMUM_BURN_TEMPERATURE+1
OT.air_contents.update_values()
var/obj/item/device/assembly/S = new assembly_type(V)
@@ -190,3 +195,62 @@
V.update_icon()
qdel(src)
///////////////////////
//One Tank Bombs, WOOOOOOO! -Luke
///////////////////////
/obj/effect/spawner/onetankbomb
name = "Single-tank bomb"
icon = 'icons/mob/screen1.dmi'
icon_state = "x"
// var/assembly_type = /obj/item/device/assembly/signaler
//Note that the maximum amount of gas you can put in a 70L air tank at 1013.25 kPa and 519K is 16.44 mol.
var/phoron_amt = 0
var/oxygen_amt = 0
/obj/effect/spawner/onetankbomb/New(newloc) //just needs an assembly.
..(newloc)
var/type = pick(/obj/item/weapon/tank/phoron/onetankbomb, /obj/item/weapon/tank/oxygen/onetankbomb)
new type(src.loc)
qdel(src)
/obj/effect/spawner/onetankbomb/full
name = "Single-tank bomb"
icon = 'icons/mob/screen1.dmi'
icon_state = "x"
// var/assembly_type = /obj/item/device/assembly/signaler
//Note that the maximum amount of gas you can put in a 70L air tank at 1013.25 kPa and 519K is 16.44 mol.
/obj/effect/spawner/onetankbomb/full/New(newloc) //just needs an assembly.
..(newloc)
var/type = pick(/obj/item/weapon/tank/phoron/onetankbomb/full, /obj/item/weapon/tank/oxygen/onetankbomb/full)
new type(src.loc)
qdel(src)
/obj/effect/spawner/onetankbomb/frag
name = "Single-tank bomb"
icon = 'icons/mob/screen1.dmi'
icon_state = "x"
// var/assembly_type = /obj/item/device/assembly/signaler
//Note that the maximum amount of gas you can put in a 70L air tank at 1013.25 kPa and 519K is 16.44 mol.
/obj/effect/spawner/onetankbomb/full/New(newloc) //just needs an assembly.
..(newloc)
var/type = pick(/obj/item/weapon/tank/phoron/onetankbomb/full, /obj/item/weapon/tank/oxygen/onetankbomb/full)
new type(src.loc)
qdel(src)
+1 -1
View File
@@ -35,7 +35,7 @@
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
health -= damage
healthcheck()
+4 -1
View File
@@ -10,6 +10,7 @@
var/burn_point = null
var/burning = null
var/hitsound = null
var/usesound = null // Like hitsound, but for when used properly and not to kill someone.
var/storage_cost = null
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
var/no_attack_log = 0 //If it's an item we don't want to log attack_logs with, set this to 1
@@ -78,6 +79,8 @@
// Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called.
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.
/obj/item/New()
..()
if(embed_chance < 0)
@@ -446,7 +449,7 @@ var/list/global/slot_flags_enumeration = list(
if(!hit_zone)
U.do_attack_animation(M)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("\red <B>[U] attempts to stab [M] in the eyes, but misses!</B>")
visible_message("<font color='red'><B>[U] attempts to stab [M] in the eyes, but misses!</B></font>")
return
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>"
@@ -0,0 +1,121 @@
#define PROXIMITY_OFF_CAMERANET "_no_camera"
#define PROXIMITY_NONE ""
#define PROXIMITY_NEAR "_yellow"
#define PROXIMITY_ON_SCREEN "_red"
#define PROXIMITY_TRACKING "_tracking"
#define PROXIMITY_TRACKING_FAIL "_tracking_fail"
// This is another syndie-multitool, except this one detects when the AI and/or Security is peeping on the holder.
/obj/item/device/multitool/ai_detector
var/range_alert = 7 // Will turn red if the AI can observe its holder.
var/range_warning = 14 // Will turn yellow if the AI's eye is near the holder.
var/detect_state = PROXIMITY_NONE
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2, TECH_ILLEGAL = 2)
/obj/item/device/multitool/ai_detector/New()
// It's really really unlikely for the view range to change. But why not be futureproof anyways?
range_alert = world.view
range_warning = world.view * 2
processing_objects += src
..()
/obj/item/device/multitool/ai_detector/Destroy()
processing_objects -= src
return ..()
/obj/item/device/multitool/ai_detector/process()
var/old_detect_state = detect_state
var/new_detect_state = detect_ai()
detect_state = new_detect_state
update_icon()
update_warning(old_detect_state, new_detect_state)
return
// This also detects security using cameras.
/obj/item/device/multitool/ai_detector/proc/detect_ai()
var/mob/living/carrier = isliving(loc) ? loc : null
// First, let's check if any AIs are actively tracking them.
for(var/mob/living/silicon/ai/AI in silicon_mob_list)
if(carrier && AI.cameraFollow == carrier)
if(!carrier.tracking_status()) // Successful tracking returns a 0, so we need to invert it.
return PROXIMITY_TRACKING
else
return PROXIMITY_TRACKING_FAIL
// If there's no turf then cameras won't do anything anyways.
var/turf/T = get_turf(src)
if(!T)
return PROXIMITY_OFF_CAMERANET
// Security is also a concern, so we need to see if any cameras are in use.
// Note that this will trigger upon the security console being used, regardless if someone is actually watching,
// because there isn't a nice way to test if someone is actually looking. Probably better that way too.
var/list/our_local_area = range(range_alert, T)
for(var/obj/machinery/camera/C in our_local_area)
if(C.camera_computers_using_this.len) // Only check cameras actively being used.
var/list/their_local_area = C.can_see(range_alert)
if(T in their_local_area)
return PROXIMITY_ON_SCREEN
// Now for the somewhat harder AI cameranet checks.
// Check if we are even on the cameranet.
if(!cameranet.checkVis(T))
return PROXIMITY_OFF_CAMERANET
var/datum/chunk/chunk = cameranet.getChunk(T.x, T.y, T.z)
if(!chunk)
return PROXIMITY_OFF_CAMERANET
// Check if the AI eye is able to see us, or if it's almost able to.
if(chunk.seenby.len)
for(var/mob/observer/eye/aiEye/A in chunk.seenby)
var/turf/detect_turf = get_turf(A)
if(get_dist(T, detect_turf) <= range_alert)
return PROXIMITY_ON_SCREEN
if(get_dist(T, detect_turf) <= range_warning)
return PROXIMITY_NEAR
// If we reach this point, AI or sec isn't near us.
return PROXIMITY_NONE
/obj/item/device/multitool/ai_detector/update_icon()
icon_state = "[initial(icon_state)][detect_state]"
/obj/item/device/multitool/ai_detector/proc/update_warning(var/old_state, var/new_state)
var/mob/living/carrier = isliving(loc) ? loc : null
// Now to warn our holder, if the state changes.
if(!carrier)
return
if(new_state != old_state)
switch(new_state)
if(PROXIMITY_OFF_CAMERANET)
to_chat(carrier, "<span class='notice'>\icon[src] Now outside of camera network.</span>")
carrier << 'sound/machines/defib_failed.ogg'
if(PROXIMITY_NONE)
to_chat(carrier, "<span class='notice'>\icon[src] Now within camera network, AI and cameras unfocused.</span>")
carrier << 'sound/machines/defib_safetyOff.ogg'
if(PROXIMITY_NEAR)
to_chat(carrier, "<span class='warning'>\icon[src] Warning: AI focus at nearby location.</span>")
carrier << 'sound/machines/defib_SafetyOn.ogg'
if(PROXIMITY_ON_SCREEN)
to_chat(carrier, "<font size='3'><span class='danger'>\icon[src] Alert: AI or camera focused at current location!</span></font>")
carrier <<'sound/machines/defib_ready.ogg'
if(PROXIMITY_TRACKING)
to_chat(carrier, "<font size='3'><span class='danger'>\icon[src] Danger: AI is actively tracking you!</span></font>")
carrier << 'sound/machines/defib_success.ogg'
if(PROXIMITY_TRACKING_FAIL)
to_chat(carrier, "<font size='3'><span class='danger'>\icon[src] Danger: AI is attempting to actively track you, but you are outside of the camera network!</span></font>")
carrier <<'sound/machines/defib_ready.ogg'
#undef PROXIMITY_OFF_CAMERANET
#undef PROXIMITY_NONE
#undef PROXIMITY_NEAR
#undef PROXIMITY_ON_SCREEN
#undef PROXIMITY_TRACKING
#undef PROXIMITY_TRACKING_FAIL
+13 -12
View File
@@ -1,9 +1,10 @@
/obj/item/device/aicard
name = "inteliCard"
name = "intelliCore"
desc = "Used to preserve and transport an AI."
icon = 'icons/obj/pda.dmi'
icon_state = "aicard" // aicard-full
item_state = "aicard"
w_class = ITEMSIZE_SMALL
w_class = ITEMSIZE_NORMAL
slot_flags = SLOT_BELT
show_messages = 0
@@ -57,12 +58,12 @@
var/user = usr
if (href_list["wipe"])
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
var/confirm = alert("Are you sure you want to disable this core's power? This cannot be undone once started.", "Confirm Shutdown", "Yes", "No")
if(confirm == "Yes" && (CanUseTopic(user, state) == STATUS_INTERACTIVE))
admin_attack_log(user, carded_ai, "Wiped using \the [src.name]", "Was wiped with \the [src.name]", "used \the [src.name] to wipe")
admin_attack_log(user, carded_ai, "Purged using \the [src.name]", "Was purged with \the [src.name]", "used \the [src.name] to purge")
flush = 1
carded_ai.suiciding = 1
carded_ai << "Your core files are being wiped!"
carded_ai << "Your power has been disabled!"
while (carded_ai && carded_ai.stat != 2)
carded_ai.adjustOxyLoss(2)
carded_ai.updatehealth()
@@ -93,22 +94,22 @@
/obj/item/device/aicard/proc/grab_ai(var/mob/living/silicon/ai/ai, var/mob/living/user)
if(!ai.client)
user << "<span class='danger'>ERROR:</span> AI [ai.name] is offline. Unable to download."
user << "<span class='danger'>ERROR:</span> AI [ai.name] is offline. Unable to transfer."
return 0
if(carded_ai)
user << "<span class='danger'>Transfer failed:</span> Existing AI found on remote terminal. Remove existing AI to install a new one."
user << "<span class='danger'>Transfer failed:</span> Existing AI found on remote device. Remove existing AI to install a new one."
return 0
user.visible_message("\The [user] starts downloading \the [ai] into \the [src]...", "You start downloading \the [ai] into \the [src]...")
ai << "<span class='danger'>\The [user] is downloading you into \the [src]!</span>"
user.visible_message("\The [user] starts transferring \the [ai] into \the [src]...", "You start transferring \the [ai] into \the [src]...")
ai << "<span class='danger'>\The [user] is transferring you into \the [src]!</span>"
if(do_after(user, 100))
if(istype(ai.loc, /turf/))
new /obj/structure/AIcore/deactivated(get_turf(ai))
ai.carded = 1
admin_attack_log(user, ai, "Carded with [src.name]", "Was carded with [src.name]", "used the [src.name] to card")
admin_attack_log(user, ai, "Extracted with [src.name]", "Was extracted with [src.name]", "used the [src.name] to extract")
src.name = "[initial(name)] - [ai.name]"
ai.loc = src
@@ -119,9 +120,9 @@
carded_ai = ai
if(ai.client)
ai << "You have been downloaded to a mobile storage device. Remote access lost."
ai << "You have been transferred into a mobile core. Remote access lost."
if(user.client)
user << "<span class='notice'><b>Transfer successful:</b></span> [ai.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
user << "<span class='notice'><b>Transfer successful:</b></span> [ai.name] extracted from current device and placed within mobile core."
ai.canmove = 1
update_icon()
@@ -0,0 +1,70 @@
//Body snatcher. Based off the sleevemate, but instead of storing a mind it lets you swap your mind with someone. Extremely illegal and being caught with one s
/obj/item/device/bodysnatcher
name = "\improper Body Snatcher Device"
desc = "An extremely illegal tool that allows the user to swap minds with the selected humanoid victim. The LED panel on the side states 'Place both heads on the device, pull trigger, then wait for the transfer to complete.'"
icon = 'icons/obj/device_alt.dmi'
icon_state = "sleevemate" //Give this a fancier sprite later.
item_state = "healthanalyzer"
flags = CONDUCT
slot_flags = SLOT_BELT
w_class = ITEMSIZE_SMALL
matter = list(DEFAULT_WALL_MATERIAL = 200)
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 2, TECH_ILLEGAL = 1)
/obj/item/device/bodysnatcher/New()
..()
flags |= NOBLUDGEON //So borgs don't spark.
/obj/item/device/bodysnatcher/attack(mob/living/M, mob/living/user)
usr.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(ishuman(M) || issilicon(M)) //Allows body swapping with humans, synths, and pAI's/borgs since they all have a mind.
if(usr == M)
to_chat(user,"<span class='warning'> A message pops up on the LED display, informing you that you that the mind transfer to yourself was successful... Wait, did that even do anything?</span>")
return
if(!M.mind) //Do they have a mind?
to_chat(usr,"<span class='warning'>A warning pops up on the device, informing you that [M] appears braindead.</span>")
return
if(M.stat == DEAD) //Are they dead?
to_chat(usr,"<span class='warning'>A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done.</span>")
return
var/choice = alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation","Continue","Cancel")
if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(M))
usr.visible_message("<span class='warning'>[usr] pushes the device up his forehead and [M]'s head, the device beginning to let out a series of light beeps!</span>","<span class='notice'>You begin swap minds with [M]!</span>")
if(do_after(usr,35 SECONDS,M))
if(usr.mind && M.mind && M.stat != DEAD && usr.stat != DEAD)
log_and_message_admins("[usr.ckey] used a Bodysnatcher to swap bodies with [M.ckey]")
to_chat(usr,"<span class='notice'>Your minds have been swapped! Have a nice day.</span>")
var/datum/mind/user_mind = user.mind
var/datum/mind/prey_mind = M.mind
var/target_ooc_notes = M.ooc_notes
var/user_ooc_notes = user.ooc_notes
M.ghostize()
usr.ghostize()
usr.mind = null
M.mind = null
user_mind.current = null
prey_mind.current = null
user_mind.active = TRUE //If they are 'active', their client is automatically pushed to the mob
user_mind.transfer_to(M) //This works. Transfers mind & Ckey.
prey_mind.active = TRUE
prey_mind.transfer_to(user)
M.ooc_notes = user_ooc_notes //Let's keep their OOC notes over to their new body.
user.ooc_notes = target_ooc_notes
usr.sleeping = 10 //Device knocks out both the user and the target.
usr.eye_blurry = 30 //Blurry vision while they both get used to their new body's vision
usr.slurring = 50 //And let's also have them slurring while they attempt to get used to using their new body.
if(ishuman(M)) //Let's not have the AI slurring, even though its downright hilarious.
M.sleeping = 10
M.eye_blurry = 30
M.slurring = 50
else
to_chat(user,"<span class='warning'> A warning pops up on the LED display on the side of the device, informing you that the target is not able to have their mind swapped with!</span>")
/obj/item/device/bodysnatcher/attack_self(mob/living/user)
to_chat(user,"<span class='warning'> A message pops up on the LED display, informing you that you that the mind transfer to yourself was successful... Wait, did that even do anything?</span>")
return
@@ -520,6 +520,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
return
src << "<span class='notice'>\icon[origin_atom] Receiving communicator request from [origin_atom]. To answer, use the <b>Call Communicator</b> \
verb, and select that name to answer the call.</span>"
src << 'sound/machines/defib_SafetyOn.ogg'
comm.voice_invites |= src
if(message == "ping")
if(client && client.prefs.communicator_visibility)
@@ -528,6 +529,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
exonet.send_message(origin_address, "64 bytes received from [exonet.address] ecmp_seq=1 ttl=51 time=[random] ms")
if(message == "text")
src << "<span class='notice'>\icon[origin_atom] Received text message from [origin_atom]: <b>\"[text]\"</b></span>"
src << 'sound/machines/defib_safetyOff.ogg'
exonet_messages.Add("<b>From [origin_atom]:</b><br>[text]")
return
+632 -160
View File
@@ -1,185 +1,657 @@
//The case the paddles are kept in.
#define DEFIB_TIME_LIMIT (10 MINUTES) //past this many seconds, defib is useless.
#define DEFIB_TIME_LOSS (2 MINUTES) //past this many seconds, brain damage occurs.
//backpack item
/obj/item/device/defib_kit
name = "defibrillator kit"
desc = "This KHI-branded defib kit is a semi-automated model. Remove pads, slap on chest, wait."
icon = 'icons/obj/device.dmi'
icon_state = "defib_kit"
name = "defibrillator"
desc = "A device that delivers powerful shocks to detachable paddles that resuscitate incapacitated patients."
icon = 'icons/obj/defibrillator.dmi'
icon_state = "defibunit"
item_state = "defibunit"
slot_flags = SLOT_BACK
force = 5
throwforce = 6
w_class = ITEMSIZE_LARGE
origin_tech = list(TECH_BIO = 4, TECH_POWER = 2)
action_button_name = "Remove/Replace Paddles"
var/obj/item/weapon/shockpaddles/linked/paddles
var/obj/item/weapon/cell/bcell = null
/obj/item/device/defib_kit/New() //starts without a cell for rnd
..()
if(ispath(paddles))
paddles = new paddles(src, src)
else
paddles = new(src, src)
if(ispath(bcell))
bcell = new bcell(src)
update_icon()
/obj/item/device/defib_kit/Destroy()
. = ..()
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/update_icon()
var/list/new_overlays = list()
if(paddles && paddles.loc == src) //in case paddles got destroyed somehow.
new_overlays += "[initial(icon_state)]-paddles"
if(bcell)
if(bcell.check_charge(paddles.chargecost))
if(paddles.combat)
new_overlays += "[initial(icon_state)]-combat"
else if(!paddles.safety)
new_overlays += "[initial(icon_state)]-emagged"
else
new_overlays += "[initial(icon_state)]-powered"
var/ratio = Ceiling(bcell.percent()/25) * 25
new_overlays += "[initial(icon_state)]-charge[ratio]"
else
new_overlays += "[initial(icon_state)]-nocell"
overlays = new_overlays
/obj/item/device/defib_kit/ui_action_click()
toggle_paddles()
/obj/item/device/defib_kit/attack_hand(mob/user)
if(loc == user)
toggle_paddles()
else
..()
/obj/item/device/defib_kit/MouseDrop()
if(ismob(src.loc))
if(!CanMouseDrop(src))
return
var/mob/M = src.loc
if(!M.unEquip(src))
return
src.add_fingerprint(usr)
M.put_in_any_hand_if_possible(src)
/obj/item/device/defib_kit/attackby(obj/item/weapon/W, mob/user, params)
if(W == paddles)
reattach_paddles(user)
else if(istype(W, /obj/item/weapon/cell))
if(bcell)
to_chat(user, "<span class='notice'>\the [src] already has a cell.</span>")
else
if(!user.unEquip(W))
return
W.forceMove(src)
bcell = W
to_chat(user, "<span class='notice'>You install a cell in \the [src].</span>")
update_icon()
else if(isscrewdriver(W))
if(bcell)
bcell.update_icon()
bcell.forceMove(get_turf(src.loc))
bcell = null
to_chat(user, "<span class='notice'>You remove the cell from \the [src].</span>")
update_icon()
else
return ..()
/obj/item/device/defib_kit/emag_act(var/remaining_charges, var/mob/user)
if(paddles)
. = paddles.emag_act(user)
update_icon()
return
//Paddle stuff
/obj/item/device/defib_kit/verb/toggle_paddles()
set name = "Toggle Paddles"
set category = "Object"
var/mob/living/carbon/human/user = usr
if(!paddles)
to_chat(user, "<span class='warning'>The paddles are missing!</span>")
return
if(paddles.loc != src)
reattach_paddles(user) //Remove from their hands and back onto the defib unit
return
if(!slot_check())
to_chat(user, "<span class='warning'>You need to equip [src] before taking out [paddles].</span>")
else
if(!usr.put_in_hands(paddles)) //Detach the paddles into the user's hands
to_chat(user, "<span class='warning'>You need a free hand to hold the paddles!</span>")
update_icon() //success
//checks that the base unit is in the correct slot to be used
/obj/item/device/defib_kit/proc/slot_check()
var/mob/M = loc
if(!istype(M))
return 0 //not equipped
if((slot_flags & SLOT_BACK) && M.get_equipped_item(slot_back) == src)
return 1
if((slot_flags & SLOT_BELT) && M.get_equipped_item(slot_belt) == src)
return 1
return 0
/obj/item/device/defib_kit/dropped(mob/user)
..()
reattach_paddles(user) //paddles attached to a base unit should never exist outside of their base unit or the mob equipping the base unit
/obj/item/device/defib_kit/proc/reattach_paddles(mob/user)
if(!paddles) return
if(ismob(paddles.loc))
var/mob/M = paddles.loc
if(M.drop_from_inventory(paddles, src))
to_chat(user, "<span class='notice'>\The [paddles] snap back into the main unit.</span>")
else
paddles.forceMove(src)
update_icon()
/*
Base Unit Subtypes
*/
/obj/item/device/defib_kit/compact
name = "compact defibrillator"
desc = "A belt-equipped defibrillator that can be rapidly deployed."
icon_state = "defibcompact"
item_state = "defibcompact"
w_class = ITEMSIZE_NORMAL
slot_flags = SLOT_BELT
origin_tech = list(TECH_BIO = 5, TECH_POWER = 3)
/obj/item/device/defib_kit/compact/loaded
bcell = /obj/item/weapon/cell/high
/obj/item/device/defib_kit/compact/combat
name = "combat defibrillator"
desc = "A belt-equipped blood-red defibrillator that can be rapidly deployed. Does not have the restrictions or safeties of conventional defibrillators and can revive through space suits."
paddles = /obj/item/weapon/shockpaddles/linked/combat
/obj/item/device/defib_kit/compact/combat/loaded
bcell = /obj/item/weapon/cell/high
/obj/item/weapon/shockpaddles/linked/combat
combat = 1
safety = 0
chargetime = (1 SECONDS)
//paddles
/obj/item/weapon/shockpaddles
name = "defibrillator paddles"
desc = "A pair of plastic-gripped paddles with flat metal surfaces that are used to deliver powerful electric shocks."
icon = 'icons/obj/defibrillator.dmi'
icon_state = "defibpaddles"
item_state = "defibpaddles"
gender = PLURAL
force = 2
throwforce = 6
w_class = ITEMSIZE_LARGE
var/state //0 off, 1 open, 2 working, 3 dead
var/uses = 2 //Calculates initial uses based on starting cell size
var/use_on_synthetic = 0 //If 1, this is only useful on FBPs, if 0, this is only useful on fleshies
var/pad_name = "defib pads" //Just the name given for some cosmetic things
var/chance = 75 //Percent chance of working
var/charge_cost //Set in New() based on uses
var/obj/item/weapon/cell/cell //The size is mostly irrelevant, see 'uses'
var/mob/living/carbon/human/patient //The person the paddles are on
var/safety = 1 //if you can zap people with the paddles on harm mode
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/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
/obj/item/device/defib_kit/New()
var/wielded = 0
var/cooldown = 0
var/busy = 0
/obj/item/weapon/shockpaddles/proc/set_cooldown(var/delay)
cooldown = 1
update_icon()
spawn(delay)
if(cooldown)
cooldown = 0
update_icon()
make_announcement("beeps, \"Unit is re-energized.\"", "notice")
playsound(src, 'sound/machines/defib_ready.ogg', 50, 0)
/obj/item/weapon/shockpaddles/update_held_icon()
var/mob/living/M = loc
if(istype(M) && !issmall(M) && M.item_is_in_hands(src) && !M.hands_are_full())
wielded = 1
name = "[initial(name)] (wielded)"
else
wielded = 0
name = initial(name)
update_icon()
..()
//Create cell and determine uses (futureproofing against cell size changes)
cell = new(src)
charge_cost = cell.maxcharge / uses
statechange(0)
/obj/item/device/defib_kit/attack_self(mob/user as mob)
..()
if(patient)
patient = null
user.visible_message("<span class='notice'>[user] returns the pads to \the [src] and closes it.</span>",
"<span class='notice'>You return the pads to \the [src] and close it.</span>")
statechange(0)
/obj/item/weapon/shockpaddles/update_icon()
icon_state = "defibpaddles[wielded]"
item_state = "defibpaddles[wielded]"
if(cooldown)
icon_state = "defibpaddles[wielded]_cooldown"
/obj/item/device/defib_kit/MouseDrop(var/mob/living/carbon/human/onto)
if(istype(onto) && Adjacent(usr) && !usr.restrained() && !usr.stat)
var/mob/living/carbon/human/user = usr
//<--Feel free to code clothing checks right here
if(can_defib(onto))
user.visible_message("<span class='warning'>[user] begins applying [pad_name] to [onto].</span>",
"<span class='warning'>You begin applying [pad_name] to [onto].</span>")
if(do_after(user, 100, onto))
patient = onto
statechange(1,patient)
user.visible_message("<span class='warning'>[user] applies [pad_name] to [onto].</span>",
"<span class='warning'>You finish applying [pad_name] to [onto].</span>")
//can_defib() check is where all of the qualifying conditions should go
//Could probably toss in checks here for damage, organs, etc, but for now I'll leave it as just this
/obj/item/device/defib_kit/proc/can_defib(var/mob/living/carbon/human/target)
var/mob/living/carbon/human/user = usr
if(use_on_synthetic && !target.isSynthetic())
to_chat(user, "[src] isn't designed for organics!")
/obj/item/weapon/shockpaddles/proc/can_use(mob/user, mob/M)
if(busy)
return 0
else if(!use_on_synthetic && target.isSynthetic())
to_chat(user, "[src] isn't designed for synthetics!")
if(!check_charge(chargecost))
to_chat(user, "<span class='warning'>\The [src] doesn't have enough charge left to do that.</span>")
return 0
else if(!target.isSynthetic() && ((world.time - target.timeofdeath) > (10 MINUTES)))//Can only revive organics within a few minutes
to_chat(user, "There is no spark of life in [target.name], they've been dead too long to revive this way.")
if(!wielded && !isrobot(user))
to_chat(user, "<span class='warning'>You need to wield the paddles with both hands before you can use them on someone!</span>")
return 0
if(cooldown)
to_chat(user, "<span class='warning'>\The [src] are re-energizing!</span>")
return 0
return 1
//Checks for various conditions to see if the mob is revivable
/obj/item/weapon/shockpaddles/proc/can_defib(mob/living/carbon/human/H) //This is checked before doing the defib operation
if((H.species.flags & NO_SCAN))
return "buzzes, \"Unrecogized physiology. Operation aborted.\""
else if(H.isSynthetic() && !use_on_synthetic)
return "buzzes, \"Synthetic Body. Operation aborted.\""
else if(!H.isSynthetic() && use_on_synthetic)
return "buzzes, \"Organic Body. Operation aborted.\""
/obj/item/device/defib_kit/attackby(var/obj/item/A as obj, mob/living/user as mob)
if(H.stat != DEAD)
return "buzzes, \"Patient is not in a valid state. Operation aborted.\""
if(!check_contact(H))
return "buzzes, \"Patient's chest is obstructed. Operation aborted.\""
return null
/obj/item/weapon/shockpaddles/proc/can_revive(mob/living/carbon/human/H) //This is checked right before attempting to revive
var/deadtime = world.time - H.timeofdeath
if (deadtime > DEFIB_TIME_LIMIT && !H.isSynthetic())
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))
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)
if(bad_vital_organ)
return bad_vital_organ
//this needs to be last since if any of the 'other conditions are met their messages take precedence
if(!H.client && !H.teleop)
return "buzzes, \"Resuscitation failed - Mental interface error. Further attempts may be successful.\""
return null
/obj/item/weapon/shockpaddles/proc/check_contact(mob/living/carbon/human/H)
if(!combat)
for(var/obj/item/clothing/cloth in list(H.wear_suit, H.w_uniform))
if((cloth.body_parts_covered & UPPER_TORSO) && (cloth.item_flags & THICKMATERIAL))
return FALSE
return TRUE
/obj/item/weapon/shockpaddles/proc/check_vital_organs(mob/living/carbon/human/H)
for(var/organ_tag in H.species.has_organ)
var/obj/item/organ/O = H.species.has_organ[organ_tag]
var/name = initial(O.name)
var/vital = initial(O.vital) //check for vital organs
if(vital)
O = H.internal_organs_by_name[organ_tag]
if(!O)
return "buzzes, \"Resuscitation failed - Patient is missing vital organ ([name]). Further attempts futile.\""
if(O.damage > O.max_damage)
return "buzzes, \"Resuscitation failed - Excessive damage to vital organ ([name]). Further attempts futile.\""
return null
/obj/item/weapon/shockpaddles/proc/check_blood_level(mob/living/carbon/human/H)
if(!H.should_have_organ(O_HEART))
return FALSE
var/obj/item/organ/internal/heart/heart = H.internal_organs_by_name[O_HEART]
if(!heart)
return TRUE
var/blood_volume = round((H.vessel.get_reagent_amount("blood")/H.species.blood_volume)*100)
if(!heart || heart.is_broken())
blood_volume *= 0.3
else if(heart.is_bruised())
blood_volume *= 0.7
else if(heart.damage > 1)
blood_volume *= 0.8
return blood_volume < BLOOD_VOLUME_SURVIVE
/obj/item/weapon/shockpaddles/proc/check_charge(var/charge_amt)
return 0
/obj/item/weapon/shockpaddles/proc/checked_use(var/charge_amt)
return 0
/obj/item/weapon/shockpaddles/attack(mob/living/M, mob/living/user, var/target_zone)
var/mob/living/carbon/human/H = M
if(!istype(H) || user.a_intent == I_HURT)
return ..() //Do a regular attack. Harm intent shocking happens as a hit effect
if(can_use(user, H))
busy = 1
update_icon()
do_revive(H, user)
busy = 0
update_icon()
return 1
//Since harm-intent now skips the delay for deliberate placement, you have to be able to hit them in combat in order to shock people.
/obj/item/weapon/shockpaddles/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
if(ishuman(target) && can_use(user, target))
busy = 1
update_icon()
do_electrocute(target, user, hit_zone)
busy = 0
update_icon()
return 1
return ..()
// 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!")
//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>")
if(!do_after(user, 30, H))
return
user.visible_message("<span class='notice'>\The [user] places [src] on [H]'s chest.</span>", "<span class='warning'>You place [src] on [H]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/error = can_defib(H)
if(error)
make_announcement(error, "warning")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
return
if(check_blood_level(H))
make_announcement("buzzes, \"Warning - Patient is in hypovolemic shock.\"", "warning") //also includes heart damage
//placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(!do_after(user, chargetime, H))
return
//deduct charge here, in case the base unit was EMPed or something during the delay time
if(!checked_use(chargecost))
make_announcement("buzzes, \"Insufficient charge.\"", "warning")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
return
H.visible_message("<span class='warning'>\The [H]'s body convulses a bit.</span>")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
set_cooldown(cooldowntime)
error = can_revive(H)
if(error)
make_announcement(error, "warning")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
return
H.apply_damage(burn_damage_amt, BURN, BP_TORSO)
//set oxyloss so that the patient is just barely in crit, if possible
var/barely_in_crit = config.health_threshold_crit - 1
var/adjust_health = barely_in_crit - H.health //need to increase health by this much
H.adjustOxyLoss(-adjust_health)
make_announcement("pings, \"Resuscitation successful.\"", "notice")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
make_alive(H)
log_and_message_admins("used \a [src] to revive [key_name(H)].")
/obj/item/weapon/shockpaddles/proc/do_electrocute(mob/living/carbon/human/H, mob/user, var/target_zone)
var/obj/item/organ/external/affecting = H.get_organ(target_zone)
if(!affecting)
to_chat(user, "<span class='warning'>They are missing that body part!</span>")
return
//no need to spend time carefully placing the paddles, we're just trying to shock them
user.visible_message("<span class='danger'>\The [user] slaps [src] onto [H]'s [affecting.name].</span>", "<span class='danger'>You overcharge [src] and slap them onto [H]'s [affecting.name].</span>")
//Just stop at awkwardly slapping electrodes on people if the safety is enabled
if(safety)
to_chat(user, "<span class='warning'>You can't do that while the safety is enabled.</span>")
return
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
audible_message("<span class='warning'>\The [src] lets out a steadily rising hum...</span>")
if(!do_after(user, chargetime, H))
return
//deduct charge here, in case the base unit was EMPed or something during the delay time
if(!checked_use(chargecost))
make_announcement("buzzes, \"Insufficient charge.\"", "warning")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
return
user.visible_message("<span class='danger'><i>\The [user] shocks [H] with \the [src]!</i></span>", "<span class='warning'>You shock [H] with \the [src]!</span>")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 100, 1, -1)
playsound(loc, 'sound/weapons/Egloves.ogg', 100, 1, -1)
set_cooldown(cooldowntime)
H.stun_effect_act(2, 120, target_zone)
var/burn_damage = H.electrocute_act(burn_damage_amt*2, src, def_zone = target_zone)
if(burn_damage > 15 && H.can_feel_pain())
H.emote("scream")
admin_attack_log(user, H, "Electrocuted using \a [src]", "Was electrocuted with \a [src]", "used \a [src] to electrocute")
/obj/item/weapon/shockpaddles/proc/make_alive(mob/living/carbon/human/M) //This revives the mob
var/deadtime = world.time - M.timeofdeath
dead_mob_list.Remove(M)
if((M in living_mob_list) || (M in dead_mob_list))
WARNING("Mob [M] was defibbed but already in the living or dead list still!")
living_mob_list += M
M.timeofdeath = 0
M.stat = UNCONSCIOUS //Life() can bring them back to consciousness if it needs to.
M.regenerate_icons()
M.failed_last_breath = 0 //So mobs that died of oxyloss don't revive and have perpetual out of breath.
M.reload_fullscreen()
M.emote("gasp")
M.Weaken(rand(10,25))
M.updatehealth()
apply_brain_damage(M, deadtime)
/obj/item/weapon/shockpaddles/proc/apply_brain_damage(mob/living/carbon/human/H, var/deadtime)
if(deadtime < DEFIB_TIME_LOSS) return
if(!H.should_have_organ(O_BRAIN)) return //no brain
var/obj/item/organ/internal/brain/brain = H.internal_organs_by_name[O_BRAIN]
if(!brain) return //no brain
var/brain_damage = Clamp((deadtime - DEFIB_TIME_LOSS)/(DEFIB_TIME_LIMIT - DEFIB_TIME_LOSS)*brain.max_damage, H.getBrainLoss(), brain.max_damage)
H.setBrainLoss(brain_damage)
/obj/item/weapon/shockpaddles/proc/make_announcement(var/message, var/msg_class)
audible_message("<b>\The [src]</b> [message]", "\The [src] vibrates slightly.")
/obj/item/weapon/shockpaddles/emag_act(mob/user)
if(safety)
safety = 0
to_chat(user, "<span class='warning'>You silently disable \the [src]'s safety protocols with the cryptographic sequencer.</span>")
update_icon()
return 1
else
safety = 1
to_chat(user, "<span class='notice'>You silently enable \the [src]'s safety protocols with the cryptographic sequencer.</span>")
update_icon()
return 1
/obj/item/weapon/shockpaddles/emp_act(severity)
var/new_safety = rand(0, 1)
if(safety != new_safety)
safety = new_safety
if(safety)
make_announcement("beeps, \"Safety protocols enabled!\"", "notice")
playsound(get_turf(src), 'sound/machines/defib_safetyon.ogg', 50, 0)
else
make_announcement("beeps, \"Safety protocols disabled!\"", "warning")
playsound(get_turf(src), 'sound/machines/defib_safetyoff.ogg', 50, 0)
update_icon()
..()
if(!cell && istype(A,/obj/item/weapon/cell))
if(!user.unEquip(A)) return
to_chat(user,"You jack \the [A] into \the [src]'s battery mount.")
A.forceMove(src)
src.cell = A
/obj/item/weapon/shockpaddles/robot
name = "defibrillator paddles"
desc = "A pair of advanced shockpaddles powered by a robot's internal power cell, able to penetrate thick clothing."
chargecost = 50
combat = 1
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
cooldowntime = (3 SECONDS)
else if(istype(A,/obj/item/weapon/screwdriver))
if(cell)
to_chat(user,"<span class='notice'>You remove \the [cell] from \the [src].</span>")
if(user.r_hand && user.l_hand)
cell.forceMove(get_turf(user))
else
user.put_in_hands(cell)
cell = null
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
else
to_chat(user,"<span class='warning'>The power source has already been removed!</span>")
/obj/item/weapon/shockpaddles/robot/check_charge(var/charge_amt)
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
return (R.cell && R.cell.check_charge(charge_amt))
/obj/item/device/defib_kit/proc/statechange(var/new_state, var/pat)
if(state == new_state) return //Let's just save ourselves some time
state = new_state
icon_state = "[initial(icon_state)][state]"
var/turf/T = get_turf(src)
var/state_words = ""
switch(state)
if(0)
state_words = "It is currently closed."
processing_objects -= src
/obj/item/weapon/shockpaddles/robot/checked_use(var/charge_amt)
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
return (R.cell && R.cell.checked_use(charge_amt))
/*
Shockpaddles that are linked to a base unit
*/
/obj/item/weapon/shockpaddles/linked
var/obj/item/device/defib_kit/base_unit
/obj/item/weapon/shockpaddles/linked/New(newloc, obj/item/device/defib_kit/defib)
base_unit = defib
..(newloc)
/obj/item/weapon/shockpaddles/linked/Destroy()
if(base_unit)
//ensure the base unit's icon updates
if(base_unit.paddles == src)
base_unit.paddles = null
base_unit.update_icon()
base_unit = null
return ..()
/obj/item/weapon/shockpaddles/linked/dropped(mob/user)
..() //update twohanding
if(base_unit)
base_unit.reattach_paddles(user) //paddles attached to a base unit should never exist outside of their base unit or the mob equipping the base unit
/obj/item/weapon/shockpaddles/linked/check_charge(var/charge_amt)
return (base_unit.bcell && base_unit.bcell.check_charge(charge_amt))
/obj/item/weapon/shockpaddles/linked/checked_use(var/charge_amt)
return (base_unit.bcell && base_unit.bcell.checked_use(charge_amt))
/obj/item/weapon/shockpaddles/linked/make_announcement(var/message, var/msg_class)
base_unit.audible_message("<b>\The [base_unit]</b> [message]", "\The [base_unit] vibrates slightly.")
/*
Standalone Shockpaddles
*/
/obj/item/weapon/shockpaddles/standalone
desc = "A pair of shockpaddles powered by an experimental miniaturized reactor" //Inspired by the advanced e-gun
var/fail_counter = 0
/obj/item/weapon/shockpaddles/standalone/Destroy()
. = ..()
if(fail_counter)
processing_objects.Remove(src)
/obj/item/weapon/shockpaddles/standalone/check_charge(var/charge_amt)
return 1
/obj/item/weapon/shockpaddles/standalone/checked_use(var/charge_amt)
radiation_repository.radiate(src, charge_amt/12) //just a little bit of radiation. It's the price you pay for being powered by magic I guess
return 1
/obj/item/weapon/shockpaddles/standalone/process()
if(fail_counter > 0)
radiation_repository.radiate(src, fail_counter--)
else
processing_objects.Remove(src)
/obj/item/weapon/shockpaddles/standalone/emp_act(severity)
..()
var/new_fail = 0
switch(severity)
if(1)
state_words = "A green light is lit; it has charge."
processing_objects |= src
new_fail = max(fail_counter, 20)
visible_message("\The [src]'s reactor overloads!")
if(2)
state_words = "A yellow light is flashing: it's in the process of reviving a patient."
T.visible_message("<span class='notice'>A yellow light starts flashing on \the [src].</span>")
playsound(T, 'sound/machines/chime.ogg', 50, 0)
if(3)
state_words = "A red light is flashing: the battery needs to be recharged."
T.visible_message("<span class='warning'>A red light starts flashing on \the [src].</span>")
playsound(T, 'sound/machines/buzz-sigh.ogg', 50, 0)
new_fail = max(fail_counter, 8)
if(ismob(loc))
to_chat(loc, "<span class='warning'>\The [src] feel pleasantly warm.</span>")
desc = "[initial(desc)] [state_words][pat ? " The pads are attached to [pat]." : ""]"
update_icon()
if(new_fail && !fail_counter)
processing_objects.Add(src)
fail_counter = new_fail
/obj/item/device/defib_kit/process()
if(!state) //0 or null
statechange(0)
processing_objects -= src
return
//Patient moved too far
if(patient && !(get_dist(src,patient) <= 1)) //You separated the kit and pads too far
audible_message("<span class='warning'>There is a clatter as the [pad_name] are yanked off of [patient].</span>")
statechange(0)
patient = null
return
//Battery died
if(!cell || cell.charge < charge_cost)
statechange(3,patient)
return
//A patient isn't being worked on, but we have one, so start
if(patient && patient.stat == DEAD && state != 2)
statechange(2)
if(attempt_shock()) //Try to shock them, has timer and such
patient.visible_message("<span class='warning'>[patient] convulses!</span>")
playsound(src.loc, 'sound/effects/sparks2.ogg', 75, 1)
//Actual rezzing code
if(prob(chance))
if(!patient.client && patient.mind) //Don't force the dead person to come back if they don't want to.
for(var/mob/observer/dead/ghost in player_list)
if(ghost.mind == patient.mind)
to_chat(ghost, "<b><font color = #330033><font size = 3>Someone is trying to \
revive you. Return to your body if you want to be revived!</b> \
(Verbs -> Ghost -> Re-enter corpse). You have 15 seconds to do this!</font></font>")
sleep(15 SECONDS)
break
if(!(HUSK in patient.mutations)) // Husked people can't come back with a Defib.
if(patient.client)
patient.adjustOxyLoss(-20) //Look, blood stays oxygenated for quite some time, but I'm not recoding the entire oxy system
patient.stat = CONSCIOUS //Note that if whatever killed them in the first place wasn't fixed, they're likely to die again.
dead_mob_list -= patient
living_mob_list += patient
patient.timeofdeath = null
patient.visible_message("<span class='notice'>[patient]'s eyes open!</span>")
log_and_message_admins("[patient] was revived by a defib.")
cell.charge -= charge_cost //Always charge the cost after any attempt, failed or not
sleep(20) //Wait 2 seconds before next attempt
statechange(1,patient) //Back to ready
/obj/item/device/defib_kit/proc/attempt_shock()
if(!patient || cell.charge < charge_cost)
return
var/zap_time = world.time + (7 SECONDS)
var/o_patient_loc = patient.loc
. = 1
while(world.time < zap_time) //This is basically a custom do_after() call
sleep(1)
//Failed: We lost something important
if(!patient || !cell || cell.charge < charge_cost)
. = 0
break
//Failed: The locations aren't right
if((o_patient_loc != patient.loc) || !(get_dist(src,patient) <= 1))
. = 0
break
return
/* From the Bay port, this doesn't seem to have a sprite.
/obj/item/weapon/shockpaddles/standalone/traitor
name = "defibrillator paddles"
desc = "A pair of unusual looking paddles powered by an experimental miniaturized reactor. It possesses both the ability to penetrate armor and to deliver powerful shocks."
icon = 'icons/obj/weapons.dmi'
icon_state = "defibpaddles0"
item_state = "defibpaddles0"
combat = 1
safety = 0
chargetime = (1 SECONDS)
*/
//FBP Defibs
/obj/item/device/defib_kit/jumper_kit
name = "jumper cable kit"
desc = "This Morpheus-branded FBP defib kit is a semi-automated model. Apply cables, step back, wait."
icon_state = "jumper_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"
paddles = /obj/item/weapon/shockpaddles/linked/jumper
/obj/item/device/defib_kit/jumper_kit/loaded
bcell = /obj/item/weapon/cell/high
/obj/item/weapon/shockpaddles/linked/jumper
name = "jumper cables"
icon_state = "jumperpaddles"
item_state = "jumperpaddles"
use_on_synthetic = 1
pad_name = "jumper cables"
/obj/item/weapon/shockpaddles/robot/jumper
name = "jumper cables"
desc = "A pair of advanced shockpaddles powered by a robot's internal power cell, able to penetrate thick clothing."
icon_state = "jumperpaddles0"
item_state = "jumperpaddles0"
use_on_synthetic = 1
#undef DEFIB_TIME_LIMIT
#undef DEFIB_TIME_LOSS
+2 -2
View File
@@ -23,10 +23,10 @@
hack_state = null
return ..()
/obj/item/device/multitool/hacktool/attackby(var/obj/W, var/mob/user)
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
if(isscrewdriver(W))
in_hack_mode = !in_hack_mode
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src.loc, W.usesound, 50, 1)
else
..()
+2 -2
View File
@@ -14,7 +14,7 @@
/obj/item/clothing/suit/space/void
)
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
/obj/item/device/modkit/afterattack(obj/item/O, mob/user as mob, proximity)
if(!proximity)
return
@@ -47,7 +47,7 @@
user << "<span class='warning'>[O] must be safely placed on the ground for modification.</span>"
return
playsound(user.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src.loc, O.usesound, 100, 1)
user.visible_message("<span class='notice'>\The [user] opens \the [src] and modifies \the [O].</span>","<span class='notice'>You open \the [src] and modify \the [O].</span>")
+15 -1
View File
@@ -22,6 +22,7 @@
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
var/obj/machinery/clonepod/connecting //same for cryopod linkage
var/obj/machinery/connectable //Used to connect machinery.
toolspeed = 1
/obj/item/device/multitool/attack_self(mob/user)
var/clear = alert("Do you want to clear the buffers on the [src]?",, "Yes", "No",)
@@ -30,4 +31,17 @@
connecting = null
connectable = null
else
..()
..()
/obj/item/device/multitool/cyborg
name = "multitool"
desc = "Optimised and stripped-down version of a regular multitool."
toolspeed = 0.5
/obj/item/device/multitool/alien
name = "alien multitool"
desc = "An omni-technological interface."
icon = 'icons/obj/abductor.dmi'
icon_state = "multitool"
toolspeed = 0.1
origin_tech = list(TECH_MAGNETS = 5, TECH_ENGINEERING = 5)
@@ -42,6 +42,7 @@
anchored = 1
mode = 1
src.visible_message("<span class='notice'>[user] attaches [src] to the cable!</span>")
playsound(src, I.usesound, 50, 1)
return
else
user << "Device must be placed over an exposed cable to attach to it."
@@ -54,6 +55,7 @@
mode = 0
src.visible_message("<span class='notice'>[user] detaches [src] from the cable!</span>")
set_light(0)
playsound(src, I.usesound, 50, 1)
icon_state = "powersink0"
return
@@ -14,7 +14,7 @@
/obj/item/device/encryptionkey/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/item/device/encryptionkey/syndicate
icon_state = "cypherkey"
icon_state = "syn_cypherkey"
channels = list("Mercenary" = 1)
origin_tech = list(TECH_ILLEGAL = 3)
syndie = 1//Signifies that it de-crypts Syndicate transmissions
@@ -26,7 +26,7 @@
syndie = 1
/obj/item/device/encryptionkey/binary
icon_state = "cypherkey"
icon_state = "bin_cypherkey"
translate_binary = 1
origin_tech = list(TECH_ILLEGAL = 3)
@@ -13,7 +13,7 @@
var/translate_hive = 0
var/obj/item/device/encryptionkey/keyslot1 = null
var/obj/item/device/encryptionkey/keyslot2 = null
var/ks1type = /obj/item/device/encryptionkey
var/ks1type = null
var/ks2type = null
/obj/item/device/radio/headset/New()
@@ -348,6 +348,7 @@
recalculateChannels()
user << "You pop out the encryption keys in the headset!"
playsound(src, W.usesound, 50, 1)
else
user << "This headset doesn't have any encryption keys! How useless..."
@@ -114,6 +114,7 @@
if(istype(W, /obj/item/weapon/screwdriver)) // Opening the intercom up.
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
playsound(src, W.usesound, 50, 1)
if(wiresexposed)
if(!on)
icon_state = "intercom-p_open"
@@ -124,7 +125,7 @@
return
if(wiresexposed && istype(W, /obj/item/weapon/wirecutters))
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
var/obj/structure/frame/A = new /obj/structure/frame(src.loc)
var/obj/item/weapon/circuitboard/M = circuit
@@ -19,6 +19,7 @@ var/global/list/active_radio_jammers = list()
icon = 'icons/obj/device.dmi'
icon_state = "jammer0"
var/active_state = "jammer1"
var/last_overlay_percent = null // Stores overlay icon_state to avoid excessive recreation of overlays.
var/on = 0
var/jam_range = 7
@@ -29,6 +30,7 @@ var/global/list/active_radio_jammers = list()
/obj/item/device/radio_jammer/New()
power_source = new(src)
update_icon() // So it starts with the full overlay.
/obj/item/device/radio_jammer/Destroy()
if(on)
@@ -42,7 +44,7 @@ var/global/list/active_radio_jammers = list()
processing_objects.Remove(src)
active_radio_jammers -= src
on = FALSE
icon_state = initial(icon_state)
update_icon()
/obj/item/device/radio_jammer/proc/turn_on(mob/user)
if(user)
@@ -50,7 +52,7 @@ var/global/list/active_radio_jammers = list()
processing_objects.Add(src)
active_radio_jammers += src
on = TRUE
icon_state = active_state
update_icon()
/obj/item/device/radio_jammer/process()
if(!power_source || !power_source.check_charge(tick_cost))
@@ -60,6 +62,7 @@ var/global/list/active_radio_jammers = list()
turn_off(notify)
else
power_source.use(tick_cost)
update_icon()
/obj/item/device/radio_jammer/attack_hand(mob/user)
@@ -86,4 +89,25 @@ var/global/list/active_radio_jammers = list()
power_source.update_icon() //Why doesn't a cell do this already? :|
user.unEquip(power_source)
power_source.forceMove(src)
update_icon()
to_chat(user,"<span class='notice'>You insert \the [power_source] into \the [src].</span>")
/obj/item/device/radio_jammer/update_icon()
if(on)
icon_state = active_state
else
icon_state = initial(icon_state)
var/overlay_percent = 0
if(power_source)
overlay_percent = between(0, round( power_source.percent() , 25), 100)
else
overlay_percent = 0
// Only Cut() if we need to.
if(overlay_percent != last_overlay_percent)
overlays.Cut()
var/image/I = image(src.icon, src, "jammer_overlay_[overlay_percent]")
overlays += I
last_overlay_percent = overlay_percent
@@ -40,7 +40,7 @@ var/global/list/default_medbay_channels = list(
var/list/channels = list() //see communications.dm for full list. First channel is a "default" for :h
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrypted radio
var/centComm = 0//Holder to see if it's a CentComm encrypted radio
var/centComm = 0//Holder to see if it's a CentCom encrypted radio
flags = CONDUCT
slot_flags = SLOT_BELT
throw_speed = 2
@@ -629,6 +629,7 @@ var/global/list/default_medbay_channels = list(
recalculateChannels()
user << "You pop out the encryption key in the radio!"
playsound(src, W.usesound, 50, 1)
else
user << "This radio doesn't have any encryption keys!"
@@ -138,6 +138,7 @@
else
cover_open = 1
user << "You unscrew the panel."
playsound(src, W.usesound, 50, 1)
updateicon()
return
@@ -416,7 +416,8 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
to_chat(user, "<span class='notice'>You start winding the tape back in...</span>")
if(do_after(user, 120, target = src))
playsound(src, I.usesound, 50, 1)
if(do_after(user, 120 * I.toolspeed, target = src))
to_chat(user, "<span class='notice'>You wound the tape back in.</span>")
fix()
return
@@ -57,7 +57,7 @@ var/datum/uplink_random_selection/all_uplink_selection = new/datum/uplink_random
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/mc9mm)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/revolver)
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/a357)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/heavysniper, 15, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/heavysnipermerc, 15, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/ammo/sniperammo, 15, 0)
items += new/datum/uplink_random_item(/datum/uplink_item/item/grenades/emp, 50)
items += new/datum/uplink_random_item(/datum/uplink_item/item/visible_weapons/crossbow, 33)
@@ -158,8 +158,8 @@
/obj/item/borg/upgrade/syndicate/
name = "illegal equipment module"
desc = "Unlocks the hidden, deadlier functions of a robot"
name = "scrambled equipment module"
desc = "Unlocks new and often deadly module specific items of a robot"
icon_state = "cyborg_upgrade3"
item_state = "cyborg_upgrade"
require_module = 1
@@ -167,8 +167,8 @@
/obj/item/borg/upgrade/syndicate/action(var/mob/living/silicon/robot/R)
if(..()) return 0
if(R.emagged == 1)
if(R.emag_items == 1)
return 0
R.emagged = 1
R.emag_items = 1
return 1
+1 -1
View File
@@ -256,7 +256,7 @@
/obj/item/weapon/card/id/centcom
name = "\improper CentCom. ID"
desc = "An ID straight from Cent. Com."
desc = "An ID straight from Central Command."
icon_state = "centcom"
registered_name = "Central Command"
assignment = "General"
@@ -472,6 +472,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame/lighter/zippo
name = "\improper Zippo lighter"
desc = "The zippo."
icon = 'icons/obj/zippo.dmi'
icon_state = "zippo"
item_state = "zippo"
@@ -542,3 +543,46 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(location)
location.hotspot_expose(700, 5)
return
//Here we add Zippo skins.
/obj/item/weapon/flame/lighter/zippo/black
name = "\improper holy Zippo lighter"
desc = "Only in regards to Christianity, that is."
icon_state = "blackzippo"
/obj/item/weapon/flame/lighter/zippo/blue
name = "\improper blue Zippo lighter"
icon_state = "bluezippo"
/obj/item/weapon/flame/lighter/zippo/engraved
name = "\improper engraved Zippo lighter"
icon_state = "engravedzippo"
item_state = "zippo"
/obj/item/weapon/flame/lighter/zippo/gold
name = "\improper golden Zippo lighter"
icon_state = "goldzippo"
/obj/item/weapon/flame/lighter/zippo/moff
name = "\improper moth Zippo lighter"
desc = "Too cute to be a Tymisian."
icon_state = "moffzippo"
/obj/item/weapon/flame/lighter/zippo/red
name = "\improper red Zippo lighter"
icon_state = "redzippo"
/obj/item/weapon/flame/lighter/zippo/ironic
name = "\improper ironic Zippo lighter"
desc = "What a quiant idea."
icon_state = "ironiczippo"
/obj/item/weapon/flame/lighter/zippo/capitalist
name = "\improper capitalist Zippo lighter"
desc = "Made of gold and obsidian, this is truly not worth however much you spent on it."
icon_state = "cappiezippo"
/obj/item/weapon/flame/lighter/zippo/rainbow
name = "\improper rainbow Zippo lighter"
icon_state = "rainbowzippo"
@@ -8,6 +8,7 @@
/obj/item/weapon/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/weapon/screwdriver))
playsound(src, I.usesound, 50, 1)
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on \the [src]'s access protocol pins.</span>", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
if(build_path == /obj/machinery/computer/rdconsole/core)
name = T_BOARD("RD Console - Robotics")
@@ -13,6 +13,7 @@ obj/item/weapon/circuitboard/rdserver
obj/item/weapon/circuitboard/rdserver/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I,/obj/item/weapon/screwdriver))
playsound(src, I.usesound, 50, 1)
user.visible_message("<span class='notice'>\The [user] adjusts the jumper on \the [src]'s access protocol pins.</span>", "<span class='notice'>You adjust the jumper on the access protocol pins.</span>")
if(build_path == /obj/machinery/r_n_d/server/core)
name = T_BOARD("RD Console - Robotics")
@@ -28,6 +28,7 @@
if(istype(I, /obj/item/weapon/screwdriver))
open_panel = !open_panel
user << "<span class='notice'>You [open_panel ? "open" : "close"] the wire panel.</span>"
playsound(src, I.usesound, 50, 1)
else if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler ))
wires.Interact(user)
else
@@ -86,7 +86,7 @@
// user << "<span class='warning'>You need to add at least one beaker before locking the assembly.</span>"
user << "<span class='notice'>You lock the empty assembly.</span>"
name = "fake grenade"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
playsound(src, W.usesound, 50, 1)
icon_state = initial(icon_state) +"_locked"
stage = 2
else if(stage == 2)
@@ -96,7 +96,7 @@
return
else
user << "<span class='notice'>You unlock the assembly.</span>"
playsound(src.loc, 'sound/items/Screwdriver.ogg', 25, -3)
playsound(src.loc, W.usesound, 50, -3)
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
icon_state = initial(icon_state) + (detonator?"_ass":"")
stage = 1
@@ -27,13 +27,17 @@
no_attack_log = 1
muzzle_type = null
/obj/item/projectile/bullet/pellet/fragment/strong
damage = 15
armor_penetration = 20
/obj/item/weapon/grenade/explosive
name = "fragmentation grenade"
desc = "A fragmentation grenade, optimized for harming personnel without causing massive structural damage."
icon_state = "frggrenade"
item_state = "grenade"
var/fragment_type = /obj/item/projectile/bullet/pellet/fragment
var/fragment_types = list(/obj/item/projectile/bullet/pellet/fragment, /obj/item/projectile/bullet/pellet/fragment, /obj/item/projectile/bullet/pellet/fragment, /obj/item/projectile/bullet/pellet/fragment/strong)
var/num_fragments = 63 //total number of fragments produced by the grenade
var/explosion_size = 2 //size of the center explosion
@@ -48,29 +52,49 @@
if(!O) return
if(explosion_size)
explosion(O, -1, -1, 2, round(explosion_size/2), 0)
on_explosion(O)
src.fragmentate(O, num_fragments, spread_range, fragment_types)
qdel(src)
var/list/target_turfs = getcircle(O, spread_range)
var/fragments_per_projectile = round(num_fragments/target_turfs.len)
for(var/turf/T in target_turfs)
var/obj/item/projectile/bullet/pellet/fragment/P = new (O)
/obj/proc/fragmentate(var/turf/T=get_turf(src), var/fragment_number = 30, var/spreading_range = 5, var/list/fragtypes=list(/obj/item/projectile/bullet/pellet/fragment/))
set waitfor = 0
var/list/target_turfs = getcircle(T, spreading_range)
var/fragments_per_projectile = round(fragment_number/target_turfs.len)
for(var/turf/O in target_turfs)
sleep(0)
var/fragment_type = pickweight(fragtypes)
var/obj/item/projectile/bullet/pellet/fragment/P = new fragment_type(T)
P.pellets = fragments_per_projectile
P.shot_from = src.name
P.launch(T)
//var/cone = new /obj/item/weapon/caution/cone (T)
//spawn(100) qdel(cone)
P.launch(O)
//Make sure to hit any mobs in the source turf
for(var/mob/living/M in O)
for(var/mob/living/M in T)
//lying on a frag grenade while the grenade is on the ground causes you to absorb most of the shrapnel.
//you will most likely be dead, but others nearby will be spared the fragments that hit you instead.
if(M.lying && isturf(src.loc))
P.attack_mob(M, 0, 0)
P.attack_mob(M, 0, 5)
else if(!M.lying && src.loc != get_turf(src)) //if it's not on the turf, it must be in the mob!
P.attack_mob(M, 0, 25) //you're holding a grenade, dude!
else
P.attack_mob(M, 0, 100) //otherwise, allow a decent amount of fragments to pass
qdel(src)
/obj/item/weapon/grenade/explosive/proc/on_explosion(var/turf/O)
if(explosion_size)
explosion(O, -1, -1, explosion_size, round(explosion_size/2), 0)
/obj/item/weapon/grenade/explosive/frag
name = "fragmentation grenade"
desc = "A military fragmentation grenade, designed to explode in a deadly shower of fragments."
icon_state = "frag"
loadable = null
fragment_types = list(/obj/item/projectile/bullet/pellet/fragment)
num_fragments = 200 //total number of fragments produced by the grenade
//The radius of the circle used to launch projectiles. Lower values mean less projectiles are used but if set too low gaps may appear in the spread pattern
@@ -1,61 +0,0 @@
//Fragmentation grenade projectile
/obj/item/projectile/bullet/pellet/fragment
damage = 15
range_step = 2
base_spread = 0 //causes it to be treated as a shrapnel explosion instead of cone
spread_step = 20
silenced = 1 //embedding messages are still produced so it's kind of weird when enabled.
no_attack_log = 1
muzzle_type = null
/obj/item/weapon/grenade/frag
name = "fragmentation grenade"
desc = "A military fragmentation grenade, designed to explode in a deadly shower of fragments."
icon_state = "frag"
loadable = null
var/num_fragments = 200 //total number of fragments produced by the grenade
var/fragment_damage = 15
var/damage_step = 2 //projectiles lose a fragment each time they travel this distance. Can be a non-integer.
var/explosion_size = 2 //size of the center explosion
//The radius of the circle used to launch projectiles. Lower values mean less projectiles are used but if set too low gaps may appear in the spread pattern
var/spread_range = 7
/obj/item/weapon/grenade/frag/prime()
..()
var/turf/O = get_turf(src)
if(!O) return
if(explosion_size)
explosion(O, -1, round(explosion_size/2), explosion_size, round(explosion_size/2), 0)
var/list/target_turfs = getcircle(O, spread_range)
var/fragments_per_projectile = round(num_fragments/target_turfs.len)
for(var/turf/T in target_turfs)
var/obj/item/projectile/bullet/pellet/fragment/P = new (O)
P.damage = fragment_damage
P.pellets = fragments_per_projectile
P.range_step = damage_step
P.shot_from = src.name
P.launch(T)
//var/cone = new /obj/item/weapon/caution/cone (T)
//spawn(100) qdel(cone)
//Make sure to hit any mobs in the source turf
for(var/mob/living/M in O)
//lying on a frag grenade while the grenade is on the ground causes you to absorb most of the shrapnel.
//you will most likely be dead, but others nearby will be spared the fragments that hit you instead.
if(M.lying && isturf(src.loc))
P.attack_mob(M, 0, 0)
else
P.attack_mob(M, 0, 100) //otherwise, allow a decent amount of fragments to pass
qdel(src)
@@ -1,5 +1,6 @@
/obj/item/weapon/implant/integrated_circuit
name = "electronic implant"
desc = "It's a case, for building very tiny electronics with."
icon = 'icons/obj/electronic_assemblies.dmi'
icon_state = "setup_implant"
var/obj/item/device/electronic_assembly/implant/IC = null
@@ -9,6 +9,7 @@
/obj/item/weapon/material/butterflyconstruction/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
user << "You finish the concealed blade weapon."
playsound(src, W.usesound, 50, 1)
new /obj/item/weapon/material/butterfly(user.loc, material.name)
qdel(src)
return
@@ -147,6 +147,47 @@
</body>
</html>"}
//R-UST port
/obj/item/weapon/book/manual/rust_engine
name = "R-UST Operating Manual"
icon_state = "bookSupermatter"
author = "Cindy Crawfish"
title = "R-UST Operating Manual"
/obj/item/weapon/book/manual/rust_engine/New()
..()
dat = {"<html>
<head>
<style>
h1 {font-size: 18px; margin: 15px 0px 5px;}
h2 {font-size: 15px; margin: 15px 0px 5px;}
li {margin: 2px 0px 2px 15px;}
ul {margin: 5px; padding: 0px;}
ol {margin: 5px; padding: 0px 15px;}
body {font-size: 13px; font-family: Verdana;}
</style>
</head>
<body>
<br><br>
<ol>
<li>Put uranium in the portable generator near the gyrotron and turn it to full. This is to provide initial power to the core.</li>
<li>Enable and max output on the SMES in the engine room. This is to power the gyrotron.</li>
<li>Go into the control room, interact with the fusion core control console. Turn the field on and raise size to 501. Any bigger and it will start EMPing the doors. Any smaller and the fuel pellets might miss.</li>
<li>Interact with the gyrotron control computer, set power as high as the SMES can support, usually around 4, and turn it on. This will start increasing the plasma temperature to the point where reactions can occur.</li>
<li>Go into the engine room and insert a deuterium fuel assembly and a tritium fuel assembly into two of the fuel injectors. You can make deuterium rods in the fuel compressor if you want to play it safe.</li>
<li>Go back to the control room and turn the fuel injectors on. This will start firing pellets into the field.</li>
<li>Wait for reactions to start (plasma temperature will spike and fuel amounts will drop). Turn the gyrotron power down until it's keeping up with field instability. This will prevent cumulative instability from the deuterium-tritium reaction fucking up the field. If you're using straight deuterium instability isn't a problem and you can turn the gyrotron off.</li>
<li>Configure the SMES, turn the PACMAN off before it explodes.</li>
</ol>
<br>
<b>NOTES FOR NEWBIES</b>
<br>
Anything touching the field will mess with its stability and eventually cause it to rupture. Rupturing is bad. Use the gyrotron to keep instability down if you're running the engine on unstable fuel.
<br><br>
Likewise, no matter how sad the core seems, don't fucking hug it, you'll blow the field out and set the engine room on fire.
</body>
</html>"}
/obj/item/weapon/book/manual/engineering_hacking
name = "Hacking"
icon_state ="bookHacking"
@@ -29,3 +29,44 @@
icon_state = "saddlebag_drider"
var/taurtype = /datum/sprite_accessory/tail/taur/spider
*/
/obj/item/weapon/storage/backpack/saddlebag_common //Shared bag for other taurs with sturdy backs
name = "Taur Saddlebags"
desc = "A saddle that holds items. Seems slightly bulky."
icon = 'icons/obj/storage_vr.dmi'
icon_override = 'icons/mob/back_vr.dmi'
item_state = "saddlebag"
icon_state = "saddlebag"
var/icon_base = "saddlebag"
max_storage_space = INVENTORY_DUFFLEBAG_SPACE //Saddlebags can hold more, like dufflebags
slowdown = 1 //And are slower, too...Unless you're a macro, that is.
var/list/taurtype = list(
/datum/sprite_accessory/tail/taur/horse,
/datum/sprite_accessory/tail/taur/wolf,
/datum/sprite_accessory/tail/taur/cow,
/datum/sprite_accessory/tail/taur/lizard,
/datum/sprite_accessory/tail/taur/feline)
var/no_message = "You aren't the appropriate taur type to wear this!"
mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0)
if(..())
var/datum/sprite_accessory/tail/taur/TT = H.tail_style
if(istype(H) && is_type_in_list(TT, taurtype))
item_state = "[icon_base]_[TT]"
if(H.size_multiplier >= RESIZE_BIG) //Are they a macro?
slowdown = 0
else
slowdown = initial(slowdown)
return 1
else
H << "<span class='warning'>[no_message]</span>"
return 0
/obj/item/weapon/storage/backpack/saddlebag_common/robust //Shared bag for other taurs with sturdy backs
name = "Robust Saddlebags"
desc = "A saddle that holds items. Seems robust."
icon = 'icons/obj/storage_vr.dmi'
icon_override = 'icons/mob/back_vr.dmi'
item_state = "robustsaddle"
icon_state = "robustsaddle"
icon_base = "robustsaddle"
@@ -77,6 +77,22 @@
new /obj/item/weapon/wirecutters(src)
new /obj/item/device/t_scanner(src)
/obj/item/weapon/storage/belt/utility/chief
name = "chief engineer's toolbelt"
desc = "Holds tools, looks snazzy."
icon_state = "utilitybelt_ce"
item_state = "utility_ce"
/obj/item/weapon/storage/belt/utility/chief/full/New()
..()
new /obj/item/weapon/screwdriver/power(src)
new /obj/item/weapon/crowbar/power(src)
new /obj/item/weapon/weldingtool/experimental(src)
new /obj/item/device/multitool(src)
new /obj/item/stack/cable_coil(src,30,pick("red","yellow","orange"))
new /obj/item/weapon/extinguisher/mini(src)
new /obj/item/device/analyzer(src)
/obj/item/weapon/storage/belt/medical
name = "medical belt"
desc = "Can hold various medical equipment."
@@ -208,6 +224,22 @@
new /obj/item/device/soulstone(src)
new /obj/item/device/soulstone(src)
/obj/item/weapon/storage/belt/utility/alien
name = "alien belt"
desc = "A belt(?) that can hold things."
icon = 'icons/obj/abductor.dmi'
icon_state = "belt"
item_state = "security"
/obj/item/weapon/storage/belt/utility/alien/full/New()
..()
new /obj/item/weapon/screwdriver/alien(src)
new /obj/item/weapon/wrench/alien(src)
new /obj/item/weapon/weldingtool/alien(src)
new /obj/item/weapon/crowbar/alien(src)
new /obj/item/weapon/wirecutters/alien(src)
new /obj/item/device/multitool/alien(src)
new /obj/item/stack/cable_coil(src,30,"white")
/obj/item/weapon/storage/belt/champion
name = "championship belt"
@@ -12,8 +12,8 @@
w_class = ITEMSIZE_HUGE
max_w_class = ITEMSIZE_LARGE
max_storage_space = ITEMSIZE_COST_NORMAL * 6 //20 for clothes + a bit of additional space for non-clothing items that were worn on body
storage_slots = 14
max_storage_space = ITEMSIZE_COST_NORMAL * 8
storage_slots = 20
use_to_pickup = 1
allow_quick_empty = 1
allow_quick_gather = 1
@@ -65,7 +65,7 @@
return ..()
/obj/item/weapon/storage/laundry_basket/dropped(mob/user as mob)
qdel(linked)
qdel_null(linked)
return ..()
/obj/item/weapon/storage/laundry_basket/show_to(mob/user as mob)
@@ -42,8 +42,9 @@
return
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20))
if (do_after(user, 20 * W.toolspeed))
src.open =! src.open
playsound(src, W.usesound, 50, 1)
user.show_message(text("<span class='notice'>You [] the service panel.</span>", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
@@ -149,7 +150,9 @@
force = 8.0
throw_speed = 1
throw_range = 4
max_w_class = ITEMSIZE_NORMAL
w_class = ITEMSIZE_LARGE
max_storage_space = ITEMSIZE_COST_NORMAL * 4
attack_hand(mob/user as mob)
if ((src.loc == user) && (src.locked == 1))
@@ -281,4 +281,17 @@
/obj/item/weapon/storage/box/syndie_kit/demolitions_super_heavy/New()
..()
new /obj/item/weapon/syndie/c4explosive/heavy/super_heavy(src)
new /obj/item/weapon/screwdriver(src)
new /obj/item/weapon/screwdriver(src)
/obj/item/weapon/storage/secure/briefcase/rifle
name = "secure briefcase"
/obj/item/weapon/storage/secure/briefcase/rifle/New()
..()
new /obj/item/sniper_rifle_part/barrel(src)
new /obj/item/sniper_rifle_part/stock(src)
new /obj/item/sniper_rifle_part/trigger_group(src)
for(var/i = 1 to 4)
new /obj/item/ammo_casing/a145(src)
@@ -93,4 +93,5 @@
/obj/item/weapon/flame/lighter/zippo/c4detonator/attackby(obj/item/weapon/W, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver))
detonator_mode = !detonator_mode
playsound(src, W.usesound, 50, 1)
user << "<span class='notice'>You unscrew the top panel of \the [src] revealing a button.</span>"
@@ -1,7 +1,8 @@
/obj/item/weapon/tank/emergency/phoron_double
name = "double emergency phoron tank"
desc = "An emergency air tank hastily painted red."
desc = "Contains dangerous phoron. Do not inhale. Warning: extremely flammable."
icon = 'icons/obj/tank_vr.dmi'
icon_override = 'icons/mob/belt_vr.dmi'
icon_state = "emergency_double_vox"
gauge_icon = "indicator_double"
gauge_cap = 3
@@ -38,7 +39,8 @@
/obj/item/weapon/tank/vox //Can't be a child of phoron or the gas amount gets screwey.
icon = 'icons/obj/tank_vr.dmi'
icon_state = "plasma_fr"
icon_override = 'icons/mob/back_vr.dmi'
icon_state = "phoron_vox"
/obj/item/weapon/tank/emergency
icon = 'icons/obj/tank_vr.dmi'
@@ -78,7 +80,8 @@
/obj/item/weapon/tank/emergency/phoron
icon = 'icons/obj/tank_vr.dmi'
icon_state = "emergency_p"
icon_override = 'icons/mob/belt_vr.dmi'
icon_state = "emergency_phoron_vox"
gauge_icon = "indicator_smalltank"
gauge_cap = 3
+456 -70
View File
@@ -16,26 +16,49 @@ var/list/global/tank_gauge_cache = list()
slot_flags = SLOT_BACK
w_class = ITEMSIZE_NORMAL
pressure_resistance = ONE_ATMOSPHERE*5
force = 5.0
throwforce = 10.0
throw_speed = 1
throw_range = 4
sprite_sheets = list(
"Teshari" = 'icons/mob/species/seromi/back.dmi'
)
var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
var/integrity = 20
var/maxintegrity = 20
var/valve_welded = 0
var/obj/item/device/tankassemblyproxy/proxyassembly
var/volume = 70
var/manipulated_by = null //Used by _onclick/hud/screen_objects.dm internals to determine if someone has messed with our tank or not.
//If they have and we haven't scanned it with the PDA or gas analyzer then we might just breath whatever they put in it.
var/failure_temp = 173 //173 deg C Borate seal (yes it should be 153 F, but that's annoying)
var/leaking = 0
var/wired = 0
description_info = "These tanks are utilised to store any of the various types of gaseous substances. \
They can be attached to various portable atmospheric devices to be filled or emptied. <br>\
<br>\
Each tank is fitted with an emergency relief valve. This relief valve will open if the tank is pressurised to over ~3000kPa or heated to over 173ºC. \
The valve itself will close after expending most or all of the contents into the air.<br>\
<br>\
Filling a tank such that experiences ~4000kPa of pressure will cause the tank to rupture, spilling out its contents and destroying the tank. \
Tanks filled over ~5000kPa will rupture rather violently, exploding with significant force."
description_antag = "Each tank may be incited to burn by attaching wires and an igniter assembly, though the igniter can only be used once and the mixture only burn if the igniter pushes a flammable gas mixture above the minimum burn temperature (126ºC). \
Wired and assembled tanks may be disarmed with a set of wirecutters. Any exploding or rupturing tank will generate shrapnel, assuming their relief valves have been welded beforehand. Even if not, they can be incited to expel hot gas on ignition if pushed above 173ºC. \
Relatively easy to make, the single tank bomb requries no tank transfer valve, and is still a fairly formidable weapon that can be manufactured from any tank."
/obj/item/weapon/tank/proc/init_proxy()
var/obj/item/device/tankassemblyproxy/proxy = new /obj/item/device/tankassemblyproxy(src)
proxy.tank = src
src.proxyassembly = proxy
/obj/item/weapon/tank/New()
..()
src.init_proxy()
src.air_contents = new /datum/gas_mixture()
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
@@ -44,15 +67,17 @@ var/list/global/tank_gauge_cache = list()
return
/obj/item/weapon/tank/Destroy()
qdel_null(air_contents)
qdel(air_contents)
processing_objects.Remove(src)
qdel(src.proxyassembly)
if(istype(loc, /obj/item/device/transfer_valve))
var/obj/item/device/transfer_valve/TTV = loc
TTV.remove_tank(src)
qdel(TTV)
return ..()
. = ..()
/obj/item/weapon/tank/examine(mob/user)
. = ..(user, 0)
@@ -70,9 +95,17 @@ var/list/global/tank_gauge_cache = list()
descriptive = "lukewarm"
if(20 to 40)
descriptive = "room temperature"
else
if(-20 to 20)
descriptive = "cold"
user << "<span class='notice'>\The [src] feels [descriptive].</span>"
else
descriptive = "bitterly cold"
to_chat(user, "<span class='notice'>\The [src] feels [descriptive].</span>")
if(src.proxyassembly.assembly || wired)
to_chat(user, "<span class='warning'>It seems to have [wired? "some wires ": ""][wired && src.proxyassembly.assembly? "and ":""][src.proxyassembly.assembly ? "some sort of assembly ":""]attached to it.</span>")
if(src.valve_welded)
to_chat(user, "<span class='warning'>\The [src] emergency relief valve has been welded shut!</span>")
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
@@ -87,15 +120,103 @@ var/list/global/tank_gauge_cache = list()
LB.blow(src)
src.add_fingerprint(user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(C.use(1))
wired = 1
to_chat(user, "<span class='notice'>You attach the wires to the tank.</span>")
src.add_bomb_overlay()
if(istype(W, /obj/item/weapon/wirecutters))
if(wired && src.proxyassembly.assembly)
to_chat(user, "<span class='notice'>You carefully begin clipping the wires that attach to the tank.</span>")
if(do_after(user, 100,src))
wired = 0
src.overlays -= "bomb_assembly"
to_chat(user, "<span class='notice'>You cut the wire and remove the device.</span>")
var/obj/item/device/assembly_holder/assy = src.proxyassembly.assembly
if(assy.a_left && assy.a_right)
assy.dropInto(usr.loc)
assy.master = null
src.proxyassembly.assembly = null
else
if(!src.proxyassembly.assembly.a_left)
assy.a_right.dropInto(usr.loc)
assy.a_right.holder = null
assy.a_right = null
src.proxyassembly.assembly = null
qdel(assy)
src.overlays.Cut()
last_gauge_pressure = 0
update_gauge()
else
to_chat(user, "<span class='danger'>You slip and bump the igniter!</span>")
if(prob(85))
src.proxyassembly.receive_signal()
else if(wired)
if(do_after(user, 10, src))
to_chat(user, "<span class='notice'>You quickly clip the wire from the tank.</span>")
wired = 0
src.overlays -= "bomb_assembly"
else
to_chat(user, "<span class='notice'>There are no wires to cut!</span>")
if(istype(W, /obj/item/device/assembly_holder))
bomb_assemble(W,user)
if(wired)
to_chat(user, "<span class='notice'>You begin attaching the assembly to \the [src].</span>")
if(do_after(user, 50, src))
to_chat(user, "<span class='notice'>You finish attaching the assembly to \the [src].</span>")
bombers += "[key_name(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]"
message_admins("[key_name_admin(user)] attached an assembly to a wired [src]. Temp: [src.air_contents.temperature-T0C]")
assemble_bomb(W,user)
else
to_chat(user, "<span class='notice'>You stop attaching the assembly.</span>")
else
to_chat(user, "<span class='notice'>You need to wire the device up first.</span>")
if(istype(W, /obj/item/weapon/weldingtool/))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(1,user))
if(!valve_welded)
to_chat(user, "<span class='notice'>You begin welding the \the [src] emergency pressure relief valve.</span>")
if(do_after(user, 40,src))
to_chat(user, "<span class='notice'>You carefully weld \the [src] emergency pressure relief valve shut.</span><span class='warning'> \The [src] may now rupture under pressure!</span>")
src.valve_welded = 1
src.leaking = 0
else
bombers += "[key_name(user)] attempted to weld a [src]. [src.air_contents.temperature-T0C]"
message_admins("[key_name_admin(user)] attempted to weld a [src]. [src.air_contents.temperature-T0C]")
if(WT.welding)
to_chat(user, "<span class='danger'>You accidentally rake \the [W] across \the [src]!</span>")
maxintegrity -= rand(2,6)
integrity = min(integrity,maxintegrity)
src.air_contents.add_thermal_energy(rand(2000,50000))
WT.eyecheck(user)
else
to_chat(user, "<span class='notice'>The emergency pressure relief valve has already been welded.</span>")
add_fingerprint(user)
/obj/item/weapon/tank/attack_self(mob/user as mob)
add_fingerprint(user)
if (!(src.air_contents))
return
ui_interact(user)
// There's GOT to be a better way to do this
if (src.proxyassembly.assembly)
src.proxyassembly.assembly.attack_self(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
var/mob/living/carbon/location = null
@@ -117,7 +238,6 @@ var/list/global/tank_gauge_cache = list()
data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE)
data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE)
data["valveOpen"] = using_internal ? 1 : 0
data["maskConnected"] = 0
if(istype(location))
@@ -170,35 +290,38 @@ var/list/global/tank_gauge_cache = list()
src.distribute_pressure += cp
src.distribute_pressure = min(max(round(src.distribute_pressure), 0), TANK_MAX_RELEASE_PRESSURE)
if (href_list["stat"])
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
location.internals.icon_state = "internal0"
usr << "<span class='notice'>You close the tank release valve.</span>"
if (location.internals)
location.internals.icon_state = "internal0"
else
var/can_open_valve
if(location.wear_mask && (location.wear_mask.item_flags & AIRTIGHT))
can_open_valve = 1
else if(istype(location,/mob/living/carbon/human))
var/mob/living/carbon/human/H = location
if(H.head && (H.head.item_flags & AIRTIGHT))
can_open_valve = 1
if(can_open_valve)
location.internal = src
usr << "<span class='notice'>You open \the [src] valve.</span>"
if (location.internals)
location.internals.icon_state = "internal1"
else
usr << "<span class='warning'>You need something to connect to \the [src].</span>"
toggle_valve(usr)
src.add_fingerprint(usr)
return 1
/obj/item/weapon/tank/proc/toggle_valve(var/mob/user)
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
location.internals.icon_state = "internal0"
to_chat(user, "<span class='notice'>You close the tank release valve.</span>")
if (location.internals)
location.internals.icon_state = "internal0"
else
var/can_open_valve
if(location.wear_mask && (location.wear_mask.item_flags & AIRTIGHT))
can_open_valve = 1
else if(istype(location,/mob/living/carbon/human))
var/mob/living/carbon/human/H = location
if(H.head && (H.head.item_flags & AIRTIGHT))
can_open_valve = 1
if(can_open_valve)
location.internal = src
to_chat(user, "<span class='notice'>You open \the [src] valve.</span>")
if (location.internals)
location.internals.icon_state = "internal1"
else
to_chat(user, "<span class='warning'>You need something to connect to \the [src].</span>")
/obj/item/weapon/tank/remove_air(amount)
return air_contents.remove(amount)
@@ -231,6 +354,17 @@ var/list/global/tank_gauge_cache = list()
update_gauge()
check_status()
/obj/item/weapon/tank/proc/add_bomb_overlay()
if(src.wired)
src.overlays += "bomb_assembly"
if(src.proxyassembly.assembly)
var/icon/test = getFlatIcon(src.proxyassembly.assembly)
test.Shift(SOUTH,1)
test.Shift(WEST,3)
overlays += test
/obj/item/weapon/tank/proc/update_gauge()
var/gauge_pressure = 0
if(air_contents)
@@ -245,11 +379,17 @@ var/list/global/tank_gauge_cache = list()
last_gauge_pressure = gauge_pressure
overlays.Cut()
add_bomb_overlay()
var/indicator = "[gauge_icon][(gauge_pressure == -1) ? "overload" : gauge_pressure]"
if(!tank_gauge_cache[indicator])
tank_gauge_cache[indicator] = image(icon, indicator)
overlays += tank_gauge_cache[indicator]
/obj/item/weapon/tank/proc/check_status()
//Handle exploding, leaking, and rupturing of the tank
@@ -257,56 +397,302 @@ var/list/global/tank_gauge_cache = list()
return 0
var/pressure = air_contents.return_pressure()
if(pressure > TANK_FRAGMENT_PRESSURE)
if(!istype(src.loc,/obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
if(integrity <= 7)
if(!istype(src.loc,/obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
air_contents.react()
air_contents.react()
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
air_contents.react()
air_contents.react()
pressure = air_contents.return_pressure()
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
pressure = air_contents.return_pressure()
var/strength = ((pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE)
var/mult = ((src.air_contents.volume/140)**(1/2)) * (air_contents.total_moles**2/3)/((29*0.64) **2/3) //tanks appear to be experiencing a reduction on scale of about 0.64 total moles
//tanks appear to be experiencing a reduction on scale of about 0.64 total moles
var/turf/simulated/T = get_turf(src)
T.hotspot_expose(src.air_contents.temperature, 70, 1)
if(!T)
return
T.assume_air(air_contents)
explosion(
get_turf(loc),
round(min(BOMBCAP_DVSTN_RADIUS, ((mult)*strength)*0.15)),
round(min(BOMBCAP_HEAVY_RADIUS, ((mult)*strength)*0.35)),
round(min(BOMBCAP_LIGHT_RADIUS, ((mult)*strength)*0.80)),
round(min(BOMBCAP_FLASH_RADIUS, ((mult)*strength)*1.20)),
)
var/num_fragments = round(rand(8,10) * sqrt(strength * mult))
src.fragmentate(T, num_fragments, rand(5) + 7, list(/obj/item/projectile/bullet/pellet/fragment/tank/small = 7,/obj/item/projectile/bullet/pellet/fragment/tank = 2,/obj/item/projectile/bullet/pellet/fragment/strong = 1))
if(istype(loc, /obj/item/device/transfer_valve))
var/obj/item/device/transfer_valve/TTV = loc
TTV.remove_tank(src)
qdel(TTV)
if(src)
qdel(src)
else
integrity -=7
explosion(
get_turf(loc),
round(min(BOMBCAP_DVSTN_RADIUS, range*0.25)),
round(min(BOMBCAP_HEAVY_RADIUS, range*0.50)),
round(min(BOMBCAP_LIGHT_RADIUS, range*1.00)),
round(min(BOMBCAP_FLASH_RADIUS, range*1.50)),
)
qdel(src)
else if(pressure > TANK_RUPTURE_PRESSURE)
#ifdef FIREDBG
log_debug("\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]")
log_debug("<span class='warning'>[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]</span>")
#endif
air_contents.react()
if(integrity <= 0)
var/turf/simulated/T = get_turf(src)
if(!T)
return
T.assume_air(air_contents)
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
playsound(get_turf(src), 'sound/weapons/shotgun.ogg', 20, 1)
visible_message("\icon[src] <span class='danger'>\The [src] flies apart!</span>", "<span class='warning'>You hear a bang!</span>")
T.hotspot_expose(air_contents.temperature, 70, 1)
var/strength = 1+((pressure-TANK_LEAK_PRESSURE)/TANK_FRAGMENT_SCALE)
var/mult = (air_contents.total_moles**2/3)/((29*0.64) **2/3) //tanks appear to be experiencing a reduction on scale of about 0.64 total moles
var/num_fragments = round(rand(6,8) * sqrt(strength * mult)) //Less chunks, but bigger
src.fragmentate(T, num_fragments, 7, list(/obj/item/projectile/bullet/pellet/fragment/tank/small = 1,/obj/item/projectile/bullet/pellet/fragment/tank = 5,/obj/item/projectile/bullet/pellet/fragment/strong = 4))
if(istype(loc, /obj/item/device/transfer_valve))
var/obj/item/device/transfer_valve/TTV = loc
TTV.remove_tank(src)
qdel(src)
else
integrity--
if(!valve_welded)
integrity-= 3
src.leaking = 1
else
integrity-= 5
else if(pressure > TANK_LEAK_PRESSURE)
#ifdef FIREDBG
log_debug("\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]")
#endif
if(integrity <= 0)
else if(pressure > TANK_LEAK_PRESSURE || air_contents.temperature - T0C > failure_temp)
if((integrity <= 17 || src.leaking) && !valve_welded)
var/turf/simulated/T = get_turf(src)
if(!T)
return
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25)
T.assume_air(leaked_gas)
else
integrity--
var/datum/gas_mixture/environment = loc.return_air()
var/env_pressure = environment.return_pressure()
var/tank_pressure = src.air_contents.return_pressure()
else if(integrity < 3)
integrity++
var/release_ratio = 0.002
if(tank_pressure)
release_ratio = Clamp(0.002, sqrt(max(tank_pressure-env_pressure,0)/tank_pressure),1)
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(release_ratio)
//dynamic air release based on ambient pressure
T.assume_air(leaked_gas)
if(!leaking)
visible_message("\icon[src] <span class='warning'>\The [src] relief valve flips open with a hiss!</span>", "You hear hissing.")
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
leaking = 1
#ifdef FIREDBG
log_debug("<span class='warning'>[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]</span>")
#endif
else
integrity-= 1
else
if(integrity < maxintegrity)
integrity++
if(leaking)
integrity++
if(integrity == maxintegrity)
leaking = 0
/////////////////////////////////
///Prewelded tanks
/////////////////////////////////
/obj/item/weapon/tank/phoron/welded
valve_welded = 1
/obj/item/weapon/tank/oxygen/welded
valve_welded = 1
/////////////////////////////////
///Onetankbombs (added as actual items)
/////////////////////////////////
/obj/item/weapon/tank/proc/onetankbomb(var/fill = 1)
var/phoron_amt = 4 + rand(4)
var/oxygen_amt = 6 + rand(8)
if(fill == 2)
phoron_amt = 10
oxygen_amt = 15
else if (!fill)
phoron_amt = 3
oxygen_amt = 4.5
src.air_contents.gas["phoron"] = phoron_amt
src.air_contents.gas["oxygen"] = oxygen_amt
src.air_contents.update_values()
src.valve_welded = 1
src.air_contents.temperature = PHORON_MINIMUM_BURN_TEMPERATURE-1
src.wired = 1
var/obj/item/device/assembly_holder/H = new(src)
src.proxyassembly.assembly = H
H.master = src.proxyassembly
H.update_icon()
src.overlays += "bomb_assembly"
/obj/item/weapon/tank/phoron/onetankbomb/New()
..()
src.onetankbomb()
/obj/item/weapon/tank/oxygen/onetankbomb/New()
..()
src.onetankbomb()
/obj/item/weapon/tank/phoron/onetankbomb/full/New()
..()
src.onetankbomb(2)
/obj/item/weapon/tank/oxygen/onetankbomb/full/New()
..()
src.onetankbomb(2)
/obj/item/weapon/tank/phoron/onetankbomb/small/New()
..()
src.onetankbomb(0)
/obj/item/weapon/tank/oxygen/onetankbomb/small/New()
..()
src.onetankbomb(0)
/////////////////////////////////
///Pulled from rewritten bomb.dm
/////////////////////////////////
/obj/item/device/tankassemblyproxy
name = "Tank assembly proxy"
desc = "Used as a stand in to trigger single tank assemblies... but you shouldn't see this."
var/obj/item/weapon/tank/tank = null
var/obj/item/device/assembly_holder/assembly = null
/obj/item/device/tankassemblyproxy/receive_signal() //This is mainly called by the sensor through sense() to the holder, and from the holder to here.
tank.ignite() //boom (or not boom if you made shijwtty mix)
/obj/item/weapon/tank/proc/assemble_bomb(W,user) //Bomb assembly proc. This turns assembly+tank into a bomb
var/obj/item/device/assembly_holder/S = W
var/mob/M = user
if(!S.secured) //Check if the assembly is secured
return
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
M.drop_item() //Remove the assembly from your hands
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
M.put_in_hands(src) //Equips the bomb if possible, or puts it on the floor.
src.proxyassembly.assembly = S //Tell the bomb about its assembly part
S.master = src.proxyassembly //Tell the assembly about its new owner
S.forceMove(src) //Move the assembly
src.update_icon()
src.add_bomb_overlay()
return
/obj/item/weapon/tank/proc/ignite() //This happens when a bomb is told to explode
var/obj/item/device/assembly_holder/assy = src.proxyassembly.assembly
var/ign = assy.a_right
var/obj/item/other = assy.a_left
if (isigniter(assy.a_left))
ign = assy.a_left
other = assy.a_right
other.dropInto(get_turf(src))
qdel(ign)
assy.master = null
src.proxyassembly.assembly = null
qdel(assy)
src.update_icon()
src.update_gauge()
air_contents.add_thermal_energy(15000)
/obj/item/device/tankassemblyproxy/update_icon()
if(assembly)
tank.update_icon()
tank.overlays += "bomb_assembly"
else
tank.update_icon()
tank.overlays -= "bomb_assembly"
/obj/item/device/tankassemblyproxy/HasProximity(atom/movable/AM as mob|obj)
if(src.assembly)
src.assembly.HasProximity(AM)
/obj/item/projectile/bullet/pellet/fragment/tank
name = "metal fragment"
damage = 9 //Big chunks flying off.
range_step = 2 //controls damage falloff with distance. projectiles lose a "pellet" each time they travel this distance. Can be a non-integer.
base_spread = 0 //causes it to be treated as a shrapnel explosion instead of cone
spread_step = 20
armor_penetration = 20
silenced = 1
no_attack_log = 1
muzzle_type = null
pellets = 3
/obj/item/projectile/bullet/pellet/fragment/tank/small
name = "small metal fragment"
damage = 6
armor_penetration = 5
pellets = 5
/obj/item/projectile/bullet/pellet/fragment/tank/big
name = "large metal fragment"
damage = 17
armor_penetration = 10
range_step = 5 //controls damage falloff with distance. projectiles lose a "pellet" each time they travel this distance. Can be a non-integer.
pellets = 1
+314 -47
View File
@@ -1,5 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
#define WELDER_FUEL_BURN_INTERVAL 13
/* Tools!
* Note: Multitools are /obj/item/device
*
@@ -17,7 +19,7 @@
/obj/item/weapon/wrench
name = "wrench"
desc = "A wrench with many common uses. Can be usually found in your hand."
icon = 'icons/obj/items.dmi'
icon = 'icons/obj/tools.dmi'
icon_state = "wrench"
flags = CONDUCT
slot_flags = SLOT_BELT
@@ -27,7 +29,44 @@
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 150)
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
usesound = 'sound/items/ratchet.ogg'
toolspeed = 1
/obj/item/weapon/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in industrial synthetic shells."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
/obj/item/weapon/wrench/alien
name = "alien wrench"
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
icon = 'icons/obj/abductor.dmi'
icon_state = "wrench"
usesound = 'sound/effects/empulse.ogg'
toolspeed = 0.1
origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEER = 5)
/obj/item/weapon/wrench/power
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
usesound = 'sound/items/drill_use.ogg'
matter = list(DEFAULT_WALL_MATERIAL = 150, MAT_SILVER = 50, MAT_TITANIUM = 25)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
force = 8
w_class = ITEMSIZE_SMALL
throwforce = 8
attack_verb = list("drilled", "screwed", "jabbed")
toolspeed = 0.25
/obj/item/weapon/wrench/power/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
var/obj/item/weapon/screwdriver/power/s_drill = new /obj/item/weapon/screwdriver/power
to_chat(user, "<span class='notice'>You attach the screw driver bit to [src].</span>")
qdel(src)
user.put_in_active_hand(s_drill)
/*
* Screwdriver
@@ -35,7 +74,7 @@
/obj/item/weapon/screwdriver
name = "screwdriver"
desc = "You can be totally screwwy with this."
icon = 'icons/obj/items.dmi'
icon = 'icons/obj/tools.dmi'
icon_state = "screwdriver"
flags = CONDUCT
slot_flags = SLOT_BELT | SLOT_EARS
@@ -44,9 +83,13 @@
throwforce = 5
throw_speed = 3
throw_range = 5
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/screwdriver.ogg'
matter = list(DEFAULT_WALL_MATERIAL = 75)
attack_verb = list("stabbed")
sharp = 1
toolspeed = 1
var/random_color = TRUE
suicide_act(mob/user)
viewers(user) << pick("<span class='danger'>\The [user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.</span>", \
@@ -54,28 +97,29 @@
return(BRUTELOSS)
/obj/item/weapon/screwdriver/New()
switch(pick("red","blue","purple","brown","green","cyan","yellow"))
if ("red")
icon_state = "screwdriver2"
item_state = "screwdriver"
if ("blue")
icon_state = "screwdriver"
item_state = "screwdriver_blue"
if ("purple")
icon_state = "screwdriver3"
item_state = "screwdriver_purple"
if ("brown")
icon_state = "screwdriver4"
item_state = "screwdriver_brown"
if ("green")
icon_state = "screwdriver5"
item_state = "screwdriver_green"
if ("cyan")
icon_state = "screwdriver6"
item_state = "screwdriver_cyan"
if ("yellow")
icon_state = "screwdriver7"
item_state = "screwdriver_yellow"
if(random_color)
switch(pick("red","blue","purple","brown","green","cyan","yellow"))
if ("red")
icon_state = "screwdriver2"
item_state = "screwdriver"
if ("blue")
icon_state = "screwdriver"
item_state = "screwdriver_blue"
if ("purple")
icon_state = "screwdriver3"
item_state = "screwdriver_purple"
if ("brown")
icon_state = "screwdriver4"
item_state = "screwdriver_brown"
if ("green")
icon_state = "screwdriver5"
item_state = "screwdriver_green"
if ("cyan")
icon_state = "screwdriver6"
item_state = "screwdriver_cyan"
if ("yellow")
icon_state = "screwdriver7"
item_state = "screwdriver_yellow"
if (prob(75))
src.pixel_y = rand(0, 16)
@@ -90,13 +134,55 @@
M = user
return eyestab(M,user)
/obj/item/weapon/screwdriver/alien
name = "alien screwdriver"
desc = "An ultrasonic screwdriver."
icon = 'icons/obj/abductor.dmi'
icon_state = "screwdriver_a"
item_state = "screwdriver_black"
usesound = 'sound/items/pshoom.ogg'
toolspeed = 0.1
random_color = FALSE
/obj/item/weapon/screwdriver/cyborg
name = "powered screwdriver"
desc = "An electrical screwdriver, designed to be both precise and quick."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
/obj/item/weapon/screwdriver/power
name = "hand drill"
desc = "A simple powered hand drill. It's fitted with a screw bit."
icon_state = "drill_screw"
item_state = "drill"
matter = list(DEFAULT_WALL_MATERIAL = 150, MAT_SILVER = 50, MAT_TITANIUM = 25)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
force = 8
w_class = ITEMSIZE_SMALL
throwforce = 8
throw_speed = 2
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
attack_verb = list("drilled", "screwed", "jabbed", "whacked")
hitsound = 'sound/items/drill_hit.ogg'
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/weapon/screwdriver/power/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
var/obj/item/weapon/wrench/power/w_drill = new /obj/item/weapon/wrench/power
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
qdel(src)
user.put_in_active_hand(w_drill)
/*
* Wirecutters
*/
/obj/item/weapon/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/items.dmi'
icon = 'icons/obj/tools.dmi'
icon_state = "cutters"
flags = CONDUCT
slot_flags = SLOT_BELT
@@ -107,11 +193,15 @@
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 80)
attack_verb = list("pinched", "nipped")
hitsound = 'sound/items/wirecutter.ogg'
usesound = 'sound/items/wirecutter.ogg'
sharp = 1
edge = 1
toolspeed = 1
var/random_color = TRUE
/obj/item/weapon/wirecutters/New()
if(prob(50))
if(random_color && prob(50))
icon_state = "cutters-y"
item_state = "cutters_yellow"
..()
@@ -129,13 +219,48 @@
else
..()
/obj/item/weapon/wirecutters/alien
name = "alien wirecutters"
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
icon = 'icons/obj/abductor.dmi'
icon_state = "cutters"
toolspeed = 0.1
origin_tech = list(TECH_MATERIAL = 5, TECH_ENGINEERING = 4)
random_color = FALSE
/obj/item/weapon/wirecutters/cyborg
name = "wirecutters"
desc = "This cuts wires. With science."
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.5
/obj/item/weapon/wirecutters/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
matter = list(MAT_METAL=150, MAT_SILVER=50, MAT_TITANIUM=25)
usesound = 'sound/items/jaws_cut.ogg'
force = 15
toolspeed = 0.25
random_color = FALSE
/obj/item/weapon/wirecutters/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/weapon/crowbar/power/pryjaws = new /obj/item/weapon/crowbar/power
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
qdel(src)
user.put_in_active_hand(pryjaws)
/*
* Welding Tool
*/
/obj/item/weapon/weldingtool
name = "welding tool"
icon = 'icons/obj/items.dmi'
icon = 'icons/obj/tools.dmi'
icon_state = "welder"
item_state = "welder"
flags = CONDUCT
slot_flags = SLOT_BELT
@@ -157,16 +282,30 @@
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
var/max_fuel = 20 //The max amount of fuel the welder can hold
var/acti_sound = 'sound/items/welderactivate.ogg'
var/deac_sound = 'sound/items/welderdeactivate.ogg'
usesound = 'sound/items/Welder2.ogg'
var/change_icons = TRUE
var/flame_intensity = 2 //how powerful the emitted light is when used.
var/flame_color = "#FF9933" // What color the welder light emits when its on. Default is an orange-ish color.
var/eye_safety_modifier = 0 // Increasing this will make less eye protection needed to stop eye damage. IE at 1, sunglasses will fully protect.
var/burned_fuel_for = 0 // Keeps track of how long the welder's been on, used to gradually empty the welder if left one, without RNG.
var/always_process = FALSE // If true, keeps the welder on the process list even if it's off. Used for when it needs to regenerate fuel.
toolspeed = 1
/obj/item/weapon/weldingtool/New()
// var/random_fuel = min(rand(10,20),max_fuel)
var/datum/reagents/R = new/datum/reagents(max_fuel)
reagents = R
R.my_atom = src
R.add_reagent("fuel", max_fuel)
update_icon()
if(always_process)
processing_objects |= src
..()
/obj/item/weapon/weldingtool/Destroy()
if(welding)
if(welding || always_process)
processing_objects -= src
return ..()
@@ -216,9 +355,12 @@
/obj/item/weapon/weldingtool/process()
if(welding)
if(prob(5))
++burned_fuel_for
if(burned_fuel_for >= WELDER_FUEL_BURN_INTERVAL)
remove_fuel(1)
if(get_fuel() < 1)
setWelding(0)
@@ -270,19 +412,25 @@
/obj/item/weapon/weldingtool/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
/obj/item/weapon/weldingtool/proc/get_max_fuel()
return max_fuel
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding)
return 0
if(amount)
burned_fuel_for = 0 // Reset the counter since we're removing fuel.
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
if(M)
eyecheck(M)
update_icon()
return 1
else
if(M)
M << "<span class='notice'>You need more welding fuel to complete this task.</span>"
update_icon()
return 0
//Returns whether or not the welding tool is currently on.
@@ -291,7 +439,29 @@
/obj/item/weapon/weldingtool/update_icon()
..()
icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]"
overlays.Cut()
// Welding overlay.
if(welding)
var/image/I = image(icon, src, "[icon_state]-on")
overlays.Add(I)
item_state = "[initial(item_state)]1"
else
item_state = initial(item_state)
// Fuel counter overlay.
if(change_icons && get_max_fuel())
var/ratio = get_fuel() / get_max_fuel()
ratio = Ceiling(ratio*4) * 25
var/image/I = image(icon, src, "[icon_state][ratio]")
overlays.Add(I)
// Lights
if(welding && flame_intensity)
set_light(flame_intensity, flame_intensity, flame_color)
else
set_light(0)
// icon_state = welding ? "[icon_state]1" : "[initial(icon_state)]"
var/mob/M = loc
if(istype(M))
M.update_inv_l_hand()
@@ -342,12 +512,15 @@
M << "<span class='notice'>You switch the [src] on.</span>"
else if(T)
T.visible_message("<span class='danger'>\The [src] turns on.</span>")
playsound(loc, acti_sound, 50, 1)
src.force = 15
src.damtype = "fire"
src.w_class = ITEMSIZE_LARGE
src.hitsound = 'sound/items/welder.ogg'
welding = 1
update_icon()
processing_objects |= src
if(!always_process)
processing_objects |= src
else
if(M)
var/msg = max_fuel ? "welding fuel" : "charge"
@@ -355,22 +528,27 @@
return
//Otherwise
else if(!set_welding && welding)
processing_objects -= src
if(!always_process)
processing_objects -= src
if(M)
M << "<span class='notice'>You switch \the [src] off.</span>"
else if(T)
T.visible_message("<span class='warning'>\The [src] turns off.</span>")
playsound(loc, deac_sound, 50, 1)
src.force = 3
src.damtype = "brute"
src.w_class = initial(src.w_class)
src.welding = 0
src.hitsound = initial(src.hitsound)
update_icon()
//Decides whether or not to damage a player's eyes based on what they're wearing as protection
//Note: This should probably be moved to mob
/obj/item/weapon/weldingtool/proc/eyecheck(mob/user as mob)
if(!iscarbon(user)) return 1
var/safety = user:eyecheck()
/obj/item/weapon/weldingtool/proc/eyecheck(mob/living/carbon/user)
if(!istype(user))
return 1
var/safety = user.eyecheck()
safety = between(-1, safety + eye_safety_modifier, 2)
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
@@ -411,36 +589,71 @@
/obj/item/weapon/weldingtool/largetank
name = "industrial welding tool"
desc = "A slightly larger welder with a larger tank."
icon_state = "indwelder"
max_fuel = 40
origin_tech = list(TECH_ENGINEERING = 2)
origin_tech = list(TECH_ENGINEERING = 2, TECH_PHORON = 2)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 60)
/obj/item/weapon/weldingtool/largetank/cyborg
name = "integrated welding tool"
desc = "An advanced welder designed to be used in robotic systems."
toolspeed = 0.5
/obj/item/weapon/weldingtool/hugetank
name = "upgraded welding tool"
desc = "A much larger welder with a huge tank."
icon_state = "indwelder"
max_fuel = 80
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 3)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
/obj/item/weapon/weldingtool/mini
name = "emergency welding tool"
desc = "A miniature welder used during emergencies."
icon_state = "miniwelder"
max_fuel = 10
w_class = ITEMSIZE_SMALL
matter = list(MAT_METAL = 30, MAT_GLASS = 10)
change_icons = 0
toolspeed = 2
eye_safety_modifier = 1 // Safer on eyes.
/obj/item/weapon/weldingtool/alien
name = "alien welding tool"
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
icon = 'icons/obj/abductor.dmi'
icon_state = "welder"
toolspeed = 0.1
flame_color = "#6699FF" // Light bluish.
eye_safety_modifier = 2
change_icons = 0
origin_tech = list(TECH_PHORON = 5 ,TECH_ENGINEERING = 5)
always_process = TRUE
/obj/item/weapon/weldingtool/alien/process()
if(get_fuel() <= get_max_fuel())
reagents.add_reagent("fuel", 1)
..()
/obj/item/weapon/weldingtool/experimental
name = "experimental welding tool"
desc = "An experimental welder capable of self-fuel generation. It can output a flame hotter than regular welders."
icon_state = "exwelder"
max_fuel = 40
w_class = ITEMSIZE_NORMAL
origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3)
matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120)
toolspeed = 0.5
change_icons = 0
flame_intensity = 3
always_process = TRUE
var/nextrefueltick = 0
/obj/item/weapon/weldingtool/experimental/New()
processing_objects |= src
..()
/obj/item/weapon/weldingtool/experimental/Destroy()
processing_objects -= src
return ..()
/obj/item/weapon/weldingtool/experimental/process()
..()
if(get_fuel() < max_fuel && nextrefueltick < world.time)
if(get_fuel() < get_max_fuel() && nextrefueltick < world.time)
nextrefueltick = world.time + 10
reagents.add_reagent("fuel", 1)
@@ -450,12 +663,17 @@
/obj/item/weapon/weldingtool/electric //AND HIS WELDING WAS ELECTRIC
name = "electric welding tool"
desc = "A welder which runs off of electricity."
icon_state = "arcwelder"
max_fuel = 0 //We'll handle the consumption later.
item_state = "ewelder"
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
var/charge_cost = 24 //The rough equivalent of 1 unit of fuel, based on us wanting 10 welds per battery
var/cell_type = /obj/item/weapon/cell/device
var/use_external_power = 0 //If in a borg or hardsuit, this needs to = 1
flame_color = "#00CCFF" // Blue-ish, to set it apart from the gas flames.
acti_sound = 'sound/effects/sparks4.ogg'
deac_sound = 'sound/effects/sparks4.ogg'
/obj/item/weapon/weldingtool/electric/New()
..()
@@ -486,6 +704,15 @@
else
return 0
/obj/item/weapon/weldingtool/electric/get_max_fuel()
if(use_external_power)
var/obj/item/weapon/cell/external = get_external_power_supply()
return external.maxcharge
else if(power_supply)
return power_supply.maxcharge
else
return 0
/obj/item/weapon/weldingtool/electric/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding)
return 0
@@ -497,10 +724,12 @@
power_supply.give(charge_cost) //Give it back to the cell.
if(M)
eyecheck(M)
update_icon()
return 1
else
if(M)
M << "<span class='notice'>You need more energy to complete this task.</span>"
update_icon()
return 0
/obj/item/weapon/weldingtool/electric/attack_hand(mob/user as mob)
@@ -557,7 +786,7 @@
/obj/item/weapon/crowbar
name = "crowbar"
desc = "Used to remove floors and to pry open doors."
icon = 'icons/obj/items.dmi'
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
flags = CONDUCT
slot_flags = SLOT_BELT
@@ -569,9 +798,11 @@
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 50)
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
usesound = 'sound/items/crowbar.ogg'
toolspeed = 1
/obj/item/weapon/crowbar/red
icon = 'icons/obj/items.dmi'
icon = 'icons/obj/tools.dmi'
icon_state = "red_crowbar"
item_state = "crowbar_red"
@@ -593,6 +824,40 @@
else
return ..()
/obj/item/weapon/crowbar/alien
name = "alien crowbar"
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
icon = 'icons/obj/abductor.dmi'
usesound = 'sound/weapons/sonic_jackhammer.ogg'
icon_state = "crowbar"
toolspeed = 0.1
origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4)
/obj/item/weapon/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics."
usesound = 'sound/items/jaws_pry.ogg'
force = 10
toolspeed = 0.5
/obj/item/weapon/crowbar/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
matter = list(MAT_METAL=150, MAT_SILVER=50, MAT_TITANIUM=25)
origin_tech = list(TECH_MATERIALS = 2, TECH_ENGINEERING = 2)
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
/obj/item/weapon/crowbar/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/weapon/wirecutters/power/cutjaws = new /obj/item/weapon/wirecutters/power
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
qdel(src)
user.put_in_active_hand(cutjaws)
/*/obj/item/weapon/combitool
name = "combi-tool"
desc = "It even has one of those nubbins for doing the thingy."
@@ -650,3 +915,5 @@
tool.afterattack(target,user,1)
if(tool)
tool.loc = src*/
#undef WELDER_FUEL_BURN_INTERVAL
+179 -4
View File
@@ -5,6 +5,8 @@
icon_state = "rup"
var/spawn_nothing_percentage = 0 // this variable determines the likelyhood that this random object will not spawn anything
var/spawned_thing //VOREStation Edit
// creates a new object and deletes itself
/obj/random/New()
@@ -28,6 +30,13 @@
A.pixel_x = pixel_x
A.pixel_y = pixel_y
//VOREStation Edit
spawned_thing = A
/obj/random/Destroy()
spawned_thing = null
return ..()
//VOREStation Edit End
/obj/random/single
name = "randomly spawned object"
@@ -249,33 +258,112 @@
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron)
/obj/random/energy
name = "Random Security Energy Weapon"
name = "Random Energy Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "energykill100"
/obj/random/energy/item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/energy/laser,
prob(4);/obj/item/weapon/gun/energy/gun,
prob(3);/obj/item/weapon/gun/energy/gun/burst,
prob(1);/obj/item/weapon/gun/energy/gun/nuclear,
prob(2);/obj/item/weapon/gun/energy/retro,
prob(2);/obj/item/weapon/gun/energy/lasercannon,
prob(3);/obj/item/weapon/gun/energy/xray,
prob(1);/obj/item/weapon/gun/energy/sniperrifle,
prob(1);/obj/item/weapon/gun/energy/plasmastun,
prob(2);/obj/item/weapon/gun/energy/ionrifle,
prob(2);/obj/item/weapon/gun/energy/ionrifle/pistol,
prob(3);/obj/item/weapon/gun/energy/toxgun,
prob(4);/obj/item/weapon/gun/energy/taser,
prob(2);/obj/item/weapon/gun/energy/crossbow/largecrossbow,
prob(4);/obj/item/weapon/gun/energy/stunrevolver)
/obj/random/energy/sec
name = "Random Security Energy Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "energykill100"
/obj/random/energy/sec/item_to_spawn()
return pick(prob(2);/obj/item/weapon/gun/energy/laser,
prob(2);/obj/item/weapon/gun/energy/gun)
/obj/random/projectile
name = "Random Security Projectile Weapon"
name = "Random Projectile Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
/obj/random/projectile/item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/automatic/wt550,
prob(3);/obj/item/weapon/gun/projectile/automatic/mini_uzi,
prob(3);/obj/item/weapon/gun/projectile/automatic/tommygun,
prob(2);/obj/item/weapon/gun/projectile/automatic/c20r,
prob(2);/obj/item/weapon/gun/projectile/automatic/sts35,
prob(2);/obj/item/weapon/gun/projectile/automatic/z8,
prob(4);/obj/item/weapon/gun/projectile/colt,
prob(2);/obj/item/weapon/gun/projectile/deagle,
prob(1);/obj/item/weapon/gun/projectile/deagle/camo,
prob(1);/obj/item/weapon/gun/projectile/deagle/gold,
prob(3);/obj/item/weapon/gun/projectile/derringer,
prob(1);/obj/item/weapon/gun/projectile/heavysniper,
prob(4);/obj/item/weapon/gun/projectile/luger,
prob(3);/obj/item/weapon/gun/projectile/luger/brown,
prob(4);/obj/item/weapon/gun/projectile/sec,
prob(3);/obj/item/weapon/gun/projectile/sec/wood,
prob(4);/obj/item/weapon/gun/projectile/pistol,
prob(5);/obj/item/weapon/gun/projectile/pirate,
prob(2);/obj/item/weapon/gun/projectile/revolver,
prob(4);/obj/item/weapon/gun/projectile/revolver/deckard,
prob(4);/obj/item/weapon/gun/projectile/revolver/detective,
prob(2);/obj/item/weapon/gun/projectile/revolver/judge,
prob(3);/obj/item/weapon/gun/projectile/revolver/lemat,
prob(2);/obj/item/weapon/gun/projectile/revolver/mateba,
prob(4);/obj/item/weapon/gun/projectile/shotgun/doublebarrel,
prob(3);/obj/item/weapon/gun/projectile/shotgun/doublebarrel/sawn,
prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,
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
name = "Random Security Projectile Weapon"
desc = "This is a random security weapon."
icon = 'icons/obj/gun.dmi'
icon_state = "revolver"
/obj/random/projectile/sec/item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/shotgun/pump,
prob(2);/obj/item/weapon/gun/projectile/automatic/wt550,
prob(1);/obj/item/weapon/gun/projectile/shotgun/pump/combat)
/obj/random/handgun
name = "Random Handgun"
desc = "This is a random security sidearm."
desc = "This is a random sidearm."
icon = 'icons/obj/gun.dmi'
icon_state = "secgundark"
/obj/random/handgun/item_to_spawn()
return pick(prob(4);/obj/item/weapon/gun/projectile/sec,
prob(4);/obj/item/weapon/gun/projectile/luger,
prob(2);/obj/item/weapon/gun/energy/gun,
prob(2);/obj/item/weapon/gun/projectile/colt,
prob(2);/obj/item/weapon/gun/projectile/pistol,
prob(1);/obj/item/weapon/gun/energy/retro,
prob(1);/obj/item/weapon/gun/projectile/sec/wood,
prob(3);/obj/item/weapon/gun/projectile/luger/brown)
/obj/random/handgun/sec
name = "Random Security Handgun"
desc = "This is a random security sidearm."
icon = 'icons/obj/gun.dmi'
icon_state = "secgundark"
/obj/random/handgun/sec/item_to_spawn()
return pick(prob(3);/obj/item/weapon/gun/projectile/sec,
prob(1);/obj/item/weapon/gun/projectile/sec/wood)
@@ -905,4 +993,91 @@ var/list/multi_point_spawns
/obj/random_multi/single_item/captains_spare_id
name = "Multi Point - Captain's Spare"
id = "Captain's spare id"
item_path = /obj/item/weapon/card/id/captains_spare
item_path = /obj/item/weapon/card/id/captains_spare
//Multiple Object Spawn
/obj/random/multiple
/obj/random/multiple/spawn_item()
var/list/things_to_make = item_to_spawn()
for(var/new_type in things_to_make)
new new_type(src.loc)
/obj/random/multiple/voidsuit
name = "Random Voidsuit"
desc = "This is a random voidsuit."
icon = 'icons/obj/clothing/suits.dmi'
icon_state = "void"
/obj/random/multiple/voidsuit/item_to_spawn()
return pick(
prob(5);list(
/obj/item/clothing/suit/space/void,
/obj/item/clothing/head/helmet/space/void
),
prob(5);list(
/obj/item/clothing/suit/space/void/atmos,
/obj/item/clothing/head/helmet/space/void/atmos
),
prob(5);list(
/obj/item/clothing/suit/space/void/atmos/alt,
/obj/item/clothing/head/helmet/space/void/atmos/alt
),
prob(5);list(
/obj/item/clothing/suit/space/void/engineering,
/obj/item/clothing/head/helmet/space/void/engineering
),
prob(5);list(
/obj/item/clothing/suit/space/void/engineering/alt,
/obj/item/clothing/head/helmet/space/void/engineering/alt
),
prob(5);list(
/obj/item/clothing/suit/space/void/engineering/construction,
/obj/item/clothing/head/helmet/space/void/engineering/construction
),
prob(5);list(
/obj/item/clothing/suit/space/void/engineering/salvage,
/obj/item/clothing/head/helmet/space/void/engineering/salvage
),
prob(5);list(
/obj/item/clothing/suit/space/void/medical,
/obj/item/clothing/head/helmet/space/void/medical
),
prob(5);list(
/obj/item/clothing/suit/space/void/medical/alt,
/obj/item/clothing/head/helmet/space/void/medical/alt
),
prob(5);list(
/obj/item/clothing/suit/space/void/medical/bio,
/obj/item/clothing/head/helmet/space/void/medical/bio
),
prob(5);list(
/obj/item/clothing/suit/space/void/medical/emt,
/obj/item/clothing/head/helmet/space/void/medical/emt
),
prob(5);list(
/obj/item/clothing/suit/space/void/merc,
/obj/item/clothing/head/helmet/space/void/merc
),
prob(5);list(
/obj/item/clothing/suit/space/void/mining,
/obj/item/clothing/head/helmet/space/void/mining
),
prob(5);list(
/obj/item/clothing/suit/space/void/mining/alt,
/obj/item/clothing/head/helmet/space/void/mining/alt
),
prob(5);list(
/obj/item/clothing/suit/space/void/security,
/obj/item/clothing/head/helmet/space/void/security
),
prob(5);list(
/obj/item/clothing/suit/space/void/security/alt,
/obj/item/clothing/head/helmet/space/void/security/alt
),
prob(5);list(
/obj/item/clothing/suit/space/void/security/riot,
/obj/item/clothing/head/helmet/space/void/security/riot
)
)
+59 -14
View File
@@ -33,7 +33,7 @@
prob(10);/obj/item/weapon/melee/energy/sword,\
prob(9);/obj/item/weapon/gun/projectile/automatic/wt550/lethal,\
prob(9);/obj/item/weapon/gun/projectile/automatic/pdw,\
prob(9);/obj/item/weapon/gun/projectile/derringer,\
prob(9);/obj/item/weapon/gun/projectile/automatic/SMG_sol, \
prob(9);/obj/item/weapon/gun/energy/crossbow/largecrossbow,\
prob(9);/obj/item/weapon/gun/projectile/automatic/mini_uzi,\
prob(9);/obj/item/weapon/gun/projectile/pistol,\
@@ -41,13 +41,14 @@
prob(9);/obj/item/weapon/twohanded/fireaxe,\
prob(9);/obj/item/weapon/cane/concealed,\
prob(9);/obj/item/weapon/gun/energy/gun,\
prob(8);/obj/item/weapon/gun/energy/ionrifle,\
prob(8);/obj/item/weapon/gun/energy/retro,\
prob(8);/obj/item/weapon/gun/energy/gun/eluger,\
prob(8);/obj/item/weapon/gun/energy/xray,\
prob(8);/obj/item/weapon/gun/projectile/automatic/c20r,\
prob(8);/obj/item/weapon/gun/projectile/automatic/stg,\
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/automatic/m41a,\ */
prob(7);/obj/item/weapon/gun/energy/captain,\
prob(7);/obj/item/weapon/gun/energy/sniperrifle,\
@@ -58,10 +59,12 @@
prob(7);/obj/item/weapon/gun/energy/gun/burst,\
prob(7);/obj/item/weapon/gun/projectile/shotgun/pump/unsc,\
prob(7);/obj/item/weapon/gun/projectile/deagle,\
prob(7);/obj/item/weapon/gun/projectile/revolver/consul,\
prob(7);/obj/item/weapon/gun/launcher/grenade,\
prob(6);/obj/item/weapon/gun/projectile/SVD,\
/* prob(6);/obj/item/weapon/gun/projectile/SVD,\*/
prob(6);/obj/item/weapon/gun/projectile/automatic/l6_saw,\
prob(6);/obj/item/weapon/gun/energy/lasercannon,\
prob(5);/obj/item/weapon/gun/projectile/shotgun/pump/rifle/lever,\
prob(5);/obj/item/weapon/gun/projectile/automatic/carbine,\
prob(5);/obj/item/weapon/gun/energy/pulse_rifle,\
/* prob(4);/obj/item/weapon/gun/projectile/automatic/battlerifle,\ */
@@ -73,6 +76,7 @@
prob(1);/obj/item/weapon/gun/projectile/gyropistol,\
prob(1);/obj/item/weapon/gun/projectile/heavysniper,\
prob(1);/obj/item/weapon/plastique,\
prob(1);/obj/item/weapon/gun/energy/ionrifle,\
prob(1);/obj/item/weapon/material/sword,\
prob(1);/obj/item/weapon/cane/concealed,\
prob(1);/obj/item/weapon/material/sword/katana)
@@ -88,19 +92,19 @@
item_to_spawn()
return pick(prob(5);/obj/item/weapon/storage/box/shotgunammo,\
prob(5);/obj/item/weapon/storage/box/shotgunshells,\
prob(5);/obj/item/ammo_magazine/m357,\
prob(5);/obj/item/ammo_magazine/s357,\
prob(5);/obj/item/ammo_magazine/clip/c762,\
prob(5);/obj/item/ammo_magazine/m45,\
prob(5);/obj/item/ammo_magazine/m45/rubber,\
prob(5);/obj/item/ammo_magazine/s38,\
prob(5);/obj/item/ammo_magazine/s38/rubber,\
prob(5);/obj/item/weapon/storage/box/flashbangs,\
prob(5);/obj/item/ammo_magazine/m556,\
prob(4);/obj/item/ammo_magazine/clip/c556,\
/*prob(5);/obj/item/ammo_magazine/m545,\
prob(4);/obj/item/ammo_magazine/clip/c556,\*/
prob(4);/obj/item/ammo_magazine/clip/c45,\
prob(4);/obj/item/ammo_magazine/clip/c9mm,\
prob(4);/obj/item/ammo_magazine/m45uzi,\
prob(4);/obj/item/ammo_magazine/m556/ext,\
/*prob(4);/obj/item/ammo_magazine/m545/ext,\*/
prob(4);/obj/item/ammo_magazine/m9mm,\
prob(4);/obj/item/ammo_magazine/m9mml,\
prob(4);/obj/item/ammo_magazine/m9mmt,\
@@ -108,15 +112,16 @@
prob(4);/obj/item/ammo_magazine/m10mm,\
prob(4);/obj/item/ammo_magazine/m9mmp90,\
/* prob(4);/obj/item/ammo_magazine/m14,\
prob(4);/obj/item/ammo_magazine/m14/large,\ */
prob(4);/obj/item/ammo_magazine/m556/ext,\
prob(4);/obj/item/ammo_magazine/m14/large,\
prob(4);/obj/item/ammo_magazine/m545/ext,\*/
prob(4);/obj/item/ammo_magazine/m762,\
prob(4);/obj/item/ammo_magazine/m762,\
prob(3);/obj/item/ammo_magazine/clip/c10mm,\
prob(3);/obj/item/ammo_magazine/clip/c50,\
prob(3);/obj/item/ammo_magazine/m556,\
prob(2);/obj/item/ammo_magazine/m50,\
prob(2);/obj/item/ammo_magazine/m556,\
prob(3);/obj/item/ammo_magazine/clip/c44,\
prob(3);/obj/item/ammo_magazine/s44,\
/*prob(3);/obj/item/ammo_magazine/m545,\*/
prob(2);/obj/item/ammo_magazine/m44,\
/*prob(2);/obj/item/ammo_magazine/m545,\*/
prob(1);/obj/item/weapon/storage/box/frags,\
/* prob(1);/obj/item/ammo_magazine/battlerifle,\ */
prob(1);/obj/item/ammo_casing/rocket,\
@@ -165,4 +170,44 @@
icon_state = "randompile"
spawn_nothing_percentage = 0
/obj/random/trash_pile/item_to_spawn()
return /obj/structure/trash_pile
return /obj/structure/trash_pile
/obj/random/outside_mob
name = "Random Mob"
desc = "Eek!"
icon = 'icons/mob/screen1.dmi'
icon_state = "x"
spawn_nothing_percentage = 10
var/faction = "wild animal"
/obj/random/outside_mob/item_to_spawn() // Special version for mobs to have the same faction.
var/mob = pick(
prob(50);/mob/living/simple_animal/retaliate/gaslamp,
prob(50);/mob/living/simple_animal/otie/feral,
prob(20);/mob/living/simple_animal/hostile/dino/virgo3b,
prob(1);/mob/living/simple_animal/hostile/dragon/virgo3b)
if (istype(mob, /mob/living)) // This is just to prevent runtime errors in case some dev is a dumbass and puts invalid items into this.
var/mob/living/simple_animal/this_mob = mob
this_mob.faction = src.faction
if (this_mob.minbodytemp > 200) // Temporary hotfix. Eventually I'll add code to change all mob vars to fit the environment they are spawned in.
this_mob.minbodytemp = 200
return this_mob
else
return mob
/obj/random/outside_mob/spawn_item()
..()
var/datum/map_z_level/z_level = get_z_level_datum(spawned_thing)
if(!istype(z_level, /datum/map_z_level/tether/wilderness))
return
if(!istype(spawned_thing, /mob/living/simple_animal))
return
var/datum/map_z_level/tether/wilderness/wilderness = z_level
if(wilderness.activated)
return
var/mob/living/simple_animal/M = spawned_thing
wilderness.frozen_mobs += M
M.life_disabled = 1
for(var/i = 1 to 20) //wander the mobs around so they aren't always in the same spots
step_rand(M)
sleep(2)
+7
View File
@@ -73,3 +73,10 @@
. = ..()
if(isliving(usr))
playsound(src, pick('sound/effects/footstep/catwalk1.ogg', 'sound/effects/footstep/catwalk2.ogg', 'sound/effects/footstep/catwalk3.ogg', 'sound/effects/footstep/catwalk4.ogg', 'sound/effects/footstep/catwalk5.ogg'), 25, 1)
/obj/structure/catwalk/CheckExit(atom/movable/O, turf/target)
if(O.checkpass(PASSGRILLE))
return 1
if(target && target.z < src.z)
return 0
return 1
@@ -218,6 +218,7 @@
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
playsound(src, WT.usesound, 50)
new /obj/item/stack/material/steel(src.loc)
for(var/mob/M in viewers(src))
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WT].</span>", 3, "You hear welding.", 2)
@@ -249,6 +250,7 @@
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
playsound(src, WT.usesound, 50)
src.welded = !src.welded
src.update_icon()
for(var/mob/M in viewers(src))
@@ -259,7 +261,8 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20))
playsound(src, W.usesound, 50)
if(do_after(user, 20 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
anchored = !anchored
@@ -34,7 +34,7 @@
if(istype(O, /obj/item/device/multitool))
user << "<span class='warning'>Resetting circuitry...</span>"
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
if(do_after(user, 20))
if(do_after(user, 20 * O.toolspeed))
src.locked = 0
user << "<span class = 'caution'> You disable the locking modules.</span>"
update_icon()
@@ -92,11 +92,8 @@
return
else
user << "<span class='warning'>Resetting circuitry...</span>"
sleep(50)
src.locked = 1
user << "<span class='notice'>You re-enable the locking modules.</span>"
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user,20))
if(do_after(user,20 * O.toolspeed))
src.locked = 1
user << "<span class = 'caution'> You re-enable the locking modules.</span>"
return
@@ -16,6 +16,7 @@
new /obj/item/clothing/under/swimsuit/blue(src)
new /obj/item/clothing/under/swimsuit/green(src)
new /obj/item/clothing/under/swimsuit/purple(src)
new /obj/item/clothing/under/swimsuit/striped(src)
new /obj/item/clothing/mask/snorkel(src)
new /obj/item/clothing/mask/snorkel(src)
new /obj/item/clothing/shoes/swimmingfins(src)
@@ -21,10 +21,12 @@
new /obj/item/clothing/under/rank/cargotech/jeans(src)
new /obj/item/clothing/under/rank/cargotech/jeans/female(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/cargo(src)
new /obj/item/clothing/shoes/boots/winter/supply(src)
new /obj/item/clothing/shoes/black(src)
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/device/radio/headset/headset_cargo/alt(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/gloves/fingerless(src)
new /obj/item/clothing/head/soft(src)
// new /obj/item/weapon/cartridge/quartermaster(src)
return
@@ -55,6 +57,7 @@
new /obj/item/device/radio/headset/headset_cargo(src)
new /obj/item/device/radio/headset/headset_cargo/alt(src)
new /obj/item/clothing/gloves/black(src)
new /obj/item/clothing/gloves/fingerless(src)
// new /obj/item/weapon/cartridge/quartermaster(src)
new /obj/item/clothing/suit/fire/firefighter(src)
new /obj/item/weapon/tank/emergency/oxygen(src)
@@ -62,4 +65,5 @@
new /obj/item/clothing/glasses/meson(src)
new /obj/item/clothing/head/soft(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/cargo(src)
new /obj/item/clothing/shoes/boots/winter/supply(src)
return
@@ -32,10 +32,11 @@
new /obj/item/clothing/suit/storage/hazardvest(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/multitool(src)
new /obj/item/weapon/weldingtool/experimental(src)
new /obj/item/weapon/storage/belt/utility/chief/full(src)
new /obj/item/device/flash(src)
new /obj/item/taperoll/engineering(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering(src)
new /obj/item/clothing/shoes/boots/winter/engineering(src)
new /obj/item/weapon/tank/emergency/oxygen/engi(src)
new /obj/item/weapon/reagent_containers/spray/windowsealant(src) //vorestation addition
return
@@ -128,6 +129,7 @@
new /obj/item/weapon/cartridge/engineering(src)
new /obj/item/taperoll/engineering(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering(src)
new /obj/item/clothing/shoes/boots/winter/engineering(src)
new /obj/item/weapon/tank/emergency/oxygen/engi(src)
new /obj/item/weapon/reagent_containers/spray/windowsealant(src) //vorestation addition
return
@@ -164,5 +166,6 @@
new /obj/item/weapon/cartridge/atmos(src)
new /obj/item/taperoll/atmos(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos(src)
new /obj/item/clothing/shoes/boots/winter/atmos(src)
new /obj/item/weapon/tank/emergency/oxygen/engi(src)
return
@@ -29,21 +29,22 @@
lazors++
if (istype(G, /obj/item/weapon/gun/projectile/))
shottas++
if (lazors || shottas)
for (var/i = 0 to 2)
for (var/i = 0 to 2)
if(lazors || shottas) // only make icons if we have one of the two types.
var/image/gun = image(icon(src.icon))
if (lazors > 0 && (shottas <= 0 || prob(50)))
if (lazors > shottas)
lazors--
gun.icon_state = "laser"
else if (shottas > 0)
else if (shottas)
shottas--
gun.icon_state = "projectile"
gun.pixel_x = i*4
overlays += gun
overlays += icon(src.icon,"door")
overlays += icon(src.icon, "door")
if(welded)
overlays += icon(src.icon,"welded")
if(broken)
overlays += icon(src.icon,"broken")
@@ -51,3 +52,4 @@
overlays += icon(src.icon,"locked")
else
overlays += icon(src.icon,"open")
@@ -25,5 +25,7 @@
new /obj/item/weapon/material/hatchet(src)
new /obj/item/weapon/wirecutters/clippers(src)
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/hydro(src)
new /obj/item/clothing/shoes/boots/winter/hydro(src)
// new /obj/item/weapon/bee_net(src) //No more bees, March 2014
return
@@ -112,6 +112,7 @@
new /obj/item/device/radio/headset/headset_med(src)
new /obj/item/device/radio/headset/headset_med/alt(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/medical(src)
new /obj/item/clothing/shoes/boots/winter/medical(src)
new /obj/item/weapon/storage/box/freezer(src)
new /obj/item/weapon/storage/box/freezer(src)
new /obj/item/weapon/storage/box/freezer(src)
@@ -205,6 +206,7 @@
new /obj/item/weapon/reagent_containers/hypospray/vr(src) //VOREStation Edit - MKII Hypospray
new /obj/item/weapon/reagent_containers/glass/beaker/vial/vr(src) //VOREStation Edit - A vial for hypo
new /obj/item/clothing/suit/storage/hooded/wintercoat/medical(src)
new /obj/item/clothing/shoes/boots/winter/medical(src)
new /obj/item/weapon/storage/box/freezer(src)
new /obj/item/clothing/mask/gas(src)
return
@@ -24,6 +24,7 @@
// Not really the best way to do this, but it's better than "contents = list()"!
for(var/atom/movable/AM in contents)
qdel(AM)
new /obj/item/clothing/under/medigown(src)
new /obj/item/clothing/under/color/white( src )
new /obj/item/clothing/shoes/white( src )
return
@@ -18,6 +18,8 @@
new /obj/item/device/radio/headset/headset_sci(src)
new /obj/item/weapon/tank/air(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/science(src)
new /obj/item/clothing/shoes/boots/winter/science(src)
return
@@ -50,4 +52,6 @@
new /obj/item/weapon/tank/air(src)
new /obj/item/clothing/mask/gas(src)
new /obj/item/device/flash(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/science(src)
new /obj/item/clothing/shoes/boots/winter/science(src)
return
@@ -93,7 +93,7 @@
user.visible_message("\The [user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.")
else
user.visible_message("\The [user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.")
if(do_after(user, 20))
if(do_after(user, 20 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You [anchored? "un" : ""]secured \the [src]!</span>"
anchored = !anchored
@@ -149,6 +149,9 @@
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/cell/device/weapon(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/head/beret/sec/corporate/hos(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
new /obj/item/clothing/shoes/boots/winter/security(src)
new /obj/item/device/flashlight/maglight(src)
return
//VOREStation Edit End
@@ -193,6 +196,7 @@
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/clothing/head/beret/sec/corporate/warden(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
new /obj/item/clothing/shoes/boots/winter/security(src)
new /obj/item/device/flashlight/maglight(src)
new /obj/item/device/megaphone(src)
new /obj/item/clothing/mask/gas/half(src)
@@ -239,6 +243,7 @@
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/cell/device/weapon(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
new /obj/item/clothing/shoes/boots/winter/security(src)
new /obj/item/device/flashlight/maglight(src)
return
@@ -295,10 +300,7 @@
new /obj/item/device/radio/headset/headset_sec(src)
new /obj/item/device/radio/headset/headset_sec/alt(src)
new /obj/item/clothing/suit/storage/vest/detective(src)
new /obj/item/ammo_magazine/m44sl/rubber(src)
new /obj/item/ammo_magazine/m44sl/rubber(src)
new /obj/item/taperoll/police(src)
new /obj/item/weapon/gun/projectile/revolver/consul(src) //VOREStation Edit
new /obj/item/clothing/accessory/holster/armpit(src)
new /obj/item/device/flashlight/maglight(src)
new /obj/item/weapon/reagent_containers/food/drinks/flask/detflask(src)
@@ -266,6 +266,9 @@
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering/atmos(src)
new /obj/item/clothing/shoes/boots/winter/atmos(src)
new /obj/item/clothing/shoes/boots/winter/atmos(src)
new /obj/item/clothing/shoes/boots/winter/atmos(src)
return
/obj/structure/closet/wardrobe/engineering_yellow
@@ -296,6 +299,9 @@
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/engineering(src)
new /obj/item/clothing/shoes/boots/winter/engineering(src)
new /obj/item/clothing/shoes/boots/winter/engineering(src)
new /obj/item/clothing/shoes/boots/winter/engineering(src)
new /obj/item/clothing/shoes/boots/workboots(src)
new /obj/item/clothing/shoes/boots/workboots(src)
new /obj/item/clothing/shoes/boots/workboots(src)
@@ -361,6 +367,7 @@
new /obj/item/clothing/shoes/slippers(src)
new /obj/item/clothing/shoes/slippers(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/science(src)
new /obj/item/clothing/shoes/boots/winter/science(src)
new /obj/item/weapon/storage/backpack/toxins(src)
new /obj/item/weapon/storage/backpack/toxins(src)
new /obj/item/weapon/storage/backpack/satchel/tox(src)
@@ -486,6 +493,22 @@
new /obj/item/clothing/mask/surgical(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/medical(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/medical(src)
new /obj/item/clothing/shoes/boots/winter/medical(src)
new /obj/item/clothing/shoes/boots/winter/medical(src)
return
/obj/structure/closet/wardrobe/medic_gown
name = "cloning wardrobe"
icon_state = "white"
icon_closed = "white"
/obj/structure/closet/wardrobe/medic_gown/New()
..()
new /obj/item/clothing/under/medigown(src)
new /obj/item/clothing/under/medigown(src)
new /obj/item/clothing/under/medigown(src)
new /obj/item/clothing/under/medigown(src)
return
@@ -644,6 +667,7 @@
new /obj/item/clothing/head/caphat/formal(src)
new /obj/item/clothing/under/captainformal(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/captain(src)
new /obj/item/clothing/shoes/boots/winter/command(src)
new /obj/item/clothing/head/beret/centcom/captain(src)
new /obj/item/clothing/under/gimmick/rank/captain/suit(src)
new /obj/item/clothing/under/gimmick/rank/captain/suit/skirt(src)
@@ -97,7 +97,7 @@
else if(istype(W, /obj/item/weapon/wirecutters))
if(rigged)
user << "<span class='notice'>You cut away the wiring.</span>"
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
rigged = 0
return
else return attack_hand(user)
@@ -43,7 +43,7 @@
/obj/structure/largecrate/animal/pred/New() //This is nessesary to get a random one each time.
held_type = pick(/mob/living/simple_animal/hostile/bee,
held_type = pick(/mob/living/simple_animal/retaliate/bee,
/mob/living/simple_animal/catgirl;3,
/mob/living/simple_animal/hostile/frog,
/mob/living/simple_animal/horse,
@@ -53,6 +53,7 @@
/mob/living/simple_animal/hostile/bear;0.5,
/mob/living/simple_animal/hostile/bear/brown;0.5,
/mob/living/simple_animal/hostile/carp,
/mob/living/simple_animal/otie/friendly,
/mob/living/simple_animal/hostile/mimic)
..()
@@ -70,4 +71,26 @@
/mob/living/simple_animal/hostile/alien/drone,
/mob/living/simple_animal/hostile/alien/sentinel,
/mob/living/simple_animal/hostile/alien/queen)
..()
/obj/structure/largecrate/animal/guardbeast
name = "V.A.R.M.A.corp autoNOMous security solution"
desc = "The V.A.R.M.A.corp bioengineering division flagship product on trained optimal snowflake guard dogs."
icon = 'icons/obj/storage_vr.dmi'
icon_state = "sotiecrate"
held_type = /mob/living/simple_animal/otie/friendly/security
/obj/structure/largecrate/animal/otie
name = "V.A.R.M.A.corp adoptable reject (Dangerous!)"
desc = "A warning on the side says the creature inside was returned to the supplier after injuring or devouring several unlucky members of the previous adoption family. It was given a second chance with the next customer. Godspeed and good luck with your new pet!"
icon = 'icons/obj/storage_vr.dmi'
icon_state = "otiecrate2"
held_type = /mob/living/simple_animal/otie/friendly/cotie
var/taped = 1
/obj/structure/largecrate/animal/otie/attack_hand(mob/living/carbon/human/M as mob)//I just couldn't decide between the icons lmao
if(taped == 1)
playsound(src, 'sound/items/poster_ripped.ogg', 50, 1)
icon_state = "otiecrate"
taped = 0
..()
+1 -2
View File
@@ -37,9 +37,8 @@
/obj/structure/curtain/attackby(obj/item/P, mob/user)
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
playsound(src, P.usesound, 50, 1)
user << "<span class='notice'>You start to cut the shower curtains.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 10))
user << "<span class='notice'>You cut the shower curtains.</span>"
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
+19 -19
View File
@@ -71,18 +71,18 @@
glass_type = "/glass_medical"
airlock_type = "/medical"
/obj/structure/door_assembly/door_assembly_ext
base_icon_state = "ext"
base_name = "External airlock"
glass_type = "/glass_external"
airlock_type = "/external"
/obj/structure/door_assembly/door_assembly_mai
base_icon_state = "mai"
base_name = "Maintenance airlock"
airlock_type = "/maintenance"
glass = -1
/obj/structure/door_assembly/door_assembly_ext
base_icon_state = "ext"
base_name = "External airlock"
airlock_type = "/external"
glass = -1
/obj/structure/door_assembly/door_assembly_fre
base_icon_state = "fre"
base_name = "Freezer airlock"
@@ -167,10 +167,10 @@
if(istype(W, /obj/item/weapon/weldingtool) && ( (istext(glass)) || (glass == 1) || (!anchored) ))
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0, user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src, WT.usesound, 50, 1)
if(istext(glass))
user.visible_message("[user] welds the [glass] plating off the airlock assembly.", "You start to weld the [glass] plating off the airlock assembly.")
if(do_after(user, 40))
if(do_after(user, 40 * WT.toolspeed))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You welded the [glass] plating off!</span>")
var/M = text2path("/obj/item/stack/material/[glass]")
@@ -178,14 +178,14 @@
glass = 0
else if(glass == 1)
user.visible_message("[user] welds the glass panel out of the airlock assembly.", "You start to weld the glass panel out of the airlock assembly.")
if(do_after(user, 40))
if(do_after(user, 40 * WT.toolspeed))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You welded the glass panel out!</span>")
new /obj/item/stack/material/glass/reinforced(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
if(do_after(user, 40))
if(do_after(user, 40 * WT.toolspeed))
if(!src || !WT.isOn()) return
to_chat(user, "<span class='notice'>You dissasembled the airlock assembly!</span>")
new /obj/item/stack/material/steel(src.loc, 4)
@@ -195,13 +195,13 @@
return
else if(istype(W, /obj/item/weapon/wrench) && state == 0)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
if(anchored)
user.visible_message("[user] begins unsecuring the airlock assembly from the floor.", "You starts unsecuring the airlock assembly from the floor.")
else
user.visible_message("[user] begins securing the airlock assembly to the floor.", "You starts securing the airlock assembly to the floor.")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You [anchored? "un" : ""]secured the airlock assembly!</span>")
anchored = !anchored
@@ -218,17 +218,17 @@
to_chat(user, "<span class='notice'>You wire the airlock.</span>")
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You cut the airlock wires.!</span>")
new/obj/item/stack/cable_coil(src.loc, 1)
src.state = 0
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
if(do_after(user, 40))
@@ -246,10 +246,10 @@
src.state = 1
return
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("\The [user] starts removing the electronics from the airlock assembly.", "You start removing the electronics from the airlock assembly.")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You removed the airlock electronics!</span>")
src.state = 1
@@ -282,10 +282,10 @@
glass = material_name
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>Now finishing the airlock.</span>")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user, "<span class='notice'>You finish the airlock!</span>")
var/path
@@ -14,7 +14,7 @@
/obj/structure/bed/chair/e_chair/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
var/obj/structure/bed/chair/C = new /obj/structure/bed/chair(loc)
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
C.set_dir(dir)
part.loc = loc
part.master = null
+2 -2
View File
@@ -36,8 +36,8 @@
if(istype(O, /obj/item/weapon/wrench))
if(!has_extinguisher)
user << "<span class='notice'>You start to unwrench the extinguisher cabinet.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15))
playsound(src.loc, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
user << "<span class='notice'>You unwrench the extinguisher cabinet.</span>"
new /obj/item/frame/extinguisher_cabinet( src.loc )
qdel(src)
+2 -2
View File
@@ -4,7 +4,7 @@
anchored = 1
density = 1
pixel_x = -16
layer = 9
layer = MOB_LAYER // You know what, let's play it safe.
/obj/structure/flora/tree/pine
name = "pine tree"
@@ -359,4 +359,4 @@
/obj/structure/flora/pottedplant/xmas
name = "small christmas tree"
desc = "This is a tiny well lit decorative christmas tree."
icon_state = "plant-xmas"
icon_state = "plant-xmas"
+15 -15
View File
@@ -56,22 +56,22 @@
/obj/structure/girder/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench) && state == 0)
if(anchored && !reinf_material)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now disassembling the girder...</span>"
if(do_after(user,40))
if(do_after(user,40 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You dissasembled the girder!</span>"
dismantle()
else if(!anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now securing the girder...</span>"
if(do_after(user, 40,src))
if(do_after(user, 40 * W.toolspeed, src))
user << "<span class='notice'>You secured the girder!</span>"
reset_girder()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,30))
if(do_after(user,30 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
@@ -82,21 +82,21 @@
else if(istype(W, /obj/item/weapon/screwdriver))
if(state == 2)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now unsecuring support struts...</span>"
if(do_after(user,40))
if(do_after(user,40 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You unsecured the support struts!</span>"
state = 1
else if(anchored && !reinf_material)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
reinforcing = !reinforcing
user << "<span class='notice'>\The [src] can now be [reinforcing? "reinforced" : "constructed"]!</span>"
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now removing support struts...</span>"
if(do_after(user,40))
if(do_after(user,40 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You removed the support struts!</span>"
reinf_material.place_dismantled_product(get_turf(src))
@@ -104,9 +104,9 @@
reset_girder()
else if(istype(W, /obj/item/weapon/crowbar) && state == 0 && anchored)
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now dislodging the girder...</span>"
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
user << "<span class='notice'>You dislodged the girder!</span>"
icon_state = "displaced"
@@ -233,15 +233,15 @@
/obj/structure/girder/cult/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>Now disassembling the girder...</span>"
if(do_after(user,40))
if(do_after(user,40 * W.toolspeed))
user << "<span class='notice'>You dissasembled the girder!</span>"
dismantle()
else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter))
user << "<span class='notice'>Now slicing apart the girder...</span>"
if(do_after(user,30))
if(do_after(user,30 * W.toolspeed))
user << "<span class='notice'>You slice apart the girder!</span>"
dismantle()
+3 -3
View File
@@ -65,7 +65,7 @@
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
var/damage = Proj.get_structure_damage()
var/passthrough = 0
if(!damage) return
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
@@ -96,12 +96,12 @@
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(iswirecutter(W))
if(!shock(user, 100))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
new /obj/item/stack/rods(get_turf(src), destroyed ? 1 : 2)
qdel(src)
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
anchored = !anchored
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the grille.</span>", \
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
+3 -3
View File
@@ -51,8 +51,8 @@
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/weapon/wrench))
if(!glass)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed))
user << "<span class='notice'>You unfasten the frame.</span>"
new /obj/item/frame/mirror( src.loc )
qdel(src)
@@ -65,7 +65,7 @@
new /obj/item/weapon/material/shard( src.loc )
return
if(!shattered && glass)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(src.loc, I.usesound, 50, 1)
user << "<span class='notice'>You remove the glass.</span>"
glass = !glass
icon_state = "mirror_frame"
+4 -4
View File
@@ -414,18 +414,18 @@
/obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob)
if (istype(O, /obj/item/weapon/wrench))
if (anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, O.usesound, 50, 1)
user << "<span class='notice'>You begin to loosen \the [src]'s casters...</span>"
if (do_after(user, 40))
if (do_after(user, 40 * O.toolspeed))
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'>You have loosened \the [src]. Now it can be pulled somewhere else.</span>", \
"You hear ratchet.")
src.anchored = 0
else
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src.loc, O.usesound, 50, 1)
user << "<span class='notice'>You begin to tighten \the [src] to the floor...</span>"
if (do_after(user, 20))
if (do_after(user, 20 * O.toolspeed))
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'>You have tightened \the [src]'s casters. Now it can be played again</span>.", \
+2 -2
View File
@@ -42,8 +42,8 @@
user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>"
if(istype(O, /obj/item/weapon/wrench))
user << "<span class='notice'>You start to unwrench the noticeboard.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15))
playsound(src.loc, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
user << "<span class='notice'>You unwrench the noticeboard.</span>"
new /obj/item/frame/noticeboard( src.loc )
qdel(src)
+53 -1
View File
@@ -22,6 +22,7 @@
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double))
playsound(src, tool.usesound, 50, 1)
user << "You unfasten the sign with your [tool]."
var/obj/item/sign/S = new(src.loc)
S.name = name
@@ -274,6 +275,25 @@
desc = "A warning sign which reads 'HYDROPONICS'."
icon_state = "hydro1"
/obj/structure/sign/hydro
name = "\improper HYDROPONICS"
desc = "A sign labelling an area as a place where plants are grown."
icon_state = "hydro1"
/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/directions
name = "direction sign"
desc = "A direction sign, claiming to know the way."
icon_state = "direction"
/obj/structure/sign/directions/New()
..()
desc = "A direction sign, pointing out which way \the [src] is."
/obj/structure/sign/directions/science
name = "\improper Science department"
desc = "A direction sign, pointing out which way the Science department is."
@@ -295,10 +315,14 @@
icon_state = "direction_med"
/obj/structure/sign/directions/evac
name = "\improper Escape Arm"
name = "\improper Evacuation"
desc = "A direction sign, pointing out which way the Escape Shuttle dock is."
icon_state = "direction_evac"
/obj/structure/sign/directions/bridge
name = "\improper Bridge"
icon_state = "direction_bridge"
/obj/structure/sign/directions/cargo
name = "\improper Cargo department"
desc = "A direction sign, pointing out which way the Cargo department is."
@@ -667,3 +691,31 @@
/obj/structure/sign/department/prison
name = "PRISON"
icon_state = "prison"
/obj/structure/sign/deck/first
name = "\improper First Deck"
icon_state = "deck-1"
/obj/structure/sign/deck/second
name = "\improper Second Deck"
icon_state = "deck-2"
/obj/structure/sign/deck/third
name = "\improper Third Deck"
icon_state = "deck-3"
/obj/structure/sign/deck/fourth
name = "\improper Fourth Deck"
icon_state = "deck-4"
/obj/structure/sign/hangar/one
name = "\improper Hangar One"
icon_state = "hangar-1"
/obj/structure/sign/hangar/two
name = "\improper Hangar Two"
icon_state = "hangar-2"
/obj/structure/sign/hangar/three
name = "\improper Hangar Three"
icon_state = "hangar-3"
@@ -90,7 +90,7 @@
/obj/structure/bed/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
dismantle()
qdel(src)
else if(istype(W,/obj/item/stack))
@@ -125,7 +125,7 @@
user << "\The [src] has no padding to remove."
return
user << "You remove the padding from \the [src]."
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 100, 1)
remove_padding()
else if(istype(W, /obj/item/weapon/grab))
@@ -109,7 +109,7 @@ var/global/list/stool_cache = list() //haha stool
/obj/item/weapon/stool/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
playsound(src, W.usesound, 50, 1)
dismantle()
qdel(src)
else if(istype(W,/obj/item/stack))
@@ -143,7 +143,7 @@ var/global/list/stool_cache = list() //haha stool
user << "\The [src] has no padding to remove."
return
user << "You remove the padding from \the [src]."
playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src.loc, W.usesound, 50, 1)
remove_padding()
else
..()
+108 -106
View File
@@ -19,7 +19,6 @@
/obj/item/device/perfect_tele,
/obj/item/weapon/bluespace_harpoon,
/obj/item/weapon/gun/energy/netgun,
/obj/item/weapon/card/id/syndicate,
/obj/item/weapon/moneybag/vault,
/obj/item/weapon/permit,
/obj/item/weapon/gun/projectile/dartgun
@@ -118,117 +117,120 @@
//Random lists
/obj/structure/trash_pile/proc/produce_alpha_item()
var/path = pick(prob(4);/obj/item/broken_device,
prob(2);/obj/item/weapon/contraband/poster,
prob(2);/obj/item/device/flashlight/flare,
prob(2);/obj/item/device/flashlight/glowstick,
prob(2);/obj/item/device/flashlight/glowstick/blue,
prob(1);/obj/item/device/flashlight/glowstick/orange,
prob(1);/obj/item/device/flashlight/glowstick/red,
prob(1);/obj/item/device/flashlight/glowstick/yellow,
prob(1);/obj/item/device/flashlight/pen,
prob(4);/obj/item/weapon/cell,
prob(4);/obj/item/weapon/cell/device,
prob(3);/obj/item/weapon/cell/high,
prob(2);/obj/item/weapon/cell/super,
prob(5);/obj/random/cigarettes,
prob(3);/obj/item/clothing/mask/gas,
prob(2);/obj/item/clothing/mask/gas/half,
prob(4);/obj/item/clothing/mask/breath,
prob(2);/obj/item/weapon/reagent_containers/glass/rag,
prob(4);/obj/item/weapon/reagent_containers/food/snacks/liquidfood,
prob(2);/obj/item/weapon/storage/secure/briefcase,
prob(4);/obj/item/weapon/storage/briefcase,
prob(5);/obj/item/weapon/storage/backpack,
prob(5);/obj/item/weapon/storage/backpack/satchel/norm,
prob(4);/obj/item/weapon/storage/backpack/satchel,
prob(3);/obj/item/weapon/storage/backpack/dufflebag,
prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie,
prob(5);/obj/item/weapon/storage/box,
prob(3);/obj/item/weapon/storage/box/donkpockets,
prob(2);/obj/item/weapon/storage/box/sinpockets,
prob(1);/obj/item/weapon/storage/box/cups,
prob(3);/obj/item/weapon/storage/box/mousetraps,
prob(3);/obj/item/weapon/storage/box/engineer,
prob(3);/obj/item/weapon/storage/wallet,
prob(1);/obj/item/device/paicard,
prob(2);/obj/item/clothing/shoes/galoshes,
prob(1);/obj/item/clothing/shoes/syndigaloshes,
prob(4);/obj/item/clothing/shoes/black,
prob(4);/obj/item/clothing/shoes/laceup,
prob(4);/obj/item/clothing/shoes/black,
prob(4);/obj/item/clothing/shoes/leather,
prob(1);/obj/item/clothing/gloves/yellow,
prob(3);/obj/item/clothing/gloves/botanic_leather,
prob(2);/obj/item/clothing/gloves/sterile/latex,
prob(5);/obj/item/clothing/gloves/white,
prob(5);/obj/item/clothing/gloves/rainbow,
prob(2);/obj/item/clothing/gloves/fyellow,
prob(1);/obj/item/clothing/glasses/sunglasses,
prob(3);/obj/item/clothing/glasses/meson,
prob(2);/obj/item/clothing/glasses/meson/prescription,
prob(1);/obj/item/clothing/glasses/welding,
prob(1);/obj/item/clothing/head/bio_hood/general,
prob(4);/obj/item/clothing/head/hardhat,
prob(3);/obj/item/clothing/head/hardhat/red,
prob(1);/obj/item/clothing/head/ushanka,
prob(2);/obj/item/clothing/head/welding,
prob(4);/obj/item/clothing/suit/storage/hazardvest,
prob(1);/obj/item/clothing/suit/space/emergency,
prob(3);/obj/item/clothing/suit/storage/toggle/bomber,
prob(1);/obj/item/clothing/suit/bio_suit/general,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/black,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/blue,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/red,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/yellow,
prob(3);/obj/item/clothing/suit/storage/toggle/brown_jacket,
prob(3);/obj/item/clothing/suit/storage/toggle/leather_jacket,
prob(1);/obj/item/clothing/suit/storage/vest/press,
prob(3);/obj/item/clothing/suit/storage/apron,
prob(4);/obj/item/clothing/under/color/grey,
prob(2);/obj/item/clothing/under/syndicate/tacticool,
prob(2);/obj/item/clothing/under/pants/camo,
prob(1);/obj/item/clothing/under/harness,
prob(1);/obj/item/clothing/under/tactical,
prob(3);/obj/item/clothing/accessory/storage/webbing,
prob(4);/obj/item/weapon/spacecash/c1,
prob(3);/obj/item/weapon/spacecash/c10,
prob(3);/obj/item/weapon/spacecash/c20,
prob(1);/obj/item/weapon/spacecash/c50,
prob(1);/obj/item/weapon/spacecash/c100,
prob(3);/obj/item/weapon/camera_assembly,
prob(4);/obj/item/weapon/caution,
prob(3);/obj/item/weapon/caution/cone,
prob(2);/obj/item/weapon/card/emag_broken,
prob(1);/obj/item/weapon/card/emag,
prob(2);/obj/item/device/camera,
prob(3);/obj/item/device/pda,
prob(3);/obj/item/device/radio/headset)
var/path = pick(prob(5);/obj/item/clothing/gloves/rainbow,
prob(5);/obj/item/clothing/gloves/white,
prob(5);/obj/item/weapon/storage/backpack,
prob(5);/obj/item/weapon/storage/backpack/satchel/norm,
prob(5);/obj/item/weapon/storage/box,
prob(5);/obj/random/cigarettes,
prob(4);/obj/item/broken_device,
prob(4);/obj/item/clothing/head/hardhat,
prob(4);/obj/item/clothing/mask/breath,
prob(4);/obj/item/clothing/shoes/black,
prob(4);/obj/item/clothing/shoes/black,
prob(4);/obj/item/clothing/shoes/laceup,
prob(4);/obj/item/clothing/shoes/leather,
prob(4);/obj/item/clothing/suit/storage/hazardvest,
prob(4);/obj/item/clothing/under/color/grey,
prob(4);/obj/item/weapon/caution,
prob(4);/obj/item/weapon/cell,
prob(4);/obj/item/weapon/cell/device,
prob(4);/obj/item/weapon/reagent_containers/food/snacks/liquidfood,
prob(4);/obj/item/weapon/spacecash/c1,
prob(4);/obj/item/weapon/storage/backpack/satchel,
prob(4);/obj/item/weapon/storage/briefcase,
prob(3);/obj/item/clothing/accessory/storage/webbing,
prob(3);/obj/item/clothing/glasses/meson,
prob(3);/obj/item/clothing/gloves/botanic_leather,
prob(3);/obj/item/clothing/head/hardhat/red,
prob(3);/obj/item/clothing/mask/gas,
prob(3);/obj/item/clothing/suit/storage/apron,
prob(3);/obj/item/clothing/suit/storage/toggle/bomber,
prob(3);/obj/item/clothing/suit/storage/toggle/brown_jacket,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/black,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/blue,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/red,
prob(3);/obj/item/clothing/suit/storage/toggle/hoodie/yellow,
prob(3);/obj/item/clothing/suit/storage/toggle/leather_jacket,
prob(3);/obj/item/device/pda,
prob(3);/obj/item/device/radio/headset,
prob(3);/obj/item/weapon/camera_assembly,
prob(3);/obj/item/weapon/caution/cone,
prob(3);/obj/item/weapon/cell/high,
prob(3);/obj/item/weapon/spacecash/c10,
prob(3);/obj/item/weapon/spacecash/c20,
prob(3);/obj/item/weapon/storage/backpack/dufflebag,
prob(3);/obj/item/weapon/storage/box/donkpockets,
prob(3);/obj/item/weapon/storage/box/engineer,
prob(3);/obj/item/weapon/storage/box/mousetraps,
prob(3);/obj/item/weapon/storage/wallet,
prob(2);/obj/item/clothing/glasses/meson/prescription,
prob(2);/obj/item/clothing/gloves/fyellow,
prob(2);/obj/item/clothing/gloves/sterile/latex,
prob(2);/obj/item/clothing/head/welding,
prob(2);/obj/item/clothing/mask/gas/half,
prob(2);/obj/item/clothing/shoes/galoshes,
prob(2);/obj/item/clothing/under/pants/camo,
prob(2);/obj/item/clothing/under/syndicate/tacticool,
prob(2);/obj/item/device/camera,
prob(2);/obj/item/device/flashlight/flare,
prob(2);/obj/item/device/flashlight/glowstick,
prob(2);/obj/item/device/flashlight/glowstick/blue,
prob(2);/obj/item/weapon/card/emag_broken,
prob(2);/obj/item/weapon/cell/super,
prob(2);/obj/item/weapon/contraband/poster,
prob(2);/obj/item/weapon/reagent_containers/glass/rag,
prob(2);/obj/item/weapon/storage/box/sinpockets,
prob(2);/obj/item/weapon/storage/secure/briefcase,
prob(1);/obj/item/clothing/glasses/sunglasses,
prob(1);/obj/item/clothing/glasses/welding,
prob(1);/obj/item/clothing/gloves/yellow,
prob(1);/obj/item/clothing/head/bio_hood/general,
prob(1);/obj/item/clothing/head/ushanka,
prob(1);/obj/item/clothing/shoes/syndigaloshes,
prob(1);/obj/item/clothing/suit/bio_suit/general,
prob(1);/obj/item/clothing/suit/space/emergency,
prob(1);/obj/item/clothing/suit/storage/vest/press,
prob(1);/obj/item/clothing/under/harness,
prob(1);/obj/item/clothing/under/tactical,
prob(1);/obj/item/device/flashlight/glowstick/orange,
prob(1);/obj/item/device/flashlight/glowstick/red,
prob(1);/obj/item/device/flashlight/glowstick/yellow,
prob(1);/obj/item/device/flashlight/pen,
prob(1);/obj/item/device/paicard,
prob(1);/obj/item/weapon/card/emag,
prob(1);/obj/item/clothing/mask/gas/voice,
prob(1);/obj/item/weapon/spacecash/c100,
prob(1);/obj/item/weapon/spacecash/c50,
prob(1);/obj/item/weapon/storage/backpack/dufflebag/syndie,
prob(1);/obj/item/weapon/storage/box/cups)
var/obj/item/I = new path()
return I
/obj/structure/trash_pile/proc/produce_beta_item()
var/path = pick(prob(6);/obj/item/weapon/storage/pill_bottle/tramadol,
prob(4);/obj/item/weapon/storage/pill_bottle/happy,
prob(4);/obj/item/weapon/storage/pill_bottle/zoom,
prob(4);/obj/item/weapon/material/butterfly,
prob(2);/obj/item/weapon/material/butterfly/switchblade,
prob(2);/obj/item/weapon/material/knuckledusters,
prob(1);/obj/item/weapon/material/hatchet/tacknife,
prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc,
prob(1);/obj/item/weapon/beartrap,
prob(1);/obj/item/weapon/handcuffs/fuzzy,
prob(1);/obj/item/weapon/legcuffs,
prob(2);/obj/item/weapon/reagent_containers/syringe/drugs,
prob(1);/obj/item/weapon/reagent_containers/syringe/steroid,
prob(4);/obj/item/device/radio_jammer,
prob(2);/obj/item/weapon/storage/box/syndie_kit/spy,
prob(2);/obj/item/weapon/grenade/anti_photon,
prob(1);/obj/item/weapon/cell/hyper/empty,
prob(1);/obj/item/weapon/disk/nifsoft/compliance,
prob(1);/obj/item/device/nif/bad,
prob(1);/obj/item/device/sleevemate)
prob(4);/obj/item/weapon/storage/pill_bottle/happy,
prob(4);/obj/item/weapon/storage/pill_bottle/zoom,
prob(4);/obj/item/weapon/gun/energy/sizegun,
prob(3);/obj/item/weapon/material/butterfly,
prob(3);/obj/item/weapon/material/butterfly/switchblade,
prob(3);/obj/item/weapon/material/knuckledusters,
prob(3);/obj/item/weapon/reagent_containers/syringe/drugs,
prob(2);/obj/item/weapon/handcuffs/fuzzy,
prob(2);/obj/item/weapon/legcuffs,
prob(2);/obj/item/weapon/storage/box/syndie_kit/spy,
prob(2);/obj/item/weapon/grenade/anti_photon,
prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc,
prob(1);/obj/item/device/nif/bad,
prob(1);/obj/item/device/radio_jammer,
prob(1);/obj/item/device/sleevemate,
prob(1);/obj/item/device/bodysnatcher,
prob(1);/obj/item/weapon/beartrap,
prob(1);/obj/item/weapon/cell/hyper/empty,
prob(1);/obj/item/weapon/disk/nifsoft/compliance,
prob(1);/obj/item/weapon/material/hatchet/tacknife,
prob(1);/obj/item/weapon/reagent_containers/syringe/steroid)
var/obj/item/I = new path()
return I
+2 -2
View File
@@ -162,8 +162,8 @@
if(istype(I, /obj/item/weapon/wrench))
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I].</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 50))
playsound(src.loc, I.usesound, 50, 1)
if(do_after(user, 50 * I.toolspeed))
watertemp = newtemp
user.visible_message("<span class='notice'>[user] adjusts the shower with \the [I].</span>", "<span class='notice'>You adjust the shower with \the [I].</span>")
add_fingerprint(user)
@@ -93,9 +93,9 @@ obj/structure/windoor_assembly/Destroy()
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src.loc, WT.usesound, 50, 1)
if(do_after(user, 40))
if(do_after(user, 40 * WT.toolspeed))
if(!src || !WT.isOn()) return
to_chat(user,"<span class='notice'>You disassembled the windoor assembly!</span>")
if(secure)
@@ -109,10 +109,10 @@ obj/structure/windoor_assembly/Destroy()
//Wrenching an unsecure assembly anchors it in place. Step 4 complete
if(istype(W, /obj/item/weapon/wrench) && !anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] secures the windoor assembly to the floor.", "You start to secure the windoor assembly to the floor.")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user,"<span class='notice'>You've secured the windoor assembly!</span>")
src.anchored = 1
@@ -120,10 +120,10 @@ obj/structure/windoor_assembly/Destroy()
//Unwrenching an unsecure assembly un-anchors it. Step 4 undone
else if(istype(W, /obj/item/weapon/wrench) && anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] unsecures the windoor assembly to the floor.", "You start to unsecure the windoor assembly to the floor.")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user,"<span class='notice'>You've unsecured the windoor assembly!</span>")
src.anchored = 0
@@ -146,10 +146,10 @@ obj/structure/windoor_assembly/Destroy()
//Removing wire from the assembly. Step 5 undone.
if(istype(W, /obj/item/weapon/wirecutters) && !src.electronics)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "You start to cut the wires from airlock assembly.")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
to_chat(user,"<span class='notice'>You cut the windoor wires.!</span>")
@@ -175,10 +175,10 @@ obj/structure/windoor_assembly/Destroy()
//Screwdriver to remove airlock electronics. Step 6 undone.
else if(istype(W, /obj/item/weapon/screwdriver) && src.electronics)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "You start to uninstall electronics from the airlock assembly.")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src || !src.electronics) return
to_chat(user,"<span class='notice'>You've removed the airlock electronics!</span>")
step = 1
@@ -195,10 +195,10 @@ obj/structure/windoor_assembly/Destroy()
to_chat(usr,"<span class='warning'>The assembly has broken airlock electronics.</span>")
return
to_chat(usr,browse(null, "window=windoor_access")) //Not sure what this actually does... -Ner
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
playsound(src, W.usesound, 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
if(do_after(user, 40))
if(do_after(user, 40 * W.toolspeed))
if(!src) return
+5 -5
View File
@@ -242,29 +242,29 @@
if(reinf && state >= 1)
state = 3 - state
update_nearby_icons()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
else if(reinf && state == 0)
anchored = !anchored
update_nearby_icons()
update_verbs()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
update_verbs()
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
state = 1 - state
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
user << (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
else if(istype(W, /obj/item/weapon/wrench) && !anchored && (!state || !reinf))
if(!glasstype)
user << "<span class='notice'>You're not sure how to dismantle \the [src] properly.</span>"
else
playsound(src.loc, 'sound/items/Ratchet.ogg', 75, 1)
playsound(src, W.usesound, 75, 1)
visible_message("<span class='notice'>[user] dismantles \the [src].</span>")
if(dir == SOUTHWEST)
var/obj/item/stack/material/mats = new glasstype(loc)
+126
View File
@@ -0,0 +1,126 @@
/atom/proc/stumble_into(mob/living/M)
playsound(get_turf(M), "punch", 25, 1, -1)
visible_message("<span class='warning'>[M] [pick("ran", "slammed")] into \the [src]!</span>")
to_chat(M, "<span class='warning'>You just [pick("ran", "slammed")] into \the [src]!</span>")
M.apply_damage(5, BRUTE)
M.Weaken(2)
/obj/structure/table/stumble_into(mob/living/M)
var/obj/occupied = turf_is_crowded()
if(occupied)
return ..()
if(material)
playsound(get_turf(src), material.tableslam_noise, 25, 1, -1)
else
playsound(get_turf(src), 'sound/weapons/tablehit1.ogg', 25, 1, -1)
visible_message("<span class='warning'>[M] flopped onto \the [src]!</span>")
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.forceMove(get_turf(src))
/obj/machinery/disposal/stumble_into(mob/living/M)
playsound(get_turf(src), 'sound/effects/clang.ogg', 25, 1, -1)
visible_message("<span class='warning'>[M] [pick("tripped", "stumbled")] into \the [src]!</span>")
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.forceMove(src)
update()
/obj/structure/inflatable/stumble_into(mob/living/M)
playsound(get_turf(M), "sound/effects/Glasshit.ogg", 25, 1, -1)
visible_message("<span class='warning'>[M] [pick("ran", "slammed")] into \the [src]!</span>")
M.Weaken(1)
/obj/structure/kitchenspike/stumble_into(mob/living/M)
playsound(get_turf(M), "sound/weapons/pierce.ogg", 25, 1, -1)
visible_message("<span class='warning'>[M] [pick("ran", "slammed")] into the spikes on \the [src]!</span>")
M.apply_damage(15, BRUTE, sharp=1)
M.Weaken(5)
/obj/structure/m_tray/stumble_into(mob/living/M)
playsound(get_turf(src), 'sound/weapons/tablehit1.ogg', 25, 1, -1)
visible_message("<span class='warning'>[M] flopped onto \the [src]!</span>")
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.forceMove(get_turf(src))
/obj/structure/c_tray/stumble_into(mob/living/M)
playsound(get_turf(src), 'sound/weapons/tablehit1.ogg', 25, 1, -1)
visible_message("<span class='warning'>[M] flopped onto \the [src]!</span>")
M.apply_damage(5, BRUTE)
M.Weaken(2)
M.forceMove(get_turf(src))
/obj/structure/window/stumble_into(mob/living/M)
visible_message("<span class='warning'>[M] [pick("ran", "slammed")] into \the [src]!</span>")
M.apply_damage(5, BRUTE)
M.Weaken(2)
hitby(M)
/obj/structure/railing/stumble_into(mob/living/M)
var/obj/occupied = turf_is_crowded()
if(occupied)
return ..()
playsound(get_turf(src), 'sound/misc/slip.ogg', 25, 1, -1)
visible_message("<span class='warning'>[M] [pick("tripped", "stumbled")] over \the [src]!</span>")
M.Weaken(2)
if(get_turf(M) == get_turf(src))
M.forceMove(get_step(src, src.dir))
else
M.forceMove(get_turf(src))
/obj/machinery/door/stumble_into(mob/living/M)
..()
bumpopen(M)
/obj/machinery/cooker/fryer/stumble_into(mob/living/M)
visible_message("<span class='warning'>[M] [pick("ran", "slammed")] into \the [src]!</span>")
M.apply_damage(15, BURN)
M.Weaken(5)
M.emote("scream")
/obj/machinery/atmospherics/unary/cryo_cell/stumble_into(mob/living/M)
if((stat & (NOPOWER|BROKEN)) || !istype(M, /mob/living/carbon) || occupant || M.abiotic() || !node)
return ..()
playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 25, 1, -1)
visible_message("<span class='warning'>[M] [pick("tripped", "stumbled")] into \the [src]!</span>")
M.apply_damage(5, BRUTE)
M.Weaken(2)
put_mob(M)
/obj/machinery/porta_turret/stumble_into(mob/living/M)
..()
if(!attacked && !emagged)
attacked = 1
spawn()
sleep(60)
attacked = 0
/obj/machinery/space_heater/stumble_into(mob/living/M)
..()
if(on)
M.apply_damage(10, BURN)
M.emote("scream")
/obj/machinery/suit_storage_unit/stumble_into(mob/living/M)
if(!ishuman(M) || !isopen || !ispowered || isbroken || OCCUPANT || HELMET || SUIT)
return ..()
playsound(get_turf(src), 'sound/effects/clang.ogg', 25, 1, -1)
visible_message("<span class='warning'>[M] [pick("tripped", "stumbled")] into \the [src]!</span>")
if(M.client)
M.client.perspective = EYE_PERSPECTIVE
M.client.eye = src
M.forceMove(src)
OCCUPANT = M
isopen = 0
update_icon()
add_fingerprint(M)
updateUsrDialog()
/obj/machinery/vending/stumble_into(mob/living/M)
..()
if(prob(2))
throw_item()