Merge remote-tracking branch 'upstream/dev' into 150703-Uplinkery

Conflicts:
	code/datums/datacore.dm
	code/defines/obj.dm
This commit is contained in:
PsiOmegaDelta
2015-08-13 08:11:32 +02:00
425 changed files with 9891 additions and 8955 deletions
@@ -83,7 +83,7 @@ AI MODULES
laws.sync(target, 0)
addAdditionalLaws(target, sender)
target << "[sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: "
target << "\The [sender] has uploaded a change to the laws you must follow, using \an [src]. From now on: "
target.show_laws()
/obj/item/weapon/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
@@ -140,13 +140,7 @@ AI MODULES
if(!targetName)
usr << "No name detected on module, please enter one."
return 0
..()
/obj/item/weapon/aiModule/oneHuman/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
..()
var/law = "Only [targetName] is a crew member."
target << "[sender.real_name] attempted to modify your zeroth law." // And lets them know that someone tried. --NeoFite
target << "It would be in your best interest to play along with [sender.real_name] that [law]"
return ..()
/obj/item/weapon/aiModule/oneHuman/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
var/law = "Only [targetName] is an crew member."
+2 -4
View File
@@ -155,9 +155,7 @@
icon = 'icons/obj/ammo.dmi'
icon_state = "rcd"
item_state = "rcdammo"
opacity = 0
density = 0
anchored = 0.0
w_class = 2
origin_tech = list(TECH_MATERIAL = 2)
matter = list(DEFAULT_WALL_MATERIAL = 30000,"glass" = 15000)
@@ -182,7 +180,7 @@
/obj/item/weapon/rcd/mounted/useResource(var/amount, var/mob/user)
var/cost = amount*30
var/cost = amount*130 //so that a rig with default powercell can build ~2.5x the stuff a fully-loaded RCD can.
if(istype(loc,/obj/item/rig_module))
var/obj/item/rig_module/module = loc
if(module.holder && module.holder.cell)
+4 -3
View File
@@ -110,9 +110,10 @@
..()
spawn(30)
if(istype(loc, /mob/living/carbon/human))
blood_type = loc:dna:b_type
dna_hash = loc:dna:unique_enzymes
fingerprint_hash = md5(loc:dna:uni_identity)
var/mob/living/carbon/human/H = loc
blood_type = H.dna.b_type
dna_hash = H.dna.unique_enzymes
fingerprint_hash = md5(H.dna.uni_identity)
/obj/item/weapon/card/id/attack_self(mob/user as mob)
for(var/mob/O in viewers(user, null))
@@ -206,7 +206,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
throw_speed = 0.5
item_state = "cigoff"
w_class = 1
slot_flags = SLOT_EARS
slot_flags = SLOT_EARS | SLOT_MASK
attack_verb = list("burnt", "singed")
icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi
icon_off = "cigoff"
@@ -32,7 +32,7 @@
else if(istype(target,/turf))
user << "<span class='notice'>You scrub \the [target.name] clean.</span>"
var/turf/T = target
T.clean()
T.clean(src)
else
user << "<span class='notice'>You clean \the [target.name].</span>"
target.clean_blood()
@@ -112,20 +112,9 @@
update_icon()
return
if(istype(W, /obj/item/device/analyzer) && ptank)
var/obj/item/weapon/icon = src
user.visible_message("<span class='notice'>[user] has used the analyzer on \icon[icon]</span>")
var/pressure = ptank.air_contents.return_pressure()
var/total_moles = ptank.air_contents.total_moles
user << "<span class='notice'>Results of analysis of \icon[icon]</span>"
if(total_moles>0)
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
for(var/g in ptank.air_contents.gas)
user << "<span class='notice'>[gas_data.name[g]]: [round((ptank.air_contents.gas[g] / total_moles) * 100)]%</span>"
user << "<span class='notice'>Temperature: [round(ptank.air_contents.temperature-T0C)]&deg;C</span>"
else
user << "<span class='notice'>Tank is empty!</span>"
if(istype(W, /obj/item/device/analyzer))
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
return
..()
return
@@ -1,7 +1,7 @@
/obj/item/weapon/grenade/chem_grenade
name = "grenade casing"
icon_state = "chemg"
item_state = "flashbang"
item_state = "grenade"
desc = "A hand made chemical grenade."
w_class = 2.0
force = 2.0
@@ -1,7 +1,7 @@
/obj/item/weapon/grenade/empgrenade
name = "classic emp grenade"
icon_state = "emp"
item_state = "emp"
item_state = "empgrenade"
origin_tech = list(TECH_MATERIAL = 2, TECH_MAGNET = 3)
prime()
@@ -4,7 +4,7 @@
w_class = 2.0
icon = 'icons/obj/grenade.dmi'
icon_state = "grenade"
item_state = "flashbang"
item_state = "grenade"
throw_speed = 4
throw_range = 20
flags = CONDUCT
@@ -38,7 +38,7 @@
user << "<span class='warning'>\The [src] is full.</span>"
else
spawn(5)
I.reagents.trans_to_mob(src.imp, 5)
I.reagents.trans_to_obj(src.imp, 5)
user << "<span class='notice'>You inject 5 units of the solution. The syringe now contains [I.reagents.total_volume] units.</span>"
else if (istype(I, /obj/item/weapon/implanter))
var/obj/item/weapon/implanter/M = I
@@ -61,7 +61,7 @@
attack_verb = list("attacked", "poked")
edge = 0
sharp = 0
force_divisor = 0.25 //5 when wielded with weight 20 (steel)
force_divisor = 0.1 //2 when wielded with weight 20 (steel)
/obj/item/weapon/material/kitchen/utensil/spoon/plastic
default_material = "plastic"
@@ -71,9 +71,9 @@
*/
/obj/item/weapon/material/kitchen/utensil/knife
name = "knife"
desc = "Can cut through any food."
desc = "A knife for eating with. Can cut through any food."
icon_state = "knife"
force_divisor = 0.2 // 12 when wielded with hardness 60 (steel)
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
@@ -100,7 +100,7 @@
name = "rolling pin"
desc = "Used to knock out the Bartender."
icon_state = "rolling_pin"
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") //I think the rollingpin attackby will end up ignoring this anyway.
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
default_material = "wood"
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
thrown_force_divisor = 1 // as above
@@ -16,7 +16,7 @@
sharp = 1
..() //Updates force.
throwforce = max(3,force-3)
hitsound = initial(hitsound)
hitsound = 'sound/weapons/bladeslice.ogg'
icon_state += "_open"
w_class = 3
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -24,7 +24,7 @@
force = 3
edge = 0
sharp = 0
hitsound = null
hitsound = initial(hitsound)
icon_state = initial(icon_state)
w_class = initial(w_class)
attack_verb = initial(attack_verb)
@@ -38,10 +38,10 @@
/obj/item/weapon/material/butterfly/attack_self(mob/user)
active = !active
if(active)
user << "<span class='notice'>You flip out your [src].</span>"
user << "<span class='notice'>You flip out \the [src].</span>"
playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
else
user << "<span class='notice'>The butterfly knife can now be concealed.</span>"
user << "<span class='notice'>\The [src] can now be concealed.</span>"
update_force()
add_fingerprint(user)
@@ -34,6 +34,9 @@
if(!isnull(matter[material_type]))
matter[material_type] *= force_divisor // May require a new var instead.
/obj/item/weapon/material/get_material()
return material
/obj/item/weapon/material/proc/update_force()
if(edge || sharp)
force = material.get_edge_damage()
@@ -73,6 +73,8 @@
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(!affecting)
return
if(affecting.status & ORGAN_ROBOT)
return
if(affecting.take_damage(5, 0))
@@ -87,4 +89,4 @@
..(loc, "steel")
/obj/item/weapon/material/shard/phoron/New(loc)
..(loc, "phoron glass")
..(loc, "phglass")
@@ -34,7 +34,7 @@
/obj/item/weapon/melee/energy/attack_self(mob/living/user as mob)
if (active)
if ((CLUMSY in user.mutations) && prob(50))
user.visible_message("<span class='danger'>[user] accidentally cuts \himself with \the [src].</span>",\
user.visible_message("<span class='danger'>\The [user] accidentally cuts \himself with \the [src].</span>",\
"<span class='danger'>You accidentally cut yourself with \the [src].</span>")
user.take_organ_damage(5,5)
deactivate(user)
@@ -50,9 +50,10 @@
return
/obj/item/weapon/melee/energy/suicide_act(mob/user)
var/tempgender = "[user.gender == MALE ? "he's" : user.gender == FEMALE ? "she's" : "they are"]"
if (active)
viewers(user) << pick("<span class='danger'>\The [user] is slitting \his stomach open with \the [src]! It looks like \he's trying to commit seppuku.</span>", \
"<span class='danger'>\The [user] is falling on \the [src]! It looks like \he's trying to commit suicide.</span>")
viewers(user) << pick("<span class='danger'>\The [user] is slitting \his stomach open with \the [src]! It looks like [tempgender] trying to commit seppuku.</span>", \
"<span class='danger'>\The [user] is falling on \the [src]! It looks like [tempgender] trying to commit suicide.</span>")
return (BRUTELOSS|FIRELOSS)
/*
@@ -90,7 +91,7 @@
user << "<span class='notice'>\The [src] is de-energised. It's just a regular axe now.</span>"
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
viewers(user) << "<span class='warning'>\The [user] swings \the [src] towards /his head! It looks like \he's trying to commit suicide.</span>"
viewers(user) << "<span class='warning'>\The [user] swings \the [src] towards \his head! It looks like \he's trying to commit suicide.</span>"
return (BRUTELOSS|FIRELOSS)
/*
+1
View File
@@ -16,6 +16,7 @@
/obj/item/weapon/mop/New()
create_reagents(5)
//expects an atom containing the reagents used to clean the turf
/turf/proc/clean(atom/source)
if(source.reagents.has_reagent("water", 1))
clean_blood()
@@ -119,10 +119,10 @@
//verbs += /obj/item/weapon/storage/bag/sheetsnatcher/quick_empty
can_be_inserted(obj/item/W as obj, stop_messages = 0)
if(!istype(W,/obj/item/stack/material) || istype(W,/obj/item/stack/material/sandstone) || istype(W,/obj/item/stack/material/wood))
if(!istype(W,/obj/item/stack/material))
if(!stop_messages)
usr << "The snatcher does not accept [W]."
return 0 //I don't care, but the existing code rejects them for not being "sheets" *shrug* -Sayu
return 0
var/current = 0
for(var/obj/item/stack/material/S in contents)
current += S.amount
@@ -335,7 +335,6 @@
..()
if(isrobot(user))
user << "<span class='warning'>You're a robot. No.</span>"
return //Robots can't interact with storage items.
if(!can_be_inserted(W))
+8 -24
View File
@@ -87,28 +87,12 @@
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if ((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "<span class='notice'>\The [user] has used [W] on \icon[icon] [src]</span>"
var/pressure = air_contents.return_pressure()
manipulated_by = user.real_name //This person is aware of the contents of the tank.
var/total_moles = air_contents.total_moles
user << "<span class='notice'>Results of analysis of \icon[icon]</span>"
if (total_moles>0)
user << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
for(var/g in air_contents.gas)
user << "<span class='notice'>[gas_data.name[g]]: [(round(air_contents.gas[g] / total_moles) * 100)]%</span>"
user << "<span class='notice'>Temperature: [round(air_contents.temperature-T0C)]&deg;C</span>"
else
user << "<span class='notice'>Tank is empty!</span>"
src.add_fingerprint(user)
var/obj/item/device/analyzer/A = W
A.analyze_gases(src, user)
else if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W
LB.blow(src)
@@ -131,7 +115,7 @@
location = loc.loc
else if(istype(loc, /mob/living/carbon))
location = loc
var/using_internal
if(istype(location))
if(location.internal==src)
@@ -278,11 +262,11 @@
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
explosion(
get_turf(loc),
round(min(BOMBCAP_DVSTN_RADIUS, range*0.25)),
round(min(BOMBCAP_HEAVY_RADIUS, range*0.50)),
round(min(BOMBCAP_LIGHT_RADIUS, range*1.00)),
round(min(BOMBCAP_FLASH_RADIUS, range*1.50)),
get_turf(loc),
round(min(BOMBCAP_DVSTN_RADIUS, range*0.25)),
round(min(BOMBCAP_HEAVY_RADIUS, range*0.50)),
round(min(BOMBCAP_LIGHT_RADIUS, range*1.00)),
round(min(BOMBCAP_FLASH_RADIUS, range*1.50)),
)
qdel(src)
+6 -2
View File
@@ -212,8 +212,12 @@
/obj/item/weapon/weldingtool/process()
if(welding && prob(5) && !remove_fuel(1))
setWelding(0)
if(welding)
if(prob(5))
remove_fuel(1)
if(get_fuel() == 0)
setWelding(0)
//I'm not sure what this does. I assume it has to do with starting fires...
//...but it doesnt check to see if the welder is on or not.