前言
因为之前设计的系统很粗糙,任务看起来很单调,比如 NPC 名称都是一成不变的,所以进行一些小改动。
思路
思路很简单,预设字典库随机分配名称。
名字组成字典
1 | { |
名字字典
1 | { |
实现
实现起来过于简单,直接上代码
1 | type randomNameMgr struct { |
1 | func main() { |
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true