Merge branch 'master' into Refactors-beds-stools-chairs

This commit is contained in:
Purpose
2018-09-29 15:36:27 +01:00
committed by GitHub
243 changed files with 2079 additions and 1399 deletions
+1 -1
View File
@@ -146,7 +146,7 @@
if(damaging_weapon)
scan_data += "Severity: [damage_desc]<br>"
scan_data += "Hits by weapon: [total_hits]<br>"
scan_data += "Approximate time of wound infliction: [station_time(age)]<br>"
scan_data += "Approximate time of wound infliction: [station_time_timestamp("hh:mm", age)]<br>"
scan_data += "Affected limbs: [D.organ_names]<br>"
scan_data += "Possible weapons:<br>"
for(var/weapon_name in weapon_chances)
+1 -1
View File
@@ -65,7 +65,7 @@
spamcheck = 0
/obj/item/megaphone/proc/saymsg(mob/living/user as mob, message)
audible_message("<span class='game say'><span class='name'>[user]</span> broadcasts, <span class='reallybig'>\"[message]\"</span></span>", hearing_distance = 14)
audible_message("<span class='game say'><span class='name'>[user.GetVoice()]</span> [user.GetAltName()] broadcasts, <span class='reallybig'>\"[message]\"</span></span>", hearing_distance = 14)
log_say(message, user)
for(var/obj/O in oview(14, get_turf(src)))
O.hear_talk(user, "<span class='reallybig'>[message]</span>")
@@ -45,15 +45,16 @@
name = "station intercom (Security)"
frequency = SEC_I_FREQ
/obj/item/radio/intercom/New(turf/loc, var/ndir = 0, var/building = 3)
/obj/item/radio/intercom/New(turf/loc, ndir, building = 3)
..()
buildstage = building
if(buildstage)
processing_objects.Add(src)
else
pixel_x = (ndir & 3)? 0 : (ndir == 4 ? 28 : -28)
pixel_y = (ndir & 3)? (ndir ==1 ? 28 : -28) : 0
dir=ndir
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
pixel_y = (ndir & NORTH|SOUTH) ? (ndir == NORTH ? 28 : -28) : 0
dir=ndir
b_stat=1
on = 0
global_intercoms.Add(src)
+170
View File
@@ -0,0 +1,170 @@
/obj/item/mixing_bowl
name = "mixing bowl"
desc = "Mixing it up in the kitchen."
flags = OPENCONTAINER
icon = 'icons/obj/kitchen.dmi'
icon_state = "mixing_bowl"
var/max_n_of_items = 25
var/dirty = FALSE
var/clean_icon = "mixing_bowl"
var/dirty_icon = "mixing_bowl_dirty"
/obj/item/mixing_bowl/New()
..()
create_reagents(100)
/obj/item/mixing_bowl/attackby(obj/item/I, mob/user, params)
if(dirty)
if(istype(I, /obj/item/soap))
user.visible_message("<span class='notice'>[user] starts to scrub [src].</span>", "<span class='notice'>You start to scrub [src].</span>")
if(do_after(user, 20 * I.toolspeed, target = src))
clean()
user.visible_message("<span class='notice'>[user] has scrubbed [src] clean.</span>", "<span class='notice'>You have scrubbed [src] clean.</span>")
return 1
else
to_chat(user, "<span class='warning'>You should clean [src] before you use it for food prep.</span>")
return 0
if(is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_MICROWAVE]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_GRILL]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_OVEN]) || is_type_in_list(I, GLOB.cooking_ingredients[RECIPE_CANDY]))
if(contents.len>=max_n_of_items)
to_chat(user, "<span class='alert'>This [src] is full of ingredients, you cannot put more.</span>")
return 1
if(istype(I, /obj/item/stack))
var/obj/item/stack/S = I
if(S.amount > 1)
var/obj/item/stack/to_add = S.split(user, 1)
to_add.forceMove(src)
user.visible_message("<span class='notice'>[user] adds one of [S] to [src].</span>", "<span class='notice'>You add one of [S] to [src].</span>")
else
return add_item(S, user)
else
return add_item(I, user)
else if(is_type_in_list(I, list(/obj/item/reagent_containers/glass, /obj/item/reagent_containers/food/drinks, /obj/item/reagent_containers/food/condiment)))
if(!I.reagents)
return 1
for(var/datum/reagent/R in I.reagents.reagent_list)
if(!(R.id in GLOB.cooking_reagents[RECIPE_MICROWAVE]) && !(R.id in GLOB.cooking_reagents[RECIPE_GRILL]) && !(R.id in GLOB.cooking_reagents[RECIPE_OVEN]) && !(R.id in GLOB.cooking_reagents[RECIPE_CANDY]))
to_chat(user, "<span class='alert'>Your [I] contains components unsuitable for cookery.</span>")
return 1
else
to_chat(user, "<span class='alert'>You have no idea what you can cook with [I].</span>")
return 1
/obj/item/mixing_bowl/proc/add_item(obj/item/I, mob/user)
if(!user.drop_item())
to_chat(user, "<span class='notice'>\The [I] is stuck to your hand, you cannot put it in [src]</span>")
//return 0
else
I.forceMove(src)
user.visible_message("<span class='notice'>[user] adds [I] to [src].</span>", "<span class='notice'>You add [I] to [src].</span>")
/obj/item/mixing_bowl/attack_self(mob/user)
var/dat = ""
if(dirty)
dat = {"<code>This [src] is dirty!<BR>Please clean it before use!</code>"}
else
var/list/items_counts = new
var/list/items_measures = new
var/list/items_measures_p = new
for(var/obj/O in contents)
var/display_name = O.name
if(istype(O,/obj/item/reagent_containers/food/snacks/egg))
items_measures[display_name] = "egg"
items_measures_p[display_name] = "eggs"
if(istype(O,/obj/item/reagent_containers/food/snacks/tofu))
items_measures[display_name] = "tofu chunk"
items_measures_p[display_name] = "tofu chunks"
if(istype(O,/obj/item/reagent_containers/food/snacks/meat)) //any meat
items_measures[display_name] = "slab of meat"
items_measures_p[display_name] = "slabs of meat"
if(istype(O,/obj/item/reagent_containers/food/snacks/donkpocket))
display_name = "Turnovers"
items_measures[display_name] = "turnover"
items_measures_p[display_name] = "turnovers"
if(istype(O,/obj/item/reagent_containers/food/snacks/carpmeat))
items_measures[display_name] = "fillet of meat"
items_measures_p[display_name] = "fillets of meat"
items_counts[display_name]++
for(var/O in items_counts)
var/N = items_counts[O]
if(!(O in items_measures))
dat += {"<B>[capitalize(O)]:</B> [N] [lowertext(O)]\s<BR>"}
else
if(N==1)
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures[O]]<BR>"}
else
dat += {"<B>[capitalize(O)]:</B> [N] [items_measures_p[O]]<BR>"}
for(var/datum/reagent/R in reagents.reagent_list)
var/display_name = R.name
if(R.id == "capsaicin")
display_name = "Hotsauce"
if(R.id == "frostoil")
display_name = "Coldsauce"
dat += {"<B>[display_name]:</B> [R.volume] unit\s<BR>"}
if(items_counts.len==0 && reagents.reagent_list.len==0)
dat = {"<B>The [src] is empty</B><BR>"}
else
dat = {"<b>Ingredients:</b><br>[dat]"}
dat += {"<HR><BR> <A href='?src=[UID()];action=dispose'>Eject ingredients!</A><BR>"}
var/datum/browser/popup = new(user, name, name, 400, 400)
popup.set_content(dat)
popup.open(0)
onclose(user, "[name]")
return
/obj/item/mixing_bowl/Topic(href, href_list)
if(..())
return
if("dispose")
dispose()
return
/obj/item/mixing_bowl/proc/dispose()
for(var/obj/O in contents)
O.forceMove(loc)
if(reagents.total_volume)
make_dirty(5)
reagents.clear_reagents()
to_chat(usr, "<span class='notice'>You dispose of [src]'s contents.</span>")
updateUsrDialog()
/obj/item/mixing_bowl/proc/make_dirty(chance)
if(!chance)
return
if(prob(chance))
dirty = TRUE
flags = null
icon_state = dirty_icon
/obj/item/mixing_bowl/proc/clean()
dirty = FALSE
flags = OPENCONTAINER
icon_state = clean_icon
/obj/item/mixing_bowl/wash(mob/user, atom/source)
if(..())
clean()
/obj/item/mixing_bowl/proc/fail(obj/source)
if(!source)
source = src
var/amount = 0
for(var/obj/O in contents)
amount++
if(O.reagents)
var/id = O.reagents.get_master_reagent_id()
if(id)
amount+=O.reagents.get_reagent_amount(id)
qdel(O)
if(reagents && reagents.total_volume)
var/id = reagents.get_master_reagent_id()
if(id)
amount += reagents.get_reagent_amount(id)
reagents.clear_reagents()
var/obj/item/reagent_containers/food/snacks/badrecipe/ffuu = new(get_turf(source))
ffuu.reagents.add_reagent("carbon", amount)
ffuu.reagents.add_reagent("????", amount/10)
make_dirty(75)
@@ -0,0 +1,10 @@
/obj/item/mounted/frame/extinguisher
name = "Extinguisher Cabinet Frame"
desc = "Used for building extinguisher cabinet"
icon = 'icons/obj/closet.dmi'
icon_state = "extinguisher_frame"
mount_reqs = list("simfloor", "nospace")
/obj/item/mounted/frame/extinguisher/do_build(turf/on_wall, mob/user)
new /obj/structure/extinguisher_cabinet/empty(get_turf(src), get_dir(user, on_wall))
qdel(src)
@@ -90,6 +90,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
new /datum/stack_recipe("air alarm frame", /obj/item/mounted/frame/alarm_frame, 2),
new /datum/stack_recipe("fire alarm frame", /obj/item/mounted/frame/firealarm, 2),
new /datum/stack_recipe("intercom frame", /obj/item/mounted/frame/intercom, 2),
new /datum/stack_recipe("extinguisher cabinet frame", /obj/item/mounted/frame/extinguisher, 2),
null
)
@@ -170,7 +171,6 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40),
new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40),
new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),
new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),
+4 -1
View File
@@ -31,7 +31,10 @@
/obj/item/stack/examine(mob/user)
if(..(user, 1))
to_chat(user, "There are [amount] [singular_name]\s in the stack.")
if(singular_name)
to_chat(user, "There are [amount] [singular_name]\s in the stack.")
else
to_chat(user, "There are [amount] [name]\s in the stack.")
/obj/item/stack/attack_self(mob/user)
list_recipes(user)
+16 -3
View File
@@ -6,14 +6,26 @@
w_class = WEIGHT_CLASS_TINY
var/colour = "red"
var/open = 0
var/list/lipstick_colors = list(
"purple" = "purple",
"jade" = "#216F43",
"lime" = "lime",
"black" = "black",
"green" = "green",
"blue" = "blue",
"white" = "white")
/obj/item/lipstick/purple
name = "purple lipstick"
colour = "purple"
/obj/item/lipstick/jade
//It's still called Jade, but theres no HTML color for jade, so we use lime.
name = "jade lipstick"
colour = "#216F43"
/obj/item/lipstick/lime
name = "lime lipstick"
colour = "lime"
/obj/item/lipstick/black
@@ -36,8 +48,9 @@
name = "lipstick"
/obj/item/lipstick/random/New()
colour = pick("red","purple","lime","black","green","blue","white")
name = "[colour] lipstick"
var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var.
colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
/obj/item/lipstick/attack_self(mob/user as mob)
+1 -2
View File
@@ -84,8 +84,7 @@
unwield(U)
U.swap_hand() // For whatever reason the grab will not properly work if we don't have the free hand active.
M.grabbedby(U, 1)
var/obj/item/grab/G = U.get_active_hand()
var/obj/item/grab/G = M.grabbedby(U, 1)
U.swap_hand()
if(G && istype(G))
@@ -135,6 +135,7 @@
desc = "You can use this to wrap items in."
icon = 'icons/obj/items.dmi'
icon_state = "wrap_paper"
singular_name = "wrapping paper"
flags = NOBLUDGEON
amount = 25
max_amount = 25
@@ -557,3 +557,6 @@
else
log_runtime(EXCEPTION("Non-list thing found in storage/deserialize."), src, list("Thing: [thing]"))
..()
/obj/item/storage/AllowDrop()
return TRUE
+1
View File
@@ -3,6 +3,7 @@
desc = "A roll of sticky tape. Possibly for taping ducks... or was that ducts?"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "taperoll"
singular_name = "tape roll"
w_class = WEIGHT_CLASS_TINY
amount = 10
max_amount = 10