Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into miner_announce

This commit is contained in:
Crazylemon64
2015-11-13 21:56:32 -08:00
68 changed files with 6096 additions and 5003 deletions
+5 -1
View File
@@ -2,7 +2,7 @@
//SECURITY//
////////////
//debugging, uncomment for viewing topic calls
// #define TOPIC_DEBUGGING 1
//#define TOPIC_DEBUGGING 1
#define TOPIC_SPAM_DELAY 2 //2 ticks is about 2/10ths of a second; it was 4 ticks, but that caused too many clicks to be lost due to lag
#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
@@ -29,6 +29,10 @@
#if defined(TOPIC_DEBUGGING)
world << "[src]'s Topic: [href] destined for [hsrc]."
if(href_list["nano_err"]) //nano throwing errors
world << "## NanoUI, Subject [src]: " + html_decode(href_list["nano_err"]) //NANO DEBUG HOOK
#endif
+8 -8
View File
@@ -253,7 +253,7 @@ datum/preferences
dat += "Secondary Language:<br><a href='?_src_=prefs;preference=language;task=input'>[language]</a><br>"
dat += "Blood Type: <a href='?_src_=prefs;preference=b_type;task=input'>[b_type]</a><br>"
if(species == "Human")
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220<br></a>"
dat += "Skin Tone: <a href='?_src_=prefs;preference=s_tone;task=input'>[-s_tone + 35]/220</a><br>"
// dat += "Skin pattern: <a href='byond://?src=\ref[user];preference=skin_style;task=input'>Adjust</a><br>"
dat += "<br><b>Handicaps</b><br>"
@@ -358,11 +358,11 @@ datum/preferences
hairname = "Frame Color"
dat += "<br><b>[hairname]</b><br>"
dat += "<a href='?_src_=prefs;preference=hair;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_hair, 2)][num2hex(g_hair, 2)][num2hex(b_hair)]'><tr><td>__</td></tr></table></font> "
dat += " Style: <a href='?_src_=prefs;preference=h_style;task=input'>[h_style]</a><br>"
dat += " <br>Style: <a href='?_src_=prefs;preference=h_style;task=input'>[h_style]</a><br>"
dat += "<br><b>Facial</b><br>"
dat += "<a href='?_src_=prefs;preference=facial;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_facial, 2)][num2hex(g_facial, 2)][num2hex(b_facial)]'><tr><td>__</td></tr></table></font> "
dat += " Style: <a href='?_src_=prefs;preference=f_style;task=input'>[f_style]</a><br>"
dat += " <br>Style: <a href='?_src_=prefs;preference=f_style;task=input'>[f_style]</a><br>"
dat += "<br><b>Eyes</b><br>"
dat += "<a href='?_src_=prefs;preference=eyes;task=input'>Change Color</a> <font face='fixedsys' size='3' color='#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes, 2)]'><table style='display:inline;' bgcolor='#[num2hex(r_eyes, 2)][num2hex(g_eyes, 2)][num2hex(b_eyes)]'><tr><td>__</td></tr></table></font><br>"
@@ -528,12 +528,12 @@ datum/preferences
if(rank == "Civilian")//Civilian is special
if(job_support_low & CIVILIAN)
HTML += " <font color=green>\[Yes]</font>"
HTML += " <font color=green>\[Yes]</font></a>"
else
HTML += " <font color=red>\[No]</font>"
HTML += " <font color=red>\[No]</font></a>"
if(job.alt_titles)
HTML += "<br><b><a class='white' href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></b></td></tr>"
HTML += "</a></td></tr>"
HTML += "</td></tr>"
continue
/*
if(GetJobDepartment(job, 1) & job.flag)
@@ -545,13 +545,13 @@ datum/preferences
else
HTML += " <font color=red>\[NEVER]</font>"
*/
HTML += "<font color=[prefLevelColor]>[prefLevelLabel]</font>"
HTML += "<font color=[prefLevelColor]>[prefLevelLabel]</font></a>"
if(job.alt_titles)
HTML += "<br><b><a class='white' href=\"byond://?src=\ref[user];preference=job;task=alt_title;job=\ref[job]\">\[[GetPlayerAltTitle(job)]\]</a></b></td></tr>"
HTML += "</a></td></tr>"
HTML += "</td></tr>"
for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'>&nbsp</td><td>&nbsp</td></tr>"
+12 -1
View File
@@ -53,6 +53,7 @@
vision_flags = SEE_TURFS
prescription_upgradable = 1
species_fit = list("Vox")
see_darkness = 0 //don't render darkness while wearing mesons
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
@@ -63,7 +64,6 @@
icon_state = "nvgmeson"
item_state = "glasses"
darkness_view = 8
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/meson/prescription
@@ -213,6 +213,17 @@
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/sunglasses/lasers
desc = "A peculiar set of sunglasses; they have various chips and other panels attached to the sides of the frames."
name = "high-tech sunglasses"
flags = GLASSESCOVERSEYES | NODROP
/obj/item/clothing/glasses/sunglasses/lasers/equipped(mob/user, slot) //grant them laser eyes upon equipping it.
if(slot == slot_glasses)
user.mutations.Add(LASER)
user.regenerate_icons()
..(user, slot)
/obj/item/clothing/glasses/welding
name = "welding goggles"
desc = "Protects the eyes from welders, approved by the mad scientist association."
@@ -512,3 +512,59 @@
icon_state = "noble_coat"
item_state = "noble_coat"
body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS
///Advanced Protective Suit, AKA, God Mode in wearable form.
/obj/item/clothing/suit/advanced_protective_suit
name = "Advanced Protective Suit"
desc = "An incredibly advanced and complex suit; it has so many buttons and dials as to be incomprehensible."
icon_state = "bomb"
item_state = "bomb"
action_button_name = "Toggle Advanced Protective Suit"
gas_transfer_coefficient = 0.01
permeability_coefficient = 0.01
flags = STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS|HEAD
armor = list(melee = 100, bullet = 100, laser = 100,energy = 100, bomb = 100, bio = 100, rad = 100)
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS | HEAD
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
heat_protection = UPPER_TORSO | LOWER_TORSO|LEGS|FEET|ARMS|HANDS | HEAD
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
slowdown = -10
siemens_coefficient = 0
var/on = 0
/obj/item/clothing/suit/advanced_protective_suit/Destroy()
if(on)
on = 0
processing_objects.Remove(src)
return ..()
/obj/item/clothing/suit/advanced_protective_suit/ui_action_click()
if(on)
on = 0
usr << "You turn the suit's special processes off."
else
on = 1
usr << "You turn the suit's special processes on."
processing_objects.Add(src)
/obj/item/clothing/suit/advanced_protective_suit/IsReflect()
return (on)
/obj/item/clothing/suit/advanced_protective_suit/process()
if(on)
var/mob/living/carbon/human/user = src.loc
if(user && ishuman(user) && (user.wear_suit == src))
if(user.reagents.get_reagent_amount("stimulants") < 15)
user.reagents.add_reagent("stimulants", 15)
if(user.reagents.get_reagent_amount("adminordrazine") < 15)
user.reagents.add_reagent("adminordrazine", 15)
if(user.reagents.get_reagent_amount("nanites") < 15)
user.reagents.add_reagent("nanites", 15)
if(user.reagents.get_reagent_amount("syndicate_nanites") < 15)
user.reagents.add_reagent("syndicate_nanites", 15)
else
processing_objects.Remove(src)
+1 -2
View File
@@ -36,8 +36,7 @@
result = /obj/item/weapon/reagent_containers/food/snacks/candy/caramel
/datum/recipe/candy/toffee
reagents = list("sugar" = 5)
items = list(/obj/item/weapon/reagent_containers/food/snacks/flour)
reagents = list("sugar" = 5, "flour" = 10)
result = /obj/item/weapon/reagent_containers/food/snacks/candy/toffee
/datum/recipe/candy/taffy
+63 -2
View File
@@ -76,9 +76,8 @@
result = /obj/item/weapon/reagent_containers/food/snacks/sausage
/datum/recipe/grill/fishfingers
reagents = list("flour" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/carpmeat,
)
@@ -154,3 +153,65 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_Unagi
/datum/recipe/grill/sushi_Ebi
items = list(
/obj/item/weapon/reagent_containers/food/snacks/boiledrice,
/obj/item/weapon/reagent_containers/food/snacks/boiled_shrimp,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_Ebi
/datum/recipe/grill/sushi_Ikura
items = list(
/obj/item/weapon/reagent_containers/food/snacks/boiledrice,
/obj/item/fish_eggs/salmon,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_Ikura
/datum/recipe/grill/sushi_Inari
items = list(
/obj/item/weapon/reagent_containers/food/snacks/boiledrice,
/obj/item/weapon/reagent_containers/food/snacks/fried_tofu,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_Inari
/datum/recipe/grill/sushi_Sake
items = list(
/obj/item/weapon/reagent_containers/food/snacks/boiledrice,
/obj/item/weapon/reagent_containers/food/snacks/salmonmeat,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_Sake
/datum/recipe/grill/sushi_SmokedSalmon
items = list(
/obj/item/weapon/reagent_containers/food/snacks/boiledrice,
/obj/item/weapon/reagent_containers/food/snacks/salmonsteak,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_SmokedSalmon
/datum/recipe/grill/sushi_Masago
items = list(
/obj/item/weapon/reagent_containers/food/snacks/boiledrice,
/obj/item/fish_eggs/goldfish,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_Masago
/datum/recipe/grill/sushi_Tobiko
items = list(
/obj/item/weapon/reagent_containers/food/snacks/boiledrice,
/obj/item/fish_eggs/shark,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_Tobiko
/datum/recipe/grill/sushi_TobikoEgg
items = list(
/obj/item/weapon/reagent_containers/food/snacks/sushi_Tobiko,
/obj/item/weapon/reagent_containers/food/snacks/egg,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_TobikoEgg
/datum/recipe/grill/sushi_Tai
items = list(
/obj/item/weapon/reagent_containers/food/snacks/boiledrice,
/obj/item/weapon/reagent_containers/food/snacks/catfishmeat,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sushi_Tai
+89 -43
View File
@@ -45,27 +45,12 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/donut/normal
/* what is this
/datum/recipe/microwave/human
//invalid recipe
make_food(var/obj/container as obj)
var/human_name
var/human_job
for (var/obj/item/weapon/reagent_containers/food/snacks/meat/human/HM in container)
if (!HM.subjectname)
continue
human_name = HM.subjectname
human_job = HM.subjectjob
break
var/lastname_index = findtext(human_name, " ")
if (lastname_index)
human_name = copytext(human_name,lastname_index+1)
var/obj/item/weapon/reagent_containers/food/snacks/human/HB = ..(container)
HB.name = human_name+HB.name
HB.job = human_job
return HB
*/
/datum/recipe/microwave/donut/sprinkles
reagents = list("sugar" = 5, "sprinkles" = 3)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/dough
)
result = /obj/item/weapon/reagent_containers/food/snacks/donut/sprinkles
/datum/recipe/microwave/human/burger
items = list(
@@ -74,15 +59,6 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/human/burger
/* Duplicated by plainburger
/datum/recipe/microwave/monkeyburger
items = list(
/obj/item/weapon/reagent_containers/food/snacks/bun,
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey
)
result = /obj/item/weapon/reagent_containers/food/snacks/monkeyburger
*/
/datum/recipe/microwave/plainburger
items = list(
/obj/item/weapon/reagent_containers/food/snacks/bun,
@@ -143,7 +119,6 @@
items = list(
/obj/item/weapon/reagent_containers/food/snacks/bun,
/obj/item/clothing/mask/gas/clown_hat,
/* /obj/item/weapon/reagent_containers/food/snacks/grown/banana, */
)
result = /obj/item/weapon/reagent_containers/food/snacks/clownburger
@@ -184,18 +159,12 @@
/datum/recipe/microwave/soylenviridians
fruit = list("soybeans" = 1)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
)
reagents = list("flour" = 10)
result = /obj/item/weapon/reagent_containers/food/snacks/soylenviridians
/datum/recipe/microwave/soylentgreen
reagents = list("flour" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/meat/human,
/obj/item/weapon/reagent_containers/food/snacks/meat/human,
)
@@ -312,11 +281,10 @@
result = /obj/item/weapon/reagent_containers/food/snacks/enchiladas
/datum/recipe/microwave/monkeysdelight
reagents = list("sodiumchloride" = 1, "blackpepper" = 1)
fruit = list("banana" = 1)
reagents = list("sodiumchloride" = 1, "blackpepper" = 1, "flour" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/monkeycube,
/obj/item/weapon/reagent_containers/food/snacks/monkeycube
)
result = /obj/item/weapon/reagent_containers/food/snacks/monkeysdelight
@@ -327,6 +295,15 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/fishandchips
/datum/recipe/microwave/sandwich
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meatsteak,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
)
result = /obj/item/weapon/reagent_containers/food/snacks/sandwich
/datum/recipe/microwave/toastedsandwich
items = list(
/obj/item/weapon/reagent_containers/food/snacks/sandwich
@@ -445,6 +422,20 @@
fruit = list("apple" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/candiedapple
/datum/recipe/microwave/slimeburger
reagents = list("slimejelly" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/bun
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/slime
/datum/recipe/microwave/jellyburger
reagents = list("cherryjelly" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/bun
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellyburger/cherry
/datum/recipe/microwave/twobread
reagents = list("wine" = 5)
items = list(
@@ -453,6 +444,22 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/twobread
datum/recipe/microwave/slimesandwich
reagents = list("slimejelly" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/slime
/datum/recipe/microwave/cherrysandwich
reagents = list("cherryjelly" = 5)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
)
result = /obj/item/weapon/reagent_containers/food/snacks/jellysandwich/cherry
/datum/recipe/microwave/bloodsoup
reagents = list("blood" = 10)
fruit = list("bloodtomato" = 2)
@@ -518,8 +525,39 @@
fruit = list("whitebeet" = 1, "cabbage" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/beetsoup
/datum/recipe/microwave/herbsalad
fruit = list("ambrosia" = 3, "apple" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/herbsalad
make_food(var/obj/container as obj)
var/obj/item/weapon/reagent_containers/food/snacks/herbsalad/being_cooked = ..(container)
being_cooked.reagents.del_reagent("toxin")
return being_cooked
/datum/recipe/microwave/aesirsalad
fruit = list("ambrosiadeus" = 3, "goldapple" = 1)
result = /obj/item/weapon/reagent_containers/food/snacks/aesirsalad
/datum/recipe/microwave/validsalad
fruit = list("ambrosia" = 3, "potato" = 1)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/meatball,
)
result = /obj/item/weapon/reagent_containers/food/snacks/validsalad
make_food(var/obj/container as obj)
var/obj/item/weapon/reagent_containers/food/snacks/validsalad/being_cooked = ..(container)
being_cooked.reagents.del_reagent("toxin")
return being_cooked
////////////////////////////FOOD ADDITTIONS///////////////////////////////
/datum/recipe/microwave/wrap
reagents = list("soysauce" = 10)
fruit = list("cabbage" = 1)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/friedegg,
)
result = /obj/item/weapon/reagent_containers/food/snacks/wrap
/datum/recipe/microwave/beans
reagents = list("ketchup" = 5)
fruit = list("soybeans" = 2)
@@ -549,6 +587,14 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/icecreamsandwich
/datum/recipe/microwave/notasandwich
items = list(
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/weapon/reagent_containers/food/snacks/breadslice,
/obj/item/clothing/mask/fakemoustache,
)
result = /obj/item/weapon/reagent_containers/food/snacks/notasandwich
/datum/recipe/microwave/friedbanana
reagents = list("sugar" = 10, "cornoil" = 5)
fruit = list("banana" = 1)
@@ -627,7 +673,7 @@
)
result = /obj/item/weapon/reagent_containers/food/snacks/fries
/datum/recipe/microwave/mint
/datum/recipe/microwave/mint_2
reagents = list("sugar" = 5, "frostoil" = 5)
result = /obj/item/weapon/reagent_containers/food/snacks/mint
+4 -8
View File
@@ -256,9 +256,8 @@
/datum/recipe/oven/creamcheesebread
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/dough,
/obj/item/weapon/reagent_containers/food/snacks/dough,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
/obj/item/weapon/reagent_containers/food/snacks/cheesewedge,
)
@@ -366,13 +365,10 @@
result = /obj/item/weapon/reagent_containers/food/snacks/sliceable/pumpkinpie
/datum/recipe/oven/appletart
reagents = list("sugar" = 5, "milk" = 5)
fruit = list("goldapple" = 1)
reagents = list("sugar" = 5, "milk" = 5, "flour" = 10)
items = list(
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/egg,
/obj/item/weapon/reagent_containers/food/snacks/egg
)
result = /obj/item/weapon/reagent_containers/food/snacks/appletart
+3 -16
View File
@@ -30,26 +30,13 @@ function SetMusic(url, time, volume) {
vlc.playlist.playItem(id);
vlc.input.time = time*1000; // VLC takes milliseconds.
vlc.audio.volume = volume*100; // \[0-200]
// for whatever reason, VLC plugin requires a delay between playing and setting volume
// also scaling it log-wise so that it's a more useful range
setTimeout(function() { vlc.audio.volume = Math.log(volume) / Math.LN10 * 50 }, 100); // volume ranges from 0-200
}
</script>
"}
/* OLD, DO NOT USE. CONTROLS.CURRENTPOSITION IS BROKEN.
var/const/PLAYER_HTML={"
<OBJECT id='player' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6' type='application/x-oleobject'></OBJECT>
<script>
function noErrorMessages () { return true; }
window.onerror = noErrorMessages;
function SetMusic(url, time, volume) {
var player = document.getElementById('player');
player.URL = url;
player.Controls.currentPosition = time;
player.Settings.volume = volume;
}
</script>"}
*/
// Hook into the events we desire.
/hook_handler/soundmanager
// Set up player on login
@@ -76,8 +76,6 @@
silent = 0
return 1
handle_statuses()
. = 1
/mob/living/carbon/brain/handle_vision()
-7
View File
@@ -14,13 +14,6 @@ mob/living
qdel(food)
return ..()
/mob/living/carbon/Life()
..()
// Increase germ_level regularly
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
germ_level++
/mob/living/carbon/blob_act()
if (stat == DEAD)
return
+3 -6
View File
@@ -760,7 +760,8 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
/mob/living/carbon/human/handle_regular_status_updates()
if(status_flags & GODMODE) return 0
if(status_flags & GODMODE)
return 0
//SSD check, if a logged player is awake put them back to sleep!
if(player_logged && sleeping < 2)
@@ -827,7 +828,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
setHalLoss(99)
if(paralysis)
AdjustParalysis(-1)
blinded = 1
stat = UNCONSCIOUS
if(halloss > 0)
@@ -959,9 +959,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
if(flying)
animate(src, pixel_y = pixel_y - 5, time = 10, loop = 1, easing = SINE_EASING)
//Other
handle_statuses()
// If you're dirty, your gloves will become dirty, too.
if(gloves && germ_level > gloves.germ_level && prob(10))
gloves.germ_level += 1
@@ -1459,4 +1456,4 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
// Need this in species.
//#undef HUMAN_MAX_OXYLOSS
//#undef HUMAN_CRIT_MAX_OXYLOSS
//#undef HUMAN_CRIT_MAX_OXYLOSS
@@ -376,18 +376,25 @@
else
H.sight &= ~(SEE_TURFS|SEE_MOBS|SEE_OBJS)
H.see_in_dark = darksight //set their variables to default, modify them later
H.see_invisible = SEE_INVISIBLE_LIVING
if(H.mind && H.mind.vampire)
if(VAMP_VISION in H.mind.vampire.powers && !(VAMP_FULL in H.mind.vampire.powers))
H.sight |= SEE_MOBS
else if(VAMP_FULL in H.mind.vampire.powers)
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
if(!H.druggy) H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(XRAY in H.mutations)
H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
H.see_in_dark = 8
if(!H.druggy) H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
H.see_invisible = SEE_INVISIBLE_MINIMUM
if(H.seer == 1)
var/obj/effect/rune/R = locate() in H.loc
@@ -397,11 +404,7 @@
H.see_invisible = SEE_INVISIBLE_LIVING
H.seer = 0
else if(!H.seer)
H.see_in_dark = darksight
H.see_invisible = SEE_INVISIBLE_LIVING
// This checks how much the mob's eyewear impairs their vision
//This checks how much the mob's eyewear impairs their vision
if(H.tinttotal >= TINT_IMPAIR)
if(tinted_weldhelh)
if(H.tinttotal >= TINT_BLIND)
@@ -413,7 +416,9 @@
if(istype(H.glasses, /obj/item/clothing/glasses))
var/obj/item/clothing/glasses/G = H.glasses
H.sight |= G.vision_flags
H.see_in_dark = G.darkness_view
if(G.darkness_view)
H.see_in_dark = G.darkness_view
if(!G.see_darkness)
H.see_invisible = SEE_INVISIBLE_MINIMUM
@@ -442,6 +447,14 @@
if(ANTAGHUD)
process_antag_hud(H)
if(H.vision_type)
H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight)
H.see_invisible = H.vision_type.see_invisible
if(H.vision_type.light_sensitive)
H.weakeyes = 1
H.sight |= H.vision_type.sight_flags
if(H.see_override) //Override all
H.see_invisible = H.see_override
+4
View File
@@ -13,6 +13,10 @@
handle_wetness()
// Increase germ_level regularly
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
germ_level++
///////////////
// BREATHING //
+44 -5
View File
@@ -54,7 +54,9 @@
update_canmove()
if(client)
handle_regular_hud_updates()
regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT
handle_regular_hud_updates() //IT JUST REMOVES FUCKING HUD IMAGES
/mob/living/proc/handle_breathing()
return
@@ -100,17 +102,54 @@
//this updates all special effects: stunned, sleeping, weakened, druggy, stuttering, etc..
/mob/living/proc/handle_status_effects()
if(paralysis)
paralysis = max(paralysis-1,0)
handle_stunned()
handle_weakened()
handle_stuttering()
handle_silent()
handle_drugged()
handle_slurring()
handle_paralysed()
/mob/living/proc/handle_stunned()
if(stunned)
stunned = max(stunned-1,0)
AdjustStunned(-1)
if(!stunned)
update_icons()
return stunned
/mob/living/proc/handle_weakened()
if(weakened)
weakened = max(weakened-1,0)
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
if(!weakened)
update_icons()
return weakened
/mob/living/proc/handle_stuttering()
if(stuttering)
stuttering = max(stuttering-1, 0)
return stuttering
/mob/living/proc/handle_silent()
if(silent)
silent = max(silent-1, 0)
return silent
/mob/living/proc/handle_drugged()
if(druggy)
druggy = max(druggy-1, 0)
return druggy
/mob/living/proc/handle_slurring()
if(slurring)
slurring = max(slurring-1, 0)
return slurring
/mob/living/proc/handle_paralysed() // Currently only used by simple_animal.dm, treated as a special case in other mobs
if(paralysis)
AdjustParalysis(-1)
return paralysis
/mob/living/proc/handle_disabilities()
+127 -157
View File
@@ -1,188 +1,158 @@
/mob/living/silicon/ai/Life()
if (src.stat == 2)
//doesn't call parent because it's a horrible mess
if(stat == DEAD)
return
else //I'm not removing that shitton of tabs, unneeded as they are. -- Urist
//Being dead doesn't mean your temperature never changes
var/turf/T = get_turf(src)
if (src.stat!=0)
src.cameraFollow = null
src.reset_view(null)
src.unset_machine()
var/turf/T = get_turf(src)
if(stat != CONSCIOUS) //ai's fucked
cameraFollow = null
reset_view(null)
unset_machine()
src.updatehealth()
updatehealth()
update_gravity(mob_has_gravity())
update_gravity(mob_has_gravity())
if (health <= config.health_threshold_dead)
death()
return 0
if (src.malfhack)
if (src.malfhack.aidisabled)
src << "\red ERROR: APC access disabled, hack attempt canceled."
src.malfhacking = 0
src.malfhack = null
if(malfhack)
if(malfhack.aidisabled)
src << "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>"
malfhacking = 0
malfhack = null
if(aiRestorePowerRoutine)
adjustOxyLoss(1)
else
adjustOxyLoss(-1)
if (src.health <= config.health_threshold_dead)
death()
return
handle_stunned()
// Handle power damage (oxy)
if(src:aiRestorePowerRoutine != 0)
// Lost power
adjustOxyLoss(1)
else
// Gain Power
adjustOxyLoss(-1)
var/is_blind = 0 //THIS WAS JUST FUCKING 'blind' WHICH CONFLICTED WITH A NORMAL VARIABLE
var/area/my_area = get_area(src)
if(istype(my_area))
if(!my_area.power_equip && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
is_blind = 1 //HOW THE FUCK DID THAT EVEN COMPILE JESUS CHRIST
// Handle EMP-stun
handle_stunned()
if(!is_blind)
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
//stage = 1
//if (istype(src, /mob/living/silicon/ai)) // Are we not sure what we are?
var/blind = 0
//stage = 2
var/area/loc = null
if (istype(T, /turf))
//stage = 3
loc = T.loc
if (istype(loc, /area))
//stage = 4
if (!loc.power_equip && !is_type_in_list(src.loc,list(/obj/item, /obj/mecha)))
//stage = 5
blind = 1
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
if (!blind) //lol? if(!blind) #if(src.blind.layer) <--something here is clearly wrong :P
//I'll get back to this when I find out how this is -supposed- to work ~Carn //removed this shit since it was confusing as all hell --39kk9t
//stage = 4.5
src.sight |= SEE_TURFS
src.sight |= SEE_MOBS
src.sight |= SEE_OBJS
src.see_in_dark = 8
src.see_invisible = SEE_INVISIBLE_LEVEL_TWO
if(see_override)
see_invisible = see_override
if(see_override)
see_invisible = see_override
//Congratulations! You've found a way for AI's to run without using power!
//Todo: Without snowflaking up master_controller procs find a way to make AI use_power but only when APC's clear the area usage the tick prior
// since mobs are in master_controller before machinery. We also have to do it in a manner where we don't reset the entire area's need to update
// the power usage.
//
// We can probably create a new machine that resides inside of the AI contents that uses power using the idle_usage of 1000 and nothing else and
// be fine.
/*
var/area/home = get_area(src)
if(!home) return//something to do with malf fucking things up I guess. <-- aisat is gone. is this still necessary? ~Carn
if(home.powered(EQUIP))
home.use_power(1000, EQUIP)
*/
if(aiRestorePowerRoutine == 2)
src << "Alert cancelled. Power has been restored without our assistance."
aiRestorePowerRoutine = 0
blind.layer = 0
else if(aiRestorePowerRoutine == 3)
src << "Alert cancelled. Power has been restored."
aiRestorePowerRoutine = 0
blind.layer = 0
if (src:aiRestorePowerRoutine==2)
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
return
else if (src:aiRestorePowerRoutine==3)
src << "Alert cancelled. Power has been restored."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
return
else
return
//stage = 6
else
var/area/current_area = get_area(src)
blind.screen_loc = "1,1 to 15,15"
if(blind.layer != 18)
blind.layer = 18
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
src.blind.screen_loc = "1,1 to 15,15"
if (src.blind.layer!=18)
src.blind.layer = 18
src.sight = src.sight&~SEE_TURFS
src.sight = src.sight&~SEE_MOBS
src.sight = src.sight&~SEE_OBJS
src.see_in_dark = 0
src.see_invisible = SEE_INVISIBLE_LIVING
see_in_dark = 0
see_invisible = SEE_INVISIBLE_LIVING
if (((!loc.power_equip) || istype(T, /turf/space)) && !is_type_in_list(src.loc,list(/obj/item, /obj/mecha)))
if (src:aiRestorePowerRoutine==0)
src:aiRestorePowerRoutine = 1
if(((!my_area.power_equip) || istype(T, /turf/space)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
if(!aiRestorePowerRoutine)
aiRestorePowerRoutine = 1
src << "You've lost power!"
// world << "DEBUG CODE TIME! [loc] is the area the AI is sucking power from"
if (!is_special_character(src))
src.set_zeroth_law("")
//src.clear_supplied_laws() // Don't reset our laws.
//var/time = time2text(world.realtime,"hh:mm:ss")
//lawchanges.Add("[time] <b>:</b> [src.name]'s noncore laws have been reset due to power failure")
spawn(20)
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
sleep(50)
if (loc.power_equip)
src << "<span class='danger'>You have lost power!</span>"
if(!is_special_character(src))
set_zeroth_law("")
spawn(20)
src << "Backup battery online. Scanners, camera, and radio interface offline. Beginning fault-detection."
sleep(50)
my_area = get_area(src)
T = get_turf(src)
if(my_area && my_area.power_equip && !istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
aiRestorePowerRoutine = 0
blind.layer = 0
return
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
sleep(20)
src << "Emergency control system online. Verifying connection to power network."
sleep(50)
T = get_turf(src)
if(istype(T, /turf/space))
src << "Unable to verify! No power connection detected!"
aiRestorePowerRoutine = 2
return
src << "Connection verified. Searching for APC in power network."
sleep(50)
my_area = get_area(src)
T = get_turf(src)
var/obj/machinery/power/apc/theAPC = null
var/PRP
for(PRP = 1, PRP <= 4, PRP++)
for(var/obj/machinery/power/apc/APC in my_area)
if (!(APC.stat & BROKEN))
theAPC = APC
break
if(!theAPC)
switch(PRP)
if(1) src << "Unable to locate APC!"
else src << "Lost connection with the APC!"
aiRestorePowerRoutine = 2
return
if(my_area.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0
aiRestorePowerRoutine = 0
blind.layer = 0
return
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
sleep(20)
src << "Emergency control system online. Verifying connection to power network."
sleep(50)
if (istype(T, /turf/space))
src << "Unable to verify! No power connection detected!"
src:aiRestorePowerRoutine = 2
return
src << "Connection verified. Searching for APC in power network."
sleep(50)
var/obj/machinery/power/apc/theAPC = null
/*
for (var/something in loc)
if (istype(something, /obj/machinery/power/apc))
if (!(something:stat & BROKEN))
theAPC = something
break
*/
var/PRP
for (PRP=1, PRP<=4, PRP++)
for (var/obj/machinery/power/apc/APC in current_area)
if (!(APC.stat & BROKEN))
theAPC = APC
break
if (!theAPC)
switch(PRP)
if (1) src << "Unable to locate APC!"
else src << "Lost connection with the APC!"
src:aiRestorePowerRoutine = 2
return
if (loc.power_equip)
if (!istype(T, /turf/space))
src << "Alert cancelled. Power has been restored without our assistance."
src:aiRestorePowerRoutine = 0
src.blind.layer = 0 //This, too, is a fix to issue 603
return
switch(PRP)
if (1) src << "APC located. Optimizing route to APC to avoid needless power waste."
if (2) src << "Best route identified. Hacking offline APC power port."
if (3) src << "Power port upload access confirmed. Loading control program into APC power port software."
if (4)
src << "Transfer complete. Forcing APC to execute program."
sleep(50)
src << "Receiving control information from APC."
sleep(2)
//bring up APC dialog
apc_override = 1
theAPC.attack_ai(src)
apc_override = 0
src:aiRestorePowerRoutine = 3
src << "Here are your current laws:"
src.show_laws()
sleep(50)
theAPC = null
switch(PRP)
if(1) src << "APC located. Optimizing route to APC to avoid needless power waste."
if(2) src << "Best route identified. Hacking offline APC power port."
if(3) src << "Power port upload access confirmed. Loading control program into APC power port software."
if(4)
src << "Transfer complete. Forcing APC to execute program."
sleep(50)
src << "Receiving control information from APC."
sleep(2)
//bring up APC dialog
apc_override = 1
theAPC.attack_ai(src)
apc_override = 0
aiRestorePowerRoutine = 3
src << "Here are your current laws:"
src.show_laws() //WHY THE FUCK IS THIS HERE
sleep(50)
theAPC = null
process_queued_alarms()
regular_hud_updates()
switch(src.sensor_mode)
switch(sensor_mode)
if (SEC_HUD)
process_sec_hud(src,1,src.eyeobj)
process_sec_hud(src, 1, eyeobj)
if (MED_HUD)
process_med_hud(src,1,src.eyeobj)
process_med_hud(src, 1, eyeobj)
/mob/living/silicon/ai/updatehealth()
if(status_flags & GODMODE)
+3 -9
View File
@@ -1,11 +1,9 @@
/mob/living/silicon/pai/Life()
. = ..()
if(.)
regular_hud_updates()
if(src.secHUD == 1)
if(secHUD == 1)
process_sec_hud(src, 1)
if(src.medHUD == 1)
if(medHUD == 1)
process_med_hud(src, 1)
if(silence_time)
if(world.timeofday >= silence_time)
@@ -19,9 +17,6 @@
M.show_message("\red The data cable rapidly retracts back into its spool.", 3, "\red You hear a click and the sound of wire spooling rapidly.", 2)
qdel(src.cable)
handle_statuses()
/mob/living/silicon/pai/updatehealth()
if(status_flags & GODMODE)
health = 100
@@ -29,5 +24,4 @@
else
health = 100 - getBruteLoss() - getFireLoss()
if(health <= 0)
death(0)
death(0)
@@ -244,8 +244,6 @@
if(!client)
return
regular_hud_updates()
switch(sensor_mode)
if(SEC_HUD)
process_sec_hud(src,1)
-43
View File
@@ -1324,49 +1324,6 @@ mob/proc/yank_out_object()
host.ckey = src.ckey
host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
/mob/living/proc/handle_statuses()
handle_stunned()
handle_weakened()
handle_stuttering()
handle_silent()
handle_drugged()
handle_slurring()
/mob/living/proc/handle_stunned()
if(stunned)
AdjustStunned(-1)
return stunned
/mob/living/proc/handle_weakened()
if(weakened)
weakened = max(weakened-1,0) //before you get mad Rockdtben: I done this so update_canmove isn't called multiple times
return weakened
/mob/living/proc/handle_stuttering()
if(stuttering)
stuttering = max(stuttering-1, 0)
return stuttering
/mob/living/proc/handle_silent()
if(silent)
silent = max(silent-1, 0)
return silent
/mob/living/proc/handle_drugged()
if(druggy)
druggy = max(druggy-1, 0)
return druggy
/mob/living/proc/handle_slurring()
if(slurring)
slurring = max(slurring-1, 0)
return slurring
/mob/living/proc/handle_paralysed() // Currently only used by simple_animal.dm, treated as a special case in other mobs
if(paralysis)
AdjustParalysis(-1)
return paralysis
/mob/proc/assess_threat() //For sec bot threat assessment
return
+1 -1
View File
@@ -31,7 +31,7 @@
else output += "<p><b>You are ready</b> (<a href='byond://?src=\ref[src];ready=2'>Cancel</A>)</p>"
else
output += "<a href='byond://?src=\ref[src];manifest=1'>View the Crew Manifest</A><br><br>"
output += "<p><a href='byond://?src=\ref[src];manifest=1'>View the Crew Manifest</A></p>"
output += "<p><a href='byond://?src=\ref[src];late_join=1'>Join Game!</A></p>"
output += "<p><a href='byond://?src=\ref[src];observe=1'>Observe</A></p>"
+1 -1
View File
@@ -4,7 +4,7 @@
var/mob/virus_target = null
var/datum/disease2/disease/curr_virus = null
/datum/nano_module/virus2/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = default_state)
/datum/nano_module/virus2/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = admin_state)
var/data[0]
data["virus_target"] = virus_target
+10 -3
View File
@@ -179,9 +179,11 @@ nanoui is used to open and update nano browser uis
* @return /list config data
*/
/datum/nanoui/proc/get_config_data()
var/name = "[src_object]"
name = sanitize(name) //jQuery's parseJSON fails with byond formatting characters in the JSON
var/list/config_data = list(
"title" = title,
"srcObject" = list("name" = "[src_object]"),
"srcObject" = list("name" = name),
"stateKey" = state_key,
"status" = status,
"autoUpdateLayout" = auto_update_layout,
@@ -357,10 +359,11 @@ nanoui is used to open and update nano browser uis
var/url_parameters_json = list2json(list("src" = "\ref[src]"))
return {"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script type='text/javascript'>
function receiveUpdateData(jsonString)
{
@@ -370,6 +373,10 @@ nanoui is used to open and update nano browser uis
{
NanoStateManager.receiveUpdateData(jsonString);
}
else
{
alert('browser.recieveUpdateData failed due to jQuery or NanoStateManager being unavailiable.');
}
}
</script>
[head_content]
@@ -446,7 +453,7 @@ nanoui is used to open and update nano browser uis
var/list/send_data = get_send_data(data)
//user << list2json(data) // used for debugging
//user << list2json_usecache(send_data) // used for debugging //NANO DEBUG HOOK
user << output(list2params(list(list2json_usecache(send_data))),"[window_id].browser:receiveUpdateData")
/**
@@ -1,210 +0,0 @@
/obj/item/weapon/gun/launcher/pneumatic
name = "pneumatic cannon"
desc = "A large gas-powered cannon."
icon = 'icons/obj/gun.dmi'
icon_state = "pneumatic"
item_state = "pneumatic"
w_class = 5.0
flags = CONDUCT
fire_sound_text = "a loud whoosh of moving air"
fire_delay = 50
fire_sound = 'sound/weapons/tablehit1.ogg'
var/fire_pressure // Used in fire checks/pressure checks.
var/max_w_class = 3 // Hopper intake size.
var/max_combined_w_class = 20 // Total internal storage size.
var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon.
var/obj/item/weapon/storage/tank_container = new() // Something to hold the tank item so we don't accidentally fire it.
var/pressure_setting = 10 // Percentage of the gas in the tank used to fire the projectile.
var/possible_pressure_amounts = list(5,10,20,25,50) // Possible pressure settings.
var/minimum_tank_pressure = 10 // Minimum pressure to fire the gun.
var/force_divisor = 400 // Force equates to speed. Speed/5 equates to a damage multiplier for whoever you hit.
// For reference, a fully pressurized oxy tank at 50% gas release firing a health
// analyzer with a force_divisor of 10 hit with a damage multiplier of 3000+.
/obj/item/weapon/gun/launcher/pneumatic/New()
..()
tank_container.tag = "gas_tank_holder"
/obj/item/weapon/gun/launcher/pneumatic/verb/set_pressure() //set amount of tank pressure.
set name = "Set Valve Pressure"
set category = "Object"
set src in range(0)
var/N = input("Percentage of tank used per shot:","[src]") as null|anything in possible_pressure_amounts
if (N)
pressure_setting = N
usr << "You dial the pressure valve to [pressure_setting]%."
/obj/item/weapon/gun/launcher/pneumatic/verb/eject_tank() //Remove the tank.
set name = "Eject Tank"
set category = "Object"
set src in range(0)
if(tank)
usr << "You twist the valve and pop the tank out of [src]."
tank.loc = usr.loc
tank = null
icon_state = "pneumatic"
item_state = "pneumatic"
usr.update_icons()
else
usr << "There's no tank in [src]."
/obj/item/weapon/gun/launcher/pneumatic/attackby(obj/item/W as obj, mob/user as mob, params)
if(!tank && istype(W,/obj/item/weapon/tank))
user.drop_item()
tank = W
tank.loc = src.tank_container
user.visible_message("[user] jams [W] into [src]'s valve and twists it closed.","You jam [W] into [src]'s valve and twist it closed.")
icon_state = "pneumatic-tank"
item_state = "pneumatic-tank"
user.update_icons()
else if(W.w_class <= max_w_class)
var/total_stored = 0
for(var/obj/item/O in src.contents)
total_stored += O.w_class
if(total_stored + W.w_class <= max_combined_w_class)
user.drop_item(W)
W.loc = src
user << "You shove [W] into the hopper."
else
user << "That won't fit into the hopper - it's full."
return
else
user << "That won't fit into the hopper."
/obj/item/weapon/gun/launcher/pneumatic/attack_self(mob/user as mob)
if(contents.len > 0)
var/obj/item/removing = contents[contents.len]
if(removing == in_chamber)
in_chamber = null
removing.loc = get_turf(src)
user.put_in_hands(removing)
user << "You remove [removing] from the hopper."
else
user << "There is nothing to remove in \the [src]."
return
/obj/item/weapon/gun/launcher/pneumatic/chamber_round()
if(!contents.len)
return 0
in_chamber = contents[1]
return !isnull(in_chamber)
/obj/item/weapon/gun/launcher/pneumatic/examine(mob/user)
if(..(user, 2))
user << "The valve is dialed to [pressure_setting]%."
if(tank)
user << "The tank dial reads [tank.air_contents.return_pressure()] kPa."
else
user << "Nothing is attached to the tank valve!"
/obj/item/weapon/gun/launcher/pneumatic/special_check(user)
if (!tank)
user << "There is no gas tank in [src]!"
return 0
fire_pressure = (tank.air_contents.return_pressure()/100)*pressure_setting
if (fire_pressure < minimum_tank_pressure)
user << "There isn't enough gas in the tank to fire [src]."
return 0
return 1
/obj/item/weapon/gun/launcher/pneumatic/update_release_force()
if(!in_chamber) return
release_force = ((fire_pressure*tank.volume)/in_chamber.w_class)/force_divisor //projectile speed.
if(release_force >80) release_force = 80 //damage cap.
/obj/item/weapon/gun/launcher/pneumatic/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
if(!tank || !..()) return //Only do this on a successful shot.
var/lost_gas_amount = tank.air_contents.total_moles()*(pressure_setting/100)
var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount)
user.loc.assume_air(removed)
//Constructable pneumatic cannon.
/obj/item/weapon/cannonframe
name = "pneumatic cannon frame"
desc = "A half-finished pneumatic cannon."
icon_state = "pneumatic0"
item_state = "pneumatic"
var/buildstate = 0
/obj/item/weapon/cannonframe/update_icon()
icon_state = "pneumatic[buildstate]"
/obj/item/weapon/cannonframe/examine(mob/user)
..(user)
switch(buildstate)
if(1) user << "It has a pipe segment installed."
if(2) user << "It has a pipe segment welded in place."
if(3) user << "It has an outer chassis installed."
if(4) user << "It has an outer chassis welded in place."
if(5) user << "It has a transfer valve installed."
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/pipe))
if(buildstate == 0)
user.drop_item()
qdel(W)
user << "\blue You secure the piping inside the frame."
buildstate++
update_icon()
return
else if(istype(W,/obj/item/stack/sheet/metal))
if(buildstate == 2)
var/obj/item/stack/sheet/metal/M = W
if(M.amount >= 5)
M.use(5)
user << "\blue You assemble a chassis around the cannon frame."
buildstate++
update_icon()
else
user << "\blue You need at least five metal sheets to complete this task."
return
else if(istype(W,/obj/item/device/transfer_valve))
if(buildstate == 4)
user.drop_item()
qdel(W)
user << "\blue You install the transfer valve and connect it to the piping."
buildstate++
update_icon()
return
else if(istype(W,/obj/item/weapon/weldingtool))
if(buildstate == 1)
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the pipe into place."
buildstate++
update_icon()
if(buildstate == 3)
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the metal chassis together."
buildstate++
update_icon()
if(buildstate == 5)
var/obj/item/weapon/weldingtool/T = W
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
user << "\blue You weld the valve into place."
new /obj/item/weapon/gun/launcher/pneumatic(get_turf(src))
qdel(src)
return
else
..()
@@ -44,9 +44,9 @@
/obj/item/projectile/energy/declone
name = "declone"
icon_state = "declone"
damage = 40
damage = 20
damage_type = CLONE
irradiate = 40
irradiate = 10
/obj/item/projectile/energy/dart
+1 -1
View File
@@ -779,7 +779,7 @@
"deathnettle" = list("facid" = 0),
"soybeans" = list("soymilk" = 0),
"tomato" = list("ketchup" = 0),
///obj/item/weapon/reagent_containers/food/snacks/grown/wheat = list("flour" = -5),
"wheat" = list("flour" = -5),
"rice" = list("rice" = -5),
"cherries" = list("cherryjelly" = 0),
)
@@ -105,4 +105,17 @@
result_amount = 1
max_temp = 273
mix_message = "Ice forms as the water freezes."
mix_sound = null
mix_sound = null
dough
name = "Dough"
id = "dough"
result = null
required_reagents = list("water" = 10, "flour" = 15)
result_amount = 1
mix_message = "The ingredients form a dough."
on_reaction(datum/reagents/holder, created_volume)
var/location = get_turf(holder.my_atom)
for(var/i = 1, i <= created_volume, i++)
new /obj/item/weapon/reagent_containers/food/snacks/dough(location)
@@ -6,7 +6,7 @@
//Food items that aren't eaten normally and leave an empty container behind.
/obj/item/weapon/reagent_containers/food/condiment
name = "Condiment Container"
name = "condiment container"
desc = "Just your average condiment container."
icon = 'icons/obj/food/food.dmi'
icon_state = "emptycondiment"
@@ -14,7 +14,18 @@
possible_transfer_amounts = list(1,5,10)
volume = 50
//Possible_states has the reagent id as key and a list of, in order, the icon_state, the name and the desc as values. Used in the on_reagent_change() to change names, descs and sprites.
var/list/possible_states = list("ketchup" = list("ketchup", "Ketchup", "You feel more American already."), "capsaicin" = list("hotsauce", "Hotsauce", "You can almost TASTE the stomach ulcers now!"), "enzyme" = list("enzyme", "Universal Enzyme", "Used in cooking various dishes"), "soysauce" = list("soysauce", "Soy Sauce", "A salty soy-based flavoring"), "frostoil" = list("coldsauce", "Coldsauce", "Leaves the tongue numb in it's passage"), "sodiumchloride" = list("saltshaker", "Salt Shaker", "Salt. From space oceans, presumably"), "blackpepper" = list("pepermillsmall", "Pepper Mill", "Often used to flavor food or make people sneeze"), "cornoil" = list("oliveoil", "Corn Oil", "A delicious oil used in cooking. Made from corn"), "sugar" = list("emptycondiment", "Sugar", "Tasty spacey sugar!"))
var/list/possible_states = list(
"ketchup" = list("ketchup", "ketchup bottle", "You feel more American already."),
"capsaicin" = list("hotsauce", "hotsauce bottle", "You can almost TASTE the stomach ulcers now!"),
"enzyme" = list("enzyme", "universal enzyme bottle", "Used in cooking various dishes"),
"soysauce" = list("soysauce", "soy sauce bottle", "A salty soy-based flavoring"),
"frostoil" = list("coldsauce", "coldsauce bottle", "Leaves the tongue numb in it's passage"),
"sodiumchloride" = list("saltshakersmall", "salt shaker", "Salt. From space oceans, presumably"),
"blackpepper" = list("pepermillsmall", "pepper mill", "Often used to flavor food or make people sneeze"),
"cornoil" = list("oliveoil", "corn oil bottle", "A delicious oil used in cooking. Made from corn"),
"sugar" = list("emptycondiment", "sugar bottle", "Tasty spacey sugar!"),
"flour" =list("flour", "flour sack", "A big bag of flour. Good for baking!"),
"rice" =list("rice", "rice sack", "A big bag of rice. Good for cooking!"))
/obj/item/weapon/reagent_containers/food/condiment/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
@@ -96,7 +107,7 @@
user << "\blue You transfer [trans] units of the condiment to [target]."
/obj/item/weapon/reagent_containers/food/condiment/on_reagent_change()
if(icon_state == "saltshakersmall" || icon_state == "peppermillsmall")
if(!possible_states.len)
return
if(reagents.reagent_list.len > 0)
var/main_reagent = reagents.get_master_reagent_id()
@@ -107,21 +118,22 @@
desc = temp_list[3]
else
name = "Misc Condiment Bottle"
name = "condiment bottle"
main_reagent = reagents.get_master_reagent_name()
if (reagents.reagent_list.len==1)
desc = "Looks like it is [main_reagent], but you are not sure."
desc = "Looks like it is [lowertext(main_reagent)], but you are not sure."
else
desc = "A mixture of various condiments. [main_reagent] is one of them."
desc = "A mixture of various condiments. [lowertext(main_reagent)] is one of them."
icon_state = "mixedcondiments"
else
icon_state = "emptycondiment"
name = "Condiment Bottle"
name = "condiment bottle"
desc = "An empty condiment bottle."
return
/obj/item/weapon/reagent_containers/food/condiment/enzyme
name = "Universal Enzyme"
name = "universal enzyme"
desc = "Used in cooking various dishes."
icon_state = "enzyme"
New()
@@ -129,10 +141,35 @@
reagents.add_reagent("enzyme", 50)
/obj/item/weapon/reagent_containers/food/condiment/sugar
name = "sugar bottle"
desc = "Tasty spacey sugar!"
New()
..()
reagents.add_reagent("sugar", 50)
/obj/item/weapon/reagent_containers/food/condiment/flour
name = "flour sack"
desc = "A big bag of flour. Good for baking!"
icon_state = "flour"
item_state = "flour"
possible_states = list()
New()
..()
reagents.add_reagent("flour", 30)
/obj/item/weapon/reagent_containers/food/condiment/rice
name = "rice sack"
desc = "A big bag of rice. Good for cooking!"
icon_state = "rice"
item_state = "flour"
possible_states = list()
New()
..()
reagents.add_reagent("rice", 30)
/obj/item/weapon/reagent_containers/food/condiment/saltshaker //Seperate from above since it's a small shaker rather then
name = "Salt Shaker" // a large one.
desc = "Salt. From space oceans, presumably."
@@ -140,6 +177,8 @@
possible_transfer_amounts = list(1,20) //for clown turning the lid off
amount_per_transfer_from_this = 1
volume = 20
possible_states = list()
New()
..()
reagents.add_reagent("sodiumchloride", 20)
@@ -151,6 +190,8 @@
possible_transfer_amounts = list(1,20) //for clown turning the lid off
amount_per_transfer_from_this = 1
volume = 20
possible_states = list()
New()
..()
reagents.add_reagent("blackpepper", 20)
@@ -448,6 +448,14 @@
src.name = "frosted donut"
reagents.add_reagent("sprinkles", 2)
/obj/item/weapon/reagent_containers/food/snacks/donut/sprinkles
name = "frosted donut"
icon_state = "donut2"
New()
..()
reagents.add_reagent("nutriment", 3)
reagents.add_reagent("sprinkles", 3)
/obj/item/weapon/reagent_containers/food/snacks/donut/chaos
name = "Chaos Donut"
desc = "Like life, it never quite tastes the same."
@@ -629,14 +637,6 @@
reagents.add_reagent("nutriment", 2)
reagents.add_reagent("egg", 5)
/obj/item/weapon/reagent_containers/food/snacks/flour
name = "flour"
desc = "A small bag filled with some flour."
icon_state = "flour"
New()
..()
reagents.add_reagent("flour", 5)
/obj/item/weapon/reagent_containers/food/snacks/organ
name = "organ"
@@ -3176,22 +3176,6 @@
..()
reagents.add_reagent("nutriment", 3)
// Flour + egg = dough
/obj/item/weapon/reagent_containers/food/snacks/flour/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/egg))
new /obj/item/weapon/reagent_containers/food/snacks/dough(src)
user << "You make some dough."
qdel(W)
qdel(src)
// Egg + flour = dough
/obj/item/weapon/reagent_containers/food/snacks/egg/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/reagent_containers/food/snacks/flour))
new /obj/item/weapon/reagent_containers/food/snacks/dough(src)
user << "You make some dough."
qdel(W)
qdel(src)
/obj/item/weapon/reagent_containers/food/snacks/dough
name = "dough"
desc = "A piece of dough."