Merge remote-tracking branch 'upstream/master' into embedding

This commit is contained in:
Fox-McCloud
2017-07-01 01:03:04 -04:00
361 changed files with 4653 additions and 1440 deletions
@@ -0,0 +1,188 @@
//Cardboard cutouts! They're man-shaped and can be colored with a crayon to look like a human in a certain outfit, although it's limited, discolored, and obvious to more than a cursory glance.
/obj/item/cardboard_cutout
name = "cardboard cutout"
desc = "A vaguely humanoid cardboard cutout. It's completely blank."
icon = 'icons/obj/cardboard_cutout.dmi'
icon_state = "cutout_basic"
burn_state = FLAMMABLE
w_class = WEIGHT_CLASS_BULKY
var/list/possible_appearances = list("Assistant", "Clown", "Mime",
"Traitor", "Nuke Op", "Cultist", "Revolutionary", "Wizard", "Shadowling", "Xenomorph", "Swarmer",
"Deathsquad Officer", "Ian", "Slaughter Demon",
"Laughter Demon", "Xenomorph Maid", "Security Officer", "Terror Spider")
var/pushed_over = FALSE //If the cutout is pushed over and has to be righted
var/deceptive = FALSE //If the cutout actually appears as what it portray and not a discolored version
var/lastattacker = null
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
if(user.a_intent == INTENT_HELP || pushed_over)
return ..()
user.visible_message("<span class='warning'>[user] pushes over [src]!</span>", "<span class='danger'>You push over [src]!</span>")
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
push_over()
/obj/item/cardboard_cutout/proc/push_over()
name = initial(name)
desc = "[initial(desc)] It's been pushed over."
icon = initial(icon)
icon_state = "cutout_pushed_over"
color = initial(color)
alpha = initial(alpha)
pushed_over = TRUE
/obj/item/cardboard_cutout/attack_self(mob/living/user)
if(!pushed_over)
return
to_chat(user, "<span class='notice'>You right [src].</span>")
desc = initial(desc)
icon = initial(icon)
icon_state = initial(icon_state) //This resets a cutout to its blank state - this is intentional to allow for resetting
pushed_over = FALSE
/obj/item/cardboard_cutout/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/toy/crayon))
change_appearance(I, user)
return
// Why yes, this does closely resemble mob and object attack code.
if(I.flags & NOBLUDGEON)
return
if(!I.force)
playsound(loc, 'sound/weapons/tap.ogg', 20, 1, -1)
else if(I.hitsound)
playsound(loc, I.hitsound, 20, 1, -1)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(I.force)
user.visible_message("<span class='danger'>[user] has hit \
[src] with [I]!</span>", "<span class='danger'>You hit [src] \
with [I]!</span>")
if(prob(I.force))
push_over()
/obj/item/cardboard_cutout/bullet_act(obj/item/projectile/P)
visible_message("<span class='danger'>[src] has been hit by [P]!</span>")
playsound(src, 'sound/weapons/slice.ogg', 50, 1)
if(prob(P.damage))
push_over()
/obj/item/cardboard_cutout/proc/change_appearance(obj/item/toy/crayon/crayon, mob/living/user)
if(!crayon || !user)
return
if(istype(crayon, /obj/item/toy/crayon/spraycan))
var/obj/item/toy/crayon/spraycan/can = crayon
if(can.capped)
to_chat(user, "<span class='warning'>The cap is on [src] remove it first!</span>")
return
if(pushed_over)
to_chat(user, "<span class='warning'>Right [src] first!</span>")
return
var/new_appearance = input(user, "Choose a new appearance for [src].", "26th Century Deception") as null|anything in possible_appearances
if(!new_appearance || !crayon)
return
if(!do_after(user, 10, FALSE, src, TRUE))
return
user.visible_message("<span class='notice'>[user] gives [src] a new look.</span>", "<span class='notice'>Voila! You give [src] a new look.</span>")
alpha = 255
icon = initial(icon)
if(!deceptive)
color = "#FFD7A7"
switch(new_appearance)
if("Assistant")
name = "[pick(first_names_male)] [pick(last_names)]"
desc = "A cardboard cutout of an assistant."
icon_state = "cutout_greytide"
if("Clown")
name = pick(clown_names)
desc = "A cardboard cutout of a clown. You get the feeling that it should be in a corner."
icon_state = "cutout_clown"
if("Mime")
name = pick(mime_names)
desc = "...(A cardboard cutout of a mime.)"
icon_state = "cutout_mime"
if("Traitor")
name = "[pick("Unknown", "Captain")]"
desc = "A cardboard cutout of a traitor."
icon_state = "cutout_traitor"
if("Nuke Op")
name = "[pick("Unknown", "COMMS", "Telecomms", "AI", "stealthy op", "STEALTH", "sneakybeaky", "MEDIC", "Medic", "Gonk op")]"
desc = "A cardboard cutout of a nuclear operative."
icon_state = "cutout_fluke"
if("Cultist")
name = "Unknown"
desc = "A cardboard cutout of a cultist."
icon_state = "cutout_cultist"
//if("Clockwork Cultist")
// name = "[random_name(pick(MALE,FEMALE))]"
// desc = "A cardboard cutout of a servant of Ratvar."
// icon_state = "cutout_servant"
if("Revolutionary")
name = "Unknown"
desc = "A cardboard cutout of a revolutionary."
icon_state = "cutout_viva"
if("Wizard")
name = "[pick(wizard_first)], [pick(wizard_second)]"
desc = "A cardboard cutout of a wizard."
icon_state = "cutout_wizard"
if("Shadowling")
name = "Unknown"
desc = "A cardboard cutout of a shadowling."
icon_state = "cutout_shadowling"
if("Xenomorph")
name = "alien hunter ([rand(1, 999)])"
desc = "A cardboard cutout of a xenomorph."
icon_state = "cutout_fukken_xeno"
if(prob(10))
alpha = 75 //Spooky sneaking!
if("Swarmer")
name = "Swarmer ([rand(1, 999)])"
desc = "A cardboard cutout of a swarmer."
icon_state = "cutout_swarmer"
//if("Ash Walker")
// name = random_name(pick(MALE,FEMALE),"Unathi")
// desc = "A cardboard cutout of an ash walker."
// icon_state = "cutout_free_antag"
if("Deathsquad Officer")
name = pick(commando_names)
desc = "A cardboard cutout of a death commando."
icon_state = "cutout_deathsquad"
if("Ian")
name = "Ian"
desc = "A cardboard cutout of the HoP's beloved corgi."
icon_state = "cutout_ian"
if("Slaughter Demon")
name = "slaughter demon"
desc = "A cardboard cutout of a slaughter demon."
icon = 'icons/mob/mob.dmi'
icon_state = "daemon"
dir = "SOUTH"
if("Laughter Demon")
name = "laughter demon"
desc = "A cardboard cutout of a laughter demon."
icon = 'icons/mob/mob.dmi'
icon_state = "bowmon"
dir = "SOUTH"
if("Xenomorph Maid")
name = "lusty xenomorph maid ([rand(1, 999)])"
desc = "A cardboard cutout of a xenomorph maid."
icon_state = "cutout_lusty"
if("Security Officer")
name = "Private Security Officer"
desc = "A cardboard cutout of a private security officer."
icon_state = "cutout_ntsec"
if("Terror Spider")
name = "Gray Terror Spider"
desc = "A cardboard cutout of a terror spider."
icon = 'icons/mob/terrorspider.dmi'
icon_state = "terror_gray"
dir = "SOUTH"
return 1
/obj/item/cardboard_cutout/setDir()
dir = SOUTH
/obj/item/cardboard_cutout/adaptive //Purchased by Syndicate agents, these cutouts are indistinguishable from normal cutouts but aren't discolored when their appearance is changed
deceptive = TRUE
+27 -4
View File
@@ -73,7 +73,7 @@
temp = pick(graffiti)
else
temp = href_list["type"]
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if((usr.restrained() || usr.stat || !usr.is_in_active_hand(src)))
return
drawtype = temp
update_window(usr)
@@ -147,6 +147,29 @@
colour = "#DA00FF"
colourName = "purple"
/obj/item/toy/crayon/random/New()
icon_state = pick(list("crayonred", "crayonorange", "crayonyellow", "crayongreen", "crayonblue", "crayonpurple"))
switch(icon_state)
if("crayonred")
colour = "#DA0000"
colourName = "red"
if("crayonorange")
colour = "#FF9300"
colourName = "orange"
if("crayonyellow")
colour = "#FFF200"
colourName = "yellow"
if("crayongreen")
colour = "#A8E61D"
colourName = "green"
if("crayonblue")
colour = "#00B7EF"
colourName = "blue"
if("crayonpurple")
colour = "#DA00FF"
colourName = "purple"
..()
/obj/item/toy/crayon/white
icon_state = "crayonwhite"
colour = "#FFFFFF"
@@ -167,7 +190,7 @@
..()
/obj/item/toy/crayon/mime/Topic(href,href_list)
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if((usr.restrained() || usr.stat || usr.is_in_active_hand(src)))
return
if(href_list["color"])
if(colour != "#FFFFFF")
@@ -195,7 +218,7 @@
if(href_list["color"])
var/temp = input(usr, "Please select colour.", "Crayon colour") as color
if((usr.restrained() || usr.stat || usr.get_active_hand() != src))
if((usr.restrained() || usr.stat || usr.is_in_active_hand(src)))
return
colour = temp
update_window(usr)
@@ -214,7 +237,7 @@
/obj/item/toy/crayon/spraycan/New()
..()
name = "NanoTrasen-brand Rapid Paint Applicator"
name = "Nanotrasen-brand Rapid Paint Applicator"
update_icon()
/obj/item/toy/crayon/spraycan/attack_self(mob/living/user as mob)
+16 -1
View File
@@ -74,6 +74,21 @@
if(O.trace_chemicals[V] > 0 && !chemtraces.Find(V))
chemtraces += V
/obj/item/weapon/autopsy_scanner/attackby(obj/item/weapon/P, mob/user)
if(istype(P, /obj/item/weapon/pen))
var/dead_name = input("Insert name of deceased individual")
var/dead_rank = input("Insert rank of deceased individual")
var/dead_tod = input("Insert time of death")
var/dead_cause = input("Insert cause of death")
var/dead_chems = input("Insert any chemical traces")
var/dead_notes = input("Insert any relevant notes")
var/obj/item/weapon/paper/R = new(user.loc)
R.name = "Official Coroner's Report - [dead_name]"
R.info = "<b>NanoTrasen Science Station Cyberiad - Coroner's Report</b><br><br><b>Name of Deceased:</b> [dead_name]</br><br><b>Rank of Deceased:</b> [dead_rank]<br><br><b>Time of Death:</b> [dead_tod]<br><br><b>Cause of Death:</b> [dead_cause]<br><br><b>Trace Chemicals:</b> [dead_chems]<br><br><b>Additional Coroner's Notes:</b> [dead_notes]<br><br><b>Coroner's Signature:</b> <span class=\"paper_field\">"
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
sleep(10)
user.put_in_hands(R)
/obj/item/weapon/autopsy_scanner/attack_self(mob/user)
if(!wdata.len && !chemtraces.len)
return
@@ -181,4 +196,4 @@
M.visible_message("<span class='warning'>[user] scans the wounds on [M]'s [S] with [src]</span>")
add_data(S)
return 1
return 1
@@ -43,8 +43,7 @@
if(active_dummy)
eject_all()
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
qdel(active_dummy)
active_dummy = null
QDEL_NULL(active_dummy)
to_chat(usr, "<span class='notice'>You deactivate \the [src].</span>")
var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src))
T.icon = 'icons/effects/effects.dmi'
+5
View File
@@ -39,6 +39,11 @@
overcharged = 1
overlays += "overcharge"
/obj/item/device/flash/random/New()
..()
if(prob(25))
broken = 1
icon_state = "[initial(icon_state)]burnt"
/obj/item/device/flash/proc/burn_out() //Made so you can override it if you want to have an invincible flash from R&D or something.
broken = 1
@@ -37,6 +37,7 @@ var/global/list/default_medbay_channels = list(
var/list/channels = list() //see communications.dm for full list. First channes is a "default" for :h
var/subspace_transmission = 0
var/syndie = 0//Holder to see if it's a syndicate encrpyed radio
var/disable_timer = 0 //How many times this is disabled by EMPs
var/is_special = 0 //For electropacks mostly, skips Topic() checks
@@ -599,12 +600,25 @@ var/global/list/default_medbay_channels = list(
else return
/obj/item/device/radio/emp_act(severity)
on = 0
disable_timer++
addtimer(src, "enable_radio", rand(100, 200))
if(listening)
visible_message("<span class='warning'>[src] buzzes violently!</span>")
broadcasting = 0
listening = 0
for(var/ch_name in channels)
channels[ch_name] = 0
..()
/obj/item/device/radio/proc/enable_radio()
if(disable_timer > 0)
disable_timer--
if(!disable_timer)
on = 1
///////////////////////////////
//////////Borg Radios//////////
///////////////////////////////
+2 -2
View File
@@ -162,7 +162,7 @@ var/list/tape_roll_applications = list()
breaktape(W, user)
/obj/item/tape/attack_hand(mob/user as mob)
if(user.a_intent == I_HELP && src.allowed(user))
if(user.a_intent == INTENT_HELP && src.allowed(user))
user.visible_message("<span class=notice>[user] lifts [src], allowing passage.</span>", "<span class=notice>You lift [src], allowing passage.</span>")
src.density = 0
spawn(200)
@@ -174,7 +174,7 @@ var/list/tape_roll_applications = list()
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == I_HELP && ((!is_pointed(W) && src.allowed(user))))
if(user.a_intent == INTENT_HELP && ((!is_pointed(W) && src.allowed(user))))
to_chat(user, "You can't break the [src] with that!")
return
user.visible_message("<span class=warning>[user] breaks the [src]!</span>", "<span class=warning>You break the [src]!</span>")
+14 -5
View File
@@ -7,7 +7,7 @@
slot_flags = SLOT_BELT
var/list/part = null
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
var/model_info
var/model_info = "Unbranded"
dir = SOUTH
/obj/item/robot_parts/New(newloc, model)
@@ -23,33 +23,38 @@
else
name = "robot [initial(name)]"
/obj/item/robot_parts/attack_self(mob/user)
var/choice = input(user, "Select the company appearance for this limb.", "Limb Company Selection") as null|anything in selectable_robolimbs
if(!choice)
return
if(loc != user)
return
model_info = choice
to_chat(usr, "<span class='notice'>You change the company limb model to [choice].</span>")
/obj/item/robot_parts/l_arm
name = "left arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_arm"
part = list("l_arm","l_hand")
model_info = 1
/obj/item/robot_parts/r_arm
name = "right arm"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_arm"
part = list("r_arm","r_hand")
model_info = 1
/obj/item/robot_parts/l_leg
name = "left leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "l_leg"
part = list("l_leg","l_foot")
model_info = 1
/obj/item/robot_parts/r_leg
name = "right leg"
desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case."
icon_state = "r_leg"
part = list("r_leg","r_foot")
model_info = 1
/obj/item/robot_parts/chest
name = "torso"
@@ -80,6 +85,7 @@
name = "endoskeleton"
desc = "A complex metal backbone with standard limb sockets and pseudomuscle anchors."
icon_state = "robo_suit"
model_info = null
var/obj/item/robot_parts/l_arm/l_arm = null
var/obj/item/robot_parts/r_arm/r_arm = null
var/obj/item/robot_parts/l_leg/l_leg = null
@@ -108,6 +114,9 @@
forced_ai = null
return ..()
/obj/item/robot_parts/robot_suit/attack_self(mob/user)
return
/obj/item/robot_parts/robot_suit/proc/updateicon()
overlays.Cut()
if(l_arm)
@@ -37,8 +37,7 @@
R.hands.icon_state = "nomod"
R.icon_state = "robot"
R.module.remove_subsystems_and_actions(R)
qdel(R.module)
R.module = null
QDEL_NULL(R.module)
R.camera.network.Remove(list("Engineering", "Medical", "Mining Outpost"))
R.rename_character(R.real_name, R.get_default_name("Default"))
+1 -1
View File
@@ -55,7 +55,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
"<span class='italics'>You hear welding.</span>")
var/replace = user.get_inactive_hand() == src
var/replace = user.is_in_inactive_hand(src)
use(2)
if(get_amount() <= 0 && replace)
user.unEquip(src, 1)
@@ -237,6 +237,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list (
new /datum/stack_recipe("folder", /obj/item/weapon/folder),
new /datum/stack_recipe("cardboard tube", /obj/item/weapon/c_tube),
new /datum/stack_recipe("cardboard box", /obj/structure/closet/cardboard, 4),
new/datum/stack_recipe("cardboard cutout", /obj/item/cardboard_cutout, 5),
)
/obj/item/stack/sheet/cardboard //BubbleWrap
+26 -8
View File
@@ -36,6 +36,23 @@
/obj/item/stack/attack_self(mob/user)
list_recipes(user)
/obj/item/stack/attack_self_tk(mob/user)
list_recipes(user)
/obj/item/stack/attack_tk(mob/user)
if(user.stat || !isturf(loc)) return
// Allow remote stack splitting, because telekinetic inventory managing
// is really cool
if(src in user.tkgrabbed_objects)
var/obj/item/stack/F = split(user, 1)
F.attack_tk(user)
if(src && user.machine == src)
spawn(0)
interact(user)
else
..()
/obj/item/stack/proc/list_recipes(mob/user, recipes_sublist)
if(!recipes)
return
@@ -107,7 +124,7 @@
/obj/item/stack/Topic(href, href_list)
..()
if(usr.incapacitated() || usr.get_active_hand() != src)
if(usr.incapacitated() || !usr.is_in_active_hand(src))
return 0
if(href_list["sublist"] && !href_list["make"])
@@ -124,6 +141,7 @@
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
var/atom/creation_loc = (loc == usr) ? usr.loc : loc
if(!multiplier)
multiplier = 1
@@ -134,11 +152,11 @@
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>")
return 0
if(R.one_per_turf && (locate(R.result_type) in usr.loc))
if(R.one_per_turf && (locate(R.result_type) in creation_loc))
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
return 0
if(R.on_floor && !istype(usr.loc, /turf/simulated))
if(R.on_floor && !istype(creation_loc, /turf/simulated))
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
return 0
@@ -150,7 +168,7 @@
if(amount < R.req_amount * multiplier)
return
var/atom/O = new R.result_type(usr.loc)
var/atom/O = new R.result_type(creation_loc)
O.dir = usr.dir
if(R.max_res_amount > 1)
var/obj/item/stack/new_item = O
@@ -215,7 +233,7 @@
return max_amount
/obj/item/stack/proc/split(mob/user, amt)
var/obj/item/stack/F = new type(user, amt)
var/obj/item/stack/F = new type(loc, amt)
F.copy_evidences(src)
if(isliving(user))
add_fingerprint(user)
@@ -224,7 +242,7 @@
return F
/obj/item/stack/attack_hand(mob/user)
if(user.get_inactive_hand() == src)
if(user.is_in_inactive_hand(src))
var/obj/item/stack/F = split(user, 1)
user.put_in_hands(F)
if(src && usr.machine == src)
@@ -241,7 +259,7 @@
return 1
var/to_transfer
if(user.get_inactive_hand() == src)
if(user.is_in_inactive_hand(src))
var/desired = input("How much would you like to transfer from this stack?", "How much?", 1) as null|num
if(!desired)
return
@@ -267,4 +285,4 @@
fingerprints = from.fingerprints
fingerprintshidden = from.fingerprintshidden
fingerprintslast = from.fingerprintslast
//TODO bloody overlay
//TODO bloody overlay
@@ -100,6 +100,11 @@
turf_type = /turf/simulated/floor/carpet
burn_state = FLAMMABLE
/obj/item/stack/tile/carpet/black
name = "black carpet"
icon_state = "tile-carpet-black"
turf_type = /turf/simulated/floor/carpet/black
//Plasteel
/obj/item/stack/tile/plasteel
name = "floor tiles"
+3 -4
View File
@@ -283,7 +283,7 @@
/obj/item/toy/snappop/Crossed(H as mob|obj)
if(ishuman(H) || issilicon(H)) //i guess carp and shit shouldn't set them off
var/mob/living/carbon/M = H
if(issilicon(H) || M.m_intent == "run")
if(issilicon(H) || M.m_intent == MOVE_INTENT_RUN)
to_chat(M, "<span class='danger'>You step on the snap pop!</span>")
pop_burst(2, 0)
@@ -1276,7 +1276,7 @@ obj/item/toy/cards/deck/syndicate/black
/obj/item/toy/minigibber
name = "miniature gibber"
desc = "A miniature recreation of NanoTrasen's famous meat grinder."
desc = "A miniature recreation of Nanotrasen's famous meat grinder."
icon = 'icons/obj/toy.dmi'
icon_state = "minigibber"
attack_verb = list("grinded", "gibbed")
@@ -1288,8 +1288,7 @@ obj/item/toy/cards/deck/syndicate/black
if(stored_minature)
to_chat(user, "<span class='danger'>\The [src] makes a violent grinding noise as it tears apart the miniature figure inside!</span>")
qdel(stored_minature)
stored_minature = null
QDEL_NULL(stored_minature)
playsound(user, 'sound/goonstation/effects/gib.ogg', 20, 1)
cooldown = world.time
+18 -8
View File
@@ -6,7 +6,7 @@ RCD
*/
/obj/item/weapon/rcd
name = "rapid-construction-device (RCD)"
desc = "A device used to rapidly build and deconstruct walls and floors."
desc = "A device used to rapidly build and deconstruct walls, floors and airlocks."
icon = 'icons/obj/tools.dmi'
icon_state = "rcd"
opacity = 0
@@ -68,7 +68,7 @@ RCD
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='notice'>The RCD cant hold any more matter-units.</span>")
to_chat(user, "<span class='notice'>The RCD can't hold any more matter-units.</span>")
return
matter += R.ammoamt
user.drop_item()
@@ -84,6 +84,9 @@ RCD
//Change the mode
ui_interact(user)
/obj/item/weapon/rcd/attack_self_tk(mob/user)
ui_interact(user)
/obj/item/weapon/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -199,7 +202,8 @@ RCD
to_chat(user, "Building Wall ...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20 * toolspeed, target = A))
if(!useResource(3, user)) return 0
if(!useResource(3, user))
return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/wall)
@@ -212,7 +216,10 @@ RCD
to_chat(user, "Building Airlock...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(10, user)) return 0
for(var/obj/machinery/door/airlock/D in A.contents)
return 0
if(!useResource(10, user))
return 0
activate()
var/obj/machinery/door/airlock/T = new door_type(A)
T.name = door_name
@@ -233,7 +240,8 @@ RCD
to_chat(user, "Deconstructing Wall...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 40 * toolspeed, target = A))
if(!useResource(5, user)) return 0
if(!useResource(5, user))
return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/floor/plating)
@@ -245,7 +253,8 @@ RCD
to_chat(user, "Deconstructing Floor...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(5, user)) return 0
if(!useResource(5, user))
return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/space)
@@ -257,7 +266,8 @@ RCD
to_chat(user, "Deconstructing Airlock...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50 * toolspeed, target = A))
if(!useResource(20, user)) return 0
if(!useResource(20, user))
return 0
activate()
qdel(A)
return 1
@@ -361,7 +371,7 @@ RCD
/obj/item/weapon/rcd/borg/New()
..()
desc = "A device used to rapidly build and deconstruct walls and floors."
desc = "A device used to rapidly build and deconstruct walls, floors and airlocks."
canRwall = 1
+1 -1
View File
@@ -44,7 +44,7 @@
if(armed)
if(istype(AM, /mob/living/carbon) && !istype(AM, /mob/living/carbon/brain))
var/mob/living/carbon/C = AM
if(C.m_intent != "walk")
if(C.m_intent != MOVE_INTENT_WALK)
src.visible_message("The [src.name] beeps, \"Running on wet floors is hazardous to your health.\"")
explosion(src.loc,-1,0,2)
if(ishuman(C))
@@ -19,7 +19,7 @@
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
if(user.client && (target in user.client.screen))
to_chat(user, "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>")
else if(target == user && user.a_intent == I_GRAB && ishuman(target))
else if(target == user && user.a_intent == INTENT_GRAB && ishuman(target))
var/mob/living/carbon/human/muncher = user
if(muncher && muncher.get_species() == "Drask")
to_chat(user, "You take a bite of the [src.name]. Delicious!")
+159 -169
View File
@@ -319,7 +319,7 @@
to_chat(user, "<span class='notice'>The instructions on [defib] don't mention how to revive that...</span>")
return
else
if(user.a_intent == I_HARM && !defib.safety)
if(user.a_intent == INTENT_HARM && !defib.safety)
busy = 1
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
@@ -337,105 +337,100 @@
update_icon()
defib.cooldowncheck(user)
return
if(user.zone_sel && user.zone_sel.selecting == "chest")
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30 * toolspeed, target = M)) //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='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H.key = ghost.key
log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), src)
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30 * toolspeed, target = M)) //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='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H.key = ghost.key
log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), src)
qdel(ghost)
ghost = null
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/suit/space))
if(!defib.combat)
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
if(H.undergoing_cardiac_arrest())
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
QDEL_NULL(ghost)
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
for(var/obj/item/carried_item in H.contents)
if(istype(carried_item, /obj/item/clothing/suit/space))
if(!defib.combat)
user.visible_message("<span class='notice'>[defib] buzzes: Patient's chest is obscured. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
else
H.set_heartattack(FALSE)
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
defib.deductcharge(revivecost)
busy = 0
cooldown = 1
update_icon()
defib.cooldowncheck(user)
return
if(H.stat == DEAD)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations) && (H.get_int_organ(/obj/item/organ/internal/heart) || H.get_int_organ(/obj/item/organ/internal/brain/slime)))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
defib.deductcharge(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit|| !H.get_int_organ(/obj/item/organ/internal/heart))
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
window_flash(ghost.client)
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
defib.deductcharge(revivecost)
update_icon()
cooldown = 1
defib.cooldowncheck(user)
else
user.visible_message("<span class='notice'>[defib] buzzes: Patient is not in a valid state. Operation aborted.</span>")
if(H.undergoing_cardiac_arrest())
if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
else
to_chat(user, "<span class='notice'>You need to target your patient's chest with [src].</span>")
return
busy = 0
update_icon()
return
else
H.set_heartattack(FALSE)
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
defib.deductcharge(revivecost)
busy = 0
cooldown = 1
update_icon()
defib.cooldowncheck(user)
return
if(H.stat == DEAD)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations) && (H.get_int_organ(/obj/item/organ/internal/heart) || H.get_int_organ(/obj/item/organ/internal/brain/slime)))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='boldnotice'>[defib] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
defib.deductcharge(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit|| !H.get_int_organ(/obj/item/organ/internal/heart))
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
window_flash(ghost.client)
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
defib.deductcharge(revivecost)
update_icon()
cooldown = 1
defib.cooldowncheck(user)
else
user.visible_message("<span class='notice'>[defib] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
/obj/item/weapon/borg_defib
name = "defibrillator paddles"
@@ -465,7 +460,7 @@
to_chat(user, "<span class='notice'>This unit is only designed to work on humanoid lifeforms.</span>")
return
else
if(user.a_intent == I_HARM && !safety)
if(user.a_intent == INTENT_HARM && !safety)
busy = 1
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
@@ -487,80 +482,75 @@
cooldown = 0
update_icon()
return
if(user.zone_sel && user.zone_sel.selecting == "chest")
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30 * toolspeed, target = M)) //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='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H.key = ghost.key
log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), H)
user.visible_message("<span class='warning'>[user] begins to place [src] on [M.name]'s chest.</span>", "<span class='warning'>You begin to place [src] on [M.name]'s chest.</span>")
busy = 1
update_icon()
if(do_after(user, 30 * toolspeed, target = M)) //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='notice'>[user] places [src] on [M.name]'s chest.</span>", "<span class='warning'>You place [src] on [M.name]'s chest.</span>")
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
var/mob/dead/observer/ghost = H.get_ghost()
if(ghost && !ghost.client)
// In case the ghost's not getting deleted for some reason
H.key = ghost.key
log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), H)
qdel(ghost)
ghost = null
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(H.stat == 2)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='notice'>[user] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
if(tplus > tlimit)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[user] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
window_flash(ghost.client)
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
update_icon()
cooldown = 1
spawn(50)
cooldown = 0
update_icon()
QDEL_NULL(ghost)
var/tplus = world.time - H.timeofdeath
var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds)
var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting
var/total_burn = 0
var/total_brute = 0
if(do_after(user, 20 * toolspeed, target = M)) //placed on chest and short delay to shock for dramatic effect, revive time is 5sec total
if(H.stat == 2)
var/health = H.health
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
playsound(get_turf(src), "bodyfall", 50, 1)
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
for(var/obj/item/organ/external/O in H.bodyparts)
total_brute += O.brute_dam
total_burn += O.burn_dam
if(total_burn <= 180 && total_brute <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations))
tobehealed = min(health + threshold, 0) // It's HILARIOUS without this min statement, let me tell you
tobehealed -= 5 //They get 5 of each type of damage healed so excessive combined damage will not immediately kill them after they get revived
H.adjustOxyLoss(tobehealed)
H.adjustToxLoss(tobehealed)
H.adjustFireLoss(tobehealed)
H.adjustBruteLoss(tobehealed)
user.visible_message("<span class='notice'>[user] pings: Resuscitation successful.</span>")
playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
H.update_revive(FALSE)
H.KnockOut(FALSE)
H.Paralyse(5)
H.emote("gasp")
if(tplus > tloss)
H.setBrainLoss( max(0, min(99, ((tlimit - tplus) / tlimit * 100))))
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
add_logs(user, M, "revived", object="defibrillator")
else
user.visible_message("<span class='notice'>[user] buzzes: Patient is not in a valid state. Operation aborted.</span>")
if(tplus > tlimit)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Heart tissue damage beyond point of no return for defibrillation.</span>")
else if(total_burn >= 180 || total_brute >= 180)
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed - Severe tissue damage detected.</span>")
else if(ghost)
user.visible_message("<span class='notice'>[user] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
window_flash(ghost.client)
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
else
to_chat(user, "<span class='notice'>You need to target your patient's chest with [src].</span>")
return
if(isrobot(user))
var/mob/living/silicon/robot/R = user
R.cell.use(revivecost)
update_icon()
cooldown = 1
spawn(50)
cooldown = 0
update_icon()
else
user.visible_message("<span class='notice'>[user] buzzes: Patient is not in a valid state. Operation aborted.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
@@ -61,7 +61,7 @@
nadeassembly.attack_self(user)
return
var/newtime = input(usr, "Please set the timer.", "Timer", 10) as num
if(user.get_active_hand() == src)
if(user.is_in_active_hand(src))
newtime = Clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
@@ -62,7 +62,7 @@
/obj/item/weapon/flamethrower/afterattack(atom/target, mob/user, flag)
if(flag) return // too close
// Make sure our user is still holding us
if(user && user.get_active_hand() == src)
if(user && user.is_in_active_hand(src))
var/turf/target_turf = get_turf(target)
if(target_turf)
var/turflist = getline(user, target_turf)
@@ -32,7 +32,7 @@
/*/obj/item/weapon/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if(istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
if(istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
if((user.get_active_hand() == src) && (!active) && (clown_check(user)) && target.loc != src.loc)
if((user.is_in_active_hand(src)) && (!active) && (clown_check(user)) && target.loc != src.loc)
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
active = 1
icon_state = initial(icon_state) + "_active"
@@ -104,6 +104,10 @@
/obj/item/weapon/restraints/handcuffs/cable/white
color = COLOR_WHITE
/obj/item/weapon/restraints/handcuffs/cable/random/New()
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
..()
/obj/item/weapon/restraints/handcuffs/alien
icon_state = "handcuffAlien"
@@ -0,0 +1,50 @@
//Highlander Style Martial Art
// Prevents use of guns, but makes the highlander impervious to ranged attacks. Their bravery in battle shields them from the weapons of COWARDS!
/datum/martial_art/highlander
name = "Highlander Style"
deflection_chance = 100
no_guns = TRUE
no_guns_message = "You'd never stoop so low as to use the weapon of a COWARD!"
//Highlander Claymore
// Grants the wielder the Highlander Style Martial Art
/obj/item/weapon/claymore/highlander
name = "Highlander Claymore"
desc = "Imbues the wielder with legendary martial prowress and a nigh-unquenchable thirst for glorious battle!"
var/datum/martial_art/highlander/style = new
/obj/item/weapon/claymore/highlander/Destroy()
if(ishuman(loc)) //just in case it gets destroyed while in someone's possession, such as due to acid or something?
var/mob/living/carbon/human/H = loc
style.remove(H)
QDEL_NULL(style)
return ..()
/obj/item/weapon/claymore/highlander/equipped(mob/user, slot)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(slot == slot_r_hand || slot == slot_l_hand)
if(H.martial_art && H.martial_art != style)
style.teach(H, 1)
to_chat(H, "<span class='notice'>THERE CAN ONLY BE ONE!</span>")
else if(H.martial_art && H.martial_art == style)
style.remove(H)
var/obj/item/weapon/claymore/highlander/sword = H.is_in_hands(/obj/item/weapon/claymore/highlander)
if(sword)
//if we have a highlander sword in the other hand, relearn the style from that sword.
sword.style.teach(H, 1)
/obj/item/weapon/claymore/highlander/dropped(mob/user)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
style.remove(H)
var/obj/item/weapon/claymore/highlander/sword = H.is_in_hands(/obj/item/weapon/claymore/highlander)
if(sword)
//if we have a highlander sword in the other hand, relearn the style from that sword.
sword.style.teach(H, 1)
@@ -159,6 +159,11 @@
return 0
to_chat(imp_in, "<span class='notice'>Your dusting implant activates!</span>")
imp_in.visible_message("<span class = 'warning'>[imp_in] burns up in a flash!</span>")
for(var/obj/item/I in imp_in.contents)
if(I == src)
continue
if(I.flags & NODROP)
qdel(I)
imp_in.dust()
/obj/item/weapon/implant/dust/emp_act(severity)
@@ -30,3 +30,11 @@
circuitry. As a result neurotoxins can cause massive damage.<HR>
Implant Specifics:<BR>"}
return dat
/obj/item/weapon/implantcase/track
name = "implant case - 'Tracking'"
desc = "A glass case containing a tracking implant."
/obj/item/weapon/implantcase/track/New()
imp = new /obj/item/weapon/implant/tracking(src)
..()
+1 -1
View File
@@ -40,7 +40,7 @@
if(!istype(M))
return ..()
if(user.a_intent != I_HELP)
if(user.a_intent != INTENT_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
+17 -17
View File
@@ -1183,9 +1183,9 @@
/obj/item/weapon/book/manual/faxes
name = "A Guide to Faxes"
desc = "A NanoTrasen-approved guide to writing faxes"
desc = "A Nanotrasen-approved guide to writing faxes"
icon_state = "book6"
author = "NanoTrasen"
author = "Nanotrasen"
title = "A Guide to Faxes"
dat = {"
@@ -1213,14 +1213,14 @@
<li>Faxes are your main method of communicating with the NAS Trurl, better known as Central Command.</li>
<li>Faxes allow personnel on the station to maintain open lines of communication with the NAS Trurl, allowing for vital information to flow both ways.</li>
<li>Being written communications, proper grammar, syntax and typography is required, in addition to a signature and, if applicable, a stamp. Failure to sign faxes will lead to an automatic rejection.</li>
<li>We at NanoTrasen provide Fax Machines to every Head of Staff, in addition to the Magistrate, NanoTrasen Representative, and Internal Affairs Agents.</li>
<li>We at Nanotrasen provide Fax Machines to every Head of Staff, in addition to the Magistrate, Nanotrasen Representative, and Internal Affairs Agents.</li>
<li>This means that we trust the recipients of these fax machines to only use them in the proper circumstances (see <B>When to Fax?</B>).</li>
<h1><a name="when"><B>When to Fax?</B></a></h1><BR>
<li>While it is up to the discretion of each individual person to decide when to fax Central Command, there are some simple guidelines on when to do this.</li>
<li>Firstly, any situation that can reasonably be solved on-site, <I>should</I> be handled on-site. Knowledge of Standard Operating Procedure is <B>mandatory</B> for everyone with access to a fax machine.</li>
<li>Resolving issues on-site not only leads to more expedient problem-solving, it also frees up company resources and provides valuable work experience for all parties involved.</li>
<li>This means that you should work with the Heads of Staff concerning personnel and workplace issues, and attempt to resolve situations with them. If, for whatever reason, the relevent Head of Staff is not available or receptive, consider speaking with the Captain and/or NanoTrasen Representative.</li>
<li>This means that you should work with the Heads of Staff concerning personnel and workplace issues, and attempt to resolve situations with them. If, for whatever reason, the relevent Head of Staff is not available or receptive, consider speaking with the Captain and/or Nanotrasen Representative.</li>
<li>If, for whatever reason, these issues cannot be solved on-site, either due to incompetence or just plain refusal to cooperate, faxing Central Command becomes a viable option.</li>
<li>Secondly, station status reports should be sent occasionally, but never at the start of the shift. Remember, we assign personnel to the station. We do not need a repeat of what we just signed off on.</li>
<li>Thirdly, staff/departmental evaluations are always welcome, especially in cases of noticeable (in)competence. Just as a brilliant coworker can be rewarded, an incompetent one can be punished.</li>
@@ -2487,7 +2487,7 @@
<li><a href="#foreword">Foreword</a></li>
<li><a href="#cap">Captain</a></li>
<li><a href="#hop">Head of Personnel</a></li>
<li><a href="#ntrep">NanoTrasen Representative</a></li>
<li><a href="#ntrep">Nanotrasen Representative</a></li>
<li><a href="#bs">Blueshield Officer</a></li>
<li><a href="#ai">AI</a></li>
</ol>
@@ -2507,9 +2507,9 @@
<li>The Captain must keep the Nuclear Authentication Disk on their person at all times or, failing that, in the possession of the Head of Security or Blueshield;</li>
<li>The Captain is to attempt to resolve every issue that arises in Command locally before contacting Central Command;</li>
<li>The Captain is not permitted to carry their Antique Laser Gun or Space Armor unless there's an immediate emergency that requires attending to;</li>
<li>The Captain, despite being in charge of the Cyberiad, is not independent from NanoTrasen. Any attempts to disregard general company policy are to be considered an instant condition for contract termination;</li>
<li>The Captain, despite being in charge of the Cyberiad, is not independent from Nanotrasen. Any attempts to disregard general company policy are to be considered an instant condition for contract termination;</li>
<li>The Captain may only promote personnel to a Acting Head of Staff position if there is no assigned Head of Staff associated with the Department. Said Acting Head of Staff must be a member of the Department they are to lead. See below for more information on Chain of Command;</li>
<li>The Captain may not fire any Head of Staff without reasonable justification (ie, incompetency, criminal activity, or otherwise any action that endangers/compromises the station and/or crew). The Captain may not fire any Central Command VIPs (ie, Blueshield, Magistrate, NanoTrasen Representative) without permission from Central Command, unless they are blatantly acting against the well-being and safety of the crew and station.</li>
<li>The Captain may not fire any Head of Staff without reasonable justification (ie, incompetency, criminal activity, or otherwise any action that endangers/compromises the station and/or crew). The Captain may not fire any Central Command VIPs (ie, Blueshield, Magistrate, Nanotrasen Representative) without permission from Central Command, unless they are blatantly acting against the well-being and safety of the crew and station.</li>
</ol><BR>
<h1><a name="hop"><B>Head of Personnel</B></a></h1><BR>
@@ -2518,7 +2518,7 @@
<li>The Head of Personnel may not give any personnel increased access without authorization from the relevant Head of Staff. This includes the Head of Personnel. In addition, the Head of Personnel may only give Captain-Level access to someone if they are the Acting Captain. This access is to be removed when a proper Captain arrives on the station;</li>
<li>The Head of Personnel may not increase any Job Openings unless the relevant Head of Staff approves;</li>
<li>The Head of Personnel may not fire any personnel without authorization from the relevant Head of Staff, unless other conditions apply (see Space Law and General Standard Operating Procedure);</li>
<li>The Head of Personnel may not promote any personnel to the following Jobs without authorization from Central Command: Barber, Brig Physician, NanoTrasen Representative, Blueshield, Security Pod Pilot, Mechanic and Magistrate; (This is due to them being karma locked. Do not promote people to these positions without approval from the Administrators);</li>
<li>The Head of Personnel may not promote any personnel to the following Jobs without authorization from Central Command: Barber, Brig Physician, Nanotrasen Representative, Blueshield, Security Pod Pilot, Mechanic and Magistrate; (This is due to them being karma locked. Do not promote people to these positions without approval from the Administrators);</li>
<li>The Head of Personnel is free to utilize paperwork at their discretion. However, during major station emergencies, expediency should take precedence over bureaucracy;</li>
<li>The Head of Personnel may not leave their office unmanned if there are personnel waiting in line. Failure to respond to personnel with a legitimate request within ten (10) minutes, either via radio or in person, is to be considered a breach of Standard Operating Procedure;</li>
<li>Despite nominally being in charge of Supply, the Head of Personnel should allow the Quartermaster to run the Department, unless they prove themselves to be incompetent/dangerous;</li>
@@ -2526,13 +2526,13 @@
<li>The Head of Personnel is not permitted to perform Security duty. The Head of Personnel is permitted to carry an Energy Gun, for self-defence only.</li>
</ol><BR>
<h1><a name="ntrep"><B>NanoTrasen Representative</B></a></h1><BR>
<h1><a name="ntrep"><B>Nanotrasen Representative</B></a></h1><BR>
<ol>
<li>The NanoTrasen Representative is to ensure that every Department is following Standard Operating Procedure, up to and including the respective Head of Staff. If a Head of Staff is not available for a Department, the NanoTrasen Representative must ensure that the Captain appoints an Acting Head of Staff for said Department;</li>
<li>The NanoTrasen Representative must attempt to resolve any breach of Standard Operating Procedure locally before contacting Central Command. This is an imperative: Standard Operating Procedure should always be followed unless there is a very good reason not to;</li>
<li>The NanoTrasen Representative must, together with the Magistrate and Head of Security, ensure that Space Law is being followed and correctly applied;</li>
<li>The NanoTrasen Representative may not threaten the use of a fax in order to gain leverage over any personnel, up to and including Command. In addition they may not threaten to fire, or have Central Command, fire anyone, unless they actually possess a demotion note;</li>
<li>The NanoTrasen Representative is permitted to carry their Stun-Cane, or a Telescopic Baton if the Stun-Cane is lost.</li>
<li>The Nanotrasen Representative is to ensure that every Department is following Standard Operating Procedure, up to and including the respective Head of Staff. If a Head of Staff is not available for a Department, the Nanotrasen Representative must ensure that the Captain appoints an Acting Head of Staff for said Department;</li>
<li>The Nanotrasen Representative must attempt to resolve any breach of Standard Operating Procedure locally before contacting Central Command. This is an imperative: Standard Operating Procedure should always be followed unless there is a very good reason not to;</li>
<li>The Nanotrasen Representative must, together with the Magistrate and Head of Security, ensure that Space Law is being followed and correctly applied;</li>
<li>The Nanotrasen Representative may not threaten the use of a fax in order to gain leverage over any personnel, up to and including Command. In addition they may not threaten to fire, or have Central Command, fire anyone, unless they actually possess a demotion note;</li>
<li>The Nanotrasen Representative is permitted to carry their Stun-Cane, or a Telescopic Baton if the Stun-Cane is lost.</li>
</ol><BR>
<h1><a name="bs"><B>Blueshield Officer</B></a></h1><BR>
@@ -2547,14 +2547,14 @@
<b><i>The following are procedures for AI Maintenance:</i></b><br>
<ol>
<li>Only the Captain or Research Director may enter the AI Upload to perform Law Changes (see below), and only the Captain, Research Director or Chief Engineer may enter the AI Core to perform a Carding (see below);</li>
<li> No Law Changes are to be performed without approval from the Captain and Research Director. The only Lawsets to be used are those provided by NanoTrasen. Failure to legally perform a Law Change is to be considered Sabotage. Command must be informed prior to the Law Change, and all objections must be taken into consideration. If the number of Command personnel opposing the Law Change is greater than the number of Command personnel in favour, the Law Change is not to be done. If the Law Change is performed, the crew is to be immediately informed of the new Law(s);</li>
<li> No Law Changes are to be performed without approval from the Captain and Research Director. The only Lawsets to be used are those provided by Nanotrasen. Failure to legally perform a Law Change is to be considered Sabotage. Command must be informed prior to the Law Change, and all objections must be taken into consideration. If the number of Command personnel opposing the Law Change is greater than the number of Command personnel in favour, the Law Change is not to be done. If the Law Change is performed, the crew is to be immediately informed of the new Law(s);</li>
<li>The AI may not be Carded unless it it clearly malfunctioning or subverted. However, any member of Command may card it if the AI agrees to it, either at the end of the shift, or due to external circumstances (such as massive damage to the AI Satellite);</li>
<li>The AI Upload and Minisat Antechamber Turrets are to be kept on Non-Lethal in Code Green and Code Blue. The AI Core Turrets are to be kept on Lethal at all times. If a legal Law Change or Carding is occurring, the Turrets are to be disabled;</li>
<li>If the AI Unit is not malfunctioning or subverted, any attempt at performing an illegal Carding or Law Change is to be responded to with non-lethal force. If the illegal attempts persist, and the perpetrator is demonstrably hostile, lethal force from Command/Security is permitted;</li>
<li>Freeform Laws are only to be added if absolutely necessary due to external circumstances (such as major station emergencies). Adding unnecessary Freeform Laws is not permitted. Exception is made if the AI Unit and majority of Command agree to the Freeform Law that is proposed;</li>
<li>Any use of the "Purge" Module is to be followed by the upload of a NanoTrasen-approved Lawset immediately. AI Units must be bound to a Lawset at all times.</li>
<li>Any use of the "Purge" Module is to be followed by the upload of a Nanotrasen-approved Lawset immediately. AI Units must be bound to a Lawset at all times.</li>
</ol><BR>
</body>
</html>
"}
"}
+262
View File
@@ -0,0 +1,262 @@
/*Contains:
Rapid Pipe Dispenser
*/
#define SIMPLE_CAP 20
#define SUPPLY_CAP 32
#define SCRUBBERS_CAP 33
#define HE_EXCHANGER 17
#define CONNECTOR 4
#define UNARY_VENT 7
#define PASSIVE_VENT 37
#define GAS_SCRUBBER 10
#define INJECTOR 34
#define GAS_SENSOR 98
#define METER 99
#define DISPOSALS_JUNCTION 2
#define ATMOS_MODE 1
#define DISPOSALS_MODE 2
#define ROTATION_MODE 3
#define FLIP_MODE 4
#define DELETE_MODE 5
#define ATMOS_PIPING 1
#define SUPPLY_PIPING 2
#define SCRUBBERS_PIPING 3
#define DEVICES 4
#define HEAT_PIPING 5
/obj/item/weapon/rpd
name = "rapid pipe dispenser"
desc = "This device can rapidly dispense atmospherics and disposals piping, manipulate loose piping, and recycle any detached pipes it is applied to."
icon = 'icons/obj/tools.dmi'
icon_state = "rpd"
opacity = 0
density = 0
anchored = 0
flags = CONDUCT
force = 10
throwforce = 10
throw_speed = 3
throw_range = 5
w_class = WEIGHT_CLASS_NORMAL
materials = list(MAT_METAL = 30000, MAT_GLASS = 5000)
origin_tech = "engineering=4;materials=2"
var/datum/effect/system/spark_spread/spark_system
var/lastused
var/iconrotation = 0 //used to orient icons and pipes
var/mode = 1 //Disposals, atmospherics, etc.
var/pipetype = 1//For nanoUI menus
var/whatpipe = 0 //What kind of pipe is it? See code/game/machinery/pipe/construction.dm for a list of defines
var/whatdpipe = 0 //What kind of disposals pipe is it? See code/game/machinery/pipe/dispenser.dm for a list of defines
var/spawndelay = 4 //How long should we have to wait between dispensing pipes?
var/walldelay = 40 //How long should drilling into a wall take?
/obj/item/weapon/rpd/New()
..()
spark_system = new /datum/effect/system/spark_spread()
spark_system.set_up(1, 0, src)
spark_system.attach(src)
//Procs
/obj/item/weapon/rpd/proc/Activaterpd(delay)
playsound(loc, "sound/machines/click.ogg", 50, 1)
if(prob(15))
spark_system.start()
if(delay)
lastused = world.time
/obj/item/weapon/rpd/proc/Manipulatepipes(subject, atmosverb, disposalsverb)
if(istype(subject, /obj/item/pipe))
call(subject, atmosverb)()
else if(istype(subject, /obj/structure/disposalconstruct/))
call(subject, disposalsverb)()
//Lists of things
var/list/pipelist = list( //id refers to the pipe_type found in construction.dm, icon refers to the name of the icon state in icons/obj/pipe-item.dmi. Icons are made with the asset-cache
list("pipename" = "Straight pipe", "id" = 0, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent pipe", "id" = 1, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "T-manifold", "id" = 5, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way manifold", "id" = 19, "category" = ATMOS_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Pipe cap", "id" = 20, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Manual valve", "id" = 8, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "mvalve"),
list("pipename" = "Digital valve", "id" = 35, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "dvalve"),
list("pipename" = "Manual T-valve", "id" = 18, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "tvalve"),
list("pipename" = "Digital T-valve", "id" = 38, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "dtvalve"),
list("pipename" = "Straight supply pipe", "id" = 24, "category" = SUPPLY_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent supply pipe", "id" = 25, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "Supply T-manifold", "id" = 28, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way supply manifold", "id" = 30, "category" = SUPPLY_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Supply pipe cap", "id" = 32, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Straight scrubbers pipe", "id" = 26, "category" = SCRUBBERS_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent scrubbers pipe", "id" = 27, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "Scrubbers T-manifold", "id" = 29, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way scrubbers manifold", "id" = 31, "category" = SCRUBBERS_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Scrubbers pipe cap", "id" = 33, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Universal pipe adapter", "id" = 23, "category" = DEVICES, "orientations" = 2, "icon" = "universal"),
list("pipename" = "Connector", "id" = 4, "category" = DEVICES, "orientations" = 4, "icon" = "connector"),
list("pipename" = "Unary vent", "id" = 7, "category" = DEVICES, "orientations" = 4, "icon" = "uvent"),
list("pipename" = "Scrubber", "id" = 10, "category" = DEVICES, "orientations" = 4, "icon" = "scrubber"),
list("pipename" = "Gas pump", "id" = 9, "category" = DEVICES, "orientations" = 4, "icon" = "pump"),
list("pipename" = "Volume pump", "id" = 16, "category" = DEVICES, "orientations" = 4, "icon" = "volumepump"),
list("pipename" = "Passive gate", "id" = 15, "category" = DEVICES, "orientations" = 4, "icon" = "passivegate"),
list("pipename" = "Gas filter", "id" = 13, "category" = DEVICES, "orientations" = 4, "icon" = "filter"),
list("pipename" = "Gas mixer", "id" = 14, "category" = DEVICES, "orientations" = 4, "icon" = "mixer"),
list("pipename" = "Gas sensor", "id" = 98, "category" = DEVICES, "orientations" = 1, "icon" = "sensor"),
list("pipename" = "Meter", "id" = 99, "category" = DEVICES, "orientations" = 1, "icon" = "meter"),
list("pipename" = "Passive vent", "id" = 37, "category" = DEVICES, "orientations" = 4, "icon" = "passive vent"),
list("pipename" = "Dual-port vent pump", "id" = 36, "category" = DEVICES, "orientations" = 2, "icon" = "dual-port vent"),
list("pipename" = "Air injector", "id" = 34, "category" = DEVICES, "orientations" = 4, "icon" = "injector"),
list("pipename" = "Straight HE pipe", "id" = 2, "category" = HEAT_PIPING, "orientations" = 2, "icon" = "he"),
list("pipename" = "Bent HE pipe", "id" = 3, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "he", "bendy" = 1),
list("pipename" = "Junction", "id" = 6, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "junction"),
list("pipename" = "Heat exchanger", "id" = 17, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "heunary"))
var/list/dpipelist = list(
list("pipename" = "Straight pipe", "id" = 0, "orientations" = 2, "icon" = "conpipe-s"),
list("pipename" = "Bent pipe", "id" = 1, "orientations" = 4, "icon" = "conpipe-c"),
list("pipename" = "Junction", "id" = 2, "orientations" = 4, "icon" = "conpipe-j1"),
list("pipename" = "Y-junction", "id" = 4, "orientations" = 4, "icon" = "conpipe-y"),
list("pipename" = "Trunk", "id" = 5, "orientations" = 4, "icon" = "conpipe-t"),
list("pipename" = "Bin", "id" = 6, "orientations" = 1, "icon" = "condisposal"),
list("pipename" = "Outlet", "id" = 7, "orientations" = 4, "icon" = "outlet"),
list("pipename" = "Chute", "id" = 8, "orientations" = 4, "icon" = "intake"))
var/list/mainmenu = list(
list("category" = "Atmospherics", "mode" = 1, "icon" = "wrench"),
list("category" = "Disposals", "mode" = 2, "icon" = "recycle"),
list("category" = "Rotate", "mode" = 3, "icon" = "rotate-right"),
list("category" = "Flip", "mode" = 4, "icon" = "exchange"),
list("category" = "Recycle", "mode" = 5, "icon" = "trash"))
var/list/pipemenu = list(
list("pipecategory" = "Normal", "pipemode" = 1),
list("pipecategory" = "Supply", "pipemode" = 2),
list("pipecategory" = "Scrubber", "pipemode" = 3),
list("pipecategory" = "Devices", "pipemode" = 4),
list("pipecategory" = "Heat exchange", "pipemode" = 5))
//NanoUI stuff
/obj/item/weapon/rpd/attack_self(mob/user)
ui_interact(user)
/obj/item/weapon/rpd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "rpd.tmpl", "[name]", 400, 650, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/weapon/rpd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
var/data[0]
data["dpipelist"] = dpipelist
data["iconrotation"] = iconrotation
data["mainmenu"] = mainmenu
data["mode"] = mode
data["pipelist"] = pipelist
data["pipemenu"] = pipemenu
data["pipetype"] = pipetype
data["whatdpipe"] = whatdpipe
data["whatpipe"] = whatpipe
return data
/obj/item/weapon/rpd/Topic(href, href_list, nowindow, state)
..()
if(href_list["iconrotation"])
iconrotation = text2num(sanitize(href_list["iconrotation"]))
else if(href_list["whatpipe"])
whatpipe = text2num(sanitize(href_list["whatpipe"]))
else if(href_list["whatdpipe"])
whatdpipe = text2num(sanitize(href_list["whatdpipe"]))
else if(href_list["pipetype"])
pipetype = text2num(sanitize(href_list["pipetype"]))
else if(href_list["mode"])
mode = text2num(sanitize(href_list["mode"]))
else
return
nanomanager.update_uis(src)
//What the RPD actually does
/obj/item/weapon/rpd/afterattack(atom/target, mob/user, proximity)
..()
var/turf/T = get_turf(target)
if(src.loc != user || ismob(target) || istype(target, /obj/structure/window) || !proximity || world.time < lastused + spawndelay)
return
if(mode == ATMOS_MODE && !istype(T, /turf/simulated/shuttle)) //No pipes on shuttles nerds
if(istype(T, /turf/simulated/wall)) //Drilling into walls takes time
playsound(loc, "sound/weapons/circsawhit.ogg", 50, 1)
user.visible_message("<span class = 'notice'>[user] starts drilling a hole in [T]...</span>", "<span class = 'notice'>You start drilling a hole in [T]...</span>", "<span class = 'warning'>You hear a drill.</span>")
if(!do_after(user, walldelay, target = T))
return
user.visible_message("<span class = 'notice'>[user] finishes drilling a hole in [T]!</span>", "<span class = 'notice'>You finish drilling a hole in [T]!</span>", "<span class = 'warning'>You hear clanking.</span>")
var/obj/item/pipe/P
if(whatpipe == GAS_SENSOR)
P = new /obj/item/pipe_gsensor(T)
else if(whatpipe == METER)
P = new /obj/item/pipe_meter(T)
else
P = new(T, pipe_type = whatpipe, dir = user.dir)
if(iconrotation == 0 && P.is_bent_pipe()) //Automatic rotation of dispensed pipes
P.dir = turn(user.dir, 135)
else if(iconrotation == 0 && P.pipe_type in list(CONNECTOR, UNARY_VENT, GAS_SCRUBBER, HE_EXCHANGER, SIMPLE_CAP, SUPPLY_CAP, SCRUBBERS_CAP, INJECTOR, PASSIVE_VENT)) //Some pipes dispense oppositely to what you'd expect, but we don't want to do anything if they selected a direction
P.flip()
else if(iconrotation != 0 && P.is_bent_pipe()) //If they selected a rotation and the pipe is bent
P.dir = turn(iconrotation, -45)
else if(iconrotation != 0)
P.dir = iconrotation
to_chat(user, "<span class = 'notice'>[src] rapidly dispenses [P]!</span>")
Activaterpd(1)
else if(mode == DISPOSALS_MODE && !istype(T, /turf/simulated/shuttle))
if(istype(T, /turf/simulated/wall)) //No disposals pipes on walls
to_chat(user, "<span class = 'warning'>That type of pipe won't fit on [T]!</span>")
return
var/obj/structure/disposalconstruct/P = new(T) //Now we make the pipe
P.dir = iconrotation
P.ptype = whatdpipe
if(iconrotation == 0) //Automatic rotation
P.dir = user.dir
if(iconrotation == 0 && whatdpipe != DISPOSALS_JUNCTION) //Disposals pipes are in the opposite direction to atmos pipes, so we need to flip them. Junctions don't have this quirk though
P.flip()
P.update()
to_chat(user, "<span class = 'notice'>[src] rapidly dispenses [P]!</span>")
Activaterpd(1)
else if(mode == ROTATION_MODE)
for(var/obj/W in T)
Manipulatepipes(W, /obj/item/pipe/verb/rotate, /obj/structure/disposalconstruct/verb/rotate)
else if(mode == FLIP_MODE)
for(var/obj/W in T)
Manipulatepipes(W, /obj/item/pipe/verb/flip, /obj/structure/disposalconstruct/verb/flip)
else if(mode == DELETE_MODE)
var/eaten
for(var/obj/W in T)
if(istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter) || istype(W, /obj/item/pipe_gsensor) || istype(W, /obj/structure/disposalconstruct) && !W.anchored)
QDEL_NULL(W)
eaten = TRUE
if(eaten)
to_chat(user, "<span class='notice'>[src] sucks up the loose pipes on [T].")
Activaterpd()
else
to_chat(user, "<span class='notice'>There were no loose pipes on [T].</span>")
#undef SIMPLE_CAP
#undef SUPPLY_CAP
#undef SCRUBBERS_CAP
#undef HE_EXCHANGER
#undef CONNECTOR
#undef UNARY_VENT
#undef PASSIVE_VENT
#undef GAS_SCRUBBER
#undef INJECTOR
#undef GAS_SENSOR
#undef METER
#undef DISPOSALS_JUNCTION
#undef ATMOS_MODE
#undef DISPOSALS_MODE
#undef ROTATION_MODE
#undef FLIP_MODE
#undef DELETE_MODE
#undef ATMOS_PIPING
#undef SUPPLY_PIPING
#undef SCRUBBERS_PIPING
#undef DEVICES
#undef HEAT_PIPING
+2 -3
View File
@@ -20,7 +20,7 @@
toolspeed = 0.75
/obj/item/weapon/scissors/attack(mob/living/carbon/M as mob, mob/user as mob)
if(user.a_intent != "help")
if(user.a_intent != INTENT_HELP)
..()
return
if(!(M in view(1))) //Adjacency test
@@ -95,13 +95,12 @@
user.visible_message("<span class='notice'>[user] finishes cutting [M]'s hair!</span>")
/obj/item/weapon/scissors/safety //Totally safe, I assure you.
name = "safety scissors"
desc = "The blades of the scissors appear to be made of some sort of ultra-strong metal alloy."
force = 18 //same as e-daggers
var/is_cutting = 0 //to prevent spam clicking this for huge accumulation of losebreath.
/obj/item/weapon/scissors/safety/attack(mob/living/carbon/M as mob, mob/user as mob)
if(user.a_intent != "help")
if(user.a_intent != INTENT_HELP)
..()
return
if(!(M in view(1)))
@@ -179,7 +179,7 @@
name = "pico-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
icon_state = "pico_mani"
origin_tech = "materials=4;programming=4,engineering=4"
origin_tech = "materials=4;programming=4;engineering=4"
rating = 3
materials = list(MAT_METAL=30)
@@ -317,7 +317,7 @@
/obj/item/weapon/storage/fancy/rollingpapers
name = "rolling paper pack"
desc = "A pack of NanoTrasen brand rolling papers."
desc = "A pack of Nanotrasen brand rolling papers."
w_class = WEIGHT_CLASS_TINY
icon = 'icons/obj/cigarettes.dmi'
icon_state = "cig_paper_pack"
@@ -478,7 +478,7 @@
/obj/item/weapon/storage/attack_self(mob/user as mob)
//Clicking on itself will empty it, if it has the verb to do that.
if(user.get_active_hand() == src)
if(user.is_in_active_hand(src))
if(src.verbs.Find(/obj/item/weapon/storage/verb/quick_empty))
src.quick_empty()
return
@@ -232,3 +232,13 @@
B.deity_name = "Success"
B.icon_state = "greentext"
B.item_state = "greentext"
/obj/item/weapon/storage/box/syndie_kit/cutouts
name = "Fortified Artistic Box"
/obj/item/weapon/storage/box/syndie_kit/cutouts/New()
..()
for(var/i in 1 to 3)
new/obj/item/cardboard_cutout/adaptive(src)
new/obj/item/toy/crayon/spraycan(src)
+1 -1
View File
@@ -118,7 +118,7 @@
var/mob/living/L = M
if(user.a_intent != I_HARM)
if(user.a_intent != INTENT_HARM)
if(status)
user.do_attack_animation(L)
baton_stun(L, user)
@@ -46,7 +46,7 @@
return
if(!isliving(target))
return
if(user.a_intent == I_HARM)
if(user.a_intent == INTENT_HARM)
if(!..()) return
if(!isrobot(target)) return
else
@@ -46,6 +46,18 @@
/obj/item/stack/sheet/wood,
/obj/item/stack/sheet/wood)
/obj/item/weapon/table_parts/wood/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/tile/carpet))
var/target = /obj/item/weapon/table_parts/fancy
if(istype(W, /obj/item/stack/tile/carpet/black))
target = /obj/item/weapon/table_parts/fancy/black
var/obj/item/stack/S = W
if(S.use(1))
new target(get_turf(src))
qdel(src)
else
. = ..()
/obj/item/weapon/table_parts/glass
name = "glass table parts"
desc = "fragile!"
@@ -57,6 +69,17 @@
/obj/item/stack/sheet/metal,
/obj/item/stack/sheet/metal)
/obj/item/weapon/table_parts/fancy
name = "fancy table parts"
desc = "Pretty!"
icon_state = "fancy_tableparts"
result = /obj/structure/table/wood/fancy
/obj/item/weapon/table_parts/fancy/black
name = "black fancy table parts"
icon_state = "black_fancy_tableparts"
result = /obj/structure/table/wood/fancy/black
/obj/item/weapon/rack_parts
name = "rack parts"
desc = "Parts of a rack."
@@ -128,7 +128,7 @@ Frequency:
if(turfs.len)
L["None (Dangerous)"] = pick(turfs)
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
if(!t1 || (user.get_active_hand() != src || user.stat || user.restrained()))
if(!t1 || (user.is_in_active_hand(src) || user.stat || user.restrained()))
return
if(active_portals >= 3)
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
+3 -4
View File
@@ -155,7 +155,7 @@
src.pixel_y = rand(0, 16)
/obj/item/weapon/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M) || user.a_intent == I_HELP)
if(!istype(M) || user.a_intent == INTENT_HELP)
return ..()
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
return ..()
@@ -241,8 +241,7 @@
/obj/item/weapon/wirecutters/attack(mob/living/carbon/C, mob/user)
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
qdel(C.handcuffed)
C.handcuffed = null
QDEL_NULL(C.handcuffed)
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob(C)
C.update_handcuffed()
@@ -404,7 +403,7 @@
if(!S)
return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP || S.open == 2)
if(!(S.status & ORGAN_ROBOT) || user.a_intent != INTENT_HELP || S.open == 2)
return ..()
if(!isOn()) //why wasn't this being checked already?