Commit Graph

11 Commits

Author SHA1 Message Date
MrMelbert
1521b4b124 Fixes AIs having incorrect laws and being useless on nations (#74843)
## About The Pull Request

Fixes #74842 

So this issue is multi-part

1. Separatist antag datum used the wrong mob for applying laws to.
`mob_override` is not passed usually and should default to the antag
datum owner's mob if not passed

Fixes this by passing the right mob. AI still doesn't get law datums,
the issue is deeper - they don't even become separatists!

2. Separatists only iterates over human mobs, and not silicon mobs

Okay, fixes this by iterating over all living players. Still not
entirely fixed, new AIs don't have UN laws!

3. Changes the default law datum when nations executes to United Nations
so new unlinked silicons gain the lawset

Closer, would you believe it if this still doesn't fix everything, but
going further is out of scope.
Changing the round default lawset as a part of roundstart execution does
not update anything that set it from atom initialize. If we wanted we
could hook signals into "default lawset changed" and then update it
conditionally to circumvent ALL of these issues but whatever, someone
can do that later.

## Why It's Good For The Game

AIs stop crying on nations

## Changelog

🆑 Melbert
fix: AIs now get their proper lawset, and an objective related to said
lawset, on Nations
/🆑
2023-04-20 17:24:21 -06:00
san7890
ccef887efe Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR
TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW
RATHER THAN AFTER THE FACT.

## About The Pull Request

Hey there,

This took a while to do, but here's the gist:

Python file now regexes every file in `/code` except for those that have
some valid reason to be tacking on more global defines. Some of those
reasons are simply just that I don't have the time right now (doing what
you see in this PR took a few hours) to refactor and parse what should
belong and what should be thrown out. For the time being though, this PR
will at least _halt_ people making the mistake of not `#undef`ing any
files they `#define` "locally", or within the scope of a file.

Most people forget to do this and this leads to a lot of mess later on
due to how many variables can be unmanaged on the global level. I've
made this mistake, you've made this mistake, it's a common thing. Let's
automatically check for it so it can be fixed no-stress.

Scenarios this PR corrects:

* Forgetting to undef a define but undeffing others.
* Not undeffing any defines in your file.
* Earmarking a define as a "file local" define, but not defining it.
* Having a define be a "file local" define, but having it be used
elsewhere.
* Having a "local" define not even be in the file that it only shows up
in.
* Having a completely unused define*

(* I kept some of these because they seemed important... Others were
junked.)
## Why It's Good For The Game

If you wanna use it across multiple files, no reason to not make it a
global define (maybe there's a few reasons but let's assume that this is
the 95% case).

Let me know if you don't like how I re-arranged some of the defines and
how you'd rather see it be implemented, and I'd be happy to do that.
This was mostly just "eh does it need it or not" sorta stuff.

I used a pretty cool way to detect if we should use the standardized
GitHub "error" output, you can see the results of that here
https://github.com/san7890/bruhstation/actions/runs/4549766579/jobs/8022186846#step:7:792
## Changelog
Nothing that really concerns players.

(I fixed up all this stuff using vscode, no regexes beyond what you see
in the python script. sorry downstreams)
2023-03-29 10:17:03 -07:00
MrMelbert
430e3b8af3 Adds the "Law panel", a control center for admins interacting with silicon laws (#73747)
Adds the Law Panel.

The Law Panel shows all silicons in the world and their lawsets.

From this panel, an admin can add new laws, remove old laws, edit
existing laws, or even re-arrange law order.

This allows for admins to get a lot more creative in creating custom
silicon lawsets. It also gives a much easier way for admins to deal with
law grief at a glance.

Additionally, the panel allows for admins to force a silicon to state
laws, privately announce the laws to the player, or give them a the
"laws updated" alert as normal.
2023-03-04 16:34:31 +00:00
Marina
fcaa0b24db Alphabetized, fixed spelling error, clarifying event descriptions. Polish (#69707)
About The Pull Request

Alphabetized several long lists of strings so its easier for us to look through them, just code polish, nothing the players would see.

Fixed some minor spelling errors as well.

Clarified door bolt state to be less ambiguous in the door wiring gui.
Originally it would say the door bolts have fallen, and the door bolts "Look up". i dont know about you but that was very not clear for me to read. Like where are the bolts? In the door or the frame? Arnt there bolts on top and bottom? Just didn't make sense to me.

Now it says "Have engaged!" & "Have disengaged"
hopefully that makes the state clearer at a glance.

I also added a small handful of funny texts to some string files. See changelog
Why It's Good For The Game

Well, who doesn't like a bit of polish? Just makes the game a little easier for people.
Also funny text funny text.
Changelog

spelling: improves spelling and adds more flavortext
2022-09-11 21:51:01 +12:00
Seth Scherer
f1a363c825 Converts a shitload of istypes to their more concise macros (#69260)
* Converts a lot of istypes() to use their istype macro helpers.
2022-08-18 22:08:44 -04:00
Charlotte
2a2845e252 AI Lawset can now be specified instead of 'custom' (#68587) 2022-08-03 07:42:05 -07:00
13spacemen
301ca1e647 Makes Hacked Laws Font Color Actually Readable (#68476)
changes ai hacked laws font color to be more readable
2022-07-17 17:52:39 -07:00
Mothblocks
ab5ca88dd8 Remove majority order clause from Asimov++ (#67670) 2022-06-10 13:58:35 +12:00
Tim
f06d735a52 All AI Lawsets are rebalanced, can be researched, appear in config, and random spawners for AI upload. (#66854)
This formally adds the new AI lawsets from #66636 into the game. Every lawset can
be researched, appears in config, and random spawners.
2022-06-06 22:54:29 -07:00
tralezab
6d8485f0db When AI rolls "Unique AI" station trait, upload modules won't be available until research, and research requires more points. (#66633)
Rolling unique AI station traits removes boards from map and changes research costs of other lawsets.
2022-05-30 20:55:51 +02:00
tralezab
d1a597e97a Sorts ai_laws.dm, adds Dungeon Master, The Painter and Their Canvas, and Nutimov lawsets (#66636)
Sorts ai_laws.dm, adds Dungeon Master, The Painter and Their Canvas, and Nutimov lawsets (They aren't obtainable by players at the moment)
2022-05-09 17:43:08 -04:00