Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit

This commit is contained in:
SandPoot
2024-03-08 19:10:22 -03:00
810 changed files with 140372 additions and 5523 deletions
+2 -2
View File
@@ -25,7 +25,7 @@
AI.hack_software = TRUE
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
to_chat(user, span_notice("You install [src], upgrading [AI]."))
qdel(src)
@@ -46,7 +46,7 @@
AI.eyeobj.relay_speech = TRUE
to_chat(AI, "<span class='userdanger'>[user] has upgraded you with surveillance software!</span>")
to_chat(AI, "Via a combination of hidden microphones and lip reading software, you are able to use your cameras to listen in on conversations.")
to_chat(user, "<span class='notice'>You upgrade [AI]. [src] is consumed in the process.</span>")
to_chat(user, span_notice("You install [src], upgrading [AI]."))
log_game("[key_name(user)] has upgraded [key_name(AI)] with a [src].")
message_admins("[ADMIN_LOOKUPFLW(user)] has upgraded [ADMIN_LOOKUPFLW(AI)] with a [src].")
qdel(src)
+4 -5
View File
@@ -59,8 +59,8 @@
if(src.l_leg && src.r_leg)
if(src.chest && src.head)
SSblackbox.record_feedback("amount", "cyborg_frames_built", 1)
return 1
return 0
return TRUE
return FALSE
/obj/item/robot_suit/wrench_act(mob/living/user, obj/item/I) //Deconstucts empty borg shell. Flashes remain unbroken because they haven't been used yet
var/turf/T = get_turf(src)
@@ -292,9 +292,7 @@
if(M.laws.id == DEFAULT_AI_LAWID)
O.make_laws()
SSticker.mode.remove_antag_for_borging(BM.mind)
if(!istype(M.laws, /datum/ai_laws/ratvar))
remove_servant_of_ratvar(BM, TRUE)
BM.mind.remove_antags_for_borging()
BM.mind.transfer_to(O)
if(O.mind && O.mind.special_role)
@@ -312,6 +310,7 @@
qdel(O.mmi)
O.mmi = W //and give the real mmi to the borg.
O.updatename()
playsound(O.loc, 'sound/voice/liveagain.ogg', 75, TRUE)
SSblackbox.record_feedback("amount", "cyborg_birth", 1)
forceMove(O)
O.robot_suit = src
+14 -16
View File
@@ -8,32 +8,29 @@
icon_state = "cyborg_upgrade"
w_class = WEIGHT_CLASS_SMALL
var/locked = FALSE
var/installed = 0
var/require_module = 0
var/list/module_type
var/installed = FALSE
var/require_module = FALSE
var/list/module_type = null
/// Bitflags listing module compatibility. Used in the exosuit fabricator for creating sub-categories.
var/module_flags = NONE
// if true, is not stored in the robot to be ejected
// if module is reset
var/one_use = FALSE
/// Means this is a basetype and should not be used
var/abstract_type = /obj/item/borg/upgrade
/// Show the amount of this module that is installed
var/show_amount = FALSE
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R, user = usr)
if(R.stat == DEAD)
to_chat(user, "<span class='warning'>[src] will not function on a deceased cyborg.</span>")
to_chat(user, span_warning("[src] will not function on a deceased cyborg!"))
return FALSE
if(module_type && !is_type_in_list(R.module, module_type))
to_chat(R, "<span class='alert'>Upgrade mounting error! No suitable hardpoint detected.</span>")
to_chat(user, "<span class='warning'>There's no mounting point for the module!</span>")
to_chat(R, span_alert("Upgrade mounting error! No suitable hardpoint detected."))
to_chat(user, span_warning("There's no mounting point for the module!"))
return FALSE
return TRUE
/*
This proc gets called by upgrades after installing them. Use this for things that for example need to be moved into a specific borg item,
as performing this in action() will cause the upgrade to end up in the borg instead of its intended location due to forceMove() being called afterwards..
*/
/obj/item/borg/upgrade/proc/afterInstall(mob/living/silicon/robot/R, user = usr)
return
/obj/item/borg/upgrade/proc/deactivate(mob/living/silicon/robot/R, user = usr)
if (!(src in R.upgrades))
return FALSE
@@ -324,12 +321,12 @@ as performing this in action() will cause the upgrade to end up in the borg inst
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
ADD_TRAIT(src, TRAIT_LAVA_IMMUNE, type)
ADD_TRAIT(R, TRAIT_LAVA_IMMUNE, type)
/obj/item/borg/upgrade/lavaproof/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
REMOVE_TRAIT(src, TRAIT_LAVA_IMMUNE, type)
REMOVE_TRAIT(R, TRAIT_LAVA_IMMUNE, type)
/obj/item/borg/upgrade/selfrepair
name = "self-repair module"
@@ -440,6 +437,7 @@ as performing this in action() will cause the upgrade to end up in the borg inst
/obj/item/robot_module/syndicate_medical)
var/list/additional_reagents = list()
module_flags = BORG_MODULE_MEDICAL
abstract_type = /obj/item/borg/upgrade/hypospray
/obj/item/borg/upgrade/hypospray/action(mob/living/silicon/robot/R, user = usr)
. = ..()
@@ -721,6 +719,6 @@ as performing this in action() will cause the upgrade to end up in the borg inst
user.vtec = initial(user.vtec) - maxReduction * 1
action.button_icon_state = "Chevron_State_[currentState]"
action.UpdateButtonIcon()
action.UpdateButtons()
return TRUE