mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 04:17:33 +01:00
Changes how ipc resurrection works (#4472)
This prs removes the old method of ipc resurrection, which was just removing and placing the mmi/heart back into the body, which was really lazy and caused a lot of bugs. Now, robotics can create a ipcs frames using the different brands in the robotics frabricator, based on the torso's brand. The law manager can disable by using a multitool on the head which is the diffence between creating a cyborg or an ipc. Also; it allows you to customize your snowflakness after your new body is created. Changes: you can't print all torso types from robotics anymore, but there are torsos that come with their own brand, that you should be able to buy from cargo, that will allow someone to create another type of ipc. Feedback Topic: https://forums.aurorastation.org/viewtopic.php?f=18&t=10705
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
var/list/part = null // Order of args is important for installing robolimbs.
|
||||
var/sabotaged = 0 //Emagging limbs can have repercussions when installed as prosthetics.
|
||||
var/model_info
|
||||
var/linked_frame = "Unbranded Frame"
|
||||
dir = SOUTH
|
||||
|
||||
/obj/item/robot_parts/set_dir()
|
||||
@@ -21,6 +22,7 @@
|
||||
if(R)
|
||||
name = "[R.company] [initial(name)]"
|
||||
desc = "[R.desc]"
|
||||
linked_frame = R.linked_frame
|
||||
if(icon_state in icon_states(R.icon))
|
||||
icon = R.icon
|
||||
else
|
||||
@@ -69,6 +71,7 @@
|
||||
part = list("head")
|
||||
var/obj/item/device/flash/flash1 = null
|
||||
var/obj/item/device/flash/flash2 = null
|
||||
var/law_manager = TRUE
|
||||
|
||||
/obj/item/robot_parts/robot_suit
|
||||
name = "endoskeleton"
|
||||
@@ -198,41 +201,62 @@
|
||||
return
|
||||
|
||||
if(jobban_isbanned(M.brainmob, "Cyborg"))
|
||||
user << "<span class='warning'>This [W] does not seem to fit.</span>"
|
||||
user << "<span class='warning'>\The [W] does not seem to fit.</span>"
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), TRUE)
|
||||
if(!O) return
|
||||
if(!src.head.law_manager)
|
||||
|
||||
user.drop_item()
|
||||
if(!is_alien_whitelisted(M.brainmob, "Machine") && config.usealienwhitelist)
|
||||
user << "<span class='warning'>\The [W] does not seem to fit.</span>"
|
||||
return
|
||||
|
||||
O.mmi = W
|
||||
O.invisibility = 0
|
||||
O.custom_name = created_name
|
||||
O.updatename("Default")
|
||||
var/mob/living/carbon/human/new_shell = new(get_turf(loc), src.chest.linked_frame)
|
||||
src.forceMove(null) //so people won't mess around with the chassis until it is deleted
|
||||
M.brainmob.mind.transfer_to(new_shell)
|
||||
qdel(M)
|
||||
var/newname = sanitizeSafe(input(new_shell,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
|
||||
if(!newname)
|
||||
var/datum/language/L = all_languages[new_shell.species.default_language]
|
||||
newname = L.get_random_name()
|
||||
new_shell.real_name = newname
|
||||
new_shell.name = new_shell.real_name
|
||||
new_shell.change_appearance(APPEARANCE_ALL_HAIR | APPEARANCE_SKIN | APPEARANCE_EYE_COLOR, new_shell.loc, new_shell)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
M.brainmob.mind.transfer_to(O)
|
||||
else
|
||||
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), TRUE)
|
||||
if(!O) return
|
||||
|
||||
if(O.mind && O.mind.special_role)
|
||||
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
|
||||
user.drop_item()
|
||||
|
||||
O.job = "Cyborg"
|
||||
O.mmi = W
|
||||
O.invisibility = 0
|
||||
O.custom_name = created_name
|
||||
O.updatename("Default")
|
||||
|
||||
O.cell = chest.cell
|
||||
O.cell.loc = O
|
||||
W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
M.brainmob.mind.transfer_to(O)
|
||||
|
||||
// Since we "magically" installed a cell, we also have to update the correct component.
|
||||
if(O.cell)
|
||||
var/datum/robot_component/cell_component = O.components["power cell"]
|
||||
cell_component.wrapped = O.cell
|
||||
cell_component.installed = 1
|
||||
if(O.mind && O.mind.special_role)
|
||||
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
|
||||
|
||||
feedback_inc("cyborg_birth",1)
|
||||
callHook("borgify", list(O))
|
||||
O.Namepick()
|
||||
O.job = "Cyborg"
|
||||
|
||||
qdel(src)
|
||||
O.cell = chest.cell
|
||||
O.cell.loc = O
|
||||
W.loc = O//Should fix cybros run time erroring when blown up. It got deleted before, along with the frame.
|
||||
|
||||
// Since we "magically" installed a cell, we also have to update the correct component.
|
||||
if(O.cell)
|
||||
var/datum/robot_component/cell_component = O.components["power cell"]
|
||||
cell_component.wrapped = O.cell
|
||||
cell_component.installed = 1
|
||||
|
||||
feedback_inc("cyborg_birth",1)
|
||||
callHook("borgify", list(O))
|
||||
O.Namepick()
|
||||
|
||||
qdel(src)
|
||||
else
|
||||
user << "<span class='warning'>The MMI must go in after everything else!</span>"
|
||||
|
||||
@@ -271,6 +295,14 @@
|
||||
|
||||
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
if(ismultitool(W))
|
||||
if(law_manager)
|
||||
user << "<span class='notice'>You disable the lawing circuits on \the [src].</span>"
|
||||
law_manager = FALSE
|
||||
else
|
||||
user << "<span class='notice'>You enable the lawing circuits on \the [src].</span>"
|
||||
law_manager = TRUE
|
||||
|
||||
if(istype(W, /obj/item/device/flash))
|
||||
if(istype(user,/mob/living/silicon/robot))
|
||||
var/current_module = user.get_active_hand()
|
||||
@@ -313,3 +345,34 @@
|
||||
user << "<span class='warning'>You short out the safeties.</span>"
|
||||
sabotaged = 1
|
||||
return 1
|
||||
|
||||
//branded chest, to be used in ipc ressurection
|
||||
|
||||
/obj/item/robot_parts/chest/bishop
|
||||
name = "Bishop cybernetics torso"
|
||||
model_info = 1
|
||||
linked_frame = "Bishop Accessory Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/hephaestus
|
||||
name = "Hephaestus industries torso"
|
||||
linked_frame = "Hephaestus G2 Industrial Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/zenghu
|
||||
name = "Zeng-Hu pharmaceuticals torso"
|
||||
linked_frame = "Zeng-Hu Mobility Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/synthskin
|
||||
name = "Human synthskin torso"
|
||||
linked_frame = "Hephaestus G1 Industrial Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/xion
|
||||
name = "Xion manufacturing group torso"
|
||||
linked_frame = "Xion Industrial Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/ipc
|
||||
name = "Hephaestus integrated torso"
|
||||
linked_frame = "Baseline Frame"
|
||||
|
||||
/obj/item/robot_parts/chest/industrial
|
||||
name = "Hephaestus industrial torso"
|
||||
linked_frame = "Bishop Accessory Frame"
|
||||
|
||||
Reference in New Issue
Block a user