Merge branch 'master' of https://github.com/tgstation/-tg-station into dragnet

Conflicts:
	icons/effects/effects.dmi
	icons/obj/items.dmi
This commit is contained in:
Cheridan
2015-06-22 22:57:53 -05:00
359 changed files with 4341 additions and 2639 deletions
+1 -2
View File
@@ -109,7 +109,6 @@
/obj/structure/alien/resin/hitby(atom/movable/AM)
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(!isobj(AM))
tforce = 10
@@ -516,4 +515,4 @@
#undef WEED_NORTH_EDGING
#undef WEED_SOUTH_EDGING
#undef WEED_EAST_EDGING
#undef WEED_WEST_EDGING
#undef WEED_WEST_EDGING
+7 -1
View File
@@ -44,7 +44,7 @@
/obj/effect/anomaly/grav
name = "gravitational anomaly"
icon_state = "shield2"
density = 1
density = 0
var/boing = 0
/obj/effect/anomaly/grav/New()
@@ -60,6 +60,12 @@
step_towards(O,src)
for(var/mob/living/M in orange(4, src))
step_towards(M,src)
for(var/obj/O in orange(1,src))
if(!O.anchored)
var/mob/living/target = locate() in view(10,src)
if(!target)
O.throw_at(target, 5, 10)
/obj/effect/anomaly/grav/Bump(mob/A)
gravShock(A)
@@ -262,7 +262,7 @@
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
var/more = ""
if(M)
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) "
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
else
@@ -24,7 +24,7 @@
loot = list(
/obj/item/weapon/gun/projectile/automatic/pistol = 8,
/obj/item/weapon/gun/projectile/shotgun/combat = 5,
/obj/item/weapon/gun/projectile/shotgun/automatic/combat = 5,
/obj/item/weapon/gun/projectile/revolver/mateba,
/obj/item/weapon/gun/projectile/automatic/pistol/deagle
)
@@ -0,0 +1,33 @@
/*
Because mapping is already tedious enough this spawner let you spawn generic
"sets" of objects rather than having to make the same object stack again and
again.
*/
/obj/effect/spawner/structure
name = "map structure spawner"
var/list/spawn_list
/obj/effect/spawner/structure/New()
if(spawn_list && spawn_list.len)
for(var/i = 1, i <= spawn_list.len, i++)
var/to_spawn = spawn_list[i]
new to_spawn(get_turf(src))
qdel(src)
/obj/effect/spawner/structure/window
icon = 'icons/obj/structures.dmi'
icon_state = "window_spawner"
name = "window spawner"
spawn_list = list(
/obj/structure/grille,
/obj/structure/window/fulltile
)
/obj/effect/spawner/structure/window/reinforced
name = "reenforced window spawner"
icon_state = "rwindow_spawner"
spawn_list = list(
/obj/structure/grille,
/obj/structure/window/reinforced/fulltile
)
+2 -2
View File
@@ -379,8 +379,8 @@
M << "<span class='danger'>Your eyes start to bleed profusely!</span>"
if(prob(50))
if(M.stat != 2)
M << "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>"
M.drop_item()
if(M.drop_item())
M << "<span class='danger'>You drop what you're holding and clutch at your eyes!</span>"
M.eye_blurry += 10
M.Paralyse(1)
M.Weaken(2)
+5 -4
View File
@@ -66,8 +66,9 @@
/obj/item/areaeditor/permit/create_area()
..()
qdel(src)
var/success = ..()
if(success)
qdel(src)
//Station blueprints!!!
@@ -84,7 +85,7 @@
var/area/A = get_area()
if(get_area_type() == AREA_STATION)
. += "<p>According to \the [src], you are now in <b>\"[html_encode(A.name)]\"</b>.</p>"
. += "<p>You may <a href='?src=\ref[src];edit_area=1'>move an amendment</a> to the drawing.</p>"
. += "<p>You may <a href='?src=\ref[src];edit_area=1'>make an amendment</a> to the drawing.</p>"
var/datum/browser/popup = new(user, "blueprints", "[src]", 700, 500)
popup.set_content(.)
popup.open()
@@ -162,7 +163,7 @@
A.addSorted()
interact()
return
return 1
/obj/item/areaeditor/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A)
+21 -6
View File
@@ -50,6 +50,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/list/ntrclog = list() //NTRC message log
var/new_ntrc_msg = 0
var/image/photo = null //Scanned photo
var/noreturn = 0 //whether the PDA can use the Return button, used for the aiPDA chatroom
/obj/item/device/pda/medical
@@ -815,13 +817,15 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(useTC != 2) // Does our recipient have a broadcaster on their level?
U << "ERROR: Cannot reach recipient."
return
useMS.send_pda_message("[P.owner]","[owner]","[t]")
tnote += "<i><b>&rarr; To [P.owner]:</b></i><br>[t]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t]<br>"
var/msg_ref = useMS.send_pda_message("[P.owner]","[owner]","[t]",photo)
var/photo_ref = ""
if(photo)
photo_ref = "<a href='byond://?src=\ref[msg_ref];photo=1'>(Photo)</a>"
tnote += "<i><b>&rarr; To [P.owner]:</b></i><br>[t][photo_ref]<br>"
P.tnote += "<i><b>&larr; From <a href='byond://?src=\ref[P];choice=Message;target=\ref[src]'>[owner]</a> ([ownjob]):</b></i><br>[t][photo_ref]<br>"
for(var/mob/M in player_list)
if(isobserver(M) && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTPDA))
M.show_message("<span class='game say'>PDA Message - <span class='name'>[owner]</span> -> <span class='name'>[P.owner]</span>: <span class='message'>[t]</span></span>")
M.show_message("<span class='game say'>PDA Message - <span class='name'>[owner]</span> -> <span class='name'>[P.owner]</span>: <span class='message'>[t][photo_ref]</span></span>")
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
@@ -835,9 +839,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
L = get(P, /mob/living/silicon)
if(L)
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\" (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
L << "\icon[P] <b>Message from [src.owner] ([ownjob]), </b>\"[t]\"[photo_ref] (<a href='byond://?src=\ref[P];choice=Message;skiprefresh=1;target=\ref[src]'>Reply</a>)"
log_pda("[usr] (PDA: [src.name]) sent \"[t]\" to [P.name]")
photo = null
P.overlays.Cut()
P.overlays += image('icons/obj/pda.dmi', "pda-r")
else
@@ -967,6 +972,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
C.loc = src
user << "<span class='notice'>You slide \the [C] into \the [src].</span>"
else if(istype(C, /obj/item/weapon/photo))
var/obj/item/weapon/photo/P = C
photo = P.img
user << "<span class='notice'>You scan \the [C].</span>"
return
/obj/item/device/pda/attack(mob/living/carbon/C, mob/living/user as mob)
@@ -1104,6 +1113,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
var/selected = plist[c]
if(aicamera.aipictures.len>0)
var/add_photo = input(user,"Do you want to attach a photo?","Photo","No") as null|anything in list("Yes","No")
if(add_photo=="Yes")
var/datum/picture/Pic = aicamera.selectpicture(aicamera)
src.aiPDA.photo = Pic.fields["img"]
src.aiPDA.create_message(src, selected)
+25 -6
View File
@@ -6,18 +6,37 @@
item_state = "electronic"
w_class = 2.0
slot_flags = SLOT_BELT
flags = NOBLUDGEON
var/flush = null
origin_tech = "programming=4;materials=4"
/obj/item/device/aicard/attack(mob/living/silicon/ai/M as mob, mob/user as mob)
if(!istype(M, /mob/living/silicon/ai))//If target is not an AI.
return ..()
/obj/item/device/aicard/afterattack(atom/target, mob/user, proximity)
..()
if(!proximity || !target)
return
var/mob/living/silicon/ai/AI = locate(/mob/living/silicon/ai) in src
if(AI) //AI is on the card, implies user wants to upload it.
target.transfer_ai(AI_TRANS_FROM_CARD, user, AI, src)
add_logs(user, AI, "carded", object="[name]")
else //No AI on the card, therefore the user wants to download one.
target.transfer_ai(AI_TRANS_TO_CARD, user, null, src)
update_state() //Whatever happened, update the card's state (icon, name) to match.
add_logs(user, M, "carded", object="[src.name]")
transfer_ai("AICORE", "AICARD", M, user)
return
/obj/item/device/aicard/proc/update_state()
var/mob/living/silicon/ai/AI = locate(/mob/living/silicon/ai) in src //AI is inside.
if(AI)
name = "intelliCard - [AI.name]"
if (AI.stat == DEAD)
icon_state = "aicard-404"
else
icon_state = "aicard-full"
AI.cancel_camera() //AI are forced to move when transferred, so do this whenver one is downloaded.
else
icon_state = "aicard"
name = "intelliCard"
overlays.Cut()
/obj/item/device/aicard/attack_self(mob/user)
if (!in_range(src, user))
@@ -349,8 +349,9 @@
for(var/entry in expandables)
if(istype(W,entry))
if(!user.unEquip(W))
return
bugtype = expandables[entry]
user.drop_item()
W.loc = src
expansion = W
user << "<span class='notice'>You add [W] to [src].</span>"
@@ -0,0 +1,32 @@
/obj/item/device/doorCharge
name = "airlock charge"
desc = null //Different examine for traitors
item_state = "electronic"
icon_state = "doorCharge"
w_class = 2
throw_range = 4
throw_speed = 1
force = 3
attack_verb = list("blown up", "exploded", "detonated")
m_amt = 50
g_amt = 30
/obj/item/device/doorCharge/ex_act(severity, target)
switch(severity)
if(1)
visible_message("<span class='warning'>[src] detonates!</span>")
explosion(src.loc,0,2,1,flame_range = 4)
qdel(src)
if(2)
if(prob(50))
ex_act(1)
if(3)
if(prob(25))
ex_act(1)
/obj/item/device/doorCharge/examine(mob/user)
..()
if(user.mind in ticker.mode.traitors) //No nuke ops because the device is excluded from nuclear
user << "A small explosive device that can be used to sabotage airlocks to cause an explosion upon opening. To apply, remove the airlock's maintenance panel and place it within."
else
user << "A small, suspicious object that feels lukewarm when held."
@@ -47,7 +47,8 @@
/obj/item/device/laser_pointer/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/stock_parts/micro_laser))
if(!diode)
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
diode = W
user << "<span class='notice'>You install a [diode.name] in [src].</span>"
@@ -88,9 +88,10 @@
var/obj/item/weapon/light/L = W
if(L.status == 0) // LIGHT OKAY
if(uses < max_uses)
if(!user.unEquip(W))
return
AddUses(1)
user << "<span class='notice'>You insert the [L.name] into the [src.name]. You have [uses] lights remaining.</span>"
user.drop_item()
qdel(L)
return
else
@@ -11,6 +11,12 @@
var/correct_wire
var/armer //Used for admin purposes
/obj/item/device/pizza_bomb/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is opening [src]! It looks like \he's hungry and looking for pizza.</span>")
sleep(10)
go_boom()
return(BRUTELOSS)
/obj/item/device/pizza_bomb/attack_self(mob/user)
if(disarmed)
user << "<span class='notice'>\The [src] is disarmed.</span>"
@@ -30,7 +36,7 @@
timer = Clamp(timer, 10, 100)
icon_state = "pizzabox1"
user << "<span class='notice'>You set the timer to [timer / 10] before activating the payload and closing \the [src]."
message_admins("[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has set a timer on a pizza bomb to [timer/10] seconds at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>(JMP)</a>.")
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has set a timer on a pizza bomb to [timer/10] seconds at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>(JMP)</a>.")
log_game("[key_name(usr)] has set the timer on a pizza bomb to [timer/10] seconds ([loc.x],[loc.y],[loc.z]).")
armer = usr
name = "pizza box"
@@ -42,8 +48,8 @@
icon_state = "pizzabox_bomb"
audible_message("<span class='warning'>\icon[src] *beep* *beep*</span>")
user << "<span class='danger'>That's no pizza! That's a bomb!</span>"
message_admins("[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has triggered a pizza bomb armed by [armer] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>(JMP)</a>.")
log_game("[key_name(usr)] has triggered a pizza bomb armed by [armer] ([loc.x],[loc.y],[loc.z]).")
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has triggered a pizza bomb armed by [key_name_admin(armer)] at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>(JMP)</a>.")
log_game("[key_name(usr)] has triggered a pizza bomb armed by [key_name(armer)] ([loc.x],[loc.y],[loc.z]).")
primed = 1
sleep(timer)
return go_boom()
+1 -1
View File
@@ -95,7 +95,7 @@
"[user] activates \the [src]!", \
"<span class='notice'>You activate \the [src].</span>",
"<span class='italics'>You hear a click.</span>")
message_admins("Power sink activated by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
message_admins("Power sink activated by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)")
log_game("Power sink activated by [key_name(user)] at ([x],[y],[z])")
set_mode(OPERATING)
@@ -253,12 +253,14 @@
return
if(!keyslot)
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
keyslot = W
else
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
keyslot2 = W
@@ -608,7 +608,8 @@
return
if(!keyslot)
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
keyslot = W
@@ -191,6 +191,13 @@ MASS SPECTROMETER
else
user << "<span class='info'>Blood level [blood_percent] %, [blood_volume] cl, type: [blood_type]</span>"
var/implant_detect
for(var/obj/item/cybernetic_implant/CI in H.internal_organs)
implant_detect += "[H.name] is modified with a [CI.name].<br>"
if(implant_detect)
user.show_message("<span class='notice'>Detected cybernetic modifications:</span>")
user.show_message("<span class='notice'>[implant_detect]</span>")
/proc/chemscan(var/mob/living/user, var/mob/living/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -33,7 +33,8 @@
/obj/item/device/taperecorder/attackby(obj/item/I, mob/user, params)
if(!mytape && istype(I, /obj/item/device/tape))
user.drop_item()
if(!user.unEquip(I))
return
I.loc = src
mytape = I
user << "<span class='notice'>You insert [I] into [src].</span>"
@@ -20,15 +20,17 @@
return
if(!tank_one)
if(!user.unEquip(item))
return
tank_one = item
user.drop_item()
item.loc = src
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
if(item.w_class > w_class)
w_class = item.w_class
else if(!tank_two)
if(!user.unEquip(item))
return
tank_two = item
user.drop_item()
item.loc = src
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
if(item.w_class > w_class)
@@ -174,21 +176,21 @@
if(!attacher)
attacher_name = "Unknown"
else
attacher_name = "[attacher.name]([attacher.ckey])"
attacher_name = "[key_name_admin(attacher)]"
var/log_str1 = "Bomb valve opened in "
var/log_str2 = "with [attachment] attacher: [attacher_name]"
var/log_attacher = ""
if(attacher)
log_attacher = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[attacher]'>?</A>)"
log_attacher = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[attacher]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[attacher]'>FLW</A>)"
var/mob/mob = get_mob_by_key(src.fingerprintslast)
var/last_touch_info = ""
if(mob)
last_touch_info = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[mob]'>?</A>)"
last_touch_info = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[mob]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[mob]'>FLW</A>)"
var/log_str3 = " Last touched by: [src.fingerprintslast]"
var/log_str3 = " Last touched by: [key_name_admin(mob)]"
var/bomb_message = "[log_str1] <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name]</a> [log_str2][log_attacher] [log_str3][last_touch_info]"
+1 -2
View File
@@ -216,7 +216,6 @@
/obj/item/holotape/hitby(AM as mob|obj)
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(ismob(AM))
tforce = 5
@@ -251,4 +250,4 @@
del(src)
return
#undef MAX_TAPE_RANGE
#undef MAX_TAPE_RANGE
+18 -9
View File
@@ -102,28 +102,32 @@
return
if(istype(W, /obj/item/robot_parts/l_leg))
if(src.l_leg) return
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
src.l_leg = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/r_leg))
if(src.r_leg) return
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
src.r_leg = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/l_arm))
if(src.l_arm) return
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
src.l_arm = W
src.updateicon()
if(istype(W, /obj/item/robot_parts/r_arm))
if(src.r_arm) return
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
src.r_arm = W
src.updateicon()
@@ -131,7 +135,8 @@
if(istype(W, /obj/item/robot_parts/chest))
if(src.chest) return
if(W:wires && W:cell)
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
src.chest = W
src.updateicon()
@@ -143,7 +148,8 @@
if(istype(W, /obj/item/robot_parts/head))
if(src.head) return
if(W:flash2 && W:flash1)
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
src.head = W
src.updateicon()
@@ -190,7 +196,8 @@
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc))
if(!O) return
user.drop_item()
if(!user.unEquip(W))
return
O.invisibility = 0
//Transfer debug settings to new mob
@@ -297,7 +304,8 @@
user << "<span class='warning'>You have already inserted a cell!</span>"
return
else
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
src.cell = W
user << "<span class='notice'>You insert the cell.</span>"
@@ -324,7 +332,8 @@
user << "<span class='warning'>You can't use a broken flash!</span>"
return
else
user.drop_item()
if(!user.unEquip(W))
return
F.loc = src
if(src.flash1)
src.flash2 = F
+1 -1
View File
@@ -474,7 +474,7 @@
return
for(var/obj/effect/decal/cleanable/crayon/old_marking in target)
qdel(old_marking)
new /obj/effect/decal/cleanable/crayon/gang(target,gangID,temp,graf_rot)
new /obj/effect/decal/cleanable/crayon/gang(target,gangID,"graffiti",graf_rot)
user << "<span class='notice'>You tagged [territory] for your gang!</span>"
else
+3 -2
View File
@@ -112,7 +112,8 @@ RCD
if((matter + R.ammoamt) > max_matter)
user << "<span class='warning'>The RCD can't hold any more matter-units!</span>"
return
user.drop_item()
if(!user.unEquip(W))
return
qdel(W)
matter += R.ammoamt
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
@@ -210,7 +211,7 @@ RCD
if(3)
if(istype(A, /turf/simulated/wall))
var/turf/simulated/wall/W
var/turf/simulated/wall/W = A
if(istype(W, /turf/simulated/wall/r_wall) && !canRwall)
return 0
if(checkResource(5, user))
+3 -3
View File
@@ -25,7 +25,7 @@ RPD
var/categoryId = CATEGORY_ATMOS
var/dir=SOUTH
var/dirtype=PIPE_BINARY
var/icon = 'icons/obj/pipe-item.dmi'
var/icon = 'icons/obj/atmospherics/pipes/pipe_item.dmi'
var/icon_state=""
var/selected=0
@@ -39,7 +39,7 @@ RPD
return "<li><a href='?src=\ref[dispenser];makepipe=[id];dir=[dir];type=[dirtype]'>[label]</a></li>"
/datum/pipe_info/meter
icon = 'icons/obj/pipes.dmi'
icon = 'icons/obj/atmospherics/pipes/simple.dmi'
icon_state = "meterX"
/datum/pipe_info/meter/New()
@@ -64,7 +64,7 @@ var/global/list/disposalpipeID2State=list(
/datum/pipe_info/disposal
categoryId = CATEGORY_DISPOSALS
icon = 'icons/obj/pipes/disposal.dmi'
icon = 'icons/obj/atmospherics/pipes/disposal.dmi'
icon_state = "meterX"
/datum/pipe_info/disposal/New(var/pid,var/dt)
@@ -63,7 +63,8 @@
if(ink)
user << "<span class='notice'>\the [name] already contains \a [ink].</span>"
return
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
user << "<span class='notice'>You install \the [W] into \the [name].</span>"
ink = W
+2 -1
View File
@@ -112,7 +112,8 @@
if(C.maxcharge < paddles.revivecost)
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
return
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
@@ -37,7 +37,8 @@
message_say = "VIVA LA REVOLUTION!"
user.say(message_say)
target = user
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) suicided with [src.name] at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) suicided with [src.name] at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
message_admins("[key_name(user)] suicided with [src.name] at ([x],[y],[z])")
sleep(10)
explode(get_turf(user))
user.gib()
@@ -69,18 +70,19 @@
user << "<span class='notice'>You start planting the bomb...</span>"
if(do_after(user, 50) && in_range(user, target))
user.drop_item()
if(!user.unEquip(src))
return
src.target = target
loc = null
if (ismob(target))
add_logs(user, target, "planted [name] on")
user.visible_message("<span class='warning'>[user.name] finished planting an explosive on [target.name].</span>", "<span class='notice'>You finish planting an explosive on [target.name].</span>")
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted [src.name] on [key_name(target)](<A HREF='?_src_=holder;adminmoreinfo=\ref[target]'>?</A>) with [timer] second fuse",0,1)
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) planted [src.name] on [key_name_admin(target)](<A HREF='?_src_=holder;adminmoreinfo=\ref[target]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[target]'>FLW</A>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [key_name(target)] with [timer] second fuse")
else
message_admins("[key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) planted [src.name] on [target.name] at ([target.x],[target.y],[target.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[target.x];Y=[target.y];Z=[target.z]'>JMP</a>) with [timer] second fuse",0,1)
log_game("[key_name(user)] planted [src.name] on [target.name] at ([target.x],[target.y],[target.z]) with [timer] second fuse")
target.overlays += image_overlay
@@ -65,6 +65,7 @@
var/turf/target_turf = get_turf(target)
if(target_turf)
var/turflist = getline(user, target_turf)
add_logs(user, target, "flamethrowered", admin=0, addition="at [target.x],[target.y],[target.z]")
flame_turf(turflist)
/obj/item/weapon/flamethrower/attackby(obj/item/W as obj, mob/user as mob, params)
@@ -94,7 +95,8 @@
var/obj/item/device/assembly/igniter/I = W
if(I.secured) return
if(igniter) return
user.drop_item()
if(!user.unEquip(W))
return
I.loc = src
igniter = I
update_icon()
@@ -104,7 +106,8 @@
if(ptank)
user << "<span class='notice'>There appears to already be a plasma tank loaded in [src]!</span>"
return
user.drop_item()
if(!user.unEquip(W))
return
ptank = W
W.loc = src
update_icon()
@@ -55,6 +55,7 @@
/obj/item/weapon/storage/belt/utility/full,
/obj/item/clothing/tie/horrible,
/obj/item/clothing/suit/jacket/leather,
/obj/item/clothing/suit/jacket/leather/overcoat,
/obj/item/clothing/suit/poncho,
/obj/item/clothing/suit/poncho/green,
/obj/item/clothing/suit/poncho/red)
@@ -33,7 +33,7 @@
else if(clown_check(user))
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
message_admins("[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
user << "<span class='warning'>You prime the [name]! [det_time / 10] second\s!</span>"
playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1)
@@ -68,8 +68,9 @@
return
else
if(I.reagents.total_volume)
if(!user.unEquip(I))
return
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
user.drop_item()
I.loc = src
beakers += I
else
@@ -79,8 +80,9 @@
var/obj/item/device/assembly_holder/A = I
if(isigniter(A.a_left) == isigniter(A.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
if(!user.unEquip(I))
return
user.drop_item()
nadeassembly = A
A.master = src
A.loc = src
@@ -171,8 +173,8 @@
var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast)
var/turf/T = get_turf(src)
var/area/A = get_area(T)
message_admins("grenade primed by an assembly, attached by [M.key]/[M]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> and last touched by [last.key]/[last]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
log_game("grenade primed by an assembly, attached by [M.key]/[M] and last touched by [last.key]/[last] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
message_admins("grenade primed by an assembly, attached by [key_name_admin(M)]<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[M]'>FLW</A>) and last touched by [key_name_admin(last)]<A HREF='?_src_=holder;adminmoreinfo=\ref[last]'>(?)</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[last]'>FLW</A>) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>[A.name] (JMP)</a>.")
log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])")
playsound(loc, 'sound/effects/bamf.ogg', 50, 1)
@@ -263,8 +265,9 @@
//make a special case you might as well do it explicitly. -Sayu
/obj/item/weapon/grenade/chem_grenade/large/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/slime_extract) && stage == WIRED)
if(!user.unEquip(I))
return
user << "<span class='notice'>You add [I] to the [initial(name)] assembly.</span>"
user.drop_item()
I.loc = src
beakers += I
else
@@ -49,7 +49,7 @@
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
message_admins("[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
if(iscarbon(user))
var/mob/living/carbon/C = user
@@ -64,7 +64,7 @@
add_fingerprint(user)
var/turf/bombturf = get_turf(src)
var/area/A = get_area(bombturf)
message_admins("[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
message_admins("[key_name_admin(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) has primed a [name] for detonation at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).")
if(iscarbon(user))
var/mob/living/carbon/C = user
+3 -2
View File
@@ -49,7 +49,8 @@
/obj/item/weapon/restraints/handcuffs/proc/apply_cuffs(mob/living/carbon/target, mob/user)
if(!target.handcuffed)
user.drop_item()
if(!user.drop_item())
return
//target.throw_alert("handcuffed", src) // Can't do this because escaping cuffs isn't standardized. Also zipties.
if(trashtype)
target.handcuffed = new trashtype(target)
@@ -227,4 +228,4 @@
qdel(src)
/obj/item/weapon/restraints/legcuffs/beartrap/energy/attack_hand(mob/user)
Crossed(user) //honk
Crossed(user) //honk
@@ -174,15 +174,15 @@
/obj/item/weapon/implant/loyalty/implanted(mob/target)
..()
if((target.mind in (ticker.mode.head_revolutionaries | ticker.mode.A_bosses | ticker.mode.B_bosses)) || is_shadow_or_thrall(target))
if((target.mind in ticker.mode.head_revolutionaries) || is_shadow_or_thrall(target))
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>")
return 0
if(target.mind in (ticker.mode.A_gang | ticker.mode.B_gang))
ticker.mode.remove_gangster(target.mind, exclude_bosses=0)
return 0
if(target.mind in ticker.mode.revolutionaries)
ticker.mode.remove_revolutionary(target.mind)
target << "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>"
if(target.mind in (ticker.mode.cult| ticker.mode.A_bosses | ticker.mode.B_bosses | ticker.mode.A_gang | ticker.mode.B_gang))
target << "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>"
else
target << "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>"
return 1
@@ -36,7 +36,8 @@
..()
if(istype(C, /obj/item/weapon/implantcase))
if(!case)
user.drop_item()
if(!user.unEquip(C))
return
C.loc = src
case = C
else
@@ -185,8 +185,5 @@
/obj/item/weapon/melee/energy/blade/dropped()
qdel(src)
/obj/item/weapon/melee/energy/blade/proc/throw()
qdel(src)
/obj/item/weapon/melee/energy/blade/attack_self(mob/user)
return
+2 -1
View File
@@ -8,8 +8,9 @@
/obj/item/weapon/pai_cable/proc/plugin(obj/machinery/M as obj, mob/user as mob)
if(istype(M, /obj/machinery/door) || istype(M, /obj/machinery/camera))
if(!user.drop_item())
return
user.visible_message("[user] inserts [src] into a data port on [M].", "<span class='notice'>You insert [src] into a data port on [M].</span>", "<span class='italics'>You hear the satisfying click of a wire jack fastening into place.</span>")
user.drop_item()
src.loc = M
src.machine = M
else
@@ -61,8 +61,9 @@
if(IW.w_class > src.w_class)
user << "<span class='warning'>\The [IW] is too large to fit into \the [src]!</span>"
return
if(!user.unEquip(W))
return
user << "<span class='notice'>You load \the [IW] into \the [src].</span>"
user.drop_item()
loadedItems.Add(IW)
loadedWeightClass += IW.w_class
IW.loc = src
@@ -127,9 +128,10 @@
if(src.tank)
user << "<span class='warning'>\The [src] already has a tank.</span>"
return
if(!user.unEquip(thetank))
return
user << "<span class='notice'>You hook \the [thetank] up to \the [src].</span>"
src.tank = thetank
user.drop_item()
thetank.loc = src
src.update_icons()
@@ -35,6 +35,15 @@
max_w_class = 5
max_combined_w_class = 35
/obj/item/weapon/storage/backpack/holding/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is jumping into [src]! It looks like \he's trying to commit suicide.</span>")
user.drop_item()
user.Stun(5)
sleep(20)
playsound(src, "rustle", 50, 1, -5)
qdel(user)
return
/obj/item/weapon/storage/backpack/holding/can_be_inserted(obj/item/W, stop_messages = 0, mob/user)
if(crit_fail)
user << "<span class='danger'>The Bluespace generator isn't working.</span>"
@@ -278,6 +287,24 @@
item_state = "duffle-syndieammo"
slowdown = 0
/obj/item/weapon/storage/backpack/dufflebag/syndieammo/loaded
desc = "A large dufflebag, packed to the brim with Bulldog shotgun ammo."
/obj/item/weapon/storage/backpack/dufflebag/syndieammo/loaded/New()
..()
contents = list()
new /obj/item/ammo_box/magazine/m12g(src)
new /obj/item/ammo_box/magazine/m12g(src)
new /obj/item/ammo_box/magazine/m12g(src)
new /obj/item/ammo_box/magazine/m12g(src)
new /obj/item/ammo_box/magazine/m12g(src)
new /obj/item/ammo_box/magazine/m12g(src)
new /obj/item/ammo_box/magazine/m12g/buckshot(src)
new /obj/item/ammo_box/magazine/m12g/stun(src)
new /obj/item/ammo_box/magazine/m12g/dragon(src)
return
/obj/item/weapon/storage/backpack/dufflebag/captain
name = "captain's dufflebag"
desc = "A large dufflebag for holding extra captainly goods."
@@ -41,6 +41,13 @@
user << "<span class='danger'>It's locked!</span>"
return
/obj/item/weapon/storage/lockbox/MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
usr << "<span class='warning'>It's locked!</span>"
return 0
..()
/obj/item/weapon/storage/lockbox/emag_act(mob/user as mob)
if(!broken)
broken = 1
@@ -57,6 +64,13 @@
..()
return
//Check the destination item type for contentto.
/obj/item/weapon/storage/lockbox/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
if(locked)
user << "<span class='warning'>It's locked!</span>"
return 0
return ..()
/obj/item/weapon/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
if(locked)
return 0
@@ -75,10 +75,10 @@
/obj/item/weapon/storage/secure/MouseDrop(over_object, src_location, over_location)
if (locked)
src.add_fingerprint(usr)
return
usr << "<span class='warning'>It's locked!</span>"
return 0
..()
/obj/item/weapon/storage/secure/attack_self(mob/user as mob)
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
@@ -128,6 +128,12 @@
return
return
/obj/item/weapon/storage/secure/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
if(locked)
user << "<span class='warning'>It's locked!</span>"
return 0
return ..()
/obj/item/weapon/storage/secure/can_be_inserted(obj/item/W, stop_messages = 0)
if(locked)
return 0
@@ -25,10 +25,13 @@
var/preposition = "in" // You put things 'in' a bag, but trays need 'on'.
/obj/item/weapon/storage/MouseDrop(obj/over_object)
/obj/item/weapon/storage/MouseDrop(atom/over_object)
if(iscarbon(usr) || isdrone(usr)) //all the check for item manipulation are in other places, you can safely open any storages as anything and its not buggy, i checked
var/mob/M = usr
if(!over_object)
return
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return
@@ -39,13 +42,14 @@
show_to(M)
return
if(!( istype(over_object, /obj/screen) ))
return ..()
if(!(loc == usr) || (loc && loc.loc == usr))
return
playsound(loc, "rustle", 50, 1, -5)
if(!( M.restrained() ) && !( M.stat ))
if(!( istype(over_object, /obj/screen) ))
return content_can_dump(over_object, M)
if(!(loc == usr) || (loc && loc.loc == usr))
return
playsound(loc, "rustle", 50, 1, -5)
switch(over_object.name)
if("r_hand")
if(!M.unEquip(src))
@@ -56,8 +60,26 @@
return
M.put_in_l_hand(src)
add_fingerprint(usr)
return
//Check if this storage can dump the items
/obj/item/weapon/storage/proc/content_can_dump(atom/dest_object, mob/user)
if(Adjacent(user) && dest_object.Adjacent(user))
if(dest_object.storage_contents_dump_act(src, user))
playsound(loc, "rustle", 50, 1, -5)
return 1
return 0
//Object behaviour on storage dump
/obj/item/weapon/storage/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
for(var/obj/item/I in src_object)
if(can_be_inserted(I,0,user))
src_object.remove_from_storage(I, src)
orient2hud(user)
src_object.orient2hud(user)
if(user.s_active) //refresh the HUD to show the transfered contents
user.s_active.close(user)
user.s_active.show_to(user)
return 1
/obj/item/weapon/storage/proc/return_inv()
var/list/L = list()
+2 -1
View File
@@ -71,7 +71,8 @@
if(C.maxcharge < hitcost)
user << "<span class='notice'>[src] requires a higher capacity cell.</span>"
return
user.drop_item()
if(!user.unEquip(W))
return
W.loc = src
bcell = W
user << "<span class='notice'>You install a cell in [src].</span>"
+10 -19
View File
@@ -96,7 +96,13 @@
ui_interact(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main")
/obj/item/weapon/tank/interact(mob/user, ui_key = "main")
SSnano.try_update_ui(user, src, ui_key, null, src.get_ui_data())
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
ui = SSnano.push_open_or_new_ui(user, src, ui_key, ui, "tanks.tmpl", "Tank", 500, 300, 0)
/obj/item/weapon/tank/get_ui_data()
var/mob/living/carbon/location = null
if(istype(loc, /mob/living/carbon))
@@ -104,19 +110,12 @@
else if(istype(loc.loc, /mob/living/carbon))
location = loc.loc
var/using_internal
if(istype(location))
if(location.internal==src)
using_internal = 1
// this is the data which will be sent to the ui
var/data = list()
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(distribute_pressure ? distribute_pressure : 0)
data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE)
data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE)
data["valveOpen"] = using_internal ? 1 : 0
data["valveOpen"] = 0
data["maskConnected"] = 0
if(istype(location))
@@ -124,6 +123,7 @@
if(location.internal == src) // if tank is current internal
mask_check = 1
data["valveOpen"] = 1
else if(src in location) // or if tank is in the mobs possession
if(!location.internal) // and they do not have any active internals
mask_check = 1
@@ -131,16 +131,7 @@
if(mask_check)
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
data["maskConnected"] = 1
var/datum/nanoui/ui = SSnano.get_open_ui(user, src, ui_key)
if (!ui)
ui = new /datum/nanoui(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
else
ui.push_data(data)
return data
/obj/item/weapon/tank/Topic(href, href_list)
..()
+3 -1
View File
@@ -128,8 +128,10 @@
/obj/item/weapon/twohanded/required/attack_hand(mob/user)//Can't even pick it up without both hands empty
var/obj/item/weapon/twohanded/required/H = user.get_inactive_hand()
if(get_dist(src,user) > 1)
return 0
if(H != null)
user.visible_message("<span class='notice'>[src.name] is too cumbersome to carry in one hand!</span>")
user << "<span class='notice'>[src.name] is too cumbersome to carry in one hand!</span>"
return
var/obj/item/weapon/twohanded/offhand/O = new(user)
user.put_in_inactive_hand(O)
+4
View File
@@ -152,3 +152,7 @@
/obj/get_spans()
return ..() | SPAN_ROBOT
/obj/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
var/turf/T = get_turf(src)
return T.storage_contents_dump_act(src_object, user)
+26 -102
View File
@@ -41,11 +41,12 @@
anchored = 0
state = 0
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
if(!user.drop_item())
return
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
user << "<span class='notice'>You place the circuit board inside the frame.</span>"
icon_state = "1"
circuit = P
user.drop_item()
P.loc = src
if(istype(P, /obj/item/weapon/screwdriver) && circuit)
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
@@ -152,11 +153,13 @@
user << "<span class='warning'>This MMI is mindless!</span>"
return
if(!user.drop_item())
return
ticker.mode.remove_cultist(M.brainmob.mind, 1)
ticker.mode.remove_revolutionary(M.brainmob.mind, 1)
ticker.mode.remove_gangster(M.brainmob.mind, 1)
user.drop_item()
M.loc = src
brain = M
usr << "<span class='notice'>Added a brain.</span>"
@@ -220,106 +223,27 @@ This is a good place for AI-related object verbs so I'm sticking it here.
If adding stuff to this, don't forget that an AI need to cancel_camera() whenever it physically moves to a different location.
That prevents a few funky behaviors.
*/
//What operation to perform based on target, what ineraction to perform based on object used, target itself, user. The object used is src and calls this proc.
/obj/item/proc/transfer_ai(var/choice as text, var/interaction as text, var/target, var/mob/U as mob)
if(istype(src, /obj/item/device/aicard))
var/obj/item/device/aicard/icard = src
if(icard.flush)
U << "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol."
return
//The type of interaction, the player performing the operation, the AI itself, and the card object, if any.
switch(choice)
if("AICORE")//AI mob.
var/mob/living/silicon/ai/T = target
if(!T.mind)
U << "<span class='warning'>No intelligence patterns detected.</span>" //No more magical carding of empty cores, AI RETURN TO BODY!!!11
return
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(C.contents.len)//If there is an AI on card.
U << "<span class='boldannounce'>Transfer failed</span>: Existing AI found on this terminal. Remove existing AI to install a new one."
else
if (ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
if (T.mind == malfai)
U << "<span class='boldannounce'>ERROR</span>: Remote transfer interface disabled."//Do ho ho ho~
return
new /obj/structure/AIcore/deactivated(T.loc)//Spawns a deactivated terminal at AI location.
T.aiRestorePowerRoutine = 0//So the AI initially has power.
T.control_disabled = 1//Can't control things remotely if you're stuck in a card!
T.radio_enabled = 0 //No talking on the built-in radio for you either!
T.loc = C//Throw AI into the card.
C.name = "intelliCard - [T.name]"
if (T.stat == 2)
C.icon_state = "aicard-404"
else
C.icon_state = "aicard-full"
T.cancel_camera()
T << "You have been downloaded to a mobile storage device. Remote device connection severed."
U << "<span class='boldnotice'>Transfer successful</span>: [T.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
if("INACTIVE")//Inactive AI object.
var/obj/structure/AIcore/deactivated/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
var/mob/living/silicon/ai/A = locate() in C//I love locate(). Best proc ever.
if(A)//If AI exists on the card. Else nothing since both are empty.
A.control_disabled = 0
A.radio_enabled = 1
A.loc = T.loc//To replace the terminal.
C.icon_state = "aicard"
C.name = "intelliCard"
C.overlays.Cut()
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Remote device connection restored."
U << "<span class='boldnotice'>Transfer successful</span>: [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
qdel(T)
atom/proc/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/device/aicard/card)
if(istype(card))
if(card.flush)
user << "<span class='boldannounce'>ERROR</span>: AI flush is in progress, cannot execute transfer protocol."
return 0
return 1
if("AIFIXER")//AI Fixer terminal.
var/obj/machinery/computer/aifixer/T = target
switch(interaction)
if("AICARD")
var/obj/item/device/aicard/C = src
if(!T.contents.len)
if (!C.contents.len)
U << "No AI to copy over!"//Well duh
else for(var/mob/living/silicon/ai/A in C)
C.icon_state = "aicard"
C.name = "intelliCard"
C.overlays.Cut()
A.loc = T
T.occupier = A
A.control_disabled = 1
A.radio_enabled = 0
if (A.stat == 2)
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-404")
else
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-empty")
A.cancel_camera()
A << "You have been uploaded to a stationary terminal. Sadly, there is no remote access from here."
U << "<span class='boldnotice'>Transfer successful</span>: [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
else
if(!C.contents.len && T.occupier && !T.active)
C.name = "intelliCard - [T.occupier.name]"
T.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty")
if (T.occupier.stat == 2)
C.icon_state = "aicard-404"
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-404")
else
C.icon_state = "aicard-full"
T.overlays -= image('icons/obj/computer.dmi', "ai-fixer-full")
T.occupier << "You have been downloaded to a mobile storage device. Still no remote access."
U << "<span class='boldnotice'>Transfer successful</span>: [T.occupier.name] ([rand(1000,9999)].exe) removed from host terminal and stored within local memory."
T.occupier.loc = C
T.occupier.cancel_camera()
T.occupier = null
else if (C.contents.len)
U << "<span class='boldannounce'>ERROR</span>: Artificial intelligence detected on terminal."
else if (T.active)
U << "<span class='boldannounce'>ERROR</span>: Reconstruction in progress."
else if (!T.occupier)
U << "<span class='boldannounce'>ERROR</span>: Unable to locate artificial intelligence."
/obj/structure/AIcore/deactivated/transfer_ai(var/interaction, var/mob/user, var/mob/living/silicon/ai/AI, var/obj/item/device/aicard/card)
if(!..())
return
//Transferring a carded AI to a core.
if(interaction == AI_TRANS_FROM_CARD)
AI.control_disabled = 0
AI.radio_enabled = 1
AI.loc = loc//To replace the terminal.
AI << "You have been uploaded to a stationary terminal. Remote device connection restored."
user << "<span class='boldnotice'>Transfer successful</span>: [AI.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed."
qdel(src)
else //If for some reason you use an empty card on an empty AI terminal.
user << "There is no AI loaded on this terminal!"
+2 -1
View File
@@ -194,7 +194,8 @@ LINEN BINS
/obj/structure/bedsheetbin/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/bedsheet))
user.drop_item()
if(!user.drop_item())
return
I.loc = src
sheets.Add(I)
amount++
@@ -84,8 +84,7 @@
/obj/structure/closet/crate/bin/place(var/mob/user, var/obj/item/I)
if(contents.len >= storage_capacity)
return 1
if(!opened)
user.drop_item()
if(!opened && user.drop_item())
insert(I, 0, 1)
return 1
return 0
@@ -1,244 +0,0 @@
//I still dont think this should be a closet but whatever
/obj/structure/closet/fireaxecabinet
name = "fire axe cabinet"
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
var/obj/item/weapon/twohanded/fireaxe/fireaxe = new/obj/item/weapon/twohanded/fireaxe
icon = 'icons/obj/wallmounts.dmi'
icon_state = "fireaxe1000"
anchored = 1
density = 0
wall_mounted = 1
var/localopened = 0 //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri
opened = 1
var/hitstaken = 0
locked = 1
var/smashed = 0
/obj/structure/closet/fireaxecabinet/attackby(var/obj/item/O as obj, var/mob/living/user as mob, params) //Marker -Agouri
//..() //That's very useful, Erro
var/hasaxe = 0 //gonna come in handy later~
if(fireaxe)
hasaxe = 1
if (isrobot(user) || src.locked)
if(istype(O, /obj/item/device/multitool))
user << "<span class='caution'>Resetting circuitry...</span>"
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
if(do_after(user, 20))
src.locked = 0
user << "<span class='caution'>You disable the locking modules.</span>"
update_icon()
return
else if(istype(O, /obj/item/weapon))
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weapon/W = O
if(src.smashed || src.localopened)
if(localopened)
localopened = 0
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
return
else
user.do_attack_animation(src)
playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
if(W.force < 15)
user << "<span class='warning'>The cabinet's protective glass glances off the hit.</span>"
else
src.hitstaken++
if(src.hitstaken == 4)
playsound(user, 'sound/effects/Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
src.smashed = 1
src.locked = 0
src.localopened = 1
update_icon()
return
if (istype(O, /obj/item/weapon/twohanded/fireaxe) && src.localopened)
if(!fireaxe)
if(O:wielded)
user << "<span class='warning'>Unwield the axe first.</span>"
return
fireaxe = O
user.drop_item()
src.contents += O
user << "<span class='caution'>You place the fire axe back in the [src.name].</span>"
update_icon()
else
if(src.smashed)
return
else
localopened = !localopened
if(localopened)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]opening"
spawn(10) update_icon()
else
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
else
if(src.smashed)
return
if(istype(O, /obj/item/device/multitool))
if(localopened)
localopened = 0
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
return
else
user << "<span class='caution'>Resetting circuitry...</span>"
playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user, 20))
src.locked = 1
user << "<span class='caution'>You re-enable the locking modules.</span>"
return
else
localopened = !localopened
if(localopened)
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]opening"
spawn(10) update_icon()
else
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
/obj/structure/closet/fireaxecabinet/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if(prob(50))
if(fireaxe)
fireaxe.loc = src.loc
qdel(src)
return
if(3.0)
return
/obj/structure/closet/fireaxecabinet/bullet_act(var/obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
health -= Proj.damage
if(Proj.damage >= 15 && !smashed && !localopened)
hitstaken++
if(health <= 0)
if(fireaxe)
fireaxe.loc = src.loc
qdel(src)
return
if(hitstaken >= 4)
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1)
smashed = 1
locked = 0
localopened = 1
update_icon()
/obj/structure/closet/fireaxecabinet/blob_act()
if(prob(75))
if(fireaxe)
fireaxe.loc = src.loc
qdel(src)
/obj/structure/closet/fireaxecabinet/attack_hand(mob/user as mob)
var/hasaxe = 0
if(fireaxe)
hasaxe = 1
if(src.locked)
user <<"<span class='warning'>The cabinet won't budge!</span>"
return
if(localopened)
if(fireaxe)
user.put_in_hands(fireaxe)
fireaxe = null
user << "<span class='caution'>You take the fire axe from the [name].</span>"
src.add_fingerprint(user)
update_icon()
else
if(src.smashed)
return
else
localopened = !localopened
if(localopened)
src.icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]opening"
spawn(10) update_icon()
else
src.icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
else
localopened = !localopened //I'm pretty sure we don't need an if(src.smashed) in here. In case I'm wrong and it fucks up teh cabinet, **MARKER**. -Agouri
if(localopened)
src.icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]opening"
spawn(10) update_icon()
else
src.icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]closing"
spawn(10) update_icon()
/obj/structure/closet/fireaxecabinet/attack_tk(mob/user as mob)
if(localopened && fireaxe)
fireaxe.loc = loc
user << "<span class='caution'>You telekinetically remove the fire axe.</span>"
fireaxe = null
update_icon()
return
attack_hand(user)
/obj/structure/closet/fireaxecabinet/verb/toggle_openness() //nice name, huh? HUH?! -Erro //YEAH -Agouri
set name = "Open/Close"
set category = "Object"
if (isrobot(usr) || src.locked || src.smashed)
if(src.locked)
usr << "<span class='danger'>The cabinet won't budge!</span>"
else if(src.smashed)
usr << "<span class='notice'>The protective glass is broken!</span>"
return
localopened = !localopened
update_icon()
/obj/structure/closet/fireaxecabinet/verb/remove_fire_axe()
set name = "Remove Fire Axe"
set category = "Object"
if (isrobot(usr))
return
if (localopened)
if(fireaxe)
usr.put_in_hands(fireaxe)
fireaxe = null
usr << "<span class='notice'>You take the Fire axe from the [name].</span>"
else
usr << "<span class='notice'>The [src.name] is empty.</span>"
else
usr << "<span class='notice'>The [src.name] is closed.</span>"
update_icon()
/obj/structure/closet/fireaxecabinet/attack_paw(mob/user as mob)
attack_hand(user)
return
/obj/structure/closet/fireaxecabinet/attack_ai(mob/user as mob)
if(src.smashed)
user << "<span class='warning'>The security of the cabinet is compromised.</span>"
return
else
locked = !locked
if(locked)
user << "<span class='caution'>Cabinet locked.</span>"
else
user << "<span class='caution'>Cabinet unlocked.</span>"
return
/obj/structure/closet/fireaxecabinet/update_icon() //Template: fireaxe[has fireaxe][is opened][hits taken][is smashed]. If you want the opening or closing animations, add "opening" or "closing" right after the numbers
var/hasaxe = 0
if(fireaxe)
hasaxe = 1
icon_state = "fireaxe[hasaxe][src.localopened][src.hitstaken][src.smashed]"
/obj/structure/closet/fireaxecabinet/open()
return
/obj/structure/closet/fireaxecabinet/close()
return
@@ -18,6 +18,7 @@
/obj/structure/closet/secure_closet/quartermaster/New()
..()
new /obj/item/clothing/cloak/qm(src)
new /obj/item/clothing/suit/hooded/wintercoat/cargo(src)
new /obj/item/clothing/under/rank/cargo(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
@@ -11,6 +11,7 @@
new /obj/item/weapon/storage/backpack/industrial(src)
else
new /obj/item/weapon/storage/backpack/satchel_eng(src)
new /obj/item/clothing/cloak/ce(src)
new /obj/item/weapon/storage/backpack/dufflebag/engineering(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/head/hardhat/white(src)
@@ -71,6 +71,7 @@
new /obj/item/weapon/storage/backpack/medic(src)
else
new /obj/item/weapon/storage/backpack/satchel_med(src)
new /obj/item/clothing/cloak/cmo(src)
new /obj/item/weapon/storage/backpack/dufflebag/med(src)
new /obj/item/clothing/suit/bio_suit/cmo(src)
new /obj/item/clothing/head/bio_hood/cmo(src)
@@ -24,6 +24,7 @@
/obj/structure/closet/secure_closet/RD/New()
..()
new /obj/item/clothing/cloak/rd(src)
new /obj/item/clothing/suit/hooded/wintercoat/science(src)
new /obj/item/clothing/suit/bio_suit/scientist(src)
new /obj/item/clothing/head/bio_hood/scientist(src)
@@ -10,6 +10,7 @@
new /obj/item/weapon/storage/backpack/captain(src)
else
new /obj/item/weapon/storage/backpack/satchel_cap(src)
new /obj/item/clothing/cloak/cap(src)
new /obj/item/weapon/storage/backpack/dufflebag/captain(src)
new /obj/item/clothing/suit/captunic(src)
new /obj/item/clothing/under/captainparade(src)
@@ -53,11 +54,13 @@
/obj/structure/closet/secure_closet/hos/New()
..()
new /obj/item/clothing/cloak/hos(src)
new /obj/item/clothing/suit/hooded/wintercoat/security(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
new /obj/item/clothing/under/hosparadefem(src)
new /obj/item/clothing/under/hosparademale(src)
new /obj/item/clothing/suit/armor/vest/leather(src)
new /obj/item/clothing/suit/armor/hos(src)
new /obj/item/clothing/under/rank/head_of_security/alt(src)
new /obj/item/clothing/head/HoS(src)
@@ -31,7 +31,6 @@
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/weapon/storage/box/teargas(src)
new /obj/item/weapon/storage/backpack/dufflebag/syndiemed(src)
new /obj/item/weapon/storage/backpack/dufflebag/syndieammo(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
new /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog(src)
@@ -68,6 +68,8 @@
new /obj/item/clothing/under/color/black(src)
if(prob(25))
new /obj/item/clothing/suit/jacket/leather(src)
if(prob(25))
new /obj/item/clothing/suit/jacket/leather/overcoat(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/shoes/sneakers/black(src)
new /obj/item/clothing/shoes/sneakers/black(src)
@@ -286,8 +286,9 @@
return
else if(istype(W, /obj/item/device/electropack))
if(rigged)
if(!user.drop_item())
return
user << "<span class='notice'>You attach [W] to [src].</span>"
user.drop_item()
W.loc = src
return
else if(istype(W, /obj/item/weapon/wirecutters))
@@ -532,8 +532,9 @@
if(do_after(user, 40))
if( src.state != 1 )
return
if(!user.drop_item())
return
user.drop_item()
W.loc = src
user << "<span class='notice'>You install the airlock electronics.</span>"
src.state = 2
+2 -1
View File
@@ -29,7 +29,8 @@
return
if(istype(O, /obj/item/weapon/extinguisher))
if(!has_extinguisher && opened)
user.drop_item()
if(!user.drop_item())
return
contents += O
has_extinguisher = O
user << "<span class='notice'>You place [O] in [src].</span>"
+5 -2
View File
@@ -141,6 +141,9 @@
playsound(src, 'sound/items/Welder.ogg', 100, 1)
qdel(src)
/obj/structure/falsewall/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
return 0
/*
* False R-Walls
*/
@@ -238,8 +241,8 @@
/obj/structure/falsewall/plasma/attackby(obj/item/weapon/W, mob/user, params)
if(is_hot(W) > 300)
message_admins("Plasma falsewall ignited by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma falsewall ignited by [user.ckey]([user]) in ([x],[y],[z])")
message_admins("Plasma falsewall ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma falsewall ignited by [key_name(user)] in ([x],[y],[z])")
burnbabyburn()
return
..()
+141
View File
@@ -0,0 +1,141 @@
/obj/structure/fireaxecabinet
name = "fire axe cabinet"
desc = "There is small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if."
var/obj/item/weapon/twohanded/fireaxe/fireaxe = new/obj/item/weapon/twohanded/fireaxe
icon = 'icons/obj/wallmounts.dmi'
icon_state = "fireaxe"
anchored = 1
density = 0
var/locked = 1
var/open = 0
var/glass_hp = 60
/obj/structure/fireaxecabinet/New()
..()
update_icon()
/obj/structure/fireaxecabinet/attackby(obj/item/I as obj, mob/user as mob, params)
if(isrobot(user) || istype(I,/obj/item/device/multitool))
toggle_lock(user)
return
if(open || glass_hp <= 0)
if(istype(I, /obj/item/weapon/twohanded/fireaxe) && !fireaxe)
var/obj/item/weapon/twohanded/fireaxe/F = I
if(F.wielded)
user << "<span class='warning'>Unwield the [F.name] first.</span>"
return
if(!user.drop_item())
return
fireaxe = F
src.contents += F
user << "<span class='caution'>You place the [F.name] back in the [name].</span>"
update_icon()
return
else if(istype(I, /obj/item/weapon))
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weapon/W = I
user.do_attack_animation(src)
playsound(src, 'sound/effects/Glasshit.ogg', 100, 1)
if(W.force >= 10)
glass_hp -= W.force
if(glass_hp <= 0)
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1)
update_icon()
else
user << "<span class='warning'>The [name]'s protective glass glances off the hit.</span>"
/obj/structure/fireaxecabinet/ex_act(severity, target)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if(prob(50) && fireaxe)
fireaxe.loc = src.loc
qdel(src)
return
if(3.0)
return
/obj/structure/fireaxecabinet/bullet_act(var/obj/item/projectile/Proj)
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
if(Proj.damage)
glass_hp -= Proj.damage
if(glass_hp <= 0)
playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1)
update_icon()
/obj/structure/fireaxecabinet/blob_act()
if(prob(75) && fireaxe)
fireaxe.loc = src.loc
qdel(src)
/obj/structure/fireaxecabinet/attack_hand(mob/user as mob)
if(open || glass_hp <= 0)
if(fireaxe)
user.put_in_hands(fireaxe)
fireaxe = null
user << "<span class='caution'>You take the fire axe from the [name].</span>"
src.add_fingerprint(user)
update_icon()
return
if(locked)
user <<"<span class='warning'> The [name] won't budge!</span>"
return
else
open = !open
update_icon()
return
/obj/structure/fireaxecabinet/attack_paw(mob/user as mob)
if(ismonkey(user)) //no fire-axe wielding aliens allowed
attack_hand(user)
return
/obj/structure/fireaxecabinet/attack_ai(mob/user as mob)
toggle_lock(user)
return
/obj/structure/fireaxecabinet/update_icon()
overlays.Cut()
if(fireaxe)
overlays += "axe"
if(!open)
switch(glass_hp)
if(-INFINITY to 0)
overlays += "glass4"
if(1 to 20)
overlays += "glass3"
if(21 to 40)
overlays += "glass2"
if(41 to 59)
overlays += "glass1"
if(60)
overlays += "glass"
if(locked)
overlays += "locked"
else
overlays += "unlocked"
else
overlays += "glass_raised"
/obj/structure/fireaxecabinet/proc/toggle_lock(mob/user)
user << "<span class = 'caution'> Resetting circuitry...</span>"
playsound(src, 'sound/machines/locktoggle.ogg', 50, 1)
if(do_after(user, 20))
user << "<span class='caution'>You [locked ? "disable" : "re-enable"] the locking modules.</span>"
locked = !locked
update_icon()
/obj/structure/fireaxecabinet/verb/toggle_open() //nice name, huh? HUH?! -Erro //YEAH -Agouri
set name = "Open/Close"
set category = "Object"
set src in oview(1)
if(locked)
usr <<"<span class='warning'> The [name] won't budge!</span>"
return
else
open = !open
update_icon()
return
+2 -1
View File
@@ -201,7 +201,8 @@
else if(istype(W, /obj/item/pipe))
var/obj/item/pipe/P = W
if (P.pipe_type in list(0, 1, 5)) //simple pipes, simple bends, and simple manifolds.
user.drop_item()
if(!user.drop_item())
return
P.loc = src.loc
user << "<span class='notice'>You fit the pipe into \the [src].</span>"
else
+3 -1
View File
@@ -251,7 +251,6 @@
/obj/structure/grille/hitby(AM as mob|obj)
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(ismob(AM))
tforce = 5
@@ -261,3 +260,6 @@
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
health = max(0, health - tforce)
healthcheck()
/obj/structure/grille/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
return 0
+2 -1
View File
@@ -39,7 +39,8 @@
return
if(istype(I, gun_category))
if(contents.len < capacity && open)
user.drop_item()
if(!user.drop_item())
return
contents += I
user << "<span class='notice'>You place [I] in [src].</span>"
update_icon()
+4 -2
View File
@@ -29,7 +29,8 @@
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
/obj/structure/janitorialcart/proc/put_in_cart(obj/item/I, mob/user)
user.drop_item()
if(!user.drop_item())
return
I.loc = src
updateUsrDialog()
user << "<span class='notice'>You put [I] into [src].</span>"
@@ -199,8 +200,9 @@
user << "Hold [I] in one of your hands while you drive this [callme]."
else if(istype(I, /obj/item/weapon/storage/bag/trash))
if(keytype == /obj/item/key/janitor)
if(!user.drop_item())
return
user << "<span class='notice'>You hook the trashbag onto the [callme].</span>"
user.drop_item()
I.loc = src
mybag = I
else if(istype(I, /obj/item/janiupgrade))
@@ -219,8 +219,8 @@
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/weapon/W, mob/user, params)
if(is_hot(W))
message_admins("Plasma mineral door ignited by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma mineral door ignited by [user.ckey]([user]) in ([x],[y],[z])")
message_admins("Plasma mineral door ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma mineral door ignited by [key_name(user)] in ([x],[y],[z])")
TemperatureAct(100)
..()
+6 -4
View File
@@ -111,14 +111,16 @@
/obj/structure/mirror/magic/New()
if(!choosable_races.len)
for(var/datum/species/S in typesof(/datum/species) - /datum/species)
for(var/speciestype in typesof(/datum/species) - /datum/species)
var/datum/species/S = new speciestype()
if(!(S.id in races_blacklist))
choosable_races += S
choosable_races += S.id
..()
/obj/structure/mirror/magic/badmin/New()
for(var/datum/species/S in typesof(/datum/species) - /datum/species)
choosable_races += S
for(var/speciestype in typesof(/datum/species) - /datum/species)
var/datum/species/S = new speciestype()
choosable_races += S.id
..()
/obj/structure/mirror/magic/attack_hand(mob/user as mob)
+2 -1
View File
@@ -19,9 +19,10 @@
/obj/structure/noticeboard/attackby(var/obj/item/weapon/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/paper))
if(notices < 5)
if(!user.drop_item())
return
O.add_fingerprint(user)
add_fingerprint(user)
user.drop_item()
O.loc = src
notices++
icon_state = "nboard0[notices]" //update sprite
+2 -2
View File
@@ -207,8 +207,8 @@
/obj/structure/statue/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
message_admins("Plasma statue ignited by [key_name(user, user.client)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma statue ignited by [user.ckey]([user]) in ([x],[y],[z])")
message_admins("Plasma statue ignited by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma statue ignited by [key_name(user)] in ([x],[y],[z])")
ignite(is_hot(W))
return
..()
@@ -17,8 +17,9 @@
/obj/structure/stool/bed/chair/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/assembly/shock_kit))
if(!user.drop_item())
return
var/obj/item/assembly/shock_kit/SK = W
user.drop_item()
var/obj/structure/stool/bed/chair/e_chair/E = new /obj/structure/stool/bed/chair/e_chair(src.loc)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
E.dir = dir
+2 -1
View File
@@ -625,8 +625,9 @@
/obj/item/weapon/rack_parts/attack_self(mob/user as mob)
user << "<span class='notice'>You start constructing rack...</span>"
if (do_after(user, 50))
if(!user.drop_item())
return
var/obj/structure/rack/R = new /obj/structure/rack( user.loc )
R.add_fingerprint(user)
user.drop_item()
qdel(src)
return
@@ -50,7 +50,8 @@
/obj/structure/dispenser/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/tank/internals/oxygen) || istype(I, /obj/item/weapon/tank/internals/air) || istype(I, /obj/item/weapon/tank/internals/anesthetic))
if(oxygentanks < 10)
user.drop_item()
if(!user.drop_item())
return
I.loc = src
oxytanks.Add(I)
oxygentanks++
@@ -59,7 +60,8 @@
user << "<span class='notice'>[src] is full.</span>"
if(istype(I, /obj/item/weapon/tank/internals/plasma))
if(plasmatanks < 10)
user.drop_item()
if(!user.drop_item())
return
I.loc = src
platanks.Add(I)
plasmatanks++
+1 -2
View File
@@ -23,11 +23,10 @@
/obj/structure/target_stake/attackby(obj/item/target/T, mob/user)
if(pinned_target)
return
if(istype(T))
if(istype(T) && user.drop_item())
pinned_target = T
T.pinnedLoc = src
T.density = 1
user.drop_item()
T.layer = OBJ_LAYER + 0.1
T.loc = loc
user << "<span class='notice'>You slide the target into the stake.</span>"
@@ -4,7 +4,7 @@
// one.
/obj/structure/transit_tube/station
name = "station tube station"
icon = 'icons/obj/pipes/transit_tube_station.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube_station.dmi'
icon_state = "closed"
exit_delay = 1
enter_delay = 2
@@ -3,7 +3,7 @@
// Mappers: you can use "Generate Instances from Icon-states"
// to get the different pieces.
/obj/structure/transit_tube
icon = 'icons/obj/pipes/transit_tube.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "E-W"
density = 1
layer = 3.1
@@ -3,7 +3,7 @@
// normal transit tubes
/obj/structure/c_transit_tube
name = "unattached transit tube"
icon = 'icons/obj/pipes/transit_tube.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "E-W" //icon_state decides which tube will be built
density = 0
layer = 3.1 //same as the built tube
@@ -92,7 +92,7 @@
// transit tube station
/obj/structure/c_transit_tube/station
name = "unattached through station"
icon = 'icons/obj/pipes/transit_tube_station.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube_station.dmi'
icon_state = "closed"
/obj/structure/c_transit_tube/station/tube_turn(var/angle)
@@ -122,7 +122,7 @@
// in that sense they're the same as stations and can reuse their flip and rotate verbs
/obj/structure/c_transit_tube/station/block
name = "unattached tube blocker"
icon = 'icons/obj/pipes/transit_tube.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube.dmi'
icon_state = "Block"
/obj/structure/c_transit_tube/station/block/buildtube()
@@ -136,7 +136,7 @@
//see station.dm for the logic
/obj/structure/c_transit_tube_pod
name = "unattached transit tube pod"
icon = 'icons/obj/pipes/transit_tube_pod.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube_pod.dmi'
icon_state = "pod"
anchored = 0.0
density = 0
@@ -1,5 +1,5 @@
/obj/structure/transit_tube_pod
icon = 'icons/obj/pipes/transit_tube_pod.dmi'
icon = 'icons/obj/atmospherics/pipes/transit_tube_pod.dmi'
icon_state = "pod"
animate_movement = FORWARD_STEPS
anchored = 1.0
@@ -190,9 +190,10 @@
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/airlock_electronics))
if(!user.drop_item())
return
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "<span class='notice'>You start to install electronics into the airlock assembly...</span>")
user.drop_item()
W.loc = src
if(do_after(user, 40))
+3 -2
View File
@@ -93,7 +93,6 @@
/obj/structure/window/hitby(AM as mob|obj)
..()
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
var/tforce = 0
if(ismob(AM))
tforce = 40
@@ -415,6 +414,8 @@
hit(round(exposed_volume / 100), 0)
..()
/obj/structure/window/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
return 0
/obj/structure/window/reinforced
name = "reinforced window"
@@ -456,4 +457,4 @@
maxhealth = 100
wtype = "shuttle"
fulltile = 1
reinf = 1
reinf = 1