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

Conflicts:
	code/modules/projectiles/guns/energy/laser.dm
This commit is contained in:
Jordie0608
2015-12-11 15:59:46 +11:00
675 changed files with 55776 additions and 34740 deletions
+10 -2
View File
@@ -62,6 +62,8 @@
for(var/obj/O in orange(4, src))
if(!O.anchored)
step_towards(O,src)
for(var/mob/living/M in range(0, src))
gravShock(M)
for(var/mob/living/M in orange(4, src))
step_towards(M,src)
for(var/obj/O in range(0,src))
@@ -70,13 +72,14 @@
if(target && !target.stat)
O.throw_at(target, 5, 10)
/obj/effect/anomaly/grav/Crossed(mob/A)
gravShock(A)
/obj/effect/anomaly/grav/Bump(mob/A)
gravShock(A)
return
/obj/effect/anomaly/grav/Bumped(mob/A)
gravShock(A)
return
/obj/effect/anomaly/grav/proc/gravShock(mob/A)
if(boing && isliving(A) && !A.stat)
@@ -102,6 +105,11 @@
/obj/effect/anomaly/flux/anomalyEffect()
..()
canshock = 1
for(var/mob/living/M in range(0, src))
mobShock(M)
/obj/effect/anomaly/flux/Crossed(mob/living/M)
mobShock(M)
/obj/effect/anomaly/flux/Bump(mob/living/M)
mobShock(M)
@@ -22,13 +22,6 @@
pixel_x = rand(-5, 5)
pixel_y = rand(-5, 5)
/obj/effect/decal/cleanable/greenglow
name = "green glow"
/obj/effect/decal/cleanable/greenglow/ex_act()
return
/obj/effect/decal/cleanable/dirt
name = "dirt"
desc = "Someone should clean that up."
@@ -61,6 +54,9 @@
icon = 'icons/effects/effects.dmi'
icon_state = "greenglow"
/obj/effect/decal/cleanable/greenglow/ex_act()
return
/obj/effect/decal/cleanable/cobweb
name = "cobweb"
desc = "Somebody should remove that."
+10 -5
View File
@@ -6,7 +6,7 @@
opacity = 0
density = 0
icon = 'icons/obj/lighting.dmi'
icon_state = "glowshroomf"
icon_state = "glowshroom" //replaced in New
layer = 2.1
var/endurance = 30
var/potency = 30
@@ -16,6 +16,10 @@
var/generation = 1
var/spreadIntoAdjacentChance = 60
obj/effect/glowshroom/glowcap
name = "glowcap"
icon_state = "glowcap"
/obj/effect/glowshroom/single
yield = 0
@@ -23,6 +27,7 @@
..()
SetLuminosity(round(potency/10))
dir = CalcDir()
var/base_icon_state = initial(icon_state)
if(!floor)
switch(dir) //offset to make it be on the wall rather than on the floor
if(NORTH)
@@ -33,9 +38,9 @@
pixel_x = 32
if(WEST)
pixel_x = -32
icon_state = "glowshroom[rand(1,3)]"
icon_state = "[base_icon_state][rand(1,3)]"
else //if on the floor, glowshroom on-floor sprite
icon_state = "glowshroomf"
icon_state = "[base_icon_state]f"
spawn(delay)
Spread()
@@ -71,13 +76,13 @@
if(shroomCount >= placeCount)
continue
var/obj/effect/glowshroom/child = new /obj/effect/glowshroom(newLoc)//The baby mushrooms have different stats :3
var/obj/effect/glowshroom/child = new type(newLoc)//The baby mushrooms have different stats :3
child.potency = max(potency+rand(-3,6), 0)
child.yield = max(yield+rand(-1,2), 0)
child.delay = max(delay+rand(-30,60), 0)
child.endurance = max(endurance+rand(-3,6), 1)
child.generation = generation+1
child.desc = "This is a [child.generation]\th generation glowshroom!"//I added this for testing, but I figure I'll leave it in.
child.desc = "This is a [child.generation]\th generation [child.name]!"//I added this for testing, but I figure I'll leave it in.
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
set background = BACKGROUND_ENABLED
+10 -5
View File
@@ -39,15 +39,20 @@
spawn(duration)
qdel(src)
/obj/effect/overlay/temp/cult
name = "unholy glow"
icon_state = "wallglow"
layer = 2.01
randomdir = 0
duration = 10
/obj/effect/overlay/temp/cult/floor
/obj/effect/overlay/temp/cult/sac
name = "maw of Nar-Sie"
icon_state = "sacconsume"
/obj/effect/overlay/temp/cult/turf
name = "unholy glow"
icon_state = "wallglow"
layer = 2.01
/obj/effect/overlay/temp/cult/turf/floor
icon_state = "floorglow"
duration = 5
+9 -11
View File
@@ -134,12 +134,11 @@
var/throw_dir = get_dir(epicenter,T)
for(var/obj/item/I in T)
spawn(0) //Simultaneously not one at a time
if(I && !I.anchored)
var/throw_range = rand(throw_dist, max_range)
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
I.throw_speed = 4 //Temporarily change their throw_speed for embedding purposes (Reset when it finishes throwing, regardless of hitting anything)
I.throw_at(throw_at, throw_range, 2)//Throw it at 2 speed, this is purely visual anyway.
if(I && !I.anchored)
var/throw_range = rand(throw_dist, max_range)
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
I.throw_speed = 4 //Temporarily change their throw_speed for embedding purposes (Reset when it finishes throwing, regardless of hitting anything)
I.throw_at_fast(throw_at, throw_range, 2)//Throw it at 2 speed, this is purely visual anyway.
var/took = (world.timeofday-start)/10
@@ -147,11 +146,10 @@
if(Debug2) world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds."
//Machines which report explosions.
for(var/i,i<=doppler_arrays.len,i++)
var/obj/machinery/doppler_array/Array = doppler_arrays[i]
if(Array)
Array.sense_explosion(epicenter,devastation_range,heavy_impact_range,light_impact_range,took,orig_dev_range,orig_heavy_range,orig_light_range)
for(var/array in doppler_arrays)
var/obj/machinery/doppler_array/A = array
A.sense_explosion(epicenter,devastation_range,heavy_impact_range,light_impact_range,took,orig_dev_range,orig_heavy_range,orig_light_range)
return 1
+15 -19
View File
@@ -97,6 +97,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
var/heat = 0
var/sharpness = IS_BLUNT
var/toolspeed = 1
var/block_chance = 0
var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
if(((src in target) && !target_self) || ((!istype(target.loc, /turf)) && (!istype(target, /turf)) && (not_inside)) || is_type_in_list(target, can_be_placed_into))
@@ -104,7 +108,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
else
return 1
/obj/item/device
icon = 'icons/obj/device.dmi'
@@ -314,6 +317,12 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
// afterattack() and attack() prototypes moved to _onclick/item_attack.dm for consistency
/obj/item/proc/hit_reaction(mob/living/carbon/human/owner, attack_text = "the attack", final_block_chance = 0)
if(prob(final_block_chance))
owner.visible_message("<span class='danger'>[owner] blocks [attack_text] with [src]!</span>")
return 1
return 0
/obj/item/proc/talk_into(mob/M, input, channel, spans)
return
@@ -362,17 +371,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
if(usr.stat || usr.restrained() || !Adjacent(usr) || usr.stunned || usr.weakened || usr.lying)
return
if(ishuman(usr) || ismonkey(usr))
if(usr.get_active_hand() == null)
usr.UnarmedAttack(src) // Let me know if this has any problems -Giacom | Actually let me know now. -Sayu
/*
if(usr.get_active_hand() == null)
src.attack_hand(usr)
else
usr << "\red You already have something in your hand."
*/
else
usr << "<span class='warning'>This mob type can't use this verb!</span>"
if(usr.get_active_hand() == null) // Let me know if this has any problems -Yota
usr.UnarmedAttack(src)
//This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'action_button_name'.
//The default action is attack_self().
@@ -380,9 +380,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
/obj/item/proc/ui_action_click()
attack_self(usr)
/obj/item/proc/IsShield()
return 0
/obj/item/proc/IsReflect(var/def_zone) //This proc determines if and at what% an object will reflect energy projectiles if it's in l_hand,r_hand or wear_suit
return 0
@@ -475,10 +472,9 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
bloody_hands_mob = null
/obj/item/singularity_pull(S, current_size)
spawn(0) //this is needed or multiple items will be thrown sequentially and not simultaneously
if(current_size >= STAGE_FOUR)
throw_at(S,14,3, spin=0)
else ..()
if(current_size >= STAGE_FOUR)
throw_at_fast(S,14,3, spin=0)
else ..()
/obj/item/acid_act(acidpwr, acid_volume)
. = 1
+15 -4
View File
@@ -8,10 +8,14 @@
w_class = 1
var/wax = 200
var/lit = 0
var/infinite = 0
var/start_lit = 0
heat = 1000
proc
light(var/flavor_text = "<span class='danger'>[usr] lights the [name].</span>")
/obj/item/candle/New()
..()
if(start_lit)
light()
/obj/item/candle/update_icon()
var/i
@@ -51,14 +55,16 @@
light() //honk
return
/obj/item/candle/light(var/flavor_text = "<span class='danger'>[usr] lights the [name].</span>")
/obj/item/candle/proc/light(var/flavor_text = "<span class='danger'>[usr] lights the [name].</span>")
if(!src.lit)
src.lit = 1
//src.damtype = "fire"
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
SetLuminosity(CANDLE_LUMINOSITY)
SSobj.processing |= src
if(!infinite)
SSobj.processing |= src
update_icon()
/obj/item/candle/process()
@@ -99,4 +105,9 @@
/obj/item/candle/is_hot()
return lit * heat
/obj/item/candle/infinite
infinite = 1
start_lit = 1
#undef CANDLE_LUMINOSITY
+97 -76
View File
@@ -19,6 +19,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/default_cartridge = 0 // Access level defined by cartridge
var/obj/item/weapon/cartridge/cartridge = null //current cartridge
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
var/icon_alert = "pda-r" //Icon to be overlayed for message alerts. Taken from the pda icon file.
//Secondary variables
var/scanmode = 0 //1 is medical scanner, 2 is forensics, 3 is reagent scanner.
@@ -160,6 +161,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/librarian
icon_state = "pda-library"
icon_alert = "pda-r-library"
default_cartridge = /obj/item/weapon/cartridge/librarian
desc = "A portable microcomputer by Thinktronic Systems, LTD. This is model is a WGW-11 series e-reader."
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant!"
@@ -233,14 +235,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/update_label()
name = "PDA-[owner] ([ownjob])" //Name generalisation
/obj/item/device/pda/proc/can_use(mob/user)
if(user && ismob(user))
if(user.incapacitated())
return 0
if(loc == user)
return 1
return 0
/obj/item/device/pda/GetAccess()
if(id)
return id.GetAccess()
@@ -252,12 +246,13 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/MouseDrop(obj/over_object, src_location, over_location)
var/mob/M = usr
if((!istype(over_object, /obj/screen)) && can_use(M))
if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src))
return attack_self(M)
return
//NOTE: graphic resources are loaded on client login
/obj/item/device/pda/attack_self(mob/user)
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/pda)
assets.send(user)
user.set_machine(src)
@@ -382,7 +377,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "<h4><img src=pda_menu.png> Detected PDAs</h4>"
dat += "<ul>"
var/count = 0
if (!toff)
@@ -400,6 +394,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
dat += "</ul>"
if (count == 0)
dat += "None detected.<br>"
else if(cartridge && cartridge.spam_enabled)
dat += "<a href='byond://?src=\ref[src];choice=MessageAll'>Send To All</a>"
if(21)
dat += "<h4><img src=pda_mail.png> SpaceMessenger V3.9.6</h4>"
@@ -450,9 +446,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
..()
var/mob/living/U = usr
//Looking for master was kind of pointless since PDAs don't appear to have one.
//if ((src in U.contents) || ( istype(loc, /turf) && in_range(src, U) ) )
if(can_use(U)) //Why reinvent the wheel? There's a proc that does exactly that.
if(usr.canUseTopic(src))
add_fingerprint(U)
U.set_machine(src)
@@ -586,6 +581,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/obj/item/device/pda/P = locate(href_list["target"])
src.create_message(U, P)
if("MessageAll")
src.send_to_all(U)
if("Send Honk")//Honk virus
if(istype(cartridge, /obj/item/weapon/cartridge/clown))//Cartridge checks are kind of unnecessary since everything is done through switch.
var/obj/item/device/pda/P = locate(href_list["target"])//Leaving it alone in case it may do something useful, I guess.
@@ -710,37 +708,94 @@ var/global/list/obj/item/device/pda/PDAs = list()
return
if (!in_range(src, U) && loc != U)
return
if(!can_use(U))
if(!U.canUseTopic(src))
return
if(emped)
t = Gibberish(t, 100)
return t
/obj/item/device/pda/proc/create_message(mob/living/U = usr, obj/item/device/pda/P)
/obj/item/device/pda/proc/send_message(mob/living/user = usr,list/obj/item/device/pda/targets)
var/message = msg_input(user)
var/t = msg_input(U)
if (!t)
if(!message || !targets.len)
return
if(last_text && world.time < last_text + 5)
return
if (last_text && world.time < last_text + 5)
return
var/multiple = targets.len > 1
if (!istype(P) || P.toff || qdeleted(P))
return
var/datum/data_pda_msg/last_sucessful_msg
for(var/obj/item/device/pda/P in targets)
if(P == src)
continue
var/obj/machinery/message_server/MS = null
MS = can_send(P)
if(MS)
var/datum/data_pda_msg/msg = MS.send_pda_message("[P.owner]","[owner]","[message]",photo)
if(msg)
last_sucessful_msg = msg
if(!multiple)
show_to_sender(msg)
P.show_recieved_message(msg,src)
if(!multiple)
show_to_ghosts(msg)
log_pda("[user] (PDA: [src.name]) sent \"[message]\" to [P.name]")
else
if(!multiple)
user << "<span class='notice'>ERROR: Server isn't responding.</span>"
return
photo = null
if(multiple)
show_to_sender(last_sucessful_msg,1)
show_to_ghosts(last_sucessful_msg,1)
log_pda("[user] (PDA: [src.name]) sent \"[message]\" to Everyone")
/obj/item/device/pda/proc/show_to_sender(datum/data_pda_msg/msg,multiple = 0)
tnote += "<i><b>&rarr; To [multiple ? "Everyone" : msg.recipient]:</b></i><br>[msg.message][msg.get_photo_ref()]<br>"
/obj/item/device/pda/proc/show_recieved_message(datum/data_pda_msg/msg,obj/item/device/pda/source)
tnote += "<i><b>&larr; From <a href='byond://?src=\ref[src];choice=Message;target=\ref[source]'>[source.owner]</a> ([source.ownjob]):</b></i><br>[msg.message][msg.get_photo_ref()]<br>"
if (!silent)
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
audible_message("\icon[src] *[ttone]*", null, 3)
//Search for holder of the PDA.
var/mob/living/L = null
if(loc && isliving(loc))
L = loc
//Maybe they are a pAI!
else
L = get(src, /mob/living/silicon)
if(L)
L << "\icon[src] <b>Message from [source.owner] ([source.ownjob]), </b>\"[msg.message]\"[msg.get_photo_ref()] (<a href='byond://?src=\ref[src];choice=Message;skiprefresh=1;target=\ref[source]'>Reply</a>)"
overlays.Cut()
overlays += image(icon, icon_alert)
/obj/item/device/pda/proc/show_to_ghosts(datum/data_pda_msg/msg,multiple = 0)
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'>[msg.sender]</span> -> <span class='name'>[multiple ? "Everyone" : msg.recipient]</span>: <span class='message'>[msg.message][msg.get_photo_ref()]</span></span>")
/obj/item/device/pda/proc/can_send(obj/item/device/pda/P)
if(!P || qdeleted(P) || P.toff)
return null
last_text = world.time
var/obj/machinery/message_server/useMS = null
if(message_servers)
for (var/obj/machinery/message_server/MS in message_servers)
//PDAs are now dependant on the Message Server.
if(MS.active)
useMS = MS
break
var/datum/signal/signal = src.telecomms_process()
if(!P || qdeleted(P) || !U) //in case the PDA or mob gets destroyed during telecomms_process()
return
if(!P || qdeleted(P) || P.toff) //in case the PDA or mob gets destroyed during telecomms_process()
return null
var/useTC = 0
if(signal)
@@ -749,44 +804,18 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/turf/pos = get_turf(P)
if(pos.z in signal.data["level"])
useTC = 2
//Let's make this barely readable
if(signal.data["compression"] > 0)
t = Gibberish(t, signal.data["compression"] + 50)
if(useMS && useTC) // only send the message if it's stable
if(useTC != 2) // Does our recipient have a broadcaster on their level?
U << "ERROR: Cannot reach recipient."
return
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][photo_ref]</span></span>")
if (!P.silent)
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
P.audible_message("\icon[P] *[P.ttone]*", null, 3)
//Search for holder of the PDA.
var/mob/living/L = null
if(P.loc && isliving(P.loc))
L = P.loc
//Maybe they are a pAI!
else
L = get(P, /mob/living/silicon)
if(L)
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")
if(useTC == 2)
return useMS
else
U << "<span class='notice'>ERROR: Server isn't responding.</span>"
return null
/obj/item/device/pda/proc/send_to_all(mob/living/U = usr)
send_message(U,get_viewable_pdas())
/obj/item/device/pda/proc/create_message(mob/living/U = usr, obj/item/device/pda/P)
send_message(U,list(P))
/obj/item/device/pda/AltClick()
..()
@@ -794,13 +823,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(issilicon(usr))
return
if(can_use(usr))
if(usr.canUseTopic(src))
if(id)
remove_id()
else
usr << "<span class='warning'>This PDA does not have an ID in it!</span>"
else
usr << "<span class='warning'>You cannot do that while restrained!</span>"
/obj/item/device/pda/verb/verb_remove_id()
set category = "Object"
@@ -810,14 +837,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(issilicon(usr))
return
if ( can_use(usr) )
if (usr.canUseTopic(src))
if(id)
remove_id()
else
usr << "<span class='warning'>This PDA does not have an ID in it!</span>"
else
usr << "<span class='warning'>You cannot do that while restrained!</span>"
/obj/item/device/pda/verb/verb_remove_pen()
set category = "Object"
@@ -827,7 +851,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(issilicon(usr))
return
if ( can_use(usr) )
if (usr.canUseTopic(src))
var/obj/item/weapon/pen/O = locate() in src
if(O)
if (istype(loc, /mob))
@@ -839,8 +863,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
O.loc = get_turf(src)
else
usr << "<span class='warning'>This PDA does not have a pen in it!</span>"
else
usr << "<span class='warning'>You cannot do that while restrained!</span>"
/obj/item/device/pda/proc/id_check(mob/user, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
if(choice == 1)
@@ -889,11 +911,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
//Basic safety check. If either both objects are held by user or PDA is on ground and card is in hand.
if(((src in user.contents) && (C in user.contents)) || (istype(loc, /turf) && in_range(src, user) && (C in user.contents)) )
if( can_use(user) )//If they can still act.
if(!id_check(user, 2))
return
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
if(!id_check(user, 2))
return
user << "<span class='notice'>You put the ID into \the [src]'s slot.</span>"
updateSelfDialog()//Update self dialog on success.
return //Return in case of failed check or when successful.
updateSelfDialog()//For the non-input related code.
else if(istype(C, /obj/item/device/paicard) && !src.pai)
+9 -6
View File
@@ -24,6 +24,7 @@
var/access_quartermaster = 0
var/access_hydroponics = 0
var/bot_access_flags = 0 //Bit flags. Selection: SEC_BOT|MULE_BOT|FLOOR_BOT|CLEAN_BOT|MED_BOT
var/spam_enabled = 0 //Enables "Send to All" Option
var/mode = null
var/menu
@@ -37,7 +38,7 @@
var/list/stored_data = list()
var/current_channel
var/obj/machinery/bot/active_bot
var/mob/living/simple_animal/bot/active_bot
var/list/botlist = list()
/obj/item/weapon/cartridge/engineering
@@ -89,6 +90,7 @@
name = "\improper P.R.O.V.E. cartridge"
icon_state = "cart-s"
access_security = 1
spam_enabled = 1
/obj/item/weapon/cartridge/clown
name = "\improper Honkworks 5.0 cartridge"
@@ -215,6 +217,7 @@
access_quartermaster = 1
access_janitor = 1
bot_access_flags = SEC_BOT|MULE_BOT|FLOOR_BOT|CLEAN_BOT|MED_BOT
spam_enabled = 1
/obj/item/weapon/cartridge/captain/New()
..()
@@ -248,7 +251,7 @@
/obj/item/weapon/cartridge/proc/post_status(command, data1, data2)
var/datum/radio_frequency/frequency = radio_controller.return_frequency(1435)
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
if(!frequency) return
@@ -549,7 +552,7 @@ Code:
menu += "<h4>Located Cleanbots:</h4>"
ldat = null
for (var/obj/machinery/bot/cleanbot/B in SSbot.processing)
for (var/mob/living/simple_animal/bot/cleanbot/B in living_mob_list)
var/turf/bl = get_turf(B)
if(bl)
@@ -710,7 +713,7 @@ Code:
/obj/item/weapon/cartridge/proc/bot_control()
var/obj/machinery/bot/Bot
var/mob/living/simple_animal/bot/Bot
// if(!SC)
// menu = "Interlink Error - Please reinsert cartridge."
@@ -723,7 +726,7 @@ Code:
//MULEs!
if(active_bot.bot_type == MULE_BOT)
var/obj/machinery/bot/mulebot/MULE = active_bot
var/mob/living/simple_animal/bot/mulebot/MULE = active_bot
var/atom/Load = MULE.load
menu += "<BR>Current Load: [ !Load ? "<i>none</i>" : "[Load.name] (<A href='byond://?src=\ref[src];mule=unload'><i>unload</i></A>)" ]<BR>"
menu += "Destination: [MULE.destination ? MULE.destination : "<i>None</i>"] (<A href='byond://?src=\ref[src];mule=destination'><i>set</i></A>)<BR>"
@@ -750,7 +753,7 @@ Code:
var/turf/current_turf = get_turf(src)
var/zlevel = current_turf.z
var/botcount = 0
for(Bot in SSbot.processing) //Git da botz
for(Bot in living_mob_list) //Git da botz
if(!Bot.on || Bot.z != zlevel || Bot.remote_disabled || !(bot_access_flags & Bot.bot_type)) //Only non-emagged bots on the same Z-level are detected!
continue //Also, the PDA must have access to the bot type.
menu += "<A href='byond://?src=\ref[src];op=control;bot=\ref[Bot]'><b>[Bot.name]</b> ([Bot.get_mode()])<BR>"
+5 -5
View File
@@ -26,12 +26,12 @@
/obj/item/radio/integrated/signal/New()
..()
if(radio_controller)
if(SSradio)
initialize()
/obj/item/radio/integrated/signal/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
if(SSradio)
SSradio.remove_object(src, frequency)
return ..()
/obj/item/radio/integrated/signal/initialize()
@@ -41,9 +41,9 @@
set_frequency(frequency)
/obj/item/radio/integrated/signal/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency)
radio_connection = SSradio.add_object(src, frequency)
/obj/item/radio/integrated/signal/proc/send_signal(message="ACTIVATE")
@@ -122,7 +122,7 @@
return 0
user.visible_message("<span class='notice'>[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...</span>", "<span class='notice'>You begin resetting [src]...</span>")
playsound(user, 'sound/items/Screwdriver.ogg', 50, 1)
if(!do_after(user, 40, target = user))
if(!do_after(user, 40/I.toolspeed, target = user))
return 0
user.visible_message("<span class='notice'>[user] refastens [src]'s maintenance panel!</span>", "<span class='notice'>You reset [src] to its factory settings!</span>")
playsound(user, 'sound/items/Screwdriver2.ogg', 50, 1)
@@ -98,6 +98,33 @@
user << "<span class='warning'>You need a working light!</span>"
return
if(istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
var/found_good_light = 0
var/replaced_something = 0
for(var/obj/item/I in S.contents)
if(istype(I,/obj/item/weapon/light))
var/obj/item/weapon/light/L = I
if(L.status == LIGHT_OK)
found_good_light = 1
if(src.uses < max_uses)
qdel(L)
AddUses(1)
replaced_something = 1
else
break
if(!found_good_light)
user << "<span class='warning'>\The [S] contains no useable lights!</span>"
return
if(!replaced_something && src.uses == max_uses)
user << "<span class='warning'>\The [src] is full!</span>"
return
user << "<span class='notice'>You fill \the [src] with lights from \the [S]. You have [uses] lights remaining.</span>"
/obj/item/device/lightreplacer/emag_act()
if(!emagged)
Emag()
+2 -1
View File
@@ -15,8 +15,9 @@
throw_speed = 3
materials = list(MAT_METAL=50, MAT_GLASS=20)
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
var/obj/machinery/buffer // simple machine buffer for device linkage
hitsound = 'sound/weapons/tap.ogg'
toolspeed = 1
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
@@ -3,6 +3,7 @@
desc = "A box suited for pizzas."
icon = 'icons/obj/food/containers.dmi'
icon_state = "pizzabox1"
item_state = "pizzabox"
burn_state = 0 //Burnable
var/timer = 10 //Adjustable timer
var/timer_set = 0
@@ -76,7 +77,7 @@
user << "<span class='warning'>You can't see the box well enough to cut the wires out!</span>"
return
user.visible_message("<span class='notice'>[user] starts removing the payload and wires from \the [src].</span>", "<span class='notice'>You start removing the payload and wires from \the [src]...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/I.toolspeed, target = src))
playsound(src, 'sound/items/Wirecutter.ogg', 50, 1, 1)
user.unEquip(src)
user.visible_message("<span class='notice'>[user] removes the insides of \the [src]!</span>", "<span class='notice'>You remove the insides of \the [src].</span>")
@@ -2,7 +2,7 @@
name = "tracking beacon"
desc = "A beacon used by a teleporter."
icon_state = "beacon"
item_state = "signaler"
item_state = "beacon"
var/code = "electronic"
origin_tech = "bluespace=1"
@@ -18,12 +18,12 @@
return (FIRELOSS)
/obj/item/device/electropack/initialize()
if(radio_controller)
radio_controller.add_object(src, frequency, RADIO_CHAT)
if(SSradio)
SSradio.add_object(src, frequency, RADIO_CHAT)
/obj/item/device/electropack/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
if(SSradio)
SSradio.remove_object(src, frequency)
return ..()
/obj/item/device/electropack/attack_hand(mob/user)
@@ -65,9 +65,9 @@
if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
usr.set_machine(src)
if(href_list["freq"])
radio_controller.remove_object(src, frequency)
SSradio.remove_object(src, frequency)
frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
radio_controller.add_object(src, frequency, RADIO_CHAT)
SSradio.add_object(src, frequency, RADIO_CHAT)
else
if(href_list["code"])
code += text2num(href_list["code"])
@@ -222,7 +222,7 @@
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
SSradio.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null
@@ -50,7 +50,7 @@
wires.CutWireIndex(WIRE_TRANSMIT)
secure_radio_connections = new
..()
if(radio_controller)
if(SSradio)
initialize()
@@ -176,10 +176,10 @@
/obj/item/device/radio/Topic(href, href_list)
//..()
if (usr.stat || !on)
if ((usr.stat && !IsAdminGhost(usr)) || !on)
return
if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
if (!(issilicon(usr) || IsAdminGhost(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
usr << browse(null, "window=radio")
return
usr.set_machine(src)
@@ -248,7 +248,7 @@
be prepared to disregard any comments in all of tcomms code. i tried my best to keep them somewhat up-to-date, but eh
*/
//get the frequency you buttface. radios no longer use the radio_controller. confusing for future generations, convenient for me.
//get the frequency you buttface. radios no longer use the SSradio. confusing for future generations, convenient for me.
var/freq
if(channel && channels && channels.len > 0)
if (channel == "department")
@@ -587,7 +587,7 @@
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
SSradio.remove_object(src, radiochannels[ch_name])
secure_radio_connections[ch_name] = null
@@ -269,7 +269,7 @@
/obj/item/device/tape/attackby(obj/item/I, mob/user, params)
if(ruined && istype(I, /obj/item/weapon/screwdriver))
user << "<span class='notice'>You start winding the tape back in...</span>"
if(do_after(user, 120, target = src))
if(do_after(user, 120/I.toolspeed, target = src))
user << "<span class='notice'>You wound the tape back in.</span>"
fix()
@@ -2,6 +2,7 @@
icon = 'icons/obj/assemblies.dmi'
name = "tank transfer valve"
icon_state = "valve_1"
item_state = "ttv"
desc = "Regulates the transfer of air between two tanks"
var/obj/item/weapon/tank/tank_one
var/obj/item/weapon/tank/tank_two
+1
View File
@@ -66,6 +66,7 @@
icon = 'icons/obj/nuke_tools.dmi'
icon_state = "screwdriver_nuke"
item_state = "screwdriver_nuke"
toolspeed = 2
/obj/item/weapon/screwdriver/nuke/New()
//to skip screwdriver icon update
+3 -2
View File
@@ -288,7 +288,7 @@
origin_tech = null
attack_verb = list("attacked", "struck", "hit")
/obj/item/weapon/twohanded/dualsaber/toy/IsShield()
/obj/item/weapon/twohanded/dualsaber/toy/hit_reaction()
return 0
/obj/item/weapon/twohanded/dualsaber/toy/IsReflect()//Stops Toy Dualsabers from reflecting energy projectiles
@@ -325,7 +325,7 @@
var/list/letters = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
var/list/numerals = list("0","1","2","3","4","5","6","7","8","9")
var/list/oriented = list("arrow","body") // These turn to face the same way as the drawer
var/uses = 30 //0 for unlimited uses
var/uses = 30 //-1 or less for unlimited uses
var/instant = 0
var/colourName = "red" //for updateIcon purposes
var/dat
@@ -1127,6 +1127,7 @@
desc = "An adorable stuffed toy that resembles a space carp."
icon = 'icons/obj/toy.dmi'
icon_state = "carpplushie"
item_state = "carp_plushie"
w_class = 2
attack_verb = list("bitten", "eaten", "fin slapped")
burn_state = 0 //Burnable
+27 -49
View File
@@ -34,8 +34,6 @@ RCD
var/list/conf_access = null
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
var/last_configurator = null
var/locked = 1
/* Construction costs */
@@ -82,39 +80,32 @@ RCD
var/t1 = text("")
if (last_configurator)
t1 += "Operator: [last_configurator]<br>"
if (locked)
t1 += "<a href='?src=\ref[src];login=1'>Swipe ID</a><hr>"
if(use_one_access)
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>At least one access required</a><br>"
else
t1 += "<a href='?src=\ref[src];logout=1'>Lock Interface</a><hr>"
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>All accesses required</a><br>"
if(use_one_access)
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>At least one access required</a><br>"
else
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>All accesses required</a><br>"
t1 += "<a href='?src=\ref[src];access=all'>Remove All</a><br>"
t1 += "<a href='?src=\ref[src];access=all'>Remove All</a><br>"
var/accesses = ""
accesses += "<div align='center'><b>Access</b></div>"
accesses += "<table style='width:100%'>"
accesses += "<tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%'><b>[get_region_accesses_name(i)]:</b></td>"
accesses += "</tr><tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%' valign='top'>"
for(var/A in get_region_accesses(i))
if(A in conf_access)
accesses += "<a href='?src=\ref[src];access=[A]'><font color=\"red\">[replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=\ref[src];access=[A]'>[replacetext(get_access_desc(A), " ", "&nbsp")]</a> "
accesses += "<br>"
accesses += "</td>"
accesses += "</tr></table>"
t1 += "<tt>[accesses]</tt>"
var/accesses = ""
accesses += "<div align='center'><b>Access</b></div>"
accesses += "<table style='width:100%'>"
accesses += "<tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%'><b>[get_region_accesses_name(i)]:</b></td>"
accesses += "</tr><tr>"
for(var/i = 1; i <= 7; i++)
accesses += "<td style='width:14%' valign='top'>"
for(var/A in get_region_accesses(i))
if(A in conf_access)
accesses += "<a href='?src=\ref[src];access=[A]'><font color=\"red\">[replacetext(get_access_desc(A), " ", "&nbsp")]</font></a> "
else
accesses += "<a href='?src=\ref[src];access=[A]'>[replacetext(get_access_desc(A), " ", "&nbsp")]</a> "
accesses += "<br>"
accesses += "</td>"
accesses += "</tr></table>"
t1 += "<tt>[accesses]</tt>"
t1 += text("<p><a href='?src=\ref[];close=1'>Close</a></p>\n", src)
@@ -132,17 +123,6 @@ RCD
usr << browse(null, "window=airlock")
return
if (href_list["login"])
if(allowed(usr))
src.locked = 0
src.last_configurator = usr.name
if (locked)
return
if (href_list["logout"])
locked = 1
if (href_list["access"])
toggle_access(href_list["access"])
@@ -364,15 +344,13 @@ RCD
T.electronics = new/obj/item/weapon/electronics/airlock( src.loc )
if(conf_access)
T.electronics.conf_access = conf_access.Copy()
T.electronics.use_one_access = use_one_access
T.electronics.last_configurator = last_configurator
T.electronics.locked = locked
T.electronics.accesses = conf_access.Copy()
T.electronics.one_access = use_one_access
if(T.electronics.use_one_access)
T.req_one_access = T.electronics.conf_access
if(T.electronics.one_access)
T.req_one_access = T.electronics.accesses
else
T.req_access = T.electronics.conf_access
T.req_access = T.electronics.accesses
if(!T.checkForMultipleDoors())
qdel(T)
+21 -6
View File
@@ -6,11 +6,12 @@
/obj/item/weapon/storage/pill_bottle/dice/New()
..()
var/special_die = pick("1","2","00","100")
var/special_die = pick("1","2","fudge","00","100")
if(special_die == "1") new /obj/item/weapon/dice/d1(src)
if(special_die == "2") new /obj/item/weapon/dice/d2(src)
new /obj/item/weapon/dice/d4(src)
new /obj/item/weapon/dice(src)
new /obj/item/weapon/dice/d6(src)
if(special_die == "fudge") new /obj/item/weapon/dice/fudge(src)
new /obj/item/weapon/dice/d8(src)
new /obj/item/weapon/dice/d10(src)
if(special_die == "00") new /obj/item/weapon/dice/d00(src)
@@ -18,14 +19,15 @@
new /obj/item/weapon/dice/d20(src)
if(special_die == "100") new /obj/item/weapon/dice/d100(src)
/obj/item/weapon/dice
name = "d6"
/obj/item/weapon/dice //depreciated d6, use /obj/item/weapon/dice/d6 if you actually want a d6
name = "die"
desc = "A die with six sides. Basic and servicable."
icon = 'icons/obj/dice.dmi'
icon_state = "d6"
w_class = 1
var/sides = 6
var/result = null
var/list/special_faces = list() //entries should match up to sides var if used
/obj/item/weapon/dice/New()
result = rand(1, sides)
@@ -49,6 +51,16 @@
icon_state = "d4"
sides = 4
/obj/item/weapon/dice/d6
name = "d6"
/obj/item/weapon/dice/fudge
name = "fudge die"
desc = "A die with six sides but only three results. Is this a plus or a minus? Your mind is drawing a blank..."
sides = 3 //shhh
icon_state = "fudge"
special_faces = list("minus","blank","plus")
/obj/item/weapon/dice/d8
name = "d8"
desc = "A die with eight sides. It feels... lucky."
@@ -85,6 +97,9 @@
icon_state = "d100"
sides = 100
/obj/item/weapon/dice/d100/update_icon()
return
/obj/item/weapon/dice/attack_self(mob/user)
diceroll(user)
@@ -103,6 +118,8 @@
update_icon()
if(initial(icon_state) == "d00")
result = (result - 1)*10
if(special_faces.len == sides)
result = special_faces[result]
if(user != null) //Dice was rolled in someone's hand
user.visible_message("[user] has thrown [src]. It lands on [result]. [comment]", \
"<span class='notice'>You throw [src]. It lands on [result]. [comment]</span>", \
@@ -120,6 +137,4 @@
/obj/item/weapon/dice/update_icon()
overlays.Cut()
if(sides == 100)
return
overlays += "[src.icon_state][src.result]"
@@ -58,7 +58,9 @@
/obj/item/clothing/suit/jacket/leather/overcoat,
/obj/item/clothing/suit/poncho,
/obj/item/clothing/suit/poncho/green,
/obj/item/clothing/suit/poncho/red)
/obj/item/clothing/suit/poncho/red,
/obj/item/clothing/suit/snowman,
/obj/item/clothing/head/snowman)
gift_type_list += subtypesof(/obj/item/clothing/head/collectable)
gift_type_list += subtypesof(/obj/item/toy) - (((typesof(/obj/item/toy/cards) - /obj/item/toy/cards/deck) + /obj/item/toy/ammo)) //All toys, except for abstract types and syndicate cards.
@@ -9,4 +9,10 @@
/obj/item/weapon/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)
qdel(src)
/obj/item/weapon/grenade/syndieminibomb/concussion
name = "HE Grenade"
desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction."
icon_state = "concussion"
origin_tech = "materials=3;magnets=4;syndicate=2"
@@ -55,15 +55,16 @@
embedded_impact_pain_multiplier = 10
flags = NOSHIELD
origin_tech = "magnets=3;syndicate=4"
block_chance = 50
var/hacked = 0
/obj/item/weapon/melee/energy/sword/New()
if(item_color == null)
item_color = pick("red", "blue", "green", "purple")
/obj/item/weapon/melee/energy/sword/IsShield()
/obj/item/weapon/melee/energy/sword/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return 1
return ..()
return 0
/obj/item/weapon/melee/energy/attack_self(mob/living/carbon/user)
@@ -136,7 +137,7 @@
icon_state = "esaw_0"
item_color = null
/obj/item/weapon/melee/energy/sword/cyborg/saw/IsShield()
/obj/item/weapon/melee/energy/sword/cyborg/saw/hit_reaction()
return 0
/obj/item/weapon/melee/energy/sword/saber
@@ -211,3 +211,6 @@
shard.Consume()
T.ChangeTurf(/turf/space)
T.CalculateAdjacentTurfs()
/obj/item/weapon/melee/supermatter_sword/add_blood()
return
@@ -116,12 +116,11 @@
add_logs(user, target, "fired at", src)
playsound(src.loc, 'sound/weapons/sonic_jackhammer.ogg', 50, 1)
for(var/obj/item/ITD in loadedItems) //Item To Discharge
spawn(0)
loadedItems.Remove(ITD)
loadedWeightClass -= ITD.w_class
ITD.throw_speed = pressureSetting * 2
ITD.loc = get_turf(src)
ITD.throw_at(target, pressureSetting * 5, pressureSetting * 2,user)
loadedItems.Remove(ITD)
loadedWeightClass -= ITD.w_class
ITD.throw_speed = pressureSetting * 2
ITD.loc = get_turf(src)
ITD.throw_at_fast(target, pressureSetting * 5, pressureSetting * 2,user)
if(pressureSetting >= 3 && user)
user.visible_message("<span class='warning'>[user] is thrown down by the force of the cannon!</span>", "<span class='userdanger'>[src] slams into your shoulder, knocking you down!")
user.Weaken(3)
+9 -6
View File
@@ -1,5 +1,6 @@
/obj/item/weapon/shield
name = "shield"
block_chance = 50
/obj/item/weapon/shield/riot
name = "riot shield"
@@ -17,8 +18,6 @@
attack_verb = list("shoved", "bashed")
var/cooldown = 0 //shield bash cooldown. based on world.time
/obj/item/weapon/shield/riot/IsShield()
return 1
/obj/item/weapon/shield/riot/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/melee/baton))
@@ -49,8 +48,10 @@
attack_verb = list("shoved", "bashed")
var/active = 0
/obj/item/weapon/shield/energy/IsShield()
return (active)
/obj/item/weapon/shield/energy/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return ..()
return 0
/obj/item/weapon/shield/energy/IsReflect()
return (active)
@@ -91,8 +92,10 @@
w_class = 3
var/active = 0
/obj/item/weapon/shield/riot/tele/IsShield()
return (active)
/obj/item/weapon/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(active)
return ..()
return 0
/obj/item/weapon/shield/riot/tele/attack_self(mob/living/user)
active = !active
@@ -34,14 +34,14 @@
/obj/item/weapon/storage/secure/attackby(obj/item/weapon/W, mob/user, params)
if(locked)
if (istype(W, /obj/item/weapon/screwdriver))
if (do_after(user, 20, target = src))
if (do_after(user, 20/W.toolspeed, target = src))
src.open =! src.open
user.show_message(text("<span class='notice'>You [] the service panel.</span>", (src.open ? "open" : "close")))
return
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
user.show_message(text("<span class='danger'>Now attempting to reset internal memory, please hold.</span>"), 1)
src.l_hacking = 1
if (do_after(usr, 100, target = src))
if (do_after(usr, 100/W.toolspeed, target = src))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
@@ -104,4 +104,4 @@
/obj/item/weapon/storage/toolbox/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] robusts \himself with the toolbox! It looks like \he's trying to commit suicide..</span>")
return (BRUTELOSS)
return (BRUTELOSS)
@@ -30,21 +30,31 @@
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null
var/list/combined_access = list()
/obj/item/weapon/storage/wallet/remove_from_storage(obj/item/W, atom/new_location)
. = ..(W, new_location)
if(.)
if(W == front_id)
front_id = null
if(istype(W, /obj/item/weapon/card/id))
if(W == front_id)
front_id = null
refreshID()
update_icon()
/obj/item/weapon/storage/wallet/proc/refreshID()
combined_access.Cut()
for(var/obj/item/weapon/card/id/I in contents)
if(!front_id)
front_id = I
update_icon()
combined_access |= I.access
/obj/item/weapon/storage/wallet/handle_item_insertion(obj/item/W, prevent_warning = 0)
. = ..(W, prevent_warning)
if(.)
if(!front_id && istype(W, /obj/item/weapon/card/id))
front_id = W
update_icon()
if(istype(W, /obj/item/weapon/card/id))
refreshID()
/obj/item/weapon/storage/wallet/update_icon()
@@ -69,9 +79,8 @@
return front_id
/obj/item/weapon/storage/wallet/GetAccess()
var/obj/item/I = GetID()
if(I)
return I.GetAccess()
if(combined_access.len)
return combined_access
else
return ..()
@@ -89,4 +98,4 @@
if(item2_type)
new item2_type(src)
if(item3_type)
new item3_type(src)
new item3_type(src)
@@ -14,7 +14,7 @@
name = "oxygen tank"
desc = "A tank of oxygen."
icon_state = "oxygen"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
distribute_pressure = 16
force = 10
+46 -51
View File
@@ -1,4 +1,5 @@
#define TANK_MAX_RELEASE_PRESSURE (3*ONE_ATMOSPHERE)
#define TANK_MAX_RELEASE_PRESSURE (ONE_ATMOSPHERE*3)
#define TANK_MIN_RELEASE_PRESSURE 0
#define TANK_DEFAULT_RELEASE_PRESSURE (ONE_ATMOSPHERE*O2STANDARD)
/obj/item/weapon/tank
@@ -99,7 +100,7 @@
/obj/item/weapon/tank/attackby(obj/item/weapon/W, mob/user, params)
..()
src.add_fingerprint(user)
add_fingerprint(user)
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
@@ -110,16 +111,19 @@
bomb_assemble(W,user)
/obj/item/weapon/tank/attack_self(mob/user)
if (!(src.air_contents))
if (!user)
return
interact(user)
/obj/item/weapon/tank/interact(mob/user)
add_fingerprint(user)
ui_interact(user)
/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/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, force_open = 0)
ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open)
if (!ui)
ui = new(user, src, ui_key, "tanks.tmpl", name, 525, 175, state = inventory_state)
ui.open()
/obj/item/weapon/tank/get_ui_data()
var/mob/living/carbon/location = null
@@ -133,6 +137,7 @@
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["minReleasePressure"] = round(TANK_MIN_RELEASE_PRESSURE)
data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE)
data["valveOpen"] = 0
data["maskConnected"] = 0
@@ -153,51 +158,41 @@
return data
/obj/item/weapon/tank/Topic(href, href_list)
..()
if (usr.stat|| usr.restrained())
if (..())
return
if (src.loc == usr)
usr.set_machine(src)
if (href_list["dist_p"])
if (href_list["dist_p"] == "reset")
src.distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
else if (href_list["dist_p"] == "max")
src.distribute_pressure = TANK_MAX_RELEASE_PRESSURE
else
var/cp = text2num(href_list["dist_p"])
src.distribute_pressure += cp
src.distribute_pressure = min(max(round(src.distribute_pressure), 0), 3*ONE_ATMOSPHERE)
if (href_list["stat"])
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
if (href_list["dist_p"])
if (href_list["dist_p"] == "custom")
var/custom = input(usr, "What rate do you set the regulator to? The dial reads from 0 to [TANK_MAX_RELEASE_PRESSURE].") as null|num
if(isnum(custom))
href_list["dist_p"] = custom
.()
else if (href_list["dist_p"] == "reset")
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
else if (href_list["dist_p"] == "min")
distribute_pressure = TANK_MIN_RELEASE_PRESSURE
else if (href_list["dist_p"] == "max")
distribute_pressure = TANK_MAX_RELEASE_PRESSURE
else
distribute_pressure = text2num(href_list["dist_p"])
distribute_pressure = min(max(round(distribute_pressure), TANK_MIN_RELEASE_PRESSURE), TANK_MAX_RELEASE_PRESSURE)
if (href_list["stat"])
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
location.internals.icon_state = "internal0"
usr << "<span class='notice'>You close the tank release valve.</span>"
if (location.internals)
location.internals.icon_state = "internal0"
usr << "<span class='notice'>You close the tank release valve.</span>"
else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src
usr << "<span class='notice'>You open \the [src] valve.</span>"
if (location.internals)
location.internals.icon_state = "internal0"
location.internals.icon_state = "internal1"
else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src
usr << "<span class='notice'>You open \the [src] valve.</span>"
if (location.internals)
location.internals.icon_state = "internal1"
else
usr << "<span class='warning'>You need something to connect to \the [src]!</span>"
src.add_fingerprint(usr)
/*
* the following is needed for a tank lying on the floor. But currently we restrict players to use not weared tanks as intrals. --rastaf
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
*/
src.attack_self(usr)
else
usr << browse(null, "window=tank")
return
return
usr << "<span class='warning'>You need something to connect to \the [src]!</span>"
/obj/item/weapon/tank/remove_air(amount)
return air_contents.remove(amount)
@@ -238,8 +233,8 @@
var/pressure = air_contents.return_pressure()
if(pressure > TANK_FRAGMENT_PRESSURE)
if(!istype(src.loc,/obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
message_admins("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! Last key to touch the tank was [src.fingerprintslast].")
//world << "\blue[x],[y] tank is exploding: [pressure] kPa"
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
@@ -25,8 +25,8 @@
/obj/item/weapon/watertank/verb/toggle_mister()
set name = "Toggle Mister"
set category = "Object"
if (usr.get_item_by_slot(slot_back) != src)
usr << "<span class='warning'>The watertank needs to be on your back to use!</span>"
if (usr.get_item_by_slot(usr.getWatertankSlot()) != src)
usr << "<span class='warning'>The watertank must be worn properly to use!</span>"
return
if(usr.incapacitated())
return
@@ -75,8 +75,8 @@
..()
/obj/item/weapon/watertank/MouseDrop(obj/over_object)
if(ishuman(src.loc))
var/mob/living/carbon/human/H = src.loc
var/mob/H = src.loc
if(istype(H))
switch(over_object.name)
if("r_hand")
if(H.r_hand)
@@ -98,6 +98,12 @@
return
..()
/mob/proc/getWatertankSlot()
return slot_back
/mob/living/simple_animal/drone/getWatertankSlot()
return slot_drone_storage
// This mister item is intended as an extension of the watertank and always attached to it.
// Therefore, it's designed to be "locked" to the player's hands or extended back onto
// the watertank backpack. Allowing it to be placed elsewhere or created without a parent
@@ -145,9 +145,9 @@ Frequency:
for(var/obj/machinery/computer/teleporter/com in machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[com.id] (Active)"] = com.target
L["[get_area(com.target)] (Active)"] = com.target
else
L["[com.id] (Inactive)"] = com.target
L["[get_area(com.target)] (Inactive)"] = com.target
var/list/turfs = list( )
for(var/turf/T in ultra_range(10, orange=1))
if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb
@@ -0,0 +1,60 @@
/obj/item/weapon/melee/baton/cattleprod/teleprod
name = "teleprod"
desc = "A prod with a bluespace crystal on the end. The crystal doesn't look too fun to touch."
icon_state = "teleprod_nocell"
item_state = "teleprod"
origin_tech = "combat=2;bluespace=4;materials=3"
/obj/item/weapon/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit
..()
if(status && user.disabilities & CLUMSY && prob(50))
user.visible_message("<span class='danger'>[user] accidentally hits themself with [src]!</span>", \
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
user.Weaken(stunforce*3)
deductcharge(hitcost)
do_teleport(user, get_turf(user), 50)//honk honk
return
else
if(status)
if(!istype(M) && M.anchored)
return .
else
do_teleport(M, get_turf(M), 15)
/obj/item/weapon/melee/baton/cattleprod/attackby(obj/item/I, mob/user, params)//handles sticking a crystal onto a stunprod to make a teleprod
..()
if(istype(I, /obj/item/weapon/ore/bluespace_crystal))
if(!bcell)
var/obj/item/weapon/melee/baton/cattleprod/teleprod/S = new /obj/item/weapon/melee/baton/cattleprod/teleprod
if(!remove_item_from_storage(user))
user.unEquip(src)
user.unEquip(I)
user.put_in_hands(S)
user << "<span class='notice'>You clamp the bluespace crystal securely with the wirecutters.</span>"
I.loc = S//places the crystal into the contents of the prod for later removal
qdel(src)
else
user.visible_message("<span class='warning'>You can't install the crystal onto the stunprod while it has a powercell installed!</span>")
/obj/item/weapon/melee/baton/cattleprod/teleprod/attack_self(mob/user, obj/item/I)//handles removing the bluespace crystal + turning the prod on and off
if(bcell && bcell.charge > hitcost)
status = !status
user << "<span class='notice'>[src] is now [status ? "on" : "off"].</span>"
playsound(loc, "sparks", 75, 1, -1)
else
status = 0
if(!bcell)
var/obj/item/weapon/melee/baton/cattleprod/S = new /obj/item/weapon/melee/baton/cattleprod
if(!remove_item_from_storage(user))
user.unEquip(src)
var/turf/floorloc = get_turf(user)
floorloc.contents += contents//drops the contents of the prod (the only content should be the crystal) at the user's feet
user.unEquip(I)
user.put_in_hands(S)
user << "<span class='notice'>You carefully remove the bluespace crystal from the teleprod.</span>"
qdel(I)
qdel(src)
else
user << "<span class='warning'>[src] is out of charge.</span>"
update_icon()
add_fingerprint(user)
+7
View File
@@ -27,6 +27,7 @@
materials = list(MAT_METAL=150)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
/obj/item/weapon/wrench/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beating \himself to death with the [src.name]! It looks like \he's trying to commit suicide.</span>")
@@ -51,6 +52,7 @@
materials = list(MAT_METAL=75)
attack_verb = list("stabbed")
hitsound = 'sound/weapons/bladeslice.ogg'
toolspeed = 1
/obj/item/weapon/screwdriver/suicide_act(mob/user)
user.visible_message(pick("<span class='suicide'>[user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.</span>", \
@@ -114,6 +116,7 @@
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
hitsound = 'sound/items/Wirecutter.ogg'
toolspeed = 1
/obj/item/weapon/wirecutters/New(loc, var/param_color = null)
..()
@@ -165,6 +168,7 @@
var/can_off_process = 0
var/light_intensity = 2 //how powerful the emitted light is when used.
heat = 3800
toolspeed = 1
/obj/item/weapon/weldingtool/New()
..()
@@ -429,6 +433,7 @@
change_icons = 0
can_off_process = 1
light_intensity = 1
toolspeed = 2
//Proc to make the experimental welder generate fuel, optimized as fuck -Sieve
@@ -465,6 +470,7 @@
materials = list(MAT_METAL=50)
origin_tech = "engineering=1"
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
/obj/item/weapon/crowbar/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beating \himself to death with the [src.name]! It looks like \he's trying to commit suicide.</span>")
@@ -485,3 +491,4 @@
throw_range = 3
materials = list(MAT_METAL=70)
icon_state = "crowbar_large"
toolspeed = 2
+20 -19
View File
@@ -115,13 +115,16 @@
/obj/item/weapon/twohanded/offhand/wield()
qdel(src)
/obj/item/weapon/twohanded/offhand/IsShield()//if the actual twohanded weapon is a shield, we count as a shield too!
/obj/item/weapon/twohanded/offhand/hit_reaction()//if the actual twohanded weapon is a shield, we count as a shield too!
var/mob/user = loc
if(!istype(user)) return 0
if(!istype(user))
return 0
var/obj/item/I = user.get_active_hand()
if(I == src) I = user.get_inactive_hand()
if(!I) return 0
return I.IsShield()
if(I == src)
I = user.get_inactive_hand()
if(!I)
return 0
return I.hit_reaction()
///////////Two hand required objects///////////////
//This is for objects that require two hands to even pick up
@@ -177,17 +180,15 @@
/obj/item/weapon/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity) return
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
if(istype(A,/obj/structure/window)) //should just make a window.Break() proc but couldn't bother with it
if(wielded) //destroys windows and grilles in one hit
if(istype(A,/obj/structure/window))
var/obj/structure/window/W = A
new /obj/item/weapon/shard( W.loc )
if(W.reinf) new /obj/item/stack/rods( W.loc)
if (W.dir == SOUTHWEST)
new /obj/item/weapon/shard( W.loc )
if(W.reinf) new /obj/item/stack/rods( W.loc)
qdel(A)
W.spawnfragments() // this will qdel and spawn shards
else if(istype(A,/obj/structure/grille))
var/obj/structure/grille/G = A
G.health = -6
G.destroyed += prob(25) // If this is set, healthcheck will completely remove the grille
G.healthcheck()
/*
@@ -211,6 +212,7 @@
origin_tech = "magnets=3;syndicate=4"
item_color = "green"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
var/hacked = 0
/obj/item/weapon/twohanded/dualsaber/New()
@@ -242,11 +244,10 @@
else
user.adjustStaminaLoss(25)
/obj/item/weapon/twohanded/dualsaber/IsShield()
/obj/item/weapon/twohanded/dualsaber/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance)
if(wielded)
return 1
else
return 0
return ..()
return 0
/obj/item/weapon/twohanded/dualsaber/attack_hulk(mob/living/carbon/human/user) //In case thats just so happens that it is still activated on the groud, prevents hulk from picking it up
if(wielded)
@@ -63,8 +63,8 @@
/obj/item/weapon/vending_refill/autodrobe
machine_name = "AutoDrobe"
icon_state = "refill_costume"
charges = list(25, 2, 3)// of 75 standard, 6 contraband, 9 premium
init_charges = list(25, 2, 3)
charges = list(27, 2, 3)// of 75 standard, 6 contraband, 9 premium
init_charges = list(27, 2, 3)
/obj/item/weapon/vending_refill/clothing
machine_name = "ClothesMate"
+15 -18
View File
@@ -64,9 +64,7 @@
throwforce = 10
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/claymore/IsShield()
return 1
block_chance = 50
/obj/item/weapon/claymore/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>")
@@ -84,6 +82,7 @@
w_class = 3
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
/obj/item/weapon/katana/cursed
slot_flags = null
@@ -92,9 +91,6 @@
user.visible_message("<span class='suicide'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>")
return(BRUTELOSS)
/obj/item/weapon/katana/IsShield()
return 1
/obj/item/weapon/wirerod
name = "wired rod"
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
@@ -276,15 +272,16 @@
return (OXYLOSS)
/obj/item/weapon/mounted_chainsaw
name = "mounted chainsaw"
desc = "A chainsaw that has replaced your arm."
icon_state = "chainsaw_on"
flags = ABSTRACT | NODROP
w_class = 5.0
force = 21
throwforce = 0
throw_range = 0
throw_speed = 0
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = "sound/weapons/chainsawhit.ogg"
name = "mounted chainsaw"
desc = "A chainsaw that has replaced your arm."
icon_state = "chainsaw_on"
item_state = "mounted_chainsaw"
flags = ABSTRACT | NODROP
w_class = 5.0
force = 21
throwforce = 0
throw_range = 0
throw_speed = 0
sharpness = IS_SHARP
attack_verb = list("sawed", "torn", "cut", "chopped", "diced")
hitsound = "sound/weapons/chainsawhit.ogg"
+6 -1
View File
@@ -60,7 +60,7 @@
if ((M.client && M.machine == src))
is_in_use = 1
src.attack_hand(M)
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot) || IsAdminGhost(usr))
if (!(usr in nearby))
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
is_in_use = 1
@@ -91,6 +91,11 @@
if(!ai_in_use && !is_in_use)
in_use = 0
/obj/attack_ghost(mob/user)
if(ui_interact(user) != -1)
return
..()
/obj/proc/interact(mob/user)
return
+2
View File
@@ -12,6 +12,8 @@
cameranet.updateVisibility(src)
/obj/structure/blob_act()
if(!density)
qdel(src)
if(prob(50))
qdel(src)
+3 -3
View File
@@ -16,7 +16,7 @@
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice'>You start wrenching the frame into place...</span>"
if(do_after(user, 20, target = src))
if(do_after(user, 20/P.toolspeed, target = src))
user << "<span class='notice'>You wrench the frame into place.</span>"
anchored = 1
state = 1
@@ -27,7 +27,7 @@
return
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
user << "<span class='notice'>You start to deconstruct the frame...</span>"
if(do_after(user, 20, target = src))
if(do_after(user, 20/P.toolspeed, target = src))
if(!src || !WT.remove_fuel(0, user)) return
user << "<span class='notice'>You deconstruct the frame.</span>"
new /obj/item/stack/sheet/plasteel( loc, 4)
@@ -36,7 +36,7 @@
if(istype(P, /obj/item/weapon/wrench))
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice'>You start to unfasten the frame...</span>"
if(do_after(user, 20, target = src))
if(do_after(user, 20/P.toolspeed, target = src))
user << "<span class='notice'>You unfasten the frame.</span>"
anchored = 0
state = 0
@@ -53,13 +53,12 @@
return
/obj/structure/bed/blob_act()
if(prob(75))
if(buildstacktype)
new buildstacktype(loc, buildstackamount)
qdel(src)
if(buildstacktype)
new buildstacktype(loc, buildstackamount)
qdel(src)
/obj/structure/bed/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
if(istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(buildstacktype)
new buildstacktype(loc, buildstackamount)
@@ -165,7 +165,8 @@
/obj/structure/closet/ex_act(severity, target)
contents_explosion(severity, target)
new material_drop(loc)
if(loc && ispath(material_drop) && !(flags & NODECONSTRUCT))
new material_drop(loc)
dump_contents()
qdel(src)
..()
@@ -213,7 +214,7 @@
return
user << "<span class='notice'>You begin cutting \the [src] apart...</span>"
playsound(loc, cutting_sound, 40, 1)
if(do_after(user,40,5,1, target = src))
if(do_after(user,40/W.toolspeed,5,1, target = src))
if( !opened || !istype(src, /obj/structure/closet) || !user || !WT || !WT.isOn() || !user.loc )
return
playsound(loc, cutting_sound, 50, 1)
@@ -107,6 +107,8 @@
new /obj/item/clothing/suit/hooded/chaplain_hoodie(src)
new /obj/item/clothing/suit/holidaypriest(src)
new /obj/item/weapon/storage/backpack/cultpack (src)
new /obj/item/clothing/head/helmet/knight/templar(src)
new /obj/item/clothing/suit/armor/riot/knight/templar(src)
new /obj/item/weapon/storage/fancy/candle_box(src)
new /obj/item/weapon/storage/fancy/candle_box(src)
return
@@ -5,7 +5,7 @@
/obj/structure/closet/secure_closet/quartermaster/New()
..()
new /obj/item/clothing/cloak/qm(src)
new /obj/item/clothing/suit/cloak/qm(src)
new /obj/item/clothing/under/rank/cargo(src)
new /obj/item/clothing/shoes/sneakers/brown(src)
new /obj/item/device/radio/headset/headset_cargo(src)
@@ -5,7 +5,7 @@
/obj/structure/closet/secure_closet/engineering_chief/New()
..()
new /obj/item/clothing/cloak/ce(src)
new /obj/item/clothing/suit/cloak/ce(src)
new /obj/item/clothing/under/rank/chief_engineer(src)
new /obj/item/clothing/head/hardhat/white(src)
new /obj/item/clothing/head/welding(src)
@@ -58,7 +58,7 @@
/obj/structure/closet/secure_closet/CMO/New()
..()
new /obj/item/clothing/cloak/cmo(src)
new /obj/item/clothing/suit/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)
@@ -47,7 +47,7 @@
new /obj/item/weapon/storage/firstaid/brute(src)
new /obj/item/weapon/storage/firstaid/regular(src)
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
new /obj/machinery/bot/medbot(src)
new /mob/living/simple_animal/bot/medbot(src)
/obj/structure/closet/secure_closet/ertEngi
name = "engineer closet"
@@ -5,7 +5,7 @@
/obj/structure/closet/secure_closet/RD/New()
..()
new /obj/item/clothing/cloak/rd(src)
new /obj/item/clothing/suit/cloak/rd(src)
new /obj/item/clothing/suit/bio_suit/scientist(src)
new /obj/item/clothing/head/bio_hood/scientist(src)
new /obj/item/clothing/suit/toggle/labcoat(src)
@@ -10,7 +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/clothing/suit/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)
@@ -57,7 +57,7 @@
/obj/structure/closet/secure_closet/hos/New()
..()
new /obj/item/clothing/cloak/hos(src)
new /obj/item/clothing/suit/cloak/hos(src)
new /obj/item/weapon/cartridge/hos(src)
new /obj/item/device/radio/headset/heads/hos(src)
new /obj/item/clothing/under/hosparadefem(src)
+5 -5
View File
@@ -126,7 +126,7 @@
qdel(src)
return
user << "<span class='notice'>You start to [open ? "close":"open"] the [src]</span>"
if(do_after(user, 20, target = src))
if(do_after(user, 20/W.toolspeed, target = src))
user << "<span class='notice'>You [open ? "close":"open"] the [src]</span>"
open = !open
update_icon()
@@ -187,7 +187,7 @@
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You start disassembling [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30, target = src))
if(do_after(user, 30/I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
new /obj/item/stack/sheet/mineral/wood(get_turf(src))
qdel(src)
@@ -212,10 +212,10 @@
if(electronics)
electronics.loc = display
display.electronics = electronics
if(electronics.use_one_access)
display.req_one_access = electronics.conf_access
if(electronics.one_access)
display.req_one_access = electronics.accesses
else
display.req_access = electronics.conf_access
display.req_access = electronics.accesses
qdel(src)
return
return
@@ -460,7 +460,7 @@
"You start to disassemble the airlock assembly...")
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if( !WT.isOn() )
return
user << "<span class='notice'>You disassemble the airlock assembly.</span>"
@@ -492,7 +492,7 @@
"<span class='notice'>You start to secure the airlock assembly to the floor...</span>", \
"<span class='italics'>You hear wrenching.</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if( src.anchored )
return
user << "<span class='notice'>You secure the airlock assembly.</span>"
@@ -506,7 +506,7 @@
user.visible_message("[user] unsecures the airlock assembly from the floor.", \
"<span class='notice'>You start to unsecure the airlock assembly from the floor...</span>", \
"<span class='italics'>You hear wrenching.</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if( !src.anchored )
return
user << "<span class='notice'>You unsecure the airlock assembly.</span>"
@@ -532,7 +532,7 @@
user.visible_message("[user] cuts the wires from the airlock assembly.", \
"<span class='notice'>You start to cut the wires from the airlock assembly...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if( src.state != 1 )
return
user << "<span class='notice'>You cut the wires from the airlock assembly.</span>"
@@ -562,7 +562,7 @@
user.visible_message("[user] removes the electronics from the airlock assembly.", \
"<span class='notice'>You start to remove electronics from the airlock assembly...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if( src.state != 2 )
return
user << "<span class='notice'>You remove the airlock electronics.</span>"
@@ -625,7 +625,7 @@
user.visible_message("[user] finishes the airlock.", \
"<span class='notice'>You start finishing the airlock...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(src.loc && state == 2)
user << "<span class='notice'>You finish the airlock.</span>"
var/obj/machinery/door/airlock/door
@@ -636,10 +636,10 @@
//door.req_access = src.req_access
door.electronics = src.electronics
door.heat_proof = src.heat_proof_finished
if(src.electronics.use_one_access)
door.req_one_access = src.electronics.conf_access
if(src.electronics.one_access)
door.req_one_access = src.electronics.accesses
else
door.req_access = src.electronics.conf_access
door.req_access = src.electronics.accesses
if(created_name)
door.name = created_name
src.electronics.loc = door
+2 -2
View File
@@ -69,9 +69,9 @@
update_icon()
/obj/structure/fireaxecabinet/blob_act()
if(prob(75) && fireaxe)
if(fireaxe)
fireaxe.loc = src.loc
qdel(src)
qdel(src)
/obj/structure/fireaxecabinet/attack_hand(mob/user)
if(open || glass_hp <= 0)
+7 -7
View File
@@ -20,7 +20,7 @@
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("<span class='warning'>[user] disassembles the girder.</span>", \
"<span class='notice'>You start to disassemble the girder...</span>", "You hear clanking and banging noises.")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(state != GIRDER_DISPLACED)
return
state = GIRDER_DISASSEMBLED
@@ -31,7 +31,7 @@
else if(state == GIRDER_REINF)
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
user << "<span class='notice'>You start unsecuring support struts...</span>"
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(state != GIRDER_REINF)
return
user << "<span class='notice'>You unsecure the support struts.</span>"
@@ -44,7 +44,7 @@
return
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "<span class='notice'>You start securing the girder...</span>"
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
user << "<span class='notice'>You secure the girder.</span>"
var/obj/structure/girder/G = new (loc)
transfer_fingerprints_to(G)
@@ -52,7 +52,7 @@
else if(state == GIRDER_NORMAL)
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user << "<span class='notice'>You start unsecuring the girder...</span>"
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
user << "<span class='notice'>You unsecure the girder.</span>"
var/obj/structure/girder/displaced/D = new (loc)
transfer_fingerprints_to(D)
@@ -77,7 +77,7 @@
else if(istype(W, /obj/item/weapon/wirecutters) && state == GIRDER_REINF_STRUTS)
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user << "<span class='notice'>You start removing support struts...</span>"
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
user << "<span class='notice'>You remove the support struts.</span>"
new /obj/item/stack/sheet/plasteel(get_turf(src))
var/obj/structure/girder/G = new (loc)
@@ -125,7 +125,7 @@
transfer_fingerprints_to(T)
qdel(src)
return
if(!istype(W,/obj/item/stack/sheet))
return
@@ -322,7 +322,7 @@
if(WT.remove_fuel(0,user))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
user << "<span class='notice'>You start slicing apart the girder...</span>"
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if( !WT.isOn() )
return
user << "<span class='notice'>You slice apart the girder.</span>"
+7 -5
View File
@@ -121,9 +121,10 @@
/obj/structure/grille/Deconstruct()
if(!loc) //if already qdel'd somehow, we do nothing
return
transfer_fingerprints_to(stored)
var/turf/T = loc
stored.loc = T
if(!(flags&NODECONSTRUCT))
transfer_fingerprints_to(stored)
var/turf/T = loc
stored.loc = T
..()
/obj/structure/grille/proc/Break()
@@ -131,8 +132,9 @@
density = 0
destroyed = 1
stored.amount = 1
var/obj/item/stack/rods/newrods = new(loc)
transfer_fingerprints_to(newrods)
if(!(flags&NODECONSTRUCT))
var/obj/item/stack/rods/newrods = new(loc)
transfer_fingerprints_to(newrods)
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
+1 -1
View File
@@ -80,7 +80,7 @@
mybag.attackby(I, user)
else if(istype(I, /obj/item/weapon/crowbar))
user.visible_message("[user] begins to empty the contents of [src].", "<span class='notice'>You begin to empty the contents of [src]...</span>")
if(do_after(user, 30, target = src))
if(do_after(user, 30/I.toolspeed, target = src))
usr << "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>"
reagents.reaction(src.loc)
src.reagents.clear_reagents()
@@ -40,7 +40,7 @@
if(istype(I, /obj/item/weapon/crowbar))
if(!src.buckled_mob)
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
if(do_after(user, 20, target = src))
if(do_after(user, 20/I.toolspeed, target = src))
user << "<span class='notice'>You pry the spikes out of the frame.</span>"
new /obj/item/stack/rods(loc, 4)
var/obj/F = new /obj/structure/kitchenspike_frame(src.loc,)
+45 -21
View File
@@ -8,6 +8,11 @@
var/obj/structure/ladder/down = null //the ladder below this one
var/obj/structure/ladder/up = null //the ladder above this one
/obj/structure/ladder/unbreakable //mostly useful for awaymissions to prevent halting progress in a mission
name = "sturdy ladder"
desc = "An extremely sturdy metal ladder."
/obj/structure/ladder/New()
spawn(8)
for(var/obj/structure/ladder/L in world)
@@ -36,38 +41,57 @@
else //wtf make your ladders properly assholes
icon_state = "ladder00"
/obj/structure/ladder/attack_hand(mob/user)
/obj/structure/ladder/proc/go_up(mob/user,is_ghost)
if(!is_ghost)
show_fluff_message(1,user)
up.add_fingerprint(user)
user.loc = get_turf(up)
/obj/structure/ladder/proc/go_down(mob/user,is_ghost)
if(!is_ghost)
show_fluff_message(0,user)
down.add_fingerprint(user)
user.loc = get_turf(down)
/obj/structure/ladder/proc/use(mob/user,is_ghost=0)
if(up && down)
switch( alert("Go up or down the ladder?", "Ladder", "Up", "Down", "Cancel") )
if("Up")
user.visible_message("[user] climbs up \the [src].", \
"<span class='notice'>You climb up \the [src].</span>")
user.loc = get_turf(up)
up.add_fingerprint(user)
go_up(user,is_ghost)
if("Down")
user.visible_message("[user] climbs down \the [src].", \
"<span class='notice'>You climb down \the [src].</span>")
user.loc = get_turf(down)
down.add_fingerprint(user)
go_down(user,is_ghost)
if("Cancel")
return
else if(up)
user.visible_message("[user] climbs up \the [src].", \
"<span class='notice'>You climb up \the [src].</span>")
user.loc = get_turf(up)
up.add_fingerprint(user)
go_up(user,is_ghost)
else if(down)
user.visible_message("[user] climbs down \the [src].", \
"<span class='notice'>You climb down \the [src].</span>")
user.loc = get_turf(down)
down.add_fingerprint(user)
go_down(user,is_ghost)
if(!is_ghost)
add_fingerprint(user)
add_fingerprint(user)
/obj/structure/ladder/attack_hand(mob/user)
if(can_use(user))
use(user)
/obj/structure/ladder/attack_paw(mob/user)
return attack_hand(user)
/obj/structure/ladder/attackby(obj/item/weapon/W, mob/user, params)
return attack_hand(user)
return attack_hand(user)
/obj/structure/ladder/attack_ghost(mob/dead/observer/user)
use(user,1)
/obj/structure/ladder/proc/show_fluff_message(up,mob/user)
if(up)
user.visible_message("[user] climbs up \the [src].","<span class='notice'>You climb up \the [src].</span>")
else
user.visible_message("[user] climbs down \the [src].","<span class='notice'>You climb down \the [src].</span>")
/obj/structure/ladder/proc/can_use(mob/user)
return 1
/obj/structure/ladder/unbreakable/Destroy()
return QDEL_HINT_LETMELIVE
-1
View File
@@ -24,7 +24,6 @@
stored = new/obj/item/stack/rods(src)
/obj/structure/lattice/blob_act()
qdel(src)
return
/obj/structure/lattice/ex_act(severity, target)
+1 -1
View File
@@ -70,7 +70,7 @@
if(WT.remove_fuel(0, user))
user << "<span class='notice'>You begin repairing [src]...</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, 10, target = src))
if(do_after(user, 10/I.toolspeed, target = src))
if(!user || !WT || !WT.isOn())
return
user << "<span class='notice'>You repair [src].</span>"
+2 -2
View File
@@ -349,7 +349,7 @@
if (!anchored && !isinspace())
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice'> You begin to tighten \the [src] to the floor...</span>"
if (do_after(user, 20, target = src))
if (do_after(user, 20/O.toolspeed, target = src))
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'>You tighten \the [src]'s casters. Now it can be played again.</span>", \
@@ -358,7 +358,7 @@
else if(anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "<span class='notice'> You begin to loosen \the [src]'s casters...</span>"
if (do_after(user, 40, target = src))
if (do_after(user, 40/O.toolspeed, target = src))
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'>You loosen \the [src]. Now it can be pulled somewhere else.</span>", \
+3 -1
View File
@@ -22,7 +22,9 @@
else if(istype(A, /mob/living)) // You Shall Not Pass!
var/mob/living/M = A
if(M.buckled && istype(M.buckled, /obj/machinery/bot/mulebot)) // mulebot passenger gets a free pass.
if(istype(A,/mob/living/simple_animal/bot/mulebot)) //mulebots can pass
return 1
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return 1
if(!M.lying && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
return 0
+5 -5
View File
@@ -5,7 +5,7 @@
desc = "An angled mirror for reflecting lasers. This one does so at a 90 degree angle."
anchored = 0
density = 1
layer = 2
layer = 2.9
var/finished = 0
var/admin = 0 //Can't be rotated or deconstructed
@@ -41,7 +41,7 @@
if(istype(W, /obj/item/weapon/wrench))
if(anchored)
user << "Unweld the [src] first!"
if(do_after(user, 80, target = src))
if(do_after(user, 80/W.toolspeed, target = src))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "You dismantle the [src]."
qdel(src)
@@ -54,7 +54,7 @@
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if (do_after(user,20, target = src))
if (do_after(user,20/W.toolspeed, target = src))
if(!src || !WT.isOn())
return
anchored = 1
@@ -65,7 +65,7 @@
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='italics'>You hear welding.</span>")
if (do_after(user,20, target = src))
if (do_after(user,20/W.toolspeed, target = src))
if(!src || !WT.isOn())
return
anchored = 0
@@ -203,4 +203,4 @@
if(admin)
return
else
..()
..()
+1 -1
View File
@@ -22,7 +22,7 @@
user.visible_message("<span class='notice'>[user] starts removing [src]...</span>", \
"<span class='notice'>You start unfastening [src].</span>")
playsound(src, 'sound/items/Ratchet.ogg', 50, 1)
if(!do_after(user, 30, target = src))
if(!do_after(user, 30/O.toolspeed, target = src))
return
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] unfastens [src].</span>", \
+3 -3
View File
@@ -24,7 +24,7 @@
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] is loosening the [name]'s bolts.", \
"<span class='notice'>You are loosening the [name]'s bolts...</span>")
if(do_after(user,40, target = src))
if(do_after(user,40/W.toolspeed, target = src))
if(!src.loc || !anchored)
return
user.visible_message("[user] loosened the [name]'s bolts!", \
@@ -37,7 +37,7 @@
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] is securing the [name]'s bolts...", \
"<span class='notice'>You are securing the [name]'s bolts...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(!src.loc || anchored)
return
user.visible_message("[user] has secured the [name]'s bolts.", \
@@ -68,7 +68,7 @@
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
user.visible_message("[user] is slicing apart the [name].", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(!src.loc)
return
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
+1 -1
View File
@@ -24,7 +24,7 @@
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You start disassembling [src]...</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 30, target = src))
if(do_after(user, 30/I.toolspeed, target = src))
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
for(var/i = 1, i <= framestackamount, i++)
new framestack(get_turf(src))
+25 -23
View File
@@ -83,7 +83,7 @@
if(tableclimber && tableclimber != user)
tableclimber.Weaken(2)
tableclimber.visible_message("<span class='warning'>[tableclimber.name] has been knocked off the table", "You're knocked off the table!", "You see [tableclimber.name] get knocked off the table</span>")
..()
/obj/structure/table/attack_tk() // no telehulk sorry
return
@@ -100,6 +100,7 @@
return !density
/obj/structure/table/MouseDrop_T(atom/movable/O, mob/user)
..()
if(ismob(O) && user == O && ishuman(user))
if(user.canmove)
climb_table(user)
@@ -146,26 +147,26 @@
if (istype(I, /obj/item/weapon/grab))
tablepush(I, user)
return
if (istype(I, /obj/item/weapon/screwdriver))
if(istype(src, /obj/structure/table/reinforced))
var/obj/structure/table/reinforced/RT = src
if(RT.status == 1)
if(!(flags&NODECONSTRUCT))
if (istype(I, /obj/item/weapon/screwdriver))
if(istype(src, /obj/structure/table/reinforced))
var/obj/structure/table/reinforced/RT = src
if(RT.status == 1)
table_destroy(2, user)
return
else
table_destroy(2, user)
return
else
table_destroy(2, user)
return
if (istype(I, /obj/item/weapon/wrench))
if(istype(src, /obj/structure/table/reinforced))
var/obj/structure/table/reinforced/RT = src
if(RT.status == 1)
if (istype(I, /obj/item/weapon/wrench))
if(istype(src, /obj/structure/table/reinforced))
var/obj/structure/table/reinforced/RT = src
if(RT.status == 1)
table_destroy(3, user)
return
else
table_destroy(3, user)
return
else
table_destroy(3, user)
return
if (istype(I, /obj/item/weapon/storage/bag/tray))
var/obj/item/weapon/storage/bag/tray/T = I
@@ -204,7 +205,7 @@
#define TBL_DECONSTRUCT 3
/obj/structure/table/proc/table_destroy(destroy_type, mob/user)
if(!deconstructable)
if(!deconstructable || (flags&NODECONSTRUCT))
return
if(destroy_type == TBL_DESTROY)
@@ -339,14 +340,14 @@
if(src.status == 2)
user << "<span class='notice'>You start weakening the reinforced table...</span>"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if (do_after(user, 50, target = src))
if (do_after(user, 50/W.toolspeed, target = src))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You weaken the table.</span>"
src.status = 1
else
user << "<span class='notice'>You start strengthening the reinforced table...</span>"
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if (do_after(user, 50, target = src))
if (do_after(user, 50/W.toolspeed, target = src))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You strengthen the table.</span>"
src.status = 2
@@ -461,7 +462,7 @@
return
/obj/structure/rack/attackby(obj/item/weapon/W, mob/user, params)
if (istype(W, /obj/item/weapon/wrench))
if (istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
rack_destroy()
return
@@ -516,9 +517,10 @@
*/
/obj/structure/rack/proc/rack_destroy()
density = 0
var/obj/item/weapon/rack_parts/newparts = new(loc)
transfer_fingerprints_to(newparts)
if(!(flags&NODECONSTRUCT))
density = 0
var/obj/item/weapon/rack_parts/newparts = new(loc)
transfer_fingerprints_to(newparts)
qdel(src)
@@ -46,7 +46,7 @@ obj/structure/transit_tube/ex_act(severity, target)
return
user.visible_message("[user] starts to deattach \the [src].", "<span class='notice'>You start to deattach the [name]...</span>")
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 35, target = src))
if(do_after(user, 35/W.toolspeed, target = src))
user << "<span class='notice'>You deattach the [name].</span>"
var/obj/structure/R = new tube_construction(src.loc)
R.icon_state = src.icon_state
@@ -95,7 +95,7 @@
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You start attaching the [name]...</span>"
src.add_fingerprint(user)
if(do_after(user, 40, target = src))
if(do_after(user, 40/I.toolspeed, target = src))
if(!src) return
user << "<span class='notice'>You attach the [name].</span>"
var/obj/structure/transit_tube/R = src.buildtube()
+2 -2
View File
@@ -50,7 +50,7 @@
if(istype(I, /obj/item/weapon/crowbar))
user << "<span class='notice'>You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]...</span>"
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30, target = src))
if(do_after(user, 30/I.toolspeed, target = src))
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "<span class='notice'>You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!</span>", "<span class='italics'>You hear grinding porcelain.</span>")
cistern = !cistern
update_icon()
@@ -185,7 +185,7 @@
user << "<span class='notice'>The water temperature seems to be [watertemp].</span>"
if(istype(I, /obj/item/weapon/wrench))
user << "<span class='notice'>You begin to adjust the temperature valve with \the [I]...</span>"
if(do_after(user, 50, target = src))
if(do_after(user, 50/I.toolspeed, target = src))
switch(watertemp)
if("normal")
watertemp = "freezing"
@@ -83,7 +83,7 @@
user.visible_message("[user] disassembles the windoor assembly.", "<span class='notice'>You start to disassemble the windoor assembly...</span>")
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(!src || !WT.isOn()) return
user << "<span class='notice'>You disassemble the windoor assembly.</span>"
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
@@ -104,7 +104,7 @@
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] secures the windoor assembly to the floor.", "<span class='notice'>You start to secure the windoor assembly to the floor...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(!src || anchored)
return
for(var/obj/machinery/door/window/WD in loc)
@@ -123,7 +123,7 @@
playsound(loc, 'sound/items/Ratchet.ogg', 100, 1)
user.visible_message("[user] unsecures the windoor assembly to the floor.", "<span class='notice'>You start to unsecure the windoor assembly to the floor...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(!src || !anchored)
return
user << "<span class='notice'>You unsecure the windoor assembly.</span>"
@@ -180,7 +180,7 @@
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("[user] cuts the wires from the airlock assembly.", "<span class='notice'>You start to cut the wires from airlock assembly...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(!src || state != "02")
return
@@ -218,7 +218,7 @@
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] removes the electronics from the airlock assembly.", "<span class='notice'>You start to uninstall electronics from the airlock assembly...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(!src || !electronics)
return
user << "<span class='notice'>You remove the airlock electronics.</span>"
@@ -248,7 +248,7 @@
playsound(loc, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] pries the windoor into the frame.", "<span class='notice'>You start prying the windoor into the frame...</span>")
if(do_after(user, 40, target = src))
if(do_after(user, 40/W.toolspeed, target = src))
if(loc && electronics)
@@ -266,10 +266,10 @@
windoor.dir = dir
windoor.density = 0
if(electronics.use_one_access)
windoor.req_one_access = electronics.conf_access
if(electronics.one_access)
windoor.req_one_access = electronics.accesses
else
windoor.req_access = electronics.conf_access
windoor.req_access = electronics.accesses
windoor.electronics = electronics
electronics.loc = windoor
if(created_name)
@@ -289,7 +289,7 @@
windoor.dir = dir
windoor.density = 0
windoor.req_access = electronics.conf_access
windoor.req_access = electronics.accesses
windoor.electronics = electronics
electronics.loc = windoor
if(created_name)
+86 -77
View File
@@ -30,17 +30,21 @@
health = maxhealth
if(re)
reinf = re
storeditems.Add(new/obj/item/weapon/shard(src))
if(fulltile)
storeditems.Add(new/obj/item/weapon/shard(src))
ini_dir = dir
if(reinf)
state = 2*anchored
var/obj/item/stack/rods/R = new/obj/item/stack/rods(src)
storeditems.Add(R)
if(fulltile)
R.add(1)
spawn(5) // The NODECONSTRUCT flag gets added immediately by the holodeck (but not immediately enough)
if(!(flags & NODECONSTRUCT))
storeditems.Add(new/obj/item/weapon/shard(src))
if(fulltile)
storeditems.Add(new/obj/item/weapon/shard(src))
if(reinf)
var/obj/item/stack/rods/R = new/obj/item/stack/rods(src)
storeditems.Add(R)
if(fulltile)
R.add(1)
ini_dir = dir
air_update_turf(1)
return
@@ -191,86 +195,91 @@
return 1 //skip the afterattack
add_fingerprint(user)
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
if(reinf && (state == 2 || state == 1))
user << (state == 2 ? "<span class='notice'>You begin to unscrew the window from the frame...</span>" : "<span class='notice'>You begin to screw the window to the frame...</span>")
else if(reinf && state == 0)
user << (anchored ? "<span class='notice'>You begin to unscrew the frame from the floor...</span>" : "<span class='notice'>You begin to screw the frame to the floor...</span>")
else if(!reinf)
user << (anchored ? "<span class='notice'>You begin to unscrew the window from the floor...</span>" : "<span class='notice'>You begin to screw the window to the floor...</span>")
if(do_after(user, 40, target = src))
if(reinf && (state == 1 || state == 2))
//If state was unfastened, fasten it, else do the reverse
state = (state == 1 ? 2 : 1)
user << (state == 1 ? "<span class='notice'>You unfasten the window from the frame.</span>" : "<span class='notice'>You fasten the window to the frame.</span>")
else if(reinf && state == 0)
anchored = !anchored
update_nearby_icons()
user << (anchored ? "<span class='notice'>You fasten the frame to the floor.</span>" : "<span class='notice'>You unfasten the frame from the floor.</span>")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
user << (anchored ? "<span class='notice'>You fasten the window to the floor.</span>" : "<span class='notice'>You unfasten the window.</span>")
else if (istype(I, /obj/item/weapon/crowbar) && reinf && (state == 0 || state == 1))
user << (state == 0 ? "<span class='notice'>You begin to lever the window into the frame...</span>" : "<span class='notice'>You begin to lever the window out of the frame...</span>")
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
if(do_after(user, 40, target = src))
//If state was out of frame, put into frame, else do the reverse
state = (state == 0 ? 1 : 0)
user << (state == 1 ? "<span class='notice'>You pry the window into the frame.</span>" : "<span class='notice'>You pry the window out of the frame.</span>")
else if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == "help")
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == "help")
var/obj/item/weapon/weldingtool/WT = I
if(health < maxhealth)
if(WT.remove_fuel(0,user))
user << "<span class='notice'>You begin repairing [src]...</span>"
playsound(loc, 'sound/items/Welder.ogg', 40, 1)
if(do_after(user, 40, target = src))
if(do_after(user, 40/I.toolspeed, target = src))
health = maxhealth
playsound(loc, 'sound/items/Welder2.ogg', 50, 1)
update_nearby_icons()
else
user << "<span class='warning'>[src] is already in good condition!</span>"
return
update_nearby_icons()
else if(istype(I, /obj/item/weapon/wrench) && !anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
user << "<span class='notice'> You begin to disassemble [src]...</span>"
if(do_after(user, 40, target = src))
if(disassembled)
return //Prevents multiple deconstruction attempts
if(reinf)
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
RG.add_fingerprint(user)
if(fulltile) //fulltiles drop two panes
RG = new (user.loc)
RG.add_fingerprint(user)
else
var/obj/item/stack/sheet/glass/G = new (user.loc)
G.add_fingerprint(user)
if(fulltile)
G = new (user.loc)
G.add_fingerprint(user)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
disassembled = 1
user << "<span class='notice'>You successfully disassemble [src].</span>"
qdel(src)
else if(istype(I, /obj/item/weapon/rcd)) //Do not attack the window if the user is holding an RCD
return
if(!(flags&NODECONSTRUCT))
if(istype(I, /obj/item/weapon/screwdriver))
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
if(reinf && (state == 2 || state == 1))
user << (state == 2 ? "<span class='notice'>You begin to unscrew the window from the frame...</span>" : "<span class='notice'>You begin to screw the window to the frame...</span>")
else if(reinf && state == 0)
user << (anchored ? "<span class='notice'>You begin to unscrew the frame from the floor...</span>" : "<span class='notice'>You begin to screw the frame to the floor...</span>")
else if(!reinf)
user << (anchored ? "<span class='notice'>You begin to unscrew the window from the floor...</span>" : "<span class='notice'>You begin to screw the window to the floor...</span>")
if(do_after(user, 40/I.toolspeed, target = src))
if(reinf && (state == 1 || state == 2))
//If state was unfastened, fasten it, else do the reverse
state = (state == 1 ? 2 : 1)
user << (state == 1 ? "<span class='notice'>You unfasten the window from the frame.</span>" : "<span class='notice'>You fasten the window to the frame.</span>")
else if(reinf && state == 0)
anchored = !anchored
update_nearby_icons()
user << (anchored ? "<span class='notice'>You fasten the frame to the floor.</span>" : "<span class='notice'>You unfasten the frame from the floor.</span>")
else if(!reinf)
anchored = !anchored
update_nearby_icons()
user << (anchored ? "<span class='notice'>You fasten the window to the floor.</span>" : "<span class='notice'>You unfasten the window.</span>")
return
else if (istype(I, /obj/item/weapon/crowbar) && reinf && (state == 0 || state == 1))
user << (state == 0 ? "<span class='notice'>You begin to lever the window into the frame...</span>" : "<span class='notice'>You begin to lever the window out of the frame...</span>")
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
if(do_after(user, 40/I.toolspeed, target = src))
//If state was out of frame, put into frame, else do the reverse
state = (state == 0 ? 1 : 0)
user << (state == 1 ? "<span class='notice'>You pry the window into the frame.</span>" : "<span class='notice'>You pry the window out of the frame.</span>")
return
else if(istype(I, /obj/item/weapon/wrench) && !anchored)
playsound(loc, 'sound/items/Ratchet.ogg', 75, 1)
user << "<span class='notice'> You begin to disassemble [src]...</span>"
if(do_after(user, 40/I.toolspeed, target = src))
if(disassembled)
return //Prevents multiple deconstruction attempts
if(reinf)
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
RG.add_fingerprint(user)
if(fulltile) //fulltiles drop two panes
RG = new (user.loc)
RG.add_fingerprint(user)
else
var/obj/item/stack/sheet/glass/G = new (user.loc)
G.add_fingerprint(user)
if(fulltile)
G = new (user.loc)
G.add_fingerprint(user)
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
disassembled = 1
user << "<span class='notice'>You successfully disassemble [src].</span>"
qdel(src)
return
if(istype(I, /obj/item/weapon/rcd)) //Do not attack the window if the user is holding an RCD
return
if(I.damtype == BRUTE || I.damtype == BURN)
user.changeNext_move(CLICK_CD_MELEE)
hit(I.force)
else
if(I.damtype == BRUTE || I.damtype == BURN)
user.changeNext_move(CLICK_CD_MELEE)
hit(I.force)
else
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
..()
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
..()
return
/obj/structure/window/mech_melee_attack(obj/mecha/M)
@@ -374,7 +383,7 @@
/obj/structure/window/Destroy()
density = 0
air_update_turf(1)
if(!disassembled)
if(!disassembled && !(flags&NODECONSTRUCT))
playsound(src, "shatter", 70, 1)
update_nearby_icons()
return ..()