Merge remote-tracking branch 'upstream/dev-freeze' into dev

This commit is contained in:
PsiOmega
2014-12-14 00:27:16 +01:00
22 changed files with 300 additions and 260 deletions

View File

@@ -330,14 +330,6 @@
// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(var/atom/A)
// Snowflake for space vines.
var/is_buckled = 0
if(buckled)
if(istype(buckled))
if(!buckled.movable)
is_buckled = 1
else
is_buckled = 0
if(!A || !x || !y || !A.x || !A.y) return
var/dx = A.x - x
var/dy = A.y - y

View File

@@ -175,7 +175,7 @@
return
if(melee_damage_upper == 0 && istype(A,/mob/living))
custom_emote(1,"[friendly] [src]!")
custom_emote(1,"[friendly] [A]!")
return
var/damage = rand(melee_damage_lower, melee_damage_upper)

View File

@@ -221,6 +221,7 @@ datum/controller/vote
gamemode_names[M.config_tag] = capitalize(M.name) //It's ugly to put this here but it works
additional_text.Add("<td align = 'center'>[M.required_players]</td>")
break
gamemode_names["secret"] = "Secret"
if("crew_transfer")
if(check_rights(R_ADMIN|R_MOD, 0))
question = "End the shift?"
@@ -309,11 +310,16 @@ datum/controller/vote
var/votes = choices[choices[i]]
if(!votes) votes = 0
. += "<tr>"
if(current_votes[C.ckey] == i)
. += "<td><b><a href='?src=\ref[src];vote=[i]'>[gamemode_names[choices[i]]]</a></b></td><td align = 'center'>[votes]</td>"
if(mode == "gamemode")
if(current_votes[C.ckey] == i)
. += "<td><b><a href='?src=\ref[src];vote=[i]'>[gamemode_names[choices[i]]]</a></b></td><td align = 'center'>[votes]</td>"
else
. += "<td><a href='?src=\ref[src];vote=[i]'>[gamemode_names[choices[i]]]</a></b></td><td align = 'center'>[votes]</td>"
else
. += "<td><a href='?src=\ref[src];vote=[i]'>[gamemode_names[choices[i]]]</a></b></td><td align = 'center'>[votes]</td>"
if(current_votes[C.ckey] == i)
. += "<td><b><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a></b></td><td align = 'center'>[votes]</td>"
else
. += "<td><a href='?src=\ref[src];vote=[i]'>[choices[i]]</a></b></td><td align = 'center'>[votes]</td>"
if (additional_text.len >= i)
. += additional_text[i]
. += "</tr>"

View File

@@ -331,11 +331,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
if(istype(M,/mob/dead))
var/mob/dead/D = M
D.manifest()
user.visible_message( \
"\red [user] drags the ghost to our plan of reality!", \
"\red You drag the ghost to our plan of reality!" \
)
D.manifest(user)
return
if(!istype(M))
return

View File

@@ -154,8 +154,6 @@
var/pltext = "<font size=2><b>Player list:</b></font>"
for(var/mob/M in player_list)
if(M.mind && M.mind.name && (M.mind.assigned_role || M.mind.special_role))
pltext += print_player_lite(M.mind)
if(M.client)
clients++
if(ishuman(M))

View File

@@ -26,7 +26,6 @@
var/vend_power_usage = 150 //actuators and stuff
var/active = 1 //No sales pitches if off!
var/delay_product_spawn // If set, uses sleep() in product spawn proc (mostly for seeds to retrieve correct names).
var/vend_ready = 1 //Are we ready to vend?? Is it time??
var/vend_delay = 10 //How long does it take to vend?
var/datum/data/vending_product/currently_vending = null // A /datum/data/vending_product instance of what we're paying for right now.
@@ -122,9 +121,6 @@
/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0)
if(delay_product_spawn)
sleep(15) //Make ABSOLUTELY SURE the seed datum is properly populated.
for(var/typepath in productlist)
var/amount = productlist[typepath]
var/price = prices[typepath]
@@ -147,9 +143,6 @@
R.category=CAT_NORMAL
product_records += R
if(delay_product_spawn)
sleep(5) //sleep(1) did not seem to cut it, so here we are.
var/atom/temp = typepath
R.product_name = initial(temp.name)
@@ -791,7 +784,6 @@
product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!"
icon_state = "seeds"
delay_product_spawn = 1
products = list(/obj/item/seeds/bananaseed = 3,/obj/item/seeds/berryseed = 3,/obj/item/seeds/carrotseed = 3,/obj/item/seeds/chantermycelium = 3,/obj/item/seeds/chiliseed = 3,
/obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/replicapod = 3,/obj/item/seeds/soyaseed = 3,
@@ -803,6 +795,34 @@
/obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,)
premium = list(/obj/item/toy/waterflower = 1)
/obj/machinery/vending/hydroseeds/build_inventory(var/list/productlist,hidden=0,req_coin=0)
for(var/typepath in productlist)
var/amount = productlist[typepath]
var/price = prices[typepath]
if(isnull(amount)) amount = 1
var/datum/data/vending_product/R = new /datum/data/vending_product()
R.product_path = typepath
R.amount = amount
R.price = price
R.display_color = pick("red","blue","green")
if(hidden)
R.category=CAT_HIDDEN
hidden_records += R
else if(req_coin)
R.category=CAT_COIN
coin_records += R
else
R.category=CAT_NORMAL
product_records += R
var/obj/item/seeds/S = new typepath(src)
R.product_name = S.name
del(S)
return
/obj/machinery/vending/magivend
name = "MagiVend"

View File

@@ -14,6 +14,7 @@
icon_state = "utilitybelt"
item_state = "utility"
can_hold = list(
"/obj/item/weapon/combitool",
"/obj/item/weapon/crowbar",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/weldingtool",

View File

@@ -478,6 +478,7 @@
desc = "It even has one of those nubbins for doing the thingy."
icon = 'icons/obj/items.dmi'
icon_state = "combitool"
w_class = 2
var/list/spawn_tools = list(
/obj/item/weapon/screwdriver,
@@ -511,11 +512,17 @@
user << "You switch \the [src] to the [tool.name] fitting."
return 1
/obj/item/weapon/combitool/attack(var/atom/target, var/mob/living/user)
/obj/item/weapon/combitool/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
var/obj/item/tool = tools[current_tool]
if(!tool)
return ..()
if(!tool) return 0
return (tool ? tool.attack(M,user) : 0)
/obj/item/weapon/combitool/afterattack(var/atom/target, var/mob/living/user, proximity, params)
var/obj/item/tool = tools[current_tool]
if(!tool) return 0
tool.loc = user
var/resolved = target.attackby(tool,user)
if(!resolved && tool && target)
tool.afterattack(target,user,1)
return 1
if(tool)
tool.loc = src

View File

@@ -353,6 +353,9 @@
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
if(istype(W, /obj/item/weapon/melee/energy/blade))
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
@@ -582,6 +585,8 @@
return
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
return
user.drop_item()
if(W && W.loc) W.loc = src.loc
return

View File

@@ -815,6 +815,11 @@ var/global/list/gear_datums = list()
sort_category = "misc"
cost = 2
/datum/gear/combitool
display_name = "combi-tool"
path = /obj/item/weapon/combitool
cost = 3
// Stuff worn on the ears. Items here go in the "ears" sort_category but they must not use
// the slot_r_ear or slot_l_ear as the slot, or else players will spawn with no headset.
/datum/gear/skrell_chain

View File

@@ -147,7 +147,7 @@
usr << "<span class='warning'>The suit is not initialized.</span>"
return 0
if(holder.security_check_enabled && !(istype(usr,/mob/living/silicon) || holder.allowed(usr)))
if(holder.security_check_enabled && !holder.check_suit_access(usr))
usr << "<span class='danger'>Access denied.</span>"
return

View File

@@ -20,8 +20,8 @@
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
siemens_coefficient = 0
permeability_coefficient = 0
siemens_coefficient = 0.1
permeability_coefficient = 0.1
var/interface_path = "hardsuit.tmpl"
var/ai_interface_path = "hardsuit.tmpl"
@@ -278,7 +278,7 @@
module.deactivate()
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
if(!piece) continue
if(canremove && (flags & AIRTIGHT))
if(canremove)
piece.flags &= ~STOPSPRESSUREDMAGE
piece.flags &= ~AIRTIGHT
else

View File

@@ -7,7 +7,6 @@
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready."
suit_type = "ERT commander"
icon_state = "ert_commander_rig"
siemens_coefficient = 0.6
offline_slowdown = 3
helm_type = /obj/item/clothing/head/helmet/space/rig/ert

View File

@@ -878,7 +878,7 @@ I said no!
/datum/recipe/poppypretzel
items = list(
/obj/item/seeds/poppyseed,
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy,
/obj/item/weapon/reagent_containers/food/snacks/dough,
)
result = /obj/item/weapon/reagent_containers/food/snacks/poppypretzel

View File

@@ -56,9 +56,6 @@
/obj/item/seeds/replicapod
seed_type = "diona"
/obj/item/seeds/poppyseed
seed_type = "poppies"
/obj/item/seeds/chiliseed
seed_type = "chili"

View File

@@ -83,18 +83,7 @@
/mob/dead/attackby(obj/item/W, mob/user)
if(istype(W,/obj/item/weapon/book/tome))
var/mob/dead/M = src
if(src.invisibility != 0)
M.invisibility = 0
user.visible_message( \
"\red [user] drags ghost, [M], to our plan of reality!", \
"\red You drag [M] to our plan of reality!" \
)
else
user.visible_message ( \
"\red [user] just tried to smash his book into that ghost! It's not very effective", \
"\red You get the feeling that the ghost can't become any more visible." \
)
M.manifest(user)
/mob/dead/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
return 1
@@ -556,9 +545,23 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
return 1
/mob/dead/proc/manifest()
verbs += /mob/dead/proc/toggle_visibility
toggle_visibility()
/mob/dead/proc/manifest(mob/user)
var/is_manifest = 0
if(!is_manifest)
is_manifest = 1
verbs += /mob/dead/proc/toggle_visibility
if(src.invisibility != 0)
user.visible_message( \
"<span class='warning'>[user] drags ghost, [src], to our plan of reality!</span>", \
"<span class='warning'>You drag [src] to our plan of reality!</span>" \
)
toggle_visibility(1)
else
user.visible_message ( \
"<span class='warning'>[user] just tried to smash his book into that ghost! It's not very effective.</span>", \
"<span class='warning'>You get the feeling that the ghost can't become any more visible.</span>" \
)
/mob/dead/proc/toggle_icon(var/icon)
if(!client)
@@ -574,22 +577,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon)
client.images += J
/mob/dead/proc/toggle_visibility()
/mob/dead/proc/toggle_visibility(var/forced = 0)
set category = "Ghost"
set name = "Toggle Visibility"
set desc = "Allows you to turn (in)visible (almost) at will."
var/toggled_invisible
if(invisibility && world.time < toggled_invisible + 600)
if(!forced && invisibility && world.time < toggled_invisible + 600)
src << "You must gather strength before you can turn visible again..."
return
if(invisibility == 0)
toggled_invisible = world.time
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible</span>")
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible.</span>")
else
src << "<span class='info'>You are now visible</span>"
src << "<span class='info'>You are now visible!</span>"
invisibility = invisibility == INVISIBILITY_OBSERVER ? 0 : INVISIBILITY_OBSERVER
// Give the ghost a cult icon which should be visible only to itself

View File

@@ -88,8 +88,12 @@
if(wrapped) //Already have an item.
//Temporary put wrapped into user so target's attackby() checks pass.
wrapped.loc = user
//Pass the attack on to the target. This might delete/relocate wrapped.
wrapped.afterattack(target,user)
var/resolved = target.attackby(wrapped,user)
if(!resolved && wrapped && target)
wrapped.afterattack(target,user,1)
//If wrapped was neither deleted nor put into target, put it back into the gripper.
if(wrapped && user && (wrapped.loc == user))
wrapped.loc = src

View File

@@ -89,17 +89,17 @@
/mob/living/simple_animal/hostile/proc/AttackingTarget()
if(!Adjacent(target_mob))
return
//if(isliving(target_mob))
//var/mob/living/L = target_mob
//L.attack_animal(src)
//return L
//if(istype(target_mob,/obj/mecha))
//var/obj/mecha/M = target_mob
//M.attack_animal(src)
//return M
//if(istype(target_mob,/obj/machinery/bot))
//var/obj/machinery/bot/B = target_mob
//B.attack_animal(src)
if(isliving(target_mob))
var/mob/living/L = target_mob
L.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
return L
if(istype(target_mob,/obj/mecha))
var/obj/mecha/M = target_mob
M.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
return M
if(istype(target_mob,/obj/machinery/bot))
var/obj/machinery/bot/B = target_mob
B.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
/mob/living/simple_animal/hostile/proc/LoseTarget()
stance = HOSTILE_STANCE_IDLE
@@ -193,10 +193,10 @@
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
if(prob(break_stuff_probability))
for(var/dir in cardinal) // North, South, East, West
//for(var/obj/structure/window/obstacle in get_step(src, dir))
//if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
//obstacle.attack_animal(src)
//return
//var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
//if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
//obstacle.attack_animal(src)
for(var/obj/structure/window/obstacle in get_step(src, dir))
if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
obstacle.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
return
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
obstacle.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)

View File

@@ -313,7 +313,7 @@
/obj/item/weapon/reagent_containers/food/snacks/grown/orange
name = "orange"
desc = "It's an tangy fruit."
desc = "It's a tangy fruit."
icon_state = "orange"
potency = 20
filling_color = "#FAAD28"