Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upNew electronics #8432
Conversation
HuXTUS
added some commits
Aug 2, 2014
This comment has been minimized.
This comment has been minimized.
|
Great, keep up the good work! |
This comment has been minimized.
This comment has been minimized.
|
Thank you, Zireael. |
This comment has been minimized.
This comment has been minimized.
stk2008
commented
Aug 4, 2014
|
im looking forward to this to looks promising :) may I suggest some kind of GPS system?. |
This comment has been minimized.
This comment has been minimized.
|
Wow, that's a bundle of great ideas. I can definitely see people getting |
kevingranade
reviewed
Aug 5, 2014
| @@ -0,0 +1,21 @@ | |||
| Exception: STATUS_INTEGER_DIVIDE_BY_ZERO at eip=00997536 | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
HuXTUS
Aug 5, 2014
Author
Contributor
sorry, I hand curves with git. Will clean this as soon as I can.
This file is accidentally slipped when I build the project with cygwin and sent commit.
kevingranade
reviewed
Aug 5, 2014
|
|
||
| if (it->has_flag("MC_MOBILE") && it->has_flag("MC_RANDOM_STUFF") && !(it->has_flag("MC_USED") || | ||
| it->has_flag("MC_HAS_DATA"))) | ||
| { |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
HuXTUS
Aug 5, 2014
Author
Contributor
yes, yes. Sorry again, this project is WIP, I very much hope that when I finish it and offer to merge, such errors will not. I think I have learned how to use A-Style plugin for MS Visual Studio.
HuXTUS
added some commits
Aug 5, 2014
HuXTUS
changed the title
New electronics [WIP][discuss]
New electronics [CR]
Aug 6, 2014
KA101
reviewed
Aug 7, 2014
| } | ||
|
|
||
| if (z.is_hallucination()) { | ||
| p->add_msg_if_player(_("Strange, but in the picture anyone...")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 7, 2014
| } | ||
|
|
||
| if (zid != sel_zid) { | ||
| p->add_msg_if_player(m_warning, _("%s standing in the way of the lens."), z.name().c_str()); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 7, 2014
| } | ||
|
|
||
| p->moves -= 50; | ||
| g->sound(p->posx, p->posy, 8, _("TODO: SOME SOUND OF PHOTO'SHOT IN ENGLISH.")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 7, 2014
| const int sel_npcID = g->npc_at(pos.x, pos.y); | ||
|
|
||
| if (sel_zid == -1 && sel_npcID == -1) { | ||
| p->add_msg_if_player(_("There is no creature to take photo.")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 7, 2014
| } | ||
|
|
||
| if (pos.x == p->posx && pos.y == p->posy) { | ||
| p->add_msg_if_player(_("To take a selfie is bad idea - flash harmful to the eyes.")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 7, 2014
| p->add_msg_if_player(m_good, _("Pictures of someone's house, luxuriously.")); | ||
| break; | ||
| default: | ||
| p->add_msg_if_player(m_good, _("You nostalgiques staring at the photo.")); |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
...and here. I can't resolve merge conflicts. Hope it not big problem for seasoned collaborators. |
KA101
reviewed
Aug 12, 2014
| @@ -66,6 +66,7 @@ void game::init_morale() | |||
| _("Mutagenic Anticipation"), | |||
| _("Good Feeling"), | |||
| _("Supported"), | |||
| _("Looked photos"), | |||
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| return it->type->charges_to_use(); | ||
| } | ||
| if (!mc->has_flag("MC_MOBILE")) { | ||
| p->add_msg_if_player(m_info, _("This is not compatible memory card!")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| uimenu pmenu; | ||
|
|
||
| pmenu.selected = 0; | ||
| pmenu.text = _("Monsters photo on camera:"); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| } | ||
|
|
||
| //just photo, no save. Maybe in the future we will need to create CAMERA_NPC_PHOTOS | ||
| p->add_msg_if_player(_("You shot %s in %s quality."), guy->name.c_str(), |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| chq = &string_format("%d", photo_quality)[0]; | ||
| it->item_vars["CAMERA_MONSTER_PHOTOS"][strqpos] = *chq; | ||
|
|
||
| p->add_msg_if_player(_("This photo is better than previous.")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| //quest processing... | ||
| } | ||
|
|
||
| p->add_msg_if_player(_("You shot %s in %s quality."), z.name().c_str(), |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| } else { | ||
|
|
||
| if (success > -10 || one_in(5)) { | ||
| p->add_msg_if_player(m_neutral, _("You failed to decrypt content of %s!"), mc->tname().c_str()); |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
You failed to decrypt the %s.
(No exclamation as it's not a serious failing.)
KA101
reviewed
Aug 12, 2014
| if (success > -10 || one_in(5)) { | ||
| p->add_msg_if_player(m_neutral, _("You failed to decrypt content of %s!"), mc->tname().c_str()); | ||
| } else { | ||
| p->add_msg_if_player(m_bad, _("Firmware protection tripped on and the data is lost!")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| return it->type->charges_to_use(); | ||
| } | ||
| if (!mc->has_flag("MC_MOBILE")) { | ||
| p->add_msg_if_player(m_info, _("This is not compatible memory card!")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| return it->type->charges_to_use(); | ||
| } | ||
| if (!mc->has_flag("MC_MOBILE")) { | ||
| p->add_msg_if_player(m_info, _("This is not compatible memory card!")); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| it->item_vars["RECIPE"] = recipes[rchoice - 1]; | ||
|
|
||
| const item dummy(it->item_vars["RECIPE"], 0); | ||
| p->add_msg_if_player(m_info, _("Now e-ink screen contains recipe of %s."), dummy.tname().c_str()); |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| p->add_msg_if_player(m_good, _("You download recipe of %s into internal memory"), | ||
| dummy.tname().c_str()); | ||
| } else { | ||
| p->add_msg_if_player(m_good, _("Your tablet already has recipe of %s"), |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| something_downloaded = true; | ||
| eink->item_vars["EIPC_RECIPES"] += rident + ","; | ||
|
|
||
| p->add_msg_if_player(m_good, _("You download recipe of %s into internal memory"), |
This comment has been minimized.
This comment has been minimized.
KA101
reviewed
Aug 12, 2014
| "symbol": ";", | ||
| "color": "yellow", | ||
| "name": "camera pro", | ||
| "description": "Digital camera professional level allows you to take and store pictures. Is display for viewing photos and slot for memory card. Features improved image quality.", |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
A 35mm digital SLR (single-lens reflex) camera, with optical and digital viewfinders, zoom lens with auto-focus and stabilizer, and flash. You can view your photos on it or transfer them with a memory card; it runs on conventional batteries.
Before the cataclysm, you could have taken professional-grade photos using this.
KA101
reviewed
Aug 12, 2014
| "color": "yellow", | ||
| "name": "camera pro", | ||
| "description": "Digital camera professional level allows you to take and store pictures. Is display for viewing photos and slot for memory card. Features improved image quality.", | ||
| "flags": ["CAMERA_PRO"], |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
I'm imagining my Canon T1i here, and for DDA purposes it would take the "ALWAYS_TWOHAND" flag. ONe hand to work the shutter and controls, one to work the lens (zoom, and focus, if you're focusing manually).
You can one-hand it IRL (mine has a wrist brace that facilitates that), but then the balance is Off and you can't zoom easily, so in practice it should take a nontrivial penalty to photo quality. Seems easier to require two hands ATM.
This comment has been minimized.
This comment has been minimized.
HuXTUS
Aug 12, 2014
Author
Contributor
Just add tag "ALWAYS_TWOHAND"?
I want to say that the camera now can be used not only holding as weapon, but also by using [ a ] from inventory.
KA101
reviewed
Aug 12, 2014
| "symbol": ";", | ||
| "color": "yellow", | ||
| "name": "camera", | ||
| "description": "Digital camera allows you to take and store pictures. Is display for viewing photos and slot for memory card.", |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
A point-and-shoot digital camera, with digital viewfinder, a backup "iron-sight", and flash. You can look at your photos on the digital screen, or transfer them with a memory card. Takes conventional batteries.
KA101
reviewed
Aug 12, 2014
| "color": "yellow", | ||
| "name": "camera", | ||
| "description": "Digital camera allows you to take and store pictures. Is display for viewing photos and slot for memory card.", | ||
| "price": 200000, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
HuXTUS
Aug 12, 2014
Author
Contributor
Ok. Well, I just don't know how the prices are formed and in the DDA. Just a question: are they which were before the cataclysm, or they are formed by supply and demand at the moment? The camera is a big deficit, they are no longer manufactured, must be expensive.
KA101
reviewed
Aug 12, 2014
| "price": 200000, | ||
| "material": ["plastic", "steel"], | ||
| "weight": 20000, | ||
| "volume": 5, |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
If it's similar to mine, volume 1 at most. Not much bigger than a pack of cards or my hand.
KA101
reviewed
Aug 12, 2014
| "symbol": ";", | ||
| "color": "blue", | ||
| "name": "E-Ink Tablet PC", | ||
| "description": "Tablet PC with colorful E-Ink display. Useful multifunctional device from pre-apocalypse time. Has display which consumes almost no energy.", |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
A tablet PC using an efficient color e-ink display. Before the cataclysm, these were nifty gadgets; now, it's an almost priceless resource. Runs on conventional batteries.
KA101
reviewed
Aug 12, 2014
| "color": "white", | ||
| "name": "Science SD-Memory card", | ||
| "name_plural": "Science SD-Memory cards", | ||
| "description": "Memory card you found on dead scientist or laboratory. It is encrypted and may contain some very useful stuff.", |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
This memory card appears to be related to "XEDRA", and is certainly encrypted. Looks * Interesting *, though...
(side note, not for inclusion in the text: XEDRA is the fictional US government agency which controlled the labs, and is directly responsible for the Cataclysm.)
KA101
reviewed
Aug 12, 2014
| "color": "white", | ||
| "name": "SD-Memory card (encrypted)", | ||
| "name_plural": "SD-Memory cards (encrypted)", | ||
| "description": "Memory card for mobile devices. This card is encrypted, you do not know what it contains.", |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
This memory card appears to have the firmware encryption set. Hopefully it contains something worth encrypting.
KA101
reviewed
Aug 12, 2014
| "color": "white", | ||
| "name": "SD-Memory card (clean)", | ||
| "name_plural": "SD-Memory cards (clean)", | ||
| "description": "Memory card for mobile devices. This card does not contains any data, but you can still write on it your useful data.", |
This comment has been minimized.
This comment has been minimized.
KA101
Aug 12, 2014
Contributor
This memory card is either unused or has been wiped clean. You could use it to store your data, though!
KA101
reviewed
Aug 12, 2014
| "symbol": ",", | ||
| "color": "white", | ||
| "name": "SD-Memory card", | ||
| "description": "Memory card for mobile devices. Usually stores family photo and music, but sometimes you can find something interesting and useful.", |
This comment has been minimized.
This comment has been minimized.
kevingranade
merged commit 7411cd9
into
CleverRaven:master
Aug 12, 2014
1 check failed
This comment has been minimized.
This comment has been minimized.
|
@kevingranade Thanks, Kevin. Just question: for you it was difficult to resolve merge conflicts here? And which tool you use for that? kdiff3? |
HuXTUS
deleted the
HuXTUS:new-electronics
branch
Aug 12, 2014
Lain-
reviewed
Aug 12, 2014
| "color": "white", | ||
| "name": "SD-Memory card (clean)", | ||
| "name_plural": "SD-Memory cards (clean)", | ||
| "description": "This memory card is either unused or has been wiped clean. You could use it to store your data, though!", |
This comment has been minimized.
This comment has been minimized.
Lain-
Aug 12, 2014
Contributor
I'm confused here, the id is "mobile_memory_card_used" but the description suggest that the card is unused. It is possible that this will cause unintended effects in the code but I haven't look yet.
This comment has been minimized.
This comment has been minimized.
HuXTUS
Aug 12, 2014
Author
Contributor
"used" in id mean that this card is clean. Not new (with unknown data) or not contain your data. In code I do check like
if (card.has_flag(MC_USED)) {this card not contains any data}
heh. look this (last) commit
HuXTUS@7411cd9
This comment has been minimized.
This comment has been minimized.
kevingranade
Aug 12, 2014
Member
There were a few tricky bits with the merge, there was a conflicting fix to
how music morale gain is handled, and a bunch of the new items conflicted,
which is a scary-looking conflict if you're not used to them.
This comment has been minimized.
This comment has been minimized.
|
@Lain- welcome here. This is old version of description. Just it changed by KA101 because it is better to user understood. |
HuXTUS commentedAug 4, 2014
New items:
Tablet PC with colorful E-Ink display
This tablet PC has E-Ink display, thus it consumes energy only when user works with it and when playing music.
With this gadget you can:
download data from memory card ( MC )
Insert MC that you found into gadget and try download data. Every MC initialized with random stuff and can be empty, contain family photos, music and/or recipes. Also it can be encrypted. If you lucky, data from MC will appear in your Tablet PC.
decrypt encrypted memory cards
Computer skill needed. You can lost data on MC if you failed, but encrypted MC's has bigger chance to contain data.
view photos
You collect photos on your device from MC's. Then you can view this photos. It increases your morale, but photos consumes from device (like chapters from funny books), and you need search new MC with photos.
play music
Like with photos, you can collect music. Music not consumed from device, but the more music you have, the better for you: maximum of given morale limited by count of songs on device (but can't be more that 100).
May be we need trait "music lover", that increased max of limit?
Activating music on device will set
item->active = trueand starting consume batteries, device willsoundin some radius. If you hear music, your morale increased.Important: I added new effect
music. It work like semaphore to all music-devices (this tablet, mp3 and vehicle music).Algo:
view recipes
If you lucky, you can find (and download to tablet) MC with recipe. In this PR I limited recipes with max=3 level of food recipes, one that does not scare, but you can do any other recipe in future.
upd: new rare item - science memory card. always encrypted, has no limit on recipes.
If your device contain recipes, just select one and it appear on E-Ink display. Now the tablet can be used in crafts like book (but books contains many recipes, but tablet only the selected).
I slightly updated method
has_recipe(), now any item in game can contain recipe. Just add tag "HAS_RECIPE" and setitem_vars["RECIPE"]="ident"This gives us the ability to create items (also in realtime) such as:
Digital cameras
Just for fun. You can take a shot monsters. Photos will produce different quality. Pro camera have better chance to make good photo. You can watch photos on your camera and upload it to MC, then download to tablet PC. You can flashes (do blink) monsters and NPC with camera's flash.
I do not think of why this might be the case, but I like collecting something in games, and here we will be able to collect pictures of monsters.
May be we can create quest (NPC) - "take a shot of Hulk with good quality".
This increases count of electronics you can use, not just disassemble.