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
-136
View File
@@ -1,136 +0,0 @@
///////////
// EASEL //
///////////
/obj/structure/easel
name = "easel"
desc = "only for the finest of art!"
icon = 'icons/obj/artstuff.dmi'
icon_state = "easel"
density = 1
burn_state = FLAMMABLE
burntime = 15
var/obj/item/canvas/painting = null
/obj/structure/easel/Destroy()
QDEL_NULL(painting)
return ..()
//Adding canvases
/obj/structure/easel/attackby(var/obj/item/I, var/mob/user, params)
if(istype(I, /obj/item/canvas))
var/obj/item/canvas/C = I
user.unEquip(C)
painting = C
C.loc = get_turf(src)
C.layer = layer+0.1
user.visible_message("<span class='notice'>[user] puts \the [C] on \the [src].</span>","<span class='notice'>You place \the [C] on \the [src].</span>")
return
..()
//Stick to the easel like glue
/obj/structure/easel/Move()
var/turf/T = get_turf(src)
..()
if(painting && painting.loc == T) //Only move if it's near us.
painting.loc = get_turf(src)
else
painting = null
//////////////
// CANVASES //
//////////////
#define AMT_OF_CANVASES 4 //Keep this up to date or shit will break.
//To safe memory on making /icons we cache the blanks..
var/global/list/globalBlankCanvases[AMT_OF_CANVASES]
/obj/item/canvas
name = "11px by 11px canvas"
desc = "Draw out your soul on this canvas! Only crayons can draw on it. Examine it to focus on the canvas."
icon = 'icons/obj/artstuff.dmi'
icon_state = "11x11"
burn_state = FLAMMABLE
var/whichGlobalBackup = 1 //List index
/obj/item/canvas/nineteenXnineteen
name = "19px by 19px canvas"
icon_state = "19x19"
whichGlobalBackup = 2
/obj/item/canvas/twentythreeXnineteen
name = "23px by 19px canvas"
icon_state = "23x19"
whichGlobalBackup = 3
/obj/item/canvas/twentythreeXtwentythree
name = "23px by 23px canvas"
icon_state = "23x23"
whichGlobalBackup = 4
//Find the right size blank canvas
/obj/item/canvas/proc/getGlobalBackup()
. = null
if(globalBlankCanvases[whichGlobalBackup])
. = globalBlankCanvases[whichGlobalBackup]
else
var/icon/I = icon(initial(icon),initial(icon_state))
globalBlankCanvases[whichGlobalBackup] = I
. = I
//One pixel increments
/obj/item/canvas/attackby(var/obj/item/I, var/mob/user, params)
//Click info
var/list/click_params = params2list(params)
var/pixX = text2num(click_params["icon-x"])
var/pixY = text2num(click_params["icon-y"])
//Should always be true, otherwise you didn't click the object, but let's check because SS13~
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
var/icon/masterpiece = icon(icon,icon_state)
//Cleaning one pixel with a soap or rag
if(istype(I, /obj/item/soap) || istype(I, /obj/item/reagent_containers/glass/rag))
//Pixel info created only when needed
var/thePix = masterpiece.GetPixel(pixX,pixY)
var/icon/Ico = getGlobalBackup()
if(!Ico)
qdel(masterpiece)
return
var/theOriginalPix = Ico.GetPixel(pixX,pixY)
if(thePix != theOriginalPix) //colour changed
DrawPixelOn(theOriginalPix,pixX,pixY)
qdel(masterpiece)
return 1
//Drawing one pixel with a crayon
if(istype(I, /obj/item/toy/crayon))
var/obj/item/toy/crayon/C = I
var/pix = masterpiece.GetPixel(pixX, pixY)
if(pix && pix != C.colour) // if the located pixel isn't blank (null))
DrawPixelOn(C.colour, pixX, pixY)
qdel(masterpiece)
return 1
..()
//Clean the whole canvas
/obj/item/canvas/attack_self(var/mob/user)
if(!user)
return
var/icon/blank = getGlobalBackup()
if(blank)
//it's basically a giant etch-a-sketch
icon = blank
user.visible_message("<span class='notice'>[user] cleans the canvas.</span>","<span class='notice'>You clean the canvas.</span>")
#undef AMT_OF_CANVASES
@@ -423,4 +423,7 @@
/obj/structure/closet/get_remote_view_fullscreens(mob/user)
if(user.stat == DEAD || !(user.sight & (SEEOBJS|SEEMOBS)))
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 1)
/obj/structure/closet/AllowDrop()
return TRUE
+52 -3
View File
@@ -1,3 +1,8 @@
#define NO_EXTINGUISHER 0
#define NORMAL_EXTINGUISHER 1
#define MINI_EXTINGUISHER 2
/obj/structure/extinguisher_cabinet
name = "extinguisher cabinet"
desc = "A small wall mounted cabinet designed to hold a fire extinguisher."
@@ -5,13 +10,28 @@
icon_state = "extinguisher_closed"
anchored = 1
density = 0
var/obj/item/extinguisher/has_extinguisher = new/obj/item/extinguisher
var/obj/item/extinguisher/has_extinguisher = null
var/extinguishertype
var/opened = 0
var/material_drop = /obj/item/stack/sheet/metal
/obj/structure/extinguisher_cabinet/New(turf/loc, ndir = null)
..()
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
pixel_y = (ndir & NORTH|SOUTH)? (ndir == WEST ? 28 : -28) : 0
switch(extinguishertype)
if(NO_EXTINGUISHER)
return
if(MINI_EXTINGUISHER)
has_extinguisher = new/obj/item/extinguisher/mini
else
has_extinguisher = new/obj/item/extinguisher
/obj/structure/extinguisher_cabinet/Destroy()
QDEL_NULL(has_extinguisher)
return ..()
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params)
if(isrobot(user) || isalien(user))
return
@@ -23,13 +43,34 @@
to_chat(user, "<span class='notice'>You place [O] in [src].</span>")
else
opened = !opened
else if(istype(O, /obj/item/weldingtool))
if(has_extinguisher)
to_chat(user, "<span class='warning'>You need to remove the extinguisher before deconstructing the cabinet!</span>")
return
if(!opened)
to_chat(user, "<span class='warning'>Open the cabinet before cutting it apart!</span>")
return
var/obj/item/weldingtool/WT = O
if(!WT.remove_fuel(0, user))
return
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
playsound(loc, WT.usesound, 40, 1)
if(do_after(user, 40 * WT.toolspeed, 1, target = src))
if(!src ||!opened || !WT.isOn()) // !src to prevent it being duped
return
visible_message("<span class='notice'>[user] slices apart [src].</span>",
"<span class='notice'>You cut [src] apart with [WT].</span>",
"<span class='italics'>You hear welding.</span>")
var/turf/T = get_turf(src)
new material_drop(T)
qdel(src)
else
opened = !opened
update_icon()
/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
if(isrobot(user) || isalien(user))
to_chat(user, "<span class='notice'>You don't have the dexterity to do this!</span>")
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
@@ -70,3 +111,11 @@
icon_state = "extinguisher_full"
else
icon_state = "extinguisher_empty"
/obj/structure/extinguisher_cabinet/empty/New(turf/loc, ndir = null)
extinguishertype = NO_EXTINGUISHER
..()
#undef NO_EXTINGUISHER
#undef NORMAL_EXTINGUISHER
#undef MINI_EXTINGUISHER
+1 -2
View File
@@ -243,7 +243,7 @@
icon_state = "shower"
density = 0
anchored = 1
use_power = 0
use_power = NO_POWER_USE
var/on = 0
var/obj/effect/mist/mymist = null
var/ismist = 0 //needs a var so we can make it linger~
@@ -756,4 +756,3 @@
qdel(src)
if(prob(50))
new /obj/item/stack/sheet/cardboard(T)