Skip to content

Commit 04ee2c9

Browse files
committed
1.1.1
- add support for Interface inheritance - minor cleanup
1 parent 7fe7878 commit 04ee2c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/LojHadronCollider/LojHadronCollider.gml

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#macro __LHC_VERSION "v1.1.0"
1+
#macro __LHC_VERSION "v1.1.1"
22
#macro __LHC_PREFIX "[Loj Hadron Collider]"
33
#macro __LHC_SOURCE "https://github.com/Lojemiru/Loj-Hadron-Collider"
44
#macro __LHC_EVENT "__lhc_event_"
@@ -86,6 +86,8 @@ function lhc_create_interface(_name) {
8686
///@desc Inherits the function headers of the given interface.
8787
///@param interface The name of the interface to inherit from.
8888
function lhc_inherit_interface(_interface) {
89+
if (!asset_has_tags(object_index, _interface, asset_object)) asset_add_tags(object_index, _interface, asset_object);
90+
8991
// Loop over global interface struct for name value, set local variables of the index name to an empty function.
9092
var i = 0;
9193
repeat (array_length(global.__lhc_interfaces[$ _interface])) {
@@ -198,7 +200,7 @@ function __lhc_check(_x, _y) {
198200
j = 0;
199201
// Scan through Interfaces and run relevant events.
200202
repeat (__lhc_intLen) {
201-
if (asset_has_tags(col.object_index, __lhc_interfaces[j], asset_object)) {
203+
if (asset_has_tags(col, __lhc_interfaces[j], asset_object)) {
202204
variable_instance_get(id, __LHC_EVENT + __lhc_interfaces[j])();
203205
}
204206
++j;

0 commit comments

Comments
 (0)