February 6, 2023
Syntax test
<style>
body {
width: 100%;
background: url('./hello.jpg');
}
</style>body {
width: 100%;
background: url('./hello.jpg');
}
@media screen and (max-width: 300px) {}import { PaymentStatus, ProviderName } from './enum';
const mark = /reas([A-Z+]*)/gi;
declare global {
type UserPermission = 'account_edit'|'uri_edit'|'stats_read'|'admin_access'|'admin_read'|'admin_write';
type DonationReceiver = {
user_id: number;
provider: ProviderName;
provider_id: string;
provider_data: object & { layoutIds: string[], externalId: string };
phone: string;
phone_verified: boolean;
card_id: number|null;
verified?: boolean;
disabled: boolean;
created_at: Date;
disabled_at: Date|null;
}
class S extends M {
}# asd ## dsa --- * asdm **asd** [asd](http://teletype.in) - seta `asd`
const { goHome } = require('workloads')
var roleUpgrader = {
/** @param {Creep} creep **/
run: function(creep) {
if(creep.memory.upgrading && creep.store[RESOURCE_ENERGY] == 0) {
creep.memory.upgrading = false;
creep.say('🔄 harvest');
}
if(!creep.memory.upgrading && creep.store.getFreeCapacity() == 0) {
creep.memory.upgrading = true;
creep.say('⚡ upgrade');
}
let inWork = false
if(creep.memory.upgrading) {
if(creep.upgradeController(creep.room.controller) == ERR_NOT_IN_RANGE) {
creep.moveTo(creep.room.controller, {visualizePathStyle: {stroke: '#ffffff'}});
}
inWork = true
}
else {
var source = creep.pos.findClosestByPath(FIND_STRUCTURES, {
filter: (struct) => [STRUCTURE_CONTAINER, STRUCTURE_STORAGE].includes(struct.structureType) && struct.store[RESOURCE_ENERGY] > 0
});
if (source) {
if (creep.withdraw(source, RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
creep.moveTo(source, { visualizePathStyle: { stroke: '#ffaa00' } });
}
inWork = true
}
}
if (!inWork) {
goHome(creep)
}
}
};
module.exports = roleUpgrader;
const { goHome } = require('workloads')
var roleBuilder = {
/** @param {Creep} creep **/
run: function (creep) {
if (creep.memory.building && creep.store[RESOURCE_ENERGY] == 0) {
creep.memory.building = false;
creep.say('🔄 harvest');
}
if (!creep.memory.building && creep.store.getFreeCapacity() == 0) {
creep.memory.building = true;
creep.say('🚧 build');
}
let inWork = false
if (creep.memory.building) {
var newConstruct = creep.room.find(FIND_CONSTRUCTION_SITES);
if (newConstruct.length) {
if (creep.build(newConstruct[0]) == ERR_NOT_IN_RANGE) {
creep.moveTo(newConstruct[0], { visualizePathStyle: { stroke: '#ffffff' } });
}
return
}
var walls = creep.room.find(FIND_STRUCTURES, {
filter: (struct) => ([STRUCTURE_WALL, STRUCTURE_RAMPART].includes(struct.structureType)) && struct.hits < 100000
})
walls = _.sortBy(walls, (wall) => wall.hits)
if (walls.length) {
if (creep.repair(walls[0]) == ERR_NOT_IN_RANGE) {
creep.moveTo(walls[0], { visualizePathStyle: { stroke: '#ffffff' } });
}
return
}
}
else {
var storage = creep.pos.findClosestByPath(FIND_STRUCTURES, {
filter: (struct) => [STRUCTURE_CONTAINER, STRUCTURE_STORAGE].includes(struct.structureType) && struct.store[RESOURCE_ENERGY] > 0
});
if (storage) {
if (creep.withdraw(storage, RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
creep.moveTo(storage, { visualizePathStyle: { stroke: '#ffaa00' } });
}
return
} else {
var source = creep.pos.findClosestByPath(FIND_SOURCES)
if (source) {
if (creep.harvest(source) == ERR_NOT_IN_RANGE) {
creep.moveTo(source, { visualizePathStyle: { stroke: '#ffaa00' } });
}
return
}
}
}
goHome(creep)
}
};
module.exports = roleBuilder;
February 6, 2023, 11:17
0 views
0 reactions
0 replies