3DMGAME 3DM首页 新闻中心 前瞻 | 评测 游戏库 热门 | 最新 攻略中心 攻略 | 秘籍 下载中心 游戏 | 汉化 购买正版 论坛

注册 登录

QQ登录

只需一步,快速开始

查看: 2455|回复: 3
打印 上一主题 下一主题

[求助] 求一个只突破莫霍矿井的MOD,别的不改,只可以多建莫霍矿井就行,所有建筑按照科技来。我自己改了改不太会......有没有大佬帮忙

[复制链接]

1

主题

25

帖子

26

积分

新手玩家

Rank: 1

贡献度
0
金元
260
积分
26
精华
0
注册时间
2018-10-21
跳转到指定楼层
主题
发表于 2018-10-21 21:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
function ShuttleInfo:CanLaunch()
  return self.shuttle_obj == false
end



function UIGetBuildingPrerequisites(cat_id, template, bCreateItems)
  if template.build_category ~= cat_id or template.hide_from_build_menu then
    return false
  end

  local tech_shown, tech_enabled, tech_rollover = GetBuildingTechsStatus(template.name, template.build_category)
  local available_prefabs = UICity:GetPrefabs(template.name)
  local prefab_item = template.require_prefab and RocketPayload_GetMeta(template.name)
  local require_prefab = not tech_enabled and prefab_item and not prefab_item.locked
  if not tech_shown and not require_prefab and available_prefabs == 0 then
    return false
  end

  local wonder_exists
  if template.wonder then
    if 0 < #(UICity.labels[template.name] or empty_table) then
      wonder_exists = true
    else
      local sites = UICity.labels.ConstructionSite or empty_table
      for i = 1, #sites do
        local site = sites[i]
        if site.building_class_proto.template_name == template.name then
          wonder_exists = true
          break
        end
      end
      if not wonder_exists then
        local sites = UICity.labels.ConstructionSiteWithHeightSurfaces or empty_table
        for i = 1, #sites do
          local site = sites[i]
          if site.building_class_proto.template_name == template.name then
            wonder_exists = true
            break
          end
        end
      end
    end
  end
  wonder_exists = false

local can_build, description, cost_text
  if wonder_exists then
    description = T({
      3968,
      "You can only build this building once."
    })
    can_build = false
  elseif available_prefabs > 0 then
    cost_text = T({
      3969,
      "Available prefabs: <number>",
      number = available_prefabs
    })
    can_build = true
  elseif require_prefab then
    description = T({
      3970,
      "You need prefab parts for this building. Use a resupply Rocket to bring more <em>prefabs</em> from Earth, or research the corresponding <em>Technology</em>."
    })
    can_build = false
  elseif not tech_enabled then
    description = tech_rollover
    can_build = false
  elseif cat_id == "Domes" and AreDomesCapped() then
    description = T({
      7907,
      "Maximum number of Domes has been reached"
    })
    can_build = false
  else
    can_build = true
  end
  if not description then
    local construction_cost = GetConstructionDescription(template, cost_text)
    local class = g_Classes[template.template_class]
    description = class and class.GetIPDescription(template) or T({
      template.description,
      template
    })
    if construction_cost ~= "" then
      description = description .. Untranslated([[


]]) .. construction_cost
    end
  end

local action
  if bCreateItems then
    if require_prefab or available_prefabs > 0 then
      function action(obj, data)
        if GetUIStyleGamepad() then
          g_LastBuildItem = "Salvage"
        end
        local params
        if UICity:GetPrefabs(template.name) > 0 then
          params = {supplied = true, prefab = true}
        elseif not data.enabled then
          return
        end
        GetInGameInterface():SetMode(data.construction_mode, {
          template = data.name,
          selected_dome = obj and obj.selected_dome,
          params = params
        })
      end
    else
      function action(obj, data)
        if GetUIStyleGamepad() then
          g_LastBuildItem = "Salvage"
        end
        GetInGameInterface():SetMode(data.construction_mode, {
          template = data.name,
          selected_dome = obj and obj.selected_dome
        })
      end
    end
  end
  return true, require_prefab, can_build, action, description
end


回复

使用道具 举报

0

主题

241

帖子

259

积分

高级玩家

Rank: 4

贡献度
0
金元
2594
积分
259
精华
0
注册时间
2021-12-12
舒服的沙发
发表于 2022-2-17 10:47 | 只看该作者
wonder_exists = true
脚本里面所有的这一行语句, 改成:
wonder_exists = false
应该就能解决你的问题了.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|3DMGAME ( 京ICP备14006952号-1  沪公网安备 31011202006753号

GMT+8, 2026-5-12 07:18 , Processed in 0.031742 second(s), 15 queries , Memcached On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表