author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
686,936
30.12.2022 15:30:39
0
151109a8904b4136b93d5f22c170580c36aaabf1
Upgraded HTTP Client to 5.2.1
[ { "change_type": "MODIFY", "old_path": "build.gradle", "new_path": "build.gradle", "diff": "@@ -58,7 +58,7 @@ dependencies {\napi \"com.fasterxml.jackson.core:jackson-core\",\n\"com.fasterxml.jackson.core:jackson-annotations\",\n\"com.fasterxml.jackson.core:jackson-databind\"\n- api \"org.apache.httpcomponents.client5:httpclient5:5.1.3\"\n+ api \"org.apache.httpcomponents.client5:httpclient5:5.2.1\"\napi \"org.xmlunit:xmlunit-core:$versions.xmlUnit\"\napi \"org.xmlunit:xmlunit-legacy:$versions.xmlUnit\", {\nexclude group: 'junit', module: 'junit'\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/client/ResponseDefinitionBuilderTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/client/ResponseDefinitionBuilderTest.java", "diff": "/*\n- * Copyright (C) 2012-2021 Thomas Akehurst\n+ * Copyright (C) 2012-2022 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -27,8 +27,8 @@ import com.github.tomakehurst.wiremock.http.Fault;\nimport com.github.tomakehurst.wiremock.http.HttpHeader;\nimport com.github.tomakehurst.wiremock.http.HttpHeaders;\nimport com.github.tomakehurst.wiremock.http.ResponseDefinition;\n+import com.google.common.io.BaseEncoding;\nimport java.nio.charset.StandardCharsets;\n-import org.apache.commons.codec.binary.Base64;\nimport org.junit.jupiter.api.Test;\npublic class ResponseDefinitionBuilderTest {\n@@ -59,7 +59,8 @@ public class ResponseDefinitionBuilderTest {\n.withStatus(200)\n.withStatusMessage(\"OK\")\n.withBody(\"some body\")\n- .withBase64Body(Base64.encodeBase64String(\"some body\".getBytes(StandardCharsets.UTF_8)))\n+ .withBase64Body(\n+ BaseEncoding.base64().encode(\"some body\".getBytes(StandardCharsets.UTF_8)))\n.withBodyFile(\"some_body.json\")\n.withHeader(\"some header\", \"some value\")\n.withFixedDelay(100)\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/http/BodyTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/http/BodyTest.java", "diff": "/*\n- * Copyright (C) 2015-2021 Thomas Akehurst\n+ * Copyright (C) 2015-2022 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -22,7 +22,7 @@ import static org.hamcrest.Matchers.is;\nimport com.fasterxml.jackson.databind.JsonNode;\nimport com.fasterxml.jackson.databind.node.IntNode;\nimport com.github.tomakehurst.wiremock.common.Json;\n-import org.apache.commons.codec.binary.Base64;\n+import com.google.common.io.BaseEncoding;\nimport org.junit.jupiter.api.Test;\npublic class BodyTest {\n@@ -58,7 +58,7 @@ public class BodyTest {\n@Test\npublic void constructsFromBase64() {\n- byte[] base64Encoded = Base64.encodeBase64(\"this content\".getBytes());\n+ byte[] base64Encoded = BaseEncoding.base64().encode(\"this content\".getBytes()).getBytes();\nString encodedText = stringFromBytes(base64Encoded);\nBody body = Body.fromOneOf(null, null, null, encodedText);\n" }, { "change_type": "MODIFY", "old_path": "wiremock-webhooks-extension/build.gradle", "new_path": "wiremock-webhooks-extension/build.gradle", "diff": "@@ -32,7 +32,7 @@ dependencies {\nexclude group: 'org.mozilla', module: 'rhino'\n}\nimplementation \"com.google.guava:guava:$versions.guava\"\n- implementation \"org.apache.httpcomponents.client5:httpclient5:5.1.3\"\n+ implementation \"org.apache.httpcomponents.client5:httpclient5:5.2.1\"\ntestImplementation project(\":\")\ntestImplementation(platform('org.junit:junit-bom:5.9.1'))\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Upgraded HTTP Client to 5.2.1
686,936
30.12.2022 18:23:48
0
d225ee7b9b69a9d5995ecc338adad16deb020af3
Updated arch rules exception file
[ { "change_type": "MODIFY", "old_path": "src/test/resources/frozen/do-not-throw-generic-exception", "new_path": "src/test/resources/frozen/do-not-throw-generic-exception", "diff": "@@ -9,9 +9,6 @@ Method <com.github.tomakehurst.wiremock.common.ClasspathFileSource.assertExistsA\nMethod <com.github.tomakehurst.wiremock.common.ClasspathFileSource.getZipEntryUri(java.lang.String)> calls constructor <java.lang.RuntimeException.<init>(java.lang.String)> in (ClasspathFileSource.java:114)\nMethod <com.github.tomakehurst.wiremock.common.HttpClientUtils.getEntityAsByteArrayAndCloseStream(org.apache.hc.core5.http.ClassicHttpResponse)> calls constructor <java.lang.RuntimeException.<init>(java.lang.Throwable)> in (HttpClientUtils.java:52)\nMethod <com.github.tomakehurst.wiremock.common.HttpClientUtils.getEntityAsStringAndCloseStream(org.apache.hc.core5.http.ClassicHttpResponse)> calls constructor <java.lang.RuntimeException.<init>(java.lang.Throwable)> in (HttpClientUtils.java:37)\n-Method <com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.start()> calls constructor <java.lang.RuntimeException.<init>(java.lang.String)> in (JettyHttpServer.java:208)\n-Method <com.github.tomakehurst.wiremock.jetty9.JettyHttpServer.start()> calls constructor <java.lang.RuntimeException.<init>(java.lang.Throwable)> in (JettyHttpServer.java:198)\n-Method <com.github.tomakehurst.wiremock.common.StreamSources$3.getStream()> calls constructor <java.lang.RuntimeException.<init>(java.lang.Throwable)> in (StreamSources.java:51)\nMethod <com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start()> calls constructor <java.lang.RuntimeException.<init>(java.lang.String)> in (JettyHttpServer.java:230)\nMethod <com.github.tomakehurst.wiremock.jetty.JettyHttpServer.start()> calls constructor <java.lang.RuntimeException.<init>(java.lang.Throwable)> in (JettyHttpServer.java:220)\nMethod <com.github.tomakehurst.wiremock.servlet.WireMockHttpServletRequestAdapter.getBody()> calls constructor <java.lang.RuntimeException.<init>(java.lang.Throwable)> in (WireMockHttpServletRequestAdapter.java:144)\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Updated arch rules exception file
686,936
30.12.2022 18:52:12
0
3b011707b50a79090bf5e462edca29baceb25ea1
Bumped version to 3.0.0-beta-2
[ { "change_type": "MODIFY", "old_path": "build.gradle", "new_path": "build.gradle", "diff": "@@ -200,7 +200,7 @@ allprojects {\nmavenCentral()\n}\n- version = '3.0.0-beta-1'\n+ version = '3.0.0-beta-2'\nsourceCompatibility = 11\n" }, { "change_type": "MODIFY", "old_path": "src/main/resources/swagger/wiremock-admin-api.json", "new_path": "src/main/resources/swagger/wiremock-admin-api.json", "diff": "\"openapi\": \"3.0.0\",\n\"info\": {\n\"title\": \"WireMock\",\n- \"version\": \"3.0.0-beta-1\"\n+ \"version\": \"3.0.0-beta-2\"\n},\n\"externalDocs\": {\n\"description\": \"WireMock user documentation\",\n" }, { "change_type": "MODIFY", "old_path": "src/main/resources/swagger/wiremock-admin-api.yaml", "new_path": "src/main/resources/swagger/wiremock-admin-api.yaml", "diff": "@@ -2,7 +2,7 @@ openapi: 3.0.0\ninfo:\ntitle: WireMock\n- version: 3.0.0-beta-1\n+ version: 3.0.0-beta-2\nexternalDocs:\ndescription: WireMock user documentation\n" }, { "change_type": "MODIFY", "old_path": "ui/package-lock.json", "new_path": "ui/package-lock.json", "diff": "{\n\"name\": \"wiremock-ui-resources\",\n- \"version\": \"3.0.0-beta-1\",\n+ \"version\": \"3.0.0-beta-2\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n" }, { "change_type": "MODIFY", "old_path": "ui/package.json", "new_path": "ui/package.json", "diff": "{\n\"name\": \"wiremock-ui-resources\",\n- \"version\": \"3.0.0-beta-1\",\n+ \"version\": \"3.0.0-beta-2\",\n\"description\": \"WireMock UI resources processor\",\n\"engines\": {\n\"node\": \">= 0.10.0\"\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Bumped version to 3.0.0-beta-2
686,936
09.01.2023 09:11:35
28,800
d09d6a49c79a26fcde801d1278797324340e663e
Improved URL template acceptance test
[ { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/UrlPathTemplateMatchingTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/UrlPathTemplateMatchingTest.java", "diff": "@@ -29,6 +29,8 @@ public class UrlPathTemplateMatchingTest extends AcceptanceTestBase {\nassertThat(testClient.get(\"/v1/contacts/12345\").statusCode(), is(200));\nassertThat(testClient.get(\"/v1/contacts/23456\").statusCode(), is(200));\n+\n+ assertThat(testClient.get(\"/v2/contacts/23456\").statusCode(), is(404));\n}\n@Test\n@@ -40,6 +42,9 @@ public class UrlPathTemplateMatchingTest extends AcceptanceTestBase {\n.willReturn(ok()));\nassertThat(testClient.get(\"/v1/contacts/12345/addresses/99876\").statusCode(), is(200));\n+\n+ assertThat(testClient.get(\"/v1/contacts/12345/addresses/55555\").statusCode(), is(404));\n+ assertThat(testClient.get(\"/v1/contacts/23456/addresses/99876\").statusCode(), is(404));\nassertThat(testClient.get(\"/v1/contacts/23456/addresses/55555\").statusCode(), is(404));\n}\n}\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Improved URL template acceptance test
686,936
09.01.2023 11:21:42
28,800
c3bdb93a7aca437ad6711e5885e5b20fe1428f4e
Added support for referencing path parameters by name in response templates
[ { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/RequestLine.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/RequestLine.java", "diff": "/*\n- * Copyright (C) 2017-2021 Thomas Akehurst\n+ * Copyright (C) 2017-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -17,6 +17,7 @@ package com.github.tomakehurst.wiremock.extension.responsetemplating;\nimport com.github.tomakehurst.wiremock.common.ListOrSingle;\nimport com.github.tomakehurst.wiremock.common.Urls;\n+import com.github.tomakehurst.wiremock.common.url.PathTemplate;\nimport com.github.tomakehurst.wiremock.http.MultiValue;\nimport com.github.tomakehurst.wiremock.http.QueryParameter;\nimport com.github.tomakehurst.wiremock.http.Request;\n@@ -36,22 +37,26 @@ public class RequestLine {\nprivate final Map<String, ListOrSingle<String>> query;\nprivate final String url;\n+ private final PathTemplate pathTemplate;\n+\nprivate RequestLine(\nRequestMethod method,\nString scheme,\nString host,\nint port,\nString url,\n- Map<String, ListOrSingle<String>> query) {\n+ Map<String, ListOrSingle<String>> query,\n+ PathTemplate pathTemplate) {\nthis.method = method;\nthis.scheme = scheme;\nthis.host = host;\nthis.port = port;\nthis.url = url;\nthis.query = query;\n+ this.pathTemplate = pathTemplate;\n}\n- public static RequestLine fromRequest(final Request request) {\n+ public static RequestLine fromRequest(final Request request, final PathTemplate pathTemplate) {\nURI url = URI.create(request.getUrl());\nMap<String, QueryParameter> rawQuery = Urls.splitQuery(url);\nMap<String, ListOrSingle<String>> adaptedQuery =\n@@ -62,15 +67,16 @@ public class RequestLine {\nrequest.getHost(),\nrequest.getPort(),\nrequest.getUrl(),\n- adaptedQuery);\n+ adaptedQuery,\n+ pathTemplate);\n}\npublic RequestMethod getMethod() {\nreturn method;\n}\n- public UrlPath getPathSegments() {\n- return new UrlPath(url);\n+ public Object getPathSegments() {\n+ return pathTemplate == null ? new UrlPath(url) : new TemplatedUrlPath(url, pathTemplate);\n}\npublic String getPath() {\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/RequestTemplateModel.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/RequestTemplateModel.java", "diff": "/*\n- * Copyright (C) 2016-2022 Thomas Akehurst\n+ * Copyright (C) 2016-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\npackage com.github.tomakehurst.wiremock.extension.responsetemplating;\nimport com.github.tomakehurst.wiremock.common.ListOrSingle;\n+import com.github.tomakehurst.wiremock.common.url.PathTemplate;\nimport com.github.tomakehurst.wiremock.http.Cookie;\nimport com.github.tomakehurst.wiremock.http.Request;\nimport com.github.tomakehurst.wiremock.http.RequestMethod;\n@@ -43,7 +44,11 @@ public class RequestTemplateModel {\n}\npublic static RequestTemplateModel from(final Request request) {\n- RequestLine requestLine = RequestLine.fromRequest(request);\n+ return from(request, null);\n+ }\n+\n+ public static RequestTemplateModel from(final Request request, final PathTemplate pathTemplate) {\n+ RequestLine requestLine = RequestLine.fromRequest(request, pathTemplate);\nMap<String, ListOrSingle<String>> adaptedHeaders = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\nadaptedHeaders.putAll(\nMaps.toMap(\n@@ -76,11 +81,11 @@ public class RequestTemplateModel {\nreturn requestLine.getMethod();\n}\n- public UrlPath getPathSegments() {\n+ public Object getPathSegments() {\nreturn requestLine.getPathSegments();\n}\n- public UrlPath getPath() {\n+ public Object getPath() {\nreturn requestLine.getPathSegments();\n}\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/ResponseTemplateTransformer.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/ResponseTemplateTransformer.java", "diff": "/*\n- * Copyright (C) 2016-2022 Thomas Akehurst\n+ * Copyright (C) 2016-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -22,10 +22,12 @@ import com.github.jknack.handlebars.Helper;\nimport com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder;\nimport com.github.tomakehurst.wiremock.common.FileSource;\nimport com.github.tomakehurst.wiremock.common.TextFile;\n+import com.github.tomakehurst.wiremock.common.url.PathTemplate;\nimport com.github.tomakehurst.wiremock.extension.Parameters;\nimport com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer;\nimport com.github.tomakehurst.wiremock.extension.StubLifecycleListener;\nimport com.github.tomakehurst.wiremock.http.*;\n+import com.github.tomakehurst.wiremock.stubbing.ServeEvent;\nimport com.github.tomakehurst.wiremock.stubbing.StubMapping;\nimport com.google.common.collect.ImmutableList;\nimport com.google.common.collect.ImmutableMap;\n@@ -91,10 +93,12 @@ public class ResponseTemplateTransformer extends ResponseDefinitionTransformer\nResponseDefinitionBuilder newResponseDefBuilder =\nResponseDefinitionBuilder.like(responseDefinition);\n+ final PathTemplate pathTemplate = getCurrentEventPathTemplate();\n+\nfinal ImmutableMap<String, Object> model =\nImmutableMap.<String, Object>builder()\n.put(\"parameters\", firstNonNull(parameters, Collections.<String, Object>emptyMap()))\n- .put(\"request\", RequestTemplateModel.from(request))\n+ .put(\"request\", RequestTemplateModel.from(request, pathTemplate))\n.putAll(addExtraModelElements(request, responseDefinition, files, parameters))\n.build();\n@@ -182,6 +186,14 @@ public class ResponseTemplateTransformer extends ResponseDefinitionTransformer\n}\n}\n+ private static PathTemplate getCurrentEventPathTemplate() {\n+ if (ServeEvent.getCurrent() == null) {\n+ return null;\n+ }\n+\n+ return ServeEvent.getCurrent().getStubMapping().getRequest().getUrlMatcher().getPathTemplate();\n+ }\n+\n/** Override this to add extra elements to the template model */\nprotected Map<String, Object> addExtraModelElements(\nRequest request,\n" }, { "change_type": "ADD", "old_path": null, "new_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/TemplatedUrlPath.java", "diff": "+/*\n+ * Copyright (C) 2023 Thomas Akehurst\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.github.tomakehurst.wiremock.extension.responsetemplating;\n+\n+import com.github.tomakehurst.wiremock.common.url.PathTemplate;\n+import java.net.URI;\n+import java.util.LinkedHashMap;\n+\n+public class TemplatedUrlPath extends LinkedHashMap<String, String> {\n+\n+ private final String originalPath;\n+\n+ public TemplatedUrlPath(String url, PathTemplate pathTemplate) {\n+ this.originalPath = URI.create(url).getPath();\n+ putAll(pathTemplate.parse(url));\n+ }\n+\n+ @Override\n+ public String toString() {\n+ return originalPath;\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/matching/UrlPattern.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/matching/UrlPattern.java", "diff": "@@ -17,6 +17,7 @@ package com.github.tomakehurst.wiremock.matching;\nimport com.fasterxml.jackson.annotation.JsonValue;\nimport com.github.tomakehurst.wiremock.client.WireMock;\n+import com.github.tomakehurst.wiremock.common.url.PathTemplate;\nimport com.google.common.base.Objects;\npublic class UrlPattern implements NamedValueMatcher<String> {\n@@ -71,6 +72,10 @@ public class UrlPattern implements NamedValueMatcher<String> {\nreturn pattern;\n}\n+ public PathTemplate getPathTemplate() {\n+ return null;\n+ }\n+\n@Override\npublic String getExpected() {\nreturn pattern.expectedValue;\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/stubbing/AbstractStubMappings.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/stubbing/AbstractStubMappings.java", "diff": "/*\n- * Copyright (C) 2022 Thomas Akehurst\n+ * Copyright (C) 2022-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -33,7 +33,6 @@ import com.github.tomakehurst.wiremock.matching.StringValuePattern;\nimport com.github.tomakehurst.wiremock.store.BlobStore;\nimport com.github.tomakehurst.wiremock.store.StubMappingStore;\nimport com.github.tomakehurst.wiremock.store.files.BlobStoreFileSource;\n-import com.github.tomakehurst.wiremock.verification.LoggedRequest;\nimport com.google.common.collect.ImmutableList;\nimport java.util.List;\nimport java.util.Map;\n@@ -79,12 +78,17 @@ public abstract class AbstractStubMappings implements StubMappings {\nscenarios.onStubServed(matchingMapping);\n+ ServeEvent serveEvent = ServeEvent.of(request, matchingMapping);\n+ ServeEvent.setCurrent(serveEvent);\n+\nResponseDefinition responseDefinition =\napplyTransformations(\nrequest, matchingMapping.getResponse(), ImmutableList.copyOf(transformers.values()));\n- return ServeEvent.of(\n- LoggedRequest.createFrom(request), copyOf(responseDefinition), matchingMapping);\n+ serveEvent = serveEvent.withResponseDefinition(copyOf(responseDefinition));\n+ ServeEvent.setCurrent(serveEvent);\n+\n+ return serveEvent;\n}\nprivate ResponseDefinition applyTransformations(\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/stubbing/ServeEvent.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/stubbing/ServeEvent.java", "diff": "/*\n- * Copyright (C) 2016-2022 Thomas Akehurst\n+ * Copyright (C) 2016-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -23,6 +23,7 @@ import com.github.tomakehurst.wiremock.common.Errors;\nimport com.github.tomakehurst.wiremock.common.Timing;\nimport com.github.tomakehurst.wiremock.extension.PostServeActionDefinition;\nimport com.github.tomakehurst.wiremock.http.LoggedResponse;\n+import com.github.tomakehurst.wiremock.http.Request;\nimport com.github.tomakehurst.wiremock.http.Response;\nimport com.github.tomakehurst.wiremock.http.ResponseDefinition;\nimport com.github.tomakehurst.wiremock.verification.LoggedRequest;\n@@ -35,6 +36,9 @@ import java.util.concurrent.atomic.AtomicReference;\npublic class ServeEvent {\n+ private static final InheritableThreadLocal<ServeEvent> currentEvent =\n+ new InheritableThreadLocal<>();\n+\nprivate final UUID id;\nprivate final LoggedRequest request;\nprivate final StubMapping stubMapping;\n@@ -59,7 +63,7 @@ public class ServeEvent {\nthis.timing = new AtomicReference<>(timing);\n}\n- public ServeEvent(\n+ protected ServeEvent(\nLoggedRequest request, StubMapping stubMapping, ResponseDefinition responseDefinition) {\nthis(UUID.randomUUID(), request, stubMapping, responseDefinition, null, false, null);\n}\n@@ -80,6 +84,14 @@ public class ServeEvent {\nreturn new ServeEvent(request, null, ResponseDefinition.notPermitted(errors));\n}\n+ public static ServeEvent of(Request request) {\n+ return new ServeEvent(LoggedRequest.createFrom(request), null, null);\n+ }\n+\n+ public static ServeEvent of(Request request, StubMapping stubMapping) {\n+ return new ServeEvent(LoggedRequest.createFrom(request), stubMapping, null);\n+ }\n+\npublic static ServeEvent of(LoggedRequest request, ResponseDefinition responseDefinition) {\nreturn new ServeEvent(request, null, responseDefinition);\n}\n@@ -89,6 +101,19 @@ public class ServeEvent {\nreturn new ServeEvent(request, stubMapping, responseDefinition);\n}\n+ public static ServeEvent getCurrent() {\n+ return currentEvent.get();\n+ }\n+\n+ public static void setCurrent(ServeEvent serveEvent) {\n+ currentEvent.set(serveEvent);\n+ }\n+\n+ public ServeEvent withResponseDefinition(ResponseDefinition responseDefinition) {\n+ return new ServeEvent(\n+ id, request, stubMapping, responseDefinition, response, false, getTiming());\n+ }\n+\npublic ServeEvent complete(\nResponse response, int processTimeMillis, DataTruncationSettings dataTruncationSettings) {\nreturn new ServeEvent(\n@@ -107,7 +132,7 @@ public class ServeEvent {\n@JsonIgnore\npublic boolean isNoExactMatch() {\n- return !responseDefinition.wasConfigured();\n+ return responseDefinition == null || !responseDefinition.wasConfigured();\n}\npublic UUID getId() {\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/ResponseTemplatingAcceptanceTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/ResponseTemplatingAcceptanceTest.java", "diff": "/*\n- * Copyright (C) 2016-2022 Thomas Akehurst\n+ * Copyright (C) 2016-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -258,6 +258,19 @@ public class ResponseTemplatingAcceptanceTest {\nassertThat(client.get(\"/squares?filter[id]=321\").content(), is(\"ID: 321\"));\nassertThat(client.get(\"/squares?filter%5Bid%5D=321\").content(), is(\"ID: 321\"));\n}\n+\n+ @Test\n+ void canReadPathParametersFromModelWhenStubUsesPathTemplate() {\n+ wm.stubFor(\n+ get(urlPathTemplate(\"/v1/contacts/{contactId}/addresses/{addressId}\"))\n+ .willReturn(\n+ ok(\n+ \"contactId: {{request.path.contactId}}, addressId: {{request.path.addressId}}\")));\n+\n+ String content = client.get(\"/v1/contacts/12345/addresses/67890\").content();\n+\n+ assertThat(content, is(\"contactId: 12345, addressId: 67890\"));\n+ }\n}\n@Nested\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/verification/InMemoryRequestJournalTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/verification/InMemoryRequestJournalTest.java", "diff": "/*\n- * Copyright (C) 2014-2022 Thomas Akehurst\n+ * Copyright (C) 2014-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -41,9 +41,9 @@ public class InMemoryRequestJournalTest {\n@BeforeEach\npublic void createTestRequests() {\n- serveEvent1 = ServeEvent.of(createFrom(aRequest(\"log1\").withUrl(\"/logging1\").build()), null);\n- serveEvent2 = ServeEvent.of(createFrom(aRequest(\"log2\").withUrl(\"/logging2\").build()), null);\n- serveEvent3 = ServeEvent.of(createFrom(aRequest(\"log3\").withUrl(\"/logging3\").build()), null);\n+ serveEvent1 = ServeEvent.of(createFrom(aRequest(\"log1\").withUrl(\"/logging1\").build()));\n+ serveEvent2 = ServeEvent.of(createFrom(aRequest(\"log2\").withUrl(\"/logging2\").build()));\n+ serveEvent3 = ServeEvent.of(createFrom(aRequest(\"log3\").withUrl(\"/logging3\").build()));\n}\n@Test\n@@ -65,7 +65,7 @@ public class InMemoryRequestJournalTest {\nLoggedRequest loggedRequest = createFrom(aRequest().withUrl(\"/for/logging\").build());\nRequestJournal journal = new InMemoryRequestJournal(Optional.of(1), NO_CUSTOM_MATCHERS);\n- journal.requestReceived(ServeEvent.of(loggedRequest, null));\n+ journal.requestReceived(ServeEvent.of(loggedRequest));\nassertThat(journal.countRequestsMatching(everything()), is(1));\njournal.reset();\nassertThat(journal.countRequestsMatching(everything()), is(0));\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Added support for referencing path parameters by name in response templates
686,936
09.01.2023 12:32:36
28,800
80eb564c1e3aaadbccd579eefd5443572b6d3ce7
Added a validation rule throwing an error if path parameter matchers are used without a path template
[ { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/matching/RequestPatternBuilder.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/matching/RequestPatternBuilder.java", "diff": "@@ -21,6 +21,8 @@ import static com.google.common.collect.Maps.newLinkedHashMap;\nimport com.github.tomakehurst.wiremock.client.BasicCredentials;\nimport com.github.tomakehurst.wiremock.client.WireMock;\n+import com.github.tomakehurst.wiremock.common.Errors;\n+import com.github.tomakehurst.wiremock.common.InvalidInputException;\nimport com.github.tomakehurst.wiremock.extension.Parameters;\nimport com.github.tomakehurst.wiremock.http.Request;\nimport com.github.tomakehurst.wiremock.http.RequestMethod;\n@@ -217,6 +219,12 @@ public class RequestPatternBuilder {\n}\npublic RequestPattern build() {\n+ if (!(url instanceof UrlPathTemplatePattern) && !pathParams.isEmpty()) {\n+ throw new InvalidInputException(\n+ Errors.single(\n+ 19, \"URL path parameters specified without a path template as the URL matcher\"));\n+ }\n+\nreturn new RequestPattern(\nscheme,\nhostPattern,\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/UrlPathTemplateMatchingTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/UrlPathTemplateMatchingTest.java", "diff": "@@ -18,7 +18,9 @@ package com.github.tomakehurst.wiremock;\nimport static com.github.tomakehurst.wiremock.client.WireMock.*;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.is;\n+import static org.junit.jupiter.api.Assertions.assertThrows;\n+import com.github.tomakehurst.wiremock.common.InvalidInputException;\nimport org.junit.jupiter.api.Test;\npublic class UrlPathTemplateMatchingTest extends AcceptanceTestBase {\n@@ -47,4 +49,27 @@ public class UrlPathTemplateMatchingTest extends AcceptanceTestBase {\nassertThat(testClient.get(\"/v1/contacts/23456/addresses/99876\").statusCode(), is(404));\nassertThat(testClient.get(\"/v1/contacts/23456/addresses/55555\").statusCode(), is(404));\n}\n+\n+ @Test\n+ void static_dsl_throws_error_when_attempting_to_use_path_param_matchers_without_path_template() {\n+ assertThrows(\n+ InvalidInputException.class,\n+ () ->\n+ stubFor(\n+ get(urlPathEqualTo(\"/stuff\"))\n+ .withPathParam(\"wrong\", containing(\"things\"))\n+ .willReturn(ok())));\n+ }\n+\n+ @Test\n+ void\n+ instance_dsl_throws_error_when_attempting_to_use_path_param_matchers_without_path_template() {\n+ assertThrows(\n+ InvalidInputException.class,\n+ () ->\n+ wm.stubFor(\n+ get(urlPathEqualTo(\"/stuff\"))\n+ .withPathParam(\"wrong\", containing(\"things\"))\n+ .willReturn(ok())));\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/matching/RequestPatternBuilderTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/matching/RequestPatternBuilderTest.java", "diff": "@@ -18,6 +18,7 @@ package com.github.tomakehurst.wiremock.matching;\nimport static com.github.tomakehurst.wiremock.client.WireMock.aMultipart;\nimport static com.github.tomakehurst.wiremock.client.WireMock.equalToJson;\nimport static java.util.Arrays.asList;\n+import static java.util.Collections.emptyMap;\nimport static java.util.Collections.singletonList;\nimport static org.hamcrest.MatcherAssert.assertThat;\nimport static org.hamcrest.Matchers.equalTo;\n@@ -59,7 +60,7 @@ public class RequestPatternBuilderTest {\nWireMock.urlEqualTo(\"/foo\"),\nRequestMethod.POST,\nImmutableMap.of(\"X-Header\", MultiValuePattern.of(WireMock.equalTo(\"bar\"))),\n- ImmutableMap.of(\"path_param\", WireMock.equalTo(\"1234\")),\n+ emptyMap(),\nImmutableMap.of(\"query_param\", MultiValuePattern.of(WireMock.equalTo(\"bar\"))),\nImmutableMap.of(\"cookie\", WireMock.equalTo(\"yum\")),\nnew BasicCredentials(\"user\", \"pass\"),\n@@ -118,7 +119,7 @@ public class RequestPatternBuilderTest {\nWireMock.urlEqualTo(\"/foo\"),\nRequestMethod.POST,\nImmutableMap.of(\"X-Header\", MultiValuePattern.of(WireMock.equalTo(\"bar\"))),\n- ImmutableMap.of(\"path_param\", WireMock.equalTo(\"12345\")),\n+ emptyMap(),\nImmutableMap.of(\"query_param\", MultiValuePattern.of(WireMock.equalTo(\"bar\"))),\nImmutableMap.of(\"cookie\", WireMock.equalTo(\"yum\")),\nnew BasicCredentials(\"user\", \"pass\"),\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Added a validation rule throwing an error if path parameter matchers are used without a path template
686,936
14.01.2023 17:39:47
28,800
51300762f14b4565ae01c4663423e573ada04191
Now strips format characters from path parameter names so that the parameter can be accessed via just its name when format attributes are present
[ { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/common/url/PathTemplate.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/common/url/PathTemplate.java", "diff": "@@ -51,8 +51,9 @@ public class PathTemplate {\nString variable = matcher.group(\"variable\");\nif (variable != null) {\n- parserBuilder.addVariable(variable);\n- rendererBuilder.addVariable(variable);\n+ String variableName = stripFormatCharacters(variable);\n+ parserBuilder.addVariable(variableName);\n+ rendererBuilder.addVariable(variableName);\n}\nString wildcard = matcher.group(\"wildcard\");\n@@ -87,6 +88,13 @@ public class PathTemplate {\nreturn templateString.replaceAll(SPECIAL_SYMBOL_REGEX.pattern(), \"\");\n}\n+ private static String stripFormatCharacters(String parameter) {\n+ return parameter\n+ .replace(\".\", \"\")\n+ .replace(\";\", \"\")\n+ .replace(\"*\", \"\");\n+ }\n+\n@Override\npublic boolean equals(Object o) {\nif (this == o) return true;\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/common/url/PathTemplateTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/common/url/PathTemplateTest.java", "diff": "@@ -226,4 +226,26 @@ public class PathTemplateTest {\nassertFalse(PathTemplate.couldBePathTemplate(\"/things/in/path\"));\nassertFalse(PathTemplate.couldBePathTemplate(\"/thing\"));\n}\n+\n+ @Test\n+ void correctlyStripsFormatCharactersFromKeysWhenParsing() {\n+ PathTemplate pathTemplate = new PathTemplate(\"/one/{.first}/two/{;second*}\");\n+ PathParams pathParams = pathTemplate.parse(\"/one/.3,4,5/two/;second=1;second=2\");\n+\n+ assertThat(pathParams.get(\"first\"), is(\".3,4,5\"));\n+ assertThat(pathParams.get(\"second\"), is(\";second=1;second=2\"));\n+ }\n+\n+ @Test\n+ void correctlyStripsFormatCharactersFromKeysWhenRendering() {\n+ PathTemplate pathTemplate = new PathTemplate(\"/one/{.first}/two/{;second*}\");\n+\n+ PathParams pathParams = new PathParams()\n+ .add(\"first\", \".3,4,5\")\n+ .add(\"second\", \";second=1;second=2\");\n+\n+ String renderedUrl = pathTemplate.render(pathParams);\n+\n+ assertThat(renderedUrl, is(\"/one/.3,4,5/two/;second=1;second=2\"));\n+ }\n}\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Now strips format characters from path parameter names so that the parameter can be accessed via just its name when format attributes are present
686,936
19.01.2023 09:53:39
0
96bd1fa56bd3a4f3ebc28aff32a23e527ff1c144
The thread local current serve event is now cleared at the end of processing to ensure it's garbage collected as early as possible
[ { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/common/url/PathTemplate.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/common/url/PathTemplate.java", "diff": "@@ -89,10 +89,7 @@ public class PathTemplate {\n}\nprivate static String stripFormatCharacters(String parameter) {\n- return parameter\n- .replace(\".\", \"\")\n- .replace(\";\", \"\")\n- .replace(\"*\", \"\");\n+ return parameter.replace(\".\", \"\").replace(\";\", \"\").replace(\"*\", \"\");\n}\n@Override\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/http/AbstractRequestHandler.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/http/AbstractRequestHandler.java", "diff": "/*\n- * Copyright (C) 2011-2022 Thomas Akehurst\n+ * Copyright (C) 2011-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -106,6 +106,9 @@ public abstract class AbstractRequestHandler implements RequestHandler, RequestE\ncompletedServeEvent.afterSend((int) stopwatch.elapsed(MILLISECONDS));\nafterResponseSent(completedServeEvent, response);\n+\n+ ServeEvent.clearCurrent();\n+\nstopwatch.stop();\n}\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/stubbing/ServeEvent.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/stubbing/ServeEvent.java", "diff": "@@ -109,6 +109,10 @@ public class ServeEvent {\ncurrentEvent.set(serveEvent);\n}\n+ public static void clearCurrent() {\n+ currentEvent.remove();\n+ }\n+\npublic ServeEvent withResponseDefinition(ResponseDefinition responseDefinition) {\nreturn new ServeEvent(\nid, request, stubMapping, responseDefinition, response, false, getTiming());\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/common/url/PathTemplateTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/common/url/PathTemplateTest.java", "diff": "@@ -240,9 +240,8 @@ public class PathTemplateTest {\nvoid correctlyStripsFormatCharactersFromKeysWhenRendering() {\nPathTemplate pathTemplate = new PathTemplate(\"/one/{.first}/two/{;second*}\");\n- PathParams pathParams = new PathParams()\n- .add(\"first\", \".3,4,5\")\n- .add(\"second\", \";second=1;second=2\");\n+ PathParams pathParams =\n+ new PathParams().add(\"first\", \".3,4,5\").add(\"second\", \";second=1;second=2\");\nString renderedUrl = pathTemplate.render(pathParams);\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
The thread local current serve event is now cleared at the end of processing to ensure it's garbage collected as early as possible
686,936
19.01.2023 10:11:31
0
41b4f70b665954bac37dd18a1ffd16187662d7ff
Added tests for serialisation/deserialisation of path template pattern
[ { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/common/url/PathTemplate.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/common/url/PathTemplate.java", "diff": "@@ -22,6 +22,7 @@ import com.google.common.base.Objects;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n+import java.util.StringJoiner;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n@@ -92,6 +93,11 @@ public class PathTemplate {\nreturn parameter.replace(\".\", \"\").replace(\";\", \"\").replace(\"*\", \"\");\n}\n+ @Override\n+ public String toString() {\n+ return templateString;\n+ }\n+\n@Override\npublic boolean equals(Object o) {\nif (this == o) return true;\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/matching/PathTemplatePattern.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/matching/PathTemplatePattern.java", "diff": "*/\npackage com.github.tomakehurst.wiremock.matching;\n+import com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fasterxml.jackson.annotation.JsonProperty;\nimport com.github.tomakehurst.wiremock.common.Strings;\nimport com.github.tomakehurst.wiremock.common.url.PathTemplate;\n@@ -32,6 +33,7 @@ public class PathTemplatePattern extends StringValuePattern {\nreturn expectedValue;\n}\n+ @JsonIgnore\npublic PathTemplate getPathTemplate() {\nreturn pathTemplate;\n}\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/matching/PathTemplatePatternTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/matching/PathTemplatePatternTest.java", "diff": "*/\npackage com.github.tomakehurst.wiremock.matching;\n+import static net.javacrumbs.jsonunit.JsonMatchers.jsonEquals;\nimport static org.hamcrest.MatcherAssert.assertThat;\n-import static org.hamcrest.Matchers.closeTo;\n-import static org.hamcrest.Matchers.is;\n+import static org.hamcrest.Matchers.*;\n+import com.github.tomakehurst.wiremock.common.Json;\nimport org.junit.jupiter.api.Test;\npublic class PathTemplatePatternTest {\n@@ -48,4 +49,25 @@ public class PathTemplatePatternTest {\nassertThat(matchResult.isExactMatch(), is(false));\nassertThat(matchResult.getDistance(), closeTo(0.9, 0.05));\n}\n+\n+ @Test\n+ void serialises_correctly() {\n+ PathTemplatePattern pattern = new PathTemplatePattern(\"/one/{first}/two/{second}\");\n+\n+ String json = Json.write(pattern);\n+\n+ assertThat(json, jsonEquals(\"{\\n\" +\n+ \" \\\"matchesPathTemplate\\\": \\\"/one/{first}/two/{second}\\\"\\n\" +\n+ \"}\"));\n+ }\n+\n+ @Test\n+ void deserialises_correcltly() {\n+ StringValuePattern pattern = Json.read(\"{\\n\" +\n+ \" \\\"matchesPathTemplate\\\": \\\"/one/{first}/two/{second}\\\"\\n\" +\n+ \"}\", StringValuePattern.class);\n+\n+ assertThat(pattern, instanceOf(PathTemplatePattern.class));\n+ assertThat(((PathTemplatePattern) pattern).getPathTemplate().toString(), is(\"/one/{first}/two/{second}\"));\n+ }\n}\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Added tests for serialisation/deserialisation of path template pattern
686,936
20.01.2023 13:37:06
0
425ae7e20f9d9c087c2fd1f25ada6af133d7eee8
Wrapped a try/finally around the whole handler to ensure the current serve event is always cleared
[ { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/common/url/PathTemplate.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/common/url/PathTemplate.java", "diff": "@@ -22,7 +22,6 @@ import com.google.common.base.Objects;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n-import java.util.StringJoiner;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/http/AbstractRequestHandler.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/http/AbstractRequestHandler.java", "diff": "@@ -59,6 +59,8 @@ public abstract class AbstractRequestHandler implements RequestHandler, RequestE\nServeEvent serveEvent;\nRequest processedRequest = request;\n+\n+ try {\nif (!requestFilters.isEmpty()) {\nRequestFilterAction requestFilterAction =\nprocessFilters(request, requestFilters, RequestFilterAction.continueWith(request));\n@@ -106,8 +108,9 @@ public abstract class AbstractRequestHandler implements RequestHandler, RequestE\ncompletedServeEvent.afterSend((int) stopwatch.elapsed(MILLISECONDS));\nafterResponseSent(completedServeEvent, response);\n-\n+ } finally {\nServeEvent.clearCurrent();\n+ }\nstopwatch.stop();\n}\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/matching/PathTemplatePatternTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/matching/PathTemplatePatternTest.java", "diff": "@@ -56,18 +56,21 @@ public class PathTemplatePatternTest {\nString json = Json.write(pattern);\n- assertThat(json, jsonEquals(\"{\\n\" +\n- \" \\\"matchesPathTemplate\\\": \\\"/one/{first}/two/{second}\\\"\\n\" +\n- \"}\"));\n+ assertThat(\n+ json,\n+ jsonEquals(\"{\\n\" + \" \\\"matchesPathTemplate\\\": \\\"/one/{first}/two/{second}\\\"\\n\" + \"}\"));\n}\n@Test\nvoid deserialises_correcltly() {\n- StringValuePattern pattern = Json.read(\"{\\n\" +\n- \" \\\"matchesPathTemplate\\\": \\\"/one/{first}/two/{second}\\\"\\n\" +\n- \"}\", StringValuePattern.class);\n+ StringValuePattern pattern =\n+ Json.read(\n+ \"{\\n\" + \" \\\"matchesPathTemplate\\\": \\\"/one/{first}/two/{second}\\\"\\n\" + \"}\",\n+ StringValuePattern.class);\nassertThat(pattern, instanceOf(PathTemplatePattern.class));\n- assertThat(((PathTemplatePattern) pattern).getPathTemplate().toString(), is(\"/one/{first}/two/{second}\"));\n+ assertThat(\n+ ((PathTemplatePattern) pattern).getPathTemplate().toString(),\n+ is(\"/one/{first}/two/{second}\"));\n}\n}\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Wrapped a try/finally around the whole handler to ensure the current serve event is always cleared
686,936
20.01.2023 20:12:01
0
25b82f9f97f3cc09136097b249cfd37aef924c36
Added support for numeric path segment indexes when matching on a path template
[ { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/common/Urls.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/common/Urls.java", "diff": "/*\n- * Copyright (C) 2011-2022 Thomas Akehurst\n+ * Copyright (C) 2011-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n@@ -32,6 +32,7 @@ import java.net.URL;\nimport java.net.URLDecoder;\nimport java.util.Collection;\nimport java.util.Collections;\n+import java.util.List;\nimport java.util.Map;\npublic class Urls {\n@@ -82,6 +83,10 @@ public class Urls {\nreturn url.contains(\"?\") ? url.substring(0, url.indexOf(\"?\")) : url;\n}\n+ public static List<String> getPathSegments(String path) {\n+ return ImmutableList.copyOf(path.split(\"/\"));\n+ }\n+\npublic static String urlToPathParts(URI uri) {\nIterable<String> uriPathNodes = Splitter.on(\"/\").omitEmptyStrings().split(uri.getPath());\nint nodeCount = Iterables.size(uriPathNodes);\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/TemplatedUrlPath.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/TemplatedUrlPath.java", "diff": "*/\npackage com.github.tomakehurst.wiremock.extension.responsetemplating;\n+import com.github.tomakehurst.wiremock.common.Urls;\nimport com.github.tomakehurst.wiremock.common.url.PathTemplate;\nimport java.net.URI;\n+import java.util.Iterator;\nimport java.util.LinkedHashMap;\n+import java.util.List;\n+import org.apache.commons.lang3.StringUtils;\n-public class TemplatedUrlPath extends LinkedHashMap<String, String> {\n+public class TemplatedUrlPath extends LinkedHashMap<String, String> implements Iterable<String> {\nprivate final String originalPath;\npublic TemplatedUrlPath(String url, PathTemplate pathTemplate) {\nthis.originalPath = URI.create(url).getPath();\n+ addAllPathSegments();\nputAll(pathTemplate.parse(url));\n}\n+ private void addAllPathSegments() {\n+ final List<String> pathSegments = Urls.getPathSegments(originalPath);\n+ int i = 0;\n+ for (String pathNode : pathSegments) {\n+ if (StringUtils.isNotEmpty(pathNode)) {\n+ String key = String.valueOf(i++);\n+ put(key, pathNode);\n+ }\n+ }\n+ }\n+\n@Override\npublic String toString() {\nreturn originalPath;\n}\n+\n+ @Override\n+ public Iterator<String> iterator() {\n+ return Urls.getPathSegments(originalPath).iterator();\n+ }\n}\n" }, { "change_type": "MODIFY", "old_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/UrlPath.java", "new_path": "src/main/java/com/github/tomakehurst/wiremock/extension/responsetemplating/UrlPath.java", "diff": "/*\n- * Copyright (C) 2016-2022 Thomas Akehurst\n+ * Copyright (C) 2016-2023 Thomas Akehurst\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n*/\npackage com.github.tomakehurst.wiremock.extension.responsetemplating;\n-import com.google.common.base.Splitter;\n+import com.github.tomakehurst.wiremock.common.Urls;\nimport java.net.URI;\nimport java.util.ArrayList;\nimport org.apache.commons.lang3.StringUtils;\n@@ -26,12 +26,13 @@ public class UrlPath extends ArrayList<String> {\npublic UrlPath(String url) {\noriginalPath = URI.create(url).getPath();\n- Iterable<String> pathNodes = Splitter.on('/').split(originalPath);\n- for (String pathNode : pathNodes) {\n+ Urls.getPathSegments(originalPath)\n+ .forEach(\n+ pathNode -> {\nif (StringUtils.isNotEmpty(pathNode)) {\nadd(pathNode);\n}\n- }\n+ });\n}\n@Override\n" }, { "change_type": "MODIFY", "old_path": "src/test/java/com/github/tomakehurst/wiremock/ResponseTemplatingAcceptanceTest.java", "new_path": "src/test/java/com/github/tomakehurst/wiremock/ResponseTemplatingAcceptanceTest.java", "diff": "@@ -271,6 +271,39 @@ public class ResponseTemplatingAcceptanceTest {\nassertThat(content, is(\"contactId: 12345, addressId: 67890\"));\n}\n+\n+ @Test\n+ void canReadPathSegmentsByIndexWhenStubUsesPathTemplate() {\n+ wm.stubFor(\n+ get(urlPathTemplate(\"/v1/contacts/{contactId}/addresses/{addressId}\"))\n+ .willReturn(ok(\"1: {{request.path.1}}, 2: {{request.path.2}}\")));\n+\n+ String content = client.get(\"/v1/contacts/12345/addresses/67890\").content();\n+\n+ assertThat(content, is(\"1: contacts, 2: 12345\"));\n+ }\n+\n+ @Test\n+ void canReadNumericPathVariableValuesWhenUsingPathTemnplate() {\n+ wm.stubFor(\n+ get(urlPathTemplate(\"/v1/first/{0}/second/{1}\"))\n+ .willReturn(ok(\"1: {{request.path.0}}, 2: {{request.path.1}}\")));\n+\n+ String content = client.get(\"/v1/first/first1/second/second2\").content();\n+\n+ assertThat(content, is(\"1: first1, 2: second2\"));\n+ }\n+\n+ @Test\n+ void canLoopOverPathSegmentsWhenUsingPathTemplate() {\n+ wm.stubFor(\n+ get(urlPathTemplate(\"/v1/first/{0}/second/{1}\"))\n+ .willReturn(ok(\"{{#each request.path as |segment|}}{{segment}} {{/each}}\")));\n+\n+ String content = client.get(\"/v1/first/first1/second/second2\").content();\n+\n+ assertThat(content, is(\" v1 first first1 second second2 \"));\n+ }\n}\n@Nested\n" } ]
Java
Apache License 2.0
tomakehurst/wiremock
Added support for numeric path segment indexes when matching on a path template
159,452
08.11.2017 12:10:08
-3,600
ec1920374b2000e0b0060819f3cff7c0d8be0edf
Add support for RSpec 3.7
[ { "change_type": "MODIFY", "old_path": "mutest-rspec.gemspec", "new_path": "mutest-rspec.gemspec", "diff": "@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|\ngem.extra_rdoc_files = %w[LICENSE]\ngem.add_runtime_dependency('mutest', \"~> #{gem.version}\")\n- gem.add_runtime_dependency('rspec-core', '>= 3.4.0', '< 3.7.0')\n+ gem.add_runtime_dependency('rspec-core', '>= 3.4.0', '< 3.8.0')\ngem.add_development_dependency('bundler', '~> 1.3', '>= 1.3.5')\nend\n" }, { "change_type": "MODIFY", "old_path": "spec/integration/mutest/rspec_spec.rb", "new_path": "spec/integration/mutest/rspec_spec.rb", "diff": "RSpec.describe 'rspec integration', mutest: false do\nlet(:base_cmd) { 'bundle exec mutest -I lib --require test_app --use rspec' }\n- %w[3.4 3.5 3.6].each do |version|\n+ %w[3.4 3.5 3.6 3.7].each do |version|\ncontext \"RSpec #{version}\" do\nlet(:gemfile) { \"Gemfile.rspec#{version}\" }\n" }, { "change_type": "ADD", "old_path": null, "new_path": "test_app/Gemfile.rspec3.7", "diff": "+source 'https://rubygems.org'\n+gem 'rspec', '~> 3.7.0'\n+gem 'rspec-core', '~> 3.7.0'\n+gem 'mutest', path: '../'\n+gem 'mutest-rspec', path: '../'\n+gem 'adamantium'\n+eval_gemfile File.expand_path('../../Gemfile.shared', __FILE__)\n" } ]
Ruby
MIT License
dgollahon/mutest
Add support for RSpec 3.7
664,859
05.10.2019 20:04:27
14,400
8c9370a85f1eb0582a58f3ee8cce71d4b1e63bd5
create visuals
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "new_path": "tau/osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "diff": "using osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.tau.Objects;\nusing osu.Game.Rulesets.Objects.Types;\n-using osuTK;\nnamespace osu.Game.Rulesets.tau.Beatmaps\n{\n@@ -31,7 +30,6 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\n{\nSamples = original.Samples,\nStartTime = original.StartTime,\n- Position = (original as IHasPosition)?.Position ?? Vector2.Zero,\n};\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -18,8 +18,6 @@ public DrawabletauHitObject(TauHitObject hitObject)\nSize = new Vector2(40);\nOrigin = Anchor.Centre;\n- Position = hitObject.Position;\n-\n// todo: add visuals.\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "diff": "using osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects;\n-using osu.Game.Rulesets.Objects.Types;\n-using osuTK;\nnamespace osu.Game.Rulesets.tau.Objects\n{\n- public class TauHitObject : HitObject, IHasPosition\n+ public class TauHitObject : HitObject\n{\npublic override Judgement CreateJudgement() => new Judgement();\n- public Vector2 Position { get; set; }\n-\n- public float X => Position.X;\n- public float Y => Position.Y;\n+ public float Angle { get; set; }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "new_path": "tau/osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "diff": "@@ -31,7 +31,6 @@ public override Replay Generate()\nFrames.Add(new TauReplayFrame\n{\nTime = hitObject.StartTime,\n- Position = hitObject.Position,\n// todo: add required inputs and extra frames.\n});\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "// See the LICENCE file in the repository root for full licence text.\nusing osu.Framework.Allocation;\n+using osu.Framework.Bindables;\nusing osu.Framework.Graphics;\n+using osu.Framework.Graphics.Containers;\n+using osu.Framework.Graphics.UserInterface;\n+using osu.Game.Rulesets.tau.UI.Cursor;\nusing osu.Game.Rulesets.UI;\n+using osuTK;\nnamespace osu.Game.Rulesets.tau.UI\n{\n[Cached]\npublic class TauPlayfield : Playfield\n{\n+ protected override GameplayCursorContainer CreateCursor() => new TauCursorContainer();\n+\n[BackgroundDependencyLoader]\nprivate void load()\n{\nAddRangeInternal(new Drawable[]\n{\nHitObjectContainer,\n+ new Container\n+ {\n+ RelativeSizeAxes = Axes.Both,\n+ Size = new Vector2(0.75f),\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ Children = new Drawable[]\n+ {\n+ new CircularProgress\n+ {\n+ RelativeSizeAxes = Axes.Both,\n+ Current = new BindableDouble(1),\n+ InnerRadius = 0.025f,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ FillMode = FillMode.Fit,\n+ FillAspectRatio = 1, // 1:1 Aspect ratio to get a perfect circle\n+ }\n+ }\n+ }\n});\n}\n}\n" } ]
C#
MIT License
taulazer/tau
create visuals
664,859
05.10.2019 22:17:29
14,400
4061819bfd9fccfdd2cf8882ad987845ba9129ed
mouse cursor movement
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/Cursor/tauCursorContainer.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/Cursor/tauCursorContainer.cs", "diff": "// See the LICENCE file in the repository root for full licence text.\nusing osu.Framework.Graphics;\n+using osu.Framework.Input.Events;\nusing osu.Game.Rulesets.UI;\nnamespace osu.Game.Rulesets.tau.UI.Cursor\n@@ -9,5 +10,11 @@ namespace osu.Game.Rulesets.tau.UI.Cursor\npublic class TauCursorContainer : GameplayCursorContainer\n{\nprotected override Drawable CreateCursor() => new TauCursor();\n+\n+ protected override bool OnMouseMove(MouseMoveEvent e)\n+ {\n+ // Overrides mouse movement handling\n+ return false;\n+ }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "@@ -35,7 +35,7 @@ private void load()\n{\nRelativeSizeAxes = Axes.Both,\nCurrent = new BindableDouble(1),\n- InnerRadius = 0.025f,\n+ InnerRadius = 0.025f / 2,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nFillMode = FillMode.Fit,\n" } ]
C#
MIT License
taulazer/tau
mouse cursor movement
664,859
06.10.2019 16:28:25
14,400
ccd6fc33fff01e0fb462d0c5ac6bb1010961cf59
Player offset and tweeks
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "diff": "@@ -44,7 +44,7 @@ public DefaultCursor(float cs = 5f)\nRelativeSizeAxes = Axes.Both;\nAddInternal(new GameplayCursor(cs));\n- AddInternal(new CursorContainer\n+ AddInternal(new AbsoluteCursor\n{\nRelativeSizeAxes = Axes.Both,\nAnchor = Anchor.Centre,\n@@ -52,6 +52,17 @@ public DefaultCursor(float cs = 5f)\n});\n}\n+ private class AbsoluteCursor : CursorContainer\n+ {\n+ protected override Drawable CreateCursor() => new CircularProgress\n+ {\n+ Size = new Vector2(15),\n+ Origin = Anchor.Centre,\n+ InnerRadius = 0.25f,\n+ Current = new Bindable<double>(1)\n+ };\n+ }\n+\nprivate class GameplayCursor : CompositeDrawable\n{\nprivate readonly CircularContainer container;\n@@ -76,7 +87,7 @@ public GameplayCursor(float cs)\nMasking = true,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- Size = new Vector2(0.75f),\n+ Size = new Vector2(0.6f),\nChildren = new Drawable[]\n{\nnew CircularProgress\n@@ -93,7 +104,7 @@ public GameplayCursor(float cs)\nAnchor = Anchor.TopCentre,\nOrigin = Anchor.TopCentre,\nRelativeSizeAxes = Axes.Y,\n- Size = new Vector2(5f, 0.5f),\n+ Size = new Vector2(2.5f / 2, 0.5f),\n}\n}\n}\n@@ -106,17 +117,11 @@ public GameplayCursor(float cs)\n// Thank you AlFas for this code.\ndouble convertValue(double value) => c + (d - c) * (value - a) / (b - a);\n-\n- AddInternal(new Box\n- {\n- Position = AnchorPosition,\n- Size = new Vector2(10)\n- });\n}\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\n- var angle = e.MousePosition.GetDegreesFromPosition(AnchorPosition);\n+ var angle = e.MousePosition.GetDegreesFromPosition(AnchorPosition) - 25;\ncontainer.Rotation = angle;\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "@@ -26,7 +26,7 @@ private void load()\nnew Container\n{\nRelativeSizeAxes = Axes.Both,\n- Size = new Vector2(0.75f),\n+ Size = new Vector2(0.6f),\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nChildren = new Drawable[]\n@@ -35,7 +35,7 @@ private void load()\n{\nRelativeSizeAxes = Axes.Both,\nCurrent = new BindableDouble(1),\n- InnerRadius = 0.025f / 2,\n+ InnerRadius = 0.025f / 4,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nFillMode = FillMode.Fit,\n" } ]
C#
MIT License
taulazer/tau
Player offset and tweeks
664,859
06.10.2019 17:45:16
14,400
6c1e6c62c16af2dfe312003fac5fc12cbb42f8ec
add basic Beat object
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "new_path": "tau/osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "diff": "using osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.tau.Objects;\nusing osu.Game.Rulesets.Objects.Types;\n+using osuTK;\nnamespace osu.Game.Rulesets.tau.Beatmaps\n{\n@@ -26,10 +27,14 @@ public TauBeatmapConverter(IBeatmap beatmap)\nprotected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original, IBeatmap beatmap)\n{\n+ Vector2 position = ((IHasPosition)original).Position;\n+ float angle = position.GetDegreesFromPosition(Vector2.Zero);\n+\nyield return new TauHitObject\n{\nSamples = original.Samples,\nStartTime = original.StartTime,\n+ PositionToEnd = position\n};\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "diff": "using osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects;\n+using osuTK;\nnamespace osu.Game.Rulesets.tau.Objects\n{\n@@ -10,6 +11,10 @@ public class TauHitObject : HitObject\n{\npublic override Judgement CreateJudgement() => new Judgement();\n+ public double TimePreempt = 600;\n+ public double TimeFadeIn = 400;\n+\npublic float Angle { get; set; }\n+ public Vector2 PositionToEnd { get; set; }\n}\n}\n" } ]
C#
MIT License
taulazer/tau
add basic Beat object
664,859
06.10.2019 18:41:28
14,400
60d24d9fd299253592d16764ff9b3b8afbffb97e
move object to end of circle
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -35,15 +35,16 @@ public DrawabletauHitObject(TauHitObject hitObject)\nhitObject.Angle = hitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4;\nRotation = hitObject.Angle;\n- var a = hitObject.Angle *= (float)(Math.PI / 180);\n- Position = new Vector2(50 * (float)Math.Cos(a), 50 * (float)Math.Sin(a));\n+ Position = Vector2.Zero;\n}\nprotected override void UpdateInitialTransforms()\n{\nbase.UpdateInitialTransforms();\n+ var a = Rotation *= (float)(Math.PI / 180);\nbox.FadeIn(HitObject.TimeFadeIn);\n+ this.MoveTo(new Vector2(225 * (float)Math.Cos(a), 225 * (float)Math.Sin(a)), HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "diff": "@@ -14,7 +14,7 @@ public class TauHitObject : HitObject\npublic override Judgement CreateJudgement() => new Judgement();\npublic double TimePreempt = 600;\n- public double TimeFadeIn = 400;\n+ public double TimeFadeIn = 100;\npublic float Angle { get; set; }\npublic Vector2 PositionToEnd { get; set; }\n@@ -24,7 +24,7 @@ protected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, B\nbase.ApplyDefaultsToSelf(controlPointInfo, difficulty);\nTimePreempt = (float)BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1800, 1200, 450);\n- TimeFadeIn = 400;\n+ TimeFadeIn = 100;\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
move object to end of circle
664,859
06.10.2019 21:08:26
14,400
c051377bbaaf12a9f58c4243da62a4549e7fa8eb
Attempt at key hit
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "diff": "@@ -28,7 +28,7 @@ public DrawabletauRuleset(TauRuleset ruleset, IWorkingBeatmap beatmap, IReadOnly\npublic override ScoreProcessor CreateScoreProcessor() => new TauScoreProcessor(this);\n- protected override Playfield CreatePlayfield() => new TauPlayfield();\n+ protected override Playfield CreatePlayfield() => new TauPlayfield(CreateDrawableRepresentation);\nprotected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TauFramedReplayInputHandler(replay);\n" } ]
C#
MIT License
taulazer/tau
Attempt at key hit
664,859
06.10.2019 21:53:14
14,400
3fa15a7907f8700ede1cbdaf399b7a5d73b6474b
More accurate angles and new tau logo (for the 10th time)
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -32,7 +32,7 @@ public DrawabletauHitObject(TauHitObject hitObject)\nAlpha = 0.05f\n});\n- hitObject.Angle = -(hitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4);\n+ hitObject.Angle = hitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4;\nbox.Rotation = hitObject.Angle;\nPosition = Vector2.Zero;\n@@ -41,11 +41,11 @@ public DrawabletauHitObject(TauHitObject hitObject)\nprotected override void UpdateInitialTransforms()\n{\nbase.UpdateInitialTransforms();\n- var b = -(HitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4);\n+ var b = HitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4;\nvar a = b *= (float)(Math.PI / 180);\nbox.FadeIn(HitObject.TimeFadeIn);\n- this.MoveTo(new Vector2(225 * (float)Math.Cos(a), 225 * (float)Math.Sin(a)), HitObject.TimePreempt);\n+ this.MoveTo(new Vector2(-(225 * (float)Math.Cos(a)), -(225 * (float)Math.Sin(a))), HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Resources/Textures/tau.png", "new_path": "tau/osu.Game.Rulesets.tau/Resources/Textures/tau.png", "diff": "Binary files a/tau/osu.Game.Rulesets.tau/Resources/Textures/tau.png and b/tau/osu.Game.Rulesets.tau/Resources/Textures/tau.png differ\n" } ]
C#
MIT License
taulazer/tau
More accurate angles and new tau logo (for the 10th time)
664,859
07.10.2019 00:29:52
14,400
87152a815c56981f2cbc60be1d450204cd1c9fae
Push back once hit
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "using System;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Shapes;\n+using osu.Framework.MathUtils;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\nusing osuTK;\n@@ -45,7 +46,7 @@ protected override void UpdateInitialTransforms()\nvar a = b *= (float)(Math.PI / 180);\nbox.FadeIn(HitObject.TimeFadeIn);\n- this.MoveTo(new Vector2(-(225 * (float)Math.Cos(a)), -(225 * (float)Math.Sin(a))), HitObject.TimePreempt);\n+ this.MoveTo(new Vector2(-(225 * (float)Math.Cos(a)), (225 * (float)Math.Sin(a))), HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n@@ -73,8 +74,13 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\ncase ArmedState.Hit:\n- box.ScaleTo(2, time_fade_hit / 3, Easing.OutCubic)\n- .FadeColour(Color4.Yellow, time_fade_hit / 3, Easing.OutQuint)\n+ var b = HitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4;\n+ var a = b *= (float)(Math.PI / 180);\n+\n+ box.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n+ .FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n+ .RotateTo(RNG.Next(-45, 45), time_fade_hit, Easing.OutCubic)\n+ .MoveToOffset(new Vector2(20 * (float)Math.Cos(a), -(20 * (float)Math.Sin(a))), time_fade_hit, Easing.OutCubic)\n.FadeOut(time_fade_hit)\n.Expire();\nbreak;\n" } ]
C#
MIT License
taulazer/tau
Push back once hit
664,859
13.10.2019 22:38:33
14,400
9398f19e9b8ba7db049c959f95b2fc247d052687
rename tau -> Tau
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "new_path": "tau/osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "diff": "<AssemblyTitle>osu.Game.Rulesets.Sample</AssemblyTitle>\n<OutputType>Library</OutputType>\n<PlatformTarget>AnyCPU</PlatformTarget>\n- <RootNamespace>osu.Game.Rulesets.tau</RootNamespace>\n+ <RootNamespace>osu.Game.Rulesets.Tau</RootNamespace>\n</PropertyGroup>\n<ItemGroup>\n<EmbeddedResource Include=\"Resources\\**\" />\n" } ]
C#
MIT License
taulazer/tau
rename tau -> Tau
664,859
13.10.2019 22:39:02
14,400
7faef663781a801f1fd44d8ad64e7a9e15b9fe99
include projects on solution file
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau.sln", "new_path": "tau/osu.Game.Rulesets.tau.sln", "diff": "@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.29123.88\nMinimumVisualStudioVersion = 10.0.40219.1\n-Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.tau\", \"osu.Game.Rulesets.tau\\osu.Game.Rulesets.tau.csproj\", \"{5AE1F0F1-DAFA-46E7-959C-DA233B7C87E9}\"\n+Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.Tau\", \"osu.Game.Rulesets.Tau\\osu.Game.Rulesets.Tau.csproj\", \"{5AE1F0F1-DAFA-46E7-959C-DA233B7C87E9}\"\nEndProject\n-Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"osu.Game.Rulesets.tau.Tests\", \"osu.Game.Rulesets.tau.Tests\\osu.Game.Rulesets.tau.Tests.csproj\", \"{B4577C85-CB83-462A-BCE3-22FFEB16311D}\"\n+Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"osu.Game.Rulesets.Tau.Tests\", \"osu.Game.Rulesets.Tau.Tests\\osu.Game.Rulesets.Tau.Tests.csproj\", \"{B4577C85-CB83-462A-BCE3-22FFEB16311D}\"\nEndProject\nGlobal\nGlobalSection(SolutionConfigurationPlatforms) = preSolution\n" } ]
C#
MIT License
taulazer/tau
include projects on solution file
664,859
13.11.2019 18:53:26
18,000
49791e0703ba4d10a292fb752ead5e5bfc560156
Remove CreateDrawableRepresentation from TauPlayfield
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "diff": "@@ -28,7 +28,7 @@ public DrawabletauRuleset(TauRuleset ruleset, IWorkingBeatmap beatmap, IReadOnly\npublic override ScoreProcessor CreateScoreProcessor() => new TauScoreProcessor(this);\n- protected override Playfield CreatePlayfield() => new TauPlayfield(CreateDrawableRepresentation);\n+ protected override Playfield CreatePlayfield() => new TauPlayfield();\nprotected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TauFramedReplayInputHandler(replay);\n" } ]
C#
MIT License
taulazer/tau
Remove CreateDrawableRepresentation from TauPlayfield
664,859
27.11.2019 22:42:08
18,000
7ebe2cd43b72759de5d31c394e9790ae48d3b3bc
Implement input gameplay finally
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "// See the LICENCE file in the repository root for full licence text.\nusing System;\n+using System.Diagnostics;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Shapes;\n+using osu.Framework.Input.Bindings;\nusing osu.Framework.MathUtils;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\nusing osuTK;\nusing osuTK.Graphics;\n+using System.Linq;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n- public class DrawabletauHitObject : DrawableHitObject<TauHitObject>\n+ public class DrawabletauHitObject : DrawableHitObject<TauHitObject>, IKeyBindingHandler<TauAction>\n{\nprivate Box box;\n+ public Func<DrawabletauHitObject, bool> CheckValidation;\n+\n+ /// <summary>\n+ /// A list of keys which can result in hits for this HitObject.\n+ /// </summary>\n+ public TauAction[] HitActions { get; set; } = new[]\n+ {\n+ TauAction.RightButton,\n+ TauAction.LeftButton,\n+ };\n+\n+ /// <summary>\n+ /// The action that caused this <see cref=\"DrawableHit\"/> to be hit.\n+ /// </summary>\n+ public TauAction? HitAction { get; private set; }\n+\n+ private bool validActionPressed;\n+\nprotected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;\npublic DrawabletauHitObject(TauHitObject hitObject)\n@@ -51,11 +72,31 @@ protected override void UpdateInitialTransforms()\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n{\n- if (Time.Current >= HitObject.StartTime)\n+ Debug.Assert(HitObject.HitWindows != null);\n+ if (CheckValidation == null) return;\n+\n+ if (!userTriggered)\n{\n- ApplyResult(r => r.Type = true\n- ? HitResult.Perfect\n- : HitResult.Miss);\n+ if (!HitObject.HitWindows.CanBeHit(timeOffset))\n+ ApplyResult(r => r.Type = HitResult.Miss);\n+\n+ return;\n+ }\n+\n+ bool validated = CheckValidation.Invoke(this);\n+\n+ if (timeOffset >= 0 && Result != null && validated)\n+ {\n+ var result = HitObject.HitWindows.ResultFor(timeOffset);\n+ ApplyResult(r => r.Type = result);\n+\n+ if (result == HitResult.None)\n+ return;\n+\n+ if (!validActionPressed)\n+ ApplyResult(r => r.Type = HitResult.Miss);\n+ else\n+ ApplyResult(r => r.Type = result);\n}\n}\n@@ -93,5 +134,22 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\n}\n}\n+\n+ public bool OnPressed(TauAction action)\n+ {\n+ if (Judged)\n+ return false;\n+\n+ validActionPressed = HitActions.Contains(action);\n+\n+ var result = UpdateResult(true);\n+\n+ if (IsHit)\n+ HitAction = action;\n+\n+ return result;\n+ }\n+\n+ public bool OnReleased(TauAction action) => false;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "diff": "using osu.Game.Beatmaps.ControlPoints;\nusing osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects;\n+using osu.Game.Rulesets.Tau.Judgements;\nusing osuTK;\nnamespace osu.Game.Rulesets.Tau.Objects\n{\npublic class TauHitObject : HitObject\n{\n- public override Judgement CreateJudgement() => new Judgement();\n+ public override Judgement CreateJudgement() => new TauJudgement();\npublic double TimePreempt = 600;\npublic double TimeFadeIn = 100;\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "diff": "using osu.Framework.Graphics.UserInterface;\nusing osu.Framework.Input.Events;\nusing osu.Game.Beatmaps;\n+using osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osuTK;\nnamespace osu.Game.Rulesets.Tau.UI.Cursor\n@@ -18,6 +19,8 @@ public class TauCursor : CompositeDrawable\n{\nprivate readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();\n+ private DefaultCursor defaultCursor;\n+\npublic TauCursor()\n{\nOrigin = Anchor.Centre;\n@@ -29,19 +32,54 @@ public TauCursor()\n[BackgroundDependencyLoader]\nprivate void load(IBindable<WorkingBeatmap> beatmap)\n{\n- InternalChild = new DefaultCursor(beatmap.Value.BeatmapInfo.BaseDifficulty.CircleSize);\n+ InternalChild = defaultCursor = new DefaultCursor(beatmap.Value.BeatmapInfo.BaseDifficulty.CircleSize);\nthis.beatmap.BindTo(beatmap);\n}\n+ public bool CheckForValidation(DrawabletauHitObject h) => h.ScreenSpaceDrawQuad.AABBFloat.IntersectsWith(defaultCursor.HitReceptor.ScreenSpaceDrawQuad.AABBFloat);\n+\nprivate class DefaultCursor : CompositeDrawable\n{\n+ public readonly Box HitReceptor;\n+\npublic DefaultCursor(float cs = 5f)\n{\nOrigin = Anchor.Centre;\nAnchor = Anchor.Centre;\nRelativeSizeAxes = Axes.Both;\n+\n+ AddInternal(new Container\n+ {\n+ RelativeSizeAxes = Axes.Both,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ FillMode = FillMode.Fit,\n+ FillAspectRatio = 1, // 1:1 Aspect Ratio.\n+ Size = new Vector2(0.6f),\n+ Children = new Drawable[]\n+ {\n+ HitReceptor = new Box\n+ {\n+ Height = 50,\n+ Width = (float)convertValue(cs),\n+ Anchor = Anchor.TopCentre,\n+ Origin = Anchor.TopCentre,\n+ Alpha = 0,\n+ AlwaysPresent = true\n+ }\n+ }\n+ });\n+\n+ const double a = 1;\n+ const double b = 10;\n+ const double c = 230;\n+ const double d = 25;\n+\n+ // Thank you AlFas for this code.\n+ double convertValue(double value) => c + (d - c) * (value - a) / (b - a);\n+\nAddInternal(new GameplayCursor(cs));\nAddInternal(new AbsoluteCursor\n@@ -65,12 +103,8 @@ private class AbsoluteCursor : CursorContainer\nprivate class GameplayCursor : CompositeDrawable\n{\n- private readonly CircularContainer container;\n- private float cs;\n-\npublic GameplayCursor(float cs)\n{\n- this.cs = cs;\nRelativeSizeAxes = Axes.Both;\nAnchor = Anchor.Centre;\n@@ -81,7 +115,7 @@ public GameplayCursor(float cs)\nInternalChildren = new Drawable[]\n{\n- container = new CircularContainer\n+ new CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\nMasking = true,\n@@ -110,24 +144,24 @@ public GameplayCursor(float cs)\n}\n};\n- const double a = 1;\n- const double b = 10;\n- const double c = 0.2;\n- const double d = 0.005;\n+ const double a = 2;\n+ const double b = 7;\n+ const double c = 0.15;\n+ const double d = 0.05;\n// Thank you AlFas for this code.\ndouble convertValue(double value) => c + (d - c) * (value - a) / (b - a);\n}\n+ }\nprotected override bool OnMouseMove(MouseMoveEvent e)\n{\nvar angle = e.MousePosition.GetDegreesFromPosition(AnchorPosition) - 25;\n- container.Rotation = angle;\n+ Rotation = angle;\nreturn base.OnMouseMove(e);\n}\n}\n}\n}\n-}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "using osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\nusing osu.Framework.Graphics.UserInterface;\n+using osu.Game.Rulesets.Objects.Drawables;\n+using osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\nusing osu.Game.Rulesets.UI;\nusing osuTK;\n@@ -50,5 +52,15 @@ public TauPlayfield()\ncursor\n});\n}\n+\n+ public bool CheckIfWeCanValidate(DrawabletauHitObject obj) => cursor.CheckForValidation(obj);\n+\n+ public override void Add(DrawableHitObject h)\n+ {\n+ base.Add(h);\n+\n+ var obj = (DrawabletauHitObject)h;\n+ obj.CheckValidation = CheckIfWeCanValidate;\n+ }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "new_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "diff": "@@ -38,6 +38,9 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\n{\nswitch (type)\n{\n+ case ModType.DifficultyReduction:\n+ return new[] { new TauModNoFail() };\n+\ncase ModType.Automation:\nreturn new[] { new TauModAutoplay() };\n@@ -52,6 +55,8 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\n{\nnew KeyBinding(InputKey.Z, TauAction.LeftButton),\nnew KeyBinding(InputKey.X, TauAction.RightButton),\n+ new KeyBinding(InputKey.MouseLeft, TauAction.LeftButton),\n+ new KeyBinding(InputKey.MouseRight, TauAction.RightButton),\nnew KeyBinding(InputKey.Space, TauAction.HardButton),\n};\n" } ]
C#
MIT License
taulazer/tau
Implement input gameplay finally
664,859
28.11.2019 22:17:29
18,000
df568dd2c32b6c4f71e13c8cc09fda4ec6590caf
Implement a few mods and tweak input latency
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "new_path": "tau/osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "diff": "@@ -28,7 +28,6 @@ public TauBeatmapConverter(IBeatmap beatmap)\nprotected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original, IBeatmap beatmap)\n{\nVector2 position = ((IHasPosition)original).Position;\n- float angle = position.GetDegreesFromPosition(Vector2.Zero);\nyield return new TauHitObject\n{\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Tau.Judgements\n{\npublic class TauJudgement : Judgement\n{\n- public override HitResult MaxResult => HitResult.Great;\n+ public override HitResult MaxResult => HitResult.Perfect;\nprotected override int NumericResultFor(HitResult result)\n{\n@@ -17,13 +17,7 @@ protected override int NumericResultFor(HitResult result)\ndefault:\nreturn 0;\n- case HitResult.Meh:\n- return 50;\n-\n- case HitResult.Good:\n- return 100;\n-\n- case HitResult.Great:\n+ case HitResult.Perfect:\nreturn 300;\n}\n}\n@@ -32,16 +26,11 @@ protected override double HealthIncreaseFor(HitResult result)\n{\nswitch (result)\n{\n- case HitResult.Miss:\n+ default:\nreturn -0.02;\n- case HitResult.Meh:\n- case HitResult.Good:\n- case HitResult.Great:\n+ case HitResult.Perfect:\nreturn 0.01;\n-\n- default:\n- return 0;\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -67,7 +67,7 @@ protected override void UpdateInitialTransforms()\nvar a = b *= (float)(Math.PI / 180);\nbox.FadeIn(HitObject.TimeFadeIn);\n- this.MoveTo(new Vector2(-(225 * (float)Math.Cos(a)), (225 * (float)Math.Sin(a))), HitObject.TimePreempt);\n+ this.MoveTo(new Vector2(-(215 * (float)Math.Cos(a)), -(215 * (float)Math.Sin(a))), HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Scoring/tauScoreProcessor.cs", "new_path": "tau/osu.Game.Rulesets.tau/Scoring/tauScoreProcessor.cs", "diff": "@@ -29,31 +29,14 @@ protected override double HealthAdjustmentFactorFor(JudgementResult result)\n{\nswitch (result.Type)\n{\n- case HitResult.Great:\n- return 10.2 - hpDrainRate;\n-\n- case HitResult.Good:\n- return 8 - hpDrainRate;\n-\n- case HitResult.Meh:\n- return 4 - hpDrainRate;\n-\ncase HitResult.Miss:\nreturn hpDrainRate;\ndefault:\n- return 0;\n+ return 10.2 - hpDrainRate; // Award less HP as drain rate is increased\n}\n}\n-\n-\n- protected override void Reset(bool storeResults)\n- {\n- base.Reset(storeResults);\n-\n- Health.Value = 1;\n- Accuracy.Value = 1;\n- }\n+ public override HitWindows CreateHitWindows() => new TauHitWindows();\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "new_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "diff": "@@ -39,10 +39,18 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\nswitch (type)\n{\ncase ModType.DifficultyReduction:\n- return new[] { new TauModNoFail() };\n+ return new Mod[]\n+ {\n+ new TauModEasy(),\n+ new TauModNoFail(),\n+ };\ncase ModType.Automation:\n- return new[] { new TauModAutoplay() };\n+ return new Mod[]\n+ {\n+ new MultiMod(new TauModAutoplay(), new ModCinema()),\n+ new TauModRelax(),\n+ };\ndefault:\nreturn new Mod[] { null };\n" } ]
C#
MIT License
taulazer/tau
Implement a few mods and tweak input latency
664,859
05.12.2019 16:28:44
18,000
afdc99641e22da15f15a1bc147828d10dbb93fa8
Less strict window | implement drawable judgement
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau.Tests/TestSceneOsuGame.cs", "new_path": "tau/osu.Game.Rulesets.tau.Tests/TestSceneOsuGame.cs", "diff": "using osu.Framework.Allocation;\nusing osu.Framework.Graphics;\n-using osu.Framework.Graphics.Shapes;\nusing osu.Framework.Platform;\nusing osu.Game.Tests.Visual;\n-using osuTK.Graphics;\nnamespace osu.Game.Rulesets.Tau.Tests\n{\n@@ -20,11 +18,6 @@ private void load(GameHost host, OsuGameBase gameBase)\nChildren = new Drawable[]\n{\n- new Box\n- {\n- RelativeSizeAxes = Axes.Both,\n- Colour = Color4.Black,\n- },\ngame\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Tau.Judgements\n{\npublic class TauJudgement : Judgement\n{\n- public override HitResult MaxResult => HitResult.Perfect;\n+ public override HitResult MaxResult => HitResult.Great;\nprotected override int NumericResultFor(HitResult result)\n{\n@@ -17,7 +17,7 @@ protected override int NumericResultFor(HitResult result)\ndefault:\nreturn 0;\n- case HitResult.Perfect:\n+ case HitResult.Great:\nreturn 300;\n}\n}\n@@ -27,9 +27,12 @@ protected override double HealthIncreaseFor(HitResult result)\nswitch (result)\n{\ndefault:\n+ return 0;\n+\n+ case HitResult.Miss:\nreturn -0.02;\n- case HitResult.Perfect:\n+ case HitResult.Great:\nreturn 0.01;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "using osu.Framework.Graphics;\nusing osu.Framework.Graphics.Shapes;\nusing osu.Framework.Input.Bindings;\n-using osu.Framework.MathUtils;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\nusing osuTK;\n@@ -17,7 +16,7 @@ namespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\npublic class DrawabletauHitObject : DrawableHitObject<TauHitObject>, IKeyBindingHandler<TauAction>\n{\n- private Box box;\n+ public Box Box;\npublic Func<DrawabletauHitObject, bool> CheckValidation;\n@@ -46,7 +45,7 @@ public DrawabletauHitObject(TauHitObject hitObject)\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n- AddInternal(box = new Box\n+ AddInternal(Box = new Box\n{\nRelativeSizeAxes = Axes.Both,\nOrigin = Anchor.Centre,\n@@ -54,8 +53,8 @@ public DrawabletauHitObject(TauHitObject hitObject)\nAlpha = 0.05f\n});\n- hitObject.Angle = hitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4;\n- box.Rotation = hitObject.Angle;\n+ hitObject.Angle = hitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\n+ Box.Rotation = hitObject.Angle;\nPosition = Vector2.Zero;\n}\n@@ -63,10 +62,10 @@ public DrawabletauHitObject(TauHitObject hitObject)\nprotected override void UpdateInitialTransforms()\n{\nbase.UpdateInitialTransforms();\n- var b = HitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4;\n+ var b = HitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\nvar a = b *= (float)(Math.PI / 180);\n- box.FadeIn(HitObject.TimeFadeIn);\n+ Box.FadeIn(HitObject.TimeFadeIn);\nthis.MoveTo(new Vector2(-(215 * (float)Math.Cos(a)), -(215 * (float)Math.Sin(a))), HitObject.TimePreempt);\n}\n@@ -88,6 +87,9 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nif (timeOffset >= 0 && Result != null && validated)\n{\nvar result = HitObject.HitWindows.ResultFor(timeOffset);\n+ if (result >= HitResult.Meh)\n+ result = HitResult.Great;\n+\nApplyResult(r => r.Type = result);\nif (result == HitResult.None)\n@@ -110,27 +112,35 @@ protected override void UpdateStateTransforms(ArmedState state)\n{\ncase ArmedState.Idle:\nLifetimeStart = HitObject.StartTime - HitObject.TimePreempt;\n- this.Delay(HitObject.TimePreempt).FadeOut(500);\n- Expire(true);\n+ HitAction = null;\nbreak;\ncase ArmedState.Hit:\n- var b = HitObject.PositionToEnd.GetDegreesFromPosition(box.AnchorPosition) * 4;\n+ var b = HitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\nvar a = b *= (float)(Math.PI / 180);\n- box.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n+ Console.WriteLine(\"Hit!\");\n+\n+ Box.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n- .RotateTo(RNG.Next(-45, 45), time_fade_hit, Easing.OutCubic)\n- .MoveToOffset(new Vector2(20 * (float)Math.Cos(a), -(20 * (float)Math.Sin(a))), time_fade_hit, Easing.OutCubic)\n- .FadeOut(time_fade_hit)\n- .Expire();\n+ .MoveToOffset(new Vector2(-(50 * (float)Math.Cos(a)), -(50 * (float)Math.Sin(a))), time_fade_hit, Easing.OutCubic)\n+ .FadeOut(time_fade_hit);\n+\n+ this.FadeOut(time_fade_hit);\nbreak;\ncase ArmedState.Miss:\n- box.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n+ Console.WriteLine(\"miss...\");\n+\n+ var c = HitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\n+ var d = c *= (float)(Math.PI / 180);\n+\n+ Box.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n- .FadeOut(time_fade_miss)\n- .Expire();\n+ .MoveToOffset(new Vector2(-(50 * (float)Math.Cos(d)), -(50 * (float)Math.Sin(d))), time_fade_hit, Easing.OutCubic)\n+ .FadeOut(time_fade_miss);\n+\n+ this.FadeOut(time_fade_miss);\nbreak;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "new_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "diff": "@@ -11,11 +11,7 @@ public override bool IsHitResultAllowed(HitResult result)\n{\nswitch (result)\n{\n- case HitResult.Perfect:\ncase HitResult.Great:\n- case HitResult.Good:\n- case HitResult.Ok:\n- case HitResult.Meh:\ncase HitResult.Miss:\nreturn true;\n}\n@@ -25,7 +21,7 @@ public override bool IsHitResultAllowed(HitResult result)\nprotected override DifficultyRange[] GetRanges() => new[]\n{\n- new DifficultyRange(HitResult.Perfect, 200, 100, 50),\n+ new DifficultyRange(HitResult.Great, 199, 199, 199),\nnew DifficultyRange(HitResult.Miss, 200, 200, 200),\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "// See the LICENCE file in the repository root for full licence text.\nusing System;\n-using System.Linq;\nusing osu.Framework.Allocation;\nusing osu.Framework.Bindables;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\nusing osu.Framework.Graphics.UserInterface;\n+using osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\n@@ -20,6 +20,7 @@ namespace osu.Game.Rulesets.Tau.UI\npublic class TauPlayfield : Playfield\n{\nprivate TauCursor cursor;\n+ private JudgementContainer<DrawableTauJudgement> judgementLayer;\n// Hides the cursor\nprotected override GameplayCursorContainer CreateCursor() => null;\n@@ -30,6 +31,11 @@ public TauPlayfield()\nAddRangeInternal(new Drawable[]\n{\n+ judgementLayer = new JudgementContainer<DrawableTauJudgement>\n+ {\n+ RelativeSizeAxes = Axes.Both,\n+ Depth = 1,\n+ },\nnew Container\n{\nRelativeSizeAxes = Axes.Both,\n@@ -63,7 +69,29 @@ public override void Add(DrawableHitObject h)\nvar obj = (DrawabletauHitObject)h;\nobj.CheckValidation = CheckIfWeCanValidate;\n- Console.WriteLine(HitObjectContainer.Objects.Count());\n+\n+ obj.OnNewResult += onNewResult;\n+ }\n+\n+ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n+ {\n+ if (!judgedObject.DisplayResult || !DisplayJudgements.Value)\n+ return;\n+\n+ var tauObj = (DrawabletauHitObject)judgedObject;\n+\n+ var b = tauObj.HitObject.PositionToEnd.GetDegreesFromPosition(tauObj.Box.AnchorPosition) * 4;\n+ var a = b *= (float)(Math.PI / 180);\n+\n+ DrawableTauJudgement explosion = new DrawableTauJudgement(result, tauObj)\n+ {\n+ Origin = Anchor.Centre,\n+ Anchor = Anchor.Centre,\n+ Position = new Vector2(-(285 * (float)Math.Cos(a)), -(285 * (float)Math.Sin(a))),\n+ Rotation = tauObj.Box.Rotation + 90,\n+ };\n+\n+ judgementLayer.Add(explosion);\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Less strict window | implement drawable judgement
664,859
05.12.2019 17:19:10
18,000
318b887fa9117fe061d9d4f2ff433b80819d84e2
calmed some tits on input
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Mods/TauModRelax.cs", "new_path": "tau/osu.Game.Rulesets.tau/Mods/TauModRelax.cs", "diff": "using System.Collections.Generic;\nusing System.Diagnostics;\n-using osu.Game.Input.Handlers;\nusing osu.Game.Rulesets.Mods;\nusing osu.Game.Rulesets.Objects.Types;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\n+using osu.Game.Rulesets.Tau.UI;\nusing osu.Game.Rulesets.UI;\n+using static osu.Game.Input.Handlers.ReplayInputHandler;\nnamespace osu.Game.Rulesets.Tau.Mods\n{\n@@ -21,7 +22,7 @@ public void Update(Playfield playfield)\nbool requiresHold = false;\nbool requiresHit = false;\n- const float relax_leniency = 3;\n+ const float relax_leniency = -3;\nforeach (var drawable in playfield.HitObjectContainer.AliveObjects)\n{\n@@ -33,21 +34,26 @@ public void Update(Playfield playfield)\nif (time < tauHit.HitObject.StartTime - relax_leniency) continue;\n- if ((tauHit.HitObject is IHasEndTime hasEnd && time > hasEnd.EndTime) || tauHit.IsHit)\n+ if (tauHit.HitObject is IHasEndTime hasEnd && time > hasEnd.EndTime || tauHit.IsHit)\ncontinue;\nif (tauHit is DrawabletauHitObject)\n{\nDebug.Assert(tauHit.HitObject.HitWindows != null);\n- requiresHit |= tauHit.HitObject.HitWindows.CanBeHit(relativetime);\n+\n+ var play = (TauPlayfield)playfield;\n+ if (tauHit.HitObject.HitWindows.CanBeHit(relativetime) && play.CheckIfWeCanValidate(tauHit))\n+ requiresHit = true;\n}\n}\nif (requiresHit)\n{\n- addAction(true);\naddAction(false);\n+ addAction(true);\n}\n+\n+ addAction(requiresHold);\n}\nprivate bool wasHit;\n@@ -62,7 +68,7 @@ private void addAction(bool hitting)\nwasHit = hitting;\n- var state = new ReplayInputHandler.ReplayState<TauAction>\n+ var state = new ReplayState<TauAction>\n{\nPressedActions = new List<TauAction>()\n};\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -119,8 +119,6 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar b = HitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\nvar a = b *= (float)(Math.PI / 180);\n- Console.WriteLine(\"Hit!\");\n-\nBox.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n.MoveToOffset(new Vector2(-(50 * (float)Math.Cos(a)), -(50 * (float)Math.Sin(a))), time_fade_hit, Easing.OutCubic)\n@@ -130,8 +128,6 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\ncase ArmedState.Miss:\n- Console.WriteLine(\"miss...\");\n-\nvar c = HitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\nvar d = c *= (float)(Math.PI / 180);\n" } ]
C#
MIT License
taulazer/tau
calmed some tits on input
664,859
05.12.2019 17:19:59
18,000
29c6f998e6b033c82432d4bca0743bc39dd9149c
move back to 3
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Mods/TauModRelax.cs", "new_path": "tau/osu.Game.Rulesets.tau/Mods/TauModRelax.cs", "diff": "@@ -22,7 +22,7 @@ public void Update(Playfield playfield)\nbool requiresHold = false;\nbool requiresHit = false;\n- const float relax_leniency = -3;\n+ const float relax_leniency = 3;\nforeach (var drawable in playfield.HitObjectContainer.AliveObjects)\n{\n" } ]
C#
MIT License
taulazer/tau
move back to 3
664,859
07.12.2019 14:11:03
18,000
4ae6c479194952704277148d58d725d42b3bcfa9
Kiai effects
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "new_path": "tau/osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "diff": "using System;\nusing System.Collections.Generic;\n+using osu.Framework.Extensions.IEnumerableExtensions;\nusing osu.Game.Beatmaps;\nusing osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.Objects.Types;\n@@ -13,12 +14,7 @@ namespace osu.Game.Rulesets.Tau.Beatmaps\n{\npublic class TauBeatmapConverter : BeatmapConverter<TauHitObject>\n{\n- protected override IEnumerable<Type> ValidConversionTypes { get; } = new[]\n- {\n- // todo: Populate with conversion types that should be supported other than position (ie. typeof(IHasCurve))\n- // https://github.com/ppy/osu/tree/master/osu.Game/Rulesets/Objects/Types\n- typeof(IHasPosition)\n- };\n+ protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasPosition) };\npublic TauBeatmapConverter(IBeatmap beatmap)\n: base(beatmap)\n@@ -28,13 +24,20 @@ public TauBeatmapConverter(IBeatmap beatmap)\nprotected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original, IBeatmap beatmap)\n{\nVector2 position = ((IHasPosition)original).Position;\n+ var comboData = original as IHasCombo;\n- yield return new TauHitObject\n+ switch (original)\n+ {\n+ default:\n+ return new TauHitObject\n{\nSamples = original.Samples,\nStartTime = original.StartTime,\n- PositionToEnd = position\n- };\n+ PositionToEnd = position,\n+ NewCombo = comboData?.NewCombo ?? false,\n+ ComboOffset = comboData?.ComboOffset ?? 0,\n+ }.Yield();\n+ }\n}\nprotected override Beatmap<TauHitObject> CreateBeatmap() => new TauBeatmap();\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "using System;\nusing osu.Framework.Allocation;\n+using osu.Framework.Audio.Track;\nusing osu.Framework.Bindables;\n+using osu.Framework.Extensions.Color4Extensions;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\nusing osu.Framework.Graphics.UserInterface;\n+using osu.Game.Beatmaps.ControlPoints;\n+using osu.Game.Graphics.Containers;\nusing osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects.Drawables;\n+using osu.Game.Rulesets.Scoring;\n+using osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\nusing osu.Game.Rulesets.UI;\n+using osu.Game.Screens.Menu;\nusing osuTK;\n+using osuTK.Graphics;\nnamespace osu.Game.Rulesets.Tau.UI\n{\n@@ -21,6 +29,7 @@ public class TauPlayfield : Playfield\n{\nprivate TauCursor cursor;\nprivate JudgementContainer<DrawableTauJudgement> judgementLayer;\n+ private readonly Container<KiaiHitExplosion> kiaiExplosionContainer;\n// Hides the cursor\nprotected override GameplayCursorContainer CreateCursor() => null;\n@@ -36,6 +45,7 @@ public TauPlayfield()\nRelativeSizeAxes = Axes.Both,\nDepth = 1,\n},\n+ new VisualisationContainer(),\nnew Container\n{\nRelativeSizeAxes = Axes.Both,\n@@ -57,7 +67,16 @@ public TauPlayfield()\n}\n},\nHitObjectContainer,\n- cursor\n+ cursor,\n+ kiaiExplosionContainer = new Container<KiaiHitExplosion>\n+ {\n+ Name = \"Kiai hit explosions\",\n+ RelativeSizeAxes = Axes.Both,\n+ FillMode = FillMode.Fit,\n+ Blending = BlendingParameters.Additive,\n+ Origin = Anchor.Centre,\n+ Anchor = Anchor.Centre,\n+ },\n});\n}\n@@ -92,6 +111,76 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n};\njudgementLayer.Add(explosion);\n+\n+ if (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\n+ kiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject)\n+ {\n+ Position = new Vector2(-(215 * (float)Math.Cos(a)), -(215 * (float)Math.Sin(a))),\n+ Rotation = tauObj.Box.Rotation,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre\n+ });\n+ }\n+\n+ private class VisualisationContainer : BeatSyncedContainer\n+ {\n+ private LogoVisualisation visualisation;\n+ private bool firstKiaiBeat = true;\n+ private int kiaiBeatIndex;\n+ private Bindable<bool> showVisualisation = new Bindable<bool>();\n+\n+ [BackgroundDependencyLoader]\n+ private void load(TauRulesetConfigManager settings)\n+ {\n+ RelativeSizeAxes = Axes.Both;\n+ Size = new Vector2(0.6f);\n+ Anchor = Anchor.Centre;\n+ Origin = Anchor.Centre;\n+\n+ Child = visualisation = new LogoVisualisation\n+ {\n+ RelativeSizeAxes = Axes.Both,\n+ FillMode = FillMode.Fit,\n+ FillAspectRatio = 1,\n+ Blending = BlendingParameters.Additive,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ Colour = Color4.Transparent\n+ };\n+\n+ settings?.BindWith(TauRulesetSettings.ShowVisualizer, showVisualisation);\n+ showVisualisation.ValueChanged += value => { visualisation.FadeTo(value.NewValue ? 1 : 0, 500); };\n+ showVisualisation.TriggerChange();\n+ }\n+\n+ protected override void LoadComplete()\n+ {\n+ base.LoadComplete();\n+ visualisation.AccentColour = Color4.White;\n+ }\n+\n+ protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)\n+ {\n+ if (effectPoint.KiaiMode)\n+ {\n+ kiaiBeatIndex += 1;\n+\n+ if (firstKiaiBeat)\n+ {\n+ visualisation.FlashColour(Color4.White, timingPoint.BeatLength * 4, Easing.In);\n+ firstKiaiBeat = false;\n+ return;\n+ }\n+\n+ if (kiaiBeatIndex >= 5)\n+ visualisation.FlashColour(Color4.White.Opacity(0.15f), timingPoint.BeatLength, Easing.In);\n+ }\n+ else\n+ {\n+ firstKiaiBeat = true;\n+ kiaiBeatIndex = 0;\n+ }\n+ }\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "new_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "diff": "using osu.Framework.Graphics.Textures;\nusing osu.Framework.Input.Bindings;\nusing osu.Game.Beatmaps;\n+using osu.Game.Configuration;\n+using osu.Game.Overlays.Settings;\n+using osu.Game.Rulesets.Configuration;\nusing osu.Game.Rulesets.Difficulty;\nusing osu.Game.Rulesets.Mods;\nusing osu.Game.Rulesets.Tau.Beatmaps;\n+using osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.Mods;\nusing osu.Game.Rulesets.Tau.UI;\nusing osu.Game.Rulesets.UI;\n@@ -59,6 +63,10 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\npublic override string ShortName => \"tau\";\n+ public override RulesetSettingsSubsection CreateSettings() => new TauSettingsSubsection(this);\n+\n+ public override IRulesetConfigManager CreateConfig(SettingsStore settings) => new TauRulesetConfigManager(settings, RulesetInfo);\n+\npublic override IEnumerable<KeyBinding> GetDefaultKeyBindings(int variant = 0) => new[]\n{\nnew KeyBinding(InputKey.Z, TauAction.LeftButton),\n" } ]
C#
MIT License
taulazer/tau
Kiai effects
664,859
07.12.2019 17:58:10
18,000
b0411432e8d07c98861adc8adbefd39309ed7081
Fix result applying twice
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -90,8 +90,6 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nif (result >= HitResult.Meh)\nresult = HitResult.Great;\n- ApplyResult(r => r.Type = result);\n-\nif (result == HitResult.None)\nreturn;\n" } ]
C#
MIT License
taulazer/tau
Fix result applying twice
664,859
13.12.2019 23:57:10
18,000
0a903613977b137f4262366db2267910cdca5507
Add new mods
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "new_path": "tau/osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "diff": "<OutputType>Library</OutputType>\n<PlatformTarget>AnyCPU</PlatformTarget>\n<RootNamespace>osu.Game.Rulesets.Tau</RootNamespace>\n- <LangVersion>7.3</LangVersion>\n+ <LangVersion>8</LangVersion>\n</PropertyGroup>\n<ItemGroup>\n<EmbeddedResource Include=\"Resources\\**\" />\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "new_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "diff": "@@ -47,6 +47,18 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\n{\nnew TauModEasy(),\nnew TauModNoFail(),\n+ new MultiMod(new TauModHalfTime(), new TauModDaycore()),\n+ new TauModAutoHold(),\n+ };\n+\n+ case ModType.DifficultyIncrease:\n+ return new Mod[]\n+ {\n+ new TauModHardRock(),\n+ new TauModSuddenDeath(),\n+ new MultiMod(new TauModDoubleTime(), new TauModNightcore()),\n+ new TauModHidden(),\n+ new MultiMod(new TauModFlashlight(), new TauModBlinds()),\n};\ncase ModType.Automation:\n@@ -56,6 +68,12 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\nnew TauModRelax(),\n};\n+ case ModType.Fun:\n+ return new Mod[]\n+ {\n+ new MultiMod(new ModWindUp(), new ModWindDown()),\n+ };\n+\ndefault:\nreturn new Mod[] { null };\n}\n" } ]
C#
MIT License
taulazer/tau
Add new mods
664,859
23.12.2019 14:02:15
18,000
70c63dd092827238d03644a79718e6c46da14036
Update game and fix stuff needed to disable settings for now. (see TauSettingsSubsection.cs#L25)
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Mods/TauModNightcore.cs", "new_path": "tau/osu.Game.Rulesets.tau/Mods/TauModNightcore.cs", "diff": "// See the LICENCE file in the repository root for full licence text.\nusing osu.Game.Rulesets.Mods;\n+using osu.Game.Rulesets.Tau.Objects;\nnamespace osu.Game.Rulesets.Tau.Mods\n{\n- public class TauModNightcore : ModNightcore\n+ public class TauModNightcore : ModNightcore<TauHitObject>\n{\npublic override double ScoreMultiplier => 1.12;\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs", "diff": "@@ -22,6 +22,10 @@ private void load()\n{\nvar config = (TauRulesetConfigManager)Config;\n+ // for an odd reason, Config seems to be passed as null when creating it. doesnt even get called...\n+ if (config == null)\n+ return;\n+\nChildren = new Drawable[]\n{\nnew SettingsCheckbox\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "diff": "using osu.Game.Replays;\nusing osu.Game.Rulesets.Mods;\nusing osu.Game.Rulesets.Objects.Drawables;\n-using osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.Replays;\n-using osu.Game.Rulesets.Tau.Scoring;\nusing osu.Game.Rulesets.UI;\nnamespace osu.Game.Rulesets.Tau.UI\n@@ -26,8 +24,6 @@ public DrawabletauRuleset(TauRuleset ruleset, IBeatmap beatmap, IReadOnlyList<Mo\n{\n}\n- public override ScoreProcessor CreateScoreProcessor() => new TauScoreProcessor(Beatmap);\n-\nprotected override Playfield CreatePlayfield() => new TauPlayfield();\nprotected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TauFramedReplayInputHandler(replay);\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "using osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\n-using osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\nusing osu.Game.Rulesets.UI;\n@@ -127,10 +126,10 @@ private class VisualisationContainer : BeatSyncedContainer\nprivate LogoVisualisation visualisation;\nprivate bool firstKiaiBeat = true;\nprivate int kiaiBeatIndex;\n- private Bindable<bool> showVisualisation = new Bindable<bool>();\n+ private readonly Bindable<bool> showVisualisation = new Bindable<bool>(true);\n[BackgroundDependencyLoader]\n- private void load(TauRulesetConfigManager settings)\n+ private void load()\n{\nRelativeSizeAxes = Axes.Both;\nSize = new Vector2(0.6f);\n@@ -148,7 +147,8 @@ private void load(TauRulesetConfigManager settings)\nColour = Color4.Transparent\n};\n- settings?.BindWith(TauRulesetSettings.ShowVisualizer, showVisualisation);\n+ //settings?.BindWith(TauRulesetSettings.ShowVisualizer, showVisualisation);\n+\nshowVisualisation.ValueChanged += value => { visualisation.FadeTo(value.NewValue ? 1 : 0, 500); };\nshowVisualisation.TriggerChange();\n}\n@@ -169,6 +169,7 @@ protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint,\n{\nvisualisation.FlashColour(Color4.White, timingPoint.BeatLength * 4, Easing.In);\nfirstKiaiBeat = false;\n+\nreturn;\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "new_path": "tau/osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "diff": "<EmbeddedResource Include=\"Resources\\**\" />\n</ItemGroup>\n<ItemGroup>\n- <PackageReference Include=\"ppy.osu.Framework\" Version=\"2019.1213.0\" />\n- <PackageReference Include=\"ppy.osu.Game\" Version=\"2019.1213.0\" />\n+ <PackageReference Include=\"ppy.osu.Framework\" Version=\"2019.1219.0\" />\n+ <PackageReference Include=\"ppy.osu.Game\" Version=\"2019.1219.0\" />\n</ItemGroup>\n<ItemGroup>\n<Folder Include=\"Resources\\Samples\\Gameplay\" />\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "new_path": "tau/osu.Game.Rulesets.tau/tauRuleset.cs", "diff": "using osu.Game.Rulesets.Configuration;\nusing osu.Game.Rulesets.Difficulty;\nusing osu.Game.Rulesets.Mods;\n+using osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Beatmaps;\nusing osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.Mods;\n+using osu.Game.Rulesets.Tau.Scoring;\nusing osu.Game.Rulesets.Tau.UI;\nusing osu.Game.Rulesets.UI;\n@@ -22,11 +24,6 @@ namespace osu.Game.Rulesets.Tau\n{\npublic class TauRuleset : Ruleset\n{\n- public TauRuleset(RulesetInfo rulesetInfo = null)\n- : base(rulesetInfo)\n- {\n- }\n-\npublic override string Description => \"tau\";\npublic override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) =>\n@@ -85,6 +82,8 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\npublic override IRulesetConfigManager CreateConfig(SettingsStore settings) => new TauRulesetConfigManager(settings, RulesetInfo);\n+ public override ScoreProcessor CreateScoreProcessor(IBeatmap beatmap) => new TauScoreProcessor(beatmap);\n+\npublic override IEnumerable<KeyBinding> GetDefaultKeyBindings(int variant = 0) => new[]\n{\nnew KeyBinding(InputKey.Z, TauAction.LeftButton),\n" } ]
C#
MIT License
taulazer/tau
Update game and fix stuff needed to disable settings for now. (see TauSettingsSubsection.cs#L25)
664,859
08.03.2020 00:32:44
18,000
67dd3ba6d2e19d2fbf23201c87e9b7e16882eac3
update game | tweaks
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -19,6 +19,9 @@ protected override int NumericResultFor(HitResult result)\ncase HitResult.Great:\nreturn 300;\n+\n+ case HitResult.Good:\n+ return 150;\n}\n}\n@@ -32,6 +35,9 @@ protected override double HealthIncreaseFor(HitResult result)\ncase HitResult.Miss:\nreturn -0.02;\n+ case HitResult.Good:\n+ return -0.01;\n+\ncase HitResult.Great:\nreturn 0.01;\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Mods/TauModAutoHold.cs", "new_path": "tau/osu.Game.Rulesets.tau/Mods/TauModAutoHold.cs", "diff": "@@ -12,7 +12,7 @@ public class TauModAutoHold : Mod\n{\npublic override string Name => \"Auto Hold\";\npublic override string Acronym => \"AH\";\n- public override IconUsage Icon => OsuIcon.ModSpunout;\n+ public override IconUsage? Icon => OsuIcon.ModSpunout;\npublic override ModType Type => ModType.DifficultyReduction;\npublic override string Description => @\"Hold beat will automatically be completed.\";\npublic override double ScoreMultiplier => 0.9;\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Mods/TauModBlinds.cs", "new_path": "tau/osu.Game.Rulesets.tau/Mods/TauModBlinds.cs", "diff": "@@ -24,7 +24,7 @@ public class TauModBlinds : Mod, IApplicableToDrawableRuleset<TauHitObject>, IAp\npublic override string Description => \"Play with blinds on your screen.\";\npublic override string Acronym => \"BL\";\n- public override IconUsage Icon => FontAwesome.Solid.Adjust;\n+ public override IconUsage? Icon => FontAwesome.Solid.Adjust;\npublic override ModType Type => ModType.DifficultyIncrease;\npublic override bool Ranked => false;\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Mods/TauModFlashlight.cs", "new_path": "tau/osu.Game.Rulesets.tau/Mods/TauModFlashlight.cs", "diff": "using osu.Framework.Graphics;\nusing osu.Framework.Input;\nusing osu.Framework.Input.Events;\n-using osu.Framework.MathUtils;\n+using osu.Framework.Utils;\nusing osu.Game.Rulesets.Mods;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osuTK;\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -72,6 +72,7 @@ protected override void UpdateInitialTransforms()\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n{\nDebug.Assert(HitObject.HitWindows != null);\n+\nif (CheckValidation == null) return;\nif (!userTriggered)\n@@ -87,6 +88,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nif (timeOffset >= 0 && Result != null && validated)\n{\nvar result = HitObject.HitWindows.ResultFor(timeOffset);\n+\nif (result >= HitResult.Meh)\nresult = HitResult.Great;\n@@ -111,6 +113,7 @@ protected override void UpdateStateTransforms(ArmedState state)\ncase ArmedState.Idle:\nLifetimeStart = HitObject.StartTime - HitObject.TimePreempt;\nHitAction = null;\n+\nbreak;\ncase ArmedState.Hit:\n@@ -123,6 +126,7 @@ protected override void UpdateStateTransforms(ArmedState state)\n.FadeOut(time_fade_hit);\nthis.FadeOut(time_fade_hit);\n+\nbreak;\ncase ArmedState.Miss:\n@@ -135,6 +139,7 @@ protected override void UpdateStateTransforms(ArmedState state)\n.FadeOut(time_fade_miss);\nthis.FadeOut(time_fade_miss);\n+\nbreak;\n}\n}\n@@ -154,6 +159,6 @@ public bool OnPressed(TauAction action)\nreturn result;\n}\n- public bool OnReleased(TauAction action) => false;\n+ public void OnReleased(TauAction action) { }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "diff": "@@ -17,7 +17,7 @@ public class TauHitObject : HitObject, IHasComboInformation\npublic override Judgement CreateJudgement() => new TauJudgement();\npublic double TimePreempt = 600;\n- public double TimeFadeIn = 100;\n+ public double TimeFadeIn = 400;\npublic float Angle { get; set; }\npublic Vector2 PositionToEnd { get; set; }\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Replays/tauFramedReplayInputHandler.cs", "new_path": "tau/osu.Game.Rulesets.tau/Replays/tauFramedReplayInputHandler.cs", "diff": "using System.Diagnostics;\nusing System.Linq;\nusing osu.Framework.Input.StateChanges;\n-using osu.Framework.MathUtils;\n+using osu.Framework.Utils;\nusing osu.Game.Replays;\nusing osu.Game.Rulesets.Replays;\nusing osuTK;\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "new_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "diff": "@@ -12,6 +12,7 @@ public override bool IsHitResultAllowed(HitResult result)\nswitch (result)\n{\ncase HitResult.Great:\n+ case HitResult.Good:\ncase HitResult.Miss:\nreturn true;\n}\n@@ -22,7 +23,8 @@ public override bool IsHitResultAllowed(HitResult result)\nprotected override DifficultyRange[] GetRanges() => new[]\n{\nnew DifficultyRange(HitResult.Great, 199, 199, 199),\n- new DifficultyRange(HitResult.Miss, 200, 200, 200),\n+ new DifficultyRange(HitResult.Good, 299, 250, 200),\n+ new DifficultyRange(HitResult.Miss, 300, 300, 300),\n};\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/KiaiHitExplosion.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/KiaiHitExplosion.cs", "diff": "using osu.Framework.Graphics;\nusing osu.Framework.Graphics.Containers;\nusing osu.Framework.Graphics.Effects;\n-using osu.Framework.MathUtils;\n+using osu.Framework.Utils;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osuTK;\nusing osuTK.Graphics;\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "new_path": "tau/osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "diff": "<EmbeddedResource Include=\"Resources\\**\" />\n</ItemGroup>\n<ItemGroup>\n- <PackageReference Include=\"ppy.osu.Framework\" Version=\"2019.1227.1\" />\n- <PackageReference Include=\"ppy.osu.Game\" Version=\"2019.1227.0\" />\n+ <PackageReference Include=\"ppy.osu.Framework\" Version=\"2020.305.0\" />\n+ <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.306.0\" />\n</ItemGroup>\n<ItemGroup>\n<Folder Include=\"Resources\\Samples\\Gameplay\" />\n" } ]
C#
MIT License
taulazer/tau
update game | tweaks
664,874
10.03.2020 00:33:13
-28,800
4a64ea3398a9f3b44e7c9d75b13321997c3cb6fd
Reduce amount of aliasing Changes include: * Replacing CircularProgress with CircularContainers (except for the paddle) * Adding EdgeSmoothness to Boxes
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -47,6 +47,7 @@ public DrawabletauHitObject(TauHitObject hitObject)\nAddInternal(Box = new Box\n{\n+ EdgeSmoothness = new Vector2(1f),\nRelativeSizeAxes = Axes.Both,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "diff": "using osu.Framework.Graphics.Cursor;\nusing osu.Framework.Graphics.Shapes;\nusing osu.Framework.Graphics.UserInterface;\n+using osu.Framework.Graphics.Shaders;\nusing osu.Framework.Input.Events;\nusing osu.Game.Beatmaps;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osuTK;\n+using osuTK.Graphics;\nnamespace osu.Game.Rulesets.Tau.UI.Cursor\n{\n@@ -92,12 +94,19 @@ public DefaultCursor(float cs = 5f)\nprivate class AbsoluteCursor : CursorContainer\n{\n- protected override Drawable CreateCursor() => new CircularProgress\n+ protected override Drawable CreateCursor() => new CircularContainer\n{\nSize = new Vector2(15),\nOrigin = Anchor.Centre,\n- InnerRadius = 0.25f,\n- Current = new Bindable<double>(1)\n+ Masking = true,\n+ BorderColour = Color4.White,\n+ BorderThickness = 4,\n+ Child = new Box\n+ {\n+ RelativeSizeAxes = Axes.Both,\n+ AlwaysPresent = true,\n+ Alpha = 0,\n+ }\n};\n}\n@@ -135,6 +144,7 @@ public GameplayCursor(float cs)\n},\nnew Box\n{\n+ EdgeSmoothness = new Vector2(1f),\nAnchor = Anchor.TopCentre,\nOrigin = Anchor.TopCentre,\nRelativeSizeAxes = Axes.Y,\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "using osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\n+using osu.Framework.Graphics.Shapes;\nusing osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\n@@ -54,16 +55,23 @@ public TauPlayfield()\nOrigin = Anchor.Centre,\nChildren = new Drawable[]\n{\n- new CircularProgress\n+ new CircularContainer\n{\nRelativeSizeAxes = Axes.Both,\n- Current = new BindableDouble(1),\n- InnerRadius = 0.025f / 4,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n+ Masking = true,\nFillMode = FillMode.Fit,\nFillAspectRatio = 1, // 1:1 Aspect ratio to get a perfect circle\n+ BorderThickness = 3,\n+ BorderColour = Color4.White,\n+ Child = new Box\n+ {\n+ RelativeSizeAxes = Axes.Both,\n+ AlwaysPresent = true,\n+ Alpha = 0,\n}\n+ },\n}\n},\nHitObjectContainer,\n" } ]
C#
MIT License
taulazer/tau
Reduce amount of aliasing Changes include: * Replacing CircularProgress with CircularContainers (except for the paddle) * Adding EdgeSmoothness to Boxes
664,859
09.03.2020 17:56:40
14,400
d024e8fd0b0982e8e6d36a85e5fbfaca144b12b7
fix objects not allowing early clicks | tighten hit window
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -17,29 +17,11 @@ protected override int NumericResultFor(HitResult result)\ndefault:\nreturn 0;\n- case HitResult.Great:\n- return 300;\n-\ncase HitResult.Good:\n- return 150;\n- }\n- }\n-\n- protected override double HealthIncreaseFor(HitResult result)\n- {\n- switch (result)\n- {\n- default:\n- return 0;\n-\n- case HitResult.Miss:\n- return -0.02;\n-\n- case HitResult.Good:\n- return -0.01;\n+ return 100;\ncase HitResult.Great:\n- return 0.01;\n+ return 300;\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "tau/osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -86,11 +86,11 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nbool validated = CheckValidation.Invoke(this);\n- if (timeOffset >= 0 && Result != null && validated)\n+ if (Result != null && validated)\n{\nvar result = HitObject.HitWindows.ResultFor(timeOffset);\n- if (result >= HitResult.Meh)\n+ if (result >= HitResult.Meh && result <= HitResult.Great)\nresult = HitResult.Great;\nif (result == HitResult.None)\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "new_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "diff": "@@ -12,7 +12,6 @@ public override bool IsHitResultAllowed(HitResult result)\nswitch (result)\n{\ncase HitResult.Great:\n- case HitResult.Good:\ncase HitResult.Miss:\nreturn true;\n}\n@@ -22,9 +21,9 @@ public override bool IsHitResultAllowed(HitResult result)\nprotected override DifficultyRange[] GetRanges() => new[]\n{\n- new DifficultyRange(HitResult.Great, 199, 199, 199),\n- new DifficultyRange(HitResult.Good, 299, 250, 200),\n- new DifficultyRange(HitResult.Miss, 300, 300, 300),\n+ new DifficultyRange(HitResult.Great, 24, 30, 49),\n+ new DifficultyRange(HitResult.Good, 49, 74, 99),\n+ new DifficultyRange(HitResult.Miss, 50, 75, 100),\n};\n}\n}\n" } ]
C#
MIT License
taulazer/tau
fix objects not allowing early clicks | tighten hit window
664,859
09.03.2020 18:03:03
14,400
df134becbb7b84a369e655d1501d6b0961097a63
hide the cursor properly
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "@@ -31,9 +31,6 @@ public class TauPlayfield : Playfield\nprivate JudgementContainer<DrawableTauJudgement> judgementLayer;\nprivate readonly Container<KiaiHitExplosion> kiaiExplosionContainer;\n- // Hides the cursor\n- protected override GameplayCursorContainer CreateCursor() => null;\n-\npublic TauPlayfield()\n{\ncursor = new TauCursor();\n" } ]
C#
MIT License
taulazer/tau
hide the cursor properly
664,859
09.03.2020 18:42:34
14,400
2615fda39fb69e505749c127f48a2e5d64cd535a
Fix scoring need to replace this with good and great results instead
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -17,12 +17,30 @@ protected override int NumericResultFor(HitResult result)\ndefault:\nreturn 0;\n- case HitResult.Good:\n+ case HitResult.Great:\nreturn 100;\n- case HitResult.Great:\n+ case HitResult.Perfect:\nreturn 300;\n}\n}\n+\n+ protected override double HealthIncreaseFor(HitResult result)\n+ {\n+ switch (result)\n+ {\n+ default:\n+ return 0;\n+\n+ case HitResult.Miss:\n+ return -0.02;\n+\n+ case HitResult.Great:\n+ return 0.01;\n+\n+ case HitResult.Perfect:\n+ return 0.02;\n+ }\n+ }\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Fix scoring need to replace this with good and great results instead
664,874
10.03.2020 13:36:26
-28,800
970f8069dde85ba6bd0a92d9b77b7c1c18a69b6f
Fix "Perfect" judgement allowing players to have more than 100 acc I made the Great Judgement equal to the Perfect judgement, similar to mania. Just a theory but I think internally lazer treats "Great"s as the upper limit, and "Perfect" happened to exceed that, causing the issue.
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -18,8 +18,6 @@ protected override int NumericResultFor(HitResult result)\nreturn 0;\ncase HitResult.Great:\n- return 100;\n-\ncase HitResult.Perfect:\nreturn 300;\n}\n" } ]
C#
MIT License
taulazer/tau
Fix "Perfect" judgement allowing players to have more than 100 acc I made the Great Judgement equal to the Perfect judgement, similar to mania. Just a theory but I think internally lazer treats "Great"s as the upper limit, and "Perfect" happened to exceed that, causing the issue.
664,874
10.03.2020 14:05:53
-28,800
d210220bea7a99709cca7f284d23f9a77c2466cb
Raise MaxResult instead
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Tau.Judgements\n{\npublic class TauJudgement : Judgement\n{\n- public override HitResult MaxResult => HitResult.Great;\n+ public override HitResult MaxResult => HitResult.Perfect;\nprotected override int NumericResultFor(HitResult result)\n{\n@@ -18,6 +18,8 @@ protected override int NumericResultFor(HitResult result)\nreturn 0;\ncase HitResult.Great:\n+ return 100;\n+\ncase HitResult.Perfect:\nreturn 300;\n}\n" } ]
C#
MIT License
taulazer/tau
Raise MaxResult instead
664,859
12.03.2020 03:25:51
14,400
30cc82c1472dae77ec36668563fcc0a4d6834ac8
remove health judgement and loosen ranges
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -24,23 +24,5 @@ protected override int NumericResultFor(HitResult result)\nreturn 300;\n}\n}\n-\n- protected override double HealthIncreaseFor(HitResult result)\n- {\n- switch (result)\n- {\n- default:\n- return 0;\n-\n- case HitResult.Miss:\n- return -0.02;\n-\n- case HitResult.Great:\n- return 0.01;\n-\n- case HitResult.Perfect:\n- return 0.02;\n- }\n- }\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "new_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "diff": "@@ -11,6 +11,7 @@ public override bool IsHitResultAllowed(HitResult result)\n{\nswitch (result)\n{\n+ case HitResult.Perfect:\ncase HitResult.Great:\ncase HitResult.Miss:\nreturn true;\n@@ -21,9 +22,9 @@ public override bool IsHitResultAllowed(HitResult result)\nprotected override DifficultyRange[] GetRanges() => new[]\n{\n- new DifficultyRange(HitResult.Great, 24, 30, 49),\n- new DifficultyRange(HitResult.Good, 49, 74, 99),\n- new DifficultyRange(HitResult.Miss, 50, 75, 100),\n+ new DifficultyRange(HitResult.Perfect, 127, 112, 97),\n+ new DifficultyRange(HitResult.Great, 151, 136, 121),\n+ new DifficultyRange(HitResult.Miss, 188, 173, 158),\n};\n}\n}\n" } ]
C#
MIT License
taulazer/tau
remove health judgement and loosen ranges
664,859
14.03.2020 18:48:31
14,400
11891aa152eac10031ff27e1746f6941261b9ecc
tighten health increase
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "tau/osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -24,5 +24,23 @@ protected override int NumericResultFor(HitResult result)\nreturn 300;\n}\n}\n+\n+ protected override double HealthIncreaseFor(HitResult result)\n+ {\n+ switch (result)\n+ {\n+ default:\n+ return 0;\n+\n+ case HitResult.Miss:\n+ return -0.2;\n+\n+ case HitResult.Great:\n+ return 0.1;\n+\n+ case HitResult.Perfect:\n+ return 0.2;\n+ }\n+ }\n}\n}\n" } ]
C#
MIT License
taulazer/tau
tighten health increase
664,859
14.03.2020 19:28:33
14,400
333bb265497439c0601a8d2001d2f386bf2180aa
playfield dimming | fix visualisation toggle
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Configuration/TauRulesetConfigManager.cs", "new_path": "tau/osu.Game.Rulesets.tau/Configuration/TauRulesetConfigManager.cs", "diff": "@@ -18,11 +18,13 @@ protected override void InitialiseDefaults()\nbase.InitialiseDefaults();\nSet(TauRulesetSettings.ShowVisualizer, true);\n+ Set(TauRulesetSettings.PlayfieldDim, 0.3f, 0, 1, 0.01f);\n}\n}\npublic enum TauRulesetSettings\n{\n- ShowVisualizer\n+ ShowVisualizer,\n+ PlayfieldDim\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs", "diff": "@@ -32,6 +32,13 @@ private void load()\n{\nLabelText = \"Show Visualizer\",\nBindable = config.GetBindable<bool>(TauRulesetSettings.ShowVisualizer)\n+ },\n+ new SettingsSlider<float>\n+ {\n+ LabelText = \"Playfield dim\",\n+ Bindable = config.GetBindable<float>(TauRulesetSettings.PlayfieldDim),\n+ KeyboardStep = 0.01f,\n+ DisplayAsPercentage = true\n}\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "tau/osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "@@ -27,6 +27,7 @@ namespace osu.Game.Rulesets.Tau.UI\n[Cached]\npublic class TauPlayfield : Playfield\n{\n+ private Circle playfieldBackground;\nprivate TauCursor cursor;\nprivate JudgementContainer<DrawableTauJudgement> judgementLayer;\nprivate readonly Container<KiaiHitExplosion> kiaiExplosionContainer;\n@@ -43,6 +44,16 @@ public TauPlayfield()\nDepth = 1,\n},\nnew VisualisationContainer(),\n+ playfieldBackground = new Circle\n+ {\n+ Colour = Color4.Black,\n+ RelativeSizeAxes = Axes.Both,\n+ Size = new Vector2(0.6f),\n+ FillAspectRatio = 1,\n+ FillMode = FillMode.Fit,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n+ },\nnew Container\n{\nRelativeSizeAxes = Axes.Both,\n@@ -84,6 +95,26 @@ public TauPlayfield()\n});\n}\n+ [Resolved]\n+ private TauRulesetConfigManager config { get; set; }\n+\n+ protected override void LoadComplete()\n+ {\n+ base.LoadComplete();\n+\n+ PlayfieldDimLevel = config.GetBindable<float>(TauRulesetSettings.PlayfieldDim);\n+ PlayfieldDimLevel.ValueChanged += _ => updateVisuals();\n+\n+ updateVisuals();\n+ }\n+\n+ protected Bindable<float> PlayfieldDimLevel { get; private set; }\n+\n+ private void updateVisuals()\n+ {\n+ playfieldBackground.FadeTo(PlayfieldDimLevel.Value, 100);\n+ }\n+\npublic bool CheckIfWeCanValidate(DrawabletauHitObject obj) => cursor.CheckForValidation(obj);\npublic override void Add(DrawableHitObject h)\n@@ -131,7 +162,7 @@ private class VisualisationContainer : BeatSyncedContainer\nprivate LogoVisualisation visualisation;\nprivate bool firstKiaiBeat = true;\nprivate int kiaiBeatIndex;\n- private readonly Bindable<bool> showVisualisation = new Bindable<bool>(true);\n+ protected Bindable<bool> ShowVisualisation;\n[BackgroundDependencyLoader(true)]\nprivate void load(TauRulesetConfigManager settings)\n@@ -152,10 +183,10 @@ private void load(TauRulesetConfigManager settings)\nColour = Color4.Transparent\n};\n- settings?.BindWith(TauRulesetSettings.ShowVisualizer, showVisualisation);\n+ ShowVisualisation = settings.GetBindable<bool>(TauRulesetSettings.ShowVisualizer);\n- showVisualisation.ValueChanged += value => { visualisation.FadeTo(value.NewValue ? 1 : 0, 500); };\n- showVisualisation.TriggerChange();\n+ ShowVisualisation.ValueChanged += value => { visualisation.FadeTo(value.NewValue ? 1 : 0, 500); };\n+ ShowVisualisation.TriggerChange();\n}\nprotected override void LoadComplete()\n" } ]
C#
MIT License
taulazer/tau
playfield dimming | fix visualisation toggle
664,859
14.03.2020 22:54:03
14,400
eb8508d95c6bf47246061d036445db54b5ef2e99
loosen difficulty range
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "new_path": "tau/osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "diff": "@@ -22,9 +22,9 @@ public override bool IsHitResultAllowed(HitResult result)\nprotected override DifficultyRange[] GetRanges() => new[]\n{\n- new DifficultyRange(HitResult.Perfect, 127, 112, 97),\n- new DifficultyRange(HitResult.Great, 151, 136, 121),\n- new DifficultyRange(HitResult.Miss, 188, 173, 158),\n+ new DifficultyRange(HitResult.Perfect, 140, 100, 60),\n+ new DifficultyRange(HitResult.Great, 200, 150, 100),\n+ new DifficultyRange(HitResult.Miss, 400, 400, 400),\n};\n}\n}\n" } ]
C#
MIT License
taulazer/tau
loosen difficulty range
664,870
15.03.2020 18:00:22
14,400
aa5717a473c56198a6eea101670f26791b9cfff4
(fix): appveyor why this is literally impossible to fix
[ { "change_type": "MODIFY", "old_path": "tau/osu.Game.Rulesets.tau/Mods/TauModRelax.cs", "new_path": "tau/osu.Game.Rulesets.tau/Mods/TauModRelax.cs", "diff": "@@ -34,7 +34,7 @@ public void Update(Playfield playfield)\nif (time < tauHit.HitObject.StartTime + relax_leniency) continue;\n- if ((tauHit.HitObject is IHasEndTime hasEnd && time) > (hasEnd.EndTime || tauHit.IsHit))\n+ if (tauHit.HitObject is IHasEndTime hasEnd && time > hasEnd.EndTime || tauHit.IsHit)\ncontinue;\nif (tauHit is DrawabletauHitObject)\n" } ]
C#
MIT License
taulazer/tau
(fix): appveyor why this is literally impossible to fix
664,870
15.03.2020 19:06:17
14,400
0f41f3edeeb88e5d940fcf0f89eb7aa46fbe6dc0
fix README inconsistencies
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -14,9 +14,9 @@ We have [prebuilt libraries](https://github.com/Altenhh/tau/releases) for users\n### Instructions\n##### Windows\n-On Windows, the library must be put in `%localappdata%\\osulazer`, inside the directory of the current osu!lazer version. osu!lazer will automatically work with the `.dll` when you open it, so nothing else needs to be done.\n+On Windows, the library must be put in `%localappdata%\\osulazer\\app-(Current osu!lazer Version)`, inside the directory of the current osu!lazer version. osu!lazer will automatically work with the `.dll` when you open it, so nothing else needs to be done.\n-*If instructions for your platform isn't listed above, then it's either being written, or is unsupported. At this very time, not operating system is known to be unsupported.*\n+*If instructions for your platform isn't listed above, then it's either being written, or is unsupported. At the very time of writing this (March 15th, 2020), no operating system is known to be unsupported.*\n## Development\nWhen developing or debugging the osu!tau codebase, a few prerequisites are required as following:\n" } ]
C#
MIT License
taulazer/tau
fix README inconsistencies
664,859
16.03.2020 14:41:45
14,400
4a55887877ee510b104ff926ea52546dfd649224
use relative positioning
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "using osuTK;\nusing osuTK.Graphics;\nusing System.Linq;\n+using osu.Game.Rulesets.Tau.UI;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\n@@ -44,6 +45,7 @@ public DrawabletauHitObject(TauHitObject hitObject)\nSize = new Vector2(10);\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n+ RelativePositionAxes = Axes.Both;\nAddInternal(Box = new Box\n{\n@@ -67,7 +69,7 @@ protected override void UpdateInitialTransforms()\nvar a = b *= (float)(Math.PI / 180);\nBox.FadeIn(HitObject.TimeFadeIn);\n- this.MoveTo(new Vector2(-(215 * (float)Math.Cos(a)), -(215 * (float)Math.Sin(a))), HitObject.TimePreempt);\n+ this.MoveTo(new Vector2(-(TauPlayfield.UNIVERSAL_SCALE * 0.8f * (float)Math.Cos(a)), -(TauPlayfield.UNIVERSAL_SCALE * 0.8f * (float)Math.Sin(a))), HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n" } ]
C#
MIT License
taulazer/tau
use relative positioning
664,871
17.03.2020 09:36:12
18,000
92239d71dbe6038b1025e5ff648eae2b5e279496
Add Autoplay functionality replays will tend to break at aspect ratios of narrower than 4:3
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Replays/tauReplayFrame.cs", "new_path": "osu.Game.Rulesets.tau/Replays/tauReplayFrame.cs", "diff": "@@ -12,8 +12,10 @@ public class TauReplayFrame : ReplayFrame\npublic List<TauAction> Actions = new List<TauAction>();\npublic Vector2 Position;\n- public TauReplayFrame(TauAction? button = null)\n+ public TauReplayFrame(double time, Vector2 position, TauAction? button = null) : base(time)\n{\n+ Position = position;\n+\nif (button.HasValue)\nActions.Add(button.Value);\n}\n" } ]
C#
MIT License
taulazer/tau
Add Autoplay functionality replays will tend to break at aspect ratios of narrower than 4:3
664,874
18.03.2020 01:25:12
-28,800
eb946325739f555d84552e34269dd57f2631df7c
Fix mouse movement not working at certain distances and angles Fixes
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "new_path": "osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "diff": "@@ -42,6 +42,8 @@ private void load(IBindable<WorkingBeatmap> beatmap)\nprivate class DefaultCursor : CompositeDrawable\n{\n+ public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n+\npublic readonly Box HitReceptor;\npublic DefaultCursor(float cs = 5f)\n" } ]
C#
MIT License
taulazer/tau
Fix mouse movement not working at certain distances and angles Fixes #29
664,871
17.03.2020 21:55:08
18,000
f868efdc1e7eb73036bd2838bc53f44a058c91e1
Fix replays not working on narrow aspect ratios and allow singletapping on slow notes
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "diff": "@@ -34,8 +34,8 @@ public TauAutoGenerator(IBeatmap beatmap)\n/// </summary>\nprivate int buttonIndex;\n- private const float offset = 230;\n- private const float cursorDistance = 220;\n+ private const float offset = 305;\n+ private const float cursorDistance = 280;\npublic override Replay Generate()\n{\n@@ -53,6 +53,8 @@ public override Replay Generate()\nfloat b = Beatmap.HitObjects[i - 1].PositionToEnd.GetDegreesFromPosition(new Vector2(5, 5)) * 4 * MathF.PI / 180;\nReplay.Frames.Add(new TauReplayFrame(h.StartTime - reactionTime, new Vector2(offset - (cursorDistance * MathF.Cos(b)), offset - (cursorDistance * MathF.Sin(b)))));\n+\n+ buttonIndex = (int)TauAction.LeftButton;\n}\nfloat a = h.PositionToEnd.GetDegreesFromPosition(new Vector2(5, 5)) * 4 * MathF.PI / 180;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "new_path": "osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "diff": "@@ -31,5 +31,7 @@ public DrawabletauRuleset(TauRuleset ruleset, IBeatmap beatmap, IReadOnlyList<Mo\npublic override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(TauHitObject h) => new DrawabletauHitObject(h);\nprotected override PassThroughInputManager CreateInputManager() => new TauInputManager(Ruleset?.RulesetInfo);\n+\n+ public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new TauPlayfieldAdjustmentContainer();\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Fix replays not working on narrow aspect ratios and allow singletapping on slow notes
664,871
17.03.2020 22:44:35
18,000
aa21613bdfb3c1c0eb2e7f4aeee3cabaa4b28aa5
Fix playfield scaling
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/TauPlayfieldAdjustmentContainer.cs", "new_path": "osu.Game.Rulesets.tau/UI/TauPlayfieldAdjustmentContainer.cs", "diff": "@@ -14,11 +14,15 @@ class TauPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer\nprotected override Container<Drawable> Content => content;\nprivate readonly Container content;\n+ private const float playfield_size_adjust = 4f / 3;\n+\npublic TauPlayfieldAdjustmentContainer()\n{\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n+ Size = new Vector2(playfield_size_adjust);\n+\nInternalChild = new Container\n{\nAnchor = Anchor.Centre,\n" } ]
C#
MIT License
taulazer/tau
Fix playfield scaling
664,859
18.03.2020 03:23:44
14,400
95c09a394e75873e968c0130267b7d41367a922c
include original game
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "[![GitHub forks](https://img.shields.io/github/forks/Altenhh/tau.svg?style=flat-square)](https://github.com/Altenhh/tauE/network)\n[![GitHub issues](https://img.shields.io/github/issues/Altenhh/tau.svg?style=flat-square)](https://github.com/Altenhh/tau/issues)\n-A customized [osu!](https://github.com/ppy/osu) mode surrounding a paddle and some notes. Original credit to the idea belonging to *pizzapip*.\n+A customized [osu!](https://github.com/ppy/osu) mode surrounding a paddle and some notes. [Original](https://deadlysprinklez.itch.io/tau) credit to the idea belonging to *pizzapip*.\n## Running the Gamemode\nWe have [prebuilt libraries](https://github.com/Altenhh/tau/releases) for users looking to play the mode without creating a development environment. All releases will work on all operating systems that *osu!* supports.\n" } ]
C#
MIT License
taulazer/tau
include original game
664,871
18.03.2020 07:56:16
18,000
aebb51b780cdf67c95a0751ee29177bdbaca9b05
Change scale of containers to be the correct size
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/TauPlayfieldAdjustmentContainer.cs", "new_path": "osu.Game.Rulesets.tau/UI/TauPlayfieldAdjustmentContainer.cs", "diff": "@@ -11,7 +11,7 @@ public class TauPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer\nprotected override Container<Drawable> Content => content;\nprivate readonly Container content;\n- private const float playfield_size_adjust = 4f / 3;\n+ private const float playfield_size_adjust = 3.5f / 3;\npublic TauPlayfieldAdjustmentContainer()\n{\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "@@ -42,8 +42,11 @@ public TauPlayfield()\n{\njudgementLayer = new JudgementContainer<DrawableTauJudgement>\n{\n+ Scale = Vector2.One * (4f / 3),\nRelativeSizeAxes = Axes.Both,\nDepth = 1,\n+ Anchor = Anchor.Centre,\n+ Origin = Anchor.Centre,\n},\nnew VisualisationContainer(),\nplayfieldBackground = new Circle\n@@ -102,6 +105,7 @@ public TauPlayfield()\nName = \"Kiai hit explosions\",\nRelativeSizeAxes = Axes.Both,\nFillMode = FillMode.Fit,\n+ Scale = Vector2.One * (4f / 3),\nBlending = BlendingParameters.Additive,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n" } ]
C#
MIT License
taulazer/tau
Change scale of containers to be the correct size
664,871
18.03.2020 14:12:22
18,000
31ccfecf12e6c68fa72f6bb13ed41c0f330bd08f
Fix missing hitsounding for notes converted from sliders
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "new_path": "osu.Game.Rulesets.tau/Beatmaps/tauBeatmapConverter.cs", "diff": "@@ -33,7 +33,7 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original\ndefault:\nreturn new TauHitObject\n{\n- Samples = original.Samples,\n+ Samples = original is IHasCurve ? ((IHasCurve)original).NodeSamples[0] : original.Samples,\nStartTime = original.StartTime,\nPositionToEnd = position,\nNewCombo = comboData?.NewCombo ?? false,\n" } ]
C#
MIT License
taulazer/tau
Fix missing hitsounding for notes converted from sliders
664,859
18.03.2020 16:38:55
14,400
02571dde5801ef573794293b49351655eba99c30
add tau's discord server
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "[![tau](https://cdn.discordapp.com/attachments/680267083606655030/688688294329843732/the.png)](https://github.com/Altenhh/tau \"tau\")\n# osu!tau\n+\n+<div>\n+ <a href=\"https://discord.gg/7Y8GXAa\"><img src=\"https://canary.discordapp.com/api/guilds/689728872282849313/widget.png?style=banner2\" alt=\"Join Discord Server\"/></a>\n+</div>\n+\n[![release](https://img.shields.io/badge/build-1.0.4-brightgreen?style=flat-square)](https://github.com/Altenhh/tau/releases)\n[![GitHub license](https://img.shields.io/github/license/Altenhh/tau.svg?style=flat-square)](https://github.com/Altenhh/tau/LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/Altenhh/tau.svg?style=flat-square)](https://github.com/Altenhh/tau/stargazers)\n" } ]
C#
MIT License
taulazer/tau
add tau's discord server
664,871
19.03.2020 15:40:58
18,000
6d732cff6bc160a8d3f754706e42a4af3ad84ca9
Fix Playfield and replay scaling
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "diff": "@@ -34,8 +34,8 @@ public TauAutoGenerator(IBeatmap beatmap)\n/// </summary>\nprivate int buttonIndex;\n- private const float offset = 305;\n- private const float cursorDistance = 280;\n+ private const float offset = (768 / 2f) * 0.6f;\n+ private const float cursorDistance = 250;\npublic override Replay Generate()\n{\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "@@ -32,6 +32,7 @@ public class TauPlayfield : Playfield\nprivate JudgementContainer<DrawableTauJudgement> judgementLayer;\nprivate readonly Container<KiaiHitExplosion> kiaiExplosionContainer;\n+ public static readonly Vector2 BASE_SIZE = new Vector2(768, 768);\npublic const float UNIVERSAL_SCALE = 0.6f;\npublic TauPlayfield()\n@@ -42,7 +43,6 @@ public TauPlayfield()\n{\njudgementLayer = new JudgementContainer<DrawableTauJudgement>\n{\n- Scale = Vector2.One * (4f / 3),\nRelativeSizeAxes = Axes.Both,\nDepth = 1,\nAnchor = Anchor.Centre,\n@@ -105,7 +105,6 @@ public TauPlayfield()\nName = \"Kiai hit explosions\",\nRelativeSizeAxes = Axes.Both,\nFillMode = FillMode.Fit,\n- Scale = Vector2.One * (4f / 3),\nBlending = BlendingParameters.Additive,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n" } ]
C#
MIT License
taulazer/tau
Fix Playfield and replay scaling
664,867
19.03.2020 19:00:22
18,000
072357654ee015adc480eda6adb0cab5e90847d3
Update osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "diff": "@@ -34,7 +34,7 @@ public TauAutoGenerator(IBeatmap beatmap)\n/// </summary>\nprivate int buttonIndex;\n- private const float offset = (768 / 2f) * 0.6f;\n+ private const float offset = (768 / 2f) * TauPlayfield.UNIVERSAL_SCALE;\nprivate const float cursorDistance = 250;\npublic override Replay Generate()\n" } ]
C#
MIT License
taulazer/tau
Update osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs Co-Authored-By: Noah <35349837+Altenhh@users.noreply.github.com>
664,874
22.03.2020 21:30:54
-28,800
c1319139189e01cd31e432b58f25c121596cf5eb
Make `easing` a readonly variable
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Mods/TauModBlinds.cs", "new_path": "osu.Game.Rulesets.tau/Mods/TauModBlinds.cs", "diff": "@@ -65,7 +65,7 @@ public class DrawableTauBlinds : Container\nprivate const float target_clamp = 1;\nprivate readonly float targetBreakMultiplier = 0;\n- private const float easing = 1;\n+ private readonly float easing = 1;\nprivate readonly CompositeDrawable restrictTo;\n" } ]
C#
MIT License
taulazer/tau
Make `easing` a readonly variable
664,864
25.03.2020 22:44:12
-28,800
ed89175964a836efe0e8bacd3def5779ffc213ec
implement the function
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Replays/tauReplayFrame.cs", "new_path": "osu.Game.Rulesets.tau/Replays/tauReplayFrame.cs", "diff": "// See the LICENCE file in the repository root for full licence text.\nusing System.Collections.Generic;\n+using osu.Game.Beatmaps;\n+using osu.Game.Replays.Legacy;\nusing osu.Game.Rulesets.Replays;\n+using osu.Game.Rulesets.Replays.Types;\nusing osuTK;\nnamespace osu.Game.Rulesets.Tau.Replays\n{\n- public class TauReplayFrame : ReplayFrame\n+ public class TauReplayFrame : ReplayFrame, IConvertibleReplayFrame\n{\npublic List<TauAction> Actions = new List<TauAction>();\npublic Vector2 Position;\n- public TauReplayFrame(TauAction? button = null)\n+ public TauReplayFrame()\n{\n- if (button.HasValue)\n- Actions.Add(button.Value);\n+ }\n+\n+ public TauReplayFrame(double time, Vector2 position, params TauAction[] actions) : base(time)\n+ {\n+ Position = position;\n+ Actions.AddRange(actions);\n+ }\n+\n+ public void FromLegacy(LegacyReplayFrame currentFrame, IBeatmap beatmap, ReplayFrame lastFrame = null)\n+ {\n+ Position = currentFrame.Position;\n+\n+ if (currentFrame.MouseLeft) Actions.Add(TauAction.LeftButton);\n+ if (currentFrame.MouseRight) Actions.Add(TauAction.RightButton);\n+ if (currentFrame.MouseLeft2) Actions.Add(TauAction.HardButton);\n+ }\n+\n+\n+ public LegacyReplayFrame ToLegacy(IBeatmap beatmap)\n+ {\n+ ReplayButtonState state = ReplayButtonState.None;\n+\n+ if (Actions.Contains(TauAction.LeftButton))\n+ state |= ReplayButtonState.Left1;\n+ if (Actions.Contains(TauAction.RightButton))\n+ state |= ReplayButtonState.Right1;\n+ if (Actions.Contains(TauAction.HardButton))\n+ state |= ReplayButtonState.Left2;\n+\n+ return new LegacyReplayFrame(Time, Position.X, Position.Y, state);\n}\n}\n}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "osu.Game.Rulesets.tau/UI/TauReplayRecorder.cs", "diff": "+// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.\n+// See the LICENCE file in the repository root for full licence text.\n+\n+using System.Collections.Generic;\n+using osu.Game.Replays;\n+using osu.Game.Rulesets.Tau.Replays;\n+using osu.Game.Rulesets.Replays;\n+using osu.Game.Rulesets.UI;\n+using osuTK;\n+\n+namespace osu.Game.Rulesets.Tau.UI\n+{\n+ public class TauReplayRecorder : ReplayRecorder<TauAction>\n+ {\n+ public TauReplayRecorder(Replay replay)\n+ : base(replay)\n+ {\n+ }\n+\n+ protected override ReplayFrame HandleFrame(Vector2 mousePosition, List<TauAction> actions, ReplayFrame previousFrame)\n+ => new TauReplayFrame(Time.Current, mousePosition, actions.ToArray() );\n+ }\n+}\n\\ No newline at end of file\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "new_path": "osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "diff": "@@ -31,5 +31,7 @@ public DrawabletauRuleset(TauRuleset ruleset, IBeatmap beatmap, IReadOnlyList<Mo\npublic override DrawableHitObject<TauHitObject> CreateDrawableRepresentation(TauHitObject h) => new DrawabletauHitObject(h);\nprotected override PassThroughInputManager CreateInputManager() => new TauInputManager(Ruleset?.RulesetInfo);\n+\n+ protected override ReplayRecorder CreateReplayRecorder(Replay replay) => new TauReplayRecorder(replay);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/tauRuleset.cs", "new_path": "osu.Game.Rulesets.tau/tauRuleset.cs", "diff": "using osu.Game.Rulesets.Configuration;\nusing osu.Game.Rulesets.Difficulty;\nusing osu.Game.Rulesets.Mods;\n+using osu.Game.Rulesets.Replays.Types;\nusing osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Beatmaps;\nusing osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.Mods;\n+using osu.Game.Rulesets.Tau.Replays;\nusing osu.Game.Rulesets.Tau.Scoring;\nusing osu.Game.Rulesets.Tau.UI;\nusing osu.Game.Rulesets.UI;\n@@ -103,5 +105,7 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\n{\nTexture = new TextureStore(new TextureLoaderStore(CreateResourceStore()), false).Get(\"Textures/tau\"),\n};\n+\n+ public override IConvertibleReplayFrame CreateConvertibleReplayFrame() => new TauReplayFrame();\n}\n}\n" } ]
C#
MIT License
taulazer/tau
implement the function
664,858
28.03.2020 14:41:56
-10,800
9a8078c05a18ae9a4119c8f66d5b2ce7653d315a
Add "Hitting beats" playing verb for osu!tau
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/tauRuleset.cs", "new_path": "osu.Game.Rulesets.tau/tauRuleset.cs", "diff": "@@ -86,6 +86,8 @@ public override IEnumerable<Mod> GetModsFor(ModType type)\npublic override string ShortName => \"tau\";\n+ public override string PlayingVerb => \"Hitting beats\";\n+\npublic override RulesetSettingsSubsection CreateSettings() => new TauSettingsSubsection(this);\npublic override IRulesetConfigManager CreateConfig(SettingsStore settings) => new TauRulesetConfigManager(settings, RulesetInfo);\n" } ]
C#
MIT License
taulazer/tau
Add "Hitting beats" playing verb for osu!tau
664,862
30.03.2020 21:41:26
-36,000
83e1dfffafb74b0bae9e62ba5a5c42435af05dfb
Implement Beatsize
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Configuration/TauRulesetConfigManager.cs", "new_path": "osu.Game.Rulesets.tau/Configuration/TauRulesetConfigManager.cs", "diff": "@@ -19,12 +19,14 @@ protected override void InitialiseDefaults()\nSet(TauRulesetSettings.ShowVisualizer, true);\nSet(TauRulesetSettings.PlayfieldDim, 0.3f, 0, 1, 0.01f);\n+ Set(TauRulesetSettings.BeatSize, 10f, 5, 25, 1f);\n}\n}\npublic enum TauRulesetSettings\n{\nShowVisualizer,\n- PlayfieldDim\n+ PlayfieldDim,\n+ BeatSize\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "using osuTK;\nusing osuTK.Graphics;\nusing System.Linq;\n+using osu.Framework.Allocation;\n+using osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.UI;\nnamespace osu.Game.Rulesets.Tau.Objects.Drawables\n@@ -42,7 +44,6 @@ public class DrawabletauHitObject : DrawableHitObject<TauHitObject>, IKeyBinding\npublic DrawabletauHitObject(TauHitObject hitObject)\n: base(hitObject)\n{\n- Size = new Vector2(10);\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\nRelativePositionAxes = Axes.Both;\n@@ -62,6 +63,10 @@ public DrawabletauHitObject(TauHitObject hitObject)\nPosition = Vector2.Zero;\n}\n+ [BackgroundDependencyLoader]\n+ private void load(TauRulesetConfigManager config)\n+ => this.Size = new Vector2(config.GetBindable<float>(TauRulesetSettings.BeatSize).Value);\n+\nprotected override void UpdateInitialTransforms()\n{\nbase.UpdateInitialTransforms();\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs", "new_path": "osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs", "diff": "@@ -22,7 +22,7 @@ private void load()\n{\nvar config = (TauRulesetConfigManager)Config;\n- // for an odd reason, Config seems to be passed as null when creating it. doesnt even get called...\n+ // for an odd reason, Config seems to be passed as null when creating it. Doesnt even get called...\nif (config == null)\nreturn;\n@@ -39,6 +39,12 @@ private void load()\nBindable = config.GetBindable<float>(TauRulesetSettings.PlayfieldDim),\nKeyboardStep = 0.01f,\nDisplayAsPercentage = true\n+ },\n+ new SettingsSlider<float>\n+ {\n+ LabelText = \"Beat Size\",\n+ Bindable = config.GetBindable<float>(TauRulesetSettings.BeatSize),\n+ KeyboardStep = 1f\n}\n};\n}\n" } ]
C#
MIT License
taulazer/tau
Implement Beatsize
664,862
31.03.2020 00:20:32
-36,000
221ae66288ce623fa40cc1734b05980909615016
Reduced complexity and length of lines when calculating angles
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Extensions.cs", "new_path": "osu.Game.Rulesets.tau/Extensions.cs", "diff": "@@ -15,5 +15,7 @@ public static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\nreturn degrees;\n}\n+\n+ public static float GetHitObjectAngle(this Vector2 target, Vector2 self) => target.GetDegreesFromPosition(self) * 4;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -57,7 +57,7 @@ public DrawabletauHitObject(TauHitObject hitObject)\nAlpha = 0.05f\n});\n- hitObject.Angle = hitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\n+ hitObject.Angle = hitObject.PositionToEnd.GetHitObjectAngle(Vector2.Zero);\nBox.Rotation = hitObject.Angle;\nPosition = Vector2.Zero;\n@@ -70,7 +70,7 @@ private void load(TauRulesetConfigManager config)\nprotected override void UpdateInitialTransforms()\n{\nbase.UpdateInitialTransforms();\n- var b = HitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\n+ var b = HitObject.PositionToEnd.GetHitObjectAngle(Vector2.Zero);\nvar a = b *= (float)(Math.PI / 180);\nBox.FadeIn(HitObject.TimeFadeIn);\n@@ -125,7 +125,7 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\ncase ArmedState.Hit:\n- var b = HitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\n+ var b = HitObject.PositionToEnd.GetHitObjectAngle(Vector2.Zero);\nvar a = b *= (float)(Math.PI / 180);\nBox.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n@@ -138,7 +138,7 @@ protected override void UpdateStateTransforms(ArmedState state)\nbreak;\ncase ArmedState.Miss:\n- var c = HitObject.PositionToEnd.GetDegreesFromPosition(Box.AnchorPosition) * 4;\n+ var c = HitObject.PositionToEnd.GetHitObjectAngle(Vector2.Zero);\nvar d = c *= (float)(Math.PI / 180);\nBox.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "@@ -151,7 +151,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nvar tauObj = (DrawabletauHitObject)judgedObject;\n- var b = tauObj.HitObject.PositionToEnd.GetDegreesFromPosition(tauObj.Box.AnchorPosition) * 4;\n+ var b = tauObj.HitObject.PositionToEnd.GetHitObjectAngle(Vector2.Zero);\nvar a = b *= (float)(Math.PI / 180);\nDrawableTauJudgement explosion = new DrawableTauJudgement(result, tauObj)\n" } ]
C#
MIT License
taulazer/tau
Reduced complexity and length of lines when calculating angles
664,871
30.03.2020 10:16:40
18,000
03a2b2817541f9b40c17027098043f1b76e277ab
Make size setting adjustable while in game
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -63,9 +63,14 @@ public DrawabletauHitObject(TauHitObject hitObject)\nPosition = Vector2.Zero;\n}\n+ private Bindable<float> size;\n+\n[BackgroundDependencyLoader]\nprivate void load(TauRulesetConfigManager config)\n- => this.Size = new Vector2(config.GetBindable<float>(TauRulesetSettings.BeatSize).Value);\n+ {\n+ size = config.GetBindable<float>(TauRulesetSettings.BeatSize);\n+ size.BindValueChanged(value => this.Size = new Vector2(value.NewValue), true);\n+ }\nprotected override void UpdateInitialTransforms()\n{\n" } ]
C#
MIT License
taulazer/tau
Make size setting adjustable while in game
664,871
30.03.2020 10:59:40
18,000
ef7117cd185634a145dc1590da82e1ff91bdd19d
fix autoplay not lining up correctly
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.tau/Replays/tauAutoGenerator.cs", "diff": "@@ -51,14 +51,14 @@ public override Replay Generate()\n//Make the cursor stay at the last note's position if there's enough time between the notes\nif (i > 0 && h.StartTime - Beatmap.HitObjects[i - 1].StartTime > reactionTime)\n{\n- float b = Beatmap.HitObjects[i - 1].PositionToEnd.GetDegreesFromPosition(new Vector2(5, 5)) * 4 * MathF.PI / 180;\n+ float b = Beatmap.HitObjects[i - 1].PositionToEnd.GetHitObjectAngle(Vector2.Zero) * MathF.PI / 180;\nReplay.Frames.Add(new TauReplayFrame(h.StartTime - reactionTime, new Vector2(offset - (cursorDistance * MathF.Cos(b)), offset - (cursorDistance * MathF.Sin(b)))));\nbuttonIndex = (int)TauAction.LeftButton;\n}\n- float a = h.PositionToEnd.GetDegreesFromPosition(new Vector2(5, 5)) * 4 * MathF.PI / 180;\n+ float a = h.PositionToEnd.GetHitObjectAngle(Vector2.Zero) * MathF.PI / 180;\nReplay.Frames.Add(new TauReplayFrame(h.StartTime, new Vector2(offset - (cursorDistance * MathF.Cos(a)), offset - (cursorDistance * MathF.Sin(a))), (TauAction)(buttonIndex++ % 2)));\n}\n" } ]
C#
MIT License
taulazer/tau
fix autoplay not lining up correctly
664,862
31.03.2020 12:57:48
-36,000
d7a716668bc0cbd753ff672c4eb5f48df11599c0
Update osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs thanks white space.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -23,7 +23,6 @@ public class DrawabletauHitObject : DrawableHitObject<TauHitObject>, IKeyBinding\npublic Box Box;\npublic Func<DrawabletauHitObject, bool> CheckValidation;\n-\n/// <summary>\n/// A list of keys which can result in hits for this HitObject.\n/// </summary>\n" } ]
C#
MIT License
taulazer/tau
Update osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs thanks white space. Co-Authored-By: Noah <35349837+Altenhh@users.noreply.github.com>
664,862
31.03.2020 12:59:11
-36,000
0493fb0c39ddee4fe8229bed142929cb39c769da
Update osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs thx
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs", "new_path": "osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs", "diff": "@@ -22,7 +22,6 @@ private void load()\n{\nvar config = (TauRulesetConfigManager)Config;\n- // for an odd reason, Config seems to be passed as null when creating it. Doesnt even get called...\nif (config == null)\nreturn;\n" } ]
C#
MIT License
taulazer/tau
Update osu.Game.Rulesets.tau/UI/TauSettingsSubsection.cs thx
664,874
02.04.2020 03:28:46
-28,800
4106693d2760c5d691c8109ac05007d465eb28d4
Fix solution file using caps in the path for the project files Not intended is it? Definitely will cause trouble on non windows systems
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau.sln", "new_path": "osu.Game.Rulesets.tau.sln", "diff": "@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.29123.88\nMinimumVisualStudioVersion = 10.0.40219.1\n-Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.Tau\", \"osu.Game.Rulesets.Tau\\osu.Game.Rulesets.Tau.csproj\", \"{5AE1F0F1-DAFA-46E7-959C-DA233B7C87E9}\"\n+Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.Tau\", \"osu.Game.Rulesets.tau\\osu.Game.Rulesets.Tau.csproj\", \"{5AE1F0F1-DAFA-46E7-959C-DA233B7C87E9}\"\nEndProject\n-Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"osu.Game.Rulesets.Tau.Tests\", \"osu.Game.Rulesets.Tau.Tests\\osu.Game.Rulesets.Tau.Tests.csproj\", \"{B4577C85-CB83-462A-BCE3-22FFEB16311D}\"\n+Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.Tau.Tests\", \"osu.Game.Rulesets.tau.Tests\\osu.Game.Rulesets.Tau.Tests.csproj\", \"{B4577C85-CB83-462A-BCE3-22FFEB16311D}\"\nEndProject\nGlobal\nGlobalSection(SolutionConfigurationPlatforms) = preSolution\n@@ -30,8 +30,6 @@ Global\nGlobalSection(SolutionProperties) = preSolution\nHideSolutionNode = FALSE\nEndGlobalSection\n- GlobalSection(NestedProjects) = preSolution\n- EndGlobalSection\nGlobalSection(ExtensibilityGlobals) = postSolution\nSolutionGuid = {671B0BEC-2403-45B0-9357-2C97CC517668}\nEndGlobalSection\n" } ]
C#
MIT License
taulazer/tau
Fix solution file using caps in the path for the project files Not intended is it? Definitely will cause trouble on non windows systems
664,859
03.04.2020 03:13:41
14,400
8959be4e36a1b407842cbdc56ea48f8c33ee749a
Hit window changes
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau.Tests/osu.Game.Rulesets.tau.Tests.csproj", "new_path": "osu.Game.Rulesets.tau.Tests/osu.Game.Rulesets.tau.Tests.csproj", "diff": "<PackageReference Update=\"Microsoft.EntityFrameworkCore.Sqlite\" Version=\"2.1.4\" />\n</ItemGroup>\n<ItemGroup>\n- <ProjectReference Include=\"..\\osu.Game.Rulesets.Tau\\osu.Game.Rulesets.Tau.csproj\" />\n+ <ProjectReference Include=\"..\\osu.Game.Rulesets.tau\\osu.Game.Rulesets.Tau.csproj\" />\n</ItemGroup>\n<PropertyGroup Label=\"Project\">\n<OutputType>WinExe</OutputType>\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -96,18 +96,16 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nreturn;\n}\n- bool validated = CheckValidation.Invoke(this);\n-\n- if (Result != null && validated)\n+ if (CheckValidation.Invoke(this))\n{\nvar result = HitObject.HitWindows.ResultFor(timeOffset);\n- if (result >= HitResult.Meh && result <= HitResult.Great)\n- result = HitResult.Great;\n-\nif (result == HitResult.None)\nreturn;\n+ if (result == HitResult.Miss)\n+ ApplyResult(r => r.Type = HitResult.Miss);\n+\nif (!validActionPressed)\nApplyResult(r => r.Type = HitResult.Miss);\nelse\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/tauHitObject.cs", "diff": "using osu.Game.Rulesets.Judgements;\nusing osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.Objects.Types;\n+using osu.Game.Rulesets.Scoring;\nusing osu.Game.Rulesets.Tau.Judgements;\n+using osu.Game.Rulesets.Tau.Scoring;\nusing osuTK;\nnamespace osu.Game.Rulesets.Tau.Objects\n@@ -56,6 +58,8 @@ public bool LastInCombo\nset => LastInComboBindable.Value = value;\n}\n+ protected override HitWindows CreateHitWindows() => new TauHitWindows();\n+\nprotected override void ApplyDefaultsToSelf(ControlPointInfo controlPointInfo, BeatmapDifficulty difficulty)\n{\nbase.ApplyDefaultsToSelf(controlPointInfo, difficulty);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "new_path": "osu.Game.Rulesets.tau/Scoring/TauHitWindows.cs", "diff": "@@ -11,8 +11,8 @@ public override bool IsHitResultAllowed(HitResult result)\n{\nswitch (result)\n{\n- case HitResult.Perfect:\ncase HitResult.Great:\n+ case HitResult.Good:\ncase HitResult.Miss:\nreturn true;\n}\n@@ -22,8 +22,8 @@ public override bool IsHitResultAllowed(HitResult result)\nprotected override DifficultyRange[] GetRanges() => new[]\n{\n- new DifficultyRange(HitResult.Perfect, 140, 100, 60),\n- new DifficultyRange(HitResult.Great, 200, 150, 100),\n+ new DifficultyRange(HitResult.Great, 140, 100, 60),\n+ new DifficultyRange(HitResult.Good, 200, 150, 100),\nnew DifficultyRange(HitResult.Miss, 400, 400, 400),\n};\n}\n" } ]
C#
MIT License
taulazer/tau
Hit window changes
664,859
03.04.2020 18:08:45
14,400
1ffaf9df60d41e7ba1d9c958aab1cf6b3f6d3fd1
Judgement fix
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -18,10 +18,10 @@ protected override int NumericResultFor(HitResult result)\nreturn 0;\ncase HitResult.Great:\n- return 100;\n+ return 300;\ncase HitResult.Good:\n- return 300;\n+ return 100;\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Judgement fix
664,859
03.04.2020 18:09:04
14,400
97afbef5a87494ab9fcca887f1ade26b397b6ee9
Fix max result
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "new_path": "osu.Game.Rulesets.tau/Judgements/TauJudgement.cs", "diff": "@@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Tau.Judgements\n{\npublic class TauJudgement : Judgement\n{\n- public override HitResult MaxResult => HitResult.Good;\n+ public override HitResult MaxResult => HitResult.Great;\nprotected override int NumericResultFor(HitResult result)\n{\n" } ]
C#
MIT License
taulazer/tau
Fix max result
664,862
07.04.2020 01:36:09
-36,000
17b340dba92600af7390f29f850370f916e2a092
invert y position in direction
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Extensions.cs", "new_path": "osu.Game.Rulesets.tau/Extensions.cs", "diff": "@@ -11,7 +11,7 @@ public static class Extensions\npublic static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\n{\nVector2 offset = self - target;\n- float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y));\n+ float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, -offset.Y));\nreturn degrees;\n}\n" } ]
C#
MIT License
taulazer/tau
invert y position in direction
664,862
07.04.2020 01:48:50
-36,000
584e1dc7156ab226cf9b66008c00499ef5a5aee6
Fix offset issue with centre calculation
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Extensions.cs", "new_path": "osu.Game.Rulesets.tau/Extensions.cs", "diff": "@@ -16,6 +16,6 @@ public static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\nreturn degrees;\n}\n- public static float GetHitObjectAngle(this Vector2 target) => target.GetDegreesFromPosition(new Vector2(250, 192));\n+ public static float GetHitObjectAngle(this Vector2 target) => target.GetDegreesFromPosition(new Vector2(256, 192));\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Fix offset issue with centre calculation
664,862
07.04.2020 22:58:49
-36,000
571a905616fdd3c402d89ff5c3974253b3445443
Fix object placement being in incorrect corner
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Extensions.cs", "new_path": "osu.Game.Rulesets.tau/Extensions.cs", "diff": "@@ -18,7 +18,7 @@ public static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\npublic static float GetHitObjectAngle(this Vector2 target)\n{\nVector2 offset = new Vector2(256, 192) - target; // Using centre of playfield.\n- return (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, -offset.Y));\n+ return (float)MathHelper.RadiansToDegrees(Math.Atan2(offset.X, offset.Y));\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Fix object placement being in incorrect corner
664,862
08.04.2020 01:24:21
-36,000
0f9b10799dd490c946744aee8b7bad229c0e8ff0
Update osu.Game.Rulesets.tau/Extensions.cs Gonna try this out
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Extensions.cs", "new_path": "osu.Game.Rulesets.tau/Extensions.cs", "diff": "@@ -18,7 +18,7 @@ public static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\npublic static float GetHitObjectAngle(this Vector2 target)\n{\nVector2 offset = new Vector2(256, 192) - target; // Using centre of playfield.\n- return (float)MathHelper.RadiansToDegrees(Math.Atan2(offset.X, offset.Y));\n+ return (float)MathHelper.RadiansToDegrees(Math.Atan2(offset.X, -offset.Y)) - 90;\n}\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Update osu.Game.Rulesets.tau/Extensions.cs Gonna try this out Co-Authored-By: Noah <35349837+Altenhh@users.noreply.github.com>
664,859
07.04.2020 12:20:09
14,400
b9aef93eaf0fc90e6ab8080637cd46711289ca9d
Fix CircleSize not being affected
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "new_path": "osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "diff": "@@ -19,11 +19,14 @@ namespace osu.Game.Rulesets.Tau.UI.Cursor\npublic class TauCursor : CompositeDrawable\n{\nprivate readonly IBindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();\n+ private readonly BeatmapDifficulty difficulty;\nprivate DefaultCursor defaultCursor;\n- public TauCursor()\n+ public TauCursor(BeatmapDifficulty difficulty)\n{\n+ this.difficulty = difficulty;\n+\nOrigin = Anchor.Centre;\nAnchor = Anchor.Centre;\n@@ -33,7 +36,7 @@ public TauCursor()\n[BackgroundDependencyLoader]\nprivate void load(IBindable<WorkingBeatmap> beatmap)\n{\n- InternalChild = defaultCursor = new DefaultCursor(beatmap.Value.BeatmapInfo.BaseDifficulty.CircleSize);\n+ InternalChild = defaultCursor = new DefaultCursor(difficulty.CircleSize);\nthis.beatmap.BindTo(beatmap);\n}\n@@ -158,7 +161,7 @@ public GameplayCursor(float cs)\nconst double a = 2;\nconst double b = 7;\nconst double c = 0.15;\n- const double d = 0.05;\n+ const double d = 0.0605;\n// Thank you AlFas for this code.\ndouble convertValue(double value) => c + (((d - c) * (value - a)) / (b - a));\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "new_path": "osu.Game.Rulesets.tau/UI/tauDrawableRuleset.cs", "diff": "@@ -24,7 +24,7 @@ public DrawabletauRuleset(TauRuleset ruleset, IBeatmap beatmap, IReadOnlyList<Mo\n{\n}\n- protected override Playfield CreatePlayfield() => new TauPlayfield();\n+ protected override Playfield CreatePlayfield() => new TauPlayfield(Beatmap.BeatmapInfo.BaseDifficulty);\nprotected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TauFramedReplayInputHandler(replay);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "using osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\nusing osu.Framework.Graphics.Shapes;\n+using osu.Game.Beatmaps;\nusing osu.Game.Rulesets.Tau.Configuration;\nusing osu.Game.Rulesets.Tau.Objects.Drawables;\nusing osu.Game.Rulesets.Tau.UI.Cursor;\n@@ -35,9 +36,9 @@ public class TauPlayfield : Playfield\npublic const float UNIVERSAL_SCALE = 0.6f;\npublic static readonly Vector2 BASE_SIZE = new Vector2(768, 768);\n- public TauPlayfield()\n+ public TauPlayfield(BeatmapDifficulty difficulty)\n{\n- cursor = new TauCursor();\n+ cursor = new TauCursor(difficulty);\nAddRangeInternal(new Drawable[]\n{\n" } ]
C#
MIT License
taulazer/tau
Fix CircleSize not being affected
664,874
10.04.2020 12:26:25
-28,800
d0f8b130a390ee5b898442f42edb14a0ef21b1b5
Prevent Miss Judgement from being applied twice
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -23,6 +23,7 @@ public class DrawabletauHitObject : DrawableHitObject<TauHitObject>, IKeyBinding\npublic Box Box;\npublic Func<DrawabletauHitObject, bool> CheckValidation;\n+\n/// <summary>\n/// A list of keys which can result in hits for this HitObject.\n/// </summary>\n@@ -102,9 +103,6 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)\nif (result == HitResult.None)\nreturn;\n- if (result == HitResult.Miss)\n- ApplyResult(r => r.Type = HitResult.Miss);\n-\nif (!validActionPressed)\nApplyResult(r => r.Type = HitResult.Miss);\nelse\n@@ -169,6 +167,8 @@ public bool OnPressed(TauAction action)\nreturn result;\n}\n- public void OnReleased(TauAction action) { }\n+ public void OnReleased(TauAction action)\n+ {\n+ }\n}\n}\n" } ]
C#
MIT License
taulazer/tau
Prevent Miss Judgement from being applied twice
664,859
13.04.2020 00:18:32
14,400
70a4d5db1eff13181c8d308e51500921ba8eea56
include macOS instructions
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -30,7 +30,14 @@ This will extract all files to `squashfs-root`, in this folder go to `usr/bin` a\n###### Special thanks to `Kotypey#9393` for figuring out how to install Tau on linux.\n-*If instructions for your platform isn't listed above, then it's either being written, or is unsupported. At the very time of writing this (April 3rd, 2020), no operating system is known to be unsupported.*\n+##### macOS\n+On macOS, the library must be put inside the osu!lazer app contents here `osu!.app/Contents/MacOS/`\n+\n+![Context menu](https://cdn.discordapp.com/attachments/699046236979986483/699060248391974982/tau.png)\n+\n+You can access the app contents by right-clicking on osu! and clicking \"Show Package Contents\"\n+\n+###### Special thanks to `sexnine#6969` for figuring out how to install Tau on macOS.\n## Development\nWhen developing or debugging the osu!tau codebase, a few prerequisites are required as following:\n" } ]
C#
MIT License
taulazer/tau
include macOS instructions
664,874
14.04.2020 01:40:45
-28,800
9307b3bd74a6fb61db31237efe76b121dd5ee0bf
Update osu packages
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "new_path": "osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "diff": "<EmbeddedResource Include=\"Resources\\**\" />\n</ItemGroup>\n<ItemGroup>\n- <PackageReference Include=\"ppy.osu.Framework\" Version=\"2020.402.0\" />\n- <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.403.0\" />\n+ <PackageReference Include=\"ppy.osu.Framework\" Version=\"2020.411.0\" />\n+ <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.413.0\" />\n</ItemGroup>\n<ItemGroup>\n<Folder Include=\"Resources\\Samples\\Gameplay\" />\n" } ]
C#
MIT License
taulazer/tau
Update osu packages
664,874
16.04.2020 01:00:55
-28,800
de52d446cea624b2e92dfcb6292573954ebaeecf
Add Visual Studio Code task/launch configurations Will be helpful for VSC users
[ { "change_type": "ADD", "old_path": null, "new_path": ".vscode/launch.json", "diff": "+{\n+ \"version\": \"0.2.0\",\n+ \"configurations\": [\n+ {\n+ \"name\": \"Tau for osu! (Tests, Debug)\",\n+ \"type\": \"coreclr\",\n+ \"request\": \"launch\",\n+ \"program\": \"dotnet\",\n+ \"args\": [\n+ \"${workspaceRoot}/osu.Game.Rulesets.Tau.Tests/bin/Debug/netcoreapp3.0/osu.Game.Rulesets.Tau.Tests.dll\"\n+ ],\n+ \"cwd\": \"${workspaceRoot}\",\n+ \"preLaunchTask\": \"Build tests (Debug)\",\n+ \"console\": \"internalConsole\"\n+ },\n+ {\n+ \"name\": \"Tau for osu! (Tests, Release)\",\n+ \"type\": \"coreclr\",\n+ \"request\": \"launch\",\n+ \"program\": \"dotnet\",\n+ \"args\": [\n+ \"${workspaceRoot}/osu.Game.Rulesets.Tau.Tests/bin/Release/netcoreapp3.0/osu.Game.Rulesets.Tau.Tests.dll\"\n+ ],\n+ \"cwd\": \"${workspaceRoot}\",\n+ \"preLaunchTask\": \"Build tests (Release)\",\n+ \"console\": \"internalConsole\"\n+ },\n+ ]\n+}\n\\ No newline at end of file\n" }, { "change_type": "ADD", "old_path": null, "new_path": ".vscode/tasks.json", "diff": "+{\n+ \"version\": \"2.0.0\",\n+ \"tasks\": [\n+ {\n+ \"label\": \"Build tests (Debug)\",\n+ \"type\": \"shell\",\n+ \"command\": \"dotnet\",\n+ \"args\": [\n+ \"build\",\n+ \"--no-restore\",\n+ \"osu.Game.Rulesets.Tau.Tests\",\n+ \"/p:GenerateFullPaths=true\",\n+ \"/m\",\n+ \"/verbosity:m\"\n+ ],\n+ \"group\": \"build\",\n+ \"problemMatcher\": \"$msCompile\"\n+ },\n+ {\n+ \"label\": \"Build tests (Release)\",\n+ \"type\": \"shell\",\n+ \"command\": \"dotnet\",\n+ \"args\": [\n+ \"build\",\n+ \"--no-restore\",\n+ \"osu.Game.Rulesets.Tau.Tests\",\n+ \"/p:Configuration=Release\",\n+ \"/p:GenerateFullPaths=true\",\n+ \"/m\",\n+ \"/verbosity:m\"\n+ ],\n+ \"group\": \"build\",\n+ \"problemMatcher\": \"$msCompile\"\n+ }\n+ ]\n+}\n\\ No newline at end of file\n" } ]
C#
MIT License
taulazer/tau
Add Visual Studio Code task/launch configurations Will be helpful for VSC users
664,874
18.04.2020 02:38:27
-28,800
5be681e98064d62c7282a8e36bd168089adbeedb
Remove stray vscode configs How the heck???
[ { "change_type": "DELETE", "old_path": "osu.Game.Rulesets.tau.Tests/.vscode/launch.json", "new_path": null, "diff": "-{\n- \"version\": \"0.2.0\",\n- \"configurations\": [\n- {\n- \"name\": \"VisualTests (Debug)\",\n- \"type\": \"coreclr\",\n- \"request\": \"launch\",\n- \"program\": \"dotnet\",\n- \"args\": [\n- \"${workspaceRoot}/bin/Debug/netcoreapp2.2/osu.Game.Rulesets.tauRuleset.Tests.dll\"\n- ],\n- \"cwd\": \"${workspaceRoot}\",\n- \"preLaunchTask\": \"Build (Debug)\",\n- \"env\": {},\n- \"console\": \"internalConsole\"\n- },\n- {\n- \"name\": \"VisualTests (Release)\",\n- \"type\": \"coreclr\",\n- \"request\": \"launch\",\n- \"program\": \"dotnet\",\n- \"args\": [\n- \"${workspaceRoot}/bin/Release/netcoreapp2.2/osu.Game.Rulesets.tauRuleset.Tests.dll\"\n- ],\n- \"cwd\": \"${workspaceRoot}\",\n- \"preLaunchTask\": \"Build (Release)\",\n- \"env\": {},\n- \"console\": \"internalConsole\"\n- }\n- ]\n-}\n\\ No newline at end of file\n" }, { "change_type": "DELETE", "old_path": "osu.Game.Rulesets.tau.Tests/.vscode/tasks.json", "new_path": null, "diff": "-{\n- // See https://go.microsoft.com/fwlink/?LinkId=733558\n- // for the documentation about the tasks.json format\n- \"version\": \"2.0.0\",\n- \"tasks\": [\n- {\n- \"label\": \"Build (Debug)\",\n- \"type\": \"shell\",\n- \"command\": \"dotnet\",\n- \"args\": [\n- \"build\",\n- \"--no-restore\",\n- \"osu.Game.Rulesets.tauRuleset.Tests.csproj\",\n- \"/p:GenerateFullPaths=true\",\n- \"/m\",\n- \"/verbosity:m\"\n- ],\n- \"group\": \"build\",\n- \"problemMatcher\": \"$msCompile\"\n- },\n- {\n- \"label\": \"Build (Release)\",\n- \"type\": \"shell\",\n- \"command\": \"dotnet\",\n- \"args\": [\n- \"build\",\n- \"--no-restore\",\n- \"osu.Game.Rulesets.tauRuleset.Tests.csproj\",\n- \"/p:Configuration=Release\",\n- \"/p:GenerateFullPaths=true\",\n- \"/m\",\n- \"/verbosity:m\"\n- ],\n- \"group\": \"build\",\n- \"problemMatcher\": \"$msCompile\"\n- },\n- {\n- \"label\": \"Restore\",\n- \"type\": \"shell\",\n- \"command\": \"dotnet\",\n- \"args\": [\n- \"restore\"\n- ],\n- \"problemMatcher\": []\n- }\n- ]\n-}\n\\ No newline at end of file\n" } ]
C#
MIT License
taulazer/tau
Remove stray vscode configs How the heck???
664,874
18.04.2020 02:45:16
-28,800
ae19a66ffe226cf5e81ec6b88172edc79c7cda5a
Update osu dependencies
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "new_path": "osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "diff": "<EmbeddedResource Include=\"Resources\\**\" />\n</ItemGroup>\n<ItemGroup>\n- <PackageReference Include=\"ppy.osu.Framework\" Version=\"2020.411.0\" />\n- <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.413.0\" />\n+ <PackageReference Include=\"ppy.osu.Framework\" Version=\"2020.417.0\" />\n+ <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.418.0\" />\n</ItemGroup>\n<ItemGroup>\n<Folder Include=\"Resources\\Samples\\Gameplay\" />\n" } ]
C#
MIT License
taulazer/tau
Update osu dependencies
664,859
18.04.2020 04:07:09
14,400
280a06e37049824f84f73d888d8080d88c954804
Fix Tau's capitalization further along the way i hope we can actually use Tau instead of the lowercase variant.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau.sln", "new_path": "osu.Game.Rulesets.tau.sln", "diff": "@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.29123.88\nMinimumVisualStudioVersion = 10.0.40219.1\n-Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.Tau\", \"osu.Game.Rulesets.tau\\osu.Game.Rulesets.Tau.csproj\", \"{5AE1F0F1-DAFA-46E7-959C-DA233B7C87E9}\"\n+Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.tau\", \"osu.Game.Rulesets.tau\\osu.Game.Rulesets.tau.csproj\", \"{5AE1F0F1-DAFA-46E7-959C-DA233B7C87E9}\"\nEndProject\n-Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.Tau.Tests\", \"osu.Game.Rulesets.tau.Tests\\osu.Game.Rulesets.Tau.Tests.csproj\", \"{B4577C85-CB83-462A-BCE3-22FFEB16311D}\"\n+Project(\"{9A19103F-16F7-4668-BE54-9A1E7A4F7556}\") = \"osu.Game.Rulesets.tau.Tests\", \"osu.Game.Rulesets.tau.Tests\\osu.Game.Rulesets.tau.Tests.csproj\", \"{B4577C85-CB83-462A-BCE3-22FFEB16311D}\"\nEndProject\nGlobal\nGlobalSection(SolutionConfigurationPlatforms) = preSolution\n" } ]
C#
MIT License
taulazer/tau
Fix Tau's capitalization further along the way i hope we can actually use Tau instead of the lowercase variant.
664,874
18.04.2020 21:24:28
-28,800
721af9c157a9287987f35c829bec22247862ace7
Prevent menu cursor from appearing while playing
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "new_path": "osu.Game.Rulesets.tau/UI/tauPlayfield.cs", "diff": "@@ -36,6 +36,8 @@ public class TauPlayfield : Playfield\npublic const float UNIVERSAL_SCALE = 0.6f;\npublic static readonly Vector2 BASE_SIZE = new Vector2(768, 768);\n+ public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;\n+\npublic TauPlayfield(BeatmapDifficulty difficulty)\n{\ncursor = new TauCursor(difficulty);\n" } ]
C#
MIT License
taulazer/tau
Prevent menu cursor from appearing while playing
664,859
29.04.2020 23:45:05
14,400
e3af4c5f855b2a1e77f3dfc05fd3ac3106c2b2fa
Add new instructions.
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -18,6 +18,13 @@ We have [prebuilt libraries](https://github.com/Altenhh/tau/releases) for users\n### [Latest Releases](https://github.com/Altenhh/tau/releases)\n### Instructions\n+\n+Since version [2020.429.0](https://github.com/ppy/osu/releases/tag/2020.429.0) The installation method has now changed and is much more consistent than the old method. If you wish to see the old method of how to install this ruleset the please expand details below.\n+\n+<details>\n+<summary><b>Old method</b></summary>\n+<p>\n+\n##### Windows\nOn Windows, the library must be put in `%localappdata%\\osulazer\\app-(Current osu!lazer Version)`, inside the directory of the current osu!lazer version. osu!lazer will automatically work with the `.dll` when you open it, so nothing else needs to be done.\n@@ -39,6 +46,17 @@ You can access the app contents by right-clicking on osu! and clicking \"Show Pac\n###### Special thanks to `sexnine#6969` for figuring out how to install Tau on macOS.\n+</p>\n+</details>\n+\n+##### New Method\n+From the osu settings menu scroll down till you see `Open osu! folder`, that button should take you under `%appdata%/osu`.\n+Copy the ruleset file into the `rulesets` directory, do make sure that duplicate copies of the ruleset is overwritten.\n+\n+Once done, restart osu!lazer, if lazer is already open. Once lazer is started, you should see the ruleset alongside the standard rulesets on the toolbar at the top.\n+\n+###### Do note that this instructions will only work with desktop devices.\n+\n## Development\nWhen developing or debugging the tau codebase, a few prerequisites are required as following:\n* An IDE that supports the C# language in automatic completion, and syntax highlighting; examples of such being [Visual Studio 2019](https://visualstudio.microsoft.com/vs/) and above, or [JetBrains Rider](https://www.jetbrains.com/rider/).\n" } ]
C#
MIT License
taulazer/tau
Add new instructions.
664,859
30.04.2020 00:03:22
14,400
efef7ce4ad7b5e1b2c5d504f971021b5d9ba52e0
Don't continue from the right side of the image man aren't i great at commit names?
[ { "change_type": "MODIFY", "old_path": "README.md", "new_path": "README.md", "diff": "@@ -52,6 +52,7 @@ You can access the app contents by right-clicking on osu! and clicking \"Show Pac\n##### New Method\nFrom the osu settings menu scroll down till you see `Open osu! folder`, that button should take you under `%appdata%/osu`.\n![open osu! folder](https://github.com/LumpBloom7/sentakki/wiki/images/Instuction1.png)\n+\nCopy the ruleset file into the `rulesets` directory, do make sure that duplicate copies of the ruleset is overwritten.\nOnce done, restart osu!lazer, if lazer is already open. Once lazer is started, you should see the ruleset alongside the standard rulesets on the toolbar at the top.\n" } ]
C#
MIT License
taulazer/tau
Don't continue from the right side of the image man aren't i great at commit names?
664,874
15.06.2020 21:12:41
-28,800
ef5e7f7f4d60c911dd4a173c8d3c6d5a341d1a4a
Fix beatsize option affecting gameplay They should only serve as a visual change.
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "new_path": "osu.Game.Rulesets.tau/Objects/Drawables/DrawabletauHitObject.cs", "diff": "@@ -21,6 +21,7 @@ namespace osu.Game.Rulesets.Tau.Objects.Drawables\npublic class DrawabletauHitObject : DrawableHitObject<TauHitObject>, IKeyBindingHandler<TauAction>\n{\npublic Box Box;\n+ public Box IntersectArea;\npublic Func<DrawabletauHitObject, bool> CheckValidation;\n@@ -49,13 +50,24 @@ public DrawabletauHitObject(TauHitObject hitObject)\nOrigin = Anchor.Centre;\nRelativePositionAxes = Axes.Both;\n- AddInternal(Box = new Box\n+ AddRangeInternal(new Drawable[]{\n+ Box = new Box\n{\nEdgeSmoothness = new Vector2(1f),\nRelativeSizeAxes = Axes.Both,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\nAlpha = 0.05f\n+ },\n+ IntersectArea = new Box\n+ {\n+ Size = new Vector2(10),\n+ RelativeSizeAxes = Axes.None,\n+ Origin = Anchor.Centre,\n+ Anchor = Anchor.Centre,\n+ Alpha = 0,\n+ AlwaysPresent = true\n+ }\n});\nBox.Rotation = hitObject.Angle;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "new_path": "osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "diff": "@@ -41,7 +41,7 @@ private void load(IBindable<WorkingBeatmap> beatmap)\nthis.beatmap.BindTo(beatmap);\n}\n- public bool CheckForValidation(DrawabletauHitObject h) => h.ScreenSpaceDrawQuad.AABBFloat.IntersectsWith(defaultCursor.HitReceptor.ScreenSpaceDrawQuad.AABBFloat);\n+ public bool CheckForValidation(DrawabletauHitObject h) => (h as DrawabletauHitObject).IntersectArea.ScreenSpaceDrawQuad.AABBFloat.IntersectsWith(defaultCursor.HitReceptor.ScreenSpaceDrawQuad.AABBFloat);\nprivate class DefaultCursor : CompositeDrawable\n{\n" } ]
C#
MIT License
taulazer/tau
Fix beatsize option affecting gameplay They should only serve as a visual change.
664,874
17.06.2020 01:06:08
-28,800
0e20941d37f43235c07c58a04dacf56ef6f2b796
We don't need to recast h
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "new_path": "osu.Game.Rulesets.tau/UI/Cursor/tauCursor.cs", "diff": "@@ -41,7 +41,7 @@ private void load(IBindable<WorkingBeatmap> beatmap)\nthis.beatmap.BindTo(beatmap);\n}\n- public bool CheckForValidation(DrawabletauHitObject h) => (h as DrawabletauHitObject).IntersectArea.ScreenSpaceDrawQuad.AABBFloat.IntersectsWith(defaultCursor.HitReceptor.ScreenSpaceDrawQuad.AABBFloat);\n+ public bool CheckForValidation(DrawabletauHitObject h) => h.IntersectArea.ScreenSpaceDrawQuad.AABBFloat.IntersectsWith(defaultCursor.HitReceptor.ScreenSpaceDrawQuad.AABBFloat);\nprivate class DefaultCursor : CompositeDrawable\n{\n" } ]
C#
MIT License
taulazer/tau
We don't need to recast h
664,874
23.06.2020 23:37:23
-28,800
1f9a740e7c9306e089fe4e38c671d9cd718ce218
Add AssemblyName in project files
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau.Tests/osu.Game.Rulesets.tau.Tests.csproj", "new_path": "osu.Game.Rulesets.tau.Tests/osu.Game.Rulesets.tau.Tests.csproj", "diff": "</ItemGroup>\n<PropertyGroup>\n<GenerateProgramFile>false</GenerateProgramFile>\n+ <AssemblyName>osu.Game.Rulesets.Tau.Tests</AssemblyName>\n</PropertyGroup>\n<ItemGroup Label=\"Package References\">\n<PackageReference Include=\"Appveyor.TestLogger\" Version=\"2.0.0\" />\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "new_path": "osu.Game.Rulesets.tau/osu.Game.Rulesets.tau.csproj", "diff": "<RootNamespace>osu.Game.Rulesets.Tau</RootNamespace>\n<LangVersion>8</LangVersion>\n</PropertyGroup>\n+ <PropertyGroup>\n+ <AssemblyName>osu.Game.Rulesets.Tau</AssemblyName>\n+ </PropertyGroup>\n<ItemGroup>\n<EmbeddedResource Include=\"Resources\\**\"/>\n</ItemGroup>\n" } ]
C#
MIT License
taulazer/tau
Add AssemblyName in project files
664,874
07.07.2020 18:40:43
-28,800
cd463da7b56329f6682eb61eb8ce6dcb535ed2eb
Better looking tau icon
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Resources/Textures/tau.png", "new_path": "osu.Game.Rulesets.Tau/Resources/Textures/tau.png", "diff": "Binary files a/osu.Game.Rulesets.Tau/Resources/Textures/tau.png and b/osu.Game.Rulesets.Tau/Resources/Textures/tau.png differ\n" } ]
C#
MIT License
taulazer/tau
Better looking tau icon
664,874
10.07.2020 15:55:09
-28,800
ea0eb08f120f05e83239dcd6abfa7a5db539032b
Apply universal scale within adjustment container This will remove all instances of manually downscaling. Atm breaks gameplay, and some elements appear too small. To be fixed soon,
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -48,17 +48,18 @@ public DrawableTauHitObject(TauHitObject hitObject)\n{\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n- RelativePositionAxes = Axes.Both;\n-\n+ RelativeSizeAxes = Axes.Both;\n+ Size = Vector2.One;\nAddRangeInternal(new Drawable[]\n{\nBox = new Box\n{\nEdgeSmoothness = new Vector2(1f),\n- RelativeSizeAxes = Axes.Both,\n+ //RelativeSizeAxes = Axes.Both,\n+ RelativePositionAxes = Axes.Both,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n- Alpha = 0.05f\n+ Alpha = 0.05f,\n},\nIntersectArea = new Box\n{\n@@ -73,7 +74,6 @@ public DrawableTauHitObject(TauHitObject hitObject)\n);\nBox.Rotation = hitObject.Angle;\n-\nPosition = Vector2.Zero;\n}\n@@ -83,7 +83,7 @@ public DrawableTauHitObject(TauHitObject hitObject)\nprivate void load(TauRulesetConfigManager config)\n{\nconfig?.BindWith(TauRulesetSettings.BeatSize, size);\n- size.BindValueChanged(value => this.Size = new Vector2(value.NewValue), true);\n+ size.BindValueChanged(value => Box.Size = new Vector2(value.NewValue), true);\n}\nprotected override void UpdateInitialTransforms()\n@@ -93,7 +93,9 @@ protected override void UpdateInitialTransforms()\nvar a = b *= (float)(Math.PI / 180);\nBox.FadeIn(HitObject.TimeFadeIn);\n- this.MoveTo(new Vector2(-(TauPlayfield.UNIVERSAL_SCALE * 0.8f * (float)Math.Cos(a)), -(TauPlayfield.UNIVERSAL_SCALE * 0.8f * (float)Math.Sin(a))), HitObject.TimePreempt);\n+ //Box.MoveToY(-.5f, HitObject.TimePreempt);\n+ Box.MoveTo(new Vector2(-(0.5f * (float)Math.Cos(a)), -(.5f * (float)Math.Sin(a))), HitObject.TimePreempt);\n+\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n@@ -142,10 +144,10 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar b = HitObject.Angle;\nvar a = b *= (float)(Math.PI / 180);\n- Box.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n+ /* Box.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n.MoveToOffset(new Vector2(-(50 * (float)Math.Cos(a)), -(50 * (float)Math.Sin(a))), time_fade_hit, Easing.OutCubic)\n- .FadeOut(time_fade_hit);\n+ .FadeOut(time_fade_hit); */\nthis.FadeOut(time_fade_hit);\n@@ -155,10 +157,10 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar c = HitObject.Angle;\nvar d = c *= (float)(Math.PI / 180);\n- Box.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n+ /* Box.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n.MoveToOffset(new Vector2(-(50 * (float)Math.Cos(d)), -(50 * (float)Math.Sin(d))), time_fade_hit, Easing.OutCubic)\n- .FadeOut(time_fade_miss);\n+ .FadeOut(time_fade_miss); */\nthis.FadeOut(time_fade_miss);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauJudgement.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauJudgement.cs", "diff": "@@ -21,6 +21,7 @@ public class DrawableTauJudgement : DrawableJudgement\npublic DrawableTauJudgement(JudgementResult result, DrawableTauHitObject judgedObject)\n: base(result, judgedObject)\n{\n+ RelativePositionAxes = Axes.Both;\n}\n[BackgroundDependencyLoader]\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "@@ -35,7 +35,7 @@ public TauAutoGenerator(IBeatmap beatmap)\n/// </summary>\nprivate int buttonIndex;\n- private const float offset = (768 / 2f) * TauPlayfield.UNIVERSAL_SCALE;\n+ private const float offset = 768 / 2f;\nprivate const float cursorDistance = 250;\npublic override Replay Generate()\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -63,7 +63,6 @@ public DefaultCursor(float cs = 5f)\nOrigin = Anchor.Centre,\nFillMode = FillMode.Fit,\nFillAspectRatio = 1, // 1:1 Aspect Ratio.\n- Size = new Vector2(0.6f),\nChildren = new Drawable[]\n{\nHitReceptor = new Box\n@@ -134,7 +133,6 @@ public GameplayCursor(float cs)\nMasking = true,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n- Size = new Vector2(0.6f),\nChildren = new Drawable[]\n{\nnew CircularProgress\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -40,8 +40,11 @@ public class TauPlayfield : Playfield\npublic TauPlayfield(BeatmapDifficulty difficulty)\n{\n+ RelativeSizeAxes = Axes.None;\ncursor = new TauCursor(difficulty);\n-\n+ Anchor = Anchor.Centre;\n+ Origin = Anchor.Centre;\n+ Size = new Vector2(768);\nAddRangeInternal(new Drawable[]\n{\njudgementLayer = new JudgementContainer<DrawableTauJudgement>\n@@ -56,16 +59,14 @@ public TauPlayfield(BeatmapDifficulty difficulty)\n{\nColour = Color4.Black,\nRelativeSizeAxes = Axes.Both,\n- Size = new Vector2(UNIVERSAL_SCALE),\n- FillAspectRatio = 1,\n- FillMode = FillMode.Fit,\n+ /* FillAspectRatio = 1,\n+ FillMode = FillMode.Fit, */\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n},\nnew Container\n{\nRelativeSizeAxes = Axes.Both,\n- Size = new Vector2(UNIVERSAL_SCALE),\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nChildren = new Drawable[]\n@@ -76,8 +77,8 @@ public TauPlayfield(BeatmapDifficulty difficulty)\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\nMasking = true,\n- FillMode = FillMode.Fit,\n- FillAspectRatio = 1, // 1:1 Aspect ratio to get a perfect circle\n+ /* FillMode = FillMode.Fit,\n+ FillAspectRatio = 1, // 1:1 Aspect ratio to get a perfect circle */\nBorderThickness = 3,\nBorderColour = Color4.White,\nChild = new Box\n@@ -89,19 +90,7 @@ public TauPlayfield(BeatmapDifficulty difficulty)\n},\n}\n},\n- new Container\n- {\n- RelativeSizeAxes = Axes.Both,\n- FillMode = FillMode.Fit,\n- FillAspectRatio = 1,\n- Anchor = Anchor.Centre,\n- Origin = Anchor.Centre,\n- Size = new Vector2(UNIVERSAL_SCALE),\n- Children = new Drawable[]\n- {\nHitObjectContainer,\n- }\n- },\ncursor,\nkiaiExplosionContainer = new Container<KiaiHitExplosion>\n{\n@@ -160,7 +149,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n{\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n- Position = new Vector2(-(285 * (float)Math.Cos(a)), -(285 * (float)Math.Sin(a))),\n+ Position = new Vector2(-(.55f * (float)Math.Cos(a)), -(.55f * (float)Math.Sin(a))),\nRotation = tauObj.Box.Rotation + 90,\n};\n@@ -187,7 +176,6 @@ private class VisualisationContainer : BeatSyncedContainer\nprivate void load(TauRulesetConfigManager settings)\n{\nRelativeSizeAxes = Axes.Both;\n- Size = new Vector2(UNIVERSAL_SCALE);\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfieldAdjustmentContainer.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfieldAdjustmentContainer.cs", "diff": "@@ -10,15 +10,13 @@ public class TauPlayfieldAdjustmentContainer : PlayfieldAdjustmentContainer\nprotected override Container<Drawable> Content => content;\nprivate readonly Container content;\n- private const float playfield_size_adjust = 1f;\n-\npublic TauPlayfieldAdjustmentContainer()\n{\nAnchor = Anchor.Centre;\nOrigin = Anchor.Centre;\n// Calculated from osu!stable as 512 (default gamefield size) / 640 (default window size)\n- Size = new Vector2(playfield_size_adjust);\n+ Size = new Vector2(.6f);\nInternalChild = new Container\n{\n" } ]
C#
MIT License
taulazer/tau
Apply universal scale within adjustment container This will remove all instances of manually downscaling. Atm breaks gameplay, and some elements appear too small. To be fixed soon,
664,874
10.07.2020 16:02:43
-28,800
2e6cdcbe286f162dd9519c1d24ce17fbde146a82
Restore gameplay
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "using System.Diagnostics;\nusing osu.Framework.Graphics;\nusing osu.Framework.Graphics.Shapes;\n+using osu.Framework.Graphics.Containers;\nusing osu.Framework.Input.Bindings;\nusing osu.Game.Rulesets.Objects.Drawables;\nusing osu.Game.Rulesets.Scoring;\n@@ -20,8 +21,8 @@ namespace osu.Game.Rulesets.Tau.Objects.Drawables\n{\npublic class DrawableTauHitObject : DrawableHitObject<TauHitObject>, IKeyBindingHandler<TauAction>\n{\n- public Box Box;\n- public Box IntersectArea;\n+ public Container Box;\n+ public Container IntersectArea;\npublic Func<DrawableTauHitObject, bool> CheckValidation;\n@@ -52,25 +53,26 @@ public DrawableTauHitObject(TauHitObject hitObject)\nSize = Vector2.One;\nAddRangeInternal(new Drawable[]\n{\n- Box = new Box\n+ Box = new Container\n{\n- EdgeSmoothness = new Vector2(1f),\n- //RelativeSizeAxes = Axes.Both,\nRelativePositionAxes = Axes.Both,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\nAlpha = 0.05f,\n+ Children = new Drawable[]{\n+ new Box{\n+ RelativeSizeAxes= Axes.Both\n},\n- IntersectArea = new Box\n- {\n+ IntersectArea = new Container{\nSize = new Vector2(10),\nRelativeSizeAxes = Axes.None,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n- Alpha = 0,\nAlwaysPresent = true\n}\n}\n+ },\n+ }\n);\nBox.Rotation = hitObject.Angle;\n" } ]
C#
MIT License
taulazer/tau
Restore gameplay
664,874
10.07.2020 16:05:12
-28,800
b3bd9a8e235e4949cccdc94019d27a6beed94bf7
Restore note sizes
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Configuration/TauRulesetConfigManager.cs", "new_path": "osu.Game.Rulesets.Tau/Configuration/TauRulesetConfigManager.cs", "diff": "@@ -19,7 +19,7 @@ protected override void InitialiseDefaults()\nSet(TauRulesetSettings.ShowVisualizer, true);\nSet(TauRulesetSettings.PlayfieldDim, 0.3f, 0, 1, 0.01f);\n- Set(TauRulesetSettings.BeatSize, 10f, 5, 25, 1f);\n+ Set(TauRulesetSettings.BeatSize, 16f, 10, 25, 1f);\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -64,7 +64,7 @@ public DrawableTauHitObject(TauHitObject hitObject)\nRelativeSizeAxes= Axes.Both\n},\nIntersectArea = new Container{\n- Size = new Vector2(10),\n+ Size = new Vector2(16),\nRelativeSizeAxes = Axes.None,\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n@@ -79,7 +79,7 @@ public DrawableTauHitObject(TauHitObject hitObject)\nPosition = Vector2.Zero;\n}\n- private readonly Bindable<float> size = new Bindable<float>(10); // Change as you see fit.\n+ private readonly Bindable<float> size = new Bindable<float>(16); // Change as you see fit.\n[BackgroundDependencyLoader(true)]\nprivate void load(TauRulesetConfigManager config)\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -59,8 +59,6 @@ public TauPlayfield(BeatmapDifficulty difficulty)\n{\nColour = Color4.Black,\nRelativeSizeAxes = Axes.Both,\n- /* FillAspectRatio = 1,\n- FillMode = FillMode.Fit, */\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre,\n},\n" } ]
C#
MIT License
taulazer/tau
Restore note sizes
664,874
10.07.2020 16:25:04
-28,800
c46d002d497d75d01658ed3046fe765f6d807a70
Restore kiai explosion
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "new_path": "osu.Game.Rulesets.Tau/UI/KiaiHitExplosion.cs", "diff": "@@ -21,8 +21,9 @@ public class KiaiHitExplosion : CompositeDrawable\npublic KiaiHitExplosion(DrawableHitObject judgedObject, bool isSmall = false)\n{\n- Height = 10;\n- Width = 10;\n+ Height = 16;\n+ Width = 16;\n+ RelativePositionAxes = Axes.Both;\n// scale roughly in-line with visual appearance of notes\nScale = new Vector2(1f, 0.5f);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -156,7 +156,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nif (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\nkiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject)\n{\n- Position = new Vector2(-(215 * (float)Math.Cos(a)), -(215 * (float)Math.Sin(a))),\n+ Position = new Vector2(-(.475f * (float)Math.Cos(a)), -(.475f * (float)Math.Sin(a))),\nRotation = tauObj.Box.Rotation,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre\n" } ]
C#
MIT License
taulazer/tau
Restore kiai explosion
664,874
10.07.2020 16:30:49
-28,800
13340882ae87770c0d7d49c241c913e1c6a4a96e
Restore judgements
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauJudgement.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauJudgement.cs", "diff": "@@ -22,6 +22,7 @@ public DrawableTauJudgement(JudgementResult result, DrawableTauHitObject judgedO\n: base(result, judgedObject)\n{\nRelativePositionAxes = Axes.Both;\n+ Scale = new Vector2(1.66f);\n}\n[BackgroundDependencyLoader]\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -147,7 +147,7 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\n{\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n- Position = new Vector2(-(.55f * (float)Math.Cos(a)), -(.55f * (float)Math.Sin(a))),\n+ Position = new Vector2(-(.6f * (float)Math.Cos(a)), -(.6f * (float)Math.Sin(a))),\nRotation = tauObj.Box.Rotation + 90,\n};\n" } ]
C#
MIT License
taulazer/tau
Restore judgements
664,874
10.07.2020 16:40:07
-28,800
7d8d774fe83070222a3a6ea94a5569212f67e155
Prevent notes from intersecting circle
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -96,7 +96,7 @@ protected override void UpdateInitialTransforms()\nBox.FadeIn(HitObject.TimeFadeIn);\n//Box.MoveToY(-.5f, HitObject.TimePreempt);\n- Box.MoveTo(new Vector2(-(0.5f * (float)Math.Cos(a)), -(.5f * (float)Math.Sin(a))), HitObject.TimePreempt);\n+ Box.MoveTo(new Vector2(-(0.485f * (float)Math.Cos(a)), -(.485f * (float)Math.Sin(a))), HitObject.TimePreempt);\n}\n" } ]
C#
MIT License
taulazer/tau
Prevent notes from intersecting circle
664,874
10.07.2020 16:44:12
-28,800
0dc17a7d5d559898df9f334af9e1df138ef72794
Fix paddle hit receptor ngl this is a pretty wacky implementation in the first place
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "new_path": "osu.Game.Rulesets.Tau/UI/Cursor/TauCursor.cs", "diff": "@@ -68,7 +68,7 @@ public DefaultCursor(float cs = 5f)\nHitReceptor = new Box\n{\nHeight = 50,\n- Width = (float)convertValue(cs),\n+ Width = (float)convertValue(cs)*1.6f,\nAnchor = Anchor.TopCentre,\nOrigin = Anchor.TopCentre,\nAlpha = 0,\n" } ]
C#
MIT License
taulazer/tau
Fix paddle hit receptor ngl this is a pretty wacky implementation in the first place
664,874
10.07.2020 16:57:42
-28,800
0162ee749389fa19a68b4a471a3774e67f4a6a96
Add back hit animations
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -95,9 +95,7 @@ protected override void UpdateInitialTransforms()\nvar a = b *= (float)(Math.PI / 180);\nBox.FadeIn(HitObject.TimeFadeIn);\n- //Box.MoveToY(-.5f, HitObject.TimePreempt);\nBox.MoveTo(new Vector2(-(0.485f * (float)Math.Cos(a)), -(.485f * (float)Math.Sin(a))), HitObject.TimePreempt);\n-\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n@@ -146,10 +144,10 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar b = HitObject.Angle;\nvar a = b *= (float)(Math.PI / 180);\n- /* Box.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n+ Box.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n- .MoveToOffset(new Vector2(-(50 * (float)Math.Cos(a)), -(50 * (float)Math.Sin(a))), time_fade_hit, Easing.OutCubic)\n- .FadeOut(time_fade_hit); */\n+ .MoveToOffset(new Vector2(-(.1f * (float)Math.Cos(a)), -(.1f * (float)Math.Sin(a))), time_fade_hit, Easing.OutCubic)\n+ .FadeOut(time_fade_hit);\nthis.FadeOut(time_fade_hit);\n@@ -159,10 +157,10 @@ protected override void UpdateStateTransforms(ArmedState state)\nvar c = HitObject.Angle;\nvar d = c *= (float)(Math.PI / 180);\n- /* Box.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n+ Box.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n- .MoveToOffset(new Vector2(-(50 * (float)Math.Cos(d)), -(50 * (float)Math.Sin(d))), time_fade_hit, Easing.OutCubic)\n- .FadeOut(time_fade_miss); */\n+ .MoveToOffset(new Vector2(-(.1f * (float)Math.Cos(d)), -(.1f * (float)Math.Sin(d))), time_fade_hit, Easing.OutCubic)\n+ .FadeOut(time_fade_miss);\nthis.FadeOut(time_fade_miss);\n" } ]
C#
MIT License
taulazer/tau
Add back hit animations
664,874
11.07.2020 01:37:09
-28,800
1ac62a6ed8768c64f9fd288709d3488a28ea634b
Fix hard crash on latest lazer
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "new_path": "osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj", "diff": "<EmbeddedResource Include=\"Resources\\**\"/>\n</ItemGroup>\n<ItemGroup>\n- <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.623.1\"/>\n+ <PackageReference Include=\"ppy.osu.Game\" Version=\"2020.710.0\"/>\n</ItemGroup>\n<ItemGroup>\n<Folder Include=\"Resources\\Samples\\Gameplay\"/>\n" } ]
C#
MIT License
taulazer/tau
Fix hard crash on latest lazer
664,874
10.07.2020 17:42:07
-28,800
b9d4b22b7f93c63a736fb93d1b047e75ee8a52c3
Remove the use of EndPos
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Extensions.cs", "new_path": "osu.Game.Rulesets.Tau/Extensions.cs", "diff": "@@ -9,6 +9,11 @@ namespace osu.Game.Rulesets.Tau\n{\npublic static class Extensions\n{\n+ public static Vector2 GetCircularPosition(float distance, float angle)\n+ {\n+ return new Vector2(-(distance * (float)Math.Cos((angle + 90f) * (float)(Math.PI / 180))), -(distance * (float)Math.Sin((angle + 90f) * (float)(Math.PI / 180))));\n+ }\n+\npublic static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\n{\nVector2 offset = self - target;\n@@ -18,7 +23,7 @@ public static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\npublic static float GetHitObjectAngle(this Vector2 target)\n{\nVector2 offset = new Vector2(256, 192) - target; // Using centre of playfield.\n- return (float)MathHelper.RadiansToDegrees(Math.Atan2(offset.X, -offset.Y)) - 90;\n+ return (float)MathHelper.RadiansToDegrees(Math.Atan2(offset.X, -offset.Y)) - 180;\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Mods/TauModHardRock.cs", "new_path": "osu.Game.Rulesets.Tau/Mods/TauModHardRock.cs", "diff": "using osu.Game.Rulesets.Objects;\nusing osu.Game.Rulesets.Tau.Objects;\nusing osuTK;\n+using System;\nnamespace osu.Game.Rulesets.Tau.Mods\n{\n@@ -16,8 +17,16 @@ public class TauModHardRock : ModHardRock, IApplicableToHitObject\npublic void ApplyToHitObject(HitObject hitObject)\n{\nvar tauObject = (TauHitObject)hitObject;\n+ while (tauObject.Angle < 0) tauObject.Angle += 360;\n+ tauObject.Angle %= 360;\n- tauObject.PositionToEnd = new Vector2(tauObject.PositionToEnd.X, -tauObject.PositionToEnd.Y);\n+ var newAngle = 0.0f;\n+ if (tauObject.Angle >= 0 && tauObject.Angle < 180)\n+ newAngle = 90 + (90 - tauObject.Angle);\n+ else if (tauObject.Angle >= 180)\n+ newAngle = 270 + (270 - tauObject.Angle);\n+\n+ tauObject.Angle = newAngle;\n}\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/Drawables/DrawableTauHitObject.cs", "diff": "@@ -75,7 +75,7 @@ public DrawableTauHitObject(TauHitObject hitObject)\n}\n);\n- Box.Rotation = hitObject.Angle;\n+ Rotation = hitObject.Angle;\nPosition = Vector2.Zero;\n}\n@@ -95,7 +95,7 @@ protected override void UpdateInitialTransforms()\nvar a = b *= (float)(Math.PI / 180);\nBox.FadeIn(HitObject.TimeFadeIn);\n- Box.MoveTo(new Vector2(-(0.485f * (float)Math.Cos(a)), -(.485f * (float)Math.Sin(a))), HitObject.TimePreempt);\n+ Box.MoveToY(-0.485f, HitObject.TimePreempt);\n}\nprotected override void CheckForResult(bool userTriggered, double timeOffset)\n@@ -146,7 +146,7 @@ protected override void UpdateStateTransforms(ArmedState state)\nBox.ScaleTo(2f, time_fade_hit, Easing.OutCubic)\n.FadeColour(Color4.Yellow, time_fade_hit, Easing.OutCubic)\n- .MoveToOffset(new Vector2(-(.1f * (float)Math.Cos(a)), -(.1f * (float)Math.Sin(a))), time_fade_hit, Easing.OutCubic)\n+ .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutCubic)\n.FadeOut(time_fade_hit);\nthis.FadeOut(time_fade_hit);\n@@ -159,7 +159,7 @@ protected override void UpdateStateTransforms(ArmedState state)\nBox.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)\n.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)\n- .MoveToOffset(new Vector2(-(.1f * (float)Math.Cos(d)), -(.1f * (float)Math.Sin(d))), time_fade_hit, Easing.OutCubic)\n+ .MoveToOffset(new Vector2(0, -.1f), time_fade_hit, Easing.OutCubic)\n.FadeOut(time_fade_miss);\nthis.FadeOut(time_fade_miss);\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Objects/TauHitObject.cs", "new_path": "osu.Game.Rulesets.Tau/Objects/TauHitObject.cs", "diff": "@@ -22,7 +22,6 @@ public class TauHitObject : HitObject, IHasComboInformation\npublic double TimeFadeIn = 400;\npublic float Angle { get; set; }\n- public Vector2 PositionToEnd { get; set; }\npublic virtual bool NewCombo { get; set; }\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "@@ -53,14 +53,14 @@ public override Replay Generate()\n{\nfloat b = Beatmap.HitObjects[i - 1].Angle * MathF.PI / 180;\n- Replay.Frames.Add(new TauReplayFrame(h.StartTime - reactionTime, new Vector2(offset - (cursorDistance * MathF.Cos(b)), offset - (cursorDistance * MathF.Sin(b)))));\n+ Replay.Frames.Add(new TauReplayFrame(h.StartTime - reactionTime, Extensions.GetCircularPosition(cursorDistance, h.Angle) + new Vector2(offset)));\nbuttonIndex = (int)TauAction.LeftButton;\n}\nfloat a = h.Angle * MathF.PI / 180;\n- Replay.Frames.Add(new TauReplayFrame(h.StartTime, new Vector2(offset - (cursorDistance * MathF.Cos(a)), offset - (cursorDistance * MathF.Sin(a))), (TauAction)(buttonIndex++ % 2)));\n+ Replay.Frames.Add(new TauReplayFrame(h.StartTime, Extensions.GetCircularPosition(cursorDistance, h.Angle) + new Vector2(offset), (TauAction)(buttonIndex++ % 2)));\n}\nreturn Replay;\n" }, { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "new_path": "osu.Game.Rulesets.Tau/UI/TauPlayfield.cs", "diff": "@@ -139,14 +139,12 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nvar tauObj = (DrawableTauHitObject)judgedObject;\n- var a = tauObj.HitObject.Angle * (float)(Math.PI / 180);\n-\nDrawableTauJudgement explosion = new DrawableTauJudgement(result, tauObj)\n{\nOrigin = Anchor.Centre,\nAnchor = Anchor.Centre,\n- Position = new Vector2(-(.6f * (float)Math.Cos(a)), -(.6f * (float)Math.Sin(a))),\n- Rotation = tauObj.Box.Rotation + 90,\n+ Position = Extensions.GetCircularPosition(.6f, tauObj.HitObject.Angle),\n+ Rotation = tauObj.HitObject.Angle,\n};\njudgementLayer.Add(explosion);\n@@ -154,8 +152,8 @@ private void onNewResult(DrawableHitObject judgedObject, JudgementResult result)\nif (judgedObject.HitObject.Kiai && result.Type != HitResult.Miss)\nkiaiExplosionContainer.Add(new KiaiHitExplosion(judgedObject)\n{\n- Position = new Vector2(-(.475f * (float)Math.Cos(a)), -(.475f * (float)Math.Sin(a))),\n- Rotation = tauObj.Box.Rotation,\n+ Position = Extensions.GetCircularPosition(.475f, tauObj.HitObject.Angle),\n+ Rotation = tauObj.HitObject.Angle,\nAnchor = Anchor.Centre,\nOrigin = Anchor.Centre\n});\n" } ]
C#
MIT License
taulazer/tau
Remove the use of EndPos
664,874
10.07.2020 17:56:24
-28,800
ba463d7a3210c78989dafddd4a90a604981e5142
Fix using the wrong angle in autoplay, causing jerky movements
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "new_path": "osu.Game.Rulesets.Tau/Replays/TauAutoGenerator.cs", "diff": "@@ -51,15 +51,12 @@ public override Replay Generate()\n//Make the cursor stay at the last note's position if there's enough time between the notes\nif (i > 0 && h.StartTime - Beatmap.HitObjects[i - 1].StartTime > reactionTime)\n{\n- float b = Beatmap.HitObjects[i - 1].Angle * MathF.PI / 180;\n+ float prevAngle = Beatmap.HitObjects[i - 1].Angle;\n- Replay.Frames.Add(new TauReplayFrame(h.StartTime - reactionTime, Extensions.GetCircularPosition(cursorDistance, h.Angle) + new Vector2(offset)));\n+ Replay.Frames.Add(new TauReplayFrame(h.StartTime - reactionTime, Extensions.GetCircularPosition(cursorDistance, prevAngle) + new Vector2(offset)));\nbuttonIndex = (int)TauAction.LeftButton;\n}\n-\n- float a = h.Angle * MathF.PI / 180;\n-\nReplay.Frames.Add(new TauReplayFrame(h.StartTime, Extensions.GetCircularPosition(cursorDistance, h.Angle) + new Vector2(offset), (TauAction)(buttonIndex++ % 2)));\n}\n" } ]
C#
MIT License
taulazer/tau
Fix using the wrong angle in autoplay, causing jerky movements
664,874
11.07.2020 02:00:38
-28,800
a723c88f2c3ed60cea7341772e0418825c88d11c
Use lambda for the CircularPosition function
[ { "change_type": "MODIFY", "old_path": "osu.Game.Rulesets.Tau/Extensions.cs", "new_path": "osu.Game.Rulesets.Tau/Extensions.cs", "diff": "@@ -10,9 +10,7 @@ namespace osu.Game.Rulesets.Tau\npublic static class Extensions\n{\npublic static Vector2 GetCircularPosition(float distance, float angle)\n- {\n- return new Vector2(-(distance * (float)Math.Cos((angle + 90f) * (float)(Math.PI / 180))), -(distance * (float)Math.Sin((angle + 90f) * (float)(Math.PI / 180))));\n- }\n+ => new Vector2(-(distance * (float)Math.Cos((angle + 90f) * (float)(Math.PI / 180))), -(distance * (float)Math.Sin((angle + 90f) * (float)(Math.PI / 180))));\npublic static float GetDegreesFromPosition(this Vector2 target, Vector2 self)\n{\n" } ]
C#
MIT License
taulazer/tau
Use lambda for the CircularPosition function