MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0002400 | Zandronum | [All Projects] Suggestion | public | 2015-08-10 17:39 | 2018-09-30 22:21 |
|
Reporter | Hypnotoad | |
Assigned To | Dusk | |
Priority | normal | Severity | feature | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | | |
Target Version | 3.0 | Fixed in Version | 3.0 | |
|
Summary | 0002400: Simple current date server variable that can be overwritten |
Description | Following on from here:'http://zandronum.com/tracker/view.php?id=1853#c10622 [^]'
I spoke to Torr about this last night and explained how kpatch already has a simple read only DDMMYY date variable in place. I proposed that a similar variable, but that isn't read only so that hosts can override it, should be added to Zandronum. Being able to override it allows individuals to overcome any attempt by some project to lock down their mod after a certain date.
After speaking to Blzut3 who was the main opponent of being able to get the current time/date initially, he agrees that this server variable approach is okay since using getcvar is already indeterminate so it doesn't add additional determinism problems. |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | 0001853 | closed | | Ability to access time (but not date/year to prevent abuse) in ACS. |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-08-10 17:39 | Hypnotoad | New Issue | |
2015-08-10 17:41 | Blzut3 | Relationship added | related to 0001853 |
2015-08-25 23:33 | Dusk | Assigned To | => Dusk |
2015-08-25 23:33 | Dusk | Status | new => assigned |
2015-08-25 23:36 | StrikerMan780 | Note Added: 0013280 | |
2015-08-25 23:37 | StrikerMan780 | Note Edited: 0013280 | bug_revision_view_page.php?bugnote_id=13280#r7950 |
2015-08-26 00:25 | Catastrophe | Note Added: 0013281 | |
2015-08-26 01:33 | Dusk | Note Added: 0013282 | |
2015-08-26 01:33 | Dusk | Status | assigned => needs review |
2015-08-26 01:36 | Dusk | Note Edited: 0013282 | bug_revision_view_page.php?bugnote_id=13282#r7952 |
2015-08-26 02:26 | WaTaKiD | Note Added: 0013283 | |
2015-08-26 02:30 | Dusk | Note Edited: 0013282 | bug_revision_view_page.php?bugnote_id=13282#r7953 |
2015-08-26 02:33 | Dusk | Note Edited: 0013282 | bug_revision_view_page.php?bugnote_id=13282#r7954 |
2015-08-26 02:41 | WaTaKiD | Note Edited: 0013283 | bug_revision_view_page.php?bugnote_id=13283#r7956 |
2015-08-28 23:07 | Ivan | Note Added: 0013302 | |
2015-08-30 20:53 | cobalt | Status | needs review => needs testing |
2015-08-30 20:53 | cobalt | Target Version | => 3.0 |
2015-08-30 20:53 | cobalt | Description Updated | bug_revision_view_page.php?rev_id=7985#r7985 |
2015-08-30 20:53 | cobalt | Note Added: 0013336 | |
2015-09-05 15:06 | Dusk | Note Added: 0013423 | |
2015-09-05 15:06 | Dusk | Status | needs testing => resolved |
2015-09-05 15:06 | Dusk | Fixed in Version | => 3.0 |
2015-09-05 15:06 | Dusk | Resolution | open => fixed |
2018-09-30 22:21 | Blzut3 | Status | resolved => closed |
Notes |
|
(0013280)
|
StrikerMan780
|
2015-08-25 23:36
(edited on: 2015-08-25 23:37) |
|
I really don't think anyone is so stupid as to lock down their mod by date. And if they do, their loss by cutting off their own playerbase. Chances are if someone does that, it isn't a mod worth playing anyhow.
|
|
|
|
Yes. I have a working money system in-place for a certain mod, and it'd be nice to give automated discounts during halloween, christmas, etc. |
|
|
(0013282)
|
Dusk
|
2015-08-26 01:33
(edited on: 2015-08-26 02:33) |
|
Here goes..
I added 3 new ACS functions to read in system time stuff:
SystemTime() - returns a timestamp
GetTimeProperty (timestamp, which[, utc=false]) - returns a single localized property of the timestamp
Strftime (timestamp, format, [utc=false]) - returns a string representation of the date
The override mechanism takes the form of the CCMD acstime, which is an interface to the CVAR acstimestamp (so that it gets written to the ini):
acstime -- no arguments, prints override status
acstime yy-mm-dd [hh:mm] -- sets override
acstime clear -- clears override
Stuff for zspecial.acs/zdefs.acs:
special -127:SystemTime( 0 ),
-128:GetTimeProperty( 2, 3 ),
-129:Strftime( 2, 3 );
// The following can be used with the "which" parameter of GetTimeProperty
#define TM_SECOND 0
#define TM_MINUTE 1
#define TM_HOUR 2
#define TM_DAY 3
#define TM_MONTH 4
#define TM_YEAR 5
#define TM_WEEKDAY 6
The format parameter of strftime is naturally the format parameter of the real thing. (I'm supposing this is safe to just pass to the real strftime function unmodified.) This website seems like a pretty decent online strftime calculator.
|
|
|
(0013283)
|
WaTaKiD
|
2015-08-26 02:26
(edited on: 2015-08-26 02:41) |
|
|
|
(0013302)
|
Ivan
|
2015-08-28 23:07
|
|
|
|
(0013336)
|
cobalt
|
2015-08-30 20:53
|
|
|
|
(0013423)
|
Dusk
|
2015-09-05 15:06
|
|
Was tested prior to merge |
|