-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cybernetic Revolution trait fixes + improvements (#2581)
* Cybernetic Revolution trait fixes + improvements * .,.mklwefnhjwerfhbnfrwehbnjwer
- Loading branch information
Showing
4 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
monkestation/code/datums/station_traits/positive_traits.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/datum/station_trait/cybernetic_revolution/proc/on_job_after_spawn(datum/source, datum/job/job, mob/living/spawned, client/player_client) | ||
SIGNAL_HANDLER | ||
if(/datum/quirk/body_purist::name in player_client.prefs.all_quirks) | ||
return | ||
var/cybernetic_type = job_to_cybernetic[job.type] | ||
if(!cybernetic_type) | ||
if(isAI(spawned)) | ||
var/mob/living/silicon/ai/ai = spawned | ||
ai.eyeobj.relay_speech = TRUE //surveillance upgrade. the ai gets cybernetics too. | ||
return | ||
var/obj/item/organ/internal/cybernetic = new cybernetic_type() | ||
if(istype(cybernetic, /obj/item/organ/internal/cyberimp)) | ||
var/obj/item/organ/internal/cyberimp/implant = cybernetic | ||
var/obj/item/organ/internal/cyberimp/cyberlink/cyberlink = spawned.get_organ_slot(ORGAN_SLOT_LINK) | ||
if(QDELETED(cyberlink)) | ||
cyberlink = new /obj/item/organ/internal/cyberimp/cyberlink/nt_low | ||
cyberlink.Insert(spawned, special = TRUE, drop_if_replaced = FALSE) | ||
for(var/info in implant.encode_info) | ||
if(implant.encode_info[info] == NO_PROTOCOL) | ||
continue | ||
//Not a += because we want to avoid having duplicate entries in either encode_info | ||
implant.encode_info[info] |= cyberlink.encode_info[info] | ||
|
||
cybernetic.Insert(spawned, special = TRUE, drop_if_replaced = FALSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters