-
Notifications
You must be signed in to change notification settings - Fork 36
Synth & Android Customisation DLC #918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c14c608
ba16891
3208fa4
eb30ece
16bfb5f
13ce7d9
9e18cf9
7fd0ca7
fbce704
7e4f9b4
f74eec0
6913855
b89eb7e
251d76b
d2feafa
576d17f
0897dcc
a4caf8a
3320e0c
2b404db
22d9f7d
f563b6e
57c4ecb
9c99650
f9d83ab
ea97d92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| //Adds a new android stomach type which has more charge than the android stomach, but makes it impossible to eat. | ||
| /obj/item/organ/stomach/ethereal/android/battery_core | ||
| name = "Battery Core" | ||
| desc = "A robotic stomach replacement with many layers of batteries instead of a bioreactor." | ||
| icon = 'maplestation_modules/icons/obj/medical/organs/organs.dmi' | ||
| icon_state = "stomach_battery" | ||
|
|
||
| passive_drain_multiplier = 0.3 //drains slower than default robots | ||
| stomach_blood_transfer_rate = 0 //chems don't work too... | ||
|
|
||
|
|
||
| //stop eating benefits | ||
| #define NUTRITION_MULTIPLIER 0 //does this even work? | ||
| #define BOOZE_MULTIPLIER 0 | ||
| /obj/item/organ/stomach/ethereal/android/battery_core/effective_charge() | ||
| . = ..() | ||
|
|
||
| /obj/item/organ/stomach/ethereal/android/battery_core/handle_chemical(mob/living/carbon/source, datum/reagent/chem, seconds_per_tick, times_fired) | ||
| //No booze, no drink, no food. It is not a stomach, it is a battery! | ||
| return NONE | ||
|
|
||
| #undef NUTRITION_MULTIPLIER | ||
| #undef BOOZE_MULTIPLIER | ||
|
Comment on lines
+13
to
+23
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Defining |
||
|
|
||
|
|
||
| #define NO_CHARGE "Low Power" | ||
| #define HAS_CON_MOD (1 << 0) | ||
| #define HAS_MOOD_EVENT (1 << 1) | ||
| #define HAS_DEATH_TIMER (1 << 2) | ||
|
|
||
| //Tweaked charge code which makes overcharged shocking less often (I hate shocking people so bad.) Pretend it has some overcurrent protection or something. | ||
| /obj/item/organ/stomach/ethereal/android/battery_core/handle_charge(mob/living/carbon/carbon, seconds_per_tick, times_fired) | ||
| var/has_flags = NONE | ||
| switch(cell.charge()) | ||
| if(-INFINITY to ETHEREAL_CHARGE_NONE) | ||
| carbon.add_mood_event(ALERT_ETHEREAL_CHARGE, /datum/mood_event/android_no_charge) | ||
| if(!death_timer) | ||
| carbon.add_max_consciousness_value(NO_CHARGE, CONSCIOUSNESS_MAX * 0.4) | ||
| carbon.add_consciousness_modifier(NO_CHARGE, -30) | ||
| death_timer = addtimer(CALLBACK(src, PROC_REF(turn_off), carbon), 30 SECONDS, TIMER_UNIQUE|TIMER_STOPPABLE|TIMER_DELETE_ME) | ||
| to_chat(carbon, span_userdanger("Power levels critical: Shutdown in 30 seconds without recharge!")) | ||
| has_flags |= HAS_CON_MOD | HAS_MOOD_EVENT | HAS_DEATH_TIMER | ||
|
|
||
| if(ETHEREAL_CHARGE_NONE to ETHEREAL_CHARGE_LOWPOWER) | ||
| carbon.add_mood_event(ALERT_ETHEREAL_CHARGE, /datum/mood_event/android_decharged) | ||
| carbon.add_max_consciousness_value(NO_CHARGE, CONSCIOUSNESS_MAX * 0.6) | ||
| carbon.add_consciousness_modifier(NO_CHARGE, -20) | ||
| has_flags |= HAS_CON_MOD | HAS_MOOD_EVENT | ||
|
|
||
| if(ETHEREAL_CHARGE_LOWPOWER to ETHEREAL_CHARGE_NORMAL) | ||
| carbon.add_mood_event(ALERT_ETHEREAL_CHARGE, /datum/mood_event/android_low_power) | ||
| has_flags |= HAS_MOOD_EVENT | ||
|
|
||
| if(ETHEREAL_CHARGE_NORMAL to ETHEREAL_CHARGE_ALMOSTFULL) | ||
| EMPTY_BLOCK_GUARD | ||
|
|
||
| if(ETHEREAL_CHARGE_ALMOSTFULL to ETHEREAL_CHARGE_FULL) | ||
| carbon.add_mood_event(ALERT_ETHEREAL_CHARGE, /datum/mood_event/android_charged) | ||
| has_flags |= HAS_MOOD_EVENT | ||
|
|
||
| if(ETHEREAL_CHARGE_FULL to ETHEREAL_CHARGE_OVERLOAD) | ||
| carbon.add_mood_event(ALERT_ETHEREAL_CHARGE, /datum/mood_event/android_overcharged) | ||
| has_flags |= HAS_MOOD_EVENT | ||
|
|
||
| if(ETHEREAL_CHARGE_OVERLOAD to ETHEREAL_CHARGE_DANGEROUS) | ||
| carbon.add_mood_event(ALERT_ETHEREAL_CHARGE, /datum/mood_event/android_supercharged) | ||
| has_flags |= HAS_MOOD_EVENT | ||
| if(SPT_PROB(0.5, seconds_per_tick)) // UPDATED FROM 5% to 0.5% each second for the android to explosively release excess energy if it reaches dangerous levels | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than copy+pasting the entire block of code for |
||
| discharge_process(carbon) | ||
|
|
||
| carbon.hud_used?.hunger?.update_hunger_bar() | ||
| if(!(has_flags & HAS_MOOD_EVENT)) | ||
| carbon.clear_mood_event(ALERT_ETHEREAL_CHARGE) | ||
| if(!(has_flags & HAS_CON_MOD)) | ||
| carbon.remove_max_consciousness_value(NO_CHARGE) | ||
| carbon.remove_consciousness_modifier(NO_CHARGE) | ||
| if(!(has_flags & HAS_DEATH_TIMER) && death_timer) | ||
| deltimer(death_timer) | ||
| death_timer = null | ||
|
|
||
| #undef NO_CHARGE | ||
| #undef HAS_CON_MOD | ||
| #undef HAS_MOOD_EVENT | ||
| #undef HAS_DEATH_TIMER | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these options show up for arms/legs despite not having sprites? If so we'll need to figure out a way to prevent that