Update to cslib_object

@CJW and @choicehacker

I’ve updated the cslib_object module along the lines we discussed earlier to include a get_by_field sub:

*comment GET_BY_FIELD
*comment ------------------------------------------------------------------
*comment Takes the specified field name and field value and finds the
*comment first instance of a match that it findscl and copies that data
*comment into the main instance
*comment If no match is found, all the fields of the main object are set
*comment to false
*comment ------------------------------------------------------------------
*comment
*comment params:
*comment p_objectname (string): the name of the object
*comment p_field (string): field to match
*comment p_value (string): field to match
*comment returns:
*comment none
*comment usage example:
*comment *gosub_scene cslib_object get “dragon” “name” “Wally”
*comment ------------------------------------------------------------------

I’ve created a pull request. Comments welcome.

1 Like

Approved!