a
    ŽiÆD  ã                   @   s^   d Z ddlZddlmZmZmZ ddd„Zddd	„Zdd
d„Zddd„Z	ddd„Z
g d¢ZdS )að  
Career & Work Activity Events
Professional development and work-related activities (ages 18-65)

Events:
- professionalConference: Attend professional conference (ages 22-65, requires work)
- mentorJunior: Mentor a junior colleague (ages 30-65, requires work)
- sideHustle: Start a side business or freelance work (ages 18-65)
- networkingEvent: Attend networking event (ages 22-65, requires work)
- professionalCertification: Get professional certification (ages 22-65, requires work)

These events integrate with the job ActivityRecord system:
- Check player.c.activityRecords for job-type records
- Modify ActivityRecord.performance based on events
- Add certifications to ActivityRecord.achievements
- Side hustles create separate ActivityRecords
é    N)ÚmessageFunctionÚquestionFunctionÚanswerOptionÚmessageFc           
      C   sX  d}|| j voZ| jjdkoZ| jjdkoZ| jjdkoZt| jddƒoZ| jjdkoZdt ¡ d	 k}d
}tdddtdddtdƒg}|dkr–t||| ||ƒS |dkrTd}| jj	D ]&}|j
dkr¬|j| jjjkr¬|} qÔq¬|d |d jkr†| j d¡ | j jd8  _| j jd7  _| j jd7  _| j jd7  _|rT| jd7  _|jdkrZd|_d| jjj› d}	|	|jvrT|j |	¡ nÎ|d |d jkrþ| j d¡ | j jd8  _| j jd7  _| j jd7  _|rT| jd7  _|jdkrTd|_nV|d |d jkrT| j d¡ | j jd8  _|rT| jd 8  _|jdk rTd|_dS )!z,Attend professional conference in your fieldÚprofessionalConferenceé   éA   ÚworkÚjobFéd   é   iˆ  zHA professional conference in your field is happening next month. Attend?zYes, great networking!éô  )Ú	moneyCostzVirtual attendance onlyúSkip itÚanswerNÚoptionr   zYou attend the conference in person. The networking opportunities are amazing, and you learn so much from the keynote speakers!é   é   é   z	Attended z Professional Conferencez}You attend the conference virtually. It's not quite the same as being there in person, but you still gain valuable knowledge.é
   é   é   zlYou decide to skip the conference. You save money, but you might have missed out on some good opportunities.é   é   )ÚaskedQuestionsÚcÚageYearsÚ
occupationÚgetattrÚmoneyÚrandomr   r   ÚactivityRecordsÚtypeÚidr
   r   ÚmessageQueueÚappendÚintelligenceÚsocialÚ	happinessÚperformanceÚtitleÚachievements)
Úplayerr"   r   ÚresponseÚfnameÚcheckÚanswerOptionsÚ
job_recordÚrecordZconference_achievement© r3   ú9/var/www/lichun.app/lichun/ws/events/activities/career.pyr      sX    X

ý
r   c                 C   sD  d}d}| j jD ]&}|jdkr|j| j jjkr|} q8q| pP|jdkoP|jdk}|| jvo¬| j jdko¬| j jdko¬| j j	dko¬t
| j dd	ƒo¬|o¬| j jd
ko¬dt ¡ d k}d}tdd
dtdƒtdƒg}	|dkrät||| ||	ƒS |dkr@|d |	d jkr‚| j d¡ | j  jd
8  _| j  jd7  _| j  jd7  _|r@| jd
7  _|jdkrdd|_d}
|
|jvr@|j |
¡ n¾|d |	d jkrê| j d¡ | j  jd
7  _| j  jd
7  _|r@| jd7  _|jdkr@d|_nV|d |	d jkr@| j d¡ | j  jd
8  _|r@| jd8  _|jdk r@d|_dS )z*A junior colleague asks you to mentor themÚmentorJuniorNr
   é(   z	Slack Offé   r   r	   Fr   r   i   zVA junior colleague approaches you and asks if you'd be willing to mentor them. Accept?zYes, mentor them!©Ú
energyCostzInformal help onlyzToo busyr   r   r   z€You agree to mentor them! It's rewarding to help someone grow in their career. You set up regular meetings and provide guidance.r   r   zMentored junior colleaguezƒYou tell them you can't commit to formal mentoring, but you're happy to answer questions when they come up. It's a good compromise.r   r   ziYou politely decline, explaining you're too busy. They understand, but you feel a little guilty about it.)r   r!   r"   r#   r
   r)   Úfocusr   r   r   r   Úenergyr    r   r   r   r$   r%   r(   r'   r+   )r,   r"   r   r-   r.   r1   r2   Zperformance_checkr/   r0   Zmentor_achievementr3   r3   r4   r5   T   sV    \
ý
r5   c                 C   sô  d}|| j vo@| jjdko@| jjdko@| jjdko@dt ¡ d k}d}tdd	d
tddd
tdƒg}|dkr|t||| ||ƒS |dkrðddlm}m	} ddl
}	|d |d jkr°| j d¡ | j jd	8  _| j jd7  _| j jd7  _|ƒ }
|	 ¡ j|
_d|
_d|
_d|
_||
jd| jƒ}d|_d|_| jj |
¡ | jj |¡ | jjD ]X}|jdkrRt| jdƒrR|j| jjjkrR| jd8  _|jdk r¢d|_ qðqRn@|d |d jkrÀ| j d¡ | j jd8  _| j jd7  _| j jd7  _|ƒ }
|	 ¡ j|
_d|
_d|
_d|
_||
jd| jƒ}d|_d |_| jj |
¡ | jj |¡ | jjD ]X}|jdkrdt| jdƒrd|j| jjjkrd| jd!8  _|jdk r´d|_ qðqdn0|d |d" jkrð| j d#¡ | j jd8  _dS )$z'Start a side business or freelance workÚ
sideHustleé   r   r   r   ip  zhYou've been thinking about starting a side business or doing freelance work to earn extra income. Do it?zYes, commit to it!r7   r8   zTry it part-timez	Too riskyr   r   )ÚActivityRecordÚlocationClassNr   z–You dive into your side hustle with full commitment! It's exhausting juggling everything, but the extra income and sense of accomplishment feel great.i,  r   Úside_hustlezSide Business (Full-time)zYour own side business ventureé2   z	Work Hardr
   r   zxYou start your side hustle on a part-time basis. It's manageable, and the extra income is nice without overwhelming you.é–   zSide Business (Part-time)z$Your part-time side business ventureÚBalancedr   r   zUYou decide it's too risky right now. Maybe another time when you have more bandwidth.)r   r   r   r;   r    r   r   Ú	functionsr>   r?   Úuuidr   r$   r%   r   r(   Úuuid4Úhexr#   r"   r*   ÚdescriptionÚdater)   r:   Ú
activitiesr!   Úhasattrr
   )r,   r"   r   r-   r.   r/   r0   r>   r?   rE   r@   Zhustle_recordr2   r3   r3   r4   r<   “   sr    >

ý
,,r<   c           
      C   s`  d}|| j voZ| jjdkoZ| jjdkoZ| jjdkoZt| jddƒoZ| jjdkoZdt ¡ d	 k}d
}tdddtdddtdƒg}|dkr–t||| ||ƒS |dkr\d}| jj	D ]&}|j
dkr¬|j| jjjkr¬|} qÔq¬|d |d jkrŽ| j d¡ | j jd8  _| j jd7  _| j jd7  _|r\| jd7  _|jdkrJd|_tdd„ |jD ƒƒ}	|	dkrv|j d¡ n|	dkr\|j d¡ nÎ|d |d jkr| j d¡ | j jd8  _| j jd7  _| j jd7  _|r\| jd7  _|jdkr\d|_nV|d |d jkr\| j d¡ | j jd8  _|r\| jd8  _|jdk r\d|_dS ) z"Attend networking event after workÚnetworkingEventr   r   r	   r
   Fr   r   i¬  zQThere's a networking event after work tonight. Your colleagues are going. Attend?zYes, network actively!r   r8   zShow up brieflyr   r   Nr   r   zµYou attend the networking event and actively engage with people. You exchange business cards, make genuine connections, and even meet someone who might lead to future opportunities!r   é   r   c                 s   s   | ]}d |v rdV  qdS )Z
Networkingr   Nr3   ©Ú.0Zachievementr3   r3   r4   Ú	<genexpr>  ó    z"networkingEvent.<locals>.<genexpr>zActive NetworkerzProfessional Network Masterz…You show up for an hour, have a few quick conversations, then head home. It's good to make an appearance without exhausting yourself.r   r   z{You decide to skip the networking event. You could use the rest, but you wonder if you missed out on important connections.)r   r   r   r   r   r;   r    r   r   r!   r"   r#   r
   r   r$   r%   r'   r(   r)   Úsumr+   )
r,   r"   r   r-   r.   r/   r0   r1   r2   Znetworking_countr3   r3   r4   rL   ã   sZ    X

ý


rL   c                 C   sx  d}|| j vof| jjdkof| jjdkof| jjdkoft| jddƒof| jjdkof| jjdkofd	t ¡ d
 k}d}tddddtdddtdƒg}|dkr¤t	||| ||ƒS |dkrtd}| jj
D ]&}|jdkrº|j| jjjkrº|} qâqº|d |d jkrÌ| j d¡ | j jd8  _| j jd8  _| j jd7  _| j jd7  _|rt| jd7  _|jdkrhd|_d| jjj› }	|	|jvr|j |	¡ tdd„ |jD ƒƒ}
|
dkrtd}||jvrt|j |¡ n¨|d |d	 jkrD| j d¡ | j jd8  _| j jd7  _| j jd 7  _|rt| jd!7  _|jdkrtd|_n0|d |d" jkrt| j d#¡ | j jd 8  _dS )$z,Get professional certification in your fieldÚprofessionalCertificationr   r   r	   r
   Fr   r   r   iX  z‘You're considering getting a professional certification to advance your career. It requires time and money to study and take the exam. Go for it?zYes, study and certify!r6   )r   r9   zSelf-study without certr8   zNot worth itr   Nr   r   zŽYou commit to getting the certification! Months of studying pay off when you pass the exam. It looks great on your resume and opens new doors.r7   r   r   zProfessional Certification in c                 s   s   | ]}d |v rdV  qdS )ZCertificationr   Nr3   rN   r3   r3   r4   rP   J  rQ   z,professionalCertification.<locals>.<genexpr>r   zMulti-Certified Professionalz’You decide to self-study without pursuing the official certification. You still learn a lot, even if you don't have the credential to show for it.r   r   r   zpYou decide the certification isn't worth the time and money investment right now. Maybe you'll reconsider later.)r   r   r   r   r   r   r;   r    r   r   r!   r"   r#   r
   r   r$   r%   r&   r(   r)   r*   r+   rR   )r,   r"   r   r-   r.   r/   r0   r1   r2   Z	cert_nameZ
cert_countZ
multi_certr3   r3   r4   rS   "  sZ    d
ý

rS   )r   r5   r<   rL   rS   )r   FF)r   FF)r   FF)r   FF)r   FF)Ú__doc__r    Zevents.baser   r   r   r   r5   r<   rL   rS   Ú__all__r3   r3   r3   r4   Ú<module>   s   
=
?
P
?
A