mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12
Conflicts: code/game/objects/items/weapons/surgery_tools.dm Did not do a pull in ages, all constants I sued in surgery code got renamed.
This commit is contained in:
@@ -68,8 +68,8 @@ proc/move_research_shuttle()
|
||||
|
||||
/obj/machinery/computer/research_shuttle/attack_hand(user as mob)
|
||||
src.add_fingerprint(usr)
|
||||
var/dat
|
||||
dat = text("<center>research shuttle:<br> <b><A href='?src=\ref[src];move=[1]'>Send</A></b></center>")
|
||||
var/dat = "<center>Research shuttle: <b><A href='?src=\ref[src];move=1'>Send</A></b></center><br>"
|
||||
|
||||
user << browse("[dat]", "window=researchshuttle;size=200x100")
|
||||
|
||||
/obj/machinery/computer/research_shuttle/Topic(href, href_list)
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
switch(cur_artifact.my_effect.effecttype)
|
||||
if("healing") src.aeffect1 = "Healing Device"
|
||||
if("injure") src.aeffect1 = "Anti-biological Weapon"
|
||||
if("stun") src.aeffect1 = "Non-lethal Stunning Trap"
|
||||
// if("stun") src.aeffect1 = "Non-lethal Stunning Trap"
|
||||
if("roboheal") src.aeffect1 = "Mechanoid Repair Module"
|
||||
if("robohurt") src.aeffect1 = "Mechanoid Deconstruction Device"
|
||||
if("cellcharge") src.aeffect1 = "Power Generator"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
var/effectmode = "aura" // How does it carry out the effect?
|
||||
var/aurarange = 4 // How far the artifact will extend an aura effect.
|
||||
var/list/created_field
|
||||
var/archived_loc
|
||||
|
||||
/datum/artifact_effect/New()
|
||||
//
|
||||
@@ -34,11 +35,19 @@
|
||||
del F
|
||||
|
||||
/datum/artifact_effect/proc/UpdateEffect(var/atom/originator)
|
||||
for(var/obj/effect/energy_field/F in created_field)
|
||||
/*for(var/obj/effect/energy_field/F in created_field)
|
||||
created_field.Remove(F)
|
||||
del F
|
||||
del F*/
|
||||
if(originator.loc != archived_loc)
|
||||
archived_loc = originator.loc
|
||||
update_move(originator)
|
||||
|
||||
for(var/obj/effect/energy_field/E in created_field)
|
||||
if(E.strength < 5)
|
||||
E.Strengthen(0.2)
|
||||
|
||||
/datum/artifact_effect/proc/DoEffect(var/atom/originator)
|
||||
archived_loc = originator.loc
|
||||
if (src.effectmode == "contact")
|
||||
var/mob/user = originator
|
||||
if(!user)
|
||||
@@ -97,7 +106,7 @@
|
||||
user.weakened += 6
|
||||
return 1
|
||||
else user << "Nothing happens."
|
||||
if("stun")
|
||||
/*if("stun")
|
||||
if (istype(user, /mob/living/carbon/))
|
||||
user << "\red A powerful force overwhelms your consciousness."
|
||||
user.paralysis += 30
|
||||
@@ -105,7 +114,7 @@
|
||||
user.weakened += 45
|
||||
user.stuttering += 45
|
||||
return 1
|
||||
else user << "Nothing happens."
|
||||
else user << "Nothing happens."*/
|
||||
if("roboheal")
|
||||
if (istype(user, /mob/living/silicon/robot))
|
||||
user << "\blue Your systems report damaged components mending by themselves!"
|
||||
@@ -121,7 +130,13 @@
|
||||
return 1
|
||||
else user << "Nothing happens."
|
||||
if("forcefield")
|
||||
var/obj/effect/energy_field/E = new /obj/effect/energy_field(locate(user.x + 2,user.y,user.z))
|
||||
while(created_field.len < 16)
|
||||
var/obj/effect/energy_field/E = new (locate(user.x,user.y,user.z))
|
||||
created_field.Add(E)
|
||||
E.strength = 1
|
||||
E.density = 1
|
||||
E.invisibility = 0
|
||||
/*var/obj/effect/energy_field/E = new /obj/effect/energy_field(locate(user.x + 2,user.y,user.z))
|
||||
E.strength = 1
|
||||
E.invisibility = 0
|
||||
E = new /obj/effect/energy_field(locate(user.x + 2,user.y + 1,user.z))
|
||||
@@ -183,7 +198,7 @@
|
||||
E = new /obj/effect/energy_field(locate(user.x - 1,user.y - 2,user.z))
|
||||
created_field.Add(E)
|
||||
E.strength = 1
|
||||
E.invisibility = 0
|
||||
E.invisibility = 0*/
|
||||
return 1
|
||||
if("teleport")
|
||||
var/list/randomturfs = new/list()
|
||||
@@ -195,14 +210,14 @@
|
||||
user << "\red You are suddenly zapped away elsewhere!"
|
||||
user.loc = pick(randomturfs)
|
||||
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
|
||||
sparks.set_up(3, 0, get_turf(src)) //no idea what the 0 is
|
||||
sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is
|
||||
sparks.start()
|
||||
return 1
|
||||
else if (src.effectmode == "aura")
|
||||
switch(src.effecttype)
|
||||
if("healing")
|
||||
for (var/mob/living/carbon/M in range(src.aurarange,originator))
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
if(prob(10)) M << "\blue You feel a soothing energy radiating from something nearby."
|
||||
M.adjustBruteLoss(-1)
|
||||
@@ -214,7 +229,7 @@
|
||||
return 1
|
||||
if("injure")
|
||||
for (var/mob/living/carbon/M in range(src.aurarange,originator))
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
if(prob(10)) M << "\red You feel a painful force radiating from something nearby."
|
||||
M.adjustBruteLoss(1)
|
||||
@@ -224,9 +239,9 @@
|
||||
M.adjustBrainLoss(1)
|
||||
M.updatehealth()
|
||||
return 1
|
||||
if("stun")
|
||||
/*if("stun")
|
||||
for (var/mob/living/carbon/M in range(src.aurarange,originator))
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
if(prob(10)) M << "\red Energy radiating from the [originator] is making you feel numb."
|
||||
if(prob(20))
|
||||
@@ -234,7 +249,7 @@
|
||||
M.stunned += 2
|
||||
M.weakened += 2
|
||||
M.stuttering += 2
|
||||
return 1
|
||||
return 1*/
|
||||
if("roboheal")
|
||||
for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
|
||||
if(prob(10)) M << "\blue SYSTEM ALERT: Beneficial energy field detected!"
|
||||
@@ -290,7 +305,7 @@
|
||||
switch(src.effecttype)
|
||||
if("healing")
|
||||
for (var/mob/living/carbon/M in range(src.aurarange,originator))
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
M << "\blue A wave of energy invigorates you."
|
||||
M.adjustBruteLoss(-5)
|
||||
@@ -302,7 +317,7 @@
|
||||
return 1
|
||||
if("injure")
|
||||
for (var/mob/living/carbon/M in range(src.aurarange,originator))
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
M << "\red A wave of energy causes you great pain!"
|
||||
M.adjustBruteLoss(5)
|
||||
@@ -314,16 +329,16 @@
|
||||
M.weakened += 3
|
||||
M.updatehealth()
|
||||
return 1
|
||||
if("stun")
|
||||
/*if("stun")
|
||||
for (var/mob/living/carbon/M in range(src.aurarange,originator))
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
M << "\red A wave of energy overwhelms your senses!"
|
||||
M.paralysis += 3
|
||||
M.stunned += 4
|
||||
M.weakened += 4
|
||||
M.stuttering += 4
|
||||
return 1
|
||||
return 1*/
|
||||
if("roboheal")
|
||||
for (var/mob/living/silicon/robot/M in range(src.aurarange,originator))
|
||||
M << "\blue SYSTEM ALERT: Structural damage has been repaired by energy pulse!"
|
||||
@@ -373,7 +388,7 @@
|
||||
return 1
|
||||
if("teleport")
|
||||
for (var/mob/living/M in range(src.aurarange,originator))
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
var/list/randomturfs = new/list()
|
||||
for(var/turf/T in orange(M, 30))
|
||||
@@ -393,7 +408,7 @@
|
||||
switch(src.effecttype)
|
||||
if("healing")
|
||||
for (var/mob/living/carbon/M in world)
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
M << "\blue Waves of soothing energy wash over you."
|
||||
M.adjustBruteLoss(-3)
|
||||
@@ -404,7 +419,7 @@
|
||||
M.updatehealth()
|
||||
return 1
|
||||
if("injure")
|
||||
for (var/mob/living/carbon/M in world)
|
||||
for (var/mob/living/carbon/human/M in world)
|
||||
M << "\red A wave of painful energy strikes you!"
|
||||
M.adjustBruteLoss(3)
|
||||
M.adjustFireLoss(3)
|
||||
@@ -413,16 +428,16 @@
|
||||
M.adjustBrainLoss(3)
|
||||
M.updatehealth()
|
||||
return 1
|
||||
if("stun")
|
||||
/*if("stun")
|
||||
for (var/mob/living/carbon/M in world)
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
M << "\red A powerful force causes you to black out momentarily."
|
||||
M.paralysis += 5
|
||||
M.stunned += 8
|
||||
M.weakened += 8
|
||||
M.stuttering += 8
|
||||
return 1
|
||||
return 1*/
|
||||
if("roboheal")
|
||||
for (var/mob/living/silicon/robot/M in world)
|
||||
M << "\blue SYSTEM ALERT: Structural damage has been repaired by energy pulse!"
|
||||
@@ -459,7 +474,7 @@
|
||||
return 1
|
||||
if("teleport")
|
||||
for (var/mob/living/M in world)
|
||||
if(istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
if(ishuman(M) && istype(M:wear_suit,/obj/item/clothing/suit/bio_suit/anomaly) && istype(M:head,/obj/item/clothing/head/bio_hood/anomaly))
|
||||
continue
|
||||
var/list/randomturfs = new/list()
|
||||
for(var/turf/T in orange(M, 15))
|
||||
@@ -473,3 +488,52 @@
|
||||
sparks.set_up(3, 0, get_turf(originator)) //no idea what the 0 is
|
||||
sparks.start()
|
||||
return 1
|
||||
|
||||
//initially for the force field artifact
|
||||
/datum/artifact_effect/proc/update_move(var/atom/originator)
|
||||
switch(effecttype)
|
||||
if("forcefield")
|
||||
while(created_field.len < 16)
|
||||
//for now, just instantly respawn the fields when they get destroyed
|
||||
var/obj/effect/energy_field/E = new (locate(originator.x,originator.y,originator))
|
||||
created_field.Add(E)
|
||||
E.strength = 1
|
||||
E.density = 1
|
||||
E.invisibility = 0
|
||||
|
||||
var/obj/effect/energy_field/E = created_field[1]
|
||||
E.loc = locate(originator.x + 2,originator.y + 2,originator.z)
|
||||
E = created_field[2]
|
||||
E.loc = locate(originator.x + 2,originator.y + 1,originator.z)
|
||||
E = created_field[3]
|
||||
E.loc = locate(originator.x + 2,originator.y,originator.z)
|
||||
E = created_field[4]
|
||||
E.loc = locate(originator.x + 2,originator.y - 1,originator.z)
|
||||
E = created_field[5]
|
||||
E.loc = locate(originator.x + 2,originator.y - 2,originator.z)
|
||||
E = created_field[6]
|
||||
E.loc = locate(originator.x + 1,originator.y + 2,originator.z)
|
||||
E = created_field[7]
|
||||
E.loc = locate(originator.x + 1,originator.y - 2,originator.z)
|
||||
E = created_field[8]
|
||||
E.loc = locate(originator.x,originator.y + 2,originator.z)
|
||||
E = created_field[9]
|
||||
E.loc = locate(originator.x,originator.y - 2,originator.z)
|
||||
E = created_field[10]
|
||||
E.loc = locate(originator.x - 1,originator.y + 2,originator.z)
|
||||
E = created_field[11]
|
||||
E.loc = locate(originator.x - 1,originator.y - 2,originator.z)
|
||||
E = created_field[12]
|
||||
E.loc = locate(originator.x - 2,originator.y + 2,originator.z)
|
||||
E = created_field[13]
|
||||
E.loc = locate(originator.x - 2,originator.y + 1,originator.z)
|
||||
E = created_field[14]
|
||||
E.loc = locate(originator.x - 2,originator.y,originator.z)
|
||||
E = created_field[15]
|
||||
E.loc = locate(originator.x - 2,originator.y - 1,originator.z)
|
||||
E = created_field[16]
|
||||
E.loc = locate(originator.x - 2,originator.y - 2,originator.z)
|
||||
|
||||
/*for(var/obj/effect/energy_field/F in created_field)
|
||||
created_field.Remove(F)
|
||||
del F*/
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
icon_state = "ano[icon_num]0"
|
||||
|
||||
// Low-ish random chance to not look like it's origin
|
||||
if(prob(20)) src.icon_state = pick("ano0","ano1","ano2","ano3","ano4","ano5")
|
||||
if(prob(20)) src.icon_state = pick("ano00","ano10","ano20","ano30","ano40","ano50")
|
||||
|
||||
// Power randomisation
|
||||
my_effect.trigger = pick("force","energy","chemical","heat","touch")
|
||||
@@ -48,17 +48,17 @@
|
||||
// Precursor Artifacts do everything
|
||||
switch(src.origin)
|
||||
if("ancient") my_effect.effecttype = pick("roboheal","robohurt","cellcharge","celldrain")
|
||||
if("martian") my_effect.effecttype = pick("healing","injure","stun","planthelper")
|
||||
if("wizard") my_effect.effecttype = pick("stun","forcefield","teleport")
|
||||
if("eldritch") my_effect.effecttype = pick("injure","stun","robohurt","celldrain")
|
||||
if("precursor") my_effect.effecttype = pick("healing","injure","stun","roboheal","robohurt","cellcharge","celldrain","planthelper","forcefield","teleport")
|
||||
if("martian") my_effect.effecttype = pick("healing","injure"/*,"stun"*/,"planthelper")
|
||||
if("wizard") my_effect.effecttype = pick(/*"stun",*/"forcefield","teleport")
|
||||
if("eldritch") my_effect.effecttype = pick("injure",/*"stun",*/"robohurt","celldrain")
|
||||
if("precursor") my_effect.effecttype = pick("healing","injure",/*"stun",*/"roboheal","robohurt","cellcharge","celldrain","planthelper","forcefield","teleport")
|
||||
|
||||
// Select range based on the power
|
||||
var/canworldpulse = 1
|
||||
switch(my_effect.effecttype)
|
||||
if("healing") my_effect.effectmode = pick("aura","pulse","contact")
|
||||
if("injure") my_effect.effectmode = pick("aura","pulse","contact")
|
||||
if("stun") my_effect.effectmode = pick("aura","pulse","contact")
|
||||
// if("stun") my_effect.effectmode = pick("aura","pulse","contact")
|
||||
if("roboheal") my_effect.effectmode = pick("aura","pulse","contact")
|
||||
if("robohurt") my_effect.effectmode = pick("aura","pulse","contact")
|
||||
if("cellcharge") my_effect.effectmode = pick("aura","pulse")
|
||||
@@ -87,13 +87,17 @@
|
||||
display_id += "-"
|
||||
display_id += num2text(rand(100,999))
|
||||
|
||||
/obj/machinery/artifact/Del()
|
||||
..()
|
||||
my_effect.HaltEffect()
|
||||
|
||||
/obj/machinery/artifact/attack_hand(var/mob/user as mob)
|
||||
if (istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead/)) return
|
||||
if (istype(user, /mob/living/silicon/robot))
|
||||
if (get_dist(user, src) > 1)
|
||||
user << "\red You can't reach [src] from here."
|
||||
return
|
||||
if(istype(user:gloves,/obj/item/clothing/gloves))
|
||||
if(ishuman(user) && istype(user:gloves,/obj/item/clothing/gloves))
|
||||
return ..()
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<b>[]</b> touches [].", user, src), 1)
|
||||
@@ -176,14 +180,14 @@
|
||||
chargetime -= 1
|
||||
else
|
||||
src.charged = 1
|
||||
my_effect.HaltEffect(src.loc)
|
||||
|
||||
my_effect.UpdateEffect(src.loc)
|
||||
|
||||
//activate
|
||||
if(src.charged && my_effect.DoEffect(src))
|
||||
src.charged = 0
|
||||
src.chargetime = src.recharge
|
||||
if( (my_effect.effectmode == "pulse" || my_effect.effecttype == "worldpulse") && activated)
|
||||
if(src.charged && my_effect.DoEffect(src))
|
||||
src.charged = 0
|
||||
src.chargetime = src.recharge
|
||||
|
||||
/obj/machinery/artifact/proc/Artifact_Activate()
|
||||
src.activated = !src.activated
|
||||
@@ -226,11 +230,16 @@
|
||||
// this was used in QM for a time but it fell into disuse and wasn't removed, the purpose being to check if an artifact
|
||||
// was benevolent or malicious, to determine whether QMs would be paid or punished for shipping it
|
||||
|
||||
/obj/machinery/artifact/Move()
|
||||
..()
|
||||
my_effect.update_move(src, src.loc)
|
||||
|
||||
|
||||
/proc/artifact_checkgood(var/datum/artifact_effect/A)
|
||||
switch(A.effecttype)
|
||||
if("healing") return 1
|
||||
if("injure") return 0
|
||||
if("stun") return 0
|
||||
// if("stun") return 0
|
||||
if("roboheal") return 1
|
||||
if("robohurt") return 0
|
||||
if("cellcharge") return 1
|
||||
|
||||
Reference in New Issue
Block a user