Merge remote-tracking branch 'upstream/dev' into bs12-zuhweapons

This commit is contained in:
Mloc-Hibernia
2014-05-11 13:48:51 +00:00
29 changed files with 200 additions and 101 deletions

View File

@@ -32,6 +32,7 @@
var/obj/item/butt = new cig.type_butt(src) var/obj/item/butt = new cig.type_butt(src)
cig.transfer_fingerprints_to(butt) cig.transfer_fingerprints_to(butt)
del(cig) del(cig)
W = butt
else if (cig.lit == 0) else if (cig.lit == 0)
user << "You place [cig] in [src] without even smoking it. Why would you do that?" user << "You place [cig] in [src] without even smoking it. Why would you do that?"

View File

@@ -531,10 +531,17 @@ Turf and target are seperate in case you want to teleport some distance from a t
. += "*no key*" . += "*no key*"
if(include_name && M) if(include_name && M)
var/name
if(M.real_name) if(M.real_name)
. += "/([M.real_name])" name = M.real_name
else if(M.name) else if(M.name)
. += "/([M.name])" name = M.name
if(is_special_character(M))
. += "/(<font color='#FFA500'>[name]</font>)" //Orange
else
. += "/([name])"
return . return .

View File

@@ -100,8 +100,10 @@
/atom/proc/emp_act(var/severity) /atom/proc/emp_act(var/severity)
return return
/atom/proc/bullet_act(var/obj/item/projectile/Proj)
return 0 /atom/proc/bullet_act(obj/item/projectile/P, def_zone)
P.on_hit(src, 0, def_zone)
. = 0
/atom/proc/in_contents_of(container)//can take class or object instance as argument /atom/proc/in_contents_of(container)//can take class or object instance as argument
if(ispath(container)) if(ispath(container))

View File

@@ -136,9 +136,9 @@
PT.master = V PT.master = V
OT.master = V OT.master = V
PT.air_contents.temperature = PHORON_FLASHPOINT PT.air_contents.temperature = PLASMA_FLASHPOINT
PT.air_contents.phoron = 3 PT.air_contents.toxins = 12
PT.air_contents.carbon_dioxide = 17 PT.air_contents.carbon_dioxide = 8
PT.air_contents.update_values() PT.air_contents.update_values()

View File

@@ -1077,7 +1077,6 @@
<ul> <ul>
<li><b>Straight pipes:</b> They're pipes. One-meter sections. Straight line. Pretty simple. Just about every pipe and device is based around this <li><b>Straight pipes:</b> They're pipes. One-meter sections. Straight line. Pretty simple. Just about every pipe and device is based around this
standard one-meter size, so most things will take up as much space as one of these.</li> standard one-meter size, so most things will take up as much space as one of these.</li>
<<<<<<< HEAD
<li><b>Bent pipes:</b> Pipes with a 90 degree bend at the half-meter mark. My goodness.</li> <li><b>Bent pipes:</b> Pipes with a 90 degree bend at the half-meter mark. My goodness.</li>
<li><b>Pipe manifolds:</b> Pipes that are essentially a "T" shape, allowing you to connect three things at one point.</li> <li><b>Pipe manifolds:</b> Pipes that are essentially a "T" shape, allowing you to connect three things at one point.</li>
<li><b>4-way manifold:</b> A four-way junction.</li> <li><b>4-way manifold:</b> A four-way junction.</li>
@@ -1087,7 +1086,6 @@
</ul> </ul>
<h1><a name="Insulated"><B>Insulated Pipes</B></a></h1> <h1><a name="Insulated"><B>Insulated Pipes</B></a></h1>
=======
<li><I>Bent pipes:</I> Pipes with a 90 degree bend at the half-meter mark. My goodness.</li> <li><I>Bent pipes:</I> Pipes with a 90 degree bend at the half-meter mark. My goodness.</li>
<li><I>Pipe manifolds:</I> Pipes that are essentially a "T" shape, allowing you to connect three things at one point.</li> <li><I>Pipe manifolds:</I> Pipes that are essentially a "T" shape, allowing you to connect three things at one point.</li>
<li><I>4-way manifold:</I> A four-way junction.</li> <li><I>4-way manifold:</I> A four-way junction.</li>
@@ -1096,7 +1094,6 @@
<li><I>Manual T-Valve:</I> Like a manual valve, but at the center of a manifold instead of a straight pipe.</li><BR><BR> <li><I>Manual T-Valve:</I> Like a manual valve, but at the center of a manifold instead of a straight pipe.</li><BR><BR>
<h1><a name="Insulated"><B>Insulated Pipes</B></a></h1><BR> <h1><a name="Insulated"><B>Insulated Pipes</B></a></h1><BR>
>>>>>>> 4b04be7536168ccf4a73c91dcaa4681e4db18a4e
<I>Special Public Service Announcement.</I><BR> <I>Special Public Service Announcement.</I><BR>
Our regular pipes are already insulated. These are completely worthless. Punch anyone who uses them.<BR><BR> Our regular pipes are already insulated. These are completely worthless. Punch anyone who uses them.<BR><BR>
@@ -1105,12 +1102,8 @@
This is usually where people get frightened, afraid, and start calling on their gods and/or cowering in fear. Yes, I can see you doing that right now. This is usually where people get frightened, afraid, and start calling on their gods and/or cowering in fear. Yes, I can see you doing that right now.
Stop it. It's unbecoming. Most of these are fairly straightforward.<BR> Stop it. It's unbecoming. Most of these are fairly straightforward.<BR>
<<<<<<< HEAD
<ul> <ul>
<li><b>Gas pump:</b> Take a wild guess. It moves gas in the direction it's pointing (marked by the red line on one end). It moves it based on pressure, the maximum output being 4500 kPa (kilopascals). <li><b>Gas pump:</b> Take a wild guess. It moves gas in the direction it's pointing (marked by the red line on one end). It moves it based on pressure, the maximum output being 4500 kPa (kilopascals).
=======
<li><I>Gas pump:</I> Take a wild guess. It moves gas in the direction it's pointing (marked by the red line on one end). It moves it based on pressure, the maximum output being 4500 kPa (kilopascals).
>>>>>>> 4b04be7536168ccf4a73c91dcaa4681e4db18a4e
Ordinary atmospheric pressure, for comparison, is 101.3 kPa, and the minimum pressure of room-temperature pure oxygen needed to not suffocate in a matter of minutes is 16 kPa Ordinary atmospheric pressure, for comparison, is 101.3 kPa, and the minimum pressure of room-temperature pure oxygen needed to not suffocate in a matter of minutes is 16 kPa
(though 18 kPa is preferred using internals, for various reasons).</li> (though 18 kPa is preferred using internals, for various reasons).</li>
<li><b>Volume pump:</b> This pump goes based on volume, instead of pressure, and the possible maximum pressure it can create in the pipe on the receiving end is double the gas pump because of this, <li><b>Volume pump:</b> This pump goes based on volume, instead of pressure, and the possible maximum pressure it can create in the pipe on the receiving end is double the gas pump because of this,
@@ -1133,22 +1126,11 @@
These systems are used to only transfer heat between two pipes. They will not move gases or any other element, but will equalize the temperature (eventually). Note that because of how gases work (remember: pv=nRt), These systems are used to only transfer heat between two pipes. They will not move gases or any other element, but will equalize the temperature (eventually). Note that because of how gases work (remember: pv=nRt),
a higher temperature will raise pressure, and a lower one will lower temperature.<BR> a higher temperature will raise pressure, and a lower one will lower temperature.<BR>
<<<<<<< HEAD
<ul>
<li><b>Pipe:</b> This is a pipe that will exchange heat with the surrounding atmosphere. Place in fire for superheating. Place in space for supercooling.</li>
<li><b>Bent pipe:</b> Take a wild guess.</li>
<li><b>Junction:</b> The point where you connect your normal pipes to heat exchange pipes. Not necessary for heat exchangers, but necessary for H/E pipes/bent pipes.</li>
<li><b>Heat exchanger:</b> These funky-looking bits attach to an open pipe end. Put another heat exchanger directly across from it, and you can transfer heat across two pipes without having to have the gases touch.
This normally shouldn't exchange with the ambient air, despite being totally exposed. Just don't ask questions...</li>
</ul><BR>
=======
<li><I>Pipe:</I> This is a pipe that will exchange heat with the surrounding atmosphere. Place in fire for superheating. Place in space for supercooling.</li> <li><I>Pipe:</I> This is a pipe that will exchange heat with the surrounding atmosphere. Place in fire for superheating. Place in space for supercooling.</li>
<li><I>Bent pipe:</I> Take a wild guess.</li> <li><I>Bent pipe:</I> Take a wild guess.</li>
<li><I>Junction:</I> The point where you connect your normal pipes to heat exchange pipes. Not necessary for heat exchangers, but necessary for H/E pipes/bent pipes.</li> <li><I>Junction:</I> The point where you connect your normal pipes to heat exchange pipes. Not necessary for heat exchangers, but necessary for H/E pipes/bent pipes.</li>
<li><I>Heat exchanger:</I> These funky-looking bits attach to an open pipe end. Put another heat exchanger directly across from it, and you can transfer heat across two pipes without having to have the gases touch. <li><I>Heat exchanger:</I> These funky-looking bits attach to an open pipe end. Put another heat exchanger directly across from it, and you can transfer heat across two pipes without having to have the gases touch.
This normally shouldn't exchange with the ambient air, despite being totally exposed. Just don't ask questions...</li><BR> This normally shouldn't exchange with the ambient air, despite being totally exposed. Just don't ask questions...</li><BR>
>>>>>>> 4b04be7536168ccf4a73c91dcaa4681e4db18a4e
That's about it for pipes. Go forth, armed with this knowledge, and try not to break, burn down, or kill anything. Please. That's about it for pipes. Go forth, armed with this knowledge, and try not to break, burn down, or kill anything. Please.

View File

@@ -93,7 +93,13 @@
return !density return !density
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj) /obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
if(!Proj) return if(!Proj) return
//Tasers and the like should not damage grilles.
if(Proj.damage_type == HALLOSS)
return
src.health -= Proj.damage*0.2 src.health -= Proj.damage*0.2
healthcheck() healthcheck()
return 0 return 0

View File

@@ -18,6 +18,11 @@
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj) /obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
//Tasers and the like should not damage windows.
if(Proj.damage_type == HALLOSS)
return
health -= Proj.damage health -= Proj.damage
..() ..()
if(health <= 0) if(health <= 0)

View File

@@ -11,6 +11,7 @@ var/list/admin_verbs_default = list(
// /client/proc/deadchat /*toggles deadchat on/off*/ // /client/proc/deadchat /*toggles deadchat on/off*/
) )
var/list/admin_verbs_admin = list( var/list/admin_verbs_admin = list(
/datum/admins/proc/show_player_panel,
/client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/ /client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/ /client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
/client/proc/invisimin, /*allows our mob to go invisible/visible*/ /client/proc/invisimin, /*allows our mob to go invisible/visible*/
@@ -244,6 +245,7 @@ var/list/admin_verbs_mod = list(
/client/proc/player_panel_new, /client/proc/player_panel_new,
/client/proc/dsay, /client/proc/dsay,
/datum/admins/proc/show_skills, /datum/admins/proc/show_skills,
/datum/admins/proc/show_player_panel,
/client/proc/jobbans, /client/proc/jobbans,
/client/proc/cmd_admin_subtle_message /*send an message to somebody as a 'voice in their head'*/ /client/proc/cmd_admin_subtle_message /*send an message to somebody as a 'voice in their head'*/
) )

View File

@@ -197,7 +197,7 @@ BLIND // can't see anything
name = "Space helmet" name = "Space helmet"
icon_state = "space" icon_state = "space"
desc = "A special helmet designed for work in a hazardous, low-pressure environment." desc = "A special helmet designed for work in a hazardous, low-pressure environment."
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE flags = FPRINT | TABLEPASS | HEADCOVERSEYES | BLOCKHAIR | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL
item_state = "space" item_state = "space"
permeability_coefficient = 0.01 permeability_coefficient = 0.01
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50) armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
@@ -215,7 +215,7 @@ BLIND // can't see anything
w_class = 4//bulky item w_class = 4//bulky item
gas_transfer_coefficient = 0.01 gas_transfer_coefficient = 0.01
permeability_coefficient = 0.02 permeability_coefficient = 0.02
flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE flags = FPRINT | TABLEPASS | STOPSPRESSUREDMAGE | THICKMATERIAL
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen) allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen)
slowdown = 3 slowdown = 3

View File

@@ -2,7 +2,7 @@
name = "helmet" name = "helmet"
desc = "Standard Security gear. Protects the head from impacts." desc = "Standard Security gear. Protects the head from impacts."
icon_state = "helmet" icon_state = "helmet"
flags = FPRINT | TABLEPASS | HEADCOVERSEYES flags = FPRINT | TABLEPASS | HEADCOVERSEYES | THICKMATERIAL
item_state = "helmet" item_state = "helmet"
armor = list(melee = 50, bullet = 15, laser = 50,energy = 10, bomb = 25, bio = 0, rad = 0) armor = list(melee = 50, bullet = 15, laser = 50,energy = 10, bomb = 25, bio = 0, rad = 0)
flags_inv = HIDEEARS|HIDEEYES flags_inv = HIDEEARS|HIDEEYES

View File

@@ -2,7 +2,7 @@
/obj/item/clothing/suit/armor /obj/item/clothing/suit/armor
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs) allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs)
body_parts_covered = UPPER_TORSO|LOWER_TORSO body_parts_covered = UPPER_TORSO|LOWER_TORSO
flags = FPRINT | TABLEPASS flags = FPRINT | TABLEPASS | THICKMATERIAL
cold_protection = UPPER_TORSO|LOWER_TORSO cold_protection = UPPER_TORSO|LOWER_TORSO
min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE min_cold_protection_temperature = ARMOR_MIN_COLD_PROTECTION_TEMPERATURE

View File

@@ -13,7 +13,7 @@ var/list/artifact_spawn = list() // Runtime fix for geometry loading before cont
opacity = 1 opacity = 1
density = 1 density = 1
blocks_air = 1 blocks_air = 1
temperature = TCMB temperature = T0C
var/mineral/mineral var/mineral/mineral
var/mined_ore = 0 var/mined_ore = 0
var/last_act = 0 var/last_act = 0
@@ -389,7 +389,7 @@ var/list/artifact_spawn = list() // Runtime fix for geometry loading before cont
icon_state = "asteroid" icon_state = "asteroid"
oxygen = 0.01 oxygen = 0.01
nitrogen = 0.01 nitrogen = 0.01
temperature = TCMB temperature = T0C
icon_plating = "asteroid" icon_plating = "asteroid"
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug var/dug = 0 //0 = has not yet been dug, 1 = has already been dug

View File

@@ -10,7 +10,8 @@
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/ore)) if (istype(W, /obj/item/weapon/ore))
src.contents += W; user.u_equip(W)
src.contents += W
if (istype(W, /obj/item/weapon/storage)) if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W var/obj/item/weapon/storage/S = W
S.hide_from(usr) S.hide_from(usr)

View File

@@ -48,6 +48,12 @@
/mob/proc/death(gibbed) /mob/proc/death(gibbed)
//Quick fix for corpses kept propped up in chairs. ~Z
drop_r_hand()
drop_l_hand()
//End of fix.
timeofdeath = world.time timeofdeath = world.time
living_mob_list -= src living_mob_list -= src

View File

@@ -89,11 +89,28 @@
if(hard_to_hear) if(hard_to_hear)
speaker_name = "unknown" speaker_name = "unknown"
var/changed_voice
if(istype(src, /mob/living/silicon/ai) && !hard_to_hear) if(istype(src, /mob/living/silicon/ai) && !hard_to_hear)
var/jobname // the mob's "job" var/jobname // the mob's "job"
var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any.
if (ishuman(speaker)) if (ishuman(speaker))
var/mob/living/carbon/human/H = speaker var/mob/living/carbon/human/H = speaker
if((H.wear_id && istype(H.wear_id,/obj/item/weapon/card/id/syndicate)) && (H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice)))
changed_voice = 1
var/mob/living/carbon/human/I = locate(speaker_name)
if(I)
impersonating = I
jobname = impersonating.get_assignment()
else
jobname = "Unknown"
else
jobname = H.get_assignment() jobname = H.get_assignment()
else if (iscarbon(speaker)) // Nonhuman carbon mob else if (iscarbon(speaker)) // Nonhuman carbon mob
jobname = "No id" jobname = "No id"
else if (isAI(speaker)) else if (isAI(speaker))
@@ -105,7 +122,13 @@
else else
jobname = "Unknown" jobname = "Unknown"
track = "<a href='byond://?src=\ref[src];track=\ref[speaker]'>[speaker_name] ([jobname])</a>" if(changed_voice)
if(impersonating)
track = "<a href='byond://?src=\ref[src];trackname=[html_encode(speaker_name)];track=\ref[impersonating]'>[speaker_name] ([jobname])</a>"
else
track = "[speaker_name] ([jobname])"
else
track = "<a href='byond://?src=\ref[src];trackname=[html_encode(speaker_name)];track=\ref[speaker]'>[speaker_name] ([jobname])</a>"
if(istype(src, /mob/dead/observer)) if(istype(src, /mob/dead/observer))
if(speaker_name != speaker.real_name && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs. if(speaker_name != speaker.real_name && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.

View File

@@ -1290,3 +1290,22 @@
W.update_icon() W.update_icon()
W.message = message W.message = message
W.add_fingerprint(src) W.add_fingerprint(src)
/mob/living/carbon/human/can_inject(var/mob/user, var/error_msg, var/target_zone)
. = 1
if(!user)
target_zone = pick("chest","chest","chest","left leg","right leg","left arm", "right arm", "head")
else if(!target_zone)
target_zone = user.zone_sel.selecting
switch(target_zone)
if("head")
if(head && head.flags & THICKMATERIAL)
. = 0
else
if(wear_suit && wear_suit.flags & THICKMATERIAL)
. = 0
if(!. && error_msg && user)
// Might need re-wording.
user << "<span class='alert'>There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into.</span>"

View File

@@ -52,7 +52,7 @@ emp_act
return -1 // complete projectile permutation return -1 // complete projectile permutation
if(check_shields(P.damage, "the [P.name]")) if(check_shields(P.damage, "the [P.name]"))
P.on_hit(src, 2) P.on_hit(src, 2, def_zone)
return 2 return 2
//BEGIN BOOK'S TASER NERF. //BEGIN BOOK'S TASER NERF.

View File

@@ -211,6 +211,9 @@
O.emp_act(severity) O.emp_act(severity)
..() ..()
/mob/living/proc/can_inject()
return 1
/mob/living/proc/get_organ_target() /mob/living/proc/get_organ_target()
var/mob/shooter = src var/mob/shooter = src
var/t = shooter:zone_sel.selecting var/t = shooter:zone_sel.selecting

View File

@@ -58,7 +58,7 @@
return 2 return 2
if(!P.nodamage) if(!P.nodamage)
apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, absorb, 0, P) apply_damage((P.damage/(absorb+1)), P.damage_type, def_zone, absorb, 0, P)
P.on_hit(src, absorb) P.on_hit(src, absorb, def_zone)
return absorb return absorb
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve /mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve

View File

@@ -410,8 +410,18 @@ var/list/ai_list = list()
if(A && target) if(A && target)
A.ai_actual_track(target) A.ai_actual_track(target)
*/ */
if(target)
//Strip off any "(as Derplord)".
//If there's a way to do this via a var that doesn't give the AI extra info, please let me know.
var/seeking = target.name
var/index = findtext(seeking, "(as ")
if(index)
seeking = copytext(seeking, 1, index-1)
if(target && html_decode(href_list["trackname"]) == seeking)
ai_actual_track(target) ai_actual_track(target)
else
src << "\red System error. Cannot locate [html_decode(href_list["trackname"])]."
return return
else if (href_list["faketrack"]) else if (href_list["faketrack"])

View File

@@ -201,3 +201,9 @@
dat += "<br>" dat += "<br>"
src << browse(dat, "window=airoster") src << browse(dat, "window=airoster")
onclose(src, "airoster") onclose(src, "airoster")
//can't inject synths
/mob/living/silicon/can_inject(var/mob/user, var/error_msg)
if(error_msg)
user << "<span class='alert'>The armoured plating is too tough.</span>"
return 0

View File

@@ -139,7 +139,6 @@
return return
if(client.prefs.species != "Human") if(client.prefs.species != "Human")
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist) if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
src << alert("You are currently not whitelisted to play [client.prefs.species].") src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0 return 0
@@ -155,6 +154,7 @@
usr << "\blue There is an administrative lock on entering the game!" usr << "\blue There is an administrative lock on entering the game!"
return return
if(client.prefs.species != "Human")
if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist) if(!is_alien_whitelisted(src, client.prefs.species) && config.usealienwhitelist)
src << alert("You are currently not whitelisted to play [client.prefs.species].") src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0 return 0

View File

@@ -90,10 +90,15 @@
origin_tech = "materials=2;syndicate=5" origin_tech = "materials=2;syndicate=5"
/obj/item/weapon/pen/paralysis/attack(mob/M as mob, mob/user as mob) /obj/item/weapon/pen/paralysis/attack(mob/living/M as mob, mob/user as mob)
if(!(istype(M,/mob))) if(!(istype(M,/mob)))
return return
..() ..()
if(M.can_inject(user,1))
if(reagents.total_volume) if(reagents.total_volume)
if(M.reagents) reagents.trans_to(M, 50) if(M.reagents) reagents.trans_to(M, 50)
return return

View File

@@ -35,29 +35,29 @@
var/d1 = 0 var/d1 = 0
var/d2 = 1 var/d2 = 1
layer = 2.44 //Just below unary stuff, which is at 2.45 and above pipes, which are at 2.4 layer = 2.44 //Just below unary stuff, which is at 2.45 and above pipes, which are at 2.4
var/cable_color = COLOR_RED color = COLOR_RED
var/obj/structure/powerswitch/power_switch var/obj/structure/powerswitch/power_switch
/obj/structure/cable/yellow /obj/structure/cable/yellow
cable_color = COLOR_YELLOW color = COLOR_YELLOW
/obj/structure/cable/green /obj/structure/cable/green
cable_color = COLOR_GREEN color = COLOR_GREEN
/obj/structure/cable/blue /obj/structure/cable/blue
cable_color = COLOR_BLUE color = COLOR_BLUE
/obj/structure/cable/pink /obj/structure/cable/pink
cable_color = COLOR_PINK color = COLOR_PINK
/obj/structure/cable/orange /obj/structure/cable/orange
cable_color = COLOR_ORANGE color = COLOR_ORANGE
/obj/structure/cable/cyan /obj/structure/cable/cyan
cable_color = COLOR_CYAN color = COLOR_CYAN
/obj/structure/cable/white /obj/structure/cable/white
cable_color = COLOR_WHITE color = COLOR_WHITE
/obj/structure/cable/New() /obj/structure/cable/New()
..() ..()
@@ -94,7 +94,6 @@
/obj/structure/cable/proc/updateicon() /obj/structure/cable/proc/updateicon()
icon_state = "[d1]-[d2]" icon_state = "[d1]-[d2]"
alpha = invisibility ? 127 : 255 alpha = invisibility ? 127 : 255
color = cable_color
// returns the powernet this cable belongs to // returns the powernet this cable belongs to
@@ -126,9 +125,9 @@
return return
if(src.d1) // 0-X cables are 1 unit, X-X cables are 2 units long if(src.d1) // 0-X cables are 1 unit, X-X cables are 2 units long
new/obj/item/weapon/cable_coil(T, 2, cable_color) new/obj/item/weapon/cable_coil(T, 2, color)
else else
new/obj/item/weapon/cable_coil(T, 1, cable_color) new/obj/item/weapon/cable_coil(T, 1, color)
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
O.show_message("<span class='warning'>[user] cuts the cable.</span>", 1) O.show_message("<span class='warning'>[user] cuts the cable.</span>", 1)
@@ -190,12 +189,12 @@
del(src) del(src)
if(2.0) if(2.0)
if (prob(50)) if (prob(50))
new/obj/item/weapon/cable_coil(src.loc, src.d1 ? 2 : 1, cable_color) new/obj/item/weapon/cable_coil(src.loc, src.d1 ? 2 : 1, color)
del(src) del(src)
if(3.0) if(3.0)
if (prob(25)) if (prob(25))
new/obj/item/weapon/cable_coil(src.loc, src.d1 ? 2 : 1, cable_color) new/obj/item/weapon/cable_coil(src.loc, src.d1 ? 2 : 1, color)
del(src) del(src)
return return
@@ -229,16 +228,15 @@
..() ..()
src.amount = length src.amount = length
if (param_color) if (param_color)
item_color = param_color color = param_color
pixel_x = rand(-2,2) pixel_x = rand(-2,2)
pixel_y = rand(-2,2) pixel_y = rand(-2,2)
updateicon() updateicon()
update_wclass() update_wclass()
/obj/item/weapon/cable_coil/proc/updateicon() /obj/item/weapon/cable_coil/proc/updateicon()
if (!item_color) if (!color)
item_color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN) color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_ORANGE, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN)
color = item_color
if(amount == 1) if(amount == 1)
icon_state = "coil1" icon_state = "coil1"
name = "cable piece" name = "cable piece"
@@ -422,7 +420,7 @@
use(1) use(1)
if (C.shock(user, 50)) if (C.shock(user, 50))
if (prob(50)) //fail if (prob(50)) //fail
new/obj/item/weapon/cable_coil(C.loc, 1, C.cable_color) new/obj/item/weapon/cable_coil(C.loc, 1, C.color)
del(C) del(C)
//src.laying = 1 //src.laying = 1
//last = C //last = C
@@ -482,7 +480,7 @@
use(1) use(1)
if (NC.shock(user, 50)) if (NC.shock(user, 50))
if (prob(50)) //fail if (prob(50)) //fail
new/obj/item/weapon/cable_coil(NC.loc, 1, NC.cable_color) new/obj/item/weapon/cable_coil(NC.loc, 1, NC.color)
del(NC) del(NC)
return return
@@ -521,7 +519,7 @@
use(1) use(1)
if (C.shock(user, 50)) if (C.shock(user, 50))
if (prob(50)) //fail if (prob(50)) //fail
new/obj/item/weapon/cable_coil(C.loc, 2, C.cable_color) new/obj/item/weapon/cable_coil(C.loc, 2, C.color)
del(C) del(C)
return return
@@ -597,7 +595,6 @@ obj/structure/cable/proc/cableColor(var/colorC)
var/color_n = "#DD0000" var/color_n = "#DD0000"
if(colorC) if(colorC)
color_n = colorC color_n = colorC
cable_color = color_n
color = color_n color = color_n
/obj/item/weapon/cable_coil/cut /obj/item/weapon/cable_coil/cut

View File

@@ -1,8 +1,10 @@
/obj/item/weapon/gun/verb/toggle_firerate() /obj/item/weapon/gun/verb/toggle_firerate()
set name = "Toggle Firerate" set name = "Toggle Firerate"
set category = "Object" set category = "Object"
firerate = !firerate firerate = !firerate
if (firerate == 0)
if (firerate)
loc << "You will now continue firing when your target moves." loc << "You will now continue firing when your target moves."
else else
loc << "You will now only fire once, then lower your aim, when your target moves." loc << "You will now only fire once, then lower your aim, when your target moves."

View File

@@ -62,14 +62,15 @@
var/datum/reagents/R = reagent_list[reagent_list.len] var/datum/reagents/R = reagent_list[reagent_list.len]
R.add_reagent(reagent, 30) R.add_reagent(reagent, 30)
/obj/item/weapon/reagent_containers/borghypo/attack(mob/M as mob, mob/user as mob) /obj/item/weapon/reagent_containers/borghypo/attack(mob/living/M as mob, mob/user as mob)
var/datum/reagents/R = reagent_list[mode] var/datum/reagents/R = reagent_list[mode]
if(!R.total_volume) if(!R.total_volume)
user << "\red The injector is empty." user << "\red The injector is empty."
return return
if (!( istype(M, /mob) )) if (!(istype(M)))
return return
if (R.total_volume)
if (R.total_volume && M.can_inject(user,1))
user << "\blue You inject [M] with the injector." user << "\blue You inject [M] with the injector."
M << "\red You feel a tiny prick!" M << "\red You feel a tiny prick!"

View File

@@ -140,11 +140,23 @@
return return
if(ismob(target) && target != user) if(ismob(target) && target != user)
var/time = 30 //Injecting through a hardsuit takes longer due to needing to find a port. var/time = 30 //Injecting through a hardsuit takes longer due to needing to find a port.
if(istype(target,/mob/living/carbon/human)) if(istype(target,/mob/living/carbon/human))
var/mob/living/carbon/human/H = target var/mob/living/carbon/human/H = target
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space)) if(H.wear_suit)
if(istype(H.wear_suit,/obj/item/clothing/suit/space))
time = 60 time = 60
else if(!H.can_inject(user, 1))
return
else if(isliving(target))
var/mob/living/M = target
if(!M.can_inject(user, 1))
return
for(var/mob/O in viewers(world.view, user)) for(var/mob/O in viewers(world.view, user))
if(time == 30) if(time == 30)

View File

@@ -93,9 +93,17 @@
M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])" M.attack_log += "\[[time_stamp()]\] <b>UNKNOWN SUBJECT (No longer exists)</b> shot <b>[M]/[M.ckey]</b> with a <b>syringegun</b> ([R])"
msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)") msg_admin_attack("UNKNOWN shot [M] ([M.ckey]) with a <b>syringegun</b> ([R]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
var/mob/living/T
if(istype(M,/mob/living))
T = M
M.visible_message("<span class='danger'>[M] is hit by the syringe!</span>")
if(T && istype(T) && T.can_inject())
if(D.reagents) if(D.reagents)
D.reagents.trans_to(M, 15) D.reagents.trans_to(M, 15)
M.visible_message("<span class='danger'>[M] is hit by the syringe!</span>") else
M.visible_message("<span class='danger'>The syringe bounces off [M]!</span>")
del(D) del(D)
break break

View File

@@ -199,6 +199,7 @@ var/MAX_EXPLOSION_RANGE = 14
#define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head #define MASKCOVERSMOUTH 2048 // on other items, these are just for mask/head
#define HEADCOVERSMOUTH 2048 #define HEADCOVERSMOUTH 2048
#define THICKMATERIAL 1024 //From /tg: prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with NOSLIP for shoes)
#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc #define NOSLIP 1024 //prevents from slipping on wet floors, in space etc
#define OPENCONTAINER 4096 // is an open container for chemistry purposes #define OPENCONTAINER 4096 // is an open container for chemistry purposes