mt-mods / technic

Technic mod for Minetest
18 stars 25 forks source link

Replace removed function `pipeworks.string_startswith` #379

Closed Emojigit closed 2 months ago

Emojigit commented 2 months ago

This fixes the following error:

~/.minetest/mods/technic/technic_cnc/pipeworks.lua:45: attempt to call field 'string_startswith' (a nil value)
stack traceback:
    [C]: in function 'string_startswith'
    ~/.minetest/mods/technic/technic_cnc/pipeworks.lua:45: in function 'pipeworks_on_receive_fields'
    ~/.minetest/mods/technic/technic_cnc/api.lua:367: in function <~/.minetest/mods/technic/technic_cnc/api.lua:363>

This PR is ready for review.

OgelGames commented 2 months ago

Not sure how I missed that when I searched for it... 🤔

BuckarooBanzay commented 2 months ago

do i understand this correctly: right now the current master branch crashes if you use the technic-cnc machine with pipeworks? :thinking:

S-S-X commented 2 months ago

do i understand this correctly: right now the current master branch crashes if you use the technic-cnc machine with pipeworks?

Yes has to crash, pipeworks.string_startswith got removed here https://github.com/mt-mods/pipeworks/commit/223c90e68424109fb8f3e49a847327135e675907 so it isn't available anymore.

Also it would be better this way anyway.