parameters: (converter_group, line, value, operator, team=False)
return_statement: return patches
docstring: Creates a patch for the wood cost modify effect (ID: 104).
  
          :param converter_group: Tech/Civ that gets the patch.
          :type converter_group: ...dataformat.converter_object.ConverterObjectGroup
          :param line: Unit/Building line that has the ability.
          :type line: ...dataformat.converter_object.ConverterObjectGroup
          :param value: Value used for patching the member.
          :type value: MemberOperator
          :param operator: Operator used for patching the member.
          :type operator: MemberOperator
          :returns: The forward references for the generated patches.
          :rtype: list
docstring_summary: Creates a patch for the wood cost modify effect (ID: 104).
docstring_tokens: Creates a patch for the wood cost modify effect ( ID : 104 ) .
function: def cost_wood_upgrade(converter_group, line, value, operator, team=False):
          """
          Creates a patch for the wood cost modify effect (ID: 104).
  
          :param converter_group: Tech/Civ that gets the patch.
          :type converter_group: ...dataformat.converter_object.ConverterObjectGroup
          :param line: Unit/Building line that has the ability.
          :type line: ...dataformat.converter_object.ConverterObjectGroup
          :param value: Value used for patching the member.
          :type value: MemberOperator
          :param operator: Operator used for patching the member.
          :type operator: MemberOperator
          :returns: The forward references for the generated patches.
          :rtype: list
          """
          head_unit = line.get_head_unit()
          head_unit_id = line.get_head_unit_id()
          dataset = line.data
  
          patches = []
  
          # Check if the unit line actually costs wood
          for resource_amount in head_unit["resource_cost"].get_value():
              resource_id = resource_amount["type_id"].get_value()
  
              if resource_id == 1:
                  break
  
          else:
              # Skip patch generation if no wood cost was found
              return patches
  
          obj_id = converter_group.get_id()
          if isinstance(converter_group, GenieTechEffectBundleGroup):
              tech_lookup_dict = internal_name_lookups.get_tech_lookups(dataset.game_version)
              obj_name = tech_lookup_dict[obj_id][0]
  
          else:
              civ_lookup_dict = internal_name_lookups.get_civ_lookups(dataset.game_version)
              obj_name = civ_lookup_dict[obj_id][0]
  
          name_lookup_dict = internal_name_lookups.get_entity_lookups(dataset.game_version)
  
          game_entity_name = name_lookup_dict[head_unit_id][0]
  
          patch_target_ref = "%s.CreatableGameEntity.%sCost.WoodAmount" % (game_entity_name,
                                                                           game_entity_name)
          patch_target_forward_ref = ForwardRef(line, patch_target_ref)
  
          # Wrapper
          wrapper_name = f"Change{game_entity_name}WoodCostWrapper"
          wrapper_ref = f"{obj_name}.{wrapper_name}"
          wrapper_location = ForwardRef(converter_group, obj_name)
          wrapper_raw_api_object = RawAPIObject(wrapper_ref,
                                                wrapper_name,
                                                dataset.nyan_api_objects,
                                                wrapper_location)
          wrapper_raw_api_object.add_raw_parent("engine.util.patch.Patch")
  
          # Nyan patch
          nyan_patch_name = f"Change{game_entity_name}WoodCost"
          nyan_patch_ref = f"{obj_name}.{wrapper_name}.{nyan_patch_name}"
          nyan_patch_location = ForwardRef(converter_group, wrapper_ref)
          nyan_patch_raw_api_object = RawAPIObject(nyan_patch_ref,
                                                   nyan_patch_name,
                                                   dataset.nyan_api_objects,
                                                   nyan_patch_location)
          nyan_patch_raw_api_object.add_raw_parent("engine.util.patch.NyanPatch")
          nyan_patch_raw_api_object.set_patch_target(patch_target_forward_ref)
  
          nyan_patch_raw_api_object.add_raw_patch_member("amount",
                                                         value,
                                                         "engine.util.resource.ResourceAmount",
                                                         operator)
  
          patch_forward_ref = ForwardRef(converter_group, nyan_patch_ref)
          wrapper_raw_api_object.add_raw_member("patch",
                                                patch_forward_ref,
                                                "engine.util.patch.Patch")
  
          if team:
              team_property = dataset.pregen_nyan_objects["util.patch.property.types.Team"].get_nyan_object()
              properties = {
                  dataset.nyan_api_objects["engine.util.patch.property.type.Diplomatic"]: team_property
              }
              wrapper_raw_api_object.add_raw_member("properties",
                                                    properties,
                                                    "engine.util.patch.Patch")
  
          converter_group.add_raw_api_object(wrapper_raw_api_object)
          converter_group.add_raw_api_object(nyan_patch_raw_api_object)
  
          wrapper_forward_ref = ForwardRef(converter_group, wrapper_ref)
          patches.append(wrapper_forward_ref)
  
          return patches
function_tokens: def cost_wood_upgrade ( converter_group , line , value , operator , team = False ) : head_unit = line . get_head_unit ( ) head_unit_id = line . get_head_unit_id ( ) dataset = line . data patches = [ ] # Check if the unit line actually costs wood for resource_amount in head_unit [ "resource_cost" ] . get_value ( ) : resource_id = resource_amount [ "type_id" ] . get_value ( ) if resource_id == 1 : break else : # Skip patch generation if no wood cost was found return patches obj_id = converter_group . get_id ( ) if isinstance ( converter_group , GenieTechEffectBundleGroup ) : tech_lookup_dict = internal_name_lookups . get_tech_lookups ( dataset . game_version ) obj_name = tech_lookup_dict [ obj_id ] [ 0 ] else : civ_lookup_dict = internal_name_lookups . get_civ_lookups ( dataset . game_version ) obj_name = civ_lookup_dict [ obj_id ] [ 0 ] name_lookup_dict = internal_name_lookups . get_entity_lookups ( dataset . game_version ) game_entity_name = name_lookup_dict [ head_unit_id ] [ 0 ] patch_target_ref = "%s.CreatableGameEntity.%sCost.WoodAmount" % ( game_entity_name , game_entity_name ) patch_target_forward_ref = ForwardRef ( line , patch_target_ref ) # Wrapper wrapper_name = f"Change{game_entity_name}WoodCostWrapper" wrapper_ref = f"{obj_name}.{wrapper_name}" wrapper_location = ForwardRef ( converter_group , obj_name ) wrapper_raw_api_object = RawAPIObject ( wrapper_ref , wrapper_name , dataset . nyan_api_objects , wrapper_location ) wrapper_raw_api_object . add_raw_parent ( "engine.util.patch.Patch" ) # Nyan patch nyan_patch_name = f"Change{game_entity_name}WoodCost" nyan_patch_ref = f"{obj_name}.{wrapper_name}.{nyan_patch_name}" nyan_patch_location = ForwardRef ( converter_group , wrapper_ref ) nyan_patch_raw_api_object = RawAPIObject ( nyan_patch_ref , nyan_patch_name , dataset . nyan_api_objects , nyan_patch_location ) nyan_patch_raw_api_object . add_raw_parent ( "engine.util.patch.NyanPatch" ) nyan_patch_raw_api_object . set_patch_target ( patch_target_forward_ref ) nyan_patch_raw_api_object . add_raw_patch_member ( "amount" , value , "engine.util.resource.ResourceAmount" , operator ) patch_forward_ref = ForwardRef ( converter_group , nyan_patch_ref ) wrapper_raw_api_object . add_raw_member ( "patch" , patch_forward_ref , "engine.util.patch.Patch" ) if team : team_property = dataset . pregen_nyan_objects [ "util.patch.property.types.Team" ] . get_nyan_object ( ) properties = { dataset . nyan_api_objects [ "engine.util.patch.property.type.Diplomatic" ] : team_property } wrapper_raw_api_object . add_raw_member ( "properties" , properties , "engine.util.patch.Patch" ) converter_group . add_raw_api_object ( wrapper_raw_api_object ) converter_group . add_raw_api_object ( nyan_patch_raw_api_object ) wrapper_forward_ref = ForwardRef ( converter_group , wrapper_ref ) patches . append ( wrapper_forward_ref ) return patches